wisski-mirador-integration/mirador-integration.js
2022-09-16 13:47:09 +02:00

183 lines
No EOL
3.2 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e){function t(t){for(var n,i,o=t[0],a=t[1],s=0,u=[];s<o.length;s++)i=o[s],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&u.push(r[i][0]),r[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(c&&c(t);u.length;)u.shift()()}var n={},r={0:0};function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(){return Promise.resolve()},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonp=window.webpackJsonp||[],a=o.push.bind(o);o.push=t,o=o.slice();for(var s=0;s<o.length;s++)t(o[s]);var c=a;i(i.s=1114)}([function(e,t,n){"use strict";e.exports=n(767)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(768)()},function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}t.a=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(58);function i(e,t){if(null==e)return{};var n,i,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";var r=n(1),i=n(1119),o=n(121);t.a=function(e,t){return Object(i.a)(e,Object(r.a)({defaultTheme:o.a},t))}},function(e,t,n){"use strict";t.a={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"}},function(e,t,n){"use strict";n.r(t),n.d(t,"__DO_NOT_USE__ActionTypes",(function(){return u})),n.d(t,"applyMiddleware",(function(){return v})),n.d(t,"bindActionCreators",(function(){return h})),n.d(t,"combineReducers",(function(){return d})),n.d(t,"compose",(function(){return g})),n.d(t,"createStore",(function(){return f}));var r=n(27);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var s="function"==typeof Symbol&&Symbol.observable||"@@observable",c=function(){return Math.random().toString(36).substring(7).split("").join(".")},u={INIT:"@@redux/INIT"+c(),REPLACE:"@@redux/REPLACE"+c(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c()}};function l(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function f(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(a(1));return n(f)(e,t)}if("function"!=typeof e)throw new Error(a(2));var i=e,o=t,c=[],d=c,p=!1;function h(){d===c&&(d=c.slice())}function g(){if(p)throw new Error(a(3));return o}function v(e){if("function"!=typeof e)throw new Error(a(4));if(p)throw new Error(a(5));var t=!0;return h(),d.push(e),function(){if(t){if(p)throw new Error(a(6));t=!1,h();var n=d.indexOf(e);d.splice(n,1),c=null}}}function m(e){if(!l(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(p)throw new Error(a(9));try{p=!0,o=i(o,e)}finally{p=!1}for(var t=c=d,n=0;n<t.length;n++){(0,t[n])()}return e}function y(e){if("function"!=typeof e)throw new Error(a(10));i=e,m({type:u.REPLACE})}function b(){var e,t=v;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(a(11));function n(){e.next&&e.next(g())}return n(),{unsubscribe:t(n)}}})[s]=function(){return this},e}return m({type:u.INIT}),(r={dispatch:m,subscribe:v,getState:g,replaceReducer:y})[s]=b,r}function d(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"==typeof e[i]&&(n[i]=e[i])}var o,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:u.INIT}))throw new Error(a(12));if(void 0===n(void 0,{type:u.PROBE_UNKNOWN_ACTION()}))throw new Error(a(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},c=0;c<s.length;c++){var u=s[c],l=n[u],f=e[u],d=l(f,t);if(void 0===d){t&&t.type;throw new Error(a(14))}i[u]=d,r=r||d!==f}return(r=r||s.length!==Object.keys(e).length)?i:e}}function p(e,t){return function(){return t(e.apply(this,arguments))}}function h(e,t){if("function"==typeof e)return p(e,t);if("object"!=typeof e||null===e)throw new Error(a(16));var n={};for(var r in e){var i=e[r];"function"==typeof i&&(n[r]=p(i,t))}return n}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function v(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(a(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(i)}));return r=g.apply(void 0,s)(n.dispatch),o(o({},n),{},{dispatch:r})}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),i=n.n(r),o=n(458),a=n.n(o),s=n(221),c=n.n(s),u=n(347);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=a()((function(e,t){function n(n,o){var a=Object(r.useContext)(u.a),s=f(f({},n),o?{ref:o}:{}),l=(a||{})[e];if(c()(l)||c()(l.wrap)&&c()(l.add))return i.a.createElement(t,s);var d=(l.add||[]).map((function(e){return e.component})),p=i.a.createElement(t,Object.assign({},s,{PluginComponents:d}));if(c()(l.wrap))return p;return l.wrap.slice().reverse().reduce((function(e,n){var r=n.component;return i.a.createElement(r,Object.assign({targetProps:s},s,{PluginComponents:d,TargetComponent:t}),e)}),i.a.createElement(t,s))}var o=i.a.forwardRef(n);return o.displayName="WithPlugins(".concat(e,")"),o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return U}));var r=n(0),i=n.n(r),o=(n(2),i.a.createContext(null));var a=function(e){e()};function s(){var e=a,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var c={notify:function(){},get:function(){return[]}};function u(e,t){var n,r=c;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=s())}var a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=c)},getListeners:function(){return r}};return a}var l="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;var f=function(e){var t=e.store,n=e.context,a=e.children,s=Object(r.useMemo)((function(){var e=u(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),c=Object(r.useMemo)((function(){return t.getState()}),[t]);l((function(){var e=s.subscription;return e.trySubscribe(),c!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,c]);var f=n||o;return i.a.createElement(f.Provider,{value:s},a)},d=n(1),p=n(58),h=n(83),g=n.n(h),v=n(67),m=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],y=["reactReduxForwardedRef"],b=[],w=[null,null];function _(e,t){var n=e[1];return[t.payload,n+1]}function x(e,t,n){l((function(){return e.apply(void 0,t)}),n)}function O(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function S(e,t,n,r,i,o,a,s,c,u){if(e){var l=!1,f=null,d=function(){if(!l){var e,n,d=t.getState();try{e=r(d,i.current)}catch(e){n=e,f=e}n||(f=null),e===o.current?a.current||c():(o.current=e,s.current=e,a.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=d,n.trySubscribe(),d();return function(){if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var E=function(){return[null,0]};function C(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,s=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,c=n.methodName,l=void 0===c?"connectAdvanced":c,f=n.renderCountProp,h=void 0===f?void 0:f,C=n.shouldHandleStateChanges,k=void 0===C||C,T=n.storeKey,j=void 0===T?"store":T,P=(n.withRef,n.forwardRef),I=void 0!==P&&P,R=n.context,A=void 0===R?o:R,M=Object(p.a)(n,m),D=A;return function(t){var n=t.displayName||t.name||"Component",o=s(n),a=Object(d.a)({},M,{getDisplayName:s,methodName:l,renderCountProp:h,shouldHandleStateChanges:k,storeKey:j,displayName:o,wrappedComponentName:n,WrappedComponent:t}),c=M.pure;var f=c?r.useMemo:function(e){return e()};function m(n){var o=Object(r.useMemo)((function(){var e=n.reactReduxForwardedRef,t=Object(p.a)(n,y);return[n.context,e,t]}),[n]),s=o[0],c=o[1],l=o[2],h=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(v.isContextConsumer)(i.a.createElement(s.Consumer,null))?s:D}),[s,D]),g=Object(r.useContext)(h),m=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(g)&&Boolean(g.store);var C=m?n.store:g.store,T=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,a)}(C)}),[C]),j=Object(r.useMemo)((function(){if(!k)return w;var e=u(C,m?null:g.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[C,m,g]),P=j[0],I=j[1],R=Object(r.useMemo)((function(){return m?g:Object(d.a)({},g,{subscription:P})}),[m,g,P]),A=Object(r.useReducer)(_,b,E),M=A[0][0],N=A[1];if(M&&M.error)throw M.error;var L=Object(r.useRef)(),z=Object(r.useRef)(l),B=Object(r.useRef)(),F=Object(r.useRef)(!1),W=f((function(){return B.current&&l===z.current?B.current:T(C.getState(),l)}),[C,M,l]);x(O,[z,L,F,l,W,B,I]),x(S,[k,C,P,T,z,L,F,B,I,N],[C,P,T]);var H=Object(r.useMemo)((function(){return i.a.createElement(t,Object(d.a)({},W,{ref:c}))}),[c,t,W]);return Object(r.useMemo)((function(){return k?i.a.createElement(h.Provider,{value:R},H):H}),[h,H,R])}var C=c?i.a.memo(m):m;if(C.WrappedComponent=t,C.displayName=m.displayName=o,I){var T=i.a.forwardRef((function(e,t){return i.a.createElement(C,Object(d.a)({},e,{reactReduxForwardedRef:t}))}));return T.displayName=o,T.WrappedComponent=t,g()(T,t)}return g()(C,t)}}function k(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(k(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!k(e[n[i]],t[n[i]]))return!1;return!0}function j(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function P(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function I(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=P(e);var i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=P(i),i=r(t,n)),i},r}}var R=[function(e){return"function"==typeof e?I(e):void 0},function(e){return e?void 0:j((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?j((function(t){return function(e,t){var n={},r=function(r){var i=e[r];"function"==typeof i&&(n[r]=function(){return t(i.apply(void 0,arguments))})};for(var i in e)r(i);return n}(e,t)})):void 0}];var A=[function(e){return"function"==typeof e?I(e):void 0},function(e){return e?void 0:j((function(){return{}}))}];function M(e,t,n){return Object(d.a)({},n,e,t)}var D=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,o=n.areMergedPropsEqual,a=!1;return function(t,n,s){var c=e(t,n,s);return a?i&&o(c,r)||(r=c):(a=!0,r=c),r}}}(e):void 0},function(e){return e?void 0:function(){return M}}];var N=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function L(e,t,n,r){return function(i,o){return n(e(i,o),t(r,o),o)}}function z(e,t,n,r,i){var o,a,s,c,u,l=i.areStatesEqual,f=i.areOwnPropsEqual,d=i.areStatePropsEqual,p=!1;function h(i,p){var h,g,v=!f(p,a),m=!l(i,o);return o=i,a=p,v&&m?(s=e(o,a),t.dependsOnOwnProps&&(c=t(r,a)),u=n(s,c,a)):v?(e.dependsOnOwnProps&&(s=e(o,a)),t.dependsOnOwnProps&&(c=t(r,a)),u=n(s,c,a)):m?(h=e(o,a),g=!d(h,s),s=h,g&&(u=n(s,c,a)),u):u}return function(i,l){return p?h(i,l):(s=e(o=i,a=l),c=t(r,a),u=n(s,c,a),p=!0,u)}}function B(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=Object(p.a)(t,N),a=n(e,o),s=r(e,o),c=i(e,o);return(o.pure?z:L)(a,s,c,e,o)}var F=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function W(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function H(e,t){return e===t}function V(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?C:n,i=t.mapStateToPropsFactories,o=void 0===i?A:i,a=t.mapDispatchToPropsFactories,s=void 0===a?R:a,c=t.mergePropsFactories,u=void 0===c?D:c,l=t.selectorFactory,f=void 0===l?B:l;return function(e,t,n,i){void 0===i&&(i={});var a=i,c=a.pure,l=void 0===c||c,h=a.areStatesEqual,g=void 0===h?H:h,v=a.areOwnPropsEqual,m=void 0===v?T:v,y=a.areStatePropsEqual,b=void 0===y?T:y,w=a.areMergedPropsEqual,_=void 0===w?T:w,x=Object(p.a)(a,F),O=W(e,o,"mapStateToProps"),S=W(t,s,"mapDispatchToProps"),E=W(n,u,"mergeProps");return r(f,Object(d.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:O,initMapDispatchToProps:S,initMergeProps:E,pure:l,areStatesEqual:g,areOwnPropsEqual:m,areStatePropsEqual:b,areMergedPropsEqual:_},x))}}var U=V();var q,G=n(33);q=G.unstable_batchedUpdates,a=q},function(e,t,n){"use strict";n.r(t),n.d(t,"defaultMemoize",(function(){return i})),n.d(t,"defaultEqualityCheck",(function(){return r})),n.d(t,"createSelectorCreator",(function(){return a})),n.d(t,"createSelector",(function(){return s})),n.d(t,"createStructuredSelector",(function(){return c}));var r=function(e,t){return e===t};function i(e,t){var n,i,o="object"==typeof t?t:{equalityCheck:t},a=o.equalityCheck,s=void 0===a?r:a,c=o.maxSize,u=void 0===c?1:c,l=o.resultEqualityCheck,f=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}(s),d=1===u?(n=f,{get:function(e){return i&&n(i.key,e)?i.value:"NOT_FOUND"},put:function(e,t){i={key:e,value:t}},getEntries:function(){return i?[i]:[]},clear:function(){i=void 0}}):function(e,t){var n=[];function r(e){var r=n.findIndex((function(n){return t(e,n.key)}));if(r>-1){var i=n[r];return r>0&&(n.splice(r,1),n.unshift(i)),i.value}return"NOT_FOUND"}return{get:r,put:function(t,i){"NOT_FOUND"===r(t)&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(u,f);function p(){var t=d.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),l){var n=d.getEntries(),r=n.find((function(e){return l(e.value,t)}));r&&(t=r.value)}d.put(arguments,t)}return t}return p.clearCache=function(){return d.clear()},p}function o(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var a,s=0,c={memoizeOptions:void 0},u=r.pop();if("object"==typeof u&&(c=u,u=r.pop()),"function"!=typeof u)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof u+"]");var l=c,f=l.memoizeOptions,d=void 0===f?n:f,p=Array.isArray(d)?d:[d],h=o(r),g=e.apply(void 0,[function(){return s++,u.apply(null,arguments)}].concat(p)),v=e((function(){for(var e=[],t=h.length,n=0;n<t;n++)e.push(h[n].apply(null,arguments));return a=g.apply(null,e)}));return Object.assign(v,{resultFunc:u,memoizedResultFunc:g,dependencies:h,lastResult:function(){return a},recomputations:function(){return s},resetRecomputations:function(){return s=0}}),v};return i}var s=a(i),c=function(e,t){if(void 0===t&&(t=s),"object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map((function(t){return e[t]})),(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t,r){return e[n[r]]=t,e}),{})}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(247);function i(e){if("string"!=typeof e)throw new Error(Object(r.a)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var r=u(n(873)),i=u(n(875)),o=u(n(894)),a=u(n(895)),s=u(n(896)),c=u(n(897));function u(e){return e&&e.__esModule?e:{default:e}}t.hover=a.default,t.handleHover=a.default,t.handleActive=s.default,t.loop=c.default;var l=t.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];var s=(0,r.default)(n),c=(0,i.default)(e,s);return(0,o.default)(c)};t.default=l},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(103),i=n(29),o=n.n(i);t.a=function(e){return o()([e]).map((function(e){return[r.a.createGenerateClassNameOptions.productionPrefix,e].join("-")})).join(" ")}},function(e,t,n){e.exports=n(765)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BOOKMARKING="oa:bookmarking",e.CLASSIFYING="oa:classifying",e.COMMENTING="oa:commenting",e.DESCRIBING="oa:describing",e.EDITING="oa:editing",e.HIGHLIGHTING="oa:highlighting",e.IDENTIFYING="oa:identifying",e.LINKING="oa:linking",e.MODERATING="oa:moderating",e.PAINTING="sc:painting",e.QUESTIONING="oa:questioning",e.REPLYING="oa:replying",e.TAGGING="oa:tagging",e.TRANSCRIBING="oad:transcribing"}(t.AnnotationMotivation||(t.AnnotationMotivation={})),function(e){e.AUTO_ADVANCE="auto-advance",e.CONTINUOUS="continuous",e.FACING_PAGES="facing-pages",e.HIDDEN="hidden",e.INDIVIDUALS="individuals",e.MULTI_PART="multi-part",e.NO_NAV="no-nav",e.NON_PAGED="non-paged",e.PAGED="paged",e.REPEAT="repeat",e.SEQUENCE="sequence",e.THUMBNAIL_NAV="thumbnail-nav",e.TOGETHER="together",e.UNORDERED="unordered"}(t.Behavior||(t.Behavior={})),function(e){e.CANVAS="canvas",e.CHOICE="choice",e.OA_CHOICE="oa:choice",e.CONTENT_AS_TEXT="contentastext",e.DATASET="dataset",e.DOCUMENT="document",e.IMAGE="image",e.MODEL="model",e.MOVING_IMAGE="movingimage",e.PDF="pdf",e.PHYSICAL_OBJECT="physicalobject",e.SOUND="sound",e.TEXT="text",e.TEXTUALBODY="textualbody",e.VIDEO="video"}(t.ExternalResourceType||(t.ExternalResourceType={})),function(e){e.ANNOTATION="annotation",e.CANVAS="canvas",e.COLLECTION="collection",e.MANIFEST="manifest",e.RANGE="range",e.SEQUENCE="sequence"}(t.IIIFResourceType||(t.IIIFResourceType={})),function(e){e.AUDIO_MP4="audio/mp4",e.CORTO="application/corto",e.DICOM="application/dicom",e.DRACO="application/draco",e.EPUB="application/epub+zip",e.GIRDER="image/vnd.kitware.girder",e.GLB="model/gltf-binary",e.GLTF="model/gltf+json",e.IIIF_PRESENTATION_2='application/ld+json;profile="http://iiif.io/api/presentation/2/context.json"',e.IIIF_PRESENTATION_3='application/ld+json;profile="http://iiif.io/api/presentation/3/context.json"',e.JPG="image/jpeg",e.M3U8="application/vnd.apple.mpegurl",e.MP3="audio/mp3",e.MPEG_DASH="application/dash+xml",e.OBJ="text/plain",e.OPF="application/oebps-package+xml",e.PDF="application/pdf",e.PLY="application/ply",e.THREEJS="application/vnd.threejs+json",e.USDZ="model/vnd.usd+zip",e.VIDEO_MP4="video/mp4",e.WAV="audio/wav",e.WEBM="video/webm"}(t.MediaType||(t.MediaType={})),function(e){e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.PDF="application/pdf"}(t.RenderingFormat||(t.RenderingFormat={})),function(e){e.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",e.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",e.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",e.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",e.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",e.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",e.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",e.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",e.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",e.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",e.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",e.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",e.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",e.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",e.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",e.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",e.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",e.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",e.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",e.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",e.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",e.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",e.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",e.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",e.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",e.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",e.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",e.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",e.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",e.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",e.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",e.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",e.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",e.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",e.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",e.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",e.SEARCH_0="http://iiif.io/api/search/0/search",e.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",e.SEARCH_1="http://iiif.io/api/search/1/search",e.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",e.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",e.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",e.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",e.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",e.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",e.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"}(t.ServiceProfile||(t.ServiceProfile={})),function(e){e.BOTTOM_TO_TOP="bottom-to-top",e.LEFT_TO_RIGHT="left-to-right",e.RIGHT_TO_LEFT="right-to-left",e.TOP_TO_BOTTOM="top-to-bottom"}(t.ViewingDirection||(t.ViewingDirection={})),function(e){e.CONTINUOUS="continuous",e.INDIVIDUALS="individuals",e.NON_PAGED="non-paged",e.PAGED="paged",e.TOP="top"}(t.ViewingHint||(t.ViewingHint={}))},function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(!e){var o;if(void 0===t)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(o=new Error(t.replace(/%s/g,(function(){return r[a++]})))).name="Invariant Violation"}throw o.framesToPop=1,o}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(667);n.d(t,"getAnnotations",(function(){return r.c})),n.d(t,"getPresentAnnotationsOnSelectedCanvases",(function(){return r.d})),n.d(t,"getAnnotationResourcesByMotivationForCanvas",(function(){return r.b})),n.d(t,"getAnnotationResourcesByMotivation",(function(){return r.a})),n.d(t,"getSelectedAnnotationId",(function(){return r.e})),n.d(t,"getSelectedAnnotationsOnCanvases",(function(){return r.f}));var i=n(45);n.d(t,"selectInfoResponses",(function(){return i.selectInfoResponses})),n.d(t,"getCanvases",(function(){return i.getCanvases})),n.d(t,"getCanvas",(function(){return i.getCanvas})),n.d(t,"getCurrentCanvas",(function(){return i.getCurrentCanvas})),n.d(t,"getVisibleCanvasIds",(function(){return i.getVisibleCanvasIds})),n.d(t,"getVisibleCanvases",(function(){return i.getVisibleCanvases})),n.d(t,"getCanvasGroupings",(function(){return i.getCanvasGroupings})),n.d(t,"getCanvasGrouping",(function(){return i.getCanvasGrouping})),n.d(t,"getNextCanvasGrouping",(function(){return i.getNextCanvasGrouping})),n.d(t,"getPreviousCanvasGrouping",(function(){return i.getPreviousCanvasGrouping})),n.d(t,"getCanvasLabel",(function(){return i.getCanvasLabel})),n.d(t,"getCanvasDescription",(function(){return i.getCanvasDescription})),n.d(t,"getVisibleCanvasNonTiledResources",(function(){return i.getVisibleCanvasNonTiledResources})),n.d(t,"getVisibleCanvasVideoResources",(function(){return i.getVisibleCanvasVideoResources})),n.d(t,"getVisibleCanvasCaptions",(function(){return i.getVisibleCanvasCaptions})),n.d(t,"getVisibleCanvasAudioResources",(function(){return i.getVisibleCanvasAudioResources})),n.d(t,"selectInfoResponse",(function(){return i.selectInfoResponse}));var o=n(148);n.d(t,"getCompanionWindows",(function(){return o.getCompanionWindows})),n.d(t,"getCompanionWindow",(function(){return o.getCompanionWindow})),n.d(t,"getThumbnailNavigationPosition",(function(){return o.getThumbnailNavigationPosition})),n.d(t,"getCompanionWindowsForPosition",(function(){return o.getCompanionWindowsForPosition})),n.d(t,"getCompanionWindowsForContent",(function(){return o.getCompanionWindowsForContent})),n.d(t,"getCompanionWindowIdsForPosition",(function(){return o.getCompanionWindowIdsForPosition})),n.d(t,"getCompanionAreaVisibility",(function(){return o.getCompanionAreaVisibility})),n.d(t,"selectCompanionWindowDimensions",(function(){return o.selectCompanionWindowDimensions}));var a=n(88);n.d(t,"getConfig",(function(){return a.a})),n.d(t,"getExportableState",(function(){return a.c})),n.d(t,"getLanguagesFromConfigWithCurrent",(function(){return a.d})),n.d(t,"getShowZoomControlsConfig",(function(){return a.f})),n.d(t,"getTheme",(function(){return a.g})),n.d(t,"getThemeIds",(function(){return a.i})),n.d(t,"getContainerId",(function(){return a.b})),n.d(t,"getThemeDirection",(function(){return a.h})),n.d(t,"getRequestsConfig",(function(){return a.e}));var s=n(38);n.d(t,"getWindowManifests",(function(){return s.g})),n.d(t,"getWindows",(function(){return s.h})),n.d(t,"getWindow",(function(){return s.e})),n.d(t,"getViewer",(function(){return s.d})),n.d(t,"getWorkspace",(function(){return s.i})),n.d(t,"getWindowIds",(function(){return s.f})),n.d(t,"getManifests",(function(){return s.c})),n.d(t,"getManifest",(function(){return s.b})),n.d(t,"getCatalog",(function(){return s.a}));var c=n(90);n.d(t,"getManifestStatus",(function(){return c.m})),n.d(t,"getManifestError",(function(){return c.d})),n.d(t,"getManifestoInstance",(function(){return c.q})),n.d(t,"getManifestLocale",(function(){return c.f})),n.d(t,"getManifestLogo",(function(){return c.g})),n.d(t,"getManifestProvider",(function(){return c.i})),n.d(t,"getManifestHomepage",(function(){return c.e})),n.d(t,"getManifestRenderings",(function(){return c.k})),n.d(t,"getManifestRelatedContent",(function(){return c.j})),n.d(t,"getRequiredStatement",(function(){return c.s})),n.d(t,"getRights",(function(){return c.t})),n.d(t,"getManifestThumbnail",(function(){return c.n})),n.d(t,"getManifestTitle",(function(){return c.o})),n.d(t,"getManifestDescription",(function(){return c.c})),n.d(t,"getManifestUrl",(function(){return c.p})),n.d(t,"getDestructuredMetadata",(function(){return c.a})),n.d(t,"getManifestMetadata",(function(){return c.h})),n.d(t,"getMetadataLocales",(function(){return c.r})),n.d(t,"getManifestSearchService",(function(){return c.l})),n.d(t,"getManifestAutocompleteService",(function(){return c.b}));var u=n(206);n.d(t,"getWindowConfig",(function(){return u.c})),n.d(t,"getWindowTitles",(function(){return u.e})),n.d(t,"getMaximizedWindowsIds",(function(){return u.b})),n.d(t,"getWindowViewType",(function(){return u.f})),n.d(t,"getAllowedWindowViewTypes",(function(){return u.a})),n.d(t,"getWindowDraggability",(function(){return u.d}));var l=n(319);n.d(t,"getElasticLayout",(function(){return l.a})),n.d(t,"getFullScreenEnabled",(function(){return l.b})),n.d(t,"getLatestError",(function(){return l.c})),n.d(t,"getWorkspaceType",(function(){return l.d})),n.d(t,"isFocused",(function(){return l.e}));var f=n(566);n.d(t,"getSearchForWindow",(function(){return f.g})),n.d(t,"getSearchQuery",(function(){return f.j})),n.d(t,"getSearchIsFetching",(function(){return f.h})),n.d(t,"getSearchNumTotal",(function(){return f.i})),n.d(t,"getNextSearchId",(function(){return f.b})),n.d(t,"getSortedSearchHitsForCompanionWindow",(function(){return f.m})),n.d(t,"getSearchAnnotationsForCompanionWindow",(function(){return f.e})),n.d(t,"sortSearchAnnotationsByCanvasOrder",(function(){return f.n})),n.d(t,"getSortedSearchAnnotationsForCompanionWindow",(function(){return f.l})),n.d(t,"getSearchAnnotationsForWindow",(function(){return f.f})),n.d(t,"getSelectedContentSearchAnnotationIds",(function(){return f.k})),n.d(t,"getResourceAnnotationForSearchHit",(function(){return f.c})),n.d(t,"getResourceAnnotationLabel",(function(){return f.d})),n.d(t,"getCanvasForAnnotation",(function(){return f.a}));var d=n(246);n.d(t,"getVisibleNodeIds",(function(){return d.e})),n.d(t,"getManuallyExpandedNodeIds",(function(){return d.c})),n.d(t,"getExpandedNodeIds",(function(){return d.b})),n.d(t,"getNodeIdToScrollTo",(function(){return d.d})),n.d(t,"getDefaultSidebarVariant",(function(){return d.a}));var p=n(321);n.d(t,"getCanvasLayers",(function(){return p.a})),n.d(t,"getLayers",(function(){return p.b})),n.d(t,"getSortedLayers",(function(){return p.d})),n.d(t,"getLayersForVisibleCanvases",(function(){return p.c}));var h=n(76);n.d(t,"getSequences",(function(){return h.g})),n.d(t,"getSequence",(function(){return h.b})),n.d(t,"getCanvasIndex",(function(){return h.a})),n.d(t,"getSequenceViewingHint",(function(){return h.f})),n.d(t,"getSequenceViewingDirection",(function(){return h.e})),n.d(t,"getSequenceBehaviors",(function(){return h.c})),n.d(t,"getSequenceTreeStructure",(function(){return h.d}));var g=n(567);n.d(t,"getAuthProfiles",(function(){return g.c})),n.d(t,"getAccessTokens",(function(){return g.a})),n.d(t,"getAuth",(function(){return g.b})),n.d(t,"selectCurrentAuthServices",(function(){return g.d}));var v=n(46);n.d(t,"miradorSlice",(function(){return v.a}));var m=n(568);n.d(t,"getCurrentCanvasWorld",(function(){return m.a}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(74)},function(e,t,n){var r=n(846).default;function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var c=a?Object.getOwnPropertyDescriptor(e,s):null;c&&(c.get||c.set)?Object.defineProperty(o,s,c):o[s]=e[s]}return o.default=e,n&&n.set(e,o),o},e.exports.__esModule=!0,e.exports.default=e.exports},,function(e,t,n){"use strict";var r=n(27),i=n(208);function o(e,t){return t&&"string"==typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}t.a=function(e){var t=e.prop,n=e.cssProperty,a=void 0===n?e.prop:n,s=e.themeKey,c=e.transform,u=function(e){if(null==e[t])return null;var n=e[t],u=o(e.theme,s)||{};return Object(i.b)(e,n,(function(e){var t;return"function"==typeof u?t=u(e):Array.isArray(u)?t=u[e]||e:(t=o(u,e)||e,c&&(t=c(t))),!1===a?t:Object(r.a)({},a,t)}))};return u.propTypes={},u.filterProps=[t],u}},function(e,t,n){var r;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var a=i.apply(null,r);a&&e.push(a)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";n.d(t,"h",(function(){return o})),n.d(t,"l",(function(){return a})),n.d(t,"i",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"k",(function(){return u})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return g})),n.d(t,"j",(function(){return v}));var r=n(247);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function a(e){if(0===e.indexOf("#"))return e;var t=c(e).values;return"#".concat(t.map((function(e){return 1===(t=e.toString(16)).length?"0".concat(t):t;var t})).join(""))}function s(e){var t=(e=c(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),u({type:s,values:l})}function c(e){if(e.type)return e;if("#"===e.charAt(0))return c(o(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function u(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function l(e,t){var n=f(e),r=f(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function f(e){var t="hsl"===(e=c(e)).type?c(s(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return f(e)>.5?g(e,t):v(e,t)}function p(e,t){return h(e,t)}function h(e,t){return e=c(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,u(e)}function g(e,t){if(e=c(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return u(e)}function v(e,t){if(e=c(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return u(e)}},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.r(t),n.d(t,"chainPropTypes",(function(){return r})),n.d(t,"deepmerge",(function(){return i.a})),n.d(t,"elementAcceptingRef",(function(){return c})),n.d(t,"elementTypeAcceptingRef",(function(){return u})),n.d(t,"exactProp",(function(){return l})),n.d(t,"formatMuiErrorMessage",(function(){return f.a})),n.d(t,"getDisplayName",(function(){return y})),n.d(t,"HTMLElementType",(function(){return b})),n.d(t,"ponyfillGlobal",(function(){return w})),n.d(t,"refType",(function(){return _}));var i=n(331),o=n(2),a=n.n(o);var s=(a.a.element,function(){return null});s.isRequired=(a.a.element.isRequired,function(){return null});var c=s;var u=(o.elementType,function(){return null});n(27),n(1);function l(e){return e}var f=n(247),d=n(70),p=n(67),h=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function g(e){var t="".concat(e).match(h);return t&&t[1]||""}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||g(e)||t}function m(e,t,n){var r=v(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function y(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return v(e,"Component");if("object"===Object(d.a)(e))switch(e.$$typeof){case p.ForwardRef:return m(e,e.render,"ForwardRef");case p.Memo:return m(e,e.type,"memo");default:return}}}function b(e,t,n,r,i){return null}var w="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),_=a.a.oneOfType([a.a.func,a.a.object])},function(e,t,n){"use strict";n.r(t);var r=n(531);n.d(t,"addCompanionWindow",(function(){return r.a})),n.d(t,"addOrUpdateCompanionWindow",(function(){return r.b})),n.d(t,"updateCompanionWindow",(function(){return r.e})),n.d(t,"removeCompanionWindow",(function(){return r.c})),n.d(t,"toggleNode",(function(){return r.d}));var i=n(320);n.d(t,"importConfig",(function(){return i.a})),n.d(t,"setConfig",(function(){return i.c})),n.d(t,"updateConfig",(function(){return i.d})),n.d(t,"importMiradorState",(function(){return i.b}));var o=n(554);n.d(t,"addError",(function(){return o.a})),n.d(t,"removeError",(function(){return o.b}));var a=n(555);n.d(t,"focusWindow",(function(){return a.b})),n.d(t,"addWindow",(function(){return a.a})),n.d(t,"updateWindow",(function(){return a.l})),n.d(t,"maximizeWindow",(function(){return a.d})),n.d(t,"minimizeWindow",(function(){return a.e})),n.d(t,"setCompanionAreaOpen",(function(){return a.g})),n.d(t,"removeWindow",(function(){return a.f})),n.d(t,"toggleWindowSideBar",(function(){return a.k})),n.d(t,"setWindowThumbnailPosition",(function(){return a.h})),n.d(t,"setWindowViewType",(function(){return a.i})),n.d(t,"showCollectionDialog",(function(){return a.j})),n.d(t,"hideCollectionDialog",(function(){return a.c}));var s=n(556);n.d(t,"requestManifest",(function(){return s.e})),n.d(t,"receiveManifest",(function(){return s.b})),n.d(t,"receiveManifestFailure",(function(){return s.c})),n.d(t,"fetchManifest",(function(){return s.a})),n.d(t,"removeManifest",(function(){return s.d}));var c=n(557);n.d(t,"requestInfoResponse",(function(){return c.f})),n.d(t,"receiveInfoResponse",(function(){return c.c})),n.d(t,"receiveDegradedInfoResponse",(function(){return c.b})),n.d(t,"receiveInfoResponseFailure",(function(){return c.d})),n.d(t,"fetchInfoResponse",(function(){return c.a})),n.d(t,"removeInfoResponse",(function(){return c.e}));var u=n(558);n.d(t,"setCanvas",(function(){return u.a})),n.d(t,"setNextCanvas",(function(){return u.b})),n.d(t,"setPreviousCanvas",(function(){return u.c})),n.d(t,"updateViewport",(function(){return u.d}));var l=n(559);n.d(t,"updateWorkspace",(function(){return l.g})),n.d(t,"setWorkspaceFullscreen",(function(){return l.b})),n.d(t,"toggleZoomControls",(function(){return l.f})),n.d(t,"updateWorkspaceMosaicLayout",(function(){return l.h})),n.d(t,"setWorkspaceAddVisibility",(function(){return l.a})),n.d(t,"setWorkspaceViewportPosition",(function(){return l.d})),n.d(t,"setWorkspaceViewportDimensions",(function(){return l.c})),n.d(t,"toggleDraggingEnabled",(function(){return l.e}));var f=n(560);n.d(t,"requestCanvasAnnotations",(function(){return f.f})),n.d(t,"requestAnnotation",(function(){return f.e})),n.d(t,"receiveAnnotation",(function(){return f.c})),n.d(t,"receiveAnnotationFailure",(function(){return f.d})),n.d(t,"selectAnnotation",(function(){return f.g})),n.d(t,"deselectAnnotation",(function(){return f.a})),n.d(t,"toggleAnnotationDisplay",(function(){return f.h})),n.d(t,"hoverAnnotation",(function(){return f.b}));var d=n(561);n.d(t,"addAuthenticationRequest",(function(){return d.a})),n.d(t,"resolveAuthenticationRequest",(function(){return d.g})),n.d(t,"requestAccessToken",(function(){return d.d})),n.d(t,"receiveAccessToken",(function(){return d.b})),n.d(t,"receiveAccessTokenFailure",(function(){return d.c})),n.d(t,"resolveAccessTokenRequest",(function(){return d.f})),n.d(t,"resetAuthenticationState",(function(){return d.e}));var p=n(562);n.d(t,"updateElasticWindowLayout",(function(){return p.a}));var h=n(563);n.d(t,"requestSearch",(function(){return h.e})),n.d(t,"receiveSearch",(function(){return h.b})),n.d(t,"receiveSearchFailure",(function(){return h.c})),n.d(t,"removeSearch",(function(){return h.d})),n.d(t,"fetchSearch",(function(){return h.a})),n.d(t,"setContentSearchCurrentAnnotation",(function(){return h.f}));var g=n(564);n.d(t,"updateLayers",(function(){return g.a}));var v=n(565);n.d(t,"addResource",(function(){return v.a})),n.d(t,"removeResource",(function(){return v.b}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"hexToRgb",(function(){return r.h})),n.d(t,"rgbToHex",(function(){return r.l})),n.d(t,"hslToRgb",(function(){return r.i})),n.d(t,"decomposeColor",(function(){return r.c})),n.d(t,"recomposeColor",(function(){return r.k})),n.d(t,"getContrastRatio",(function(){return r.f})),n.d(t,"getLuminance",(function(){return r.g})),n.d(t,"emphasize",(function(){return r.d})),n.d(t,"fade",(function(){return r.e})),n.d(t,"alpha",(function(){return r.a})),n.d(t,"darken",(function(){return r.b})),n.d(t,"lighten",(function(){return r.j})),n.d(t,"createTheme",(function(){return i.b})),n.d(t,"createMuiTheme",(function(){return i.a})),n.d(t,"unstable_createMuiStrictModeTheme",(function(){return a})),n.d(t,"createStyles",(function(){return c})),n.d(t,"makeStyles",(function(){return d})),n.d(t,"responsiveFontSizes",(function(){return _})),n.d(t,"styled",(function(){return x.a})),n.d(t,"easing",(function(){return O.c})),n.d(t,"duration",(function(){return O.b})),n.d(t,"useTheme",(function(){return S.a})),n.d(t,"withStyles",(function(){return E.a})),n.d(t,"withTheme",(function(){return k})),n.d(t,"createGenerateClassName",(function(){return T.a})),n.d(t,"jssPreset",(function(){return j.a})),n.d(t,"ServerStyleSheets",(function(){return P.a})),n.d(t,"StylesProvider",(function(){return I.b})),n.d(t,"MuiThemeProvider",(function(){return R.a})),n.d(t,"ThemeProvider",(function(){return R.a}));var r=n(24),i=n(178),o=n(331);function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.b.apply(void 0,[Object(o.a)({unstable_strictMode:!0},e)].concat(n))}var s=n(1149);function c(e){return Object(s.a)(e)}var u=n(1),l=n(763),f=n(121);var d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(l.a)(e,Object(u.a)({defaultTheme:f.a},t))},p=n(247),h=n(27);function g(e){return String(parseFloat(e)).length===String(e).length}function v(e){return parseFloat(e)}function m(e){return function(t,n){var r=String(t).match(/[\d.\-+]*\s*(.*)/)[1]||"";if(r===n)return t;var i=v(t);if("px"!==r)if("em"===r)i=v(t)*v(e);else if("rem"===r)return i=v(t)*v(e),t;var o=i;if("px"!==n)if("em"===n)o=i/v(e);else{if("rem"!==n)return t;o=i/v(e)}return parseFloat(o.toFixed(5))+n}}function y(e){var t=e.size,n=e.grid,r=t-t%n,i=r+n;return t-r<i-t?r:i}function b(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)}function w(e){var t=e.cssProperty,n=e.min,r=e.max,i=e.unit,o=void 0===i?"rem":i,a=e.breakpoints,s=void 0===a?[600,960,1280]:a,c=e.transform,u=void 0===c?null:c,l=Object(h.a)({},t,"".concat(n).concat(o)),f=(r-n)/s[s.length-1];return s.forEach((function(e){var r=n+f*e;null!==u&&(r=u(r)),l["@media (min-width:".concat(e,"px)")]=Object(h.a)({},t,"".concat(Math.round(1e4*r)/1e4).concat(o))})),l}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.breakpoints,r=void 0===n?["sm","md","lg"]:n,i=t.disableAlign,o=void 0!==i&&i,a=t.factor,s=void 0===a?2:a,c=t.variants,l=void 0===c?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:c,f=Object(u.a)({},e);f.typography=Object(u.a)({},f.typography);var d=f.typography,h=m(d.htmlFontSize),v=r.map((function(e){return f.breakpoints.values[e]}));return l.forEach((function(e){var t=d[e],n=parseFloat(h(t.fontSize,"rem"));if(!(n<=1)){var r=n,i=1+(r-1)/s,a=t.lineHeight;if(!g(a)&&!o)throw new Error(Object(p.a)(6));g(a)||(a=parseFloat(h(a,"rem"))/parseFloat(n));var c=null;o||(c=function(e){return y({size:e,grid:b({pixels:4,lineHeight:a,htmlFontSize:d.htmlFontSize})})}),d[e]=Object(u.a)({},t,w({cssProperty:"fontSize",min:i,max:r,unit:"rem",breakpoints:v,transform:c}))}})),f}var x=n(322),O=n(49),S=n(36),E=n(5),C=n(290),k=Object(C.b)({defaultTheme:f.a}),T=n(756),j=n(762),P=n(1150),I=n(242),R=n(1151)},function(e,t,n){var r=n(203);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){"use strict";n.r(t);var r=n(96);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(64);function o(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){Object(i.a)(e,n),Object(i.a)(t,n)}}),[e,t])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return c}));var r={UNSTYLED:"unstyled",HEADER_ONE:"header-one",HEADER_TWO:"header-two",HEADER_THREE:"header-three",HEADER_FOUR:"header-four",HEADER_FIVE:"header-five",HEADER_SIX:"header-six",UNORDERED_LIST_ITEM:"unordered-list-item",ORDERED_LIST_ITEM:"ordered-list-item",BLOCKQUOTE:"blockquote",PULLQUOTE:"pullquote",CODE:"code-block",ATOMIC:"atomic"},i={LINK:"LINK",IMAGE:"IMAGE",EMBED:"embed"},o={BOLD:"BOLD",CODE:"CODE",ITALIC:"ITALIC",STRIKETHROUGH:"STRIKETHROUGH",UNDERLINE:"UNDERLINE"},a=n(127),s=new a.OrderedSet;function c(e,t){for(var n=null,r=null,i=[],o=0,a=0,s=e.length;a<s;a++){r=n;var c=t.get(a);n=c?c.getEntity():null,a>0&&n!==r&&(i.push([r,u(e.slice(o,a),t.slice(o,a))]),o=a)}return i.push([n,u(e.slice(o),t.slice(o))]),i}function u(e,t){for(var n=s,r=s,i=[],o=0,c=0,u=e.length;c<u;c++){r=n;var l=t.get(c);n=l?l.getStyle():s,c>0&&!Object(a.is)(n,r)&&(i.push([e.slice(o,c),r]),o=c)}return i.push([e.slice(o),n]),i}n(105)},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(849)},function(e,t,n){"use strict";var r=n(7),i=n(9),o=n(8),a=n(101),s=n(88),c=Object(r.compose)(Object(i.b)((function(e){return{containerId:Object(s.b)(e)}}),null),Object(o.a)("MiradorMenuButton"));t.a=c(a.MiradorMenuButton)},function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return B})),n.d(t,"c",(function(){return re})),n.d(t,"d",(function(){return D}));var r,i,o=function(){function e(e){this.__jsonld=e,this.context=this.getProperty("context"),this.id=this.getProperty("id")}return e.prototype.getProperty=function(e){var t=null;return this.__jsonld&&((t=this.__jsonld[e])||(t=this.__jsonld["@"+e])),t},e}(),a=n(16),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.options=n,r}return s(t,e),t.prototype.getIIIFResourceType=function(){return D.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){var e=this.getProperty("label");return e?B.parse(e,this.options.locale):new B([],this.options.locale)},t.prototype.getDefaultLabel=function(){return this.getLabel().getValue(this.options.locale)},t.prototype.getMetadata=function(){var e=this.getProperty("metadata"),t=[];if(!e)return t;for(var n=0;n<e.length;n++){var r=e[n],i=new P(this.options.locale);i.parse(r),t.push(i)}return t},t.prototype.getRendering=function(e){for(var t=this.getRenderings(),n=0;n<t.length;n++){var r=t[n];if(r.getFormat()===e)return r}return null},t.prototype.getRenderings=function(){var e,t=[];if(!(e=this.__jsonld?this.__jsonld.rendering:this.rendering))return t;Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++){var r=e[n];t.push(new G(r,this.options))}return t},t.prototype.getService=function(e){return D.getService(this,e)},t.prototype.getServices=function(){return D.getServices(this)},t.prototype.getThumbnail=function(){var e=this.getProperty("thumbnail");return Array.isArray(e)&&(e=e[0]),e?new ne(e,this.options):null},t.prototype.isAnnotation=function(){return this.getIIIFResourceType()===a.IIIFResourceType.ANNOTATION},t.prototype.isCanvas=function(){return this.getIIIFResourceType()===a.IIIFResourceType.CANVAS},t.prototype.isCollection=function(){return this.getIIIFResourceType()===a.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===a.IIIFResourceType.MANIFEST},t.prototype.isRange=function(){return this.getIIIFResourceType()===a.IIIFResourceType.RANGE},t.prototype.isSequence=function(){return this.getIIIFResourceType()===a.IIIFResourceType.SEQUENCE},t}(o),u=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),t.prototype.getFormat=function(){var e=this.getProperty("format");return e?e.toLowerCase():null},t.prototype.getResources=function(){var e=[];if(!this.__jsonld.resources)return e;for(var t=0;t<this.__jsonld.resources.length;t++){var n=this.__jsonld.resources[t],r=new h(n,this.options);e.push(r)}return e},t.prototype.getType=function(){var e=this.getProperty("type");return e?D.normaliseType(e):null},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t.prototype.getMaxWidth=function(){return this.getProperty("maxWidth")},t.prototype.getMaxHeight=function(){return this.getProperty("maxHeight")?null:this.getMaxWidth()},t}(c),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(e){function t(t,n){var r=e.call(this,t,n)||this;r.index=-1,r.isLoaded=!1;var i={defaultLabel:"-",locale:"en-GB",resource:r,pessimisticAccessControl:!1};return r.options=Object.assign(i,n),r}return f(t,e),t.prototype.getAttribution=function(){var e=this.getProperty("attribution");return e?B.parse(e,this.options.locale):new B([],this.options.locale)},t.prototype.getDescription=function(){var e=this.getProperty("description");return e?B.parse(e,this.options.locale):new B([],this.options.locale)},t.prototype.getHomepage=function(){var e=this.getProperty("homepage");return e?"string"==typeof e?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e.id):null},t.prototype.getIIIFResourceType=function(){return D.normaliseType(this.getProperty("type"))},t.prototype.getLogo=function(){var e=this.getProperty("logo");return e?"string"==typeof e?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e.id):null},t.prototype.getLicense=function(){return D.getLocalisedValue(this.getProperty("license"),this.options.locale)},t.prototype.getNavDate=function(){return new Date(this.getProperty("navDate"))},t.prototype.getRelated=function(){return this.getProperty("related")},t.prototype.getSeeAlso=function(){return this.getProperty("seeAlso")},t.prototype.getTrackingLabel=function(){var e=this.getService(a.ServiceProfile.TRACKING_EXTENSIONS);return e?e.getProperty("trackingLabel"):""},t.prototype.getDefaultTree=function(){return this.defaultTree=new re("root"),this.defaultTree.data=this,this.defaultTree},t.prototype.getRequiredStatement=function(){var e=null,t=this.getProperty("requiredStatement");if(t)(e=new P(this.options.locale)).parse(t);else{var n=this.getAttribution();n&&((e=new P(this.options.locale)).value=n)}return e},t.prototype.isCollection=function(){return this.getIIIFResourceType()===a.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===a.IIIFResourceType.MANIFEST},t.prototype.load=function(){var e=this;return new Promise((function(t){if(e.isLoaded)t(e);else{var n=e.options;n.navDate=e.getNavDate();var r=e.__jsonld.id;r||(r=e.__jsonld["@id"]),D.loadManifest(r).then((function(r){e.parentLabel=e.getLabel().getValue(n.locale);var i=Z.parse(r,n);(e=Object.assign(e,i)).index=n.index,t(e)}))}}))},t}(c),p=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),t.prototype.getBody=function(){var e=[],t=this.getProperty("body");if(t)if(Array.isArray(t))for(var n=0;n<t.length;n++){if((o=t[n]).items)for(var r=0;r<o.items.length;r++){var i=o.items[r];e.push(new v(i,this.options))}else e.push(new v(o,this.options))}else if(t.items)for(n=0;n<t.items.length;n++){var o=t.items[n];e.push(new v(o,this.options))}else e.push(new v(t,this.options));return e},t.prototype.getMotivation=function(){var e=this.getProperty("motivation");return e||null},t.prototype.getOn=function(){return this.getProperty("on")},t.prototype.getTarget=function(){return this.getProperty("target")},t.prototype.getResource=function(){return new l(this.getProperty("resource"),this.options)},t}(c),g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(e){function t(t,n){return e.call(this,t,n)||this}return g(t,e),t.prototype.getFormat=function(){var e=this.getProperty("format");return e?D.getMediaType(e):null},t.prototype.getType=function(){return this.getProperty("type")?D.normaliseType(this.getProperty("type")):null},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t}(c),m=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(e){function t(t,n,r){var i=e.call(this,n)||this;return i.label=t,i.options=r,i}return m(t,e),t.prototype.getIIIFResourceType=function(){return D.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){return this.label},t.prototype.getResources=function(){var e=this;return this.getProperty("resources").map((function(t){return new h(t,e.options)}))},t.prototype.load=function(){var e=this;return new Promise((function(t,n){if(e.isLoaded)t(e);else{var r=e.__jsonld.id;r||(r=e.__jsonld["@id"]),D.loadManifest(r).then((function(n){e.__jsonld=n,e.context=e.getProperty("context"),e.id=e.getProperty("id"),e.isLoaded=!0,t(e)})).catch(n)}}))},t}(o),b=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(e){function t(t,n){return e.call(this,t,n)||this}return b(t,e),t.prototype.getItems=function(){return this.getProperty("items")},t}(c),_=n(29),x=n.n(_),O=n(138),S=n.n(O),E=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),C=function(e){function t(t,n){return e.call(this,t,n)||this}return E(t,e),t.prototype.getCanonicalImageUri=function(e){var t,n=null,r="default",i=e;if(this.externalResource&&this.externalResource.data&&this.externalResource.data["@id"])n=this.externalResource.data["@id"],i||(i=this.externalResource.data.width),this.externalResource.data["@context"]&&(this.externalResource.data["@context"].indexOf("/1.0/context.json")>-1||this.externalResource.data["@context"].indexOf("/1.1/context.json")>-1||this.externalResource.data["@context"].indexOf("/1/context.json")>-1)&&(r="native");else{var o=this.getImages();if(o&&o.length){var a=o[0].getResource(),s=a.getServices();if(i||(i=a.getWidth()),s.length){var c=s[0];n=c.id,r=D.getImageQuality(c.getProfile())}else if(i===a.getWidth())return a.id}if(!n){var u=this.getProperty("thumbnail");if(u){if("string"==typeof u)return u;if(u["@id"])return u["@id"];if(u.length)return u[0].id}}}return t=i+",",n&&n.endsWith("/")&&(n=n.substr(0,n.length-1)),[n,"full",t,0,r+".jpg"].join("/")},t.prototype.getMaxDimensions=function(){var e,t=null;return this.externalResource&&this.externalResource.data&&this.externalResource.data.profile&&(e=this.externalResource.data.profile,Array.isArray(e)&&(e=e.filter((function(e){return e.maxWidth}))[0])&&(t=new Y(e.maxWidth,e.maxHeight?e.maxHeight:e.maxWidth))),t},t.prototype.getContent=function(){var e=[],t=this.__jsonld.items||this.__jsonld.content;if(!t)return e;var n=null;if(t.length&&(n=new w(t[0],this.options)),!n)return e;for(var r=n.getItems(),i=0;i<r.length;i++){var o=r[i],a=new h(o,this.options);e.push(a)}return e},t.prototype.getDuration=function(){return this.getProperty("duration")},t.prototype.getImages=function(){var e=[];if(!this.__jsonld.images)return e;for(var t=0;t<this.__jsonld.images.length;t++){var n=this.__jsonld.images[t],r=new h(n,this.options);e.push(r)}return e},t.prototype.getIndex=function(){return this.getProperty("index")},t.prototype.getOtherContent=function(){var e=this,t=Array.isArray(this.getProperty("otherContent"))?this.getProperty("otherContent"):[this.getProperty("otherContent")],n=t.filter((function(e){return e&&(t=e["@type"],n="sc:AnnotationList","string"==typeof t&&"string"==typeof n&&t.toLowerCase()==t.toLowerCase());var t,n})).map((function(t,n){return new y(t.label||"Annotation list "+n,t,e.options)})).map((function(e){return e.load()}));return Promise.all(n)},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},Object.defineProperty(t.prototype,"imageResources",{get:function(){var e=this,n=S()([this.getImages().map((function(e){return e.getResource()})),this.getContent().map((function(e){return e.getBody()}))]);return x()(n.map((function(n){switch(n.getProperty("type").toLowerCase()){case a.ExternalResourceType.CHOICE:case a.ExternalResourceType.OA_CHOICE:return new t({images:x()([n.getProperty("default"),n.getProperty("item")]).map((function(e){return{resource:e}}))},e.options).getImages().map((function(e){return e.getResource()}));default:return n}})))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resourceAnnotations",{get:function(){return S()([this.getImages(),this.getContent()])},enumerable:!0,configurable:!0}),t.prototype.resourceAnnotation=function(e){return this.resourceAnnotations.find((function(t){return t.getResource().id===e||x()(new Array(t.getBody())).some((function(t){return t.id===e}))}))},t.prototype.onFragment=function(e){var t=this.resourceAnnotation(e);if(t){var n=t.getProperty("on"),r=t.getProperty("target"),i=(n||r).match(/xywh=(.*)$/);if(i)return i[1].split(",").map((function(e){return parseInt(e,10)}))}},Object.defineProperty(t.prototype,"iiifImageResources",{get:function(){return this.imageResources.filter((function(e){return e&&e.getServices()[0]&&e.getServices()[0].id}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageServiceIds",{get:function(){return this.iiifImageResources.map((function(e){return e.getServices()[0].id}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){return this.getWidth()/this.getHeight()},enumerable:!0,configurable:!0}),t}(l),k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.items=[],r._collections=null,r._manifests=null,t.__collection=r,r}return k(t,e),t.prototype.getCollections=function(){return this._collections?this._collections:this._collections=this.items.filter((function(e){return e.isCollection()}))},t.prototype.getManifests=function(){return this._manifests?this._manifests:this._manifests=this.items.filter((function(e){return e.isManifest()}))},t.prototype.getCollectionByIndex=function(e){for(var t,n=this.getCollections(),r=0;r<n.length;r++){var i=n[r];i.index===e&&(t=i)}if(t)return t.options.index=e,t.load();throw new Error("Collection index not found")},t.prototype.getManifestByIndex=function(e){for(var t,n=this.getManifests(),r=0;r<n.length;r++){var i=n[r];i.index===e&&(t=i)}if(t)return t.options.index=e,t.load();throw new Error("Manifest index not found")},t.prototype.getTotalCollections=function(){return this.getCollections().length},t.prototype.getTotalManifests=function(){return this.getManifests().length},t.prototype.getTotalItems=function(){return this.items.length},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?this.getProperty("viewingDirection"):a.ViewingDirection.LEFT_TO_RIGHT},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},t.prototype.getDefaultTree=function(){return e.prototype.getDefaultTree.call(this),this.defaultTree.data.type=D.normaliseType(J.COLLECTION),this._parseManifests(this),this._parseCollections(this),D.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._parseManifests=function(e){if(e.getManifests()&&e.getManifests().length)for(var t=0;t<e.getManifests().length;t++){var n=e.getManifests()[t],r=n.getDefaultTree();r.label=n.parentLabel||n.getLabel().getValue(this.options.locale)||"manifest "+(t+1),r.navDate=n.getNavDate(),r.data.id=n.id,r.data.type=D.normaliseType(J.MANIFEST),e.defaultTree.addNode(r)}},t.prototype._parseCollections=function(e){if(e.getCollections()&&e.getCollections().length)for(var t=0;t<e.getCollections().length;t++){var n=e.getCollections()[t],r=n.getDefaultTree();r.label=n.parentLabel||n.getLabel().getValue(this.options.locale)||"collection "+(t+1),r.navDate=n.getNavDate(),r.data.id=n.id,r.data.type=D.normaliseType(J.COLLECTION),e.defaultTree.addNode(r)}},t}(d),j=function(){function e(e,t){this.start=e,this.end=t}return e.prototype.getLength=function(){return this.end-this.start},e}(),P=function(){function e(e){this.defaultLocale=e}return e.prototype.parse=function(e){this.resource=e,this.label=B.parse(this.resource.label,this.defaultLocale),this.value=B.parse(this.resource.value,this.defaultLocale)},e.prototype.getLabel=function(e){return null===this.label?null:(Array.isArray(e)&&!e.length&&(e=void 0),this.label.getValue(e||this.defaultLocale))},e.prototype.setLabel=function(e){null===this.label&&(this.label=new B([])),this.label.setValue(e,this.defaultLocale)},e.prototype.getValue=function(e,t){return void 0===t&&(t="<br/>"),null===this.value?null:(Array.isArray(e)&&!e.length&&(e=void 0),this.value.getValue(e||this.defaultLocale,t))},e.prototype.getValues=function(e){return null===this.value?[]:(Array.isArray(e)&&!e.length&&(e=void 0),this.value.getValues(e||this.defaultLocale))},e.prototype.setValue=function(e){null===this.value&&(this.value=new B([])),this.value.setValue(e,this.defaultLocale)},e}(),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}I(t,e),t.getValue=function(e,t){return e.getValue(t,"<br/>")},t.getValues=function(e,t){return e.getValues(t)}}(Array),n(97)),A=(n(453),function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}),M=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},D=function(){function e(){}return e.getMediaType=function(e){return(e=(e=e.toLowerCase()).split(";")[0]).trim()},e.getImageQuality=function(e){return e===a.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1||e===a.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2||e===a.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_1||e===a.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2||e===a.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1||e===a.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2||e===a.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1||e===a.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2||e===a.ServiceProfile.IMAGE_1_LEVEL_1||e===a.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1||e===a.ServiceProfile.IMAGE_1_LEVEL_2||e===a.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2?"native":"default"},e.getInexactLocale=function(e){return-1!==e.indexOf("-")?e.substr(0,e.indexOf("-")):e},e.getLocalisedValue=function(e,t){if(!Array.isArray(e))return e;for(var n=0;n<e.length;n++){var r=e[n];if(t===r["@language"])return r["@value"]}var i=t.substr(0,t.indexOf("-"));for(n=0;n<e.length;n++){var o=e[n];if(o["@language"]===i)return o["@value"]}return null},e.generateTreeNodeIds=function(t,n){var r;void 0===n&&(n=0),r=t.parentNode?t.parentNode.id+"-"+n:"0",t.id=r;for(var i=0;i<t.nodes.length;i++){var o=t.nodes[i];e.generateTreeNodeIds(o,i)}},e.normaliseType=function(e){return-1!==(e=(e||"").toLowerCase()).indexOf(":")?e.split(":")[1]:e},e.normaliseUrl=function(e){return-1!==(e=e.substr(e.indexOf("://"))).indexOf("#")&&(e=e.split("#")[0]),e},e.normalisedUrlsMatch=function(t,n){return e.normaliseUrl(t)===e.normaliseUrl(n)},e.isImageProfile=function(t){return!!(e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_PROFILE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_PROFILE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_PROFILE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_PROFILE_LEVEL_2))},e.isLevel0ImageProfile=function(t){return!!(e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_PROFILE_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_LEVEL_0)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_PROFILE_LEVEL_0))},e.isLevel1ImageProfile=function(t){return!!(e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_LEVEL_1)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_PROFILE_LEVEL_1))},e.isLevel2ImageProfile=function(t){return!!(e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_LEVEL_2)||e.normalisedUrlsMatch(t,a.ServiceProfile.IMAGE_2_PROFILE_LEVEL_2))},e.parseManifest=function(e,t){return Z.parse(e,t)},e.checkStatus=function(e){if(e.ok)return e;var t=new Error(e.statusText);return t.response=e,Promise.reject(t)},e.loadManifest=function(t){return new Promise((function(n,r){fetch(t).then(e.checkStatus).then((function(e){return e.json()})).then((function(e){n(e)})).catch((function(e){r()}))}))},e.loadExternalResourcesAuth1=function(t,n,r,i,o,a,s,c){return new Promise((function(u,l){var f=t.map((function(t){return e.loadExternalResourceAuth1(t,n,r,i,o,a,s,c)}));Promise.all(f).then((function(){u(t)})).catch((function(e){l(e)}))}))},e.loadExternalResourceAuth1=function(t,n,r,i,o,a,s,c){return A(this,void 0,void 0,(function(){var u;return M(this,(function(l){switch(l.label){case 0:return[4,i(t)];case 1:return(u=l.sent())?[4,t.getData(u)]:[3,6];case 2:return l.sent(),t.status!==R.OK?[3,3]:[2,t];case 3:return[4,e.doAuthChain(t,n,r,o,a,s,c)];case 4:l.sent(),l.label=5;case 5:if(t.status===R.OK||t.status===R.MOVED_TEMPORARILY)return[2,t];throw e.createAuthorizationFailedError();case 6:return[4,t.getData()];case 7:return l.sent(),t.status!==R.MOVED_TEMPORARILY&&t.status!==R.UNAUTHORIZED?[3,9]:[4,e.doAuthChain(t,n,r,o,a,s,c)];case 8:l.sent(),l.label=9;case 9:if(t.status===R.OK||t.status===R.MOVED_TEMPORARILY)return[2,t];throw e.createAuthorizationFailedError()}}))}))},e.doAuthChain=function(t,n,r,i,o,a,s){return A(this,void 0,void 0,(function(){var c,u,l,f,d,p,h,g;return M(this,(function(v){switch(v.label){case 0:return t.isAccessControlled()?((c=t.externalService)&&(c.options=t.options),(u=t.kioskService)&&(u.options=t.options),(l=t.clickThroughService)&&(l.options=t.options),(f=t.loginService)&&(f.options=t.options),t.isResponseHandled||t.status!==R.MOVED_TEMPORARILY?[3,2]:[4,a(t)]):[2,t];case 1:return v.sent(),[2,t];case 2:return d=null,p=null,(d=c)?(p=d,[4,e.attemptResourceWithToken(t,r,d)]):[3,4];case 3:return v.sent(),[2,t];case 4:return(d=u)?(p=d,(h=n(d))?[4,i(h)]:[3,7]):[3,7];case 5:return v.sent(),[4,e.attemptResourceWithToken(t,r,d)];case 6:return v.sent(),[2,t];case 7:return(d=l)?(p=d,[4,o(t,d)]):[3,11];case 8:return(g=v.sent())?[4,i(g)]:[3,11];case 9:return v.sent(),[4,e.attemptResourceWithToken(t,r,d)];case 10:return v.sent(),[2,t];case 11:return(d=f)?(p=d,[4,o(t,d)]):[3,15];case 12:return(g=v.sent())?[4,i(g)]:[3,15];case 13:return v.sent(),[4,e.attemptResourceWithToken(t,r,d)];case 14:return v.sent(),[2,t];case 15:return p&&s(t,p),[2]}}))}))},e.attemptResourceWithToken=function(e,t,n){return A(this,void 0,void 0,(function(){var r,i;return M(this,(function(o){switch(o.label){case 0:return(r=n.getService(a.ServiceProfile.AUTH_1_TOKEN))?[4,t(e,r)]:[3,3];case 1:return(i=o.sent())&&i.accessToken?[4,e.getData(i)]:[3,3];case 2:return o.sent(),[2,e];case 3:return[2]}}))}))},e.loadExternalResourcesAuth09=function(t,n,r,i,o,a,s,c,u,l){return new Promise((function(f,d){var p=t.map((function(t){return e.loadExternalResourceAuth09(t,n,r,i,o,a,s,c,u,l)}));Promise.all(p).then((function(){f(t)})).catch((function(e){d(e)}))}))},e.loadExternalResourceAuth09=function(t,n,r,i,o,a,s,c,u,l){return new Promise((function(f,d){l&&l.pessimisticAccessControl?t.getData().then((function(){t.isAccessControlled()?t.clickThroughService?(f(r(t)),f(i(t))):o(t).then((function(){a(t,!0).then((function(n){t.getData(n).then((function(){f(u(t))})).catch((function(t){d(e.createInternalServerError(t))}))})).catch((function(t){d(e.createInternalServerError(t))}))})).catch((function(t){d(e.createInternalServerError(t))})):f(t)})).catch((function(t){d(e.createInternalServerError(t))})):c(t,n).then((function(l){l?t.getData(l).then((function(){t.status===R.OK?f(u(t)):e.authorize(t,n,r,i,o,a,s,c).then((function(){f(u(t))})).catch((function(t){d(e.createAuthorizationFailedError())}))})).catch((function(t){d(e.createAuthorizationFailedError())})):e.authorize(t,n,r,i,o,a,s,c).then((function(){f(u(t))})).catch((function(t){d(e.createAuthorizationFailedError())}))})).catch((function(t){d(e.createAuthorizationFailedError())}))}))},e.createError=function(e,t){var n=new Error;return n.message=t,n.name=String(e),n},e.createAuthorizationFailedError=function(){return e.createError(H.AUTHORIZATION_FAILED,"Authorization failed")},e.createRestrictedError=function(){return e.createError(H.RESTRICTED,"Restricted")},e.createInternalServerError=function(t){return e.createError(H.INTERNAL_SERVER_ERROR,t)},e.authorize=function(t,n,r,i,o,a,s,c){return new Promise((function(u,l){t.getData().then((function(){t.isAccessControlled()?c(t,n).then((function(c){c?t.getData(c).then((function(){t.status===R.OK?u(t):e.showAuthInteraction(t,n,r,i,o,a,s,u,l)})).catch((function(t){l(e.createInternalServerError(t))})):a(t,!1).then((function(c){c?s(t,c,n).then((function(){t.getData(c).then((function(){t.status===R.OK?u(t):e.showAuthInteraction(t,n,r,i,o,a,s,u,l)})).catch((function(t){l(e.createInternalServerError(t))}))})).catch((function(t){l(e.createInternalServerError(t))})):e.showAuthInteraction(t,n,r,i,o,a,s,u,l)}))})).catch((function(t){l(e.createInternalServerError(t))})):u(t)}))}))},e.showAuthInteraction=function(t,n,r,i,o,a,s,c,u){t.status!==R.MOVED_TEMPORARILY||t.isResponseHandled?t.clickThroughService&&!t.isResponseHandled?r(t).then((function(){a(t,!0).then((function(r){s(t,r,n).then((function(){t.getData(r).then((function(){c(t)})).catch((function(t){u(e.createInternalServerError(t))}))})).catch((function(t){u(e.createInternalServerError(t))}))})).catch((function(t){u(e.createInternalServerError(t))}))})):o(t).then((function(){a(t,!0).then((function(r){s(t,r,n).then((function(){t.getData(r).then((function(){c(t)})).catch((function(t){u(e.createInternalServerError(t))}))})).catch((function(t){u(e.createInternalServerError(t))}))})).catch((function(t){u(e.createInternalServerError(t))}))})):c(t)},e.getService=function(e,t){for(var n=this.getServices(e),r=0;r<n.length;r++){var i=n[r];if(i.getProfile()===t)return i}return null},e.getResourceById=function(t,n){return e.traverseAndFind(t.__jsonld,"@id",n)},e.traverseAndFind=function(t,n,r){if(t.hasOwnProperty(n)&&t[n]===r)return t;for(var i=0;i<Object.keys(t).length;i++)if("object"==typeof t[Object.keys(t)[i]]){var o=e.traverseAndFind(t[Object.keys(t)[i]],n,r);if(null!=o)return o}},e.getServices=function(e){var t,n=[];if(!(t=e.__jsonld?e.__jsonld.service:e.service))return n;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var i=t[r];if("string"==typeof i){var o=this.getResourceById(e.options.resource,i);o&&n.push(new Q(o.__jsonld||o,e.options))}else n.push(new Q(i,e.options))}return n},e.getTemporalComponent=function(e){var t=/t=([^&]+)/g.exec(e),n=null;return t&&t[1]&&(n=t[1].split(",")),n},e}(),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},z=function(){function e(e,t,n){void 0===n&&(n="none"),Array.isArray(e)&&1===e.length?this._value=e[0]:this._value=e,"none"!==t&&"@none"!==t||(t=void 0),this._locale=t,this._defaultLocale=n}return e.parseV2Value=function(t,n){return"string"==typeof t?new e(t,void 0,n):t["@value"]?new e(t["@value"],t["@language"],n):null},Object.defineProperty(e.prototype,"value",{get:function(){return Array.isArray(this._value)?this._value.join("<br/>"):this._value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locale",{get:function(){return void 0===this._locale?this._defaultLocale:this._locale},enumerable:!0,configurable:!0}),e.prototype.addValue=function(e){Array.isArray(this._value)||(this._value=[this._value]),Array.isArray(e)?this._value=this._value.concat(e):this._value.push(e)},e}(),B=function(e){function t(n,r){void 0===n&&(n=[]);var i=e.apply(this,n)||this;return i.__proto__=t.prototype,i._defaultLocale=r,i}return N(t,e),t.parse=function(e,n){if(!e)return new t([],n);if(Array.isArray(e)){var r=(i=e.map((function(e){return z.parseV2Value(e,n)})).filter((function(e){return null!==e}))).reduce((function(e,t){var n=t._locale;return n||(n="none"),e[n]?e[n].addValue(t._value):e[n]=t,e}),{});return new t(Object.values(r),n)}return"string"==typeof e?new t([new z(e,void 0,n)],n):e["@language"]?new t(null!==(i=z.parseV2Value(e))?[i]:[],n):new t(Object.keys(e).map((function(t){var r=e[t];if(!Array.isArray(r))throw new Error("A IIIF v3 localized property value must have an array as the value for a given language.");return new z(r,t,n)})),n);var i},t.prototype.getSuitableLocale=function(e){for(var t=L(this).map((function(e){return e._locale})).filter((function(e){return void 0!==e})),n=function(e){var n=t.find((function(t){return t===e}));if(n)return{value:n}},r=0,i=e;r<i.length;r++){var o=n(i[r]);if("object"==typeof o)return o.value}for(var a=function(e){var n=t.find((function(t){return D.getInexactLocale(t)===D.getInexactLocale(e)}));if(n)return{value:n}},s=0,c=e;s<c.length;s++){var u=a(c[s]);if("object"==typeof u)return u.value}},t.prototype.setValue=function(e,t){var n=void 0;if(t){var r=this.getSuitableLocale([t]);r&&(n=this.find((function(e){return e._locale===r})))}else n=this.find((function(e){return void 0===e._locale}));n?n._value=e:this.push(new z(e,t,this._defaultLocale))},t.prototype.getValue=function(e,t){var n=this.getValues(e);return 0===n.length?null:t?n.join(t):n[0]},t.prototype.getValues=function(e){if(!this.length)return[];var t;if(t=e?Array.isArray(e)?e:[e]:[],1===this.length&&void 0===this[0]._locale){var n=this[0]._value;return Array.isArray(n)?n:[n]}var r=this.getSuitableLocale(t);if(r){n=this.find((function(e){return e._locale===r}))._value;return Array.isArray(n)?n:[n]}if(!this.find((function(e){return void 0===e._locale}))){n=this[0]._value;return Array.isArray(n)?n:[n]}var i=this.find((function(e){return void 0===e._locale}));return i?Array.isArray(i._value)?i._value:[i._value]:[]},t}(Array),F=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W=function(e){function t(t,n){var r=e.call(this,t,n)||this;if(r.index=0,r._allRanges=null,r.items=[],r._topRanges=[],r.__jsonld.structures&&r.__jsonld.structures.length)for(var i=r._getTopRanges(),o=0;o<i.length;o++){var a=i[o];r._parseRanges(a,String(o))}return r}return F(t,e),t.prototype.getPosterCanvas=function(){var e=this.getProperty("posterCanvas");return e&&(e=new C(e,this.options)),e},t.prototype.getAccompanyingCanvas=function(){var e=this.getProperty("accompanyingCanvas");return e&&(e=new C(e,this.options)),e},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getDefaultTree=function(){if(e.prototype.getDefaultTree.call(this),this.defaultTree.data.type=D.normaliseType(J.MANIFEST),!this.isLoaded)return this.defaultTree;var t=this.getTopRanges();return t.length&&t[0].getTree(this.defaultTree),D.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._getTopRanges=function(){var e=[];if(this.__jsonld.structures&&this.__jsonld.structures.length){for(var t=0;t<this.__jsonld.structures.length;t++){var n=this.__jsonld.structures[t];n.viewingHint===a.ViewingHint.TOP&&e.push(n)}if(!e.length){var r={};r.ranges=this.__jsonld.structures,e.push(r)}}return e},t.prototype.getTopRanges=function(){return this._topRanges},t.prototype._getRangeById=function(e){if(this.__jsonld.structures&&this.__jsonld.structures.length)for(var t=0;t<this.__jsonld.structures.length;t++){var n=this.__jsonld.structures[t];if(n["@id"]===e||n.id===e)return n}return null},t.prototype._parseRanges=function(e,t,n){var r,i=null;if("string"==typeof e&&(i=e,e=this._getRangeById(i)),e){(r=new U(e,this.options)).parentRange=n,r.path=t,n?n.items.push(r):this._topRanges.push(r);var o=e.items||e.members;if(o)for(var a=0;a<o.length;a++){var s=o[a];if(s["@type"]&&"sc:range"===s["@type"].toLowerCase()||s.type&&"range"===s.type.toLowerCase())this._parseRanges(s,t+"/"+a,r);else if(s["@type"]&&"sc:canvas"===s["@type"].toLowerCase()||s.type&&"canvas"===s.type.toLowerCase()){r.canvases||(r.canvases=[]);var c=s.id||s["@id"];r.canvases.push(c)}}else if(e.ranges)for(a=0;a<e.ranges.length;a++)this._parseRanges(e.ranges[a],t+"/"+a,r)}else console.warn("Range:",i,"does not exist")},t.prototype.getAllRanges=function(){if(null!=this._allRanges)return this._allRanges;this._allRanges=[];for(var e=this.getTopRanges(),t=function(t){var r=e[t];r.id&&n._allRanges.push(r);var i=function(e,t){e.add(t);var n=t.getRanges();return n.length?n.reduce(i,e):e},o=Array.from(r.getRanges().reduce(i,new Set));n._allRanges=n._allRanges.concat(o)},n=this,r=0;r<e.length;r++)t(r);return this._allRanges},t.prototype.getRangeById=function(e){for(var t=this.getAllRanges(),n=0;n<t.length;n++){var r=t[n];if(r.id===e)return r}return null},t.prototype.getRangeByPath=function(e){for(var t=this.getAllRanges(),n=0;n<t.length;n++){var r=t[n];if(r.path===e)return r}return null},t.prototype.getSequences=function(){if(this.items.length)return this.items;var e=this.__jsonld.mediaSequences||this.__jsonld.sequences;if(e)for(var t=0;t<e.length;t++){var n=e[t],r=new $(n,this.options);this.items.push(r)}else if(this.__jsonld.items){r=new $(this.__jsonld.items,this.options);this.items.push(r)}return this.items},t.prototype.getSequenceByIndex=function(e){return this.getSequences()[e]},t.prototype.getTotalSequences=function(){return this.getSequences().length},t.prototype.getManifestType=function(){var e=this.getService(a.ServiceProfile.UI_EXTENSIONS);return e?e.getProperty("manifestType"):i.EMPTY},t.prototype.isMultiSequence=function(){return this.getTotalSequences()>1},t.prototype.isPagingEnabled=function(){var e=this.getViewingHint();if(e)return e===a.ViewingHint.PAGED;var t=this.getBehavior();return!!t&&t===a.Behavior.PAGED},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},t}(d);!function(e){e.EMPTY="",e.MANUSCRIPT="manuscript",e.MONOGRAPH="monograph"}(i||(i={}));var H,V=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._ranges=null,r.canvases=null,r.items=[],r}return V(t,e),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 e=[],t=[],n=0,r=this.canvases;n<r.length;n++){if(p=r[n]){var i=p.match(/(.*)#t=([0-9.]+),?([0-9.]+)?/)||[void 0,p],o=i[1],a=i[2],s=i[3];o&&(e.push(parseFloat(a)),t.push(parseFloat(s)))}}if(e.length&&t.length)return new j(Math.min.apply(Math,e),Math.max.apply(Math,t))}else{e=[],t=[];for(var c=0,u=g=this.getRanges();c<u.length;c++){(v=u[c].getDuration())&&(e.push(v.start),t.push(v.end))}if(e.length&&t.length)return new j(Math.min.apply(Math,e),Math.max.apply(Math,t))}var l,f;if(this.canvases&&this.canvases.length)for(var d=0;d<this.canvases.length;d++){var p=this.canvases[d],h=D.getTemporalComponent(p);h&&h.length>1&&(0===d&&(l=Number(h[0])),d===this.canvases.length-1&&(f=Number(h[1])))}else{var g=this.getRanges();for(d=0;d<g.length;d++){var v;(v=g[d].getDuration())&&(0===d&&(l=v.start),d===g.length-1&&(f=v.end))}}if(void 0!==l&&void 0!==f)return new j(l,f)},t.prototype.getRanges=function(){return this._ranges?this._ranges:this._ranges=this.items.filter((function(e){return e.isRange()}))},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},t.prototype.getTree=function(e){e.data=this,this.treeNode=e;var t=this.getRanges();if(t&&t.length)for(var n=0;n<t.length;n++){var r=t[n],i=new re;e.addNode(i),this._parseTreeNode(i,r)}return D.generateTreeNodeIds(e),e},t.prototype.spansTime=function(e){var t=this.getDuration();return!!(t&&e>=t.start&&e<=t.end)},t.prototype._parseTreeNode=function(e,t){e.label=t.getLabel().getValue(this.options.locale),e.data=t,e.data.type=D.normaliseType(J.RANGE),t.treeNode=e;var n=t.getRanges();if(n&&n.length)for(var r=0;r<n.length;r++){var i=n[r];if(i.getBehavior()!==a.Behavior.NO_NAV){var o=new re;e.addNode(o),this._parseTreeNode(o,i)}}},t}(c),q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),G=function(e){function t(t,n){return e.call(this,t,n)||this}return q(t,e),t.prototype.getFormat=function(){return this.getProperty("format")},t}(c),K=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.items=[],r._thumbnails=null,r}return K(t,e),t.prototype.getCanvases=function(){if(this.items.length)return this.items;var e=this.__jsonld.canvases||this.__jsonld.elements;if(e)for(var t=0;t<e.length;t++){var n=e[t];(r=new C(n,this.options)).index=t,this.items.push(r)}else if(this.__jsonld)for(t=0;t<this.__jsonld.length;t++){var r;n=this.__jsonld[t];(r=new C(n,this.options)).index=t,this.items.push(r)}return this.items},t.prototype.getCanvasById=function(e){for(var t=0;t<this.getTotalCanvases();t++){var n=this.getCanvasByIndex(t),r=D.normaliseUrl(n.id);if(D.normaliseUrl(e)===r)return n}return null},t.prototype.getCanvasByIndex=function(e){return this.getCanvases()[e]},t.prototype.getCanvasIndexById=function(e){for(var t=0;t<this.getTotalCanvases();t++){if(this.getCanvasByIndex(t).id===e)return t}return null},t.prototype.getCanvasIndexByLabel=function(e,t){e=e.trim(),isNaN(e)||(e=parseInt(e,10).toString(),t&&(e+="r"));for(var n,r,i,o=/(\d*)\D+(\d*)/,a=0;a<this.getTotalCanvases();a++){var s=this.getCanvasByIndex(a);if(s.getLabel().getValue(this.options.locale)===e)return a;if((n=o.exec(e))&&(r=n[1],(i=n[2])&&new RegExp("^"+r+"\\D+"+i+"$").test(s.getLabel().toString())))return a}return-1},t.prototype.getLastCanvasLabel=function(e){for(var t=this.getTotalCanvases()-1;t>=0;t--){var n=this.getCanvasByIndex(t).getLabel().getValue(this.options.locale);if(e){if(/^[a-zA-Z0-9]*$/.test(n))return n}else if(n)return n}return this.options.defaultLabel},t.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},t.prototype.getNextPageIndex=function(e,t){var n;if(t){var r=this.getPagedIndices(e),i=this.getViewingDirection();n=i&&i===a.ViewingDirection.RIGHT_TO_LEFT?r[0]+1:r[r.length-1]+1}else n=e+1;return n>this.getLastPageIndex()?-1:n},t.prototype.getPagedIndices=function(e,t){var n=[];if(t){n=this.isFirstCanvas(e)||this.isLastCanvas(e)?[e]:e%2?[e,e+1]:[e-1,e];var r=this.getViewingDirection();r&&r===a.ViewingDirection.RIGHT_TO_LEFT&&(n=n.reverse())}else n.push(e);return n},t.prototype.getPrevPageIndex=function(e,t){var n;if(t){var r=this.getPagedIndices(e),i=this.getViewingDirection();n=i&&i===a.ViewingDirection.RIGHT_TO_LEFT?r[r.length-1]-1:r[0]-1}else n=e-1;return n},t.prototype.getStartCanvasIndex=function(){var e=this.getStartCanvas();if(e)for(var t=0;t<this.getTotalCanvases();t++){if(this.getCanvasByIndex(t).id===e)return t}return 0},t.prototype.getThumbs=function(e,t){for(var n=[],r=this.getTotalCanvases(),i=0;i<r;i++){var o=this.getCanvasByIndex(i),a=new ee(e,o);n.push(a)}return n},t.prototype.getThumbnails=function(){if(null!=this._thumbnails)return this._thumbnails;this._thumbnails=[];for(var e=this.getCanvases(),t=0;t<e.length;t++){var n=e[t].getThumbnail();n&&this._thumbnails.push(n)}return this._thumbnails},t.prototype.getStartCanvas=function(){return this.getProperty("startCanvas")},t.prototype.getTotalCanvases=function(){return this.getCanvases().length},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?this.getProperty("viewingDirection"):this.options.resource.getViewingDirection?this.options.resource.getViewingDirection():null},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},t.prototype.isCanvasIndexOutOfRange=function(e){return e>this.getTotalCanvases()-1},t.prototype.isFirstCanvas=function(e){return 0===e},t.prototype.isLastCanvas=function(e){return e===this.getTotalCanvases()-1},t.prototype.isMultiCanvas=function(){return this.getTotalCanvases()>1},t.prototype.isPagingEnabled=function(){var e=this.getViewingHint();return!!e&&e===a.ViewingHint.PAGED},t.prototype.isTotalCanvasesEven=function(){return this.getTotalCanvases()%2==0},t}(c),Z=function(){function e(){}return e.parse=function(e,t){return"string"==typeof e&&(e=JSON.parse(e)),this.parseJson(e,t)},e.parseJson=function(e,t){var n;if(t&&t.navDate&&!isNaN(t.navDate.getTime())&&(e.navDate=t.navDate.toString()),e["@type"])switch(e["@type"]){case"sc:Collection":n=this.parseCollection(e,t);break;case"sc:Manifest":n=this.parseManifest(e,t);break;default:return null}else switch(e.type){case"Collection":n=this.parseCollection(e,t);break;case"Manifest":n=this.parseManifest(e,t);break;default:return null}return n.isLoaded=!0,n},e.parseCollection=function(e,t){var n=new T(e,t);return t?(n.index=t.index||0,t.resource&&(n.parentCollection=t.resource.parentCollection)):n.index=0,this.parseCollections(n,t),this.parseManifests(n,t),this.parseItems(n,t),n},e.parseCollections=function(e,t){var n;if(e.__jsonld.collections?n=e.__jsonld.collections:e.__jsonld.items&&(n=e.__jsonld.items.filter((function(e){return"collection"===e.type.toLowerCase()}))),n)for(var r=0;r<n.length;r++){t&&(t.index=r);var i=this.parseCollection(n[r],t);i.index=r,i.parentCollection=e,e.items.push(i)}},e.parseManifest=function(e,t){return new W(e,t)},e.parseManifests=function(e,t){var n;if(e.__jsonld.manifests?n=e.__jsonld.manifests:e.__jsonld.items&&(n=e.__jsonld.items.filter((function(e){return"manifest"===e.type.toLowerCase()}))),n)for(var r=0;r<n.length;r++){var i=this.parseManifest(n[r],t);i.index=r,i.parentCollection=e,e.items.push(i)}},e.parseItem=function(e,t){if(e["@type"]){if("sc:manifest"===e["@type"].toLowerCase())return this.parseManifest(e,t);if("sc:collection"===e["@type"].toLowerCase())return this.parseCollection(e,t)}else if(e.type){if("manifest"===e.type.toLowerCase())return this.parseManifest(e,t);if("collection"===e.type.toLowerCase())return this.parseCollection(e,t)}return null},e.parseItems=function(e,t){var n=e.__jsonld.members||e.__jsonld.items;if(n)for(var r=function(r){t&&(t.index=r);var o=i.parseItem(n[r],t);return o?e.items.filter((function(e){return e.id===o.id}))[0]?"continue":(o.index=r,o.parentCollection=e,void e.items.push(o)):{value:void 0}},i=this,o=0;o<n.length;o++){var a=r(o);if("object"==typeof a)return a.value}},e}(),X=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(e){function t(t,n){return e.call(this,t,n)||this}return X(t,e),t.prototype.getProfile=function(){var e=this.getProperty("profile");return e||(e=this.getProperty("dcterms:conformsTo")),Array.isArray(e)?e[0]:e},t.prototype.getConfirmLabel=function(){return D.getLocalisedValue(this.getProperty("confirmLabel"),this.options.locale)},t.prototype.getDescription=function(){return D.getLocalisedValue(this.getProperty("description"),this.options.locale)},t.prototype.getFailureDescription=function(){return D.getLocalisedValue(this.getProperty("failureDescription"),this.options.locale)},t.prototype.getFailureHeader=function(){return D.getLocalisedValue(this.getProperty("failureHeader"),this.options.locale)},t.prototype.getHeader=function(){return D.getLocalisedValue(this.getProperty("header"),this.options.locale)},t.prototype.getServiceLabel=function(){return D.getLocalisedValue(this.getProperty("label"),this.options.locale)},t.prototype.getInfoUri=function(){var e=this.id;return e.endsWith("/")||(e+="/"),e+="info.json"},t}(c),Y=function(e,t){this.width=e,this.height=t};!function(e){e[e.AUTHORIZATION_FAILED=1]="AUTHORIZATION_FAILED",e[e.FORBIDDEN=2]="FORBIDDEN",e[e.INTERNAL_SERVER_ERROR=3]="INTERNAL_SERVER_ERROR",e[e.RESTRICTED=4]="RESTRICTED"}(H||(H={}));var J,ee=function(e,t){this.data=t,this.index=t.index,this.width=e;var n=t.getHeight()/t.getWidth();this.height=n?Math.floor(this.width*n):e,this.uri=t.getCanonicalImageUri(e),this.label=t.getLabel().getValue()},te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(e){function t(t,n){return e.call(this,t,n)||this}return te(t,e),t}(l),re=function(){function e(e,t){this.label=e,this.data=t||{},this.nodes=[]}return e.prototype.addNode=function(e){this.nodes.push(e),e.parentNode=this},e.prototype.isCollection=function(){return this.data.type===D.normaliseType(J.COLLECTION)},e.prototype.isManifest=function(){return this.data.type===D.normaliseType(J.MANIFEST)},e.prototype.isRange=function(){return this.data.type===D.normaliseType(J.RANGE)},e}();!function(e){e.COLLECTION="collection",e.MANIFEST="manifest",e.RANGE="range"}(J||(J={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(223),i=(n(0),n(121));function o(){return Object(r.a)()||i.a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),i=n.n(r),o=["classes"];function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=i.a.forwardRef((function(e,t){var n=e.PluginComponents,r=(e.classes,u(e,o));return n?n.map((function(e,n){return i.a.isValidElement(e)?i.a.cloneElement(e,s(s({},r),{},{ref:t})):i.a.createElement(e,Object.assign({ref:t},r,{key:n}))})):null}))},function(e,t,n){"use strict";n.d(t,"g",(function(){return o})),n.d(t,"h",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"f",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return p}));var r=n(10),i=n(46);function o(e){return Object.values(Object(i.a)(e).windows).map((function(e){return e.manifestId}))}function a(e){return Object(i.a)(e).windows||{}}function s(e,t){var n=t.windowId;return a(e)[n]}var c=Object(r.createSelector)([function(e){return Object(i.a)(e).viewers},function(e,t){return t.windowId}],(function(e,t){return e[t]}));function u(e){return Object(i.a)(e).workspace}var l=Object(r.createSelector)([u],(function(e){return e.windowIds||[]}));function f(e){return Object(i.a)(e).manifests||{}}function d(e,t){var n=t.manifestId,r=t.windowId,i=f(e);return i&&i[n||r&&(s(e,{windowId:r})||{}).manifestId]}function p(e){return Object(i.a)(e).catalog||{}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function o(e){var t=r.useRef(e);return i((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:H(e)}function r(e){return s(e)?e:V(e)}function i(e){return c(e)?e:U(e)}function o(e){return a(e)&&!u(e)?e:q(e)}function a(e){return!(!e||!e[f])}function s(e){return!(!e||!e[d])}function c(e){return!(!e||!e[p])}function u(e){return s(e)||c(e)}function l(e){return!(!e||!e[h])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=c,n.isAssociative=u,n.isOrdered=l,n.Keyed=r,n.Indexed=i,n.Set=o;var f="@@__IMMUTABLE_ITERABLE__@@",d="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",g={},v={value:!1},m={value:!1};function y(e){return e.value=!1,e}function b(e){e&&(e.value=!0)}function w(){}function _(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function x(e){return void 0===e.size&&(e.size=e.__iterate(S)),e.size}function O(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?x(e)+t:t}function S(){return!0}function E(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function C(e,t){return T(e,t,0)}function k(e,t){return T(e,t,t)}function T(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var j,P,I,R="function"==typeof Symbol&&Symbol.iterator,A=R||"@@iterator";function M(e){this.next=e}function D(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function N(){return{value:void 0,done:!0}}function L(e){return!!F(e)}function z(e){return e&&"function"==typeof e.next}function B(e){var t=F(e);return t&&t.call(e)}function F(e){var t=e&&(R&&e[R]||e["@@iterator"]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function H(e){return null==e?Q():a(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new K(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function V(e){return null==e?Q().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():Y(e)}function U(e){return null==e?Q():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():J(e)}function q(e){return(null==e?Q():a(e)?s(e)?e.entrySeq():e:J(e)).toSetSeq()}function G(e){this._array=e,this.size=e.length}function K(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function $(e){this._iterable=e,this.size=e.length||e.size}function Z(e){this._iterator=e,this._iteratorCache=[]}function X(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function Q(){return j||(j=new G([]))}function Y(e){var t=Array.isArray(e)?new G(e).fromEntrySeq():z(e)?new Z(e).fromEntrySeq():L(e)?new $(e).fromEntrySeq():"object"==typeof e?new K(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function J(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return W(e)?new G(e):z(e)?new Z(e):L(e)?new $(e):void 0}function te(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function ne(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new M((function(){var e=i[n?o-a:a];return a++>o?{value:void 0,done:!0}:D(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function re(e,t){return t?function e(t,n,r,i){return Array.isArray(n)?t.call(i,r,U(n).map((function(r,i){return e(t,r,i,n)}))):oe(n)?t.call(i,r,V(n).map((function(r,i){return e(t,r,i,n)}))):n}(t,e,"",{"":e}):ie(e)}function ie(e){return Array.isArray(e)?U(e).map(ie).toList():oe(e)?V(e).map(ie).toMap():e}function oe(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function se(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||c(e)!==c(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(l(e)){var r=e.entries();return t.every((function(e,t){var i=r.next().value;return i&&ae(i[1],e)&&(n||ae(i[0],t))}))&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var f=!0,d=t.__iterate((function(t,r){if(n?!e.has(t):i?!ae(t,e.get(r,g)):!ae(e.get(r,g),t))return f=!1,!1}));return f&&e.size===d}function ce(e,t){if(!(this instanceof ce))return new ce(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(P)return P;P=this}}function ue(e,t){if(!e)throw new Error(t)}function le(e,t,n){if(!(this instanceof le))return new le(e,t,n);if(ue(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(I)return I;I=this}}function fe(){throw TypeError("Abstract")}function de(){}function pe(){}function he(){}M.prototype.toString=function(){return"[Iterator]"},M.KEYS=0,M.VALUES=1,M.ENTRIES=2,M.prototype.inspect=M.prototype.toSource=function(){return this.toString()},M.prototype[A]=function(){return this},t(H,n),H.of=function(){return H(arguments)},H.prototype.toSeq=function(){return this},H.prototype.toString=function(){return this.__toString("Seq {","}")},H.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},H.prototype.__iterate=function(e,t){return te(this,e,t,!0)},H.prototype.__iterator=function(e,t){return ne(this,e,t,!0)},t(V,H),V.prototype.toKeyedSeq=function(){return this},t(U,H),U.of=function(){return U(arguments)},U.prototype.toIndexedSeq=function(){return this},U.prototype.toString=function(){return this.__toString("Seq [","]")},U.prototype.__iterate=function(e,t){return te(this,e,t,!1)},U.prototype.__iterator=function(e,t){return ne(this,e,t,!1)},t(q,H),q.of=function(){return q(arguments)},q.prototype.toSetSeq=function(){return this},H.isSeq=X,H.Keyed=V,H.Set=q,H.Indexed=U,H.prototype["@@__IMMUTABLE_SEQ__@@"]=!0,t(G,U),G.prototype.get=function(e,t){return this.has(e)?this._array[O(this,e)]:t},G.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},G.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new M((function(){return i>r?{value:void 0,done:!0}:D(e,i,n[t?r-i++:i++])}))},t(K,V),K.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},K.prototype.has=function(e){return this._object.hasOwnProperty(e)},K.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},K.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new M((function(){var a=r[t?i-o:o];return o++>i?{value:void 0,done:!0}:D(e,a,n[a])}))},K.prototype[h]=!0,t($,U),$.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=B(this._iterable),r=0;if(z(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},$.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=B(this._iterable);if(!z(n))return new M(N);var r=0;return new M((function(){var t=n.next();return t.done?t:D(e,r++,t.value)}))},t(Z,U),Z.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===e(i[o],o++,this))return o;for(;!(n=r.next()).done;){var a=n.value;if(i[o]=a,!1===e(a,o++,this))break}return o},Z.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new M((function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return D(e,i,r[i++])}))},t(ce,U),ce.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ce.prototype.get=function(e,t){return this.has(e)?this._value:t},ce.prototype.includes=function(e){return ae(this._value,e)},ce.prototype.slice=function(e,t){var n=this.size;return E(e,t,n)?this:new ce(this._value,k(t,n)-C(e,n))},ce.prototype.reverse=function(){return this},ce.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},ce.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},ce.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ce.prototype.__iterator=function(e,t){var n=this,r=0;return new M((function(){return r<n.size?D(e,r++,n._value):{value:void 0,done:!0}}))},ce.prototype.equals=function(e){return e instanceof ce?ae(this._value,e._value):se(e)},t(le,U),le.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},le.prototype.get=function(e,t){return this.has(e)?this._start+O(this,e)*this._step:t},le.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},le.prototype.slice=function(e,t){return E(e,t,this.size)?this:(e=C(e,this.size),(t=k(t,this.size))<=e?new le(0,0):new le(this.get(e,this._end),this.get(t,this._end),this._step))},le.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},le.prototype.lastIndexOf=function(e){return this.indexOf(e)},le.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===e(i,o,this))return o+1;i+=t?-r:r}return o},le.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new M((function(){var a=i;return i+=t?-r:r,o>n?{value:void 0,done:!0}:D(e,o++,a)}))},le.prototype.equals=function(e){return e instanceof le?this._start===e._start&&this._end===e._end&&this._step===e._step:se(this,e)},t(fe,n),t(de,fe),t(pe,fe),t(he,fe),fe.Keyed=de,fe.Indexed=pe,fe.Set=he;var ge="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ve(e){return e>>>1&1073741824|3221225471&e}function me(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ve(n)}if("string"===t)return e.length>Ee?function(e){var t=Te[e];return void 0===t&&(t=ye(e),ke===Ce&&(ke=0,Te={}),ke++,Te[e]=t),t}(e):ye(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(xe&&void 0!==(t=be.get(e)))return t;if(void 0!==(t=e[Se]))return t;if(!_e){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Se]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++Oe,1073741824&Oe&&(Oe=0),xe)be.set(e,t);else{if(void 0!==we&&!1===we(e))throw new Error("Non-extensible objects are not allowed as keys.");if(_e)Object.defineProperty(e,Se,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Se]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Se]=t}}return t}(e);if("function"==typeof e.toString)return ye(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ye(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ve(t)}var be,we=Object.isExtensible,_e=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),xe="function"==typeof WeakMap;xe&&(be=new WeakMap);var Oe=0,Se="__immutablehash__";"function"==typeof Symbol&&(Se=Symbol(Se));var Ee=16,Ce=255,ke=0,Te={};function je(e){ue(e!==1/0,"Cannot perform this action with an infinite size.")}function Pe(e){return null==e?Ue():Ie(e)&&!l(e)?e:Ue().withMutations((function(t){var n=r(e);je(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ie(e){return!(!e||!e[Ae])}t(Pe,de),Pe.prototype.toString=function(){return this.__toString("Map {","}")},Pe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Pe.prototype.set=function(e,t){return qe(this,e,t)},Pe.prototype.setIn=function(e,t){return this.updateIn(e,g,(function(){return t}))},Pe.prototype.remove=function(e){return qe(this,e,g)},Pe.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return g}))},Pe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Pe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,i){var o=t===g,a=n.next();if(a.done){var s=o?r:t,c=i(s);return c===s?t:c}ue(o||t&&t.set,"invalid keyPath");var u=a.value,l=o?g:t.get(u,g),f=e(l,n,r,i);return f===l?t:f===g?t.remove(u):(o?Ue():t).set(u,f)}(this,Zt(e),t,n);return r===g?void 0:r},Pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ue()},Pe.prototype.merge=function(){return Ze(this,void 0,arguments)},Pe.prototype.mergeWith=function(t){var n=e.call(arguments,1);return Ze(this,t,n)},Pe.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Ue(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Pe.prototype.mergeDeep=function(){return Ze(this,Xe,arguments)},Pe.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ze(this,Qe(t),n)},Pe.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Ue(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Pe.prototype.sort=function(e){return _t(zt(this,e))},Pe.prototype.sortBy=function(e,t){return _t(zt(this,t,e))},Pe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Pe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new w)},Pe.prototype.asImmutable=function(){return this.__ensureOwner()},Pe.prototype.wasAltered=function(){return this.__altered},Pe.prototype.__iterator=function(e,t){return new Fe(this,e,t)},Pe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Pe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ve(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Pe.isMap=Ie;var Re,Ae="@@__IMMUTABLE_MAP__@@",Me=Pe.prototype;function De(e,t){this.ownerID=e,this.entries=t}function Ne(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Le(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ze(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Be(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Fe(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&He(e._root)}function We(e,t){return D(e,t[0],t[1])}function He(e,t){return{node:e,index:0,__prev:t}}function Ve(e,t,n,r){var i=Object.create(Me);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ue(){return Re||(Re=Ve(0))}function qe(e,t,n){var r,i;if(e._root){var o=y(v),a=y(m);if(r=Ge(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===g?-1:1:0)}else{if(n===g)return e;i=1,r=new De(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ve(i,r):Ue()}function Ge(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===g?e:(b(s),b(a),new Be(t,r,[i,o]))}function Ke(e){return e.constructor===Be||e.constructor===ze}function $e(e,t,n,r,i){if(e.keyHash===r)return new ze(t,r,[e.entry,i]);var o,a=31&(0===n?e.keyHash:e.keyHash>>>n),s=31&(0===n?r:r>>>n);return new Ne(t,1<<a|1<<s,a===s?[$e(e,t,n+5,r,i)]:(o=new Be(t,r,i),a<s?[e,o]:[o,e]))}function Ze(e,t,n){for(var i=[],o=0;o<n.length;o++){var s=n[o],c=r(s);a(s)||(c=c.map((function(e){return re(e)}))),i.push(c)}return Ye(e,t,i)}function Xe(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ae(e,t)?e:t}function Qe(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ae(t,i)?t:i}}function Ye(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,g,(function(e){return e===g?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)})):e.constructor(n[0])}function Je(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,n,r){var i=r?e:_(e);return i[t]=n,i}Me[Ae]=!0,Me.delete=Me.remove,Me.removeIn=Me.deleteIn,De.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ae(n,i[o][0]))return i[o][1];return r},De.prototype.update=function(e,t,n,r,i,o,a){for(var s=i===g,c=this.entries,u=0,l=c.length;u<l&&!ae(r,c[u][0]);u++);var f=u<l;if(f?c[u][1]===i:s)return this;if(b(a),(s||!f)&&b(o),!s||1!==c.length){if(!f&&!s&&c.length>=tt)return function(e,t,n,r){e||(e=new w);for(var i=new Be(e,me(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}(e,c,r,i);var d=e&&e===this.ownerID,p=d?c:_(c);return f?s?u===l-1?p.pop():p[u]=p.pop():p[u]=[r,i]:p.push([r,i]),d?(this.entries=p,this):new De(e,p)}},Ne.prototype.get=function(e,t,n,r){void 0===t&&(t=me(n));var i=1<<(31&(0===e?t:t>>>e)),o=this.bitmap;return 0==(o&i)?r:this.nodes[Je(o&i-1)].get(e+5,t,n,r)},Ne.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=me(r));var s=31&(0===t?n:n>>>t),c=1<<s,u=this.bitmap,l=0!=(u&c);if(!l&&i===g)return this;var f=Je(u&c-1),d=this.nodes,p=l?d[f]:void 0,h=Ge(p,e,t+5,n,r,i,o,a);if(h===p)return this;if(!l&&h&&d.length>=nt)return function(e,t,n,r,i){for(var o=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new Le(e,o+1,a)}(e,d,u,s,h);if(l&&!h&&2===d.length&&Ke(d[1^f]))return d[1^f];if(l&&h&&1===d.length&&Ke(h))return h;var v=e&&e===this.ownerID,m=l?h?u:u^c:u|c,y=l?h?et(d,f,h,v):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}(d,f,v):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s<i;s++)s===t?(o[s]=n,a=-1):o[s]=e[s+a];return o}(d,f,h,v);return v?(this.bitmap=m,this.nodes=y,this):new Ne(e,m,y)},Le.prototype.get=function(e,t,n,r){void 0===t&&(t=me(n));var i=31&(0===e?t:t>>>e),o=this.nodes[i];return o?o.get(e+5,t,n,r):r},Le.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=me(r));var s=31&(0===t?n:n>>>t),c=i===g,u=this.nodes,l=u[s];if(c&&!l)return this;var f=Ge(l,e,t+5,n,r,i,o,a);if(f===l)return this;var d=this.count;if(l){if(!f&&--d<rt)return function(e,t,n,r){for(var i=0,o=0,a=new Array(n),s=0,c=1,u=t.length;s<u;s++,c<<=1){var l=t[s];void 0!==l&&s!==r&&(i|=c,a[o++]=l)}return new Ne(e,i,a)}(e,u,d,s)}else d++;var p=e&&e===this.ownerID,h=et(u,s,f,p);return p?(this.count=d,this.nodes=h,this):new Le(e,d,h)},ze.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ae(n,i[o][0]))return i[o][1];return r},ze.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=me(r));var s=i===g;if(n!==this.keyHash)return s?this:(b(a),b(o),$e(this,e,t,n,[r,i]));for(var c=this.entries,u=0,l=c.length;u<l&&!ae(r,c[u][0]);u++);var f=u<l;if(f?c[u][1]===i:s)return this;if(b(a),(s||!f)&&b(o),s&&2===l)return new Be(e,this.keyHash,c[1^u]);var d=e&&e===this.ownerID,p=d?c:_(c);return f?s?u===l-1?p.pop():p[u]=p.pop():p[u]=[r,i]:p.push([r,i]),d?(this.entries=p,this):new ze(e,this.keyHash,p)},Be.prototype.get=function(e,t,n,r){return ae(n,this.entry[0])?this.entry[1]:r},Be.prototype.update=function(e,t,n,r,i,o,a){var s=i===g,c=ae(r,this.entry[0]);return(c?i===this.entry[1]:s)?this:(b(a),s?void b(o):c?e&&e===this.ownerID?(this.entry[1]=i,this):new Be(e,this.keyHash,[r,i]):(b(o),$e(this,e,t,me(r),[r,i])))},De.prototype.iterate=ze.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Ne.prototype.iterate=Le.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},Be.prototype.iterate=function(e,t){return e(this.entry)},t(Fe,M),Fe.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return We(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return We(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return We(e,o.entry);t=this._stack=He(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var tt=8,nt=16,rt=8;function it(e){var t=ht();if(null==e)return t;if(ot(e))return e;var n=i(e),r=n.size;return 0===r?t:(je(r),r>0&&r<32?pt(0,r,5,null,new ct(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function ot(e){return!(!e||!e[at])}t(it,pe),it.of=function(){return this(arguments)},it.prototype.toString=function(){return this.__toString("List [","]")},it.prototype.get=function(e,t){if((e=O(this,e))>=0&&e<this.size){var n=mt(this,e+=this._origin);return n&&n.array[31&e]}return t},it.prototype.set=function(e,t){return function(e,t,n){if((t=O(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?yt(e,t).set(0,n):yt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o=y(m);return t>=wt(e._capacity)?r=gt(r,e.__ownerID,0,t,n,o):i=gt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):pt(e._origin,e._capacity,e._level,i,r):e}(this,e,t)},it.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},it.prototype.insert=function(e,t){return this.splice(e,0,t)},it.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ht()},it.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){yt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},it.prototype.pop=function(){return yt(this,0,-1)},it.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){yt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},it.prototype.shift=function(){return yt(this,1)},it.prototype.merge=function(){return bt(this,void 0,arguments)},it.prototype.mergeWith=function(t){var n=e.call(arguments,1);return bt(this,t,n)},it.prototype.mergeDeep=function(){return bt(this,Xe,arguments)},it.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return bt(this,Qe(t),n)},it.prototype.setSize=function(e){return yt(this,0,e)},it.prototype.slice=function(e,t){var n=this.size;return E(e,t,n)?this:yt(this,C(e,n),k(t,n))},it.prototype.__iterator=function(e,t){var n=0,r=dt(this,t);return new M((function(){var t=r();return t===ft?{value:void 0,done:!0}:D(e,n++,t)}))},it.prototype.__iterate=function(e,t){for(var n,r=0,i=dt(this,t);(n=i())!==ft&&!1!==e(n,r++,this););return r},it.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?pt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},it.isList=ot;var at="@@__IMMUTABLE_LIST__@@",st=it.prototype;function ct(e,t){this.array=e,this.ownerID=t}st[at]=!0,st.delete=st.remove,st.setIn=Me.setIn,st.deleteIn=st.removeIn=Me.removeIn,st.update=Me.update,st.updateIn=Me.updateIn,st.mergeIn=Me.mergeIn,st.mergeDeepIn=Me.mergeDeepIn,st.withMutations=Me.withMutations,st.asMutable=Me.asMutable,st.asImmutable=Me.asImmutable,st.wasAltered=Me.wasAltered,ct.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&31;if(r>=this.array.length)return new ct([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var s=vt(this,e);if(!o)for(var c=0;c<r;c++)s.array[c]=void 0;return i&&(s.array[r]=i),s},ct.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&31;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=vt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var ut,lt,ft={};function dt(e,t){var n=e._origin,r=e._capacity,i=wt(r),o=e._tail;return a(e._root,e._level,0);function a(e,s,c){return 0===s?function(e,a){var s=a===i?o&&o.array:e&&e.array,c=a>n?0:n-a,u=r-a;return u>32&&(u=32),function(){if(c===u)return ft;var e=t?--u:c++;return s&&s[e]}}(e,c):function(e,i,o){var s,c=e&&e.array,u=o>n?0:n-o>>i,l=1+(r-o>>i);return l>32&&(l=32),function(){for(;;){if(s){var e=s();if(e!==ft)return e;s=null}if(u===l)return ft;var n=t?--l:u++;s=a(c&&c[n],i-5,o+(n<<i))}}}(e,s,c)}}function pt(e,t,n,r,i,o,a){var s=Object.create(st);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function ht(){return ut||(ut=pt(0,0,5))}function gt(e,t,n,r,i,o){var a,s=r>>>n&31,c=e&&s<e.array.length;if(!c&&void 0===i)return e;if(n>0){var u=e&&e.array[s],l=gt(u,t,n-5,r,i,o);return l===u?e:((a=vt(e,t)).array[s]=l,a)}return c&&e.array[s]===i?e:(b(o),a=vt(e,t),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function vt(e,t){return t&&e&&t===e.ownerID?e:new ct(e?e.array.slice():[],t)}function mt(e,t){if(t>=wt(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&31],r-=5;return n}}function yt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new w,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var c=e._level,u=e._root,l=0;a+l<0;)u=new ct(u&&u.array.length?[void 0,u]:[],r),l+=1<<(c+=5);l&&(a+=l,i+=l,s+=l,o+=l);for(var f=wt(o),d=wt(s);d>=1<<c+5;)u=new ct(u&&u.array.length?[u]:[],r),c+=5;var p=e._tail,h=d<f?mt(e,s-1):d>f?new ct([],r):p;if(p&&d>f&&a<o&&p.array.length){for(var g=u=vt(u,r),v=c;v>5;v-=5){var m=f>>>v&31;g=g.array[m]=vt(g.array[m],r)}g.array[f>>>5&31]=p}if(s<o&&(h=h&&h.removeAfter(r,0,s)),a>=d)a-=d,s-=d,c=5,u=null,h=h&&h.removeBefore(r,0,a);else if(a>i||d<f){for(l=0;u;){var y=a>>>c&31;if(y!==d>>>c&31)break;y&&(l+=(1<<c)*y),c-=5,u=u.array[y]}u&&a>i&&(u=u.removeBefore(r,c,a-l)),u&&d<f&&(u=u.removeAfter(r,c,d-l)),l&&(a-=l,s-=l)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=c,e._root=u,e._tail=h,e.__hash=void 0,e.__altered=!0,e):pt(a,s,c,u,h)}function bt(e,t,n){for(var r=[],o=0,s=0;s<n.length;s++){var c=n[s],u=i(c);u.size>o&&(o=u.size),a(c)||(u=u.map((function(e){return re(e)}))),r.push(u)}return o>e.size&&(e=e.setSize(o)),Ye(e,t,r)}function wt(e){return e<32?0:e-1>>>5<<5}function _t(e){return null==e?St():xt(e)?e:St().withMutations((function(t){var n=r(e);je(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function xt(e){return Ie(e)&&l(e)}function Ot(e,t,n,r){var i=Object.create(_t.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function St(){return lt||(lt=Ot(Ue(),ht()))}function Et(e,t,n){var r,i,o=e._map,a=e._list,s=o.get(t),c=void 0!==s;if(n===g){if(!c)return e;a.size>=32&&a.size>=2*o.size?(r=(i=a.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(c){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Ot(r,i)}function Ct(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function kt(e){this._iter=e,this.size=e.size}function Tt(e){this._iter=e,this.size=e.size}function jt(e){this._iter=e,this.size=e.size}function Pt(e){var t=Gt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Kt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new M((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function It(e,t,n){var r=Gt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,g);return o===g?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate((function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new M((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return D(r,s,t.call(n,a[1],s,e),i)}))},r}function Rt(e,t){var n=Gt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Pt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Kt,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function At(e,t,n,r){var i=Gt(e);return r&&(i.has=function(r){var i=e.get(r,g);return i!==g&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,g);return o!==g&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate((function(e,o,c){if(t.call(n,e,o,c))return s++,i(e,r?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),s=0;return new M((function(){for(;;){var o=a.next();if(o.done)return o;var c=o.value,u=c[0],l=c[1];if(t.call(n,l,u,e))return D(i,r?u:s++,l,o)}}))},i}function Mt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),E(t,n,i))return e;var o=C(t,i),a=k(n,i);if(o!=o||a!=a)return Mt(e.toSeq().cacheResult(),t,n,r);var s,c=a-o;c==c&&(s=c<0?0:c);var u=Gt(e);return u.size=0===s?s:e.size&&s||void 0,!r&&X(e)&&s>=0&&(u.get=function(t,n){return(t=O(this,t))>=0&&t<s?e.get(t+o,n):n}),u.__iterateUncached=function(t,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,c=!0,u=0;return e.__iterate((function(e,n){if(!c||!(c=a++<o))return u++,!1!==t(e,r?n:u-1,i)&&u!==s})),u},u.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var i=0!==s&&e.__iterator(t,n),a=0,c=0;return new M((function(){for(;a++<o;)i.next();if(++c>s)return{value:void 0,done:!0};var e=i.next();return r||1===t?e:D(t,c-1,0===t?void 0:e.value[1],e)}))},u}function Dt(e,t,n,r){var i=Gt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,c=0;return e.__iterate((function(e,o,u){if(!s||!(s=t.call(n,e,o,u)))return c++,i(e,r?o:c-1,a)})),c},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(2,o),c=!0,u=0;return new M((function(){var e,o,l;do{if((e=s.next()).done)return r||1===i?e:D(i,u++,0===i?void 0:e.value[1],e);var f=e.value;o=f[0],l=f[1],c&&(c=t.call(n,l,o,a))}while(c);return 2===i?e:D(i,o,l,e)}))},i}function Nt(e,t){var n=s(e),i=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?Y(e):J(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&s(o)||c(e)&&c(o))return o}var u=new G(i);return n?u=u.toKeyedSeq():c(e)||(u=u.toSetSeq()),(u=u.flatten(!0)).size=i.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),u}function Lt(e,t,n){var r=Gt(e);return r.__iterateUncached=function(r,i){var o=0,s=!1;return function e(c,u){var l=this;c.__iterate((function(i,c){return(!t||u<t)&&a(i)?e(i,u+1):!1===r(i,n?c:o++,l)&&(s=!0),!s}),i)}(e,0),o},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),s=[],c=0;return new M((function(){for(;o;){var e=o.next();if(!1===e.done){var u=e.value;if(2===r&&(u=u[1]),t&&!(s.length<t)||!a(u))return n?e:D(r,c++,u,e);s.push(o),o=u.__iterator(r,i)}else o=s.pop()}return{value:void 0,done:!0}}))},r}function zt(e,t,n){t||(t=$t);var r=s(e),i=0,o=e.toSeq().map((function(t,r){return[r,t,i++,n?n(t,r,e):t]})).toArray();return o.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?V(o):c(e)?U(o):q(o)}function Bt(e,t,n){if(t||(t=$t),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return Ft(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return Ft(t,e,n)?n:e}))}function Ft(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function Wt(e,t,r){var i=Gt(e);return i.size=new G(r).map((function(e){return e.size})).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map((function(e){return e=n(e),B(i?e.reverse():e)})),a=0,s=!1;return new M((function(){var n;return s||(n=o.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?{value:void 0,done:!0}:D(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function Ht(e,t){return X(e)?t:e.constructor(t)}function Vt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ut(e){return je(e.size),x(e)}function qt(e){return s(e)?r:c(e)?i:o}function Gt(e){return Object.create((s(e)?V:c(e)?U:q).prototype)}function Kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):H.prototype.cacheResult.call(this)}function $t(e,t){return e>t?1:e<t?-1:0}function Zt(e){var t=B(e);if(!t){if(!W(e))throw new TypeError("Expected iterable or array-like: "+e);t=B(n(e))}return t}function Xt(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);!function(e,t){try{t.forEach(en.bind(void 0,e))}catch(e){}}(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=Pe(o)},i=r.prototype=Object.create(Qt);return i.constructor=r,r}t(_t,Pe),_t.of=function(){return this(arguments)},_t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},_t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},_t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):St()},_t.prototype.set=function(e,t){return Et(this,e,t)},_t.prototype.remove=function(e){return Et(this,e,g)},_t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},_t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},_t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},_t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Ot(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},_t.isOrderedMap=xt,_t.prototype[h]=!0,_t.prototype.delete=_t.prototype.remove,t(Ct,V),Ct.prototype.get=function(e,t){return this._iter.get(e,t)},Ct.prototype.has=function(e){return this._iter.has(e)},Ct.prototype.valueSeq=function(){return this._iter.valueSeq()},Ct.prototype.reverse=function(){var e=this,t=Rt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Ct.prototype.map=function(e,t){var n=this,r=It(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Ct.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ut(this):0,function(i){return e(i,t?--n:n++,r)}),t)},Ct.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(1,t),r=t?Ut(this):0;return new M((function(){var i=n.next();return i.done?i:D(e,t?--r:r++,i.value,i)}))},Ct.prototype[h]=!0,t(kt,U),kt.prototype.includes=function(e){return this._iter.includes(e)},kt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t),r=0;return new M((function(){var t=n.next();return t.done?t:D(e,r++,t.value,t)}))},t(Tt,q),Tt.prototype.has=function(e){return this._iter.includes(e)},Tt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Tt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new M((function(){var t=n.next();return t.done?t:D(e,t.value,t.value,t)}))},t(jt,V),jt.prototype.entrySeq=function(){return this._iter.toSeq()},jt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){Vt(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},jt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new M((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Vt(r);var i=a(r);return D(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}}))},kt.prototype.cacheResult=Ct.prototype.cacheResult=Tt.prototype.cacheResult=jt.prototype.cacheResult=Kt,t(Xt,de),Xt.prototype.toString=function(){return this.__toString(Jt(this)+" {","}")},Xt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Xt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Xt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Yt(this,Ue()))},Xt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Jt(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Yt(this,n)},Xt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Yt(this,t)},Xt.prototype.wasAltered=function(){return this._map.wasAltered()},Xt.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},Xt.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},Xt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Yt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Qt=Xt.prototype;function Yt(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Jt(e){return e._name||e.constructor.name||"Record"}function en(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){ue(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function tn(e){return null==e?un():nn(e)&&!l(e)?e:un().withMutations((function(t){var n=o(e);je(n.size),n.forEach((function(e){return t.add(e)}))}))}function nn(e){return!(!e||!e[on])}Qt.delete=Qt.remove,Qt.deleteIn=Qt.removeIn=Me.removeIn,Qt.merge=Me.merge,Qt.mergeWith=Me.mergeWith,Qt.mergeIn=Me.mergeIn,Qt.mergeDeep=Me.mergeDeep,Qt.mergeDeepWith=Me.mergeDeepWith,Qt.mergeDeepIn=Me.mergeDeepIn,Qt.setIn=Me.setIn,Qt.update=Me.update,Qt.updateIn=Me.updateIn,Qt.withMutations=Me.withMutations,Qt.asMutable=Me.asMutable,Qt.asImmutable=Me.asImmutable,t(tn,he),tn.of=function(){return this(arguments)},tn.fromKeys=function(e){return this(r(e).keySeq())},tn.prototype.toString=function(){return this.__toString("Set {","}")},tn.prototype.has=function(e){return this._map.has(e)},tn.prototype.add=function(e){return sn(this,this._map.set(e,!0))},tn.prototype.remove=function(e){return sn(this,this._map.remove(e))},tn.prototype.clear=function(){return sn(this,this._map.clear())},tn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},tn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return o(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},tn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return o(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},tn.prototype.merge=function(){return this.union.apply(this,arguments)},tn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},tn.prototype.sort=function(e){return ln(zt(this,e))},tn.prototype.sortBy=function(e,t){return ln(zt(this,t,e))},tn.prototype.wasAltered=function(){return this._map.wasAltered()},tn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},tn.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},tn.isSet=nn;var rn,on="@@__IMMUTABLE_SET__@@",an=tn.prototype;function sn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function cn(e,t){var n=Object.create(an);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function un(){return rn||(rn=cn(Ue()))}function ln(e){return null==e?gn():fn(e)?e:gn().withMutations((function(t){var n=o(e);je(n.size),n.forEach((function(e){return t.add(e)}))}))}function fn(e){return nn(e)&&l(e)}an[on]=!0,an.delete=an.remove,an.mergeDeep=an.merge,an.mergeDeepWith=an.mergeWith,an.withMutations=Me.withMutations,an.asMutable=Me.asMutable,an.asImmutable=Me.asImmutable,an.__empty=un,an.__make=cn,t(ln,tn),ln.of=function(){return this(arguments)},ln.fromKeys=function(e){return this(r(e).keySeq())},ln.prototype.toString=function(){return this.__toString("OrderedSet {","}")},ln.isOrderedSet=fn;var dn,pn=ln.prototype;function hn(e,t){var n=Object.create(pn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function gn(){return dn||(dn=hn(St()))}function vn(e){return null==e?xn():mn(e)?e:xn().unshiftAll(e)}function mn(e){return!(!e||!e[bn])}pn[h]=!0,pn.__empty=gn,pn.__make=hn,t(vn,pe),vn.of=function(){return this(arguments)},vn.prototype.toString=function(){return this.__toString("Stack [","]")},vn.prototype.get=function(e,t){var n=this._head;for(e=O(this,e);n&&e--;)n=n.next;return n?n.value:t},vn.prototype.peek=function(){return this._head&&this._head.value},vn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):_n(e,t)},vn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;je(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):_n(t,n)},vn.prototype.pop=function(){return this.slice(1)},vn.prototype.unshift=function(){return this.push.apply(this,arguments)},vn.prototype.unshiftAll=function(e){return this.pushAll(e)},vn.prototype.shift=function(){return this.pop.apply(this,arguments)},vn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):xn()},vn.prototype.slice=function(e,t){if(E(e,t,this.size))return this;var n=C(e,this.size);if(k(t,this.size)!==this.size)return pe.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):_n(r,i)},vn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?_n(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},vn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},vn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new M((function(){if(r){var t=r.value;return r=r.next,D(e,n++,t)}return{value:void 0,done:!0}}))},vn.isStack=mn;var yn,bn="@@__IMMUTABLE_STACK__@@",wn=vn.prototype;function _n(e,t,n,r){var i=Object.create(wn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function xn(){return yn||(yn=_n(0))}function On(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}wn[bn]=!0,wn.withMutations=Me.withMutations,wn.asMutable=Me.asMutable,wn.asImmutable=Me.asImmutable,wn.wasAltered=Me.wasAltered,n.Iterator=M,On(n,{toArray:function(){je(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Ct(this,!0)},toMap:function(){return Pe(this.toKeyedSeq())},toObject:function(){je(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return _t(this.toKeyedSeq())},toOrderedSet:function(){return ln(s(this)?this.valueSeq():this)},toSet:function(){return tn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Tt(this)},toSeq:function(){return c(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return vn(s(this)?this.valueSeq():this)},toList:function(){return it(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Ht(this,Nt(this,t))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){je(this.size);var n=!0;return this.__iterate((function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1})),n},filter:function(e,t){return Ht(this,At(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate((function(r,i,o){if(e.call(t,r,i,o))return n=[i,r],!1})),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return je(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){je(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return Ht(this,It(this,e,t))},reduce:function(e,t,n){var r,i;return je(this.size),arguments.length<2?i=!0:r=t,this.__iterate((function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Ht(this,Rt(this,!0))},slice:function(e,t){return Ht(this,Mt(this,e,t,!0))},some:function(e,t){return!this.every(Tn(e),t)},sort:function(e){return Ht(this,zt(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return x(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Pe().asMutable();return e.__iterate((function(i,o){r.update(t.call(n,i,o,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return se(this,e)},entrySeq:function(){var e=this;if(e._cache)return new G(e._cache);var t=e.toSeq().map(kn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Tn(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(S)},flatMap:function(e,t){return Ht(this,function(e,t,n){var r=qt(e);return e.toSeq().map((function(i,o){return r(t.call(n,i,o,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return Ht(this,Lt(this,e,!0))},fromEntrySeq:function(){return new jt(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,i=Zt(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,g):g)===g)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=s(e),i=(l(e)?_t():Pe()).asMutable();e.__iterate((function(o,a){i.update(t.call(n,o,a,e),(function(e){return(e=e||[]).push(r?[a,o]:o),e}))}));var o=qt(e);return i.map((function(t){return Ht(e,o(t))}))}(this,e,t)},has:function(e){return this.get(e,g)!==g},hasIn:function(e){return this.getIn(e,g)!==g},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map(Cn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return Bt(this,e)},maxBy:function(e,t){return Bt(this,t,e)},min:function(e){return Bt(this,e?jn(e):Rn)},minBy:function(e,t){return Bt(this,t?jn(t):Rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Ht(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Ht(this,Dt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Tn(e),t)},sortBy:function(e,t){return Ht(this,zt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Ht(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Ht(this,function(e,t,n){var r=Gt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate((function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)})),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(2,i),s=!0;return new M((function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,c=i[0],u=i[1];return t.call(n,u,c,o)?2===r?e:D(r,c,u,e):(s=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Tn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=l(e),n=s(e),r=t?1:0;return function(e,t){return t=ge(t,3432918353),t=ge(t<<15|t>>>-15,461845907),t=ge(t<<13|t>>>-13,5),t=ge((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ve((t=ge(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+An(me(e),me(t))|0}:function(e,t){r=r+An(me(e),me(t))|0}:t?function(e){r=31*r+me(e)|0}:function(e){r=r+me(e)|0}),r)}(this))}});var Sn=n.prototype;Sn[f]=!0,Sn[A]=Sn.values,Sn.__toJS=Sn.toArray,Sn.__toStringMapper=Pn,Sn.inspect=Sn.toSource=function(){return this.toString()},Sn.chain=Sn.flatMap,Sn.contains=Sn.includes,function(){try{Object.defineProperty(Sn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),On(r,{flip:function(){return Ht(this,Pt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return ae(t,e)}))},mapEntries:function(e,t){var n=this,r=0;return Ht(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Ht(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var En=r.prototype;function Cn(e,t){return t}function kn(e,t){return[t,e]}function Tn(e){return function(){return!e.apply(this,arguments)}}function jn(e){return function(){return-e.apply(this,arguments)}}function Pn(e){return"string"==typeof e?JSON.stringify(e):e}function In(){return _(arguments)}function Rn(e,t){return e<t?1:e>t?-1:0}function An(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return En[d]=!0,En[A]=Sn.entries,En.__toJS=Sn.toObject,En.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Pn(e)},On(i,{toKeyedSeq:function(){return new Ct(this,!1)},filter:function(e,t){return Ht(this,At(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return Ht(this,Rt(this,!1))},slice:function(e,t){return Ht(this,Mt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=C(e,e<0?this.count():this.size);var r=this.slice(0,e);return Ht(this,1===n?r:r.concat(_(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return Ht(this,Lt(this,e,!1))},get:function(e,t){return(e=O(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=O(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return Ht(this,function(e,t){var n=Gt(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate((function(e,r){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)}),r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(1,r),a=0;return new M((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?D(n,a++,t):D(n,a++,i.value,i)}))},n}(this,e))},interleave:function(){var e=[this].concat(_(arguments)),t=Wt(this.toSeq(),U.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),Ht(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return Ht(this,Dt(this,e,t,!1))},zip:function(){var e=[this].concat(_(arguments));return Ht(this,Wt(this,In,e))},zipWith:function(e){var t=_(arguments);return t[0]=this,Ht(this,Wt(this,e,t))}}),i.prototype[p]=!0,i.prototype[h]=!0,On(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Sn.includes,On(V,r.prototype),On(U,i.prototype),On(q,o.prototype),On(de,r.prototype),On(pe,i.prototype),On(he,o.prototype),{Iterable:n,Seq:H,Collection:fe,Map:Pe,OrderedMap:_t,List:it,Stack:vn,Set:tn,OrderedSet:ln,Record:Xt,Range:le,Repeat:ce,is:ae,fromJS:re}}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(335);var i=n(209),o=n(336);function a(e,t){return Object(r.a)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||Object(i.a)(e,t)||Object(o.a)()}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(r(t),!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;(a=new Error(t.replace(/%s/g,(function(){return String(i[s++])})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(0),o=n.n(i),a=n(329);function s(e,t){var n=function(t,n){return o.a.createElement(a.a,Object(r.a)({ref:n},t),e)};return n.muiName=a.a.muiName,o.a.memo(o.a.forwardRef(n))}},function(e,t,n){"use strict";n.r(t),n.d(t,"colors",(function(){return r})),n.d(t,"hexToRgb",(function(){return i.hexToRgb})),n.d(t,"rgbToHex",(function(){return i.rgbToHex})),n.d(t,"hslToRgb",(function(){return i.hslToRgb})),n.d(t,"decomposeColor",(function(){return i.decomposeColor})),n.d(t,"recomposeColor",(function(){return i.recomposeColor})),n.d(t,"getContrastRatio",(function(){return i.getContrastRatio})),n.d(t,"getLuminance",(function(){return i.getLuminance})),n.d(t,"emphasize",(function(){return i.emphasize})),n.d(t,"fade",(function(){return i.fade})),n.d(t,"alpha",(function(){return i.alpha})),n.d(t,"darken",(function(){return i.darken})),n.d(t,"lighten",(function(){return i.lighten})),n.d(t,"createTheme",(function(){return i.createTheme})),n.d(t,"createMuiTheme",(function(){return i.createMuiTheme})),n.d(t,"unstable_createMuiStrictModeTheme",(function(){return i.unstable_createMuiStrictModeTheme})),n.d(t,"createStyles",(function(){return i.createStyles})),n.d(t,"makeStyles",(function(){return i.makeStyles})),n.d(t,"responsiveFontSizes",(function(){return i.responsiveFontSizes})),n.d(t,"styled",(function(){return i.styled})),n.d(t,"easing",(function(){return i.easing})),n.d(t,"duration",(function(){return i.duration})),n.d(t,"useTheme",(function(){return i.useTheme})),n.d(t,"withStyles",(function(){return i.withStyles})),n.d(t,"withTheme",(function(){return i.withTheme})),n.d(t,"createGenerateClassName",(function(){return i.createGenerateClassName})),n.d(t,"jssPreset",(function(){return i.jssPreset})),n.d(t,"ServerStyleSheets",(function(){return i.ServerStyleSheets})),n.d(t,"StylesProvider",(function(){return i.StylesProvider})),n.d(t,"MuiThemeProvider",(function(){return i.MuiThemeProvider})),n.d(t,"ThemeProvider",(function(){return i.ThemeProvider})),n.d(t,"capitalize",(function(){return o.capitalize})),n.d(t,"createChainedFunction",(function(){return o.createChainedFunction})),n.d(t,"createSvgIcon",(function(){return o.createSvgIcon})),n.d(t,"debounce",(function(){return o.debounce})),n.d(t,"deprecatedPropType",(function(){return o.deprecatedPropType})),n.d(t,"isMuiElement",(function(){return o.isMuiElement})),n.d(t,"ownerDocument",(function(){return o.ownerDocument})),n.d(t,"ownerWindow",(function(){return o.ownerWindow})),n.d(t,"requirePropFactory",(function(){return o.requirePropFactory})),n.d(t,"setRef",(function(){return o.setRef})),n.d(t,"unsupportedProp",(function(){return o.unsupportedProp})),n.d(t,"useControlled",(function(){return o.useControlled})),n.d(t,"useEventCallback",(function(){return o.useEventCallback})),n.d(t,"useForkRef",(function(){return o.useForkRef})),n.d(t,"unstable_useId",(function(){return o.unstable_useId})),n.d(t,"useIsFocusVisible",(function(){return o.useIsFocusVisible})),n.d(t,"Accordion",(function(){return a.a})),n.d(t,"AccordionActions",(function(){return g})),n.d(t,"AccordionDetails",(function(){return v.a})),n.d(t,"AccordionSummary",(function(){return m.a})),n.d(t,"AppBar",(function(){return y.a})),n.d(t,"Avatar",(function(){return b.a})),n.d(t,"Backdrop",(function(){return w.a})),n.d(t,"Badge",(function(){return _.a})),n.d(t,"BottomNavigation",(function(){return O})),n.d(t,"BottomNavigationAction",(function(){return C})),n.d(t,"Box",(function(){return W})),n.d(t,"styleFunction",(function(){return F})),n.d(t,"Breadcrumbs",(function(){return Z})),n.d(t,"Button",(function(){return X.a})),n.d(t,"ButtonBase",(function(){return S.a})),n.d(t,"ButtonGroup",(function(){return J})),n.d(t,"Card",(function(){return ee.a})),n.d(t,"CardActionArea",(function(){return ne})),n.d(t,"CardActions",(function(){return ie})),n.d(t,"CardContent",(function(){return oe.a})),n.d(t,"CardHeader",(function(){return se})),n.d(t,"CardMedia",(function(){return le})),n.d(t,"Checkbox",(function(){return Se})),n.d(t,"Chip",(function(){return Ee.a})),n.d(t,"CircularProgress",(function(){return Ce.a})),n.d(t,"ClickAwayListener",(function(){return ke.a})),n.d(t,"Collapse",(function(){return Te.a})),n.d(t,"Container",(function(){return Ie})),n.d(t,"CssBaseline",(function(){return Me})),n.d(t,"Dialog",(function(){return De.a})),n.d(t,"DialogActions",(function(){return Ne.a})),n.d(t,"DialogContent",(function(){return Le.a})),n.d(t,"DialogContentText",(function(){return ze.a})),n.d(t,"DialogTitle",(function(){return Be.a})),n.d(t,"Divider",(function(){return Fe.a})),n.d(t,"Drawer",(function(){return We.a})),n.d(t,"ExpansionPanel",(function(){return Ge})),n.d(t,"ExpansionPanelActions",(function(){return $e})),n.d(t,"ExpansionPanelDetails",(function(){return Xe})),n.d(t,"ExpansionPanelSummary",(function(){return Ye})),n.d(t,"Fab",(function(){return Je.a})),n.d(t,"Fade",(function(){return et.a})),n.d(t,"FilledInput",(function(){return tt.a})),n.d(t,"FormControl",(function(){return nt.a})),n.d(t,"useFormControl",(function(){return rt.a})),n.d(t,"FormControlLabel",(function(){return it.a})),n.d(t,"FormGroup",(function(){return at})),n.d(t,"FormHelperText",(function(){return st.a})),n.d(t,"FormLabel",(function(){return ct.a})),n.d(t,"Grid",(function(){return ut.a})),n.d(t,"GridList",(function(){return ft})),n.d(t,"GridListTile",(function(){return vt})),n.d(t,"GridListTileBar",(function(){return yt})),n.d(t,"Grow",(function(){return bt.a})),n.d(t,"Hidden",(function(){return Et})),n.d(t,"Icon",(function(){return kt})),n.d(t,"IconButton",(function(){return he.a})),n.d(t,"ImageList",(function(){return jt})),n.d(t,"ImageListItem",(function(){return Rt})),n.d(t,"ImageListItemBar",(function(){return Mt})),n.d(t,"Input",(function(){return Dt.a})),n.d(t,"InputAdornment",(function(){return Nt.a})),n.d(t,"InputBase",(function(){return Lt.a})),n.d(t,"InputLabel",(function(){return zt.a})),n.d(t,"LinearProgress",(function(){return Ft})),n.d(t,"Link",(function(){return Wt.a})),n.d(t,"List",(function(){return Ht.a})),n.d(t,"ListItem",(function(){return Vt.a})),n.d(t,"ListItemAvatar",(function(){return Gt})),n.d(t,"ListItemIcon",(function(){return Kt.a})),n.d(t,"ListItemSecondaryAction",(function(){return Zt})),n.d(t,"ListItemText",(function(){return Xt.a})),n.d(t,"ListSubheader",(function(){return Qt.a})),n.d(t,"Menu",(function(){return Yt.a})),n.d(t,"MenuItem",(function(){return Jt.a})),n.d(t,"MenuList",(function(){return en.a})),n.d(t,"MobileStepper",(function(){return nn})),n.d(t,"Modal",(function(){return rn.a})),n.d(t,"ModalManager",(function(){return on.a})),n.d(t,"NativeSelect",(function(){return an.a})),n.d(t,"NoSsr",(function(){return cn})),n.d(t,"OutlinedInput",(function(){return un.a})),n.d(t,"Paper",(function(){return Ve.a})),n.d(t,"Popover",(function(){return ln.a})),n.d(t,"Popper",(function(){return fn.a})),n.d(t,"Portal",(function(){return dn.a})),n.d(t,"Radio",(function(){return xn})),n.d(t,"RadioGroup",(function(){return En})),n.d(t,"useRadioGroup",(function(){return yn})),n.d(t,"RootRef",(function(){return Mn})),n.d(t,"Select",(function(){return Dn.a})),n.d(t,"Slide",(function(){return Nn.a})),n.d(t,"Slider",(function(){return Ln.a})),n.d(t,"Snackbar",(function(){return zn.a})),n.d(t,"SnackbarContent",(function(){return Bn.a})),n.d(t,"Step",(function(){return Wn})),n.d(t,"StepButton",(function(){return Qn})),n.d(t,"StepConnector",(function(){return Jn})),n.d(t,"StepContent",(function(){return tr})),n.d(t,"StepIcon",(function(){return Kn})),n.d(t,"StepLabel",(function(){return Zn})),n.d(t,"Stepper",(function(){return ir})),n.d(t,"SvgIcon",(function(){return Un.a})),n.d(t,"SwipeableDrawer",(function(){return wr})),n.d(t,"Switch",(function(){return xr})),n.d(t,"Tab",(function(){return Or.a})),n.d(t,"Table",(function(){return Cr})),n.d(t,"TableBody",(function(){return Pr})),n.d(t,"TableCell",(function(){return Rr})),n.d(t,"TableContainer",(function(){return Mr})),n.d(t,"TableFooter",(function(){return Lr})),n.d(t,"TableHead",(function(){return Fr})),n.d(t,"TablePagination",(function(){return Yr})),n.d(t,"TableRow",(function(){return ei})),n.d(t,"TableSortLabel",(function(){return ri})),n.d(t,"Tabs",(function(){return ii.a})),n.d(t,"TabScrollButton",(function(){return oi.a})),n.d(t,"TextField",(function(){return ai.a})),n.d(t,"TextareaAutosize",(function(){return si.a})),n.d(t,"Toolbar",(function(){return Wr.a})),n.d(t,"Tooltip",(function(){return ci.a})),n.d(t,"Typography",(function(){return V.a})),n.d(t,"Unstable_TrapFocus",(function(){return ui.a})),n.d(t,"useMediaQuery",(function(){return li.a})),n.d(t,"useScrollTrigger",(function(){return pi})),n.d(t,"withMobileDialog",(function(){return hi})),n.d(t,"withWidth",(function(){return wt.a})),n.d(t,"isWidthUp",(function(){return gi.b})),n.d(t,"isWidthDown",(function(){return gi.a})),n.d(t,"Zoom",(function(){return bi}));var r=n(450),i=n(28),o=n(74),a=n(1152),s=n(1),c=n(4),u=n(0),l=n(2),f=n.n(l),d=n(3),p=n(5),h=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.disableSpacing,o=void 0!==i&&i,a=Object(c.a)(e,["classes","className","disableSpacing"]);return u.createElement("div",Object(s.a)({className:Object(d.a)(n.root,r,!o&&n.spacing),ref:t},a))})),g=Object(p.a)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiAccordionActions"})(h),v=n(1153),m=n(1154),y=n(1155),b=n(1176),w=n(759),_=n(1120),x=(n(67),u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"div":o,l=e.onChange,f=e.showLabels,p=void 0!==f&&f,h=e.value,g=Object(c.a)(e,["children","classes","className","component","onChange","showLabels","value"]);return u.createElement(a,Object(s.a)({className:Object(d.a)(r.root,i),ref:t},g),u.Children.map(n,(function(e,t){if(!u.isValidElement(e))return null;var n=void 0===e.props.value?t:e.props.value;return u.cloneElement(e,{selected:n===h,showLabel:void 0!==e.props.showLabel?e.props.showLabel:p,value:n,onChange:l})})))}))),O=Object(p.a)((function(e){return{root:{display:"flex",justifyContent:"center",height:56,backgroundColor:e.palette.background.paper}}}),{name:"MuiBottomNavigation"})(x),S=n(190),E=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.icon,o=e.label,a=e.onChange,l=e.onClick,f=e.selected,p=e.showLabel,h=e.value,g=Object(c.a)(e,["classes","className","icon","label","onChange","onClick","selected","showLabel","value"]);return u.createElement(S.a,Object(s.a)({ref:t,className:Object(d.a)(n.root,r,f?n.selected:!p&&n.iconOnly),focusRipple:!0,onClick:function(e){a&&a(e,h),l&&l(e)}},g),u.createElement("span",{className:n.wrapper},i,u.createElement("span",{className:Object(d.a)(n.label,f?n.selected:!p&&n.iconOnly)},o)))})),C=Object(p.a)((function(e){return{root:{transition:e.transitions.create(["color","padding-top"],{duration:e.transitions.duration.short}),padding:"6px 12px 8px",minWidth:80,maxWidth:168,color:e.palette.text.secondary,flex:"1","&$iconOnly":{paddingTop:16},"&$selected":{paddingTop:6,color:e.palette.primary.main}},selected:{},iconOnly:{},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"},label:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s","&$iconOnly":{opacity:0,transitionDelay:"0s"},"&$selected":{fontSize:e.typography.pxToRem(14)}}}}),{name:"MuiBottomNavigationAction"})(E),k=n(291),T=n(69),j=n(292),P=n(580),I=n(293),R=n(294),A=n(295),M=n(296),D=n(581),N=n(297),L=n(318),z=n(298),B=n(322),F=Object(k.b)(Object(T.a)(j.h,P.a,I.d,R.a,A.b,M.c,D.a,N.b,L.b,z.a)),W=Object(B.a)("div")(F,{name:"MuiBox"}),H=n(50),V=n(96),U=n(24),q=n(43),G=Object(q.a)(u.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"}),"MoreHoriz");var K=Object(p.a)((function(e){return{root:{display:"flex",marginLeft:e.spacing(.5),marginRight:e.spacing(.5),backgroundColor:e.palette.grey[100],color:e.palette.grey[700],borderRadius:2,cursor:"pointer","&:hover, &:focus":{backgroundColor:e.palette.grey[200]},"&:active":{boxShadow:e.shadows[0],backgroundColor:Object(U.d)(e.palette.grey[200],.12)}},icon:{width:24,height:16}}}),{name:"PrivateBreadcrumbCollapsed"})((function(e){var t=e.classes,n=Object(c.a)(e,["classes"]);return u.createElement(S.a,Object(s.a)({component:"li",className:t.root,focusRipple:!0},n),u.createElement(G,{className:t.icon}))}));var $=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"nav":o,l=e.expandText,f=void 0===l?"Show path":l,p=e.itemsAfterCollapse,h=void 0===p?1:p,g=e.itemsBeforeCollapse,v=void 0===g?1:g,m=e.maxItems,y=void 0===m?8:m,b=e.separator,w=void 0===b?"/":b,_=Object(c.a)(e,["children","classes","className","component","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),x=u.useState(!1),O=x[0],S=x[1],E=u.Children.toArray(n).filter((function(e){return u.isValidElement(e)})).map((function(e,t){return u.createElement("li",{className:r.li,key:"child-".concat(t)},e)}));return u.createElement(V.a,Object(s.a)({ref:t,component:a,color:"textSecondary",className:Object(d.a)(r.root,i)},_),u.createElement("ol",{className:r.ol},function(e,t,n){return e.reduce((function(r,i,o){return o<e.length-1?r=r.concat(i,u.createElement("li",{"aria-hidden":!0,key:"separator-".concat(o),className:t},n)):r.push(i),r}),[])}(O||y&&E.length<=y?E:function(e){return v+h>=e.length?e:[].concat(Object(H.a)(e.slice(0,v)),[u.createElement(K,{"aria-label":f,key:"ellipsis",onClick:function(e){S(!0);var t=e.currentTarget.parentNode.querySelector("a[href],button,[tabindex]");t&&t.focus()}})],Object(H.a)(e.slice(e.length-h,e.length)))}(E),r.separator,w)))})),Z=Object(p.a)({root:{},ol:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"},li:{},separator:{display:"flex",userSelect:"none",marginLeft:8,marginRight:8}},{name:"MuiBreadcrumbs"})($),X=n(571),Q=n(11);X.a.styles;var Y=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,l=e.component,f=void 0===l?"div":l,p=e.disabled,h=void 0!==p&&p,g=e.disableElevation,v=void 0!==g&&g,m=e.disableFocusRipple,y=void 0!==m&&m,b=e.disableRipple,w=void 0!==b&&b,_=e.fullWidth,x=void 0!==_&&_,O=e.orientation,S=void 0===O?"horizontal":O,E=e.size,C=void 0===E?"medium":E,k=e.variant,T=void 0===k?"outlined":k,j=Object(c.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"]),P=Object(d.a)(r.grouped,r["grouped".concat(Object(Q.a)(S))],r["grouped".concat(Object(Q.a)(T))],r["grouped".concat(Object(Q.a)(T)).concat(Object(Q.a)(S))],r["grouped".concat(Object(Q.a)(T)).concat("default"!==a?Object(Q.a)(a):"")],h&&r.disabled);return u.createElement(f,Object(s.a)({role:"group",className:Object(d.a)(r.root,i,x&&r.fullWidth,v&&r.disableElevation,"contained"===T&&r.contained,"vertical"===S&&r.vertical),ref:t},j),u.Children.map(n,(function(e){return u.isValidElement(e)?u.cloneElement(e,{className:Object(d.a)(P,e.props.className),color:e.props.color||a,disabled:e.props.disabled||h,disableElevation:e.props.disableElevation||v,disableFocusRipple:y,disableRipple:w,fullWidth:x,size:e.props.size||C,variant:e.props.variant||T}):null})))})),J=Object(p.a)((function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},contained:{boxShadow:e.shadows[2]},disableElevation:{boxShadow:"none"},disabled:{},fullWidth:{width:"100%"},vertical:{flexDirection:"column"},grouped:{minWidth:40},groupedHorizontal:{"&:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedVertical:{"&:not(:first-child)":{borderTopRightRadius:0,borderTopLeftRadius:0},"&:not(:last-child)":{borderBottomRightRadius:0,borderBottomLeftRadius:0}},groupedText:{},groupedTextHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextPrimary:{"&:not(:last-child)":{borderColor:Object(U.a)(e.palette.primary.main,.5)}},groupedTextSecondary:{"&:not(:last-child)":{borderColor:Object(U.a)(e.palette.secondary.main,.5)}},groupedOutlined:{},groupedOutlinedHorizontal:{"&:not(:first-child)":{marginLeft:-1},"&:not(:last-child)":{borderRightColor:"transparent"}},groupedOutlinedVertical:{"&:not(:first-child)":{marginTop:-1},"&:not(:last-child)":{borderBottomColor:"transparent"}},groupedOutlinedPrimary:{"&:hover":{borderColor:e.palette.primary.main}},groupedOutlinedSecondary:{"&:hover":{borderColor:e.palette.secondary.main}},groupedContained:{boxShadow:"none"},groupedContainedHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderRight:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderBottom:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedPrimary:{"&:not(:last-child)":{borderColor:e.palette.primary.dark}},groupedContainedSecondary:{"&:not(:last-child)":{borderColor:e.palette.secondary.dark}}}}),{name:"MuiButtonGroup"})(Y),ee=n(1156),te=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.focusVisibleClassName,a=Object(c.a)(e,["children","classes","className","focusVisibleClassName"]);return u.createElement(S.a,Object(s.a)({className:Object(d.a)(r.root,i),focusVisibleClassName:Object(d.a)(o,r.focusVisible),ref:t},a),n,u.createElement("span",{className:r.focusHighlight}))})),ne=Object(p.a)((function(e){return{root:{display:"block",textAlign:"inherit",width:"100%","&:hover $focusHighlight":{opacity:e.palette.action.hoverOpacity},"&$focusVisible $focusHighlight":{opacity:.12}},focusVisible:{},focusHighlight:{overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}}}),{name:"MuiCardActionArea"})(te),re=u.forwardRef((function(e,t){var n=e.disableSpacing,r=void 0!==n&&n,i=e.classes,o=e.className,a=Object(c.a)(e,["disableSpacing","classes","className"]);return u.createElement("div",Object(s.a)({className:Object(d.a)(i.root,o,!r&&i.spacing),ref:t},a))})),ie=Object(p.a)({root:{display:"flex",alignItems:"center",padding:8},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiCardActions"})(re),oe=n(1157),ae=u.forwardRef((function(e,t){var n=e.action,r=e.avatar,i=e.classes,o=e.className,a=e.component,l=void 0===a?"div":a,f=e.disableTypography,p=void 0!==f&&f,h=e.subheader,g=e.subheaderTypographyProps,v=e.title,m=e.titleTypographyProps,y=Object(c.a)(e,["action","avatar","classes","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"]),b=v;null==b||b.type===V.a||p||(b=u.createElement(V.a,Object(s.a)({variant:r?"body2":"h5",className:i.title,component:"span",display:"block"},m),b));var w=h;return null==w||w.type===V.a||p||(w=u.createElement(V.a,Object(s.a)({variant:r?"body2":"body1",className:i.subheader,color:"textSecondary",component:"span",display:"block"},g),w)),u.createElement(l,Object(s.a)({className:Object(d.a)(i.root,o),ref:t},y),r&&u.createElement("div",{className:i.avatar},r),u.createElement("div",{className:i.content},b,w),n&&u.createElement("div",{className:i.action},n))})),se=Object(p.a)({root:{display:"flex",alignItems:"center",padding:16},avatar:{flex:"0 0 auto",marginRight:16},action:{flex:"0 0 auto",alignSelf:"flex-start",marginTop:-8,marginRight:-8},content:{flex:"1 1 auto"},title:{},subheader:{}},{name:"MuiCardHeader"})(ae),ce=["video","audio","picture","iframe","img"],ue=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"div":o,l=e.image,f=e.src,p=e.style,h=Object(c.a)(e,["children","classes","className","component","image","src","style"]),g=-1!==ce.indexOf(a),v=!g&&l?Object(s.a)({backgroundImage:'url("'.concat(l,'")')},p):p;return u.createElement(a,Object(s.a)({className:Object(d.a)(r.root,i,g&&r.media,-1!=="picture img".indexOf(a)&&r.img),ref:t,style:v,src:g?l||f:void 0},h),n)})),le=Object(p.a)({root:{display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},media:{width:"100%"},img:{objectFit:"cover"}},{name:"MuiCardMedia"})(ue),fe=n(41),de=n(75),pe=n(81),he=n(757),ge=u.forwardRef((function(e,t){var n=e.autoFocus,r=e.checked,i=e.checkedIcon,o=e.classes,a=e.className,l=e.defaultChecked,f=e.disabled,p=e.icon,h=e.id,g=e.inputProps,v=e.inputRef,m=e.name,y=e.onBlur,b=e.onChange,w=e.onFocus,_=e.readOnly,x=e.required,O=e.tabIndex,S=e.type,E=e.value,C=Object(c.a)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),k=Object(de.a)({controlled:r,default:Boolean(l),name:"SwitchBase",state:"checked"}),T=Object(fe.a)(k,2),j=T[0],P=T[1],I=Object(pe.a)(),R=f;I&&void 0===R&&(R=I.disabled);var A="checkbox"===S||"radio"===S;return u.createElement(he.a,Object(s.a)({component:"span",className:Object(d.a)(o.root,a,j&&o.checked,R&&o.disabled),disabled:R,tabIndex:null,role:void 0,onFocus:function(e){w&&w(e),I&&I.onFocus&&I.onFocus(e)},onBlur:function(e){y&&y(e),I&&I.onBlur&&I.onBlur(e)},ref:t},C),u.createElement("input",Object(s.a)({autoFocus:n,checked:r,defaultChecked:l,className:o.input,disabled:R,id:A&&h,name:m,onChange:function(e){var t=e.target.checked;P(t),b&&b(e,t)},readOnly:_,ref:v,required:x,tabIndex:O,type:S,value:E},g)),j?i:p)})),ve=Object(p.a)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(ge),me=Object(q.a)(u.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),ye=Object(q.a)(u.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),be=Object(q.a)(u.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),we=u.createElement(ye,null),_e=u.createElement(me,null),xe=u.createElement(be,null),Oe=u.forwardRef((function(e,t){var n=e.checkedIcon,r=void 0===n?we:n,i=e.classes,o=e.color,a=void 0===o?"secondary":o,l=e.icon,f=void 0===l?_e:l,p=e.indeterminate,h=void 0!==p&&p,g=e.indeterminateIcon,v=void 0===g?xe:g,m=e.inputProps,y=e.size,b=void 0===y?"medium":y,w=Object(c.a)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),_=h?v:f,x=h?v:r;return u.createElement(ve,Object(s.a)({type:"checkbox",classes:{root:Object(d.a)(i.root,i["color".concat(Object(Q.a)(a))],h&&i.indeterminate),checked:i.checked,disabled:i.disabled},color:a,inputProps:Object(s.a)({"data-indeterminate":h},m),icon:u.cloneElement(_,{fontSize:void 0===_.props.fontSize&&"small"===b?b:_.props.fontSize}),checkedIcon:u.cloneElement(x,{fontSize:void 0===x.props.fontSize&&"small"===b?b:x.props.fontSize}),ref:t},w))})),Se=Object(p.a)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(U.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(U.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(Oe),Ee=n(1177),Ce=n(1158),ke=n(455),Te=n(1127),je=n(27),Pe=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.disableGutters,l=void 0!==a&&a,f=e.fixed,p=void 0!==f&&f,h=e.maxWidth,g=void 0===h?"lg":h,v=Object(c.a)(e,["classes","className","component","disableGutters","fixed","maxWidth"]);return u.createElement(o,Object(s.a)({className:Object(d.a)(n.root,r,p&&n.fixed,l&&n.disableGutters,!1!==g&&n["maxWidth".concat(Object(Q.a)(String(g)))]),ref:t},v))})),Ie=Object(p.a)((function(e){return{root:Object(je.a)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"block"},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(e.breakpoints.values).reduce((function(t,n){var r=e.breakpoints.values[n];return 0!==r&&(t[e.breakpoints.up(n)]={maxWidth:r}),t}),{}),maxWidthXs:Object(je.a)({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:Object(je.a)({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:Object(je.a)({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:Object(je.a)({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:Object(je.a)({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}}),{name:"MuiContainer"})(Pe),Re={WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box"},Ae=function(e){return Object(s.a)({color:e.palette.text.primary},e.typography.body2,{backgroundColor:e.palette.background.default,"@media print":{backgroundColor:e.palette.common.white}})};var Me=Object(p.a)((function(e){return{"@global":{html:Re,"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:Object(s.a)({margin:0},Ae(e),{"&::backdrop":{backgroundColor:e.palette.background.default}})}}}),{name:"MuiCssBaseline"})((function(e){var t=e.children,n=void 0===t?null:t;return e.classes,u.createElement(u.Fragment,null,n)})),De=n(572),Ne=n(573),Le=n(574),ze=n(575),Be=n(576),Fe=n(582),We=n(106),He=n(339),Ve=n(140);var Ue=u.createContext({}),qe=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.defaultExpanded,a=void 0!==o&&o,l=e.disabled,f=void 0!==l&&l,p=e.expanded,h=e.onChange,g=e.square,v=void 0!==g&&g,m=e.TransitionComponent,y=void 0===m?Te.a:m,b=e.TransitionProps,w=Object(c.a)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),_=Object(de.a)({controlled:p,default:a,name:"ExpansionPanel",state:"expanded"}),x=Object(fe.a)(_,2),O=x[0],S=x[1],E=u.useCallback((function(e){S(!O),h&&h(e,!O)}),[O,h,S]),C=u.Children.toArray(n),k=Object(He.a)(C),T=k[0],j=k.slice(1),P=u.useMemo((function(){return{expanded:O,disabled:f,toggle:E}}),[O,f,E]);return u.createElement(Ve.a,Object(s.a)({className:Object(d.a)(r.root,i,O&&r.expanded,f&&r.disabled,!v&&r.rounded),ref:t,square:v},w),u.createElement(Ue.Provider,{value:P},T),u.createElement(y,Object(s.a)({in:O,timeout:"auto"},b),u.createElement("div",{"aria-labelledby":T.props.id,id:T.props["aria-controls"],role:"region"},j)))})),Ge=Object(p.a)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&: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"],t)},"&: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:{}}}),{name:"MuiExpansionPanel"})(qe),Ke=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.disableSpacing,o=void 0!==i&&i,a=Object(c.a)(e,["classes","className","disableSpacing"]);return u.createElement("div",Object(s.a)({className:Object(d.a)(n.root,r,!o&&n.spacing),ref:t},a))})),$e=Object(p.a)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiExpansionPanelActions"})(Ke),Ze=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=Object(c.a)(e,["classes","className"]);return u.createElement("div",Object(s.a)({className:Object(d.a)(n.root,r),ref:t},i))})),Xe=Object(p.a)((function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}}),{name:"MuiExpansionPanelDetails"})(Ze),Qe=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.expandIcon,a=e.IconButtonProps,l=e.onBlur,f=e.onClick,p=e.onFocusVisible,h=Object(c.a)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),g=u.useState(!1),v=g[0],m=g[1],y=u.useContext(Ue),b=y.disabled,w=void 0!==b&&b,_=y.expanded,x=y.toggle;return u.createElement(S.a,Object(s.a)({focusRipple:!1,disableRipple:!0,disabled:w,component:"div","aria-expanded":_,className:Object(d.a)(r.root,i,w&&r.disabled,_&&r.expanded,v&&r.focused),onFocusVisible:function(e){m(!0),p&&p(e)},onBlur:function(e){m(!1),l&&l(e)},onClick:function(e){x&&x(e),f&&f(e)},ref:t},h),u.createElement("div",{className:Object(d.a)(r.content,_&&r.expanded)},n),o&&u.createElement(he.a,Object(s.a)({className:Object(d.a)(r.expandIcon,_&&r.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},a),o))})),Ye=Object(p.a)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiExpansionPanelSummary"})(Qe),Je=n(1159),et=n(758),tt=n(1129),nt=n(456),rt=n(170),it=n(1160),ot=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.row,o=void 0!==i&&i,a=Object(c.a)(e,["classes","className","row"]);return u.createElement("div",Object(s.a)({className:Object(d.a)(n.root,r,o&&n.row),ref:t},a))})),at=Object(p.a)({root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}},{name:"MuiFormGroup"})(ot),st=n(1131),ct=n(1132),ut=n(583),lt=u.forwardRef((function(e,t){var n=e.cellHeight,r=void 0===n?180:n,i=e.children,o=e.classes,a=e.className,l=e.cols,f=void 0===l?2:l,p=e.component,h=void 0===p?"ul":p,g=e.spacing,v=void 0===g?4:g,m=e.style,y=Object(c.a)(e,["cellHeight","children","classes","className","cols","component","spacing","style"]);return u.createElement(h,Object(s.a)({className:Object(d.a)(o.root,a),ref:t,style:Object(s.a)({margin:-v/2},m)},y),u.Children.map(i,(function(e){if(!u.isValidElement(e))return null;var t=e.props.cols||1,n=e.props.rows||1;return u.cloneElement(e,{style:Object(s.a)({width:"".concat(100/f*t,"%"),height:"auto"===r?"auto":r*n+v,padding:v/2},e.props.style)})})))})),ft=Object(p.a)({root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}},{name:"MuiGridList"})(lt),dt=n(73),pt=n(89),ht=function(e,t){var n,r,i,o;e&&e.complete&&(e.width/e.height>e.parentElement.offsetWidth/e.parentElement.offsetHeight?((n=e.classList).remove.apply(n,Object(H.a)(t.imgFullWidth.split(" "))),(r=e.classList).add.apply(r,Object(H.a)(t.imgFullHeight.split(" ")))):((i=e.classList).remove.apply(i,Object(H.a)(t.imgFullHeight.split(" "))),(o=e.classList).add.apply(o,Object(H.a)(t.imgFullWidth.split(" ")))))};var gt=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=(e.cols,e.component),a=void 0===o?"li":o,l=(e.rows,Object(c.a)(e,["children","classes","className","cols","component","rows"])),f=u.useRef(null);return u.useEffect((function(){!function(e,t){e&&(e.complete?ht(e,t):e.addEventListener("load",(function(){ht(e,t)})))}(f.current,r)})),u.useEffect((function(){var e=Object(dt.a)((function(){ht(f.current,r)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[r]),u.createElement(a,Object(s.a)({className:Object(d.a)(r.root,i),ref:t},l),u.createElement("div",{className:r.tile},u.Children.map(n,(function(e){return u.isValidElement(e)?"img"===e.type||Object(pt.a)(e,["Image"])?u.cloneElement(e,{ref:f}):e:null}))))})),vt=Object(p.a)({root:{boxSizing:"border-box",flexShrink:0},tile:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}},{name:"MuiGridListTile"})(gt),mt=u.forwardRef((function(e,t){var n=e.actionIcon,r=e.actionPosition,i=void 0===r?"right":r,o=e.classes,a=e.className,l=e.subtitle,f=e.title,p=e.titlePosition,h=void 0===p?"bottom":p,g=Object(c.a)(e,["actionIcon","actionPosition","classes","className","subtitle","title","titlePosition"]),v=n&&i;return u.createElement("div",Object(s.a)({className:Object(d.a)(o.root,a,"top"===h?o.titlePositionTop:o.titlePositionBottom,l&&o.rootSubtitle),ref:t},g),u.createElement("div",{className:Object(d.a)(o.titleWrap,{left:o.titleWrapActionPosLeft,right:o.titleWrapActionPosRight}[v])},u.createElement("div",{className:o.title},f),l?u.createElement("div",{className:o.subtitle},l):null),n?u.createElement("div",{className:Object(d.a)(o.actionIcon,"left"===v&&o.actionIconActionPosLeft)},n):null)})),yt=Object(p.a)((function(e){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},titlePositionBottom:{bottom:0},titlePositionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:e.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}}),{name:"MuiGridListTileBar"})(mt),bt=n(476),wt=n(299),_t=n(36);function xt(e){var t=e.children,n=e.only,r=e.width,i=Object(_t.a)(),o=!0;if(n)if(Array.isArray(n))for(var a=0;a<n.length;a+=1){if(r===n[a]){o=!1;break}}else n&&r===n&&(o=!1);if(o)for(var s=0;s<i.breakpoints.keys.length;s+=1){var c=i.breakpoints.keys[s],u=e["".concat(c,"Up")],l=e["".concat(c,"Down")];if(u&&Object(wt.c)(c,r)||l&&Object(wt.b)(c,r)){o=!1;break}}return o?t:null}xt.propTypes={children:f.a.node,className:f.a.string,implementation:f.a.oneOf(["js","css"]),initialWidth:f.a.oneOf(["xs","sm","md","lg","xl"]),lgDown:f.a.bool,lgUp:f.a.bool,mdDown:f.a.bool,mdUp:f.a.bool,only:f.a.oneOfType([f.a.oneOf(["xs","sm","md","lg","xl"]),f.a.arrayOf(f.a.oneOf(["xs","sm","md","lg","xl"]))]),smDown:f.a.bool,smUp:f.a.bool,width:f.a.string.isRequired,xlDown:f.a.bool,xlUp:f.a.bool,xsDown:f.a.bool,xsUp:f.a.bool};var Ot=Object(wt.a)()(xt);var St=Object(p.a)((function(e){var t={display:"none"};return e.breakpoints.keys.reduce((function(n,r){return n["only".concat(Object(Q.a)(r))]=Object(je.a)({},e.breakpoints.only(r),t),n["".concat(r,"Up")]=Object(je.a)({},e.breakpoints.up(r),t),n["".concat(r,"Down")]=Object(je.a)({},e.breakpoints.down(r),t),n}),{})}),{name:"PrivateHiddenCss"})((function(e){var t=e.children,n=e.classes,r=e.className,i=e.only,o=(Object(c.a)(e,["children","classes","className","only"]),Object(_t.a)()),a=[];r&&a.push(r);for(var s=0;s<o.breakpoints.keys.length;s+=1){var l=o.breakpoints.keys[s],f=e["".concat(l,"Up")],d=e["".concat(l,"Down")];f&&a.push(n["".concat(l,"Up")]),d&&a.push(n["".concat(l,"Down")])}return i&&(Array.isArray(i)?i:[i]).forEach((function(e){a.push(n["only".concat(Object(Q.a)(e))])})),u.createElement("div",{className:a.join(" ")},t)}));var Et=function(e){var t=e.implementation,n=void 0===t?"js":t,r=e.lgDown,i=void 0!==r&&r,o=e.lgUp,a=void 0!==o&&o,l=e.mdDown,f=void 0!==l&&l,d=e.mdUp,p=void 0!==d&&d,h=e.smDown,g=void 0!==h&&h,v=e.smUp,m=void 0!==v&&v,y=e.xlDown,b=void 0!==y&&y,w=e.xlUp,_=void 0!==w&&w,x=e.xsDown,O=void 0!==x&&x,S=e.xsUp,E=void 0!==S&&S,C=Object(c.a)(e,["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]);return"js"===n?u.createElement(Ot,Object(s.a)({lgDown:i,lgUp:a,mdDown:f,mdUp:p,smDown:g,smUp:m,xlDown:b,xlUp:_,xsDown:O,xsUp:E},C)):u.createElement(St,Object(s.a)({lgDown:i,lgUp:a,mdDown:f,mdUp:p,smDown:g,smUp:m,xlDown:b,xlUp:_,xsDown:O,xsUp:E},C))},Ct=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=void 0===i?"inherit":i,a=e.component,l=void 0===a?"span":a,f=e.fontSize,p=void 0===f?"medium":f,h=Object(c.a)(e,["classes","className","color","component","fontSize"]);return u.createElement(l,Object(s.a)({className:Object(d.a)("material-icons",n.root,r,"inherit"!==o&&n["color".concat(Object(Q.a)(o))],"default"!==p&&"medium"!==p&&n["fontSize".concat(Object(Q.a)(p))]),"aria-hidden":!0,ref:t},h))}));Ct.muiName="Icon";var kt=Object(p.a)((function(e){return{root:{userSelect:"none",fontSize:e.typography.pxToRem(24),width:"1em",height:"1em",overflow:"hidden",flexShrink:0},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(36)}}}),{name:"MuiIcon"})(Ct),Tt=u.forwardRef((function(e,t){var n=e.cellHeight,r=e.children,i=e.classes,o=e.className,a=e.cols,l=void 0===a?2:a,f=e.component,p=void 0===f?"ul":f,h=e.gap,g=void 0===h?4:h,v=e.rowHeight,m=void 0===v?180:v,y=e.spacing,b=e.style,w=Object(c.a)(e,["cellHeight","children","classes","className","cols","component","gap","rowHeight","spacing","style"]),_=y||g,x=n||m;return u.createElement(p,Object(s.a)({className:Object(d.a)(i.root,o),ref:t,style:Object(s.a)({margin:-_/2},b)},w),u.Children.map(r,(function(e){if(!u.isValidElement(e))return null;var t=e.props.cols||1,n=e.props.rows||1;return u.cloneElement(e,{style:Object(s.a)({width:"".concat(100/l*t,"%"),height:"auto"===x?"auto":x*n+_,padding:_/2},e.props.style)})})))})),jt=Object(p.a)({root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}},{name:"MuiImageList"})(Tt),Pt=function(e,t){var n,r,i,o;e&&e.complete&&(e.width/e.height>e.parentElement.offsetWidth/e.parentElement.offsetHeight?((n=e.classList).remove.apply(n,Object(H.a)(t.imgFullWidth.split(" "))),(r=e.classList).add.apply(r,Object(H.a)(t.imgFullHeight.split(" ")))):((i=e.classList).remove.apply(i,Object(H.a)(t.imgFullHeight.split(" "))),(o=e.classList).add.apply(o,Object(H.a)(t.imgFullWidth.split(" ")))))};var It=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=(e.cols,e.component),a=void 0===o?"li":o,l=(e.rows,Object(c.a)(e,["children","classes","className","cols","component","rows"])),f=u.useRef(null);return u.useEffect((function(){!function(e,t){e&&(e.complete?Pt(e,t):e.addEventListener("load",(function(){Pt(e,t)})))}(f.current,r)})),u.useEffect((function(){var e=Object(dt.a)((function(){Pt(f.current,r)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[r]),u.createElement(a,Object(s.a)({className:Object(d.a)(r.root,i),ref:t},l),u.createElement("div",{className:r.item},u.Children.map(n,(function(e){return u.isValidElement(e)?"img"===e.type||Object(pt.a)(e,["Image"])?u.cloneElement(e,{ref:f}):e:null}))))})),Rt=Object(p.a)({root:{boxSizing:"border-box",flexShrink:0},item:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}},{name:"MuiImageListItem"})(It),At=u.forwardRef((function(e,t){var n=e.actionIcon,r=e.actionPosition,i=void 0===r?"right":r,o=e.classes,a=e.className,l=e.subtitle,f=e.title,p=e.position,h=void 0===p?"bottom":p,g=e.titlePosition,v=Object(c.a)(e,["actionIcon","actionPosition","classes","className","subtitle","title","position","titlePosition"]),m=g||h,y=n&&i;return u.createElement("div",Object(s.a)({className:Object(d.a)(o.root,a,l&&o.rootSubtitle,{bottom:o.positionBottom,top:o.positionTop}[m]),ref:t},v),u.createElement("div",{className:Object(d.a)(o.titleWrap,{left:o.titleWrapActionPosLeft,right:o.titleWrapActionPosRight}[y])},u.createElement("div",{className:o.title},f),l?u.createElement("div",{className:o.subtitle},l):null),n?u.createElement("div",{className:Object(d.a)(o.actionIcon,"left"===y&&o.actionIconActionPosLeft)},n):null)})),Mt=Object(p.a)((function(e){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},positionBottom:{bottom:0},positionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:e.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}}),{name:"MuiImageListItemBar"})(At),Dt=n(761),Nt=n(1161),Lt=n(760),zt=n(1134),Bt=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=void 0===i?"primary":i,a=e.value,l=e.valueBuffer,f=e.variant,p=void 0===f?"indeterminate":f,h=Object(c.a)(e,["classes","className","color","value","valueBuffer","variant"]),g=Object(_t.a)(),v={},m={bar1:{},bar2:{}};if("determinate"===p||"buffer"===p)if(void 0!==a){v["aria-valuenow"]=Math.round(a),v["aria-valuemin"]=0,v["aria-valuemax"]=100;var y=a-100;"rtl"===g.direction&&(y=-y),m.bar1.transform="translateX(".concat(y,"%)")}else 0;if("buffer"===p)if(void 0!==l){var b=(l||0)-100;"rtl"===g.direction&&(b=-b),m.bar2.transform="translateX(".concat(b,"%)")}else 0;return u.createElement("div",Object(s.a)({className:Object(d.a)(n.root,n["color".concat(Object(Q.a)(o))],r,{determinate:n.determinate,indeterminate:n.indeterminate,buffer:n.buffer,query:n.query}[p]),role:"progressbar"},v,{ref:t},h),"buffer"===p?u.createElement("div",{className:Object(d.a)(n.dashed,n["dashedColor".concat(Object(Q.a)(o))])}):null,u.createElement("div",{className:Object(d.a)(n.bar,n["barColor".concat(Object(Q.a)(o))],("indeterminate"===p||"query"===p)&&n.bar1Indeterminate,{determinate:n.bar1Determinate,buffer:n.bar1Buffer}[p]),style:m.bar1}),"determinate"===p?null:u.createElement("div",{className:Object(d.a)(n.bar,("indeterminate"===p||"query"===p)&&n.bar2Indeterminate,"buffer"===p?[n["color".concat(Object(Q.a)(o))],n.bar2Buffer]:n["barColor".concat(Object(Q.a)(o))]),style:m.bar2}))})),Ft=Object(p.a)((function(e){var t=function(t){return"light"===e.palette.type?Object(U.j)(t,.62):Object(U.b)(t,.5)},n=t(e.palette.primary.main),r=t(e.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4,"@media print":{colorAdjust:"exact"}},colorPrimary:{backgroundColor:n},colorSecondary:{backgroundColor:r},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(4,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(4,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite"},bar2Buffer:{transition:"transform .".concat(4,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0 -23px"},"50%":{opacity:0,backgroundPosition:"0 -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}}),{name:"MuiLinearProgress"})(Bt),Wt=n(1162),Ht=n(1124),Vt=n(1125),Ut=n(104),qt=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=Object(c.a)(e,["classes","className"]),o=u.useContext(Ut.a);return u.createElement("div",Object(s.a)({className:Object(d.a)(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),Gt=Object(p.a)({root:{minWidth:56,flexShrink:0},alignItemsFlexStart:{marginTop:8}},{name:"MuiListItemAvatar"})(qt),Kt=n(577),$t=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=Object(c.a)(e,["classes","className"]);return u.createElement("div",Object(s.a)({className:Object(d.a)(n.root,r),ref:t},i))}));$t.muiName="ListItemSecondaryAction";var Zt=Object(p.a)({root:{position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"}},{name:"MuiListItemSecondaryAction"})($t),Xt=n(578),Qt=n(1163),Yt=n(675),Jt=n(579),en=n(454),tn=u.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,i=e.backButton,o=e.classes,a=e.className,l=e.LinearProgressProps,f=e.nextButton,p=e.position,h=void 0===p?"bottom":p,g=e.steps,v=e.variant,m=void 0===v?"dots":v,y=Object(c.a)(e,["activeStep","backButton","classes","className","LinearProgressProps","nextButton","position","steps","variant"]);return u.createElement(Ve.a,Object(s.a)({square:!0,elevation:0,className:Object(d.a)(o.root,o["position".concat(Object(Q.a)(h))],a),ref:t},y),i,"text"===m&&u.createElement(u.Fragment,null,r+1," / ",g),"dots"===m&&u.createElement("div",{className:o.dots},Object(H.a)(new Array(g)).map((function(e,t){return u.createElement("div",{key:t,className:Object(d.a)(o.dot,t===r&&o.dotActive)})}))),"progress"===m&&u.createElement(Ft,Object(s.a)({className:o.progress,variant:"determinate",value:Math.ceil(r/(g-1)*100)},l)),f)})),nn=Object(p.a)((function(e){return{root:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:e.palette.background.default,padding:8},positionBottom:{position:"fixed",bottom:0,left:0,right:0,zIndex:e.zIndex.mobileStepper},positionTop:{position:"fixed",top:0,left:0,right:0,zIndex:e.zIndex.mobileStepper},positionStatic:{},dots:{display:"flex",flexDirection:"row"},dot:{backgroundColor:e.palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},dotActive:{backgroundColor:e.palette.primary.main},progress:{width:"50%"}}}),{name:"MuiMobileStepper"})(tn),rn=n(255),on=n(205),an=n(676),sn="undefined"!=typeof window?u.useLayoutEffect:u.useEffect;var cn=function(e){var t=e.children,n=e.defer,r=void 0!==n&&n,i=e.fallback,o=void 0===i?null:i,a=u.useState(!1),s=a[0],c=a[1];return sn((function(){r||c(!0)}),[r]),u.useEffect((function(){r&&c(!0)}),[r]),u.createElement(u.Fragment,null,s?t:o)},un=n(1136),ln=n(457),fn=n(1122),dn=n(1123),pn=Object(q.a)(u.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),hn=Object(q.a)(u.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");var gn=Object(p.a)((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,n=e.classes,r=e.fontSize;return u.createElement("div",{className:Object(d.a)(n.root,t&&n.checked)},u.createElement(pn,{fontSize:r}),u.createElement(hn,{fontSize:r,className:n.layer}))})),vn=n(82);var mn=u.createContext();function yn(){return u.useContext(mn)}var bn=u.createElement(gn,{checked:!0}),wn=u.createElement(gn,null),_n=u.forwardRef((function(e,t){var n=e.checked,r=e.classes,i=e.color,o=void 0===i?"secondary":i,a=e.name,l=e.onChange,f=e.size,p=void 0===f?"medium":f,h=Object(c.a)(e,["checked","classes","color","name","onChange","size"]),g=yn(),v=n,m=Object(vn.a)(l,g&&g.onChange),y=a;return g&&(void 0===v&&(v=g.value===e.value),void 0===y&&(y=g.name)),u.createElement(ve,Object(s.a)({color:o,type:"radio",icon:u.cloneElement(wn,{fontSize:"small"===p?"small":"medium"}),checkedIcon:u.cloneElement(bn,{fontSize:"small"===p?"small":"medium"}),classes:{root:Object(d.a)(r.root,r["color".concat(Object(Q.a)(o))]),checked:r.checked,disabled:r.disabled},name:y,checked:v,onChange:m,ref:t},h))})),xn=Object(p.a)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(U.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(U.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})(_n),On=n(31),Sn=n(135),En=u.forwardRef((function(e,t){var n=e.actions,r=e.children,i=e.name,o=e.value,a=e.onChange,l=Object(c.a)(e,["actions","children","name","value","onChange"]),f=u.useRef(null),d=Object(de.a)({controlled:o,default:e.defaultValue,name:"RadioGroup"}),p=Object(fe.a)(d,2),h=p[0],g=p[1];u.useImperativeHandle(n,(function(){return{focus:function(){var e=f.current.querySelector("input:not(:disabled):checked");e||(e=f.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var v=Object(On.a)(t,f),m=Object(Sn.a)(i);return u.createElement(mn.Provider,{value:{name:m,onChange:function(e){g(e.target.value),a&&a(e,e.target.value)},value:h}},u.createElement(at,Object(s.a)({role:"radiogroup",ref:v},l),r))})),Cn=n(77),kn=n(60),Tn=n(187),jn=n(156),Pn=n(157),In=n(33),Rn=n(64);function An(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Pn.a)(e);if(t){var i=Object(Pn.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(jn.a)(this,n)}}var Mn=function(e){Object(Tn.a)(n,e);var t=An(n);function n(){return Object(Cn.a)(this,n),t.apply(this,arguments)}return Object(kn.a)(n,[{key:"componentDidMount",value:function(){this.ref=In.findDOMNode(this),Object(Rn.a)(this.props.rootRef,this.ref)}},{key:"componentDidUpdate",value:function(e){var t=In.findDOMNode(this);e.rootRef===this.props.rootRef&&this.ref===t||(e.rootRef!==this.props.rootRef&&Object(Rn.a)(e.rootRef,null),this.ref=t,Object(Rn.a)(this.props.rootRef,this.ref))}},{key:"componentWillUnmount",value:function(){this.ref=null,Object(Rn.a)(this.props.rootRef,null)}},{key:"render",value:function(){return this.props.children}}]),n}(u.Component),Dn=n(1137),Nn=n(1128),Ln=n(1178),zn=n(1164),Bn=n(1135),Fn=u.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=e.children,a=e.classes,l=e.className,f=e.completed,p=void 0!==f&&f,h=e.connector,g=e.disabled,v=void 0!==g&&g,m=e.expanded,y=void 0!==m&&m,b=e.index,w=e.last,_=e.orientation,x=Object(c.a)(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","expanded","index","last","orientation"]),O=h?u.cloneElement(h,{orientation:_,alternativeLabel:i,index:b,active:r,completed:p,disabled:v}):null,S=u.createElement("div",Object(s.a)({className:Object(d.a)(a.root,a[_],l,i&&a.alternativeLabel,p&&a.completed),ref:t},x),O&&i&&0!==b?O:null,u.Children.map(o,(function(e){return u.isValidElement(e)?u.cloneElement(e,Object(s.a)({active:r,alternativeLabel:i,completed:p,disabled:v,expanded:y,last:w,icon:b+1,orientation:_},e.props)):null})));return O&&!i&&0!==b?u.createElement(u.Fragment,null,O,S):S})),Wn=Object(p.a)({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(Fn),Hn=Object(q.a)(u.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),Vn=Object(q.a)(u.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning"),Un=n(329),qn=u.createElement("circle",{cx:"12",cy:"12",r:"12"}),Gn=u.forwardRef((function(e,t){var n=e.completed,r=void 0!==n&&n,i=e.icon,o=e.active,a=void 0!==o&&o,s=e.error,c=void 0!==s&&s,l=e.classes;if("number"==typeof i||"string"==typeof i){var f=Object(d.a)(l.root,a&&l.active,c&&l.error,r&&l.completed);return c?u.createElement(Vn,{className:f,ref:t}):r?u.createElement(Hn,{className:f,ref:t}):u.createElement(Un.a,{className:f,ref:t},qn,u.createElement("text",{className:l.text,x:"12",y:"16",textAnchor:"middle"},i))}return i})),Kn=Object(p.a)((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$completed":{color:e.palette.primary.main},"&$active":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(Gn),$n=u.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,l=e.classes,f=e.className,p=e.completed,h=void 0!==p&&p,g=e.disabled,v=void 0!==g&&g,m=e.error,y=void 0!==m&&m,b=(e.expanded,e.icon),w=(e.last,e.optional),_=e.orientation,x=void 0===_?"horizontal":_,O=e.StepIconComponent,S=e.StepIconProps,E=Object(c.a)(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","expanded","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),C=O;return b&&!C&&(C=Kn),u.createElement("span",Object(s.a)({className:Object(d.a)(l.root,l[x],f,v&&l.disabled,o&&l.alternativeLabel,y&&l.error),ref:t},E),b||C?u.createElement("span",{className:Object(d.a)(l.iconContainer,o&&l.alternativeLabel)},u.createElement(C,Object(s.a)({completed:h,active:r,error:y,icon:b},S))):null,u.createElement("span",{className:l.labelContainer},a?u.createElement(V.a,{variant:"body2",component:"span",display:"block",className:Object(d.a)(l.label,o&&l.alternativeLabel,h&&l.completed,r&&l.active,y&&l.error)},a):null,w))}));$n.muiName="StepLabel";var Zn=Object(p.a)((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})($n),Xn=u.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=e.children,o=e.classes,a=e.className,l=e.completed,f=e.disabled,p=(e.expanded,e.icon),h=(e.last,e.optional),g=e.orientation,v=Object(c.a)(e,["active","alternativeLabel","children","classes","className","completed","disabled","expanded","icon","last","optional","orientation"]),m={active:n,alternativeLabel:r,completed:l,disabled:f,icon:p,optional:h,orientation:g},y=Object(pt.a)(i,["StepLabel"])?u.cloneElement(i,m):u.createElement(Zn,m,i);return u.createElement(S.a,Object(s.a)({focusRipple:!0,disabled:f,TouchRippleProps:{className:o.touchRipple},className:Object(d.a)(o.root,o[g],a),ref:t},v),y)})),Qn=Object(p.a)({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(Xn),Yn=u.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=void 0!==r&&r,o=e.classes,a=e.className,l=e.completed,f=e.disabled,p=(e.index,e.orientation),h=void 0===p?"horizontal":p,g=Object(c.a)(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return u.createElement("div",Object(s.a)({className:Object(d.a)(o.root,o[h],a,i&&o.alternativeLabel,n&&o.active,l&&o.completed,f&&o.disabled),ref:t},g),u.createElement("span",{className:Object(d.a)(o.line,{horizontal:o.lineHorizontal,vertical:o.lineVertical}[h])}))})),Jn=Object(p.a)((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(Yn),er=u.forwardRef((function(e,t){var n=e.active,r=(e.alternativeLabel,e.children),i=e.classes,o=e.className,a=(e.completed,e.expanded),l=e.last,f=(e.optional,e.orientation,e.TransitionComponent),p=void 0===f?Te.a:f,h=e.transitionDuration,g=void 0===h?"auto":h,v=e.TransitionProps,m=Object(c.a)(e,["active","alternativeLabel","children","classes","className","completed","expanded","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]);var y=g;return"auto"!==g||p.muiSupportAuto||(y=void 0),u.createElement("div",Object(s.a)({className:Object(d.a)(i.root,o,l&&i.last),ref:t},m),u.createElement(p,Object(s.a)({in:n||a,className:i.transition,timeout:y,unmountOnExit:!0},v),r))})),tr=Object(p.a)((function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}}),{name:"MuiStepContent"})(er),nr=u.createElement(Jn,null),rr=u.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,l=e.classes,f=e.className,p=e.connector,h=void 0===p?nr:p,g=e.nonLinear,v=void 0!==g&&g,m=e.orientation,y=void 0===m?"horizontal":m,b=Object(c.a)(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),w=u.isValidElement(h)?u.cloneElement(h,{orientation:y}):null,_=u.Children.toArray(a),x=_.map((function(e,t){var n={index:t,active:!1,completed:!1,disabled:!1};return r===t?n.active=!0:!v&&r>t?n.completed=!0:!v&&r<t&&(n.disabled=!0),u.cloneElement(e,Object(s.a)({alternativeLabel:o,connector:w,last:t+1===_.length,orientation:y},n,e.props))}));return u.createElement(Ve.a,Object(s.a)({square:!0,elevation:0,className:Object(d.a)(l.root,l[y],f,o&&l.alternativeLabel),ref:t},b),x)})),ir=Object(p.a)({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(rr),or=n(475),ar=n(47),sr=n(39),cr=n(49),ur=n(55),lr=u.forwardRef((function(e,t){var n=e.anchor,r=e.classes,i=e.className,o=e.width,a=Object(c.a)(e,["anchor","classes","className","width"]);return u.createElement("div",Object(s.a)({className:Object(d.a)(r.root,r["anchor".concat(Object(Q.a)(n))],i),ref:t,style:Object(je.a)({},Object(We.c)(n)?"width":"height",o)},a))})),fr=Object(p.a)((function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}}),{name:"PrivateSwipeArea"})(lr),dr=null;function pr(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function hr(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function gr(e,t){return e?t.clientWidth:t.clientHeight}function vr(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var mr="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),yr={enter:cr.b.enteringScreen,exit:cr.b.leavingScreen},br="undefined"!=typeof window?u.useLayoutEffect:u.useEffect,wr=u.forwardRef((function(e,t){var n=Object(_t.a)(),r=Object(or.a)({name:"MuiSwipeableDrawer",props:Object(s.a)({},e),theme:n}),i=r.anchor,o=void 0===i?"left":i,a=r.disableBackdropTransition,l=void 0!==a&&a,f=r.disableDiscovery,d=void 0!==f&&f,p=r.disableSwipeToOpen,h=void 0===p?mr:p,g=r.hideBackdrop,v=r.hysteresis,m=void 0===v?.52:v,y=r.minFlingVelocity,b=void 0===y?450:y,w=r.ModalProps,_=(w=void 0===w?{}:w).BackdropProps,x=Object(c.a)(w,["BackdropProps"]),O=r.onClose,S=r.onOpen,E=r.open,C=r.PaperProps,k=void 0===C?{}:C,T=r.SwipeAreaProps,j=r.swipeAreaWidth,P=void 0===j?20:j,I=r.transitionDuration,R=void 0===I?yr:I,A=r.variant,M=void 0===A?"temporary":A,D=Object(c.a)(r,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),N=u.useState(!1),L=N[0],z=N[1],B=u.useRef({isSwiping:null}),F=u.useRef(),W=u.useRef(),H=u.useRef(),V=u.useRef(!1),U=u.useRef();br((function(){U.current=null}),[E]);var q=u.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.mode,i=void 0===r?null:r,a=t.changeTransition,s=void 0===a||a,c=Object(We.b)(n,o),u=-1!==["right","bottom"].indexOf(c)?1:-1,f=Object(We.c)(o),d=f?"translate(".concat(u*e,"px, 0)"):"translate(0, ".concat(u*e,"px)"),p=H.current.style;p.webkitTransform=d,p.transform=d;var h="";if(i&&(h=n.transitions.create("all",Object(ur.a)({timeout:R},{mode:i}))),s&&(p.webkitTransition=h,p.transition=h),!l&&!g){var v=W.current.style;v.opacity=1-e/gr(f,H.current),s&&(v.webkitTransition=h,v.transition=h)}}),[o,l,g,n,R]),G=Object(sr.a)((function(e){if(V.current)if(dr=null,V.current=!1,z(!1),B.current.isSwiping){B.current.isSwiping=null;var t,r=Object(We.b)(n,o),i=Object(We.c)(o);t=i?pr(r,e.changedTouches):hr(r,e.changedTouches);var a=i?B.current.startX:B.current.startY,s=gr(i,H.current),c=vr(t,a,E,s),u=c/s;Math.abs(B.current.velocity)>b&&(U.current=1e3*Math.abs((s-c)/B.current.velocity)),E?B.current.velocity>b||u>m?O():q(0,{mode:"exit"}):B.current.velocity<-b||1-u>m?S():q(gr(i,H.current),{mode:"enter"})}else B.current.isSwiping=null})),K=Object(sr.a)((function(e){if(H.current&&V.current&&(null==dr||dr===B.current)){var t=Object(We.b)(n,o),r=Object(We.c)(o),i=pr(t,e.touches),a=hr(t,e.touches);if(E&&H.current.contains(e.target)&&null==dr){var s=function(e){var t=e.domTreeShapes,n=e.start,r=e.current,i=e.anchor,o={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=r>=n;"top"!==i&&"left"!==i||(t=!t);var c="left"===i||"right"===i?"x":"y",u=e[o[c]],l=u>0,f=u+e[s[c]]<e[a[c]];return t&&f||!t&&l?e:null}))}({domTreeShapes:function(e,t){for(var n=[];e&&e!==t;){var r=window.getComputedStyle(e);"absolute"===r.getPropertyValue("position")||"hidden"===r.getPropertyValue("overflow-x")?n=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&n.push(e),e=e.parentElement}return n}(e.target,H.current),start:r?B.current.startX:B.current.startY,current:r?i:a,anchor:o});if(s)return void(dr=s);dr=B.current}if(null==B.current.isSwiping){var c=Math.abs(i-B.current.startX),u=Math.abs(a-B.current.startY);c>u&&e.cancelable&&e.preventDefault();var l=r?c>u&&c>3:u>c&&u>3;if(!0===l||(r?u>3:c>3)){if(B.current.isSwiping=l,!l)return void G(e);B.current.startX=i,B.current.startY=a,d||E||(r?B.current.startX-=P:B.current.startY-=P)}}if(B.current.isSwiping){var f=gr(r,H.current),p=r?B.current.startX:B.current.startY;E&&!B.current.paperHit&&(p=Math.min(p,f));var h=vr(r?i:a,p,E,f);if(E)if(B.current.paperHit)0===h&&(B.current.startX=i,B.current.startY=a);else{if(!(r?i<f:a<f))return;B.current.paperHit=!0,B.current.startX=i,B.current.startY=a}null===B.current.lastTranslate&&(B.current.lastTranslate=h,B.current.lastTime=performance.now()+1);var g=(h-B.current.lastTranslate)/(performance.now()-B.current.lastTime)*1e3;B.current.velocity=.4*B.current.velocity+.6*g,B.current.lastTranslate=h,B.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),q(h)}}})),$=Object(sr.a)((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!E||W.current.contains(e.target)||H.current.contains(e.target))){var t=Object(We.b)(n,o),r=Object(We.c)(o),i=pr(t,e.touches),a=hr(t,e.touches);if(!E){if(h||e.target!==F.current)return;if(r){if(i>P)return}else if(a>P)return}e.muiHandled=!0,dr=null,B.current.startX=i,B.current.startY=a,z(!0),!E&&H.current&&q(gr(r,H.current)+(d?20:-P),{changeTransition:!1}),B.current.velocity=0,B.current.lastTime=null,B.current.lastTranslate=null,B.current.paperHit=!1,V.current=!0}}));u.useEffect((function(){if("temporary"===M){var e=Object(ar.a)(H.current);return e.addEventListener("touchstart",$),e.addEventListener("touchmove",K,{passive:!1}),e.addEventListener("touchend",G),function(){e.removeEventListener("touchstart",$),e.removeEventListener("touchmove",K,{passive:!1}),e.removeEventListener("touchend",G)}}}),[M,$,K,G]),u.useEffect((function(){return function(){dr===B.current&&(dr=null)}}),[]),u.useEffect((function(){E||z(!1)}),[E]);var Z=u.useCallback((function(e){W.current=In.findDOMNode(e)}),[]);return u.createElement(u.Fragment,null,u.createElement(We.a,Object(s.a)({open:!("temporary"!==M||!L)||E,variant:M,ModalProps:Object(s.a)({BackdropProps:Object(s.a)({},_,{ref:Z})},x),PaperProps:Object(s.a)({},k,{style:Object(s.a)({pointerEvents:"temporary"!==M||E?"":"none"},k.style),ref:H}),anchor:o,transitionDuration:U.current||R,onClose:O,ref:t},D)),!h&&"temporary"===M&&u.createElement(cn,null,u.createElement(fr,Object(s.a)({anchor:o,ref:F,width:P},T))))})),_r=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=void 0===i?"secondary":i,a=e.edge,l=void 0!==a&&a,f=e.size,p=void 0===f?"medium":f,h=Object(c.a)(e,["classes","className","color","edge","size"]),g=u.createElement("span",{className:n.thumb});return u.createElement("span",{className:Object(d.a)(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[l],"small"===p&&n["size".concat(Object(Q.a)(p))])},u.createElement(ve,Object(s.a)({type:"checkbox",icon:g,checkedIcon:g,classes:{root:Object(d.a)(n.switchBase,n["color".concat(Object(Q.a)(o))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},h)),u.createElement("span",{className:n.track}))})),xr=Object(p.a)((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(U.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(U.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(_r),Or=n(1165);var Sr=u.createContext(),Er=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"table":i,a=e.padding,l=void 0===a?"normal":a,f=e.size,p=void 0===f?"medium":f,h=e.stickyHeader,g=void 0!==h&&h,v=Object(c.a)(e,["classes","className","component","padding","size","stickyHeader"]),m=u.useMemo((function(){return{padding:l,size:p,stickyHeader:g}}),[l,p,g]);return u.createElement(Sr.Provider,{value:m},u.createElement(o,Object(s.a)({role:"table"===o?null:"table",ref:t,className:Object(d.a)(n.root,r,g&&n.stickyHeader)},v)))})),Cr=Object(p.a)((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Object(s.a)({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(Er);var kr=u.createContext(),Tr={variant:"body"},jr=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tbody":i,a=Object(c.a)(e,["classes","className","component"]);return u.createElement(kr.Provider,{value:Tr},u.createElement(o,Object(s.a)({className:Object(d.a)(n.root,r),ref:t,role:"tbody"===o?null:"rowgroup"},a)))})),Pr=Object(p.a)({root:{display:"table-row-group"}},{name:"MuiTableBody"})(jr),Ir=u.forwardRef((function(e,t){var n,r,i=e.align,o=void 0===i?"inherit":i,a=e.classes,l=e.className,f=e.component,p=e.padding,h=e.scope,g=e.size,v=e.sortDirection,m=e.variant,y=Object(c.a)(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),b=u.useContext(Sr),w=u.useContext(kr),_=w&&"head"===w.variant;f?(r=f,n=_?"columnheader":"cell"):r=_?"th":"td";var x=h;!x&&_&&(x="col");var O=p||(b&&b.padding?b.padding:"normal"),S=g||(b&&b.size?b.size:"medium"),E=m||w&&w.variant,C=null;return v&&(C="asc"===v?"ascending":"descending"),u.createElement(r,Object(s.a)({ref:t,className:Object(d.a)(a.root,a[E],l,"inherit"!==o&&a["align".concat(Object(Q.a)(o))],"normal"!==O&&a["padding".concat(Object(Q.a)(O))],"medium"!==S&&a["size".concat(Object(Q.a)(S))],"head"===E&&b&&b.stickyHeader&&a.stickyHeader),"aria-sort":C,role:n,scope:x},y))})),Rr=Object(p.a)((function(e){return{root:Object(s.a)({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Object(U.j)(Object(U.a)(e.palette.divider,1),.88):Object(U.b)(Object(U.a)(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(Ir),Ar=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=Object(c.a)(e,["classes","className","component"]);return u.createElement(o,Object(s.a)({ref:t,className:Object(d.a)(n.root,r)},a))})),Mr=Object(p.a)({root:{width:"100%",overflowX:"auto"}},{name:"MuiTableContainer"})(Ar),Dr={variant:"footer"},Nr=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tfoot":i,a=Object(c.a)(e,["classes","className","component"]);return u.createElement(kr.Provider,{value:Dr},u.createElement(o,Object(s.a)({className:Object(d.a)(n.root,r),ref:t,role:"tfoot"===o?null:"rowgroup"},a)))})),Lr=Object(p.a)({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(Nr),zr={variant:"head"},Br=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"thead":i,a=Object(c.a)(e,["classes","className","component"]);return u.createElement(kr.Provider,{value:zr},u.createElement(o,Object(s.a)({className:Object(d.a)(n.root,r),ref:t,role:"thead"===o?null:"rowgroup"},a)))})),Fr=Object(p.a)({root:{display:"table-header-group"}},{name:"MuiTableHead"})(Br),Wr=n(1166),Hr=n(250),Vr=n(249),Ur=u.createElement(Vr.a,null),qr=u.createElement(Hr.a,null),Gr=u.createElement(Hr.a,null),Kr=u.createElement(Vr.a,null),$r=u.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,i=e.nextIconButtonProps,o=e.onChangePage,a=void 0===o?function(){}:o,l=e.onPageChange,f=void 0===l?function(){}:l,d=e.page,p=e.rowsPerPage,h=Object(c.a)(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","onPageChange","page","rowsPerPage"]),g=Object(_t.a)();return u.createElement("div",Object(s.a)({ref:t},h),u.createElement(he.a,Object(s.a)({onClick:function(e){a(e,d-1),f(e,d-1)},disabled:0===d,color:"inherit"},n),"rtl"===g.direction?Ur:qr),u.createElement(he.a,Object(s.a)({onClick:function(e){a(e,d+1),f(e,d+1)},disabled:-1!==r&&d>=Math.ceil(r/p)-1,color:"inherit"},i),"rtl"===g.direction?Gr:Kr))})),Zr=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))},Xr=[10,25,50,100],Qr=u.forwardRef((function(e,t){var n,r=e.ActionsComponent,i=void 0===r?$r:r,o=e.backIconButtonProps,a=e.backIconButtonText,l=void 0===a?"Previous page":a,f=e.classes,p=e.className,h=e.colSpan,g=e.component,v=void 0===g?Rr:g,m=e.count,y=e.labelDisplayedRows,b=void 0===y?Zr:y,w=e.labelRowsPerPage,_=void 0===w?"Rows per page:":w,x=e.nextIconButtonProps,O=e.nextIconButtonText,S=void 0===O?"Next page":O,E=e.onChangePage,C=e.onPageChange,k=e.onChangeRowsPerPage,T=e.onRowsPerPageChange,j=e.page,P=e.rowsPerPage,I=e.rowsPerPageOptions,R=void 0===I?Xr:I,A=e.SelectProps,M=void 0===A?{}:A,D=Object(c.a)(e,["ActionsComponent","backIconButtonProps","backIconButtonText","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","nextIconButtonText","onChangePage","onPageChange","onChangeRowsPerPage","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps"]),N=k||T;v!==Rr&&"td"!==v||(n=h||1e3);var L=Object(Sn.a)(),z=Object(Sn.a)(),B=M.native?"option":Jt.a;return u.createElement(v,Object(s.a)({className:Object(d.a)(f.root,p),colSpan:n,ref:t},D),u.createElement(Wr.a,{className:f.toolbar},u.createElement("div",{className:f.spacer}),R.length>1&&u.createElement(V.a,{color:"inherit",variant:"body2",className:f.caption,id:z},_),R.length>1&&u.createElement(Dn.a,Object(s.a)({classes:{select:f.select,icon:f.selectIcon},input:u.createElement(Lt.a,{className:Object(d.a)(f.input,f.selectRoot)}),value:P,onChange:N,id:L,labelId:z},M),R.map((function(e){return u.createElement(B,{className:f.menuItem,key:e.value?e.value:e,value:e.value?e.value:e},e.label?e.label:e)}))),u.createElement(V.a,{color:"inherit",variant:"body2",className:f.caption},b({from:0===m?0:j*P+1,to:-1!==m?Math.min(m,(j+1)*P):(j+1)*P,count:-1===m?-1:m,page:j})),u.createElement(i,{className:f.actions,backIconButtonProps:Object(s.a)({title:l,"aria-label":l},o),count:m,nextIconButtonProps:Object(s.a)({title:S,"aria-label":S},x),onChangePage:E,onPageChange:C,page:j,rowsPerPage:P})))})),Yr=Object(p.a)((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),overflow:"auto","&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(Qr),Jr=u.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tr":i,a=e.hover,l=void 0!==a&&a,f=e.selected,p=void 0!==f&&f,h=Object(c.a)(e,["classes","className","component","hover","selected"]),g=u.useContext(kr);return u.createElement(o,Object(s.a)({ref:t,className:Object(d.a)(n.root,r,g&&{head:n.head,footer:n.footer}[g.variant],l&&n.hover,p&&n.selected),role:"tr"===o?null:"row"},h))})),ei=Object(p.a)((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:e.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:Object(U.a)(e.palette.secondary.main,e.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(Jr),ti=Object(q.a)(u.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),ni=u.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.children,o=e.classes,a=e.className,l=e.direction,f=void 0===l?"asc":l,p=e.hideSortIcon,h=void 0!==p&&p,g=e.IconComponent,v=void 0===g?ti:g,m=Object(c.a)(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return u.createElement(S.a,Object(s.a)({className:Object(d.a)(o.root,a,r&&o.active),component:"span",disableRipple:!0,ref:t},m),i,h&&!r?null:u.createElement(v,{className:Object(d.a)(o.icon,o["iconDirection".concat(Object(Q.a)(f))])}))})),ri=Object(p.a)((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:.5}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(ni),ii=n(1173),oi=n(1167),ai=n(1168),si=n(1130),ci=n(1121),ui=n(1148),li=n(1133);function fi(e,t){var n=t.disableHysteresis,r=void 0!==n&&n,i=t.threshold,o=void 0===i?100:i,a=t.target,s=e.current;return a&&(e.current=void 0!==a.pageYOffset?a.pageYOffset:a.scrollTop),!(!r&&void 0!==s&&e.current<s)&&e.current>o}var di="undefined"!=typeof window?window:null;function pi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getTrigger,n=void 0===t?fi:t,r=e.target,i=void 0===r?di:r,o=Object(c.a)(e,["getTrigger","target"]),a=u.useRef(),l=u.useState((function(){return n(a,o)})),f=l[0],d=l[1];return u.useEffect((function(){var e=function(){d(n(a,Object(s.a)({target:i},o)))};return e(),i.addEventListener("scroll",e),function(){i.removeEventListener("scroll",e)}}),[i,n,JSON.stringify(o)]),f}var hi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=e.breakpoint,r=void 0===n?"sm":n;return Object(wt.a)()((function(e){return u.createElement(t,Object(s.a)({fullScreen:Object(wt.b)(r,e.width)},e))}))}},gi=n(145),vi=n(372),mi={entering:{transform:"none"},entered:{transform:"none"}},yi={enter:cr.b.enteringScreen,exit:cr.b.leavingScreen},bi=u.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,i=void 0!==r&&r,o=e.in,a=e.onEnter,l=e.onEntered,f=e.onEntering,d=e.onExit,p=e.onExited,h=e.onExiting,g=e.style,v=e.timeout,m=void 0===v?yi:v,y=e.TransitionComponent,b=void 0===y?vi.a:y,w=Object(c.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),_=Object(_t.a)(),x=_.unstable_strictMode&&!i,O=u.useRef(null),S=Object(On.a)(n.ref,t),E=Object(On.a)(x?O:void 0,S),C=function(e){return function(t,n){if(e){var r=x?[O.current,t]:[t,n],i=Object(fe.a)(r,2),o=i[0],a=i[1];void 0===a?e(o):e(o,a)}}},k=C(f),T=C((function(e,t){Object(ur.b)(e);var n=Object(ur.a)({style:g,timeout:m},{mode:"enter"});e.style.webkitTransition=_.transitions.create("transform",n),e.style.transition=_.transitions.create("transform",n),a&&a(e,t)})),j=C(l),P=C(h),I=C((function(e){var t=Object(ur.a)({style:g,timeout:m},{mode:"exit"});e.style.webkitTransition=_.transitions.create("transform",t),e.style.transition=_.transitions.create("transform",t),d&&d(e)})),R=C(p);return u.createElement(b,Object(s.a)({appear:!0,in:o,nodeRef:x?O:void 0,onEnter:T,onEntered:j,onEntering:k,onExit:I,onExited:R,onExiting:P,timeout:m},w),(function(e,t){return u.cloneElement(n,Object(s.a)({style:Object(s.a)({transform:"scale(0)",visibility:"exited"!==e||o?void 0:"hidden"},mi[e],g,n.props.style),ref:E},t))}))}))},function(e,t,n){"use strict";n.r(t),n.d(t,"selectInfoResponses",(function(){return h})),n.d(t,"getCanvases",(function(){return g})),n.d(t,"getCanvas",(function(){return v})),n.d(t,"getCurrentCanvas",(function(){return m})),n.d(t,"getVisibleCanvasIds",(function(){return y})),n.d(t,"getVisibleCanvases",(function(){return b})),n.d(t,"getCanvasGroupings",(function(){return w})),n.d(t,"getCanvasGrouping",(function(){return _})),n.d(t,"getNextCanvasGrouping",(function(){return x})),n.d(t,"getPreviousCanvasGrouping",(function(){return O})),n.d(t,"getCanvasLabel",(function(){return S})),n.d(t,"getCanvasDescription",(function(){return E})),n.d(t,"getVisibleCanvasNonTiledResources",(function(){return C})),n.d(t,"getVisibleCanvasVideoResources",(function(){return k})),n.d(t,"getVisibleCanvasCaptions",(function(){return T})),n.d(t,"getVisibleCanvasAudioResources",(function(){return j})),n.d(t,"selectInfoResponse",(function(){return P}));var r=n(10),i=n(29),o=n.n(i);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"single";a(this,e),this.canvases=t,this.viewType=n,this._groupings=null}var t,n,r;return t=e,(n=[{key:"getCanvases",value:function(e){switch(this.viewType){case"book":return this.groupings()[Math.ceil(e/2)];default:return this.groupings()[e]}}},{key:"groupings",value:function(){if(this._groupings)return this._groupings;if("scroll"===this.viewType)return[this.canvases];if("book"!==this.viewType)return this.canvases.map((function(e){return[e]}));var e=[];return this.canvases.forEach((function(t,n){0!==n?n%2!=0?e.push([t]):e[Math.ceil(n/2)].push(t):e.push([t])})),this._groupings=e,e}}])&&s(t.prototype,n),r&&s(t,r),e}(),u=n(48),l=n(46),f=n(38),d=n(76),p=n(206),h=function(e){return Object(l.a)(e).infoResponses},g=Object(r.createSelector)([d.b],(function(e){return e&&e.getCanvases()||[]})),v=Object(r.createSelector)([d.b,function(e,t){return t.canvasId}],(function(e,t){if(e&&t)return e.getCanvasById(t)})),m=Object(r.createSelector)([d.b,f.e],(function(e,t){if(e&&t)return t.canvasId?e.getCanvasById(t.canvasId):e.getCanvasByIndex(0)})),y=Object(r.createSelector)([f.e],(function(e){return e&&(e.visibleCanvases||e.canvasId&&[e.canvasId])||[]})),b=Object(r.createSelector)([y,g],(function(e,t){return(t||[]).filter((function(t){return e.includes(t.id)}))})),w=Object(r.createSelector)([g,p.f],(function(e,t){return e&&new c(e,t).groupings()})),_=Object(r.createSelector)([w,function(e,t){return t.canvasId}],(function(e,t){return e&&e.find((function(e){return e.some((function(e){return e.id===t}))}))||[]})),x=Object(r.createSelector)([w,m],(function(e,t,n){if(e&&t){var r=e.findIndex((function(e){return e.some((function(e){return e.id===t.id}))}));if(!(r<0||r+1>=e.length))return e[r+1]}})),O=Object(r.createSelector)([w,m],(function(e,t,n){if(e&&t){var r=e.findIndex((function(e){return e.some((function(e){return e.id===t.id}))}));if(!(r<1))return e[r-1]}})),S=Object(r.createSelector)([v],(function(e){return e&&(e.getLabel().length>0?e.getLabel().getValue():String(e.index+1))})),E=Object(r.createSelector)([v],(function(e){return e&&e.getProperty("description")})),C=Object(r.createSelector)([b],(function(e){return o()(e.map((function(e){return new u.a(e).imageResources}))).filter((function(e){return e.getServices().length<1}))})),k=Object(r.createSelector)([b],(function(e){return o()(e.map((function(e){return new u.a(e).videoResources})))})),T=Object(r.createSelector)([b],(function(e){return o()(e.map((function(e){return new u.a(e).vttContent})))})),j=Object(r.createSelector)([b],(function(e){return o()(e.map((function(e){return new u.a(e).audioResources})))})),P=Object(r.createSelector)([function(e,t){return t.infoId},v,h],(function(e,t,n){var r=e;if(!e){if(!t)return;var i=new u.a(t).iiifImageResources[0];r=i&&i.getServices()[0].id}return r&&n[r]&&!n[r].isFetching&&n[r]}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(103);function i(e){return r.a.state.slice?e[r.a.state.slice]:e}},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(29),i=n.n(r),o=n(138),a=n.n(o),s=n(35);function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.canvas=t}var t,n,r;return t=e,(n=[{key:"id",get:function(){return this.canvas.id}},{key:"getWidth",value:function(){return this.canvas.getWidth()}},{key:"getHeight",value:function(){return this.canvas.getHeight()}},{key:"aspectRatio",get:function(){return this.canvas.getWidth()/this.canvas.getHeight()}},{key:"annotationListUris",get:function(){return i()(new Array(this.canvas.__jsonld.otherContent)).filter((function(e){return e&&("string"==typeof e||"sc:AnnotationList"===e["@type"])})).map((function(e){return"string"==typeof e?e:e["@id"]}))}},{key:"canvasAnnotationPages",get:function(){return i()(new Array(this.canvas.__jsonld.annotations)).filter((function(e){return e&&"AnnotationPage"===e.type}))}},{key:"imageResource",get:function(){return this.imageResources[0]}},{key:"imageResources",get:function(){var e=this,t=a()([this.canvas.getImages().map((function(e){return e.getResource()})),this.canvas.getContent().map((function(e){return e.getBody()}))]);return i()(t.map((function(t){switch(t.getProperty("type")){case"oa:Choice":return new s.a({images:i()([t.getProperty("default"),t.getProperty("item")]).map((function(e){return{resource:e}}))},e.canvas.options).getImages().map((function(e){return e.getResource()}));default:return t}})))}},{key:"videoResources",get:function(){var e=a()([this.canvas.getContent().map((function(e){return e.getBody()}))]);return i()(e.filter((function(e){return"Video"===e.getProperty("type")})))}},{key:"audioResources",get:function(){var e=a()([this.canvas.getContent().map((function(e){return e.getBody()}))]);return i()(e.filter((function(e){return"Sound"===e.getProperty("type")})))}},{key:"vttContent",get:function(){var e=a()([this.canvas.getContent().map((function(e){return e.getBody()}))]);return i()(e.filter((function(e){return"text/vtt"===e.getProperty("format")})))}},{key:"resourceAnnotations",get:function(){return a()([this.canvas.getImages(),this.canvas.getContent()])}},{key:"resourceAnnotation",value:function(e){return this.resourceAnnotations.find((function(t){return t.getResource().id===e||i()(new Array(t.getBody())).some((function(t){return t.id===e}))}))}},{key:"onFragment",value:function(e){var t=this.resourceAnnotation(e);if(t){var n=t.getProperty("on"),r=t.getProperty("target"),i=(n||r).match(/xywh=(.*)$/);if(i)return i[1].split(",").map((function(e){return parseInt(e,10)}))}}},{key:"iiifImageResources",get:function(){return this.imageResources.filter((function(e){return e&&e.getServices()[0]&&e.getServices()[0].id}))}},{key:"imageServiceIds",get:function(){return this.iiifImageResources.map((function(e){return e.getServices()[0].id}))}},{key:"service",get:function(){return this.canvas.__jsonld.service}},{key:"getLabel",value:function(){return this.canvas.getLabel().length>0?this.canvas.getLabel().getValue():String(this.canvas.index+1)}}])&&c(t.prototype,n),r&&c(t,r),e}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(4),i={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function a(e){return"".concat(Math.round(e),"ms")}t.a={easing:i,duration:o,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,s=void 0===n?o.standard:n,c=t.easing,u=void 0===c?i.easeInOut:c,l=t.delay,f=void 0===l?0:l;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof s?s:a(s)," ").concat(u," ").concat("string"==typeof f?f:a(f))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(248);var i=n(333),o=n(209);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(956),a=n(436),s=n(958),c=n(308),u=n(40),l=u.OrderedSet,f=u.Record,d=u.Stack,p=u.OrderedMap,h=u.List,g=f({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:d(),selection:null,treeMap:null,undoStack:d()}),v=function(){t.createEmpty=function(e){return this.createWithText("",e)},t.createWithText=function(e,n){return t.createWithContent(a.createFromText(e),n)},t.createWithContent=function(e,n){if(0===e.getBlockMap().count())return t.createEmpty(n);var r=e.getBlockMap().first().getKey();return t.create({currentContent:e,undoStack:d(),redoStack:d(),decorator:n||null,selection:c.createEmpty(r)})},t.create=function(e){var n=e.currentContent,i=r({},e,{treeMap:y(n,e.decorator),directionMap:s.getDirectionMap(n)});return new t(new g(i))},t.fromJS=function(e){return new t(new g(r({},e,{directionMap:null!=e.directionMap?p(e.directionMap):e.directionMap,inlineStyleOverride:null!=e.inlineStyleOverride?l(e.inlineStyleOverride):e.inlineStyleOverride,nativelyRenderedContent:null!=e.nativelyRenderedContent?a.fromJS(e.nativelyRenderedContent):e.nativelyRenderedContent,redoStack:null!=e.redoStack?d(e.redoStack.map((function(e){return a.fromJS(e)}))):e.redoStack,selection:null!=e.selection?new c(e.selection):e.selection,treeMap:null!=e.treeMap?p(e.treeMap).map((function(e){return h(e).map((function(e){return o.fromJS(e)}))})):e.treeMap,undoStack:null!=e.undoStack?d(e.undoStack.map((function(e){return a.fromJS(e)}))):e.undoStack,currentContent:a.fromJS(e.currentContent)})))},t.set=function(e,n){return new t(e.getImmutable().withMutations((function(t){var r=t.get("decorator"),i=r;null===n.decorator?i=null:n.decorator&&(i=n.decorator);var a=n.currentContent||e.getCurrentContent();if(i!==r){var s,c=t.get("treeMap");return s=i&&r?function(e,t,n,r,i){return n.merge(t.toSeq().filter((function(t){return r.getDecorations(t,e)!==i.getDecorations(t,e)})).map((function(t){return o.generate(e,t,r)})))}(a,a.getBlockMap(),c,i,r):y(a,i),void t.merge({decorator:i,treeMap:s,nativelyRenderedContent:null})}a!==e.getCurrentContent()&&t.set("treeMap",function(e,t,n,r){var i=e.getCurrentContent().set("entityMap",n),a=i.getBlockMap();return e.getImmutable().get("treeMap").merge(t.toSeq().filter((function(e,t){return e!==a.get(t)})).map((function(e){return o.generate(i,e,r)})))}(e,a.getBlockMap(),a.getEntityMap(),i)),t.merge(n)})))};var e=t.prototype;function t(e){i(this,"_immutable",void 0),this._immutable=e}return e.toJS=function(){return this.getImmutable().toJS()},e.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.getSelection=function(){return this.getImmutable().get("selection")},e.getDecorator=function(){return this.getImmutable().get("decorator")},e.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},t.setInlineStyleOverride=function(e,n){return t.set(e,{inlineStyleOverride:n})},e.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r>0)return i.getInlineStyleAt(r-1);if(i.getLength())return i.getInlineStyleAt(0);return w(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r<i.getLength())return i.getInlineStyleAt(r);if(r>0)return i.getInlineStyleAt(r-1);return w(e,n)}(t,n)},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},t.acceptSelection=function(e,t){return m(e,t,!1)},t.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),m(e,t,!0)},t.moveSelectionToEnd=function(e){var n=e.getCurrentContent().getLastBlock(),r=n.getKey(),i=n.getLength();return t.acceptSelection(e,new c({anchorKey:r,anchorOffset:i,focusKey:r,focusOffset:i,isBackward:!1}))},t.moveFocusToEnd=function(e){var n=t.moveSelectionToEnd(e);return t.forceSelection(n,n.getSelection())},t.push=function(e,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===n)return e;var o=s.getDirectionMap(n,e.getDirectionMap());if(!e.getAllowUndo())return t.set(e,{currentContent:n,directionMap:o,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:i,inlineStyleOverride:null});var a=e.getSelection(),c=e.getCurrentContent(),u=e.getUndoStack(),l=n;a!==c.getSelectionAfter()||b(e,r)?(u=u.push(c),l=l.set("selectionBefore",a)):"insert-characters"!==r&&"backspace-character"!==r&&"delete-character"!==r||(l=l.set("selectionBefore",c.getSelectionBefore()));var f=e.getInlineStyleOverride(),p=["adjust-depth","change-block-type","split-block"];-1===p.indexOf(r)&&(f=null);var h={currentContent:l,directionMap:o,undoStack:u,redoStack:d(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:i,inlineStyleOverride:f};return t.set(e,h)},t.undo=function(e){if(!e.getAllowUndo())return e;var n=e.getUndoStack(),r=n.peek();if(!r)return e;var i=e.getCurrentContent(),o=s.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:o,undoStack:n.shift(),redoStack:e.getRedoStack().push(i),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:i.getSelectionBefore()})},t.redo=function(e){if(!e.getAllowUndo())return e;var n=e.getRedoStack(),r=n.peek();if(!r)return e;var i=e.getCurrentContent(),o=s.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:o,undoStack:e.getUndoStack().push(i),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},t}();function m(e,t,n){return v.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function y(e,t){return e.getBlockMap().map((function(n){return o.generate(e,n,t)})).toOrderedMap()}function b(e,t){return t!==e.getLastChangeType()||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}function w(e,t){var n=e.getBlockMap().reverse().skipUntil((function(e,n){return n===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return n?n.getInlineStyleAt(n.getLength()-1):l()}e.exports=v},function(e,t,n){"use strict";n.r(t);var r=n(140);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(344),i="object"==typeof self&&self&&self.Object===Object&&self,o=r.a||i||Function("return this")();t.a=o},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r=function(e){return e.scrollTop};function i(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(579);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return $})),n.d(t,"b",(function(){return Q})),n.d(t,"c",(function(){return ve})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return ye})),n.d(t,"f",(function(){return me})),n.d(t,"g",(function(){return p}));var r=n(1),i=n(186),o=(n(243),n(60)),a=n(95),s=n(53),c=n(58),u={}.constructor;function l(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(l);if(e.constructor!==u)return e;var t={};for(var n in e)t[n]=l(e[n]);return t}function f(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=l(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var d=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},p=function(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=d(e[r]," ");else n=d(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n};function h(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function g(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function v(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=h(n),c=s.linebreak,u=s.space;if(e&&o++,a)if(Array.isArray(a))for(var l=0;l<a.length;l++){var f=a[l];for(var d in f){var v=f[d];null!=v&&(r&&(r+=c),r+=g(d+":"+u+p(v)+";",o))}}else for(var m in a){var y=a[m];null!=y&&(r&&(r+=c),r+=g(m+":"+u+p(y)+";",o))}for(var b in t){var w=t[b];null!=w&&"fallbacks"!==b&&(r&&(r+=c),r+=g(b+":"+u+p(w)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+c+r+c),g(""+e+u+"{"+r,--o)+g("}",o)):r}var m=/([[\].#*$><+~=|^:(),"'`\s])/g,y="undefined"!=typeof CSS&&CSS.escape,b=function(e){return y?y(e):e.replace(m,"\\$1")},w=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var c=this.options.sheet;return c&&c.attached,this},e}(),_=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,c=r.sheet,u=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u(Object(s.a)(Object(s.a)(i)),c),i.selectorText="."+b(i.id)),i}Object(a.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=p(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return v(this.selectorText,this.style,n)},Object(o.a)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(w),x={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new _(e,t,n)}},O={indent:1,children:!0},S=/@([\w-]+)/,E=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var i=e.match(S);for(var o in this.at=i?i[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new $(Object(r.a)({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=O);var t=h(e).linebreak;if(null==e.indent&&(e.indent=O.indent),null==e.children&&(e.children=O.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),C=/@media|@supports\s+/,k={onCreateRule:function(e,t,n){return C.test(e)?new E(e,t,n):null}},T={indent:1,children:!0},j=/@keyframes\s+([\w-]+)/,P=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=e.match(j);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,s=n.generateId;for(var c in this.id=!1===o?this.name:b(s(this,a)),this.rules=new $(Object(r.a)({},n,{parent:this})),t)this.rules.add(c,t[c],Object(r.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=T);var t=h(e).linebreak;if(null==e.indent&&(e.indent=T.indent),null==e.children&&(e.children=T.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),I=/@keyframes\s+/,R=/\$([\w-]+)/g,A=function(e,t){return"string"==typeof e?e.replace(R,(function(e,n){return n in t?t[n]:e})):e},M=function(e,t,n){var r=e[t],i=A(r,n);i!==r&&(e[t]=i)},D={onCreateRule:function(e,t,n){return"string"==typeof e&&I.test(e)?new P(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&M(e,"animation-name",n.keyframes),"animation"in e&&M(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return A(e,r.keyframes);default:return e}}},N=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return v(this.key,this.style,n)},t}(w),L={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new N(e,t,n):null}},z=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=h(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=v(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return v(this.at,this.style,e)},e}(),B=/@font-face/,F={onCreateRule:function(e,t,n){return B.test(e)?new z(e,t,n):null}},W=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return v(this.key,this.style,e)},e}(),H={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new W(e,t,n):null}},V=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),U={"@charset":!0,"@import":!0,"@namespace":!0},q=[x,k,D,L,F,H,{onCreateRule:function(e,t,n){return e in U?new V(e,t,n):null}}],G={process:!0},K={force:!0,process:!0},$=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var i=this.options,o=i.parent,a=i.sheet,s=i.jss,c=i.Renderer,u=i.generateId,l=i.scoped,d=Object(r.a)({classes:this.classes,parent:o,sheet:a,jss:s,Renderer:c,generateId:u,scoped:l,name:e,keyframes:this.keyframes,selector:void 0},n),p=e;e in this.raw&&(p=e+"-d"+this.counter++),this.raw[p]=t,p in this.classes&&(d.selector="."+b(this.classes[p]));var h=f(p,t,d);if(!h)return null;this.register(h);var g=void 0===d.index?this.index.length:d.index;return this.index.splice(g,0,h),h},t.replace=function(e,t,n){var i=this.get(e),o=this.index.indexOf(i);i&&this.remove(i);var a=n;return-1!==o&&(a=Object(r.a)({},n,{index:o})),this.add(e,t,a)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof _?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof P&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof _?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof P&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=G);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var c in o.onProcessStyle(t.style,t,a),t.style){var u=t.style[c];u!==s[c]&&t.prop(c,u,K)}for(var l in s){var f=t.style[l],d=s[l];null==f&&f!==d&&t.prop(l,null,K)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=h(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),Z=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Object(r.a)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new $(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),X=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Q=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(c.a)(t,["attached"]),i=h(r).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+=i),o+=s.toString(r))}return o},Object(o.a)(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Y=new Q,J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),ee="2f1acc6c3a606b082e5eef5e54414ffb";null==J[ee]&&(J[ee]=0);var te=J[ee]++,ne=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+te+i+t:o+n.key+"-"+te+(i?"-"+i:"")+"-"+t}},re=function(e){var t;return function(){return t||(t=e()),t}},ie=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},oe=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=p(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0},ae=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},se=function(e,t){return e.selectorText=t,e.selectorText===t},ce=re((function(){return document.querySelector("head")}));function ue(e){var t=Y.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(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}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=ce(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var le=re((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),fe=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},de=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},pe=function(){function e(e){this.getPropertyValue=ie,this.setProperty=oe,this.removeProperty=ae,this.setSelector=se,this.hasInsertedRules=!1,this.cssRules=[],e&&Y.add(e),this.sheet=e;var t,n=this.sheet?this.sheet.options:{},r=n.media,i=n.meta,o=n.element;this.element=o||((t=document.createElement("style")).textContent="\n",t),this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),i&&this.element.setAttribute("data-meta",i);var a=le();a&&this.element.setAttribute("nonce",a)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=ue(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=de(n,t);if(!1===(i=fe(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=de(n,t),c=fe(n,a,s);return!1!==c&&(this.hasInsertedRules=!0,this.refCssRule(e,s,c),c)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Z&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),he=0,ge=function(){function e(e){this.id=he++,this.version="10.9.0",this.plugins=new X,this.options={id:{minify:!1},createGenerateId:ne,Renderer:i.a?pe:null,plugins:[]},this.generateId=ne({minify:!1});for(var t=0;t<q.length;t++)this.plugins.use(q[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Object(r.a)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Y.index?0:Y.index+1);var i=new Z(e,Object(r.a)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(i),i},t.removeStyleSheet=function(e){return e.detach(),Y.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var i=Object(r.a)({},n,{name:e,jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var o=f(e,t,i);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),ve=function(e){return new ge(e)},me="object"==typeof CSS&&null!=CSS&&"number"in CSS;function ye(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=ye(r);o&&(t||(t={}),t[n]=o)}}return t}
/**
* A better abstraction over CSS.
*
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
* @website https://github.com/cssinjs/jss
* @license MIT
*/ve()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.r(t);var r=n(571);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(9),o=n(1175),a=n(5),s=n(345),c=n(8),u=n(0),l=n.n(u),f=n(531),d=n(26),p=n(148),h=n(206),g=n(88),v=n(122),m=n.n(v),y=n(684),b=n.n(y),w=n(685),_=n.n(w),x=n(140),O=n(96),S=n(1166),E=n(219),C=n(34),k=n(14);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var i=N(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return D(this,n)}}function D(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(o,e);var t,n,r,i=M(o);function o(){return I(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"openInNewStyle",value:function(){return"rtl"===this.props.direction?{transform:"scale(-1, 1)"}:{}}},{key:"resizeHandles",value:function(){var e=this.props,t=e.direction,n=e.position,r={ltr:{default:"left",opposite:"right"},rtl:{default:"right",opposite:"left"}},i={bottom:!1,bottomLeft:!1,bottomRight:!1,left:!1,right:!1,top:!1,topLeft:!1,topRight:!1};return"right"===n||"far-right"===n?j(j({},i),{},P({},r[t].default,!0)):"left"===n?j(j({},i),{},P({},r[t].opposite,!0)):"bottom"===n||"far-bottom"===n?j(j({},i),{},{top:!0}):i}},{key:"render",value:function(){var e=this.props,t=e.ariaLabel,n=e.classes,r=e.paperClassName,i=e.onCloseClick,o=e.updateCompanionWindow,a=e.isDisplayed,s=e.position,c=e.t,u=e.title,f=e.children,d=e.titleControls,p=e.size,h=e.defaultSidebarPanelWidth,g=e.defaultSidebarPanelHeight,v="bottom"===s||"far-bottom"===s,y=l.a.Children.map(f,(function(e){return e?l.a.cloneElement(e,{parentactions:{closeCompanionWindow:i}}):null}));return l.a.createElement(x.a,{className:[n.root,"bottom"===s?n.horizontal:n.vertical,n["companionWindow-".concat(s)],Object(k.a)("companion-window-".concat(s)),r].join(" "),style:{display:a?null:"none",order:"left"===s?-1:null},square:!0,component:"aside","aria-label":t||u},l.a.createElement(E.a,{className:[n.rnd],style:{display:"flex",position:"relative"},default:{height:v?g:"100%",width:v?"auto":h},disableDragging:!0,enableResizing:this.resizeHandles(),minHeight:50,minWidth:"left"===s?235:100},l.a.createElement(S.a,{className:[n.toolbar,n.companionWindowHeader,p.width<370?n.small:null,Object(k.a)("companion-window-header")].join(" "),disableGutters:!0},l.a.createElement(O.a,{variant:"h3",className:n.windowSideBarTitle},u),"left"===s?o&&l.a.createElement(C.a,{"aria-label":c("openInCompanionWindow"),onClick:function(){o({position:"right"})}},l.a.createElement(b.a,{style:this.openInNewStyle()})):l.a.createElement(l.a.Fragment,null,o&&l.a.createElement(C.a,{"aria-label":c("bottom"===s?"moveCompanionWindowToRight":"moveCompanionWindowToBottom"),className:n.positionButton,onClick:function(){o({position:"bottom"===s?"right":"bottom"})}},l.a.createElement(_.a,null)),l.a.createElement(C.a,{"aria-label":c("closeCompanionWindow"),className:n.closeButton,onClick:i},l.a.createElement(m.a,null))),d&&l.a.createElement("div",{className:[n.titleControls,v?n.companionWindowTitleControlsBottom:n.companionWindowTitleControls,Object(k.a)("companion-window-title-controls")].join(" ")},d)),l.a.createElement(x.a,{className:[n.content,Object(k.a)("scrollto-scrollable")].join(" "),elevation:0},y)))}}])&&R(t.prototype,n),r&&R(t,r),o}(u.Component);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}L.defaultProps={ariaLabel:void 0,children:void 0,defaultSidebarPanelHeight:201,defaultSidebarPanelWidth:235,isDisplayed:!1,onCloseClick:function(){},paperClassName:"",position:null,size:{},t:function(e){return e},title:null,titleControls:null,updateCompanionWindow:void 0};var W=Object(r.compose)((function(e){return Object(u.forwardRef)((function(t,n){return l.a.createElement(e,Object.assign({innerRef:n},t))}))}),Object(o.a)(),Object(a.a)((function(e){return{closeButton:{order:4},"companionWindow-bottom":{borderTop:"0.5px solid ".concat(e.palette.divider)},"companionWindow-left":{borderRight:"0.5px solid ".concat(e.palette.divider)},"companionWindow-right":{borderLeft:"0.5px solid ".concat(e.palette.divider)},companionWindowHeader:{flexWrap:"wrap"},companionWindowTitleControls:{flexGrow:1,order:1e3},companionWindowTitleControlsBottom:{order:"unset"},content:{overflowY:"auto",wordBreak:"break-word"},horizontal:{},positionButton:{marginLeft:-16,order:-100,width:24},rnd:{display:"flex",flexDirection:"column",minHeight:0},root:{boxShadow:"none",boxSizing:"border-box",display:"flex",flexDirection:"column",minHeight:0},small:{},titleControls:{alignItems:"center",display:"flex",flexFlow:"row wrap",minHeight:48,order:3},toolbar:{"&$small":{"& $closeButton":{order:"unset"},"& $titleControls":{order:"unset"}},alignItems:"flex-start",background:e.palette.shades.light,justifyContent:"space-between",minHeight:"max-content",paddingLeft:e.spacing(2)},vertical:{},windowSideBarTitle:B(B({},e.typography.subtitle1),{},{alignSelf:"center",flexGrow:1,width:160})}})),Object(s.withSize)(),Object(i.b)((function(e,t){var n=t.id,r=t.windowId,i=Object(p.getCompanionWindow)(e,{companionWindowId:n}),o=Object(h.c)(e,{windowId:r}),a=o.defaultSidebarPanelHeight,s=o.defaultSidebarPanelWidth;return B(B({},i),{},{defaultSidebarPanelHeight:a,defaultSidebarPanelWidth:s,direction:Object(g.h)(e),isDisplayed:i&&i.content&&i.content.length>0})}),(function(e,t){var n=t.windowId,r=t.id;return{onCloseClick:function(){return e(f.c(n,r))},updateCompanionWindow:function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return e(f.e.apply(d,[n,r].concat(i)))}}})),Object(c.a)("CompanionWindow"));t.default=W(L)},function(e,t,n){var r=n(143),i=n(301),o=n(1065),a=n(200),s=n(233),c=n(1067),u=n(445),l=n(424),f=u((function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,(function(t){return t=a(t,e),u||(u=t.length>1),t})),s(e,l(e),n),u&&(n=i(n,7,c));for(var f=t.length;f--;)o(n,t[f]);return n}));e.exports=f},function(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.r(t);var r=n(329);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";e.exports=n(853)},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";n(1);var r=n(136);t.a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=function(e){return t.reduce((function(t,n){var i=n(e);return i?Object(r.a)(t,i):t}),{})};return i.propTypes={},i.filterProps=t.reduce((function(e,t){return e.concat(t.filterProps)}),[]),i}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToRgb=o,t.rgbToHex=function(e){if(0===e.indexOf("#"))return e;var t=s(e).values;return"#".concat(t.map((function(e){return 1===(t=e.toString(16)).length?"0".concat(t):t;var t})).join(""))},t.hslToRgb=a,t.decomposeColor=s,t.recomposeColor=c,t.getContrastRatio=function(e,t){var n=u(e),r=u(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.getLuminance=u,t.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return u(e)>.5?f(e,t):d(e,t)},t.fade=function(e,t){0;return l(e,t)},t.alpha=l,t.darken=f,t.lighten=d;var r=n(25);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function a(e){var t=(e=s(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(u+="a",l.push(t[3])),c({type:u,values:l})}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(o(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error((0,r.formatMuiErrorMessage)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function c(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function u(e){var t="hsl"===(e=s(e)).type?s(a(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){return e=s(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,c(e)}function f(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return c(e)}function d(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return c(e)}},function(e,t,n){"use strict";var r=n(5),i=n(0),o=n.n(i),a=n(465),s=n.n(a),c=n(14),u={iiif:{ALLOWED_ATTR:["href","src","alt"],ALLOWED_TAGS:["a","b","br","i","img","p","span"]},liberal:{},mirador2:{ALLOWED_ATTR:["href","target","src","alt","dir"],ALLOWED_TAGS:["a","b","br","i","img","p","span","strong","em","ul","ol","li"]},noHtml:{ALLOWED_TAGS:[]}};function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(a,e);var t,n,r,i=p(a);function a(){return l(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.htmlString,r=e.ruleSet;return s.a.addHook("afterSanitizeAttributes",(function(e){"target"in e&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer"))})),o.a.createElement("span",{className:[t.root,Object(c.a)("third-party-html")].join(" "),dangerouslySetInnerHTML:{__html:s.a.sanitize(n,u[r])}})}}])&&f(t.prototype,n),r&&f(t,r),a}(i.Component);v.defaultProps={classes:{}};t.a=Object(r.a)((function(e){return{root:{"& a":{color:e.palette.primary.main,textDecoration:"underline"}}}}))(v)},function(e,t,n){"use strict";function r(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this,s=function(){e.apply(a,i)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(11);n.d(t,"capitalize",(function(){return r.a}));var i=n(82);n.d(t,"createChainedFunction",(function(){return i.a}));var o=n(43);n.d(t,"createSvgIcon",(function(){return o.a}));var a=n(73);n.d(t,"debounce",(function(){return a.a}));var s=n(79);n.d(t,"deprecatedPropType",(function(){return s.a}));var c=n(89);n.d(t,"isMuiElement",(function(){return c.a}));var u=n(47);n.d(t,"ownerDocument",(function(){return u.a}));var l=n(149);n.d(t,"ownerWindow",(function(){return l.a}));var f=n(417);n.d(t,"requirePropFactory",(function(){return f.a}));var d=n(64);n.d(t,"setRef",(function(){return d.a}));var p=n(230);n.d(t,"unsupportedProp",(function(){return p.a}));var h=n(75);n.d(t,"useControlled",(function(){return h.a}));var g=n(39);n.d(t,"useEventCallback",(function(){return g.a}));var v=n(31);n.d(t,"useForkRef",(function(){return v.a}));var m=n(135);n.d(t,"unstable_useId",(function(){return m.a}));var y=n(118);n.d(t,"useIsFocusVisible",(function(){return y.a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){var t=e.controlled,n=e.default,i=(e.name,e.state,r.useRef(void 0!==t).current),o=r.useState(n),a=o[0],s=o[1];return[i?t:a,r.useCallback((function(e){i||s(e)}),[])]}},function(e,t,n){"use strict";n.d(t,"g",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return l})),n.d(t,"e",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return p}));var r=n(10),i=n(35),o=n(90),a=n(38),s=Object(r.createSelector)([o.q],(function(e){if(!e||!e.getTopRanges)return null;var t=e.getTopRanges(),n=[];return 0===t.filter((function(e){return"top"===e.getProperty("viewingHint")})).length&&1===t.length&&(n=t[0].getRanges().filter((function(e){return"sequence"===e.getBehavior()}))),[].concat(e.getSequences(),n)})),c=Object(r.createSelector)([s,a.e,function(e,t){return t.sequenceId}],(function(e,t,n){if(!e)return null;if(n||t&&t.sequenceId){var r=e.find((function(e){return e.id===(n||t.sequenceId)}));if(r)return r}return e[0]})),u=Object(r.createSelector)([a.e,c],(function(e,t){return(t&&e&&e.canvasId&&t.getCanvasById(e.canvasId)||{}).index||0})),l=Object(r.createSelector)([c,o.q],(function(e,t){if(!t)return null;var n=e&&e.getViewingHint()||t.getViewingHint();return n||null})),f=Object(r.createSelector)([a.e,c,o.q],(function(e,t,n){var r=e&&e.viewingDirection||t&&t.getViewingDirection()||n&&n.getViewingDirection();return r||null})),d=Object(r.createSelector)([c,o.q],(function(e,t){if(!t||!e)return[];var n=e&&e.getProperty("behavior");if(n)return Array.isArray(n)?n:[n];var r=t.getProperty("behavior");return r?Array.isArray(r)?r:[r]:[]})),p=Object(r.createSelector)([c,o.q],(function(e,t){return e&&e.getProperty("type")&&e.isRange()?e.getTree(new i.c("root")):t&&t.getDefaultTree()}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(533),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"createGenerateClassName",(function(){return r.a})),n.d(t,"createStyles",(function(){return i.a})),n.d(t,"getThemeProps",(function(){return o.a})),n.d(t,"jssPreset",(function(){return a.a})),n.d(t,"makeStyles",(function(){return s.a})),n.d(t,"mergeClasses",(function(){return c.a})),n.d(t,"ServerStyleSheets",(function(){return u.a})),n.d(t,"styled",(function(){return l.a})),n.d(t,"StylesProvider",(function(){return f.b})),n.d(t,"sheetsManager",(function(){return d.b})),n.d(t,"StylesContext",(function(){return d.a})),n.d(t,"ThemeProvider",(function(){return p.a})),n.d(t,"useTheme",(function(){return h.a})),n.d(t,"withStyles",(function(){return g.a})),n.d(t,"withTheme",(function(){return v.a})),n.d(t,"withThemeCreator",(function(){return v.b}));var r=n(756),i=n(1149),o=n(475),a=n(762),s=n(763),c=n(1147),u=n(1150),l=n(1126),f=n(242),d=n(240),p=n(1151),h=n(223),g=n(1119),v=n(290)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(125);function o(){return r.useContext(i.a)}},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(847),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=c(t),g=c(n),v=0;v<a.length;++v){var m=a[v];if(!(o[m]||r&&r[m]||g&&g[m]||s&&s[m])){var y=d(n,m);try{u(t,m,y)}catch(e){}}}}return t}},function(e,t,n){"use strict";function r(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<o.length;c++){var u=o[c];if(!s(u))return!1;var l=e[u],f=t[u];if(!1===(i=n?n.call(r,l,f,u):void 0)||void 0===i&&l!==f)return!1}return!0}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(98),i=n(946),o=n(947),a=n(949),s=n(306),c=n(40),u=n(952),l=n(953),f=n(42),d=n(612),p=n(610),h=n(954),g=n(955),v=c.OrderedSet,m={replaceText:function(e,t,n,i,o){var a=p(e,t),s=h(a,t),c=r.create({style:i||v(),entity:o||null});return l(s,s.getSelectionAfter(),n,c)},insertText:function(e,t,n,r,i){return t.isCollapsed()||f(!1),m.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=s(e,t),i=m.removeRange(e,t,"backward");return m.replaceWithFragment(i,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",i=p(e,t),o=h(i,t);return u(o,o.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var r,i,o,s;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),i=t.getFocusKey(),o=e.getBlockForKey(r),s=e.getBlockForKey(i);var c=t.getStartOffset(),u=t.getEndOffset(),l=o.getEntityAt(c),f=s.getEntityAt(u-1);if(r===i&&l&&l===f){var d=a(e.getEntityMap(),o,s,t,n);return h(e,d)}var g=p(e,t);return h(g,t)},splitBlock:function(e,t){var n=p(e,t),r=h(n,t);return g(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return i.add(e,t,n)},removeInlineStyle:function(e,t,n){return i.remove(e,t,n)},setBlockType:function(e,t,n){return d(e,t,(function(e){return e.merge({type:n,depth:0})}))},setBlockData:function(e,t,n){return d(e,t,(function(e){return e.merge({data:n})}))},mergeBlockData:function(e,t,n){return d(e,t,(function(e){return e.merge({data:e.getData().merge(n)})}))},applyEntity:function(e,t,n){var r=p(e,t);return o(r,t,n)}};e.exports=m},function(e,t,n){"use strict";e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},function(e,t,n){"use strict";var r=n(965),i=n(968),o=n(969),a=n(970);function s(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var o=n.slice(e.length);return!!t&&(o=r?r(o):o,i.contains(o,t))}function c(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}var u={isBrowser:function(e){return s(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return s(r.browserArchitecture,null,e)},isDevice:function(e){return s(r.deviceName,null,e)},isEngine:function(e){return s(r.engineName,r.engineVersion,e)},isPlatform:function(e){return s(r.platformName,r.platformFullVersion,e,c)},isPlatformArchitecture:function(e){return s(r.platformArchitecture,null,e)}};e.exports=o(u,a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return h})),n.d(t,"i",(function(){return g})),n.d(t,"b",(function(){return v})),n.d(t,"h",(function(){return m})),n.d(t,"e",(function(){return y}));var r=n(10),i=n(120),o=n.n(i),a=n(46),s=n(38);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return Object(a.a)(e||{}).config||{}}function f(e){var t=l(e).export;return Object.entries(t).reduce((function(t,n){var r=c(n,2),i=r[0],o=r[1];return!0===o?t[i]=e[i]:o.filter&&(t[i]=Object.entries(e[i]).filter(o.filter).reduce((function(e,t){var n=c(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})),t}),{})}var d=Object(r.createSelector)([l],(function(e){var t=e.availableLanguages,n=e.language;return Object.keys(t).map((function(e){return{current:e===n,label:t[e],locale:e}}))})),p=Object(r.createSelector)([s.i,l],(function(e,t){return void 0===e.showZoomControls?t.workspace.showZoomControls:e.showZoomControls})),h=Object(r.createSelector)([l],(function(e){var t=e.theme,n=e.themes,r=e.selectedTheme;return o()(t,n[r]||{})})),g=Object(r.createSelector)([l],(function(e){var t=e.themes;return Object.keys(t)})),v=Object(r.createSelector)([l],(function(e){return e.id})),m=Object(r.createSelector)([l],(function(e){return e.theme.direction||"ltr"})),y=Object(r.createSelector)([l],(function(e){return e.requests||{}}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},function(e,t,n){"use strict";n.d(t,"m",(function(){return v})),n.d(t,"d",(function(){return m})),n.d(t,"q",(function(){return b})),n.d(t,"f",(function(){return w})),n.d(t,"g",(function(){return x})),n.d(t,"i",(function(){return O})),n.d(t,"e",(function(){return S})),n.d(t,"k",(function(){return E})),n.d(t,"j",(function(){return C})),n.d(t,"s",(function(){return k})),n.d(t,"t",(function(){return T})),n.d(t,"n",(function(){return j})),n.d(t,"o",(function(){return P})),n.d(t,"c",(function(){return I})),n.d(t,"p",(function(){return R})),n.d(t,"a",(function(){return A})),n.d(t,"h",(function(){return M})),n.d(t,"r",(function(){return N})),n.d(t,"l",(function(){return L})),n.d(t,"b",(function(){return z}));var r=n(10),i=n(673),o=n.n(i),a=n(35),s=n(327),c=n(110),u=n(148),l=n(38),f=n(88);function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(e){var n=a.d.parseManifest(e,t?{locale:t}:void 0);return"function"!=typeof n.getSequences&&(n.getSequences=function(){return[]}),n}}var g=Object(r.createSelector)([u.getCompanionWindow,f.a],(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.locale||t.language})),v=Object(r.createSelector)([l.b],(function(e){return e||{missing:!0}})),m=Object(r.createSelector)([l.b],(function(e){return e&&e.error})),y=o()(l.b,g,(function(e,t){return e&&h(e.json,t)}))((function(e,t){var n=t.companionWindowId;return[t.manifestId,t.windowId,g(e,{companionWindowId:n})].join(" - ")})),b=Object(r.createSelector)(y,(function(e,t){return t.json}),g,(function(e,t,n){return t&&h(t,n)||e})),w=Object(r.createSelector)([b],(function(e){return e&&e.options&&e.options.locale&&e.options.locale.replace(/-.*$/,"")}));function _(e){return Object(r.createSelector)([b],(function(t){return t&&t.getProperty(e)}))}var x=Object(r.createSelector)([b],(function(e){return e&&e.getLogo()})),O=Object(r.createSelector)([_("provider"),w],(function(e,t){return e&&e[0].label&&a.b.parse(e[0].label,t).getValue()})),S=Object(r.createSelector)([_("homepage"),w],(function(e,t){return e&&Object(c.a)(e).map((function(e){return{label:a.b.parse(e.label,t).getValue(),value:e.id||e["@id"]}}))})),E=Object(r.createSelector)([b],(function(e){return e&&e.getRenderings().map((function(e){return{label:e.getLabel().getValue(),value:e.id}}))})),C=Object(r.createSelector)([_("seeAlso"),w],(function(e,t){return e&&Object(c.a)(e).map((function(e){return{format:e.format,label:a.b.parse(e.label,t).getValue(),value:e.id||e["@id"]}}))})),k=Object(r.createSelector)([b],(function(e){return e&&Object(c.a)(e.getRequiredStatement()).filter((function(e){return e.getValues().some((function(e){return e}))})).map((function(e){return{label:e.label&&e.label.getValue()||null,values:e.getValues()}}))})),T=Object(r.createSelector)([_("rights"),_("license"),w],(function(e,t,n){var r=e||t;return Object(c.a)(a.b.parse(r,n).getValues())}));function j(e,t){var n=b(e,t),r=Object(f.a)(e).thumbnails,i=void 0===r?{}:r;if(n){var o=Object(s.a)(n,{maxHeight:80,maxWidth:120,preferredFormats:i.preferredFormats});return o&&o.url}}var P=Object(r.createSelector)([b],(function(e){return e&&e.getLabel().getValue()})),I=Object(r.createSelector)([b],(function(e){return e&&e.getDescription().getValue()})),R=Object(r.createSelector)([b],(function(e){return e&&e.id}));function A(e){return e&&e.getMetadata().map((function(e){return{label:e.getLabel(),values:e.getValues()}}))}var M=Object(r.createSelector)([b],(function(e){return e&&A(e)}));function D(e){var t=[];return Array.isArray(e)?t.push.apply(t,d(e.filter((function(e){return"object"==typeof e&&e["@language"]})).map((function(e){return e["@language"]})))):e&&"object"==typeof e&&e["@language"]&&t.push(e["@language"]),t}var N=Object(r.createSelector)([b],(function(e){return function(e){if(!e)return[];for(var t=e.getProperty("metadata")||[],n={},r=0;r<t.length;r+=1){var i=t[r];D(i.label).forEach((function(e){n[e]=!0})),D(i.value).forEach((function(e){n[e]=!0}))}return Object.keys(n)}(e)})),L=Object(r.createSelector)([b],(function(e){if(!e)return null;var t=e.getService("http://iiif.io/api/search/0/search")||e.getService("http://iiif.io/api/search/1/search");return t||null})),z=Object(r.createSelector)([L],(function(e){var t=e&&(e.getService("http://iiif.io/api/search/0/autocomplete")||e.getService("http://iiif.io/api/search/1/autocomplete"));return t&&t}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";n.r(t);var r=n(578);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(330);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(r.a)(e,t)}},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(11),u={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},l=o.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,l=e.classes,f=e.className,d=e.color,p=void 0===d?"initial":d,h=e.component,g=e.display,v=void 0===g?"initial":g,m=e.gutterBottom,y=void 0!==m&&m,b=e.noWrap,w=void 0!==b&&b,_=e.paragraph,x=void 0!==_&&_,O=e.variant,S=void 0===O?"body1":O,E=e.variantMapping,C=void 0===E?u:E,k=Object(i.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),T=h||(x?"p":C[S]||u[S])||"span";return o.createElement(T,Object(r.a)({className:Object(a.a)(l.root,f,"inherit"!==S&&l[S],"initial"!==p&&l["color".concat(Object(c.a)(p))],w&&l.noWrap,y&&l.gutterBottom,x&&l.paragraph,"inherit"!==s&&l["align".concat(Object(c.a)(s))],"initial"!==v&&l["display".concat(Object(c.a)(v))]),ref:t},k))}));t.a=Object(s.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.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:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTINUE=100,t.SWITCHING_PROTOCOLS=101,t.PROCESSING=102,t.OK=200,t.CREATED=201,t.ACCEPTED=202,t.NON_AUTHORITATIVE_INFORMATION=203,t.NO_CONTENT=204,t.RESET_CONTENT=205,t.PARTIAL_CONTENT=206,t.MULTI_STATUS=207,t.MULTIPLE_CHOICES=300,t.MOVED_PERMANENTLY=301,t.MOVED_TEMPORARILY=302,t.SEE_OTHER=303,t.NOT_MODIFIED=304,t.USE_PROXY=305,t.TEMPORARY_REDIRECT=307,t.BAD_REQUEST=400,t.UNAUTHORIZED=401,t.PAYMENT_REQUIRED=402,t.FORBIDDEN=403,t.NOT_FOUND=404,t.METHOD_NOT_ALLOWED=405,t.NOT_ACCEPTABLE=406,t.PROXY_AUTHENTICATION_REQUIRED=407,t.REQUEST_TIME_OUT=408,t.CONFLICT=409,t.GONE=410,t.LENGTH_REQUIRED=411,t.PRECONDITION_FAILED=412,t.REQUEST_ENTITY_TOO_LARGE=413,t.REQUEST_URI_TOO_LARGE=414,t.UNSUPPORTED_MEDIA_TYPE=415,t.REQUESTED_RANGE_NOT_SATISFIABLE=416,t.EXPECTATION_FAILED=417,t.IM_A_TEAPOT=418,t.UNPROCESSABLE_ENTITY=422,t.LOCKED=423,t.FAILED_DEPENDENCY=424,t.UNORDERED_COLLECTION=425,t.UPGRADE_REQUIRED=426,t.PRECONDITION_REQUIRED=428,t.TOO_MANY_REQUESTS=429,t.REQUEST_HEADER_FIELDS_TOO_LARGE=431,t.INTERNAL_SERVER_ERROR=500,t.NOT_IMPLEMENTED=501,t.BAD_GATEWAY=502,t.SERVICE_UNAVAILABLE=503,t.GATEWAY_TIME_OUT=504,t.HTTP_VERSION_NOT_SUPPORTED=505,t.VARIANT_ALSO_NEGOTIATES=506,t.INSUFFICIENT_STORAGE=507,t.BANDWIDTH_LIMIT_EXCEEDED=509,t.NOT_EXTENDED=510,t.NETWORK_AUTHENTICATION_REQUIRED=511},function(e,t,n){"use strict";var r=n(40),i=r.Map,o=r.OrderedSet,a=r.Record,s=o(),c={style:s,entity:null},u=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.getStyle=function(){return this.get("style")},a.getEntity=function(){return this.get("entity")},a.hasStyle=function(e){return this.getStyle().includes(e)},r.applyStyle=function(e,t){var n=e.set("style",e.getStyle().add(t));return r.create(n)},r.removeStyle=function(e,t){var n=e.set("style",e.getStyle().remove(t));return r.create(n)},r.applyEntity=function(e,t){var n=e.getEntity()===t?e:e.set("entity",t);return r.create(n)},r.create=function(e){if(!e)return l;var t=i({style:s,entity:null}).merge(e),n=f.get(t);if(n)return n;var o=new r(t);return f=f.set(t,o),o},r.fromJS=function(e){var t=e.style,n=e.entity;return new r({style:Array.isArray(t)?o(t):t,entity:Array.isArray(n)?o(n):n})},r}(a(c)),l=new u,f=i([[i(c),l]]);u.EMPTY=l,e.exports=u},function(e,t,n){"use strict";var r=n(98),i=n(236),o=n(40),a=o.List,s=o.Map,c=o.OrderedSet,u=o.Record,l=o.Repeat,f=c(),d={parent:null,characterList:a(),data:s(),depth:0,key:"",text:"",type:"unstyled",children:a(),prevSibling:null,nextSibling:null},p=function(e,t){return e.getStyle()===t.getStyle()},h=function(e,t){return e.getEntity()===t.getEntity()},g=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(l(r.EMPTY,n.length))),e},v=function(e){var t,n;function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;return e.call(this,g(t))||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.getKey=function(){return this.get("key")},o.getType=function(){return this.get("type")},o.getText=function(){return this.get("text")},o.getCharacterList=function(){return this.get("characterList")},o.getLength=function(){return this.getText().length},o.getDepth=function(){return this.get("depth")},o.getData=function(){return this.get("data")},o.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():f},o.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},o.getChildKeys=function(){return this.get("children")},o.getParentKey=function(){return this.get("parent")},o.getPrevSiblingKey=function(){return this.get("prevSibling")},o.getNextSiblingKey=function(){return this.get("nextSibling")},o.findStyleRanges=function(e,t){i(this.getCharacterList(),p,e,t)},o.findEntityRanges=function(e,t){i(this.getCharacterList(),h,e,t)},r}(u(d));e.exports=v},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicWindowContext=t.MosaicContext=void 0;var i=r(n(0));t.MosaicContext=i.default.createContext(void 0),t.MosaicWindowContext=i.default.createContext(void 0)},function(e,t,n){"use strict";n.r(t),n.d(t,"MiradorMenuButton",(function(){return f}));var r=n(0),i=n.n(r),o=n(1120),a=n(757),s=n(1121),c=n(14),u=["badge","children","containerId","dispatch","BadgeProps","TooltipProps"];function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function f(e){var t=e["aria-label"],n=e.badge,r=e.children,f=e.containerId,d=(e.dispatch,e.BadgeProps),p=e.TooltipProps,h=l(e,u),g=i.a.createElement(a.a,h,n?i.a.createElement(o.a,d,r):r);return h.disabled?g:i.a.createElement(s.a,Object.assign({PopperProps:{container:document.querySelector("#".concat(f," .").concat(Object(c.a)("viewer")))},title:t},p),g)}f.defaultProps={badge:!1,BadgeProps:{},dispatch:function(){},TooltipProps:{}}},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(126);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.a={state:{},canvasNavigation:{height:50,width:50},selectedTheme:"light",themes:{dark:{palette:{type:"dark",primary:{main:"#4db6ac"},secondary:{main:"#4db6ac"},shades:{dark:"#000000",main:"#424242",light:"#616161"}}},light:{palette:{type:"light"}}},theme:{palette:{type:"light",primary:{main:"#1967d2"},secondary:{main:"#1967d2"},shades:{dark:"#eeeeee",main:"#ffffff",light:"#f5f5f5"},error:{main:"#b00020"},notification:{main:"#ffa224"},hitCounter:{default:"#bdbdbd"},highlights:{primary:"#ffff00",secondary:"#00BFFF"},section_divider:"rgba(0, 0, 0, 0.25)",annotations:{hidden:{globalAlpha:0},default:{strokeStyle:"#00BFFF",globalAlpha:1},hovered:{strokeStyle:"#BF00FF",globalAlpha:1},selected:{strokeStyle:"#ffff00",globalAlpha:1}},search:{default:{fillStyle:"#00BFFF",globalAlpha:.3},hovered:{fillStyle:"#00FFFF",globalAlpha:.3},selected:{fillStyle:"#ffff00",globalAlpha:.3}}},typography:{body1:{fontSize:"1rem",letterSpacing:"0em",lineHeight:"1.6em"},body2:{fontSize:"0.878rem",letterSpacing:"0.015em",lineHeight:"1.6em"},button:{fontSize:"0.878rem",letterSpacing:"0.09em",lineHeight:"2.25rem",textTransform:"uppercase"},caption:{fontSize:"0.772rem",letterSpacing:"0.033em",lineHeight:"1.6rem"},body1Next:{fontSize:"1rem",letterSpacing:"0em",lineHeight:"1.6em"},body2Next:{fontSize:"0.878rem",letterSpacing:"0.015em",lineHeight:"1.6em"},buttonNext:{fontSize:"0.878rem",letterSpacing:"0.09em",lineHeight:"2.25rem"},captionNext:{fontSize:"0.772rem",letterSpacing:"0.33em",lineHeight:"1.6rem"},overline:{fontSize:"0.678rem",fontWeight:500,letterSpacing:"0.166em",lineHeight:"2em",textTransform:"uppercase"},h1:{fontSize:"2.822rem",letterSpacing:"-0.015em",lineHeight:"1.2em"},h2:{fontSize:"1.575rem",letterSpacing:"0em",lineHeight:"1.33em"},h3:{fontSize:"1.383rem",fontWeight:300,letterSpacing:"0em",lineHeight:"1.33em"},h4:{fontSize:"1.215rem",letterSpacing:"0.007em",lineHeight:"1.45em"},h5:{fontSize:"1.138rem",letterSpacing:"0.005em",lineHeight:"1.55em"},h6:{fontSize:"1.067rem",fontWeight:400,letterSpacing:"0.01em",lineHeight:"1.6em"},subtitle1:{fontSize:"0.937rem",letterSpacing:"0.015em",lineHeight:"1.6em",fontWeight:300},subtitle2:{fontSize:"0.878rem",fontWeight:500,letterSpacing:"0.02em",lineHeight:"1.75em"},useNextVariants:!0},overrides:{MuiListSubheader:{root:{'&[role="presentation"]:focus':{outline:0}}},MuiTooltip:{tooltipPlacementLeft:a({},"@media (min-width:600px)",{margin:0}),tooltipPlacementRight:a({},"@media (min-width:600px)",{margin:0}),tooltipPlacementTop:a({},"@media (min-width:600px)",{margin:0}),tooltipPlacementBottom:a({},"@media (min-width:600px)",{margin:0})},MuiTouchRipple:{childPulsate:{animation:"none"},rippleVisible:{animation:"none"}}},props:{MuiButtonBase:{disableTouchRipple:!0},MuiLink:{underline:"always"}}},language:"en",availableLanguages:{ar:"العربية",de:"Deutsch",en:"English",fr:"Français",ja:"日本語",kr:"한국어",lt:"Lietuvių",nl:"Nederlands","nb-NO":"Norwegian Bokmål",pl:"Polski","pt-BR":"Português do Brasil",vi:"Tiếng Việt","zh-CN":"中文(简体)","zh-TW":"中文(繁體)",it:"Italiano",sr:"Српски",sv:"Svenska"},annotations:{htmlSanitizationRuleSet:"iiif",filteredMotivations:["oa:commenting","oa:tagging","sc:painting","commenting","tagging"]},createGenerateClassNameOptions:{productionPrefix:"mirador"},requests:{preprocessors:[],postprocessors:[]},translations:{},window:{allowClose:!0,allowFullscreen:!1,allowMaximize:!0,allowTopMenuButton:!0,allowWindowSideBar:!0,authNewWindowCenter:"parent",sideBarPanel:"info",defaultSidebarPanelHeight:201,defaultSidebarPanelWidth:235,defaultView:"single",forceDrawAnnotations:!1,hideWindowTitle:!1,highlightAllAnnotations:!1,showLocalePicker:!1,sideBarOpen:!1,switchCanvasOnSearch:!0,panels:{info:!0,attribution:!0,canvas:!0,annotations:!0,search:!0,layers:!0},views:[{key:"single",behaviors:["individuals"]},{key:"book",behaviors:["paged"]},{key:"scroll",behaviors:["continuous"]},{key:"gallery"}],elastic:{height:400,width:480}},windows:[],thumbnails:{preferredFormats:["jpg","png","webp","tif"]},thumbnailNavigation:{defaultPosition:"off",displaySettings:!0,height:130,width:100},workspace:{draggingEnabled:!0,allowNewWindows:!0,id:Object(r.a)(),isWorkspaceAddVisible:!1,exposeModeOn:!1,height:5e3,showZoomControls:!1,type:"mosaic",viewportPosition:{x:0,y:0},width:5e3},workspaceControlPanel:{enabled:!0},galleryView:{height:120,width:null},osdConfig:{alwaysBlend:!1,blendTime:.1,preserveImageSizeOnResize:!0,preserveViewport:!0,showNavigationControl:!1},export:{catalog:!0,companionWindows:!0,config:!0,elasticLayout:!0,layers:!0,manifests:{filter:function(e){var t=i(e,2),n=t[0];t[1];return!n.startsWith("http")}},viewers:!0,windows:!0,workspace:!0},audioOptions:{controls:!0,crossOrigin:"anonymous"},videoOptions:{controls:!0,crossOrigin:"anonymous"},auth:{serviceProfiles:[{profile:"http://iiif.io/api/auth/1/external",external:!0},{profile:"http://iiif.io/api/auth/1/kiosk",kiosk:!0},{profile:"http://iiif.io/api/auth/1/clickthrough"},{profile:"http://iiif.io/api/auth/1/login"},{profile:"http://iiif.io/api/auth/0/external",external:!0},{profile:"http://iiif.io/api/auth/0/kiosk",kiosk:!0},{profile:"http://iiif.io/api/auth/0/clickthrough"},{profile:"http://iiif.io/api/auth/0/login"}]}}},function(e,t,n){"use strict";var r=n(0),i=r.createContext({});t.a=i},function(e,t,n){"use strict";var r=n(945),i=n(235),o=n(98),a=n(961),s=n(171),c=n(436),u=n(438),l=n(617),f=n(962),d=n(633),p=n(307),h=n(85),g=n(615),v=n(51),m=n(444),y=n(1028),b=n(645),w=n(308),_=n(1029),x=n(1032),O=n(116),S=n(646),E=n(1038),C={Editor:f,EditorBlock:d,EditorState:v,CompositeDecorator:a,Entity:p,EntityInstance:g,BlockMapBuilder:i,CharacterMetadata:o,ContentBlock:s,ContentState:c,RawDraftContentState:y,SelectionState:w,AtomicBlockUtils:r,KeyBindingUtil:m,Modifier:h,RichUtils:b,DefaultDraftBlockRenderMap:u,DefaultDraftInlineStyle:l,convertFromHTML:n(643),convertFromRaw:x,convertToRaw:_,genKey:O,getDefaultKeyBinding:S,getVisibleSelectionRect:E};e.exports=C},function(e,t,n){"use strict";n.d(t,"c",(function(){return v})),n.d(t,"b",(function(){return m}));var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(255),c=n(759),u=n(5),l=n(1128),f=n(140),d=n(11),p=n(49),h=n(36),g={left:"right",right:"left",top:"down",bottom:"up"};function v(e){return-1!==["left","right"].indexOf(e)}function m(e,t){return"rtl"===e.direction&&v(t)?g[t]:t}var y={enter:p.b.enteringScreen,exit:p.b.leavingScreen},b=o.forwardRef((function(e,t){var n=e.anchor,u=void 0===n?"left":n,p=e.BackdropProps,v=e.children,b=e.classes,w=e.className,_=e.elevation,x=void 0===_?16:_,O=e.ModalProps,S=(O=void 0===O?{}:O).BackdropProps,E=Object(i.a)(O,["BackdropProps"]),C=e.onClose,k=e.open,T=void 0!==k&&k,j=e.PaperProps,P=void 0===j?{}:j,I=e.SlideProps,R=e.TransitionComponent,A=void 0===R?l.a:R,M=e.transitionDuration,D=void 0===M?y:M,N=e.variant,L=void 0===N?"temporary":N,z=Object(i.a)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),B=Object(h.a)(),F=o.useRef(!1);o.useEffect((function(){F.current=!0}),[]);var W=m(B,u),H=o.createElement(f.a,Object(r.a)({elevation:"temporary"===L?x:0,square:!0},P,{className:Object(a.a)(b.paper,b["paperAnchor".concat(Object(d.a)(W))],P.className,"temporary"!==L&&b["paperAnchorDocked".concat(Object(d.a)(W))])}),v);if("permanent"===L)return o.createElement("div",Object(r.a)({className:Object(a.a)(b.root,b.docked,w),ref:t},z),H);var V=o.createElement(A,Object(r.a)({in:T,direction:g[W],timeout:D,appear:F.current},I),H);return"persistent"===L?o.createElement("div",Object(r.a)({className:Object(a.a)(b.root,b.docked,w),ref:t},z),V):o.createElement(s.a,Object(r.a)({BackdropProps:Object(r.a)({},p,S,{transitionDuration:D}),BackdropComponent:c.a,className:Object(a.a)(b.root,b.modal,w),open:T,onClose:C,ref:t},z,E),V)}));t.a=Object(u.a)((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:{}}}),{name:"MuiDrawer",flip:!1})(b)},,function(e,t,n){"use strict";n.r(t),n.d(t,"v1",(function(){return u})),n.d(t,"v3",(function(){return w})),n.d(t,"v4",(function(){return _.a})),n.d(t,"v5",(function(){return S})),n.d(t,"NIL",(function(){return E})),n.d(t,"version",(function(){return C})),n.d(t,"validate",(function(){return l.a})),n.d(t,"stringify",(function(){return a.a})),n.d(t,"parse",(function(){return f}));var r,i,o=n(325),a=n(147),s=0,c=0;var u=function(e,t,n){var u=t&&n||0,l=t||new Array(16),f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==d){var p=e.random||(e.rng||o.a)();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=i=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:Date.now(),g=void 0!==e.nsecs?e.nsecs:c+1,v=h-s+(g-c)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||h>s)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,c=g,i=d;var m=(1e4*(268435455&(h+=122192928e5))+g)%4294967296;l[u++]=m>>>24&255,l[u++]=m>>>16&255,l[u++]=m>>>8&255,l[u++]=255&m;var y=h/4294967296*1e4&268435455;l[u++]=y>>>8&255,l[u++]=255&y,l[u++]=y>>>24&15|16,l[u++]=y>>>16&255,l[u++]=d>>>8|128,l[u++]=255&d;for(var b=0;b<6;++b)l[u+b]=f[b];return t||Object(a.a)(l)},l=n(150);var f=function(e){if(!Object(l.a)(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};var d=function(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=f(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var c=0;c<16;++c)i[o+c]=s[c];return i}return Object(a.a)(s)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function p(e){return 14+(e+64>>>9<<4)+1}function h(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function g(e,t,n,r,i,o){return h((a=h(h(t,e),h(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function v(e,t,n,r,i,o,a){return g(t&n|~t&r,e,t,i,o,a)}function m(e,t,n,r,i,o,a){return g(t&r|n&~r,e,t,i,o,a)}function y(e,t,n,r,i,o,a){return g(t^n^r,e,t,i,o,a)}function b(e,t,n,r,i,o,a){return g(n^(t|~r),e,t,i,o,a)}var w=d("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r=0;r<n;r+=8){var i=e[r>>5]>>>r%32&255,o=parseInt("0123456789abcdef".charAt(i>>>4&15)+"0123456789abcdef".charAt(15&i),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[p(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,a=0;a<e.length;a+=16){var s=n,c=r,u=i,l=o;n=v(n,r,i,o,e[a],7,-680876936),o=v(o,n,r,i,e[a+1],12,-389564586),i=v(i,o,n,r,e[a+2],17,606105819),r=v(r,i,o,n,e[a+3],22,-1044525330),n=v(n,r,i,o,e[a+4],7,-176418897),o=v(o,n,r,i,e[a+5],12,1200080426),i=v(i,o,n,r,e[a+6],17,-1473231341),r=v(r,i,o,n,e[a+7],22,-45705983),n=v(n,r,i,o,e[a+8],7,1770035416),o=v(o,n,r,i,e[a+9],12,-1958414417),i=v(i,o,n,r,e[a+10],17,-42063),r=v(r,i,o,n,e[a+11],22,-1990404162),n=v(n,r,i,o,e[a+12],7,1804603682),o=v(o,n,r,i,e[a+13],12,-40341101),i=v(i,o,n,r,e[a+14],17,-1502002290),r=v(r,i,o,n,e[a+15],22,1236535329),n=m(n,r,i,o,e[a+1],5,-165796510),o=m(o,n,r,i,e[a+6],9,-1069501632),i=m(i,o,n,r,e[a+11],14,643717713),r=m(r,i,o,n,e[a],20,-373897302),n=m(n,r,i,o,e[a+5],5,-701558691),o=m(o,n,r,i,e[a+10],9,38016083),i=m(i,o,n,r,e[a+15],14,-660478335),r=m(r,i,o,n,e[a+4],20,-405537848),n=m(n,r,i,o,e[a+9],5,568446438),o=m(o,n,r,i,e[a+14],9,-1019803690),i=m(i,o,n,r,e[a+3],14,-187363961),r=m(r,i,o,n,e[a+8],20,1163531501),n=m(n,r,i,o,e[a+13],5,-1444681467),o=m(o,n,r,i,e[a+2],9,-51403784),i=m(i,o,n,r,e[a+7],14,1735328473),r=m(r,i,o,n,e[a+12],20,-1926607734),n=y(n,r,i,o,e[a+5],4,-378558),o=y(o,n,r,i,e[a+8],11,-2022574463),i=y(i,o,n,r,e[a+11],16,1839030562),r=y(r,i,o,n,e[a+14],23,-35309556),n=y(n,r,i,o,e[a+1],4,-1530992060),o=y(o,n,r,i,e[a+4],11,1272893353),i=y(i,o,n,r,e[a+7],16,-155497632),r=y(r,i,o,n,e[a+10],23,-1094730640),n=y(n,r,i,o,e[a+13],4,681279174),o=y(o,n,r,i,e[a],11,-358537222),i=y(i,o,n,r,e[a+3],16,-722521979),r=y(r,i,o,n,e[a+6],23,76029189),n=y(n,r,i,o,e[a+9],4,-640364487),o=y(o,n,r,i,e[a+12],11,-421815835),i=y(i,o,n,r,e[a+15],16,530742520),r=y(r,i,o,n,e[a+2],23,-995338651),n=b(n,r,i,o,e[a],6,-198630844),o=b(o,n,r,i,e[a+7],10,1126891415),i=b(i,o,n,r,e[a+14],15,-1416354905),r=b(r,i,o,n,e[a+5],21,-57434055),n=b(n,r,i,o,e[a+12],6,1700485571),o=b(o,n,r,i,e[a+3],10,-1894986606),i=b(i,o,n,r,e[a+10],15,-1051523),r=b(r,i,o,n,e[a+1],21,-2054922799),n=b(n,r,i,o,e[a+8],6,1873313359),o=b(o,n,r,i,e[a+15],10,-30611744),i=b(i,o,n,r,e[a+6],15,-1560198380),r=b(r,i,o,n,e[a+13],21,1309151649),n=b(n,r,i,o,e[a+4],6,-145523070),o=b(o,n,r,i,e[a+11],10,-1120210379),i=b(i,o,n,r,e[a+2],15,718787259),r=b(r,i,o,n,e[a+9],21,-343485551),n=h(n,s),r=h(r,c),i=h(i,u),o=h(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(p(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))})),_=n(126);function x(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function O(e,t){return e<<t|e>>>32-t}var S=d("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,a=Math.ceil(o/16),s=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[64*c+4*l]<<24|e[64*c+4*l+1]<<16|e[64*c+4*l+2]<<8|e[64*c+4*l+3];s[c]=u}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var f=0;f<a;++f){for(var d=new Uint32Array(80),p=0;p<16;++p)d[p]=s[f][p];for(var h=16;h<80;++h)d[h]=O(d[h-3]^d[h-8]^d[h-14]^d[h-16],1);for(var g=n[0],v=n[1],m=n[2],y=n[3],b=n[4],w=0;w<80;++w){var _=Math.floor(w/20),S=O(g,5)+x(_,v,m,y)+b+t[_]+d[w]>>>0;b=y,y=m,m=O(v,30)>>>0,v=g,g=S}n[0]=n[0]+g>>>0,n[1]=n[1]+v>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),E="00000000-0000-0000-0000-000000000000";var C=function(e){if(!Object(l.a)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAndAssertNodeAtPathExists=t.getNodeAtPath=t.getLeaves=t.getPathToCorner=t.getOtherDirection=t.getOtherBranch=t.createBalancedTreeFromLeaves=t.isParent=t.Corner=void 0;var i,o=r(n(651)),a=r(n(548));function s(e){return null!=e.direction}function c(e){return"row"===e?"column":"row"}function u(e,t){return t.length>0?a.default(e,t,null):e}!function(e){e[e.TOP_LEFT=1]="TOP_LEFT",e[e.TOP_RIGHT=2]="TOP_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=4]="BOTTOM_RIGHT"}(i=t.Corner||(t.Corner={})),t.isParent=s,t.createBalancedTreeFromLeaves=function(e,t){if(void 0===t&&(t="row"),0===e.length)return null;for(var n=o.default(e),r=[];n.length>1;){for(;n.length>0;)n.length>1?r.push({direction:"row",first:n.shift(),second:n.shift()}):r.unshift(n.shift());n=r,r=[]}return function e(t,n){if(void 0===n&&(n="row"),s(t)){var r=c(n);return{direction:n,first:e(t.first,r),second:e(t.second,r)}}return t}(n[0],t)},t.getOtherBranch=function(e){if("first"===e)return"second";if("second"===e)return"first";throw new Error("Branch '"+e+"' not a valid branch")},t.getOtherDirection=c,t.getPathToCorner=function(e,t){for(var n=e,r=[];s(n);)("row"!==n.direction||t!==i.TOP_LEFT&&t!==i.BOTTOM_LEFT)&&("column"!==n.direction||t!==i.TOP_LEFT&&t!==i.TOP_RIGHT)?(r.push("second"),n=n.second):(r.push("first"),n=n.first);return r},t.getLeaves=function e(t){return null==t?[]:s(t)?e(t.first).concat(e(t.second)):[t]},t.getNodeAtPath=u,t.getAndAssertNodeAtPathExists=function(e,t){if(null==e)throw new Error("Root is empty, cannot fetch path");var n=u(e,t);if(null==n)throw new Error("Path ["+t.join(", ")+"] did not resolve to a node");return n}},function(e,t,n){"use strict";function r(e){return void 0===e?[]:Array.isArray(e)?e:[e]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(1),i=n(4),o=["xs","sm","md","lg","xl"];function a(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,a=e.unit,s=void 0===a?"px":a,c=e.step,u=void 0===c?5:c,l=Object(i.a)(e,["values","unit","step"]);function f(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function d(e,t){var r=o.indexOf(t);return r===o.length-1?f(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[o[r+1]]?n[o[r+1]]:t)-u/100).concat(s,")")}return Object(r.a)({keys:o,values:n,up:f,down:function(e){var t=o.indexOf(e)+1,r=n[o[t]];return t===o.length?f("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-u/100).concat(s,")")},between:d,only:function(e){return d(e,e)},width:function(e){return n[e]}},l)}},function(e,t,n){"use strict";n.r(t);var r=n(572);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.r(t);var r=n(576);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.r(t);var r=n(577);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.r(t);var r=n(583);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";var r={},i=Math.pow(2,24);e.exports=function(){for(var e;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*i).toString(32);return r[e]=!0,e}},function(e,t,n){"use strict";n.r(t),n.d(t,"HTML5DragTransition",(function(){return o})),n.d(t,"TouchTransition",(function(){return i})),n.d(t,"MouseTransition",(function(){return a})),n.d(t,"createTransition",(function(){return r})),n.d(t,"MultiBackend",(function(){return d})),n.d(t,"PreviewManager",(function(){return f}));var r=function(e,t){return{_isMBTransition:!0,event:e,check:t}},i=r("touchstart",(function(e){return null!=e.touches})),o=r("dragstart",(function(e){return!!e.type&&(-1!==e.type.indexOf("drag")||-1!==e.type.indexOf("drop"))})),a=r("mousedown",(function(e){return!!e.type&&(-1===e.type.indexOf("touch")&&-1!==e.type.indexOf("mouse"))}));function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=new function e(){var t=this;l(this,e),this.register=function(e){t.previews.push(e)},this.unregister=function(e){for(var n;-1!==(n=t.previews.indexOf(e));)t.previews.splice(n,1)},this.backendChanged=function(e){var n,r=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=c(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(t.previews);try{for(r.s();!(n=r.n()).done;){n.value.backendChanged(e)}}catch(e){r.e(e)}finally{r.f()}},this.previews=[]},d=function e(t,n,r){var i=this;l(this,e),this.setup=function(){if("undefined"!=typeof window){if(i.constructor.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");i.constructor.isSetUp=!0,i.addEventListeners(window),i.backends[i.current].instance.setup()}},this.teardown=function(){"undefined"!=typeof window&&(i.constructor.isSetUp=!1,i.removeEventListeners(window),i.backends[i.current].instance.teardown())},this.connectDragSource=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.connectBackend("connectDragSource",t)},this.connectDragPreview=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.connectBackend("connectDragPreview",t)},this.connectDropTarget=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.connectBackend("connectDropTarget",t)},this.previewEnabled=function(){return i.backends[i.current].preview},this.addEventListeners=function(e){i.backends.forEach((function(t){t.transition&&e.addEventListener(t.transition.event,i.backendSwitcher,!0)}))},this.removeEventListeners=function(e){i.backends.forEach((function(t){t.transition&&e.removeEventListener(t.transition.event,i.backendSwitcher,!0)}))},this.backendSwitcher=function(e){var t=i.current,n=0;if(i.backends.some((function(t){return n!==i.current&&t.transition&&t.transition.check(e)?(i.current=n,!0):(n+=1,!1)})),i.current!==t){i.backends[t].instance.teardown(),Object.keys(i.nodes).forEach((function(e){var t=i.nodes[e];t.handler(),t.handler=i.callBackend(t.func,t.args)})),f.backendChanged(i);var r=i.backends[i.current];if(r.instance.setup(),r.skipDispatchOnTransition)return;var o=null;try{o=new e.constructor(e.type,e)}catch(t){(o=document.createEvent("Event")).initEvent(e.type,e.bubbles,e.cancelable)}e.target.dispatchEvent(o)}},this.callBackend=function(e,t){var n;return(n=i.backends[i.current].instance)[e].apply(n,s(t))},this.connectBackend=function(e,t){var n="".concat(e,"_").concat(t[0]),r=i.callBackend(e,t);return i.nodes[n]={func:e,args:t,handler:r},function(){var e,t=(e=i.nodes[n]).handler.apply(e,arguments);return delete i.nodes[n],t}};var o=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}({backends:[]},r||{});if(o.backends.length<1)throw new Error("You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx");this.current=0,this.backends=[],o.backends.forEach((function(e){if(!e.backend)throw new Error("You must specify a 'backend' property in your Backend entry: ".concat(e));var r=e.transition;if(r&&!r._isMBTransition)throw new Error("You must specify a valid 'transition' property (either undefined or the return of 'createTransition') in your Backend entry: ".concat(e));i.backends.push({instance:e.backend(t,n,e.options),preview:e.preview||!1,transition:r,skipDispatchOnTransition:Boolean(e.skipDispatchOnTransition)})})),this.nodes={}};t.default=function(e,t,n){return new d(e,t,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),i=n(33),o=!0,a=!1,s=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function u(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function l(){o=!1}function f(){"hidden"===this.visibilityState&&a&&(o=!0)}function d(e){var t,n,r,i=e.target;try{return i.matches(":focus-visible")}catch(e){}return o||(n=(t=i).type,!("INPUT"!==(r=t.tagName)||!c[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function p(){a=!0,window.clearTimeout(s),s=window.setTimeout((function(){a=!1}),100)}function h(){return{isFocusVisible:d,onBlurVisible:p,ref:r.useCallback((function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",u,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("touchstart",l,!0),t.addEventListener("visibilitychange",f,!0))}),[])}}},function(e,t,n){var r=n(403);e.exports=function(e,t){return r(e,t)}},function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function a(e,t,n){return e.concat(t).map((function(e){return o(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function c(e,t){try{return t in e}catch(e){return!1}}function u(e,t,n){var r={};return n.isMergeableObject(e)&&s(e).forEach((function(t){r[t]=o(e[t],n)})),s(t).forEach((function(i){(function(e,t){return c(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(c(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(i,n)(e[i],t[i],n):r[i]=o(t[i],n))})),r}function l(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||a,n.isMergeableObject=n.isMergeableObject||r,n.cloneUnlessOtherwiseSpecified=o;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):u(e,t,n):o(t,n)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var f=l;e.exports=f},function(e,t,n){"use strict";var r=n(178),i=Object(r.b)();t.a=i},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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 12 19 6.41z"}),"CloseSharp");t.default=a},function(e,t,n){"use strict";var r=n(7),i=n(9),o=n(1175),a=n(5),s=n(8),c=n(88),u=n(0),l=n.n(u),f=(n(653),n(96)),d=n(367),p=n(23),h=n.n(p),g=n(327);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(o,e);var t,n,r,i=_(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={loaded:!1},t.handleIntersection=t.handleIntersection.bind(O(t)),t}return t=o,r=[{key:"getUseableLabel",value:function(e,t){return e&&e.getLabel&&e.getLabel().length>0?e.getLabel().getValue():String(t+1)}}],(n=[{key:"componentDidMount",value:function(){var e=this;this.setState((function(t){return m(m({},t),{},{image:e.image()})}))}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,r=n.maxHeight,i=n.maxWidth,o=n.resource;e.maxHeight===r&&e.maxWidth===i&&e.resource===o||this.setState((function(e){return m(m({},e),{},{image:t.image()})}))}},{key:"handleIntersection",value:function(e){!this.state.loaded&&e.isIntersecting&&this.setState((function(e){return m(m({},e),{},{loaded:!0})}))}},{key:"imageStyles",value:function(){var e=this.props,t=e.maxHeight,n=e.maxWidth,r=e.style,i=this.image(),o={height:"auto",width:"auto"};if(!i)return m(m({},r),{},{height:t||"auto",width:n||"auto"});var a=i.height,s=i.width;if(a&&s)if(t&&a>t||n&&s>n){var c=s/a;t&&n?n/t<c?(o.height=Math.round(n/c),o.width=n):(o.height=t,o.width=Math.round(t*c)):t?(o.height=t,o.maxWidth=Math.round(t*c)):n&&(o.width=n,o.maxHeight=Math.round(n/c))}else o.width=s,o.height=a;else a&&!s?o.height=t:!a&&s?o.width=n:(o.width=n,o.height=t);return m(m({},o),r)}},{key:"image",value:function(){var e=this.props,t=e.thumbnail,n=e.resource,r=e.maxHeight,i=e.maxWidth,o=e.thumbnailsConfig;if(t)return t;var a=Object(g.a)(n,m(m({},o),{},{maxHeight:r,maxWidth:i}));return a&&a.url?a:void 0}},{key:"label",value:function(){var e=this.props,t=e.label,n=e.resource;return t||o.getUseableLabel(n)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.classes,r=e.imagePlaceholder,i=e.labelled,o=e.thumbnail,a=e.variant,s=this.state,c=s.image,u=(s.loaded&&(o||c)||{}).url,p=void 0===u?r:u;return l.a.createElement("div",{className:h()(n.root,y({},n["".concat(a,"Root")],a))},l.a.createElement(d.a,{onChange:this.handleIntersection},l.a.createElement("img",{alt:"",role:"presentation",src:p,style:this.imageStyles(),className:n.image})),i&&l.a.createElement("div",{className:h()(n.label,y({},n["".concat(a,"Label")],a))},l.a.createElement(f.a,{variant:"caption",classes:{root:h()(n.caption,y({},n["".concat(a,"Caption")],a))}},this.label())),t)}}])&&b(t.prototype,n),r&&b(t,r),o}(u.Component);E.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 C=Object(r.compose)(Object(a.a)((function(e){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:{}}})),Object(o.a)(),Object(i.b)((function(e){return{thumbnailsConfig:Object(c.a)(e).thumbnails}})),Object(s.a)("IIIFThumbnail"));t.a=C(E)},function(e,t,n){"use strict";var r=n(7),i=n(1175),o=n(5),a=n(0),s=n.n(a),c=n(96),u=n(705),l=n.n(u),f=n(704),d=n.n(f),p=n(34);function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(o,e);var t,n,r,i=v(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={open:!0},t.toggleSection=t.toggleSection.bind(y(t)),t}return t=o,(n=[{key:"toggleSection",value:function(){var e=this.state.open;this.setState({open:!e})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.classes,r=e.id,i=e.label,o=e.t,a=this.state.open;return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:n.container},s.a.createElement(c.a,{className:n.heading,id:r,onClick:this.toggleSection,variant:"overline",component:"h4"},i),s.a.createElement(p.a,{"aria-label":o(a?"collapseSection":"expandSection",{section:i}),"aria-expanded":a,className:n.button,onClick:this.toggleSection},a?s.a.createElement(d.a,null):s.a.createElement(l.a,null))),a&&t)}}])&&h(t.prototype,n),r&&h(t,r),o}(a.Component),_=Object(r.compose)(Object(i.a)(),Object(o.a)({button:{padding:0},container:{display:"flex",justifyContent:"space-between"},heading:{cursor:"pointer"}}));t.a=_(w)},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r=n(0),i=r.createContext();function o(){return r.useContext(i)}t.a=i},function(e,t,n){"use strict";var r=n(325),i=n(147);t.a=function(e,t,n){var o=(e=e||{}).random||(e.rng||r.a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=o[a];return t}return Object(i.a)(o)}},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:H(e)}function r(e){return s(e)?e:V(e)}function i(e){return c(e)?e:U(e)}function o(e){return a(e)&&!u(e)?e:q(e)}function a(e){return!(!e||!e[f])}function s(e){return!(!e||!e[d])}function c(e){return!(!e||!e[p])}function u(e){return s(e)||c(e)}function l(e){return!(!e||!e[h])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=c,n.isAssociative=u,n.isOrdered=l,n.Keyed=r,n.Indexed=i,n.Set=o;var f="@@__IMMUTABLE_ITERABLE__@@",d="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",g={},v={value:!1},m={value:!1};function y(e){return e.value=!1,e}function b(e){e&&(e.value=!0)}function w(){}function _(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function x(e){return void 0===e.size&&(e.size=e.__iterate(S)),e.size}function O(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?x(e)+t:t}function S(){return!0}function E(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function C(e,t){return T(e,t,0)}function k(e,t){return T(e,t,t)}function T(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var j,P,I,R="function"==typeof Symbol&&Symbol.iterator,A=R||"@@iterator";function M(e){this.next=e}function D(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function N(){return{value:void 0,done:!0}}function L(e){return!!F(e)}function z(e){return e&&"function"==typeof e.next}function B(e){var t=F(e);return t&&t.call(e)}function F(e){var t=e&&(R&&e[R]||e["@@iterator"]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function H(e){return null==e?Q():a(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new K(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function V(e){return null==e?Q().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():Y(e)}function U(e){return null==e?Q():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():J(e)}function q(e){return(null==e?Q():a(e)?s(e)?e.entrySeq():e:J(e)).toSetSeq()}function G(e){this._array=e,this.size=e.length}function K(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function $(e){this._iterable=e,this.size=e.length||e.size}function Z(e){this._iterator=e,this._iteratorCache=[]}function X(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function Q(){return j||(j=new G([]))}function Y(e){var t=Array.isArray(e)?new G(e).fromEntrySeq():z(e)?new Z(e).fromEntrySeq():L(e)?new $(e).fromEntrySeq():"object"==typeof e?new K(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function J(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return W(e)?new G(e):z(e)?new Z(e):L(e)?new $(e):void 0}function te(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function ne(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new M((function(){var e=i[n?o-a:a];return a++>o?{value:void 0,done:!0}:D(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function re(e,t){return t?function e(t,n,r,i){return Array.isArray(n)?t.call(i,r,U(n).map((function(r,i){return e(t,r,i,n)}))):oe(n)?t.call(i,r,V(n).map((function(r,i){return e(t,r,i,n)}))):n}(t,e,"",{"":e}):ie(e)}function ie(e){return Array.isArray(e)?U(e).map(ie).toList():oe(e)?V(e).map(ie).toMap():e}function oe(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function se(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||c(e)!==c(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(l(e)){var r=e.entries();return t.every((function(e,t){var i=r.next().value;return i&&ae(i[1],e)&&(n||ae(i[0],t))}))&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var f=!0,d=t.__iterate((function(t,r){if(n?!e.has(t):i?!ae(t,e.get(r,g)):!ae(e.get(r,g),t))return f=!1,!1}));return f&&e.size===d}function ce(e,t){if(!(this instanceof ce))return new ce(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(P)return P;P=this}}function ue(e,t){if(!e)throw new Error(t)}function le(e,t,n){if(!(this instanceof le))return new le(e,t,n);if(ue(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(I)return I;I=this}}function fe(){throw TypeError("Abstract")}function de(){}function pe(){}function he(){}M.prototype.toString=function(){return"[Iterator]"},M.KEYS=0,M.VALUES=1,M.ENTRIES=2,M.prototype.inspect=M.prototype.toSource=function(){return this.toString()},M.prototype[A]=function(){return this},t(H,n),H.of=function(){return H(arguments)},H.prototype.toSeq=function(){return this},H.prototype.toString=function(){return this.__toString("Seq {","}")},H.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},H.prototype.__iterate=function(e,t){return te(this,e,t,!0)},H.prototype.__iterator=function(e,t){return ne(this,e,t,!0)},t(V,H),V.prototype.toKeyedSeq=function(){return this},t(U,H),U.of=function(){return U(arguments)},U.prototype.toIndexedSeq=function(){return this},U.prototype.toString=function(){return this.__toString("Seq [","]")},U.prototype.__iterate=function(e,t){return te(this,e,t,!1)},U.prototype.__iterator=function(e,t){return ne(this,e,t,!1)},t(q,H),q.of=function(){return q(arguments)},q.prototype.toSetSeq=function(){return this},H.isSeq=X,H.Keyed=V,H.Set=q,H.Indexed=U,H.prototype["@@__IMMUTABLE_SEQ__@@"]=!0,t(G,U),G.prototype.get=function(e,t){return this.has(e)?this._array[O(this,e)]:t},G.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},G.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new M((function(){return i>r?{value:void 0,done:!0}:D(e,i,n[t?r-i++:i++])}))},t(K,V),K.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},K.prototype.has=function(e){return this._object.hasOwnProperty(e)},K.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},K.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new M((function(){var a=r[t?i-o:o];return o++>i?{value:void 0,done:!0}:D(e,a,n[a])}))},K.prototype[h]=!0,t($,U),$.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=B(this._iterable),r=0;if(z(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},$.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=B(this._iterable);if(!z(n))return new M(N);var r=0;return new M((function(){var t=n.next();return t.done?t:D(e,r++,t.value)}))},t(Z,U),Z.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===e(i[o],o++,this))return o;for(;!(n=r.next()).done;){var a=n.value;if(i[o]=a,!1===e(a,o++,this))break}return o},Z.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new M((function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return D(e,i,r[i++])}))},t(ce,U),ce.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ce.prototype.get=function(e,t){return this.has(e)?this._value:t},ce.prototype.includes=function(e){return ae(this._value,e)},ce.prototype.slice=function(e,t){var n=this.size;return E(e,t,n)?this:new ce(this._value,k(t,n)-C(e,n))},ce.prototype.reverse=function(){return this},ce.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},ce.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},ce.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ce.prototype.__iterator=function(e,t){var n=this,r=0;return new M((function(){return r<n.size?D(e,r++,n._value):{value:void 0,done:!0}}))},ce.prototype.equals=function(e){return e instanceof ce?ae(this._value,e._value):se(e)},t(le,U),le.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},le.prototype.get=function(e,t){return this.has(e)?this._start+O(this,e)*this._step:t},le.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},le.prototype.slice=function(e,t){return E(e,t,this.size)?this:(e=C(e,this.size),(t=k(t,this.size))<=e?new le(0,0):new le(this.get(e,this._end),this.get(t,this._end),this._step))},le.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},le.prototype.lastIndexOf=function(e){return this.indexOf(e)},le.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===e(i,o,this))return o+1;i+=t?-r:r}return o},le.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new M((function(){var a=i;return i+=t?-r:r,o>n?{value:void 0,done:!0}:D(e,o++,a)}))},le.prototype.equals=function(e){return e instanceof le?this._start===e._start&&this._end===e._end&&this._step===e._step:se(this,e)},t(fe,n),t(de,fe),t(pe,fe),t(he,fe),fe.Keyed=de,fe.Indexed=pe,fe.Set=he;var ge="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ve(e){return e>>>1&1073741824|3221225471&e}function me(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ve(n)}if("string"===t)return e.length>Ee?function(e){var t=Te[e];return void 0===t&&(t=ye(e),ke===Ce&&(ke=0,Te={}),ke++,Te[e]=t),t}(e):ye(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(xe&&void 0!==(t=be.get(e)))return t;if(void 0!==(t=e[Se]))return t;if(!_e){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Se]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++Oe,1073741824&Oe&&(Oe=0),xe)be.set(e,t);else{if(void 0!==we&&!1===we(e))throw new Error("Non-extensible objects are not allowed as keys.");if(_e)Object.defineProperty(e,Se,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Se]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Se]=t}}return t}(e);if("function"==typeof e.toString)return ye(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ye(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ve(t)}var be,we=Object.isExtensible,_e=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),xe="function"==typeof WeakMap;xe&&(be=new WeakMap);var Oe=0,Se="__immutablehash__";"function"==typeof Symbol&&(Se=Symbol(Se));var Ee=16,Ce=255,ke=0,Te={};function je(e){ue(e!==1/0,"Cannot perform this action with an infinite size.")}function Pe(e){return null==e?Ue():Ie(e)&&!l(e)?e:Ue().withMutations((function(t){var n=r(e);je(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ie(e){return!(!e||!e[Ae])}t(Pe,de),Pe.of=function(){var t=e.call(arguments,0);return Ue().withMutations((function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},Pe.prototype.toString=function(){return this.__toString("Map {","}")},Pe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Pe.prototype.set=function(e,t){return qe(this,e,t)},Pe.prototype.setIn=function(e,t){return this.updateIn(e,g,(function(){return t}))},Pe.prototype.remove=function(e){return qe(this,e,g)},Pe.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return g}))},Pe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Pe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,i){var o=t===g,a=n.next();if(a.done){var s=o?r:t,c=i(s);return c===s?t:c}ue(o||t&&t.set,"invalid keyPath");var u=a.value,l=o?g:t.get(u,g),f=e(l,n,r,i);return f===l?t:f===g?t.remove(u):(o?Ue():t).set(u,f)}(this,Zt(e),t,n);return r===g?void 0:r},Pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ue()},Pe.prototype.merge=function(){return Ze(this,void 0,arguments)},Pe.prototype.mergeWith=function(t){var n=e.call(arguments,1);return Ze(this,t,n)},Pe.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Ue(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Pe.prototype.mergeDeep=function(){return Ze(this,Xe,arguments)},Pe.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ze(this,Qe(t),n)},Pe.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Ue(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Pe.prototype.sort=function(e){return _t(zt(this,e))},Pe.prototype.sortBy=function(e,t){return _t(zt(this,t,e))},Pe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Pe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new w)},Pe.prototype.asImmutable=function(){return this.__ensureOwner()},Pe.prototype.wasAltered=function(){return this.__altered},Pe.prototype.__iterator=function(e,t){return new Fe(this,e,t)},Pe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Pe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ve(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Pe.isMap=Ie;var Re,Ae="@@__IMMUTABLE_MAP__@@",Me=Pe.prototype;function De(e,t){this.ownerID=e,this.entries=t}function Ne(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Le(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ze(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Be(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Fe(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&He(e._root)}function We(e,t){return D(e,t[0],t[1])}function He(e,t){return{node:e,index:0,__prev:t}}function Ve(e,t,n,r){var i=Object.create(Me);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ue(){return Re||(Re=Ve(0))}function qe(e,t,n){var r,i;if(e._root){var o=y(v),a=y(m);if(r=Ge(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===g?-1:1:0)}else{if(n===g)return e;i=1,r=new De(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ve(i,r):Ue()}function Ge(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===g?e:(b(s),b(a),new Be(t,r,[i,o]))}function Ke(e){return e.constructor===Be||e.constructor===ze}function $e(e,t,n,r,i){if(e.keyHash===r)return new ze(t,r,[e.entry,i]);var o,a=31&(0===n?e.keyHash:e.keyHash>>>n),s=31&(0===n?r:r>>>n);return new Ne(t,1<<a|1<<s,a===s?[$e(e,t,n+5,r,i)]:(o=new Be(t,r,i),a<s?[e,o]:[o,e]))}function Ze(e,t,n){for(var i=[],o=0;o<n.length;o++){var s=n[o],c=r(s);a(s)||(c=c.map((function(e){return re(e)}))),i.push(c)}return Ye(e,t,i)}function Xe(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ae(e,t)?e:t}function Qe(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ae(t,i)?t:i}}function Ye(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,g,(function(e){return e===g?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)})):e.constructor(n[0])}function Je(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,n,r){var i=r?e:_(e);return i[t]=n,i}Me[Ae]=!0,Me.delete=Me.remove,Me.removeIn=Me.deleteIn,De.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ae(n,i[o][0]))return i[o][1];return r},De.prototype.update=function(e,t,n,r,i,o,a){for(var s=i===g,c=this.entries,u=0,l=c.length;u<l&&!ae(r,c[u][0]);u++);var f=u<l;if(f?c[u][1]===i:s)return this;if(b(a),(s||!f)&&b(o),!s||1!==c.length){if(!f&&!s&&c.length>=tt)return function(e,t,n,r){e||(e=new w);for(var i=new Be(e,me(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}(e,c,r,i);var d=e&&e===this.ownerID,p=d?c:_(c);return f?s?u===l-1?p.pop():p[u]=p.pop():p[u]=[r,i]:p.push([r,i]),d?(this.entries=p,this):new De(e,p)}},Ne.prototype.get=function(e,t,n,r){void 0===t&&(t=me(n));var i=1<<(31&(0===e?t:t>>>e)),o=this.bitmap;return 0==(o&i)?r:this.nodes[Je(o&i-1)].get(e+5,t,n,r)},Ne.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=me(r));var s=31&(0===t?n:n>>>t),c=1<<s,u=this.bitmap,l=0!=(u&c);if(!l&&i===g)return this;var f=Je(u&c-1),d=this.nodes,p=l?d[f]:void 0,h=Ge(p,e,t+5,n,r,i,o,a);if(h===p)return this;if(!l&&h&&d.length>=nt)return function(e,t,n,r,i){for(var o=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new Le(e,o+1,a)}(e,d,u,s,h);if(l&&!h&&2===d.length&&Ke(d[1^f]))return d[1^f];if(l&&h&&1===d.length&&Ke(h))return h;var v=e&&e===this.ownerID,m=l?h?u:u^c:u|c,y=l?h?et(d,f,h,v):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}(d,f,v):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s<i;s++)s===t?(o[s]=n,a=-1):o[s]=e[s+a];return o}(d,f,h,v);return v?(this.bitmap=m,this.nodes=y,this):new Ne(e,m,y)},Le.prototype.get=function(e,t,n,r){void 0===t&&(t=me(n));var i=31&(0===e?t:t>>>e),o=this.nodes[i];return o?o.get(e+5,t,n,r):r},Le.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=me(r));var s=31&(0===t?n:n>>>t),c=i===g,u=this.nodes,l=u[s];if(c&&!l)return this;var f=Ge(l,e,t+5,n,r,i,o,a);if(f===l)return this;var d=this.count;if(l){if(!f&&--d<rt)return function(e,t,n,r){for(var i=0,o=0,a=new Array(n),s=0,c=1,u=t.length;s<u;s++,c<<=1){var l=t[s];void 0!==l&&s!==r&&(i|=c,a[o++]=l)}return new Ne(e,i,a)}(e,u,d,s)}else d++;var p=e&&e===this.ownerID,h=et(u,s,f,p);return p?(this.count=d,this.nodes=h,this):new Le(e,d,h)},ze.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ae(n,i[o][0]))return i[o][1];return r},ze.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=me(r));var s=i===g;if(n!==this.keyHash)return s?this:(b(a),b(o),$e(this,e,t,n,[r,i]));for(var c=this.entries,u=0,l=c.length;u<l&&!ae(r,c[u][0]);u++);var f=u<l;if(f?c[u][1]===i:s)return this;if(b(a),(s||!f)&&b(o),s&&2===l)return new Be(e,this.keyHash,c[1^u]);var d=e&&e===this.ownerID,p=d?c:_(c);return f?s?u===l-1?p.pop():p[u]=p.pop():p[u]=[r,i]:p.push([r,i]),d?(this.entries=p,this):new ze(e,this.keyHash,p)},Be.prototype.get=function(e,t,n,r){return ae(n,this.entry[0])?this.entry[1]:r},Be.prototype.update=function(e,t,n,r,i,o,a){var s=i===g,c=ae(r,this.entry[0]);return(c?i===this.entry[1]:s)?this:(b(a),s?void b(o):c?e&&e===this.ownerID?(this.entry[1]=i,this):new Be(e,this.keyHash,[r,i]):(b(o),$e(this,e,t,me(r),[r,i])))},De.prototype.iterate=ze.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Ne.prototype.iterate=Le.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},Be.prototype.iterate=function(e,t){return e(this.entry)},t(Fe,M),Fe.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return We(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return We(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return We(e,o.entry);t=this._stack=He(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var tt=8,nt=16,rt=8;function it(e){var t=ht();if(null==e)return t;if(ot(e))return e;var n=i(e),r=n.size;return 0===r?t:(je(r),r>0&&r<32?pt(0,r,5,null,new ct(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function ot(e){return!(!e||!e[at])}t(it,pe),it.of=function(){return this(arguments)},it.prototype.toString=function(){return this.__toString("List [","]")},it.prototype.get=function(e,t){if((e=O(this,e))>=0&&e<this.size){var n=mt(this,e+=this._origin);return n&&n.array[31&e]}return t},it.prototype.set=function(e,t){return function(e,t,n){if((t=O(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?yt(e,t).set(0,n):yt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o=y(m);return t>=wt(e._capacity)?r=gt(r,e.__ownerID,0,t,n,o):i=gt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):pt(e._origin,e._capacity,e._level,i,r):e}(this,e,t)},it.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},it.prototype.insert=function(e,t){return this.splice(e,0,t)},it.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ht()},it.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){yt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},it.prototype.pop=function(){return yt(this,0,-1)},it.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){yt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},it.prototype.shift=function(){return yt(this,1)},it.prototype.merge=function(){return bt(this,void 0,arguments)},it.prototype.mergeWith=function(t){var n=e.call(arguments,1);return bt(this,t,n)},it.prototype.mergeDeep=function(){return bt(this,Xe,arguments)},it.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return bt(this,Qe(t),n)},it.prototype.setSize=function(e){return yt(this,0,e)},it.prototype.slice=function(e,t){var n=this.size;return E(e,t,n)?this:yt(this,C(e,n),k(t,n))},it.prototype.__iterator=function(e,t){var n=0,r=dt(this,t);return new M((function(){var t=r();return t===ft?{value:void 0,done:!0}:D(e,n++,t)}))},it.prototype.__iterate=function(e,t){for(var n,r=0,i=dt(this,t);(n=i())!==ft&&!1!==e(n,r++,this););return r},it.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?pt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},it.isList=ot;var at="@@__IMMUTABLE_LIST__@@",st=it.prototype;function ct(e,t){this.array=e,this.ownerID=t}st[at]=!0,st.delete=st.remove,st.setIn=Me.setIn,st.deleteIn=st.removeIn=Me.removeIn,st.update=Me.update,st.updateIn=Me.updateIn,st.mergeIn=Me.mergeIn,st.mergeDeepIn=Me.mergeDeepIn,st.withMutations=Me.withMutations,st.asMutable=Me.asMutable,st.asImmutable=Me.asImmutable,st.wasAltered=Me.wasAltered,ct.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&31;if(r>=this.array.length)return new ct([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var s=vt(this,e);if(!o)for(var c=0;c<r;c++)s.array[c]=void 0;return i&&(s.array[r]=i),s},ct.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&31;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=vt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var ut,lt,ft={};function dt(e,t){var n=e._origin,r=e._capacity,i=wt(r),o=e._tail;return a(e._root,e._level,0);function a(e,s,c){return 0===s?function(e,a){var s=a===i?o&&o.array:e&&e.array,c=a>n?0:n-a,u=r-a;return u>32&&(u=32),function(){if(c===u)return ft;var e=t?--u:c++;return s&&s[e]}}(e,c):function(e,i,o){var s,c=e&&e.array,u=o>n?0:n-o>>i,l=1+(r-o>>i);return l>32&&(l=32),function(){for(;;){if(s){var e=s();if(e!==ft)return e;s=null}if(u===l)return ft;var n=t?--l:u++;s=a(c&&c[n],i-5,o+(n<<i))}}}(e,s,c)}}function pt(e,t,n,r,i,o,a){var s=Object.create(st);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function ht(){return ut||(ut=pt(0,0,5))}function gt(e,t,n,r,i,o){var a,s=r>>>n&31,c=e&&s<e.array.length;if(!c&&void 0===i)return e;if(n>0){var u=e&&e.array[s],l=gt(u,t,n-5,r,i,o);return l===u?e:((a=vt(e,t)).array[s]=l,a)}return c&&e.array[s]===i?e:(b(o),a=vt(e,t),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function vt(e,t){return t&&e&&t===e.ownerID?e:new ct(e?e.array.slice():[],t)}function mt(e,t){if(t>=wt(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&31],r-=5;return n}}function yt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new w,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var c=e._level,u=e._root,l=0;a+l<0;)u=new ct(u&&u.array.length?[void 0,u]:[],r),l+=1<<(c+=5);l&&(a+=l,i+=l,s+=l,o+=l);for(var f=wt(o),d=wt(s);d>=1<<c+5;)u=new ct(u&&u.array.length?[u]:[],r),c+=5;var p=e._tail,h=d<f?mt(e,s-1):d>f?new ct([],r):p;if(p&&d>f&&a<o&&p.array.length){for(var g=u=vt(u,r),v=c;v>5;v-=5){var m=f>>>v&31;g=g.array[m]=vt(g.array[m],r)}g.array[f>>>5&31]=p}if(s<o&&(h=h&&h.removeAfter(r,0,s)),a>=d)a-=d,s-=d,c=5,u=null,h=h&&h.removeBefore(r,0,a);else if(a>i||d<f){for(l=0;u;){var y=a>>>c&31;if(y!==d>>>c&31)break;y&&(l+=(1<<c)*y),c-=5,u=u.array[y]}u&&a>i&&(u=u.removeBefore(r,c,a-l)),u&&d<f&&(u=u.removeAfter(r,c,d-l)),l&&(a-=l,s-=l)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=c,e._root=u,e._tail=h,e.__hash=void 0,e.__altered=!0,e):pt(a,s,c,u,h)}function bt(e,t,n){for(var r=[],o=0,s=0;s<n.length;s++){var c=n[s],u=i(c);u.size>o&&(o=u.size),a(c)||(u=u.map((function(e){return re(e)}))),r.push(u)}return o>e.size&&(e=e.setSize(o)),Ye(e,t,r)}function wt(e){return e<32?0:e-1>>>5<<5}function _t(e){return null==e?St():xt(e)?e:St().withMutations((function(t){var n=r(e);je(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function xt(e){return Ie(e)&&l(e)}function Ot(e,t,n,r){var i=Object.create(_t.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function St(){return lt||(lt=Ot(Ue(),ht()))}function Et(e,t,n){var r,i,o=e._map,a=e._list,s=o.get(t),c=void 0!==s;if(n===g){if(!c)return e;a.size>=32&&a.size>=2*o.size?(r=(i=a.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(c){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Ot(r,i)}function Ct(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function kt(e){this._iter=e,this.size=e.size}function Tt(e){this._iter=e,this.size=e.size}function jt(e){this._iter=e,this.size=e.size}function Pt(e){var t=Gt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Kt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new M((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function It(e,t,n){var r=Gt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,g);return o===g?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate((function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new M((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return D(r,s,t.call(n,a[1],s,e),i)}))},r}function Rt(e,t){var n=Gt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Pt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Kt,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function At(e,t,n,r){var i=Gt(e);return r&&(i.has=function(r){var i=e.get(r,g);return i!==g&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,g);return o!==g&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate((function(e,o,c){if(t.call(n,e,o,c))return s++,i(e,r?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),s=0;return new M((function(){for(;;){var o=a.next();if(o.done)return o;var c=o.value,u=c[0],l=c[1];if(t.call(n,l,u,e))return D(i,r?u:s++,l,o)}}))},i}function Mt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),E(t,n,i))return e;var o=C(t,i),a=k(n,i);if(o!=o||a!=a)return Mt(e.toSeq().cacheResult(),t,n,r);var s,c=a-o;c==c&&(s=c<0?0:c);var u=Gt(e);return u.size=0===s?s:e.size&&s||void 0,!r&&X(e)&&s>=0&&(u.get=function(t,n){return(t=O(this,t))>=0&&t<s?e.get(t+o,n):n}),u.__iterateUncached=function(t,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,c=!0,u=0;return e.__iterate((function(e,n){if(!c||!(c=a++<o))return u++,!1!==t(e,r?n:u-1,i)&&u!==s})),u},u.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var i=0!==s&&e.__iterator(t,n),a=0,c=0;return new M((function(){for(;a++<o;)i.next();if(++c>s)return{value:void 0,done:!0};var e=i.next();return r||1===t?e:D(t,c-1,0===t?void 0:e.value[1],e)}))},u}function Dt(e,t,n,r){var i=Gt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,c=0;return e.__iterate((function(e,o,u){if(!s||!(s=t.call(n,e,o,u)))return c++,i(e,r?o:c-1,a)})),c},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(2,o),c=!0,u=0;return new M((function(){var e,o,l;do{if((e=s.next()).done)return r||1===i?e:D(i,u++,0===i?void 0:e.value[1],e);var f=e.value;o=f[0],l=f[1],c&&(c=t.call(n,l,o,a))}while(c);return 2===i?e:D(i,o,l,e)}))},i}function Nt(e,t){var n=s(e),i=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?Y(e):J(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&s(o)||c(e)&&c(o))return o}var u=new G(i);return n?u=u.toKeyedSeq():c(e)||(u=u.toSetSeq()),(u=u.flatten(!0)).size=i.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),u}function Lt(e,t,n){var r=Gt(e);return r.__iterateUncached=function(r,i){var o=0,s=!1;return function e(c,u){var l=this;c.__iterate((function(i,c){return(!t||u<t)&&a(i)?e(i,u+1):!1===r(i,n?c:o++,l)&&(s=!0),!s}),i)}(e,0),o},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),s=[],c=0;return new M((function(){for(;o;){var e=o.next();if(!1===e.done){var u=e.value;if(2===r&&(u=u[1]),t&&!(s.length<t)||!a(u))return n?e:D(r,c++,u,e);s.push(o),o=u.__iterator(r,i)}else o=s.pop()}return{value:void 0,done:!0}}))},r}function zt(e,t,n){t||(t=$t);var r=s(e),i=0,o=e.toSeq().map((function(t,r){return[r,t,i++,n?n(t,r,e):t]})).toArray();return o.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?V(o):c(e)?U(o):q(o)}function Bt(e,t,n){if(t||(t=$t),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return Ft(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return Ft(t,e,n)?n:e}))}function Ft(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function Wt(e,t,r){var i=Gt(e);return i.size=new G(r).map((function(e){return e.size})).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map((function(e){return e=n(e),B(i?e.reverse():e)})),a=0,s=!1;return new M((function(){var n;return s||(n=o.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?{value:void 0,done:!0}:D(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function Ht(e,t){return X(e)?t:e.constructor(t)}function Vt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ut(e){return je(e.size),x(e)}function qt(e){return s(e)?r:c(e)?i:o}function Gt(e){return Object.create((s(e)?V:c(e)?U:q).prototype)}function Kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):H.prototype.cacheResult.call(this)}function $t(e,t){return e>t?1:e<t?-1:0}function Zt(e){var t=B(e);if(!t){if(!W(e))throw new TypeError("Expected iterable or array-like: "+e);t=B(n(e))}return t}function Xt(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);!function(e,t){try{t.forEach(en.bind(void 0,e))}catch(e){}}(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=Pe(o)},i=r.prototype=Object.create(Qt);return i.constructor=r,r}t(_t,Pe),_t.of=function(){return this(arguments)},_t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},_t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},_t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):St()},_t.prototype.set=function(e,t){return Et(this,e,t)},_t.prototype.remove=function(e){return Et(this,e,g)},_t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},_t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},_t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},_t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Ot(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},_t.isOrderedMap=xt,_t.prototype[h]=!0,_t.prototype.delete=_t.prototype.remove,t(Ct,V),Ct.prototype.get=function(e,t){return this._iter.get(e,t)},Ct.prototype.has=function(e){return this._iter.has(e)},Ct.prototype.valueSeq=function(){return this._iter.valueSeq()},Ct.prototype.reverse=function(){var e=this,t=Rt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Ct.prototype.map=function(e,t){var n=this,r=It(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Ct.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ut(this):0,function(i){return e(i,t?--n:n++,r)}),t)},Ct.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(1,t),r=t?Ut(this):0;return new M((function(){var i=n.next();return i.done?i:D(e,t?--r:r++,i.value,i)}))},Ct.prototype[h]=!0,t(kt,U),kt.prototype.includes=function(e){return this._iter.includes(e)},kt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t),r=0;return new M((function(){var t=n.next();return t.done?t:D(e,r++,t.value,t)}))},t(Tt,q),Tt.prototype.has=function(e){return this._iter.includes(e)},Tt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Tt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new M((function(){var t=n.next();return t.done?t:D(e,t.value,t.value,t)}))},t(jt,V),jt.prototype.entrySeq=function(){return this._iter.toSeq()},jt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){Vt(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},jt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new M((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Vt(r);var i=a(r);return D(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}}))},kt.prototype.cacheResult=Ct.prototype.cacheResult=Tt.prototype.cacheResult=jt.prototype.cacheResult=Kt,t(Xt,de),Xt.prototype.toString=function(){return this.__toString(Jt(this)+" {","}")},Xt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Xt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Xt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Yt(this,Ue()))},Xt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Jt(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Yt(this,n)},Xt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Yt(this,t)},Xt.prototype.wasAltered=function(){return this._map.wasAltered()},Xt.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},Xt.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},Xt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Yt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Qt=Xt.prototype;function Yt(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Jt(e){return e._name||e.constructor.name||"Record"}function en(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){ue(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function tn(e){return null==e?un():nn(e)&&!l(e)?e:un().withMutations((function(t){var n=o(e);je(n.size),n.forEach((function(e){return t.add(e)}))}))}function nn(e){return!(!e||!e[on])}Qt.delete=Qt.remove,Qt.deleteIn=Qt.removeIn=Me.removeIn,Qt.merge=Me.merge,Qt.mergeWith=Me.mergeWith,Qt.mergeIn=Me.mergeIn,Qt.mergeDeep=Me.mergeDeep,Qt.mergeDeepWith=Me.mergeDeepWith,Qt.mergeDeepIn=Me.mergeDeepIn,Qt.setIn=Me.setIn,Qt.update=Me.update,Qt.updateIn=Me.updateIn,Qt.withMutations=Me.withMutations,Qt.asMutable=Me.asMutable,Qt.asImmutable=Me.asImmutable,t(tn,he),tn.of=function(){return this(arguments)},tn.fromKeys=function(e){return this(r(e).keySeq())},tn.prototype.toString=function(){return this.__toString("Set {","}")},tn.prototype.has=function(e){return this._map.has(e)},tn.prototype.add=function(e){return sn(this,this._map.set(e,!0))},tn.prototype.remove=function(e){return sn(this,this._map.remove(e))},tn.prototype.clear=function(){return sn(this,this._map.clear())},tn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},tn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return o(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},tn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return o(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},tn.prototype.merge=function(){return this.union.apply(this,arguments)},tn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},tn.prototype.sort=function(e){return ln(zt(this,e))},tn.prototype.sortBy=function(e,t){return ln(zt(this,t,e))},tn.prototype.wasAltered=function(){return this._map.wasAltered()},tn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},tn.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},tn.isSet=nn;var rn,on="@@__IMMUTABLE_SET__@@",an=tn.prototype;function sn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function cn(e,t){var n=Object.create(an);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function un(){return rn||(rn=cn(Ue()))}function ln(e){return null==e?gn():fn(e)?e:gn().withMutations((function(t){var n=o(e);je(n.size),n.forEach((function(e){return t.add(e)}))}))}function fn(e){return nn(e)&&l(e)}an[on]=!0,an.delete=an.remove,an.mergeDeep=an.merge,an.mergeDeepWith=an.mergeWith,an.withMutations=Me.withMutations,an.asMutable=Me.asMutable,an.asImmutable=Me.asImmutable,an.__empty=un,an.__make=cn,t(ln,tn),ln.of=function(){return this(arguments)},ln.fromKeys=function(e){return this(r(e).keySeq())},ln.prototype.toString=function(){return this.__toString("OrderedSet {","}")},ln.isOrderedSet=fn;var dn,pn=ln.prototype;function hn(e,t){var n=Object.create(pn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function gn(){return dn||(dn=hn(St()))}function vn(e){return null==e?xn():mn(e)?e:xn().unshiftAll(e)}function mn(e){return!(!e||!e[bn])}pn[h]=!0,pn.__empty=gn,pn.__make=hn,t(vn,pe),vn.of=function(){return this(arguments)},vn.prototype.toString=function(){return this.__toString("Stack [","]")},vn.prototype.get=function(e,t){var n=this._head;for(e=O(this,e);n&&e--;)n=n.next;return n?n.value:t},vn.prototype.peek=function(){return this._head&&this._head.value},vn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):_n(e,t)},vn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;je(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):_n(t,n)},vn.prototype.pop=function(){return this.slice(1)},vn.prototype.unshift=function(){return this.push.apply(this,arguments)},vn.prototype.unshiftAll=function(e){return this.pushAll(e)},vn.prototype.shift=function(){return this.pop.apply(this,arguments)},vn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):xn()},vn.prototype.slice=function(e,t){if(E(e,t,this.size))return this;var n=C(e,this.size);if(k(t,this.size)!==this.size)return pe.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):_n(r,i)},vn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?_n(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},vn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},vn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new M((function(){if(r){var t=r.value;return r=r.next,D(e,n++,t)}return{value:void 0,done:!0}}))},vn.isStack=mn;var yn,bn="@@__IMMUTABLE_STACK__@@",wn=vn.prototype;function _n(e,t,n,r){var i=Object.create(wn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function xn(){return yn||(yn=_n(0))}function On(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}wn[bn]=!0,wn.withMutations=Me.withMutations,wn.asMutable=Me.asMutable,wn.asImmutable=Me.asImmutable,wn.wasAltered=Me.wasAltered,n.Iterator=M,On(n,{toArray:function(){je(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Ct(this,!0)},toMap:function(){return Pe(this.toKeyedSeq())},toObject:function(){je(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return _t(this.toKeyedSeq())},toOrderedSet:function(){return ln(s(this)?this.valueSeq():this)},toSet:function(){return tn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Tt(this)},toSeq:function(){return c(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return vn(s(this)?this.valueSeq():this)},toList:function(){return it(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Ht(this,Nt(this,t))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){je(this.size);var n=!0;return this.__iterate((function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1})),n},filter:function(e,t){return Ht(this,At(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return je(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){je(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return Ht(this,It(this,e,t))},reduce:function(e,t,n){var r,i;return je(this.size),arguments.length<2?i=!0:r=t,this.__iterate((function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Ht(this,Rt(this,!0))},slice:function(e,t){return Ht(this,Mt(this,e,t,!0))},some:function(e,t){return!this.every(Tn(e),t)},sort:function(e){return Ht(this,zt(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return x(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Pe().asMutable();return e.__iterate((function(i,o){r.update(t.call(n,i,o,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return se(this,e)},entrySeq:function(){var e=this;if(e._cache)return new G(e._cache);var t=e.toSeq().map(kn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Tn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(S)},flatMap:function(e,t){return Ht(this,function(e,t,n){var r=qt(e);return e.toSeq().map((function(i,o){return r(t.call(n,i,o,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return Ht(this,Lt(this,e,!0))},fromEntrySeq:function(){return new jt(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,i=Zt(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,g):g)===g)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=s(e),i=(l(e)?_t():Pe()).asMutable();e.__iterate((function(o,a){i.update(t.call(n,o,a,e),(function(e){return(e=e||[]).push(r?[a,o]:o),e}))}));var o=qt(e);return i.map((function(t){return Ht(e,o(t))}))}(this,e,t)},has:function(e){return this.get(e,g)!==g},hasIn:function(e){return this.getIn(e,g)!==g},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},keySeq:function(){return this.toSeq().map(Cn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Bt(this,e)},maxBy:function(e,t){return Bt(this,t,e)},min:function(e){return Bt(this,e?jn(e):Rn)},minBy:function(e,t){return Bt(this,t?jn(t):Rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Ht(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Ht(this,Dt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Tn(e),t)},sortBy:function(e,t){return Ht(this,zt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Ht(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Ht(this,function(e,t,n){var r=Gt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate((function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)})),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(2,i),s=!0;return new M((function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,c=i[0],u=i[1];return t.call(n,u,c,o)?2===r?e:D(r,c,u,e):(s=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Tn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=l(e),n=s(e),r=t?1:0;return function(e,t){return t=ge(t,3432918353),t=ge(t<<15|t>>>-15,461845907),t=ge(t<<13|t>>>-13,5),t=ge((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ve((t=ge(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+An(me(e),me(t))|0}:function(e,t){r=r+An(me(e),me(t))|0}:t?function(e){r=31*r+me(e)|0}:function(e){r=r+me(e)|0}),r)}(this))}});var Sn=n.prototype;Sn[f]=!0,Sn[A]=Sn.values,Sn.__toJS=Sn.toArray,Sn.__toStringMapper=Pn,Sn.inspect=Sn.toSource=function(){return this.toString()},Sn.chain=Sn.flatMap,Sn.contains=Sn.includes,On(r,{flip:function(){return Ht(this,Pt(this))},mapEntries:function(e,t){var n=this,r=0;return Ht(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Ht(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var En=r.prototype;function Cn(e,t){return t}function kn(e,t){return[t,e]}function Tn(e){return function(){return!e.apply(this,arguments)}}function jn(e){return function(){return-e.apply(this,arguments)}}function Pn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function In(){return _(arguments)}function Rn(e,t){return e<t?1:e>t?-1:0}function An(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return En[d]=!0,En[A]=Sn.entries,En.__toJS=Sn.toObject,En.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Pn(e)},On(i,{toKeyedSeq:function(){return new Ct(this,!1)},filter:function(e,t){return Ht(this,At(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Ht(this,Rt(this,!1))},slice:function(e,t){return Ht(this,Mt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=C(e,e<0?this.count():this.size);var r=this.slice(0,e);return Ht(this,1===n?r:r.concat(_(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return Ht(this,Lt(this,e,!1))},get:function(e,t){return(e=O(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=O(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return Ht(this,function(e,t){var n=Gt(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate((function(e,r){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)}),r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(1,r),a=0;return new M((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?D(n,a++,t):D(n,a++,i.value,i)}))},n}(this,e))},interleave:function(){var e=[this].concat(_(arguments)),t=Wt(this.toSeq(),U.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),Ht(this,n)},keySeq:function(){return le(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return Ht(this,Dt(this,e,t,!1))},zip:function(){var e=[this].concat(_(arguments));return Ht(this,Wt(this,In,e))},zipWith:function(e){var t=_(arguments);return t[0]=this,Ht(this,Wt(this,e,t))}}),i.prototype[p]=!0,i.prototype[h]=!0,On(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Sn.includes,o.prototype.contains=o.prototype.includes,On(V,r.prototype),On(U,i.prototype),On(q,o.prototype),On(de,r.prototype),On(pe,i.prototype),On(he,o.prototype),{Iterable:n,Seq:H,Collection:fe,Map:Pe,OrderedMap:_t,List:it,Stack:vn,Set:tn,OrderedSet:ln,Record:Xt,Range:le,Repeat:ce,is:ae,fromJS:re}}()},function(e,t){e.exports=function(e){return void 0===e}},,,function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),u=1;u<arguments.length;u++){for(var l in n=Object(arguments[u]))i.call(n,l)&&(c[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(c[s[f]]=n[s[f]])}}return c}},function(e,t,n){"use strict";n.r(t);var r=n(454);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";var r={encode:function(e,t,n){return e+"-"+t+"-"+n},decode:function(e){var t=e.split("-").reverse(),n=t[0],r=t[1];return{blockKey:t.slice(2).reverse().join("-"),decoratorKey:parseInt(r,10),leafKey:parseInt(n,10)}}};e.exports=r},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){var t=r.useState(e),n=t[0],i=t[1],o=e||n;return r.useEffect((function(){null==n&&i("mui-".concat(Math.round(1e5*Math.random())))}),[n]),o}},function(e,t,n){"use strict";var r=n(331);t.a=function(e,t){return t?Object(r.a)(e,t,{clone:!1}):e}},function(e,t,n){"use strict";var r=n(5),i=n(0),o=n.n(i),a=n(574),s=["classes","className"];function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e){var t=e.classes,n=e.className,r=c(e,s),i=[n,t.shadowScrollDialog].join(" ");return o.a.createElement(a.a,Object.assign({className:i},r))}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}u.defaultProps={className:""};t.a=Object(r.a)((function(e){var t;return{shadowScrollDialog:(t={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%,"},l(t,"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%;"),l(t,"backgroundAttachment","local, local, scroll, scroll"),l(t,"backgroundRepeat","no-repeat"),l(t,"backgroundSize","100% 40px, 100% 40px, 100% 14px, 100% 14px"),l(t,"overflowY","auto"),t)}}))(u)},function(e,t,n){var r=n(203);e.exports=function(e){return(null==e?0:e.length)?r(e,1/0):[]}},function(e,t){e.exports=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}},function(e,t,n){"use strict";var r=n(4),i=n(1),o=n(0),a=(n(2),n(3)),s=n(5),c=o.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.component,u=void 0===c?"div":c,l=e.square,f=void 0!==l&&l,d=e.elevation,p=void 0===d?1:d,h=e.variant,g=void 0===h?"elevation":h,v=Object(r.a)(e,["classes","className","component","square","elevation","variant"]);return o.createElement(u,Object(i.a)({className:Object(a.a)(n.root,s,"outlined"===g?n.outlined:n["elevation".concat(p)],!f&&n.rounded),ref:t},v))}));t.a=Object(s.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(i.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(c)},,function(e,t,n){var r=n(197),i=n(771),o=n(772),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){"use strict";n.r(t);var r=n(574);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(299);n.d(t,"a",(function(){return r.b})),n.d(t,"b",(function(){return r.c}))},function(e,t,n){"use strict";e.exports=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]}},function(e,t,n){"use strict";for(var r=n(150),i=[],o=0;o<256;++o)i.push((o+256).toString(16).substr(1));t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase();if(!Object(r.a)(n))throw TypeError("Stringified UUID is invalid");return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"getCompanionWindows",(function(){return p})),n.d(t,"getCompanionWindow",(function(){return h})),n.d(t,"getThumbnailNavigationPosition",(function(){return g})),n.d(t,"getCompanionWindowsForPosition",(function(){return w})),n.d(t,"getCompanionWindowsForContent",(function(){return _})),n.d(t,"getCompanionWindowIdsForPosition",(function(){return O})),n.d(t,"getCompanionAreaVisibility",(function(){return S})),n.d(t,"selectCompanionWindowDimensions",(function(){return E}));var r=n(10),i=n(462),o=n.n(i),a=n(46),s=n(38);function c(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){return Object(a.a)(e).companionWindows||{}}var h=Object(r.createSelector)([p,function(e,t){return t.companionWindowId}],(function(e,t){return t&&e[t]})),g=Object(r.createSelector)([s.e,p],(function(e,t){return e&&t[e.thumbnailNavigationId]&&t[e.thumbnailNavigationId].position})),v=Object(r.createSelector)([s.h,p],(function(e,t){return(Object.keys(e)||[]).reduce((function(n,r){return f(f({},n),{},d({},r,o()(e[r].companionWindowIds,(function(e){return t[e]&&t[e].position}))))}),{})})),m=Object(r.createSelector)([s.h,p],(function(e,t){return(Object.keys(e)||[]).reduce((function(n,r){return f(f({},n),{},d({},r,o()(e[r].companionWindowIds.map((function(e){return t[e]})),(function(e){return e.position}))))}),{})})),y=Object(r.createSelector)([function(e,t){return t.windowId},m],(function(e,t){return t[e]||{}})),b=Object(r.createSelector)([function(e,t){return t.windowId},v],(function(e,t){return t[e]||{}})),w=Object(r.createSelector)([y,function(e,t){return{position:t.position}}],(function(e,t){return e[t.position]||x})),_=Object(r.createSelector)([y,function(e,t){return{content:t.content}}],(function(e,t){var n,r=t.content;return(n=[]).concat.apply(n,c(Object.values(e))).filter((function(e){return e.content===r}))})),x=[],O=Object(r.createSelector)([b,function(e,t){return{position:t.position}}],(function(e,t){return e[t.position]||x})),S=Object(r.createSelector)([function(e,t){return t.position},s.e],(function(e,t){if(!t)return!1;var n=t.companionAreaOpen,r=t.sideBarOpen;return"left"!==e||!(!n||!r)})),E=Object(r.createSelector)([y],(function(e){var t,n=0,r=0;return(t=[]).concat.apply(t,c(Object.values(e))).forEach((function(e){e.position.match(/right/)&&(n+=235),e.position.match(/bottom/)&&(r+=201)})),{height:r,width:n}}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(47);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t.a=function(e){return"string"==typeof e&&r.test(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),i=n.n(r),o=n(96),a=n(72),s=n(14);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(p,e);var t,n,r,d=f(p);function p(){return c(this,p),d.apply(this,arguments)}return t=p,(n=[{key:"render",value:function(){var e=this.props,t=e.defaultLabel,n=e.labelValuePairs;return 0===n.length?i.a.createElement(i.a.Fragment,null):i.a.createElement("dl",{className:Object(s.a)("label-value-metadata")},n.reduce((function(e,n,r){return e.concat([i.a.createElement(o.a,{component:"dt",key:"label-".concat(r),variant:"subtitle2"},n.label||t),i.a.createElement(o.a,{style:{marginBottom:".5em",marginLeft:"0px"},component:"dd",key:"value-".concat(r),variant:"body1"},i.a.createElement(a.a,{htmlString:n.values.join(", "),ruleSet:"iiif"}))])}),[]))}}])&&u(t.prototype,n),r&&u(t,r),p}(r.Component);h.defaultProps={defaultLabel:void 0}},function(e,t,n){"use strict";function r(e,t,n){var r=n.getRegistry(),i=r.addTarget(e,t);return[i,function(){return r.removeTarget(i)}]}function i(e,t,n){var r=n.getRegistry(),i=r.addSource(e,t);return[i,function(){return r.removeSource(i)}]}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}))},function(e,t,n){var r=n(650)("update",n(459));r.placeholder=n(447),e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(17),o=n(182);function a(){var e=Object(r.useContext)(o.a).dragDropManager;return Object(i.a)(null!=e,"Expected drag drop context"),e}},function(e,t,n){"use strict";const r="undefined"==typeof URL?n(839).URL:URL,i=(e,t)=>t.some(t=>t instanceof RegExp?t.test(e):t===e),o=(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((e,{stripHash:t})=>{const n=e.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!n)throw new Error("Invalid URL: "+e);const r=n[1].split(";"),i=n[2],o=t?"":n[3];let a=!1;"base64"===r[r.length-1]&&(r.pop(),a=!0);const s=(r.shift()||"").toLowerCase(),c=[...r.map(e=>{let[t,n=""]=e.split("=").map(e=>e.trim());return"charset"===t&&(n=n.toLowerCase(),"us-ascii"===n)?"":`${t}${n?"="+n:""}`}).filter(Boolean)];return a&&c.push("base64"),(0!==c.length||s&&"text/plain"!==s)&&c.unshift(s),`data:${c.join(";")},${a?i.trim():i}${o?"#"+o:""}`})(e,t);const n=e.startsWith("//");!n&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const o=new r(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===o.protocol&&(o.protocol="http:"),t.forceHttps&&"http:"===o.protocol&&(o.protocol="https:"),t.stripAuthentication&&(o.username="",o.password=""),t.stripHash&&(o.hash=""),o.pathname&&(o.pathname=o.pathname.replace(/((?!:).|^)\/{2,}/g,(e,t)=>/^(?!\/)/g.test(t)?t+"/":"/")),o.pathname&&(o.pathname=decodeURI(o.pathname)),!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=o.pathname.split("/");const n=e[e.length-1];i(n,t.removeDirectoryIndex)&&(e=e.slice(0,e.length-1),o.pathname=e.slice(1).join("/")+"/")}if(o.hostname&&(o.hostname=o.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...o.searchParams.keys()])i(e,t.removeQueryParameters)&&o.searchParams.delete(e);return t.sortQueryParameters&&o.searchParams.sort(),t.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,"")),e=o.toString(),!t.removeTrailingSlash&&"/"!==o.pathname||""!==o.hash||(e=e.replace(/\/$/,"")),n&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e};e.exports=o,e.exports.default=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(70),i=n(53);function o(e,t){if(t&&("object"===Object(r.a)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(i.a)(e)}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t){function n(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),a=t.get(o);return void 0===a&&(a=e.call(this,r),t.set(o,a)),a}function r(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function i(e,t,n,r,i){return n.bind(t,e,r,i)}function o(e,t){return i(e,this,1===e.length?n:r,t.cache.create(),t.serializer)}function a(){return JSON.stringify(arguments)}function s(){this.cache=Object.create(null)}s.prototype.has=function(e){return e in this.cache},s.prototype.get=function(e){return this.cache[e]},s.prototype.set=function(e,t){this.cache[e]=t};var c={create:function(){return new s}};e.exports=function(e,t){var n=t&&t.cache?t.cache:c,r=t&&t.serializer?t.serializer:a;return(t&&t.strategy?t.strategy:o)(e,{cache:n,serializer:r})},e.exports.strategies={variadic:function(e,t){return i(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,t){return i(e,this,n,t.cache.create(),t.serializer)}}},,,,,,function(e,t,n){var r=n(770),i=n(775);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(537),i=n(399),o=n(166);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){var r=n(179),i=n(397);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){var r=n(786),i=n(820),o=n(202),a=n(56),s=n(827);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(201);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){"use strict";n.r(t);var r=n(573);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(81);n.d(t,"a",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(98),i=n(236),o=n(40),a=o.List,s=o.Map,c=o.OrderedSet,u=o.Record,l=o.Repeat,f=c(),d=u({key:"",type:"unstyled",text:"",characterList:a(),depth:0,data:s()}),p=function(e){var t,n;function o(t){return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(l(r.EMPTY,n.length))),e}(t))||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=o.prototype;return s.getKey=function(){return this.get("key")},s.getType=function(){return this.get("type")},s.getText=function(){return this.get("text")},s.getCharacterList=function(){return this.get("characterList")},s.getLength=function(){return this.getText().length},s.getDepth=function(){return this.get("depth")},s.getData=function(){return this.get("data")},s.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():f},s.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},s.findStyleRanges=function(e,t){i(this.getCharacterList(),h,e,t)},s.findEntityRanges=function(e,t){i(this.getCharacterList(),g,e,t)},o}(d);function h(e,t){return e.getStyle()===t.getStyle()}function g(e,t){return e.getEntity()===t.getEntity()}e.exports=p},function(e,t,n){"use strict";function r(e){return e.replace(/\//g,"-")}e.exports=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(r).join(" "):Array.prototype.map.call(arguments,r).join(" ")}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}},function(e,t,n){"use strict";var r=n(42),i=/[\uD800-\uDFFF]/;function o(e){return 55296<=e&&e<=57343}function a(e){return i.test(e)}function s(e,t){return 1+o(e.charCodeAt(t))}function c(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!a(e))return e.substr(t,n);var r=e.length;if(r<=0||t>r||n<=0)return"";var i=0;if(t>0){for(;t>0&&i<r;t--)i+=s(e,i);if(i>=r)return""}else if(t<0){for(i=r;t<0&&0<i;t++)i-=s(e,i-1);i<0&&(i=0)}var o=r;if(n<r)for(o=i;n>0&&o<r;n--)o+=s(e,o);return e.substring(i,o)}var u={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=s(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:s,hasSurrogateUnit:a,isCodeUnitInSurrogateRange:o,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||r(!1),t+1===e.length)return!1;var n=e.charCodeAt(t),i=e.charCodeAt(t+1);return 55296<=n&&n<=56319&&56320<=i&&i<=57343},strlen:function(e){if(!a(e))return e.length;for(var t=0,n=0;n<e.length;n+=s(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return c(e,t=t<n?t:n,r)},substr:c};e.exports=u},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalBlueprint=void 0;var a=o(n(0));!function(e){var t,r,i;try{!function(){var e=new Error("Cannot find module '@blueprintjs/core'");throw e.code="MODULE_NOT_FOUND",e}(),function(){var e=new Error("Cannot find module '@blueprintjs/icons'");throw e.code="MODULE_NOT_FOUND",e}(),t=n(!function(){var e=new Error("Cannot find module '@blueprintjs/core'");throw e.code="MODULE_NOT_FOUND",e}()),r=t.Classes,e.Icon=t.Icon,i=n(!function(){var e=new Error("Cannot find module '@blueprintjs/icons'");throw e.code="MODULE_NOT_FOUND",e}()).IconNames}catch(t){e.Icon=function(e){var t=e.icon;return a.createElement("span",null,t)}}e.getClasses=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r?e.map((function(e){return r[e]})).join(" "):""},e.getIconClass=function(e){return r&&i?r.iconClass(i[e]):""}}(t.OptionalBlueprint||(t.OptionalBlueprint={}))},function(e,t,n){"use strict";n.r(t),n.d(t,"DndContext",(function(){return r.a})),n.d(t,"createDndContext",(function(){return r.b})),n.d(t,"DndProvider",(function(){return i.a})),n.d(t,"DragPreviewImage",(function(){return a})),n.d(t,"useDrag",(function(){return S})),n.d(t,"useDrop",(function(){return E.a})),n.d(t,"useDragLayer",(function(){return C.a})),n.d(t,"DragSource",(function(){return te})),n.d(t,"DropTarget",(function(){return ce})),n.d(t,"DragLayer",(function(){return me}));var r=n(182),i=n(655),o=n(0),a=o.memo((function(e){var t=e.connect,n=e.src;if("undefined"!=typeof Image){var r=new Image;r.src=n,r.onload=function(){return t(r)}}return null}));a.displayName="DragPreviewImage";var s=n(17),c=n(362),u=n(94),l=n(152),f=n(154);function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=!1,h=!1,g=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t,n,r;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){Object(s.a)(!p,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return p=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{p=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;Object(s.a)(!h,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return h=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{h=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&d(t.prototype,n),r&&d(t,r),e}(),v=n(370),m=n(253),y=n(84);function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var w=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Object(v.a)({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,Object(m.a)(e)?n.dragSourceRef=e:n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,Object(m.a)(e)?n.dragPreviewRef=e:n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,n,r;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();t&&this.disconnectDragSource(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)):this.lastConnectedDragSource=e)}},{key:"reconnectDragPreview",value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();this.handlerId?this.dragPreview&&t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.disconnectDragPreview(),this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.disconnectDragPreview()}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!Object(y.a)(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!Object(y.a)(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}}])&&b(t.prototype,n),r&&b(t,r),e}();function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function S(e){var t=Object(o.useRef)(e);t.current=e,Object(s.a)(null!=e.item,"item must be defined"),Object(s.a)(null!=e.item.type,"item type must be defined");var n,r=O((n=Object(f.a)(),[Object(o.useMemo)((function(){return new g(n)}),[n]),Object(o.useMemo)((function(){return new w(n.getBackend())}),[n])]),2),i=r[0],a=r[1];!function(e,t,n){var r=Object(f.a)(),i=Object(o.useMemo)((function(){return{beginDrag:function(){var n=e.current,r=n.begin,i=n.item;if(r){var o=r(t);return Object(s.a)(null==o||"object"===x(o),"dragSpec.begin() must either return an object, undefined, or null"),o||i||{}}return i||{}},canDrag:function(){return"boolean"==typeof e.current.canDrag?e.current.canDrag:"function"!=typeof e.current.canDrag||e.current.canDrag(t)},isDragging:function(n,r){var i=e.current.isDragging;return i?i(t):r===n.getSourceId()},endDrag:function(){var r=e.current.end;r&&r(t.getItem(),t),n.reconnect()}}}),[]);Object(u.a)((function(){var o=_(Object(l.a)(e.current.item.type,i,r),2),a=o[0],s=o[1];return t.receiveHandlerId(a),n.receiveHandlerId(a),s}),[])}(t,i,a);var d=Object(c.a)(i,t.current.collect||function(){return{}},(function(){return a.reconnect()})),p=Object(o.useMemo)((function(){return a.hooks.dragSource()}),[a]),h=Object(o.useMemo)((function(){return a.hooks.dragPreview()}),[a]);return Object(u.a)((function(){a.dragSourceOptions=t.current.options||null,a.reconnect()}),[a]),Object(u.a)((function(){a.dragPreviewOptions=t.current.previewOptions||null,a.reconnect()}),[a]),[d,p,h]}var E=n(668),C=n(654);function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function T(e){return"function"==typeof e}function j(){}function P(e){if(!function(e){return"object"===k(e)&&null!==e}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function I(e){var t=e.current;return null==t?null:t.decoratedRef?t.decoratedRef.current:t}function R(e){return(t=e)&&t.prototype&&"function"==typeof t.prototype.render||function(e){return e&&e.$$typeof&&"Symbol(react.forward_ref)"===e.$$typeof.toString()}(e);var t}var A=n(83),M=n.n(A);function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t,n){return t&&N(e.prototype,t),n&&N(e,n),e}var z=function(){function e(t){D(this,e),this.isDisposed=!1,this.action=T(t)?t:j}return L(e,[{key:"dispose",value:function(){this.isDisposed||(this.action(),this.isDisposed=!0)}}],[{key:"isDisposable",value:function(e){return e&&T(e.dispose)}},{key:"_fixup",value:function(t){return e.isDisposable(t)?t:e.empty}},{key:"create",value:function(t){return new e(t)}}]),e}();z.empty={dispose:j};var B=function(){function e(){D(this,e),this.isDisposed=!1;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.disposables=n}return L(e,[{key:"add",value:function(e){this.isDisposed?e.dispose():this.disposables.push(e)}},{key:"remove",value:function(e){var t=!1;if(!this.isDisposed){var n=this.disposables.indexOf(e);-1!==n&&(t=!0,this.disposables.splice(n,1),e.dispose())}return t}},{key:"clear",value:function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var r=0;r<e;r++)t[r].dispose()}}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var r=0;r<e;r++)t[r].dispose()}}}]),e}(),F=function(){function e(){D(this,e),this.isDisposed=!1}return L(e,[{key:"getDisposable",value:function(){return this.current}},{key:"setDisposable",value:function(e){var t=this.isDisposed;if(!t){var n=this.current;this.current=e,n&&n.dispose()}t&&e&&e.dispose()}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=void 0,e&&e.dispose()}}}]),e}();function W(e){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function U(e,t){return!t||"object"!==W(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e){var t=e.DecoratedComponent,n=e.createHandler,i=e.createMonitor,a=e.createConnector,c=e.registerHandler,u=e.containerDisplayName,l=e.getType,f=e.collect,d=e.options.arePropsEqual,p=void 0===d?y.a:d,h=t,g=t.displayName||t.name||"Component",v=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=U(this,q(t).call(this,e))).decoratedRef=o.createRef(),n.handleChange=function(){var e=n.getCurrentState();Object(y.a)(e,n.state)||n.setState(e)},n.disposable=new F,n.receiveProps(e),n.dispose(),n}var u,d,v;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(t,e),u=t,(d=[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return Object(s.a)(this.decoratedRef.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.decoratedRef.current}},{key:"shouldComponentUpdate",value:function(e,t){return!p(e,this.props)||!Object(y.a)(t,this.state)}},{key:"componentDidMount",value:function(){this.disposable=new F,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()}},{key:"componentDidUpdate",value:function(e){p(this.props,e)||(this.receiveProps(this.props),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"receiveProps",value:function(e){this.handler&&(this.handler.receiveProps(e),this.receiveType(l(e)))}},{key:"receiveType",value:function(e){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&e!==this.currentType){this.currentType=e;var t=H(c(e,this.handler,this.manager),2),n=t[0],r=t[1];this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var i=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new B(new z(i),new z(r)))}}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)}},{key:"getCurrentState",value:function(){return this.handlerConnector?f(this.handlerConnector.hooks,this.handlerMonitor,this.props):{}}},{key:"render",value:function(){var e=this;return o.createElement(r.a.Consumer,null,(function(t){var n=t.dragDropManager;return e.receiveDragDropManager(n),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){return e.handlerConnector.reconnect()})),o.createElement(h,Object.assign({},e.props,e.getCurrentState(),{ref:R(h)?e.decoratedRef:null}))}))}},{key:"receiveDragDropManager",value:function(e){void 0===this.manager&&(Object(s.a)(void 0!==e,"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",g,g),void 0!==e&&(this.manager=e,this.handlerMonitor=i(e),this.handlerConnector=a(e.getBackend()),this.handler=n(this.handlerMonitor,this.decoratedRef)))}}])&&V(u.prototype,d),v&&V(u,v),t}(o.Component);return v.DecoratedComponent=t,v.displayName="".concat(u,"(").concat(g,")"),M()(v,t)}function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){return"string"==typeof e||"symbol"===$(e)||!!t&&Array.isArray(e)&&e.every((function(e){return Z(e,!1)}))}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Q=["canDrag","beginDrag","isDragging","endDrag"],Y=["beginDrag"],J=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=null,this.beginDrag=function(){if(i.props)return i.spec.beginDrag(i.props,i.monitor,i.ref.current)},this.spec=t,this.monitor=n,this.ref=r}var t,n,r;return t=e,(n=[{key:"receiveProps",value:function(e){this.props=e}},{key:"canDrag",value:function(){return!!this.props&&(!this.spec.canDrag||this.spec.canDrag(this.props,this.monitor))}},{key:"isDragging",value:function(e,t){return!!this.props&&(this.spec.isDragging?this.spec.isDragging(this.props,this.monitor):t===e.getSourceId())}},{key:"endDrag",value:function(){this.props&&this.spec.endDrag&&this.spec.endDrag(this.props,this.monitor,I(this.ref))}}])&&X(t.prototype,n),r&&X(t,r),e}();function ee(e){return Object.keys(e).forEach((function(t){Object(s.a)(Q.indexOf(t)>-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',Q.join(", "),t),Object(s.a)("function"==typeof e[t],"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",t,t,e[t])})),Y.forEach((function(t){Object(s.a)("function"==typeof e[t],"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",t,t,e[t])})),function(t,n){return new J(e,t,n)}}function te(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e;"function"!=typeof e&&(Object(s.a)(Z(e),'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',e),i=function(){return e}),Object(s.a)(P(t),'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',t);var o=ee(t);return Object(s.a)("function"==typeof n,'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),Object(s.a)(P(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(e){return K({containerDisplayName:"DragSource",createHandler:o,registerHandler:l.a,createConnector:function(e){return new w(e)},createMonitor:function(e){return new g(e)},DecoratedComponent:e,getType:i,collect:n,options:r})}}var ne=n(361),re=n(360);function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var oe=["canDrop","hover","drop"],ae=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=null,this.spec=t,this.monitor=n,this.ref=r}var t,n,r;return t=e,(n=[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"canDrop",value:function(){return!this.spec.canDrop||this.spec.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){this.spec.hover&&this.spec.hover(this.props,this.monitor,I(this.ref))}},{key:"drop",value:function(){if(this.spec.drop)return this.spec.drop(this.props,this.monitor,this.ref.current)}}])&&ie(t.prototype,n),r&&ie(t,r),e}();function se(e){return Object.keys(e).forEach((function(t){Object(s.a)(oe.indexOf(t)>-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',oe.join(", "),t),Object(s.a)("function"==typeof e[t],"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",t,t,e[t])})),function(t,n){return new ae(e,t,n)}}function ce(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e;"function"!=typeof e&&(Object(s.a)(Z(e,!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',e),i=function(){return e}),Object(s.a)(P(t),'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',t);var o=se(t);return Object(s.a)("function"==typeof n,'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),Object(s.a)(P(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(e){return K({containerDisplayName:"DropTarget",createHandler:o,registerHandler:l.b,createMonitor:function(e){return new re.a(e)},createConnector:function(e){return new ne.a(e)},DecoratedComponent:e,getType:i,collect:n,options:r})}}function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t,n){return t&&fe(e.prototype,t),n&&fe(e,n),e}function pe(e,t){return!t||"object"!==ue(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function he(e){return(he=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ge(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s.a)("function"==typeof e,'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",e),Object(s.a)(P(t),'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',t),function(n){var i=n,a=t.arePropsEqual,c=void 0===a?y.a:a,u=i.displayName||i.name||"Component",l=function(t){function n(){var e;return le(this,n),(e=pe(this,he(n).apply(this,arguments))).isCurrentlyMounted=!1,e.ref=o.createRef(),e.handleChange=function(){if(e.isCurrentlyMounted){var t=e.getCurrentState();Object(y.a)(t,e.state)||e.setState(t)}},e}return ge(n,t),de(n,[{key:"getDecoratedComponentInstance",value:function(){return Object(s.a)(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(e,t){return!c(e,this.props)||!Object(y.a)(t,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 e=this;return o.createElement(r.a.Consumer,null,(function(t){var n=t.dragDropManager;return void 0===n?null:(e.receiveDragDropManager(n),e.isCurrentlyMounted?o.createElement(i,Object.assign({},e.props,e.state,{ref:R(i)?e.ref:null})):null)}))}},{key:"receiveDragDropManager",value:function(e){if(void 0===this.manager){this.manager=e,Object(s.a)("object"===ue(e),"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",u,u);var t=this.manager.getMonitor();this.unsubscribeFromOffsetChange=t.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=t.subscribeToStateChange(this.handleChange)}}},{key:"getCurrentState",value:function(){if(!this.manager)return{};var t=this.manager.getMonitor();return e(t,this.props)}}]),n}(o.Component);return l.displayName="DragLayer(".concat(u,")"),l.DecoratedComponent=n,M()(l,n)}}},function(e,t,n){var r=n(591);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return D}));var r=n(27),i=n(4),o=n(331),a=n(111),s=n(1);function c(e,t,n){var i;return Object(s.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),Object(s.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(s.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(i={minHeight:56},Object(r.a)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(i,e.up("sm"),{minHeight:64}),i)},n)}var u=n(247),l=n(183),f=n(210),d=n(211),p=n(212),h=n(213),g=n(214),v=n(215),m=n(216),y=n(24),b={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:l.a.white,default:f.a[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}},w={text:{primary:l.a.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:f.a[800],default:"#303030"},action:{active:l.a.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 _(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(y.j)(e.main,i):"dark"===t&&(e.dark=Object(y.b)(e.main,o)))}function x(e){var t=e.primary,n=void 0===t?{light:d.a[300],main:d.a[500],dark:d.a[700]}:t,r=e.secondary,a=void 0===r?{light:p.a.A200,main:p.a.A400,dark:p.a.A700}:r,c=e.error,x=void 0===c?{light:h.a[300],main:h.a[500],dark:h.a[700]}:c,O=e.warning,S=void 0===O?{light:g.a[300],main:g.a[500],dark:g.a[700]}:O,E=e.info,C=void 0===E?{light:v.a[300],main:v.a[500],dark:v.a[700]}:E,k=e.success,T=void 0===k?{light:m.a[300],main:m.a[500],dark:m.a[700]}:k,j=e.type,P=void 0===j?"light":j,I=e.contrastThreshold,R=void 0===I?3:I,A=e.tonalOffset,M=void 0===A?.2:A,D=Object(i.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function N(e){return Object(y.f)(e,w.text.primary)>=R?w.text.primary:b.text.primary}var L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(s.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(u.a)(4,t));if("string"!=typeof e.main)throw new Error(Object(u.a)(5,JSON.stringify(e.main)));return _(e,"light",n,M),_(e,"dark",r,M),e.contrastText||(e.contrastText=N(e.main)),e},z={dark:w,light:b};return Object(o.a)(Object(s.a)({common:l.a,type:P,primary:L(n),secondary:L(a,"A400","A200","A700"),error:L(x),warning:L(S),info:L(C),success:L(T),grey:f.a,contrastThreshold:R,getContrastText:N,augmentColor:L,tonalOffset:M},z[P]),D)}function O(e){return Math.round(1e5*e)/1e5}function S(e){return O(e)}var E={textTransform:"uppercase"};function C(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,a=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,c=n.fontSize,u=void 0===c?14:c,l=n.fontWeightLight,f=void 0===l?300:l,d=n.fontWeightRegular,p=void 0===d?400:d,h=n.fontWeightMedium,g=void 0===h?500:h,v=n.fontWeightBold,m=void 0===v?700:v,y=n.htmlFontSize,b=void 0===y?16:y,w=n.allVariants,_=n.pxToRem,x=Object(i.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var C=u/14,k=_||function(e){return"".concat(e/b*C,"rem")},T=function(e,t,n,r,i){return Object(s.a)({fontFamily:a,fontWeight:e,fontSize:k(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===a?{letterSpacing:"".concat(O(r/t),"em")}:{},i,w)},j={h1:T(f,96,1.167,-1.5),h2:T(f,60,1.2,-.5),h3:T(p,48,1.167,0),h4:T(p,34,1.235,.25),h5:T(p,24,1.334,0),h6:T(g,20,1.6,.15),subtitle1:T(p,16,1.75,.15),subtitle2:T(g,14,1.57,.1),body1:T(p,16,1.5,.15),body2:T(p,14,1.43,.15),button:T(g,14,1.75,.4,E),caption:T(p,12,1.66,.4),overline:T(p,12,2.66,1,E)};return Object(o.a)(Object(s.a)({htmlFontSize:b,pxToRem:k,round:S,fontFamily:a,fontSize:u,fontWeightLight:f,fontWeightRegular:p,fontWeightMedium:g,fontWeightBold:m},j),x,{clone:!1})}function k(){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(.2,")"),"".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(.14,")"),"".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(.12,")")].join(",")}var T=["none",k(0,2,1,-1,0,1,1,0,0,1,3,0),k(0,3,1,-2,0,2,2,0,0,1,5,0),k(0,3,3,-2,0,3,4,0,0,1,8,0),k(0,2,4,-1,0,4,5,0,0,1,10,0),k(0,3,5,-1,0,5,8,0,0,1,14,0),k(0,3,5,-1,0,6,10,0,0,1,18,0),k(0,4,5,-2,0,7,10,1,0,2,16,1),k(0,5,5,-3,0,8,10,1,0,3,14,2),k(0,5,6,-3,0,9,12,1,0,3,16,2),k(0,6,6,-3,0,10,14,1,0,4,18,3),k(0,6,7,-4,0,11,15,1,0,4,20,3),k(0,7,8,-4,0,12,17,2,0,5,22,4),k(0,7,8,-4,0,13,19,2,0,5,24,4),k(0,7,9,-4,0,14,21,2,0,5,26,4),k(0,8,9,-5,0,15,22,2,0,6,28,5),k(0,8,10,-5,0,16,24,2,0,6,30,5),k(0,8,11,-5,0,17,26,2,0,6,32,5),k(0,9,11,-5,0,18,28,2,0,7,34,6),k(0,9,12,-6,0,19,29,2,0,7,36,6),k(0,10,13,-6,0,20,31,3,0,8,38,7),k(0,10,13,-6,0,21,33,3,0,8,40,7),k(0,10,14,-6,0,22,35,3,0,8,42,7),k(0,11,14,-7,0,23,36,3,0,9,44,8),k(0,11,15,-7,0,24,38,3,0,9,46,8)],j={borderRadius:4},P=n(318);function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(P.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var R=n(49),A=n(337);function M(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,s=void 0===r?{}:r,u=e.palette,l=void 0===u?{}:u,f=e.spacing,d=e.typography,p=void 0===d?{}:d,h=Object(i.a)(e,["breakpoints","mixins","palette","spacing","typography"]),g=x(l),v=Object(a.a)(n),m=I(f),y=Object(o.a)({breakpoints:v,direction:"ltr",mixins:c(v,m,s),overrides:{},palette:g,props:{},shadows:T,typography:C(g,p),spacing:m,shape:j,transitions:R.a,zIndex:A.a},h),b=arguments.length,w=new Array(b>1?b-1:0),_=1;_<b;_++)w[_-1]=arguments[_];return y=w.reduce((function(e,t){return Object(o.a)(e,t)}),y)}function D(){return M.apply(void 0,arguments)}t.b=M},function(e,t,n){var r=n(142),i=n(68);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(68),i=n(1080),o=n(433),a=Math.max,s=Math.min;e.exports=function(e,t,n){var c,u,l,f,d,p,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=c,r=u;return c=u=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,d=setTimeout(_,t),g?y(e):f}function w(e){var n=e-p;return void 0===p||n>=t||n<0||v&&e-h>=l}function _(){var e=i();if(w(e))return x(e);d=setTimeout(_,function(e){var n=t-(e-p);return v?s(n,l-(e-h)):n}(e))}function x(e){return d=void 0,m&&c?y(e):(c=u=void 0,f)}function O(){var e=i(),n=w(e);if(c=arguments,u=this,p=e,n){if(void 0===d)return b(p);if(v)return clearTimeout(d),d=setTimeout(_,t),y(p)}return void 0===d&&(d=setTimeout(_,t)),f}return t=o(t)||0,r(n)&&(g=!!n.leading,l=(v="maxWait"in n)?a(o(n.maxWait)||0,t):l,m="trailing"in n?!!n.trailing:m),O.cancel=function(){void 0!==d&&clearTimeout(d),h=0,c=p=u=d=void 0},O.flush=function(){return void 0===d?f:x(i())},O}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createExpandUpdate=t.createHideUpdate=t.createDragToUpdates=t.createRemoveUpdate=t.updateTree=t.buildSpecFromUpdate=void 0;var i=r(n(1087)),o=r(n(1088)),a=r(n(324)),s=r(n(119)),c=r(n(649)),u=r(n(652)),l=r(n(1089)),f=n(449),d=n(109);function p(e){return e.path.length>0?u.default({},e.path,e.spec):e.spec}function h(e,t){var n=e;return t.forEach((function(e){n=i.default(n,p(e))})),n}function g(e,t){var n=a.default(t),r=c.default(t),i=n.concat(d.getOtherBranch(r));return{path:n,spec:{$set:d.getAndAssertNodeAtPathExists(e,i)}}}function v(e,t,n){return s.default(l.default(e,n),l.default(t,n))}t.buildSpecFromUpdate=p,t.updateTree=h,t.createRemoveUpdate=g,t.createDragToUpdates=function(e,t,n,r){var i=d.getAndAssertNodeAtPathExists(e,n),a=[];v(t,n,n.length)?i=h(i,[g(i,o.default(t,n.length))]):(a.push(g(e,t)),v(t,n,t.length-1)&&n.splice(t.length-1,1));var s,c,u=d.getAndAssertNodeAtPathExists(e,t);r===f.MosaicDropTargetPosition.LEFT||r===f.MosaicDropTargetPosition.TOP?(s=u,c=i):(s=i,c=u);var l="column";return r!==f.MosaicDropTargetPosition.LEFT&&r!==f.MosaicDropTargetPosition.RIGHT||(l="row"),a.push({path:n,spec:{$set:{first:s,second:c,direction:l}}}),a},t.createHideUpdate=function(e){return{path:a.default(e),spec:{splitPercentage:{$set:"first"===c.default(e)?0:100}}}},t.createExpandUpdate=function(e,t){for(var n,r={},i=e.length-1;i>=0;i--){var o=e[i];(n={splitPercentage:{$set:"first"===o?t:100-t}})[o]=r,r=n}return{spec:r,path:[]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Ne})),n.d(t,"b",(function(){return Le}));var r=n(0),i=n(7),o="dnd-core/INIT_COORDS",a="dnd-core/BEGIN_DRAG",s="dnd-core/PUBLISH_DRAG_SOURCE",c="dnd-core/HOVER",u="dnd-core/DROP",l="dnd-core/END_DRAG",f=function(e,t){return e===t};function d(e,t){return!e&&!t||!(!e||!t)&&(e.x===t.x&&e.y===t.y)}function p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case o:case a:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case c:return d(e.clientOffset,n.clientOffset)?e:g({},e,{clientOffset:n.clientOffset});case l:case u:return m;default:return e}}var b="dnd-core/ADD_SOURCE",w="dnd-core/ADD_TARGET",_="dnd-core/REMOVE_SOURCE",x="dnd-core/REMOVE_TARGET";function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t,n){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:n||null}),e)}function E(e,t){return e.filter((function(e){return e!==t}))}function C(e){return"object"===O(e)}function k(e,t){var n=new Map,r=function(e){return n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);var i=[];return n.forEach((function(e,t){1===e&&i.push(t)})),i}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case a:return j({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case s:return j({},e,{isSourcePublic:!0});case c:return j({},e,{targetIds:n.targetIds});case x:return-1===e.targetIds.indexOf(n.targetId)?e:j({},e,{targetIds:E(e.targetIds,n.targetId)});case u:return j({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case l:return j({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b:case w:return e+1;case _:case x:return e-1;default:return e}}var M=[],D=[];function N(e,t){return e!==M&&(e===D||void 0===t||(n=e,t.filter((function(e){return n.indexOf(e)>-1}))).length>0);var n}function L(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case c:break;case b:case w:case x:case _:return M;case a:case s:case l:case u:default:return D}var t=e.payload,n=t.targetIds,r=void 0===n?[]:n,i=t.prevTargetIds,o=void 0===i?[]:i,f=k(r,o),d=f.length>0||!p(r,o);if(!d)return M;var h=o[o.length-1],g=r[r.length-1];return h!==g&&(h&&f.push(h),g&&f.push(g)),f}function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:L(e.dirtyHandlerIds,{type:t.type,payload:F({},t.payload,{prevTargetIds:S(e,"dragOperation.targetIds",[])})}),dragOffset:y(e.dragOffset,t),refCount:A(e.refCount,t),dragOperation:R(e.dragOperation,t),stateId:z(e.stateId)}}M.__IS_NONE__=!0,D.__IS_ALL__=!0;var V=n(17);function U(e,t){return{type:o,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var q={type:o,payload:{clientOffset:null,sourceClientOffset:null}};function G(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},r=n.publishSource,i=void 0===r||r,o=n.clientOffset,s=n.getSourceClientOffset,c=e.getMonitor(),u=e.getRegistry();e.dispatch(U(o)),K(t,c,u);var l=X(t,c);if(null!==l){var f=null;o&&($(s),f=s(l)),e.dispatch(U(o,f));var d=u.getSource(l),p=d.beginDrag(c,l);Z(p),u.pinSource(l);var h=u.getSourceType(l);return{type:a,payload:{itemType:h,item:p,sourceId:l,clientOffset:o||null,sourceClientOffset:f||null,isSourcePublic:!!i}}}e.dispatch(q)}}function K(e,t,n){Object(V.a)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Object(V.a)(n.getSource(e),"Expected sourceIds to be registered.")}))}function $(e){Object(V.a)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function Z(e){Object(V.a)(C(e),"Item must be an object.")}function X(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function Q(e){return function(){if(e.getMonitor().isDragging())return{type:s}}}function Y(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function J(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.clientOffset;ee(t);var i=t.slice(0),o=e.getMonitor(),a=e.getRegistry();te(i,o,a);var s=o.getItemType();return ne(i,a,s),re(i,o,a),{type:c,payload:{targetIds:i,clientOffset:r||null}}}}function ee(e){Object(V.a)(Array.isArray(e),"Expected targetIds to be an array.")}function te(e,t,n){Object(V.a)(t.isDragging(),"Cannot call hover while not dragging."),Object(V.a)(!t.didDrop(),"Cannot call hover after drop.");for(var r=0;r<e.length;r++){var i=e[r];Object(V.a)(e.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var o=n.getTarget(i);Object(V.a)(o,"Expected targetIds to be registered.")}}function ne(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r];Y(t.getTargetType(i),n)||e.splice(r,1)}}function re(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();ce(n);var i=le(n);i.forEach((function(i,o){var a=ue(i,o,r,n),s={type:u,payload:{dropResult:oe({},t,{},a)}};e.dispatch(s)}))}}function ce(e){Object(V.a)(e.isDragging(),"Cannot call drop while not dragging."),Object(V.a)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function ue(e,t,n,r){var i=n.getTarget(e),o=i?i.drop(r,e):void 0;return function(e){Object(V.a)(void 0===e||C(e),"Drop result must either be an object or undefined.")}(o),void 0===o&&(o=0===t?{}:r.getDropResult()),o}function le(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function fe(e){return function(){var t=e.getMonitor(),n=e.getRegistry();!function(e){Object(V.a)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var r=t.getSourceId();return n.getSource(r,!0).endDrag(t,r),n.unpinSource(),{type:l}}}function de(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var he,ge=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t,this.registry=n}var t,n,r;return t=e,(n=[{key:"subscribeToStateChange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},r=n.handlerIds;Object(V.a)("function"==typeof e,"listener must be a function."),Object(V.a)(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,o=function(){var n=t.store.getState(),o=n.stateId;try{o===i||o===i+1&&!N(n.dirtyHandlerIds,r)||e()}finally{i=o}};return this.store.subscribe(o)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;Object(V.a)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return Object(V.a)(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return Object(V.a)(t,"Expected to find a valid target."),!(!this.isDragging()||this.didDrop())&&Y(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return Object(V.a)(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!Y(r,i))return!1;var o=this.getTargetIds();if(!o.length)return!1;var a=o.indexOf(e);return n?a===o.length-1:a>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return e=this.store.getState().dragOffset,r=e.clientOffset,i=e.initialClientOffset,o=e.initialSourceClientOffset,r&&i&&o?de((n=o,{x:(t=r).x+n.x,y:t.y+n.y}),i):null;var e,t,n,r,i,o}},{key:"getDifferenceFromInitialOffset",value:function(){return e=this.store.getState().dragOffset,t=e.clientOffset,n=e.initialClientOffset,t&&n?de(t,n):null;var e,t,n}}])&&pe(t.prototype,n),r&&pe(t,r),e}(),ve=0;function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){t&&Array.isArray(e)?e.forEach((function(e){return ye(e,!1)})):Object(V.a)("string"==typeof e||"symbol"===me(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(he||(he={}));var be=n(467),we=[],_e=[],xe=be.a.makeRequestCallFromTimer((function(){if(_e.length)throw _e.shift()}));function Oe(e){var t;(t=we.length?we.pop():new Se).task=e,Object(be.a)(t)}var Se=function(){function e(){}return e.prototype.call=function(){try{this.task.call()}catch(e){Oe.onerror?Oe.onerror(e):(_e.push(e),xe())}finally{this.task=null,we[we.length]=this}},e}();function Ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ke(e){var t=(ve++).toString();switch(e){case he.SOURCE:return"S".concat(t);case he.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function Te(e){switch(e[0]){case"S":return he.SOURCE;case"T":return he.TARGET;default:Object(V.a)(!1,"Cannot parse handler ID: ".concat(e))}}function je(e,t){var n=e.entries(),r=!1;do{var i=n.next(),o=i.done;if(Ce(i.value,2)[1]===t)return!0;r=!!o}while(!r);return!1}var Pe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}var t,n,r;return t=e,(n=[{key:"addSource",value:function(e,t){ye(e),function(e){Object(V.a)("function"==typeof e.canDrag,"Expected canDrag to be a function."),Object(V.a)("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Object(V.a)("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);var n=this.addHandler(he.SOURCE,e,t);return this.store.dispatch(function(e){return{type:b,payload:{sourceId:e}}}(n)),n}},{key:"addTarget",value:function(e,t){ye(e,!0),function(e){Object(V.a)("function"==typeof e.canDrop,"Expected canDrop to be a function."),Object(V.a)("function"==typeof e.hover,"Expected hover to be a function."),Object(V.a)("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);var n=this.addHandler(he.TARGET,e,t);return this.store.dispatch(function(e){return{type:w,payload:{targetId:e}}}(n)),n}},{key:"containsHandler",value:function(e){return je(this.dragSources,e)||je(this.dropTargets,e)}},{key:"getSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Object(V.a)(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,r=n?this.pinnedSource:this.dragSources.get(e);return r}},{key:"getTarget",value:function(e){return Object(V.a)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return Object(V.a)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return Object(V.a)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return Te(e)===he.SOURCE}},{key:"isTargetId",value:function(e){return Te(e)===he.TARGET}},{key:"removeSource",value:function(e){var t=this;Object(V.a)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:_,payload:{sourceId:e}}}(e)),Oe((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){Object(V.a)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:x,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);Object(V.a)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){Object(V.a)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,n){var r=ke(e);return this.types.set(r,t),e===he.SOURCE?this.dragSources.set(r,n):e===he.TARGET&&this.dropTargets.set(r,n),r}}])&&Ee(t.prototype,n),r&&Ee(t,r),e}();function Ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ae(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Object(i.createStore)(H,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var Me=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ie(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var e=t.store.getState().refCount>0;t.backend&&(e&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!e&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var r=Ae(n);this.store=r,this.monitor=new ge(r,new Pe(r)),r.subscribe(this.handleRefCountChange)}var t,n,r;return t=e,(n=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,n=function(e){return{beginDrag:G(e),publishDragSource:Q(e),hover:J(e),drop:se(e),endDrag:fe(e)}}(this);return Object.keys(n).reduce((function(r,i){var o,a=n[i];return r[i]=(o=a,function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=o.apply(e,r);void 0!==a&&t(a)}),r}),{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}])&&Re(t.prototype,n),r&&Re(t,r),e}();function De(e,t,n,r){var i=new Me(r),o=e(i,t,n);return i.receiveBackend(o),i}var Ne=r.createContext({dragDropManager:void 0});function Le(e,t,n,r){return{dragDropManager:De(e,t,n,r)}}},function(e,t,n){"use strict";t.a={black:"#000",white:"#fff"}},function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function o(e){return e.startAdornment}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";(function(e){var r=n(54),i=n(677),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.a.Buffer:void 0,c=(s?s.isBuffer:void 0)||i.a;t.a=c}).call(this,n(426)(e))},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i="object"===("undefined"==typeof window?"undefined":r(window))&&"object"===("undefined"==typeof document?"undefined":r(document))&&9===document.nodeType;t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(330);function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return g})),n.d(t,"b",(function(){return v})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return y}));var r=n(681),i=n.n(r),o=n(682),a=n.n(o),s=n(134),c=n.n(s),u=n(0);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d,p={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0},h=n.n(u).a.createContext();function g(){return p}var v=function(){function e(){i()(this,e),this.usedNamespaces={}}return a()(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function m(){return d}var y={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p=f(f({},p),e)}(e.options.react),function(e){d=e}(e)}}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,$,fullScreenApi;//! 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,n={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},r=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.isFunction=function(t){return"function"===e.type(t)},e.isArray=Array.isArray||function(t){return"array"===e.type(t)},e.isWindow=function(e){return e&&"object"==typeof e&&"setInterval"in e},e.type=function(e){return null==e?String(e):n[r.call(e)]||"object"},e.isPlainObject=function(t){if(!t||"object"!==OpenSeadragon.type(t)||t.nodeType||e.isWindow(t))return!1;if(t.constructor&&!i.call(t,"constructor")&&!i.call(t.constructor.prototype,"isPrototypeOf"))return!1;var n;for(var r in t)n=r;return void 0===n||i.call(t,n)},e.isEmptyObject=function(e){for(var t in e)return!1;return!0},e.freezeObject=function(t){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(e){return e},e.freezeObject(t)},e.supportsCanvas=(t=document.createElement("canvas"),!(!e.isFunction(t.getContext)||!t.getContext("2d"))),e.isCanvasTainted=function(e){var t=!1;try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){t=!0}return t},e.pixelDensityRatio=function(){if(e.supportsCanvas){var t=document.createElement("canvas").getContext("2d"),n=window.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return Math.max(n,1)/r}return 1}()}(OpenSeadragon),function($){$.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=arguments.length,c=!1,u=1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},u=2),"object"==typeof a||OpenSeadragon.isFunction(a)||(a={}),s===u&&(a=this,--u);u<s;u++)if(null!==(e=arguments[u])||void 0!==e)for(t in e)n=a[t],a!==(r=e[t])&&(c&&r&&(OpenSeadragon.isPlainObject(r)||(i=OpenSeadragon.isArray(r)))?(i?(i=!1,o=n&&OpenSeadragon.isArray(n)?n:[]):o=n&&OpenSeadragon.isPlainObject(n)?n:{},a[t]=OpenSeadragon.extend(c,o,r)):void 0!==r&&(a[t]=r));return a};var isIOSDevice=function(){if("object"!=typeof navigator)return!1;var e=navigator.userAgent;return"string"==typeof e&&(-1!==e.indexOf("iPhone")||-1!==e.indexOf("iPad")||-1!==e.indexOf("iPod"))};$.extend($,{DEFAULT_SETTINGS:{xmlPath:null,tileSources:null,tileHost:null,initialPage:0,crossOriginPolicy:!1,ajaxWithCredentials:!1,loadTilesWithAjax:!1,ajaxHeaders:{},panHorizontal:!0,panVertical:!0,constrainDuringPan:!1,wrapHorizontal:!1,wrapVertical:!1,visibilityRatio:.5,minPixelRatio:.5,defaultZoomLevel:0,minZoomLevel:null,maxZoomLevel:null,homeFillsViewer:!1,clickTimeThreshold:300,clickDistThreshold:5,dblClickTimeThreshold:300,dblClickDistThreshold:20,springStiffness:6.5,animationTime:1.2,gestureSettingsMouse:{scrollToZoom:!0,clickToZoom:!0,dblClickToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsTouch:{scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsPen:{scrollToZoom:!1,clickToZoom:!0,dblClickToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsUnknown:{scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},zoomPerClick:2,zoomPerScroll:1.2,zoomPerSecond:1,blendTime:0,alwaysBlend:!1,autoHideControls:!0,immediateRender:!1,minZoomImageRatio:.9,maxZoomPixelRatio:1.1,smoothTileEdgesMinZoom:1.1,iOSDevice:isIOSDevice(),pixelsPerWheelLine:40,pixelsPerArrowPress:40,autoResize:!0,preserveImageSizeOnResize:!1,minScrollDeltaTime:50,rotationIncrement:90,showSequenceControl:!0,sequenceControlAnchor:null,preserveViewport:!1,preserveOverlays:!1,navPrevNextWrap:!1,showNavigationControl:!0,navigationControlAnchor:null,showZoomControl:!0,showHomeControl:!0,showFullPageControl:!0,showRotationControl:!1,showFlipControl:!1,controlsFadeDelay:2e3,controlsFadeLength:1500,mouseNavEnabled:!0,showNavigator:!1,navigatorId:null,navigatorPosition:null,navigatorSizeRatio:.2,navigatorMaintainSizeRatio:!1,navigatorTop:null,navigatorLeft:null,navigatorHeight:null,navigatorWidth:null,navigatorAutoResize:!0,navigatorAutoFade:!0,navigatorRotate:!0,navigatorBackground:"#000",navigatorOpacity:.8,navigatorBorderColor:"#555",navigatorDisplayRegionColor:"#900",degrees:0,flipped:!1,opacity:1,preload:!1,compositeOperation:null,imageSmoothingEnabled:!0,placeholderFillStyle:null,showReferenceStrip:!1,referenceStripScroll:"horizontal",referenceStripElement:null,referenceStripHeight:null,referenceStripWidth:null,referenceStripPosition:"BOTTOM_LEFT",referenceStripSizeRatio:.2,collectionRows:3,collectionColumns:0,collectionLayout:"horizontal",collectionMode:!1,collectionTileSize:800,collectionTileMargin:80,imageLoaderLimit:0,maxImageCacheCount:200,timeout:3e4,useCanvas:!0,prefixUrl:"/images/",navImages:{zoomIn:{REST:"zoomin_rest.png",GROUP:"zoomin_grouphover.png",HOVER:"zoomin_hover.png",DOWN:"zoomin_pressed.png"},zoomOut:{REST:"zoomout_rest.png",GROUP:"zoomout_grouphover.png",HOVER:"zoomout_hover.png",DOWN:"zoomout_pressed.png"},home:{REST:"home_rest.png",GROUP:"home_grouphover.png",HOVER:"home_hover.png",DOWN:"home_pressed.png"},fullpage:{REST:"fullpage_rest.png",GROUP:"fullpage_grouphover.png",HOVER:"fullpage_hover.png",DOWN:"fullpage_pressed.png"},rotateleft:{REST:"rotateleft_rest.png",GROUP:"rotateleft_grouphover.png",HOVER:"rotateleft_hover.png",DOWN:"rotateleft_pressed.png"},rotateright:{REST:"rotateright_rest.png",GROUP:"rotateright_grouphover.png",HOVER:"rotateright_hover.png",DOWN:"rotateright_pressed.png"},flip:{REST:"flip_rest.png",GROUP:"flip_grouphover.png",HOVER:"flip_hover.png",DOWN:"flip_pressed.png"},previous:{REST:"previous_rest.png",GROUP:"previous_grouphover.png",HOVER:"previous_hover.png",DOWN:"previous_pressed.png"},next:{REST:"next_rest.png",GROUP:"next_grouphover.png",HOVER:"next_hover.png",DOWN:"next_pressed.png"}},debugMode:!1,debugGridColor:["#437AB2","#1B9E77","#D95F02","#7570B3","#E7298A","#66A61E","#E6AB02","#A6761D","#666666"]},SIGNAL:"----seadragon----",delegate:function(e,t){return function(){var n=arguments;return void 0===n&&(n=[]),t.apply(e,n)}},BROWSERS:{UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5},getElement:function(e){return"string"==typeof e&&(e=document.getElementById(e)),e},getElementPosition:function(e){var t,n,r=new $.Point;for(n=getOffsetParent(e=$.getElement(e),t="fixed"==$.getElementStyle(e).position);n;)r.x+=e.offsetLeft,r.y+=e.offsetTop,t&&(r=r.plus($.getPageScroll())),n=getOffsetParent(e=n,t="fixed"==$.getElementStyle(e).position);return r},getElementOffset:function(e){var t,n,r=(e=$.getElement(e))&&e.ownerDocument,i={top:0,left:0};return r?(t=r.documentElement,void 0!==e.getBoundingClientRect&&(i=e.getBoundingClientRect()),n=r==r.window?r:9===r.nodeType&&(r.defaultView||r.parentWindow),new $.Point(i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0),i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0))):new $.Point},getElementSize:function(e){return e=$.getElement(e),new $.Point(e.clientWidth,e.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(e){return(e=$.getElement(e)).currentStyle}:function(e){return e=$.getElement(e),window.getComputedStyle(e,"")},getCssPropertyWithVendorPrefix:function(e){var t={};return $.getCssPropertyWithVendorPrefix=function(e){if(void 0!==t[e])return t[e];var n=document.createElement("div").style,r=null;if(void 0!==n[e])r=e;else for(var i=["Webkit","Moz","MS","O","webkit","moz","ms","o"],o=$.capitalizeFirstLetter(e),a=0;a<i.length;a++){var s=i[a]+o;if(void 0!==n[s]){r=s;break}}return t[e]=r,r},$.getCssPropertyWithVendorPrefix(e)},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},positiveModulo:function(e,t){var n=e%t;return n<0&&(n+=t),n},pointInElement:function(e,t){e=$.getElement(e);var n=$.getElementOffset(e),r=$.getElementSize(e);return t.x>=n.x&&t.x<n.x+r.x&&t.y<n.y+r.y&&t.y>=n.y},getEvent:function(e){return $.getEvent=e?function(e){return e}:function(){return window.event},$.getEvent(e)},getMousePosition:function(e){if("number"==typeof e.pageX)$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.pageX,t.y=e.pageY,t};else{if("number"!=typeof e.clientX)throw new Error("Unknown event mouse position, no known technique.");$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t.y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}}return $.getMousePosition(e)},getPageScroll:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.pageXOffset)$.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)return new $.Point(0,0);$.getPageScroll=function(){return new $.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return $.getPageScroll()},setPageScroll:function(e){if(void 0!==window.scrollTo)$.setPageScroll=function(e){window.scrollTo(e.x,e.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 n=$.getPageScroll();if(n.x!==t.x&&n.y!==t.y)return void($.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y});if(document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y,(n=$.getPageScroll()).x!==t.x&&n.y!==t.y)return void($.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y});$.setPageScroll=function(e){}}return $.setPageScroll(e)},getWindowSize:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.innerWidth)$.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)throw new Error("Unknown window size, no known technique.");$.getWindowSize=function(){return new $.Point(document.body.clientWidth,document.body.clientHeight)}}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),n=t.style;return n.background="transparent none",n.border="none",n.margin="0px",n.padding="0px",n.position="static",t},now:function(){return Date.now?$.now=Date.now:$.now=function(){return(new Date).getTime()},$.now()},makeTransparentImage:function(e){return $.makeTransparentImage=function(e){var t=$.makeNeutralElement("img");return t.src=e,t},$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<7&&($.makeTransparentImage=function(e){var t=$.makeNeutralElement("img"),n=null;return(n=$.makeNeutralElement("span")).style.display="inline-block",t.onload=function(){n.style.width=n.style.width||t.width+"px",n.style.height=n.style.height||t.height+"px",t.onload=null,t=null},t.src=e,n.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e+"', sizingMethod='scale')",n}),$.makeTransparentImage(e)},setElementOpacity:function(e,t,n){var r;e=$.getElement(e),n&&!$.Browser.alpha&&(t=Math.round(t)),$.Browser.opacity?e.style.opacity=t<1?t:"":t<1?(r="alpha(opacity="+Math.round(100*t)+")",e.style.filter=r):e.style.filter=""},setElementTouchActionNone:function(e){void 0!==(e=$.getElement(e)).style.touchAction?e.style.touchAction="none":void 0!==e.style.msTouchAction&&(e.style.msTouchAction="none")},addClass:function(e,t){(e=$.getElement(e)).className?-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=" "+t):e.className=t},indexOf:function(e,t,n){return Array.prototype.indexOf?this.indexOf=function(e,t,n){return e.indexOf(t,n)}:this.indexOf=function(e,t,n){var r,i,o=n||0;if(!e)throw new TypeError;if(0===(i=e.length)||o>=i)return-1;for(o<0&&(o=i-Math.abs(o)),r=o;r<i;r++)if(e[r]===t)return r;return-1},this.indexOf(e,t,n)},removeClass:function(e,t){var n,r,i=[];for(n=(e=$.getElement(e)).className.split(/\s+/),r=0;r<n.length;r++)n[r]&&n[r]!==t&&i.push(n[r]);e.className=i.join(" ")},addEvent:function(){if(window.addEventListener)return function(e,t,n,r){(e=$.getElement(e)).addEventListener(t,n,r)};if(window.attachEvent)return function(e,t,n,r){(e=$.getElement(e)).attachEvent("on"+t,n)};throw new Error("No known event model.")}(),removeEvent:function(){if(window.removeEventListener)return function(e,t,n,r){(e=$.getElement(e)).removeEventListener(t,n,r)};if(window.detachEvent)return function(e,t,n,r){(e=$.getElement(e)).detachEvent("on"+t,n)};throw new Error("No known event model.")}(),cancelEvent:function(e){(e=$.getEvent(e)).preventDefault?$.cancelEvent=function(e){e.preventDefault()}:$.cancelEvent=function(e){(e=$.getEvent(e)).cancel=!0,e.returnValue=!1},$.cancelEvent(e)},stopEvent:function(e){(e=$.getEvent(e)).stopPropagation?$.stopEvent=function(e){e.stopPropagation()}:$.stopEvent=function(e){(e=$.getEvent(e)).cancelBubble=!0},$.stopEvent(e)},createCallback:function(e,t){var n,r=[];for(n=2;n<arguments.length;n++)r.push(arguments[n]);return function(){var n,i=r.concat([]);for(n=0;n<arguments.length;n++)i.push(arguments[n]);return t.apply(e,i)}},getUrlParameter:function(e){var t=URLPARAMS[e];return t||null},getUrlProtocol:function(e){var t=e.match(/^([a-z]+:)\/\//i);return null===t?window.location.protocol:t[1].toLowerCase()},createAjaxRequest:function(e){var t;try{t=!!new ActiveXObject("Microsoft.XMLHTTP")}catch(e){t=!1}if(t)window.XMLHttpRequest?$.createAjaxRequest=function(e){return e?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}:$.createAjaxRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")};else{if(!window.XMLHttpRequest)throw new Error("Browser doesn't support XMLHttpRequest.");$.createAjaxRequest=function(){return new XMLHttpRequest}}return $.createAjaxRequest(e)},makeAjaxRequest:function(e,t,n){var r,i,o;$.isPlainObject(e)&&(t=e.success,n=e.error,r=e.withCredentials,i=e.headers,o=e.responseType||null,e=e.url);var a=$.getUrlProtocol(e),s=$.createAjaxRequest("file:"===a);if(!$.isFunction(t))throw new Error("makeAjaxRequest requires a success callback");s.onreadystatechange=function(){4==s.readyState&&(s.onreadystatechange=function(){},s.status>=200&&s.status<300||0===s.status&&"http:"!==a&&"https:"!==a?t(s):($.console.log("AJAX request returned %d: %s",s.status,e),$.isFunction(n)&&n(s)))};try{if(s.open("GET",e,!0),o&&(s.responseType=o),i)for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&i[c]&&s.setRequestHeader(c,i[c]);r&&(s.withCredentials=!0),s.send(null)}catch(r){var u=r.message;if($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<10&&void 0!==r.number&&-2147024891==r.number&&(u+="\nSee http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain"),$.console.log("%s while making AJAX request: %s",r.name,u),s.onreadystatechange=function(){},window.XDomainRequest){var l=new window.XDomainRequest;if(l){l.onload=function(e){$.isFunction(t)&&t({responseText:l.responseText,status:200,statusText:"OK"})},l.onerror=function(e){$.isFunction(n)&&n({responseText:l.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{l.open("GET",e),l.send()}catch(e){$.isFunction(n)&&n(s,r)}}}else $.isFunction(n)&&n(s,r)}return s},jsonp:function(e){var t,n=e.url,r=document.head||document.getElementsByTagName("head")[0]||document.documentElement,i=e.callbackName||"openseadragon"+$.now(),o=window[i],a="$1"+i+"$2",s=e.param||"callback",c=e.callback;n=n.replace(/(\=)\?(&|$)|\?\?/i,a),n+=(/\?/.test(n)?"&":"?")+s+"="+i,window[i]=function(e){if(o)window[i]=o;else try{delete window[i]}catch(e){}c&&$.isFunction(c)&&c(e)},t=document.createElement("script"),void 0===e.async&&!1===e.async||(t.async="async"),e.scriptCharset&&(t.charset=e.scriptCharset),t.src=n,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,r&&t.parentNode&&r.removeChild(t),t=void 0)},r.insertBefore(t,r.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(e){if(window.DOMParser)$.parseXml=function(e){return(new DOMParser).parseFromString(e,"text/xml")};else{if(!window.ActiveXObject)throw new Error("Browser doesn't support XML DOM.");$.parseXml=function(e){var t=null;return(t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t}}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!!FILEFORMATS[(e=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 getOffsetParent(e,t){return t&&e!=document.body?document.body:e.offsetParent}!function(){var e=navigator.appVersion,t=navigator.userAgent;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")))):null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(t)&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1)));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(e)}var n,r,i,o=window.location.search.substring(1).split("&");for(i=0;i<o.length;i++)if((r=(n=o[i]).indexOf("="))>0){var a=n.substring(0,r),s=n.substring(r+1);try{URLPARAMS[a]=decodeURIComponent(s)}catch(e){$.console.error("Ignoring malformed URL parameter: %s=%s",a,s)}}$.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,n=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||e.msCancelAnimationFrame;if(t&&n)$.requestAnimationFrame=function(){return t.apply(e,arguments)},$.cancelAnimationFrame=function(){return n.apply(e,arguments)};else{var r,i=[],o=[],a=0;$.requestAnimationFrame=function(e){return i.push([++a,e]),r||(r=setInterval((function(){if(i.length){var e=$.now(),t=o;for(o=i,i=t;o.length;)o.shift()[1](e)}else clearInterval(r),r=void 0}),20)),a},$.cancelAnimationFrame=function(e){var t,n;for(t=0,n=i.length;t<n;t+=1)if(i[t][0]===e)return void i.splice(t,1);for(t=0,n=o.length;t<n;t+=1)if(o[t][0]===e)return void o.splice(t,1)}}}(window)}(OpenSeadragon),__WEBPACK_AMD_DEFINE_ARRAY__=[],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=function(){return OpenSeadragon})?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),$=OpenSeadragon,fullScreenApi={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""},document.exitFullscreen?(fullScreenApi.supportsFullScreen=!0,fullScreenApi.getFullScreenElement=function(){return document.fullscreenElement},fullScreenApi.requestFullScreen=function(e){return e.requestFullscreen()},fullScreenApi.exitFullScreen=function(){document.exitFullscreen()},fullScreenApi.fullScreenEventName="fullscreenchange",fullScreenApi.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(fullScreenApi.supportsFullScreen=!0,fullScreenApi.getFullScreenElement=function(){return document.msFullscreenElement},fullScreenApi.requestFullScreen=function(e){return e.msRequestFullscreen()},fullScreenApi.exitFullScreen=function(){document.msExitFullscreen()},fullScreenApi.fullScreenEventName="MSFullscreenChange",fullScreenApi.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(fullScreenApi.supportsFullScreen=!0,fullScreenApi.getFullScreenElement=function(){return document.webkitFullscreenElement},fullScreenApi.requestFullScreen=function(e){return e.webkitRequestFullscreen()},fullScreenApi.exitFullScreen=function(){document.webkitExitFullscreen()},fullScreenApi.fullScreenEventName="webkitfullscreenchange",fullScreenApi.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(fullScreenApi.supportsFullScreen=!0,fullScreenApi.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},fullScreenApi.requestFullScreen=function(e){return e.webkitRequestFullScreen()},fullScreenApi.exitFullScreen=function(){document.webkitCancelFullScreen()},fullScreenApi.fullScreenEventName="webkitfullscreenchange",fullScreenApi.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(fullScreenApi.supportsFullScreen=!0,fullScreenApi.getFullScreenElement=function(){return document.mozFullScreenElement},fullScreenApi.requestFullScreen=function(e){return e.mozRequestFullScreen()},fullScreenApi.exitFullScreen=function(){document.mozCancelFullScreen()},fullScreenApi.fullScreenEventName="mozfullscreenchange",fullScreenApi.fullScreenErrorEventName="mozfullscreenerror"),fullScreenApi.isFullScreen=function(){return null!==fullScreenApi.getFullScreenElement()},fullScreenApi.cancelFullScreen=function(){$.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),fullScreenApi.exitFullScreen()},$.extend($,fullScreenApi),function(e){e.EventSource=function(){this.events={}},e.EventSource.prototype={addOnceHandler:function(e,t,n,r){var i=this;r=r||1;var o=0,a=function(n){++o===r&&i.removeHandler(e,a),t(n)};this.addHandler(e,a,n)},addHandler:function(t,n,r){var i=this.events[t];i||(this.events[t]=i=[]),n&&e.isFunction(n)&&(i[i.length]={handler:n,userData:r||null})},removeHandler:function(t,n){var r,i=this.events[t],o=[];if(i&&e.isArray(i)){for(r=0;r<i.length;r++)i[r].handler!==n&&o.push(i[r]);this.events[t]=o}},removeAllHandlers:function(e){if(e)this.events[e]=[];else for(var t in this.events)this.events[t]=[]},getHandler:function(e){var t=this.events[e];return t&&t.length?(t=1===t.length?[t[0]]:Array.apply(null,t),function(e,n){var r,i=t.length;for(r=0;r<i;r++)t[r]&&(n.eventSource=e,n.userData=t[r].userData,t[r].handler(n))}):null},raiseEvent:function(e,t){var n=this.getHandler(e);n&&(t||(t={}),n(this,t))}}}(OpenSeadragon),function(e){var t,n,r,i,o,a,s=[],c={};function u(t){var n,r=c[t.hash],i=r.activePointersLists.length;for(n=0;n<i;n++)r.activePointersLists[n].captureCount>0&&(e.removeEvent(e.MouseTracker.captureElement,"mousemove",r.mousemovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"mouseup",r.mouseupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",r.pointermovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",r.pointerupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchmove",r.touchmovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchend",r.touchendcaptured,!0),r.activePointersLists[n].captureCount=0);for(n=0;n<i;n++)r.activePointersLists.pop()}function l(t){var n,r,i=c[t.hash];if(i.tracking){for(r=0;r<e.MouseTracker.subscribeEvents.length;r++)n=e.MouseTracker.subscribeEvents[r],e.removeEvent(t.element,n,i[n],!1);u(t),i.tracking=!1}}function f(t,n){var r=c[t.hash];if("pointerevent"===n)return{upName:e.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",upHandler:r.pointerupcaptured,moveName:e.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",moveHandler:r.pointermovecaptured};if("mouse"===n)return{upName:"mouseup",upHandler:r.mouseupcaptured,moveName:"mousemove",moveHandler:r.mousemovecaptured};if("touch"===n)return{upName:"touchend",upHandler:r.touchendcaptured,moveName:"touchmove",moveHandler:r.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function d(t,n,r){var i,o=t.getActivePointersListByType(n);o.captureCount+=r||1,1===o.captureCount&&(e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?t.element.setCapture(!0):(i=f(t,e.MouseTracker.havePointerEvents?"pointerevent":n),ye&&be(window.top)&&e.addEvent(window.top,i.upName,i.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,i.upName,i.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,i.moveName,i.moveHandler,!0)))}function p(t,n,r){var i,o=t.getActivePointersListByType(n);o.captureCount-=r||1,0===o.captureCount&&(e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?t.element.releaseCapture():(i=f(t,e.MouseTracker.havePointerEvents?"pointerevent":n),ye&&be(window.top)&&e.removeEvent(window.top,i.upName,i.upHandler,!0),e.removeEvent(e.MouseTracker.captureElement,i.moveName,i.moveHandler,!0),e.removeEvent(e.MouseTracker.captureElement,i.upName,i.upHandler,!0)))}function h(t){var n;if(e.MouseTracker.unprefixedPointerEvents)n=t.pointerType;else switch(t.pointerType){case 2:n="touch";break;case 3:n="pen";break;case 4:n="mouse";break;default:n=""}return n}function g(t){return e.getMousePosition(t)}function v(e,t){return m(g(e),t)}function m(t,n){var r=e.getElementOffset(n);return t.minus(r)}function y(t,n){return new e.Point((t.x+n.x)/2,(t.y+n.y)/2)}function b(t,n){t.clickHandler&&e.cancelEvent(n)}function w(t,n){t.dblClickHandler&&e.cancelEvent(n)}function _(t,n){t.keyDownHandler&&(n=e.getEvent(n),t.keyDownHandler({eventSource:t,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefaultAction:!1,userData:t.userData})||e.cancelEvent(n))}function x(t,n){t.keyUpHandler&&(n=e.getEvent(n),t.keyUpHandler({eventSource:t,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefaultAction:!1,userData:t.userData})||e.cancelEvent(n))}function O(t,n){t.keyHandler&&(n=e.getEvent(n),t.keyHandler({eventSource:t,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefaultAction:!1,userData:t.userData})||e.cancelEvent(n))}function S(t,n){t.focusHandler&&(n=e.getEvent(n),!1===t.focusHandler({eventSource:t,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n))}function E(t,n){t.blurHandler&&(n=e.getEvent(n),!1===t.blurHandler({eventSource:t,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n))}function C(e,t){T(e,t,t)}function k(t,n){var r={target:(n=e.getEvent(n)).target||n.srcElement,type:"wheel",shiftKey:n.shiftKey||!1,clientX:n.clientX,clientY:n.clientY,pageX:n.pageX?n.pageX:n.clientX,pageY:n.pageY?n.pageY:n.clientY,deltaMode:"MozMousePixelScroll"==n.type?0:1,deltaX:0,deltaZ:0};"mousewheel"==e.MouseTracker.wheelEventName?r.deltaY=-n.wheelDelta/e.DEFAULT_SETTINGS.pixelsPerWheelLine:r.deltaY=n.detail,T(t,r,n)}function T(t,n,r){var i;i=n.deltaY<0?1:-1,t.scrollHandler&&!1===t.scrollHandler({eventSource:t,pointerType:"mouse",position:v(n,t.element),scroll:i,shift:n.shiftKey,isTouchEvent:!1,originalEvent:r,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(r)}function j(e,t){if(e===t)return!1;for(;t&&t!==e;)t=t.parentNode;return t===e}function P(t,n){R(t,n=e.getEvent(n))}function I(t,n){(n=e.getEvent(n)).currentTarget===n.relatedTarget||j(n.currentTarget,n.relatedTarget)||R(t,n)}function R(t,n){pe(t,n,[{id:e.MouseTracker.mousePointerId,type:"mouse",isPrimary:!0,currentPos:g(n),currentTime:e.now()}])}function A(t,n){D(t,n=e.getEvent(n))}function M(t,n){(n=e.getEvent(n)).currentTarget===n.relatedTarget||j(n.currentTarget,n.relatedTarget)||D(t,n)}function D(t,n){he(t,n,[{id:e.MouseTracker.mousePointerId,type:"mouse",isPrimary:!0,currentPos:g(n),currentTime:e.now()}])}function N(t){return e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?1===t?0:2===t?2:4===t?1:-1:t}function L(t,n){ge(t,n=e.getEvent(n),[{id:e.MouseTracker.mousePointerId,type:"mouse",isPrimary:!0,currentPos:g(n),currentTime:e.now()}],N(n.button))&&(e.stopEvent(n),d(t,"mouse")),(t.clickHandler||t.dblClickHandler||t.pressHandler||t.dragHandler||t.dragEndHandler)&&e.cancelEvent(n)}function z(e,t){F(e,t)}function B(t,n){F(t,n),e.stopEvent(n)}function F(t,n){ve(t,n=e.getEvent(n),[{id:e.MouseTracker.mousePointerId,type:"mouse",isPrimary:!0,currentPos:g(n),currentTime:e.now()}],N(n.button))&&p(t,"mouse")}function W(e,t){V(e,t)}function H(t,n){V(t,n),e.stopEvent(n)}function V(t,n){me(t,n=e.getEvent(n),[{id:e.MouseTracker.mousePointerId,type:"mouse",isPrimary:!0,currentPos:g(n),currentTime:e.now()}])}function U(e,t,n){var r,i=n.getLength(),o=[];if("touch"===n.type||n.contacts>0){for(r=0;r<i;r++)o.push(n.getByIndex(r));o.length>0&&(ve(e,t,o,0),n.captureCount=1,p(e,n.type),he(e,t,o))}}function q(t,n){var r,i,o,a,c=n.changedTouches.length,u=[],l=t.getActivePointersListByType("touch");for(r=e.now(),l.getLength()>n.touches.length-c&&(e.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),U(t,n,l)),i=0;i<c;i++)u.push({id:n.changedTouches[i].identifier,type:"touch",currentPos:g(n.changedTouches[i]),currentTime:r});for(pe(t,n,u),i=0;i<s.length;i++)if(s[i]!==t&&s[i].isTracking()&&j(s[i].element,t.element)){for(a=[],o=0;o<c;o++)a.push({id:n.changedTouches[o].identifier,type:"touch",currentPos:g(n.changedTouches[o]),currentTime:r});pe(s[i],n,a)}ge(t,n,u,0)&&(e.stopEvent(n),d(t,"touch",c)),e.cancelEvent(n)}function G(e,t){$(e,t)}function K(t,n){$(t,n),e.stopEvent(n)}function $(t,n){var r,i,o,a,c=n.changedTouches.length,u=[];for(r=e.now(),i=0;i<c;i++)u.push({id:n.changedTouches[i].identifier,type:"touch",currentPos:g(n.changedTouches[i]),currentTime:r});for(ve(t,n,u,0)&&p(t,"touch",c),he(t,n,u),i=0;i<s.length;i++)if(s[i]!==t&&s[i].isTracking()&&j(s[i].element,t.element)){for(a=[],o=0;o<c;o++)a.push({id:n.changedTouches[o].identifier,type:"touch",currentPos:g(n.changedTouches[o]),currentTime:r});he(s[i],n,a)}e.cancelEvent(n)}function Z(e,t){Q(e,t)}function X(t,n){Q(t,n),e.stopEvent(n)}function Q(t,n){var r,i=n.changedTouches.length,o=[];for(r=0;r<i;r++)o.push({id:n.changedTouches[r].identifier,type:"touch",currentPos:g(n.changedTouches[r]),currentTime:e.now()});me(t,n,o),e.cancelEvent(n)}function Y(e,t){var n=e.getActivePointersListByType("touch");U(e,t,n)}function J(e,t){return t.stopPropagation(),t.preventDefault(),!1}function ee(e,t){return t.stopPropagation(),t.preventDefault(),!1}function te(t,n){n.currentTarget===n.relatedTarget||j(n.currentTarget,n.relatedTarget)||pe(t,n,[{id:n.pointerId,type:h(n),isPrimary:n.isPrimary,currentPos:g(n),currentTime:e.now()}])}function ne(t,n){n.currentTarget===n.relatedTarget||j(n.currentTarget,n.relatedTarget)||he(t,n,[{id:n.pointerId,type:h(n),isPrimary:n.isPrimary,currentPos:g(n),currentTime:e.now()}])}function re(t,n){var r;ge(t,n,[r={id:n.pointerId,type:h(n),isPrimary:n.isPrimary,currentPos:g(n),currentTime:e.now()}],n.button)&&(e.stopEvent(n),d(t,r.type)),(t.clickHandler||t.dblClickHandler||t.pressHandler||t.dragHandler||t.dragEndHandler||t.pinchHandler)&&e.cancelEvent(n)}function ie(e,t){ae(e,t)}function oe(t,n){t.getActivePointersListByType(h(n)).getById(n.pointerId)&&ae(t,n),e.stopEvent(n)}function ae(t,n){var r;ve(t,n,[r={id:n.pointerId,type:h(n),isPrimary:n.isPrimary,currentPos:g(n),currentTime:e.now()}],n.button)&&p(t,r.type)}function se(e,t){ue(e,t)}function ce(t,n){t.getActivePointersListByType(h(n)).getById(n.pointerId)&&ue(t,n),e.stopEvent(n)}function ue(t,n){me(t,n,[{id:n.pointerId,type:h(n),isPrimary:n.isPrimary,currentPos:g(n),currentTime:e.now()}])}function le(e,t){!function(e,t,n){ve(e,t,n,0),he(e,t,n)}(e,t,[{id:t.pointerId,type:h(t)}])}function fe(e,t){return Object.prototype.hasOwnProperty.call(t,"isPrimary")||(0===e.getLength()?t.isPrimary=!0:t.isPrimary=!1),t.speed=0,t.direction=0,t.contactPos=t.currentPos,t.contactTime=t.currentTime,t.lastPos=t.currentPos,t.lastTime=t.currentTime,e.add(t)}function de(e,t){var n,r;return e.getById(t.id)?(n=e.removeById(t.id),Object.prototype.hasOwnProperty.call(t,"isPrimary")||(r=e.getPrimary())||(r=e.getByIndex(0))&&(r.isPrimary=!0)):n=e.getLength(),n}function pe(t,n,r){var i,o,a,s=t.getActivePointersListByType(r[0].type),c=r.length;for(i=0;i<c;i++)o=r[i],(a=s.getById(o.id))?(a.insideElement=!0,a.lastPos=a.currentPos,a.lastTime=a.currentTime,a.currentPos=o.currentPos,a.currentTime=o.currentTime,o=a):(o.captured=!1,o.insideElementPressed=!1,o.insideElement=!0,fe(s,o)),t.enterHandler&&!1===t.enterHandler({eventSource:t,pointerType:o.type,position:m(o.currentPos,t.element),buttons:s.buttons,pointers:t.getActivePointerCount(),insideElementPressed:o.insideElementPressed,buttonDownAny:0!==s.buttons,isTouchEvent:"touch"===o.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n)}function he(t,n,r){var i,o,a,s=t.getActivePointersListByType(r[0].type),c=r.length;for(i=0;i<c;i++)o=r[i],(a=s.getById(o.id))&&(a.captured?(a.insideElement=!1,a.lastPos=a.currentPos,a.lastTime=a.currentTime,a.currentPos=o.currentPos,a.currentTime=o.currentTime):de(s,a),o=a),t.exitHandler&&!1===t.exitHandler({eventSource:t,pointerType:o.type,position:o.currentPos&&m(o.currentPos,t.element),buttons:s.buttons,pointers:t.getActivePointerCount(),insideElementPressed:!!a&&a.insideElementPressed,buttonDownAny:0!==s.buttons,isTouchEvent:"touch"===o.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n)}function ge(t,n,r,i){var o,a,s,u=c[t.hash],l=t.getActivePointersListByType(r[0].type),f=r.length;void 0!==n.buttons?l.buttons=n.buttons:e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?0===i?l.buttons+=1:1===i?l.buttons+=4:2===i?l.buttons+=2:3===i?l.buttons+=8:4===i?l.buttons+=16:5===i&&(l.buttons+=32):0===i?l.buttons|=1:1===i?l.buttons|=4:2===i?l.buttons|=2:3===i?l.buttons|=8:4===i?l.buttons|=16:5===i&&(l.buttons|=32);var d=t.getActivePointersListsExceptType(r[0].type);for(o=0;o<d.length;o++)U(t,n,d[o]);if(0!==i)return t.nonPrimaryPressHandler&&!1===t.nonPrimaryPressHandler({eventSource:t,pointerType:r[0].type,position:m(r[0].currentPos,t.element),button:i,buttons:l.buttons,isTouchEvent:"touch"===r[0].type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n),!1;for(o=0;o<f;o++)a=r[o],(s=l.getById(a.id))?(s.captured=!0,s.insideElementPressed=!0,s.insideElement=!0,s.contactPos=a.currentPos,s.contactTime=a.currentTime,s.lastPos=s.currentPos,s.lastTime=s.currentTime,s.currentPos=a.currentPos,s.currentTime=a.currentTime,a=s):(a.captured=!0,a.insideElementPressed=!0,a.insideElement=!0,fe(l,a)),l.addContact(),(t.dragHandler||t.dragEndHandler||t.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.addPoint(t,a),1===l.contacts?t.pressHandler&&!1===t.pressHandler({eventSource:t,pointerType:a.type,position:m(a.contactPos,t.element),buttons:l.buttons,isTouchEvent:"touch"===a.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n):2===l.contacts&&t.pinchHandler&&"touch"===a.type&&(u.pinchGPoints=l.asArray(),u.lastPinchDist=u.currentPinchDist=u.pinchGPoints[0].currentPos.distanceTo(u.pinchGPoints[1].currentPos),u.lastPinchCenter=u.currentPinchCenter=y(u.pinchGPoints[0].currentPos,u.pinchGPoints[1].currentPos));return!0}function ve(t,n,r,i){var o,a,s,u,l,f,d=c[t.hash],p=t.getActivePointersListByType(r[0].type),h=r.length,g=!1,v=!1;if(void 0!==n.buttons?p.buttons=n.buttons:e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?0===i?p.buttons-=1:1===i?p.buttons-=4:2===i?p.buttons-=2:3===i?p.buttons-=8:4===i?p.buttons-=16:5===i&&(p.buttons-=32):0===i?p.buttons^=-2:1===i?p.buttons^=-5:2===i?p.buttons^=-3:3===i?p.buttons^=-9:4===i?p.buttons^=-17:5===i&&(p.buttons^=-33),0!==i){t.nonPrimaryReleaseHandler&&!1===t.nonPrimaryReleaseHandler({eventSource:t,pointerType:r[0].type,position:m(r[0].currentPos,t.element),button:i,buttons:p.buttons,isTouchEvent:"touch"===r[0].type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n);var b=t.getActivePointersListByType("mouse");return U(t,n,b),!1}if(void 0===r[0].currentPos)return U(t,n,p),!1;for(s=0;s<h;s++)u=r[s],(l=p.getById(u.id))&&(l.captured&&(l.captured=!1,g=!0,v=!0),l.lastPos=l.currentPos,l.lastTime=l.currentTime,l.currentPos=u.currentPos,l.currentTime=u.currentTime,l.insideElement||de(p,l),o=l.currentPos,a=l.currentTime,v?(p.removeContact(),(t.dragHandler||t.dragEndHandler||t.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.removePoint(t,l),0===p.contacts?(t.releaseHandler&&!1===t.releaseHandler({eventSource:t,pointerType:l.type,position:m(o,t.element),buttons:p.buttons,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElement,isTouchEvent:"touch"===l.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n),t.dragEndHandler&&!l.currentPos.equals(l.contactPos)&&!1===t.dragEndHandler({eventSource:t,pointerType:l.type,position:m(l.currentPos,t.element),speed:l.speed,direction:l.direction,shift:n.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n),(t.clickHandler||t.dblClickHandler)&&l.insideElement&&(f=a-l.contactTime<=t.clickTimeThreshold&&l.contactPos.distanceTo(o)<=t.clickDistThreshold,t.clickHandler&&!1===t.clickHandler({eventSource:t,pointerType:l.type,position:m(l.currentPos,t.element),quick:f,shift:n.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n),t.dblClickHandler&&f&&(p.clicks++,1===p.clicks?(d.lastClickPos=o,d.dblClickTimeOut=setTimeout((function(){p.clicks=0}),t.dblClickTimeThreshold)):2===p.clicks&&(clearTimeout(d.dblClickTimeOut),p.clicks=0,d.lastClickPos.distanceTo(o)<=t.dblClickDistThreshold&&!1===t.dblClickHandler({eventSource:t,pointerType:l.type,position:m(l.currentPos,t.element),shift:n.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n),d.lastClickPos=null)))):2===p.contacts&&t.pinchHandler&&"touch"===l.type&&(d.pinchGPoints=p.asArray(),d.lastPinchDist=d.currentPinchDist=d.pinchGPoints[0].currentPos.distanceTo(d.pinchGPoints[1].currentPos),d.lastPinchCenter=d.currentPinchCenter=y(d.pinchGPoints[0].currentPos,d.pinchGPoints[1].currentPos))):t.releaseHandler&&!1===t.releaseHandler({eventSource:t,pointerType:l.type,position:m(o,t.element),buttons:p.buttons,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElement,isTouchEvent:"touch"===l.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n));return g}function me(t,n,r){var i,o,a,s,u,l=c[t.hash],f=t.getActivePointersListByType(r[0].type),d=r.length;for(void 0!==n.buttons&&(f.buttons=n.buttons),i=0;i<d;i++)o=r[i],(a=f.getById(o.id))?(Object.prototype.hasOwnProperty.call(o,"isPrimary")&&(a.isPrimary=o.isPrimary),a.lastPos=a.currentPos,a.lastTime=a.currentTime,a.currentPos=o.currentPos,a.currentTime=o.currentTime):(o.captured=!1,o.insideElementPressed=!1,o.insideElement=!0,fe(f,o));t.stopHandler&&"mouse"===r[0].type&&(clearTimeout(t.stopTimeOut),t.stopTimeOut=setTimeout((function(){!function(e,t,n){e.stopHandler&&e.stopHandler({eventSource:e,pointerType:n,position:v(t,e.element),buttons:e.getActivePointersListByType(n).buttons,isTouchEvent:"touch"===n,originalEvent:t,preventDefaultAction:!1,userData:e.userData})}(t,n,r[0].type)}),t.stopDelay)),0===f.contacts?t.moveHandler&&!1===t.moveHandler({eventSource:t,pointerType:r[0].type,position:m(r[0].currentPos,t.element),buttons:f.buttons,isTouchEvent:"touch"===r[0].type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n):1===f.contacts?(t.moveHandler&&(a=f.asArray()[0],!1===t.moveHandler({eventSource:t,pointerType:a.type,position:m(a.currentPos,t.element),buttons:f.buttons,isTouchEvent:"touch"===a.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n)),t.dragHandler&&(u=(a=f.asArray()[0]).currentPos.minus(a.lastPos),!1===t.dragHandler({eventSource:t,pointerType:a.type,position:m(a.currentPos,t.element),buttons:f.buttons,delta:u,speed:a.speed,direction:a.direction,shift:n.shiftKey,isTouchEvent:"touch"===a.type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n))):2===f.contacts&&(t.moveHandler&&(s=f.asArray(),!1===t.moveHandler({eventSource:t,pointerType:s[0].type,position:m(y(s[0].currentPos,s[1].currentPos),t.element),buttons:f.buttons,isTouchEvent:"touch"===s[0].type,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n)),t.pinchHandler&&"touch"===r[0].type&&(u=l.pinchGPoints[0].currentPos.distanceTo(l.pinchGPoints[1].currentPos))!=l.currentPinchDist&&(l.lastPinchDist=l.currentPinchDist,l.currentPinchDist=u,l.lastPinchCenter=l.currentPinchCenter,l.currentPinchCenter=y(l.pinchGPoints[0].currentPos,l.pinchGPoints[1].currentPos),!1===t.pinchHandler({eventSource:t,pointerType:"touch",gesturePoints:l.pinchGPoints,lastCenter:m(l.lastPinchCenter,t.element),center:m(l.currentPinchCenter,t.element),lastDistance:l.lastPinchDist,distance:l.currentPinchDist,shift:n.shiftKey,originalEvent:n,preventDefaultAction:!1,userData:t.userData})&&e.cancelEvent(n)))}e.MouseTracker=function(t){s.push(this);var n=arguments;e.isPlainObject(t)||(t={element:n[0],clickTimeThreshold:n[1],clickDistThreshold:n[2]}),this.hash=Math.random(),this.element=e.getElement(t.element),this.clickTimeThreshold=t.clickTimeThreshold||e.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=t.clickDistThreshold||e.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=t.dblClickTimeThreshold||e.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=t.dblClickDistThreshold||e.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=t.userData||null,this.stopDelay=t.stopDelay||50,this.enterHandler=t.enterHandler||null,this.exitHandler=t.exitHandler||null,this.pressHandler=t.pressHandler||null,this.nonPrimaryPressHandler=t.nonPrimaryPressHandler||null,this.releaseHandler=t.releaseHandler||null,this.nonPrimaryReleaseHandler=t.nonPrimaryReleaseHandler||null,this.moveHandler=t.moveHandler||null,this.scrollHandler=t.scrollHandler||null,this.clickHandler=t.clickHandler||null,this.dblClickHandler=t.dblClickHandler||null,this.dragHandler=t.dragHandler||null,this.dragEndHandler=t.dragEndHandler||null,this.pinchHandler=t.pinchHandler||null,this.stopHandler=t.stopHandler||null,this.keyDownHandler=t.keyDownHandler||null,this.keyUpHandler=t.keyUpHandler||null,this.keyHandler=t.keyHandler||null,this.focusHandler=t.focusHandler||null,this.blurHandler=t.blurHandler||null;var r=this;c[this.hash]={click:function(e){b(r,e)},dblclick:function(e){w(r,e)},keydown:function(e){_(r,e)},keyup:function(e){x(r,e)},keypress:function(e){O(r,e)},focus:function(e){S(r,e)},blur:function(e){E(r,e)},wheel:function(e){C(r,e)},mousewheel:function(e){k(r,e)},DOMMouseScroll:function(e){k(r,e)},MozMousePixelScroll:function(e){k(r,e)},mouseenter:function(e){P(r,e)},mouseleave:function(e){A(r,e)},mouseover:function(e){I(r,e)},mouseout:function(e){M(r,e)},mousedown:function(e){L(r,e)},mouseup:function(e){z(r,e)},mouseupcaptured:function(e){B(r,e)},mousemove:function(e){W(r,e)},mousemovecaptured:function(e){H(r,e)},touchstart:function(e){q(r,e)},touchend:function(e){G(r,e)},touchendcaptured:function(e){K(r,e)},touchmove:function(e){Z(r,e)},touchmovecaptured:function(e){X(r,e)},touchcancel:function(e){Y(r,e)},gesturestart:function(e){J(r,e)},gesturechange:function(e){ee(r,e)},pointerover:function(e){te(r,e)},MSPointerOver:function(e){te(r,e)},pointerout:function(e){ne(r,e)},MSPointerOut:function(e){ne(r,e)},pointerdown:function(e){re(r,e)},MSPointerDown:function(e){re(r,e)},pointerup:function(e){ie(r,e)},MSPointerUp:function(e){ie(r,e)},pointermove:function(e){se(r,e)},MSPointerMove:function(e){se(r,e)},pointercancel:function(e){le(r,e)},MSPointerCancel:function(e){le(r,e)},pointerupcaptured:function(e){oe(r,e)},pointermovecaptured:function(e){ce(r,e)},tracking:!1,activePointersLists:[],lastClickPos:null,dblClickTimeOut:null,pinchGPoints:[],lastPinchDist:0,currentPinchDist:0,lastPinchCenter:null,currentPinchCenter:null},t.startDisabled||this.setTracking(!0)},e.MouseTracker.prototype={destroy:function(){var e;for(l(this),this.element=null,e=0;e<s.length;e++)if(s[e]===this){s.splice(e,1);break}c[this.hash]=null,delete c[this.hash]},isTracking:function(){return c[this.hash].tracking},setTracking:function(t){return t?function(t){var n,r,i=c[t.hash];if(!i.tracking){for(r=0;r<e.MouseTracker.subscribeEvents.length;r++)n=e.MouseTracker.subscribeEvents[r],e.addEvent(t.element,n,i[n],!1);u(t),i.tracking=!0}}(this):l(this),this},getActivePointersListsExceptType:function(e){for(var t=c[this.hash],n=[],r=0;r<t.activePointersLists.length;++r)t.activePointersLists[r].type!==e&&n.push(t.activePointersLists[r]);return n},getActivePointersListByType:function(t){var n,r,i=c[this.hash],o=i.activePointersLists.length;for(n=0;n<o;n++)if(i.activePointersLists[n].type===t)return i.activePointersLists[n];return r=new e.MouseTracker.GesturePointList(t),i.activePointersLists.push(r),r},getActivePointerCount:function(){var e,t=c[this.hash],n=t.activePointersLists.length,r=0;for(e=0;e<n;e++)r+=t.activePointersLists[e].getLength();return r},enterHandler:function(){},exitHandler:function(){},pressHandler:function(){},nonPrimaryPressHandler:function(){},releaseHandler:function(){},nonPrimaryReleaseHandler:function(){},moveHandler:function(){},scrollHandler:function(){},clickHandler:function(){},dblClickHandler:function(){},dragHandler:function(){},dragEndHandler:function(){},pinchHandler:function(){},stopHandler:function(){},keyDownHandler:function(){},keyUpHandler:function(){},keyHandler:function(){},focusHandler:function(){},blurHandler:function(){}},e.MouseTracker.resetAllMouseTrackers=function(){for(var e=0;e<s.length;e++)s[e].isTracking()&&(s[e].setTracking(!1),s[e].setTracking(!0))},e.MouseTracker.gesturePointVelocityTracker=(t=[],n=0,r=0,i=function(e,t){return e.hash.toString()+t.type+t.id.toString()},o=function(){var n,i,o,a,s,c,u=t.length,l=e.now();for(a=l-r,r=l,n=0;n<u;n++)(o=(i=t[n]).gPoint).direction=Math.atan2(o.currentPos.y-i.lastPos.y,o.currentPos.x-i.lastPos.x),s=i.lastPos.distanceTo(o.currentPos),i.lastPos=o.currentPos,c=1e3*s/(a+1),o.speed=.75*c+.25*o.speed},{addPoint:function(a,s){var c=i(a,s);t.push({guid:c,gPoint:s,lastPos:s.currentPos}),1===t.length&&(r=e.now(),n=window.setInterval(o,50))},removePoint:function(e,r){var o,a=i(e,r),s=t.length;for(o=0;o<s;o++)if(t[o].guid===a){t.splice(o,1),0==--s&&window.clearInterval(n);break}}}),e.MouseTracker.captureElement=document,e.MouseTracker.wheelEventName=e.Browser.vendor==e.BROWSERS.IE&&e.Browser.version>8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.supportsMouseCapture=(a=document.createElement("div"),e.isFunction(a.setCapture)&&e.isFunction(a.releaseCapture)),e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",e.MouseTracker.wheelEventName],"DOMMouseScroll"==e.MouseTracker.wheelEventName&&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(e){this._gPoints=[],this.type=e,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(e){return this._gPoints.push(e)},removeById:function(e){var t,n=this._gPoints.length;for(t=0;t<n;t++)if(this._gPoints[t].id===e){this._gPoints.splice(t,1);break}return this._gPoints.length},getByIndex:function(e){return e<this._gPoints.length?this._gPoints[e]:null},getById:function(e){var t,n=this._gPoints.length;for(t=0;t<n;t++)if(this._gPoints[t].id===e)return this._gPoints[t];return null},getPrimary:function(e){var t,n=this._gPoints.length;for(t=0;t<n;t++)if(this._gPoints[t].isPrimary)return this._gPoints[t];return null},addContact:function(){++this.contacts,this.contacts>1&&("mouse"===this.type||"pen"===this.type)&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};var ye=function(){try{return window.self!==window.top}catch(e){return!0}}();function be(e){try{return e.addEventListener&&e.removeEventListener}catch(e){return!1}}}(OpenSeadragon),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(t,n,r){var i=t.parentNode;"number"==typeof n&&(e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),n={anchor:n}),n.attachToViewer=void 0===n.attachToViewer||n.attachToViewer,this.autoFade=void 0===n.autoFade||n.autoFade,this.element=t,this.anchor=n.anchor,this.container=r,this.anchor==e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"==typeof n.top?n.top+"px":n.top,this.wrapper.style.left="number"==typeof n.left?n.left+"px":n.left,this.wrapper.style.height="number"==typeof n.height?n.height+"px":n.height,this.wrapper.style.width="number"==typeof n.width?n.width+"px":n.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),n.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):i.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!=this.wrapper.style.display},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){function t(e,t){var n,r=e.controls;for(n=r.length-1;n>=0;n--)if(r[n].element==t)return n;return-1}e.ControlDock=function(t){var n,r,i=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),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%"),r=0;r<i.length;r++)n=i[r],this.controls[n]=e.makeNeutralElement("div"),this.controls[n].style.position="absolute",n.match("left")&&(this.controls[n].style.left="0px"),n.match("right")&&(this.controls[n].style.right="0px"),n.match("top")&&(this.controls[n].style.top="0px"),n.match("bottom")&&(this.controls[n].style.bottom="0px");this.container.appendChild(this.controls.topleft),this.container.appendChild(this.controls.topright),this.container.appendChild(this.controls.bottomright),this.container.appendChild(this.controls.bottomleft)},e.ControlDock.prototype={addControl:function(n,r){var i=null;if(!(t(this,n=e.getElement(n))>=0)){switch(r.anchor){case e.ControlAnchor.TOP_RIGHT:i=this.controls.topright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:i=this.controls.bottomright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:i=this.controls.bottomleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:i=this.controls.topleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:i=this.container,n.style.margin="0px",n.style.padding="0px";break;default:case e.ControlAnchor.NONE:i=this.container,n.style.margin="0px",n.style.padding="0px"}this.controls.push(new e.Control(n,r,i)),n.style.display="inline-block"}},removeControl:function(n){var r=t(this,n=e.getElement(n));return r>=0&&(this.controls[r].destroy(),this.controls.splice(r,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(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={},n=1;function r(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function i(t,n){if(n instanceof e.Overlay)return n;var r=null;if(n.element)r=e.getElement(n.element);else{var i=n.id?n.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());(r=e.getElement(n.id))||((r=document.createElement("a")).href="#/overlay/"+i),r.id=i,e.addClass(r,n.className?n.className:"openseadragon-overlay")}var o=n.location,a=n.width,s=n.height;if(!o){var c=n.x,u=n.y;if(void 0!==n.px){var l=t.viewport.imageToViewportRectangle(new e.Rect(n.px,n.py,a||0,s||0));c=l.x,u=l.y,a=void 0!==a?l.width:void 0,s=void 0!==s?l.height:void 0}o=new e.Point(c,u)}var f=n.placement;return f&&"string"===e.type(f)&&(f=e.Placement[n.placement.toUpperCase()]),new e.Overlay({element:r,location:o,placement:f,onDraw:n.onDraw,checkResize:n.checkResize,width:a,height:s,rotationMode:n.rotationMode})}function o(e,t){var n;for(n=e.length-1;n>=0;n--)if(e[n].element===t)return n;return-1}function a(t,n){return e.requestAnimationFrame((function(){n(t)}))}function s(t){e.requestAnimationFrame((function(){!function(t){var n,r,i,o;if(t.controlsShouldFade){for(n=e.now(),r=n-t.controlsFadeBeginTime,i=1-r/t.controlsFadeLength,i=Math.min(1,i),i=Math.max(0,i),o=t.controls.length-1;o>=0;o--)t.controls[o].autoFade&&t.controls[o].setOpacity(i);i>0&&s(t)}}(t)}))}function c(t){t.autoHideControls&&(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout((function(){s(t)}),t.controlsFadeDelay))}function u(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function l(){u(this)}function f(){c(this)}function d(t){var n={originalEvent:t.originalEvent,preventDefaultAction:t.preventDefaultAction,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.keyCode){case 38:return n.preventVerticalPan||(t.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 n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 37:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;case 39:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;default:return!0}}function p(t){var n={originalEvent:t.originalEvent,preventDefaultAction:t.preventDefaultAction,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.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 n.preventVerticalPan||(t.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 n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),!1;case 97:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),!1;case 100:return n.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}}function h(e){var t;document.activeElement==this.canvas||this.canvas.focus(),this.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var n={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.raiseEvent("canvas-click",n),!n.preventDefaultAction&&this.viewport&&e.quick&&(t=this.gestureSettingsByDeviceType(e.pointerType)).clickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function g(e){var t,n={tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.raiseEvent("canvas-double-click",n),!n.preventDefaultAction&&this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType)).dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function v(e){var t,n={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};if(this.raiseEvent("canvas-drag",n),!n.preventDefaultAction&&this.viewport){if(t=this.gestureSettingsByDeviceType(e.pointerType),this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewport.flipped&&(e.delta.x=-e.delta.x),this.constrainDuringPan){var r=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=r.x,this.viewport.centerSpringY.target.value+=r.y;var i=this.viewport.getBounds(),o=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=r.x,this.viewport.centerSpringY.target.value-=r.y,i.x!=o.x&&(e.delta.x=0),i.y!=o.y&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),t.flickEnabled&&!this.constrainDuringPan)}}function m(t){if(!t.preventDefaultAction&&this.viewport){var n=this.gestureSettingsByDeviceType(t.pointerType);if(n.flickEnabled&&t.speed>=n.flickMinSpeed){var r=0;this.panHorizontal&&(r=n.flickMomentum*t.speed*Math.cos(t.direction));var i=0;this.panVertical&&(i=n.flickMomentum*t.speed*Math.sin(t.direction));var o=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),a=this.viewport.pointFromPixel(new e.Point(o.x-r,o.y-i));this.viewport.panTo(a,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:t.eventSource,position:t.position,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent})}function y(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function b(t){window.location!=window.parent.location&&e.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,buttons:t.buttons,pointers:t.pointers,insideElementPressed:t.insideElementPressed,buttonDownAny:t.buttonDownAny,originalEvent:t.originalEvent})}function w(e){this.raiseEvent("canvas-press",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function _(e){this.raiseEvent("canvas-release",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function x(e){this.raiseEvent("canvas-nonprimary-press",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function O(e){this.raiseEvent("canvas-nonprimary-release",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function S(e){var t,n,r;if(!e.preventDefaultAction&&this.viewport&&((t=this.gestureSettingsByDeviceType(e.pointerType)).pinchToZoom&&(n=this.viewport.pointFromPixel(e.center,!0),r=this.viewport.pointFromPixel(e.lastCenter,!0).minus(n),this.panHorizontal||(r.x=0),this.panVertical||(r.y=0),this.viewport.zoomBy(e.distance/e.lastDistance,n,!0),t.zoomToRefPoint&&this.viewport.panBy(r,!0),this.viewport.applyConstraints()),t.pinchRotate)){var i=Math.atan2(e.gesturePoints[0].currentPos.y-e.gesturePoints[1].currentPos.y,e.gesturePoints[0].currentPos.x-e.gesturePoints[1].currentPos.x),o=Math.atan2(e.gesturePoints[0].lastPos.y-e.gesturePoints[1].lastPos.y,e.gesturePoints[0].lastPos.x-e.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(i-o)*(180/Math.PI))}return this.raiseEvent("canvas-pinch",{tracker:e.eventSource,gesturePoints:e.gesturePoints,lastCenter:e.lastCenter,center:e.center,lastDistance:e.lastDistance,distance:e.distance,shift:e.shift,originalEvent:e.originalEvent}),!1}function E(t){var n,r,i;if((i=e.now())-this._lastScrollTime>this.minScrollDeltaTime){if(this._lastScrollTime=i,this.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x),!t.preventDefaultAction&&this.viewport&&(n=this.gestureSettingsByDeviceType(t.pointerType)).scrollToZoom&&(r=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(r,n.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints()),this.raiseEvent("canvas-scroll",{tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent}),n&&n.scrollToZoom)return!1}else if((n=this.gestureSettingsByDeviceType(t.pointerType))&&n.scrollToZoom)return!1}function C(e){t[this.hash].mouseInside=!0,u(this),this.raiseEvent("container-enter",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function k(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||c(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function T(e){!function(e){if(e._opening)return;if(e.autoResize){var n=r(e.container),i=t[e.hash].prevContainerSize;if(!n.equals(i)){var o=e.viewport;if(e.preserveImageSizeOnResize){var a=i.x/n.x,s=o.getZoom()*a,l=o.getCenter();o.resize(n,!1),o.zoomTo(s,null,!0),o.panTo(l,!0)}else{var f=o.getBounds();o.resize(n,!0),o.fitBoundsWithConstraints(f,!0)}t[e.hash].prevContainerSize=n,t[e.hash].forceRedraw=!0}}var d=e.viewport.update(),p=e.world.update()||d;d&&e.raiseEvent("viewport-change");e.referenceStrip&&(p=e.referenceStrip.update(e.viewport)||p);!t[e.hash].animating&&p&&(e.raiseEvent("animation-start"),u(e));(p||t[e.hash].forceRedraw||e.world.needsDraw())&&(!function(e){e.imageLoader.clear(),e.drawer.clear(),e.world.draw(),e.raiseEvent("update-viewport",{})}(e),e._drawOverlays(),e.navigator&&e.navigator.update(e.viewport),t[e.hash].forceRedraw=!1,p&&e.raiseEvent("animation"));t[e.hash].animating&&!p&&(e.raiseEvent("animation-finish"),t[e.hash].mouseInside||c(e));t[e.hash].animating=p}(e),e.isOpen()?e._updateRequestId=a(e,T):e._updateRequestId=!1}function j(e,t){return e?e+t:t}function P(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,A(this)}function I(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,A(this)}function R(){t[this.hash].zooming=!1}function A(t){e.requestAnimationFrame(e.delegate(t,M))}function M(){var n,r,i;t[this.hash].zooming&&this.viewport&&(r=(n=e.now())-t[this.hash].lastZoomTime,i=Math.pow(t[this.hash].zoomFactor,r/1e3),this.viewport.zoomBy(i),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=n,A(this))}function D(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function N(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function L(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function z(){this.viewport&&this.viewport.goHome()}function B(){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 F(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t+this.rotationIncrement,360):e.positiveModulo(t-this.rotationIncrement,360),this.viewport.setRotation(t)}}function W(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t-this.rotationIncrement,360):e.positiveModulo(t+this.rotationIncrement,360),this.viewport.setRotation(t)}}function H(){this.viewport.toggleFlip()}function V(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)}function U(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)}e.Viewer=function(i){var o,s,u=arguments,l=this;if(e.isPlainObject(i)||(i={id:u[0],xmlPath:u.length>1?u[1]:void 0,prefixUrl:u.length>2?u[2]:void 0,controls:u.length>3?u[3]:void 0,overlays:u.length>4?u[4]:void 0}),i.config&&(e.extend(!0,i,i.config),delete i.config),e.extend(!0,this,{id:i.id,hash:i.hash||n++,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,i),void 0===this.hash)throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(void 0!==t[this.hash]&&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(t){var n=e.getString("Errors.OpenFailed",t.eventSource,t.message);l._showMessage(n)})),e.ControlDock.call(this,i),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(s=this.canvas.style).width="100%",s.height="100%",s.overflow="hidden",s.position="absolute",s.top="0px",s.left="0px",e.setElementTouchActionNone(this.canvas),""!==i.tabIndex&&(this.canvas.tabIndex=void 0===i.tabIndex?0:i.tabIndex),this.container.className="openseadragon-container",function(e){e.width="100%",e.height="100%",e.position="relative",e.overflow="hidden",e.left="0px",e.top="0px",e.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,d),keyHandler:e.delegate(this,p),clickHandler:e.delegate(this,h),dblClickHandler:e.delegate(this,g),dragHandler:e.delegate(this,v),dragEndHandler:e.delegate(this,m),enterHandler:e.delegate(this,y),exitHandler:e.delegate(this,b),pressHandler:e.delegate(this,w),releaseHandler:e.delegate(this,_),nonPrimaryPressHandler:e.delegate(this,x),nonPrimaryReleaseHandler:e.delegate(this,O),scrollHandler:e.delegate(this,E),pinchHandler:e.delegate(this,S)}),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,C),exitHandler:e.delegate(this,k)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=r(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",(function(e){l.source=l.world.getItemAt(0).source,t[l.hash].forceRedraw=!0,l._updateRequestId||(l._updateRequestId=a(l,T))})),this.world.addHandler("remove-item",(function(e){l.world.getItemCount()?l.source=l.world.getItemAt(0).source:l.source=null,t[l.hash].forceRedraw=!0})),this.world.addHandler("metrics-change",(function(e){l.viewport&&l.viewport._setContentBounds(l.world.getHomeBounds(),l.world.getContentFactor())})),this.world.addHandler("item-index-change",(function(e){l.source=l.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:i.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&&(o=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(o,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(o=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(o,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),o=0;o<this.customControls.length;o++)this.addControl(this.customControls[o].id,{anchor:this.customControls[o].anchor});e.requestAnimationFrame((function(){c(l)})),void 0===this.imageSmoothingEnabled||this.imageSmoothingEnabled||this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled)},e.extend(e.Viewer.prototype,e.EventSource.prototype,e.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(t){return e.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(t)},openTileSource:function(t){return e.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(t)},open:function(t,n){var r=this;if(this.close(),t){if(this.sequenceMode&&e.isArray(t))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),void 0===n||isNaN(n)||(this.initialPage=n),this.tileSources=t,this._sequenceIndex=Math.max(0,Math.min(this.tileSources.length-1,this.initialPage)),this.tileSources.length&&(this.open(this.tileSources[this._sequenceIndex]),this.showReferenceStrip&&this.addReferenceStrip()),void this._updateSequenceButtons(this._sequenceIndex);if(e.isArray(t)||(t=[t]),t.length){this._opening=!0;for(var o,a=t.length,s=0,c=0,u=function(){if(s+c===a)if(s){!r._firstOpen&&r.preserveViewport||(r.viewport.goHome(!0),r.viewport.update()),r._firstOpen=!1;var e=t[0];if(e.tileSource&&(e=e.tileSource),r.overlays&&!r.preserveOverlays)for(var n=0;n<r.overlays.length;n++)r.currentOverlays[n]=i(r,r.overlays[n]);r._drawOverlays(),r._opening=!1,r.raiseEvent("open",{source:e})}else r._opening=!1,r.raiseEvent("open-failed",o)},l=function(t){e.isPlainObject(t)&&t.tileSource||(t={tileSource:t}),void 0!==t.index&&(e.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete t.index),void 0===t.collectionImmediately&&(t.collectionImmediately=!0);var n=t.success;t.success=function(e){if(s++,t.tileSource.overlays)for(var i=0;i<t.tileSource.overlays.length;i++)r.addOverlay(t.tileSource.overlays[i]);n&&n(e),u()};var i=t.error;t.error=function(e){c++,o||(o=e),i&&i(e),u()},r.addTiledImage(t)},f=0;f<t.length;f++)l(t[f]);return this}}},close:function(){return t[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),t[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(t[this.hash]){if(this.close(),this.clearOverlays(),this.overlaysContainer.innerHTML="",this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),null!==this._updateRequestId&&(e.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.removeAllHandlers(),this.element)for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.innerTracker&&this.innerTracker.destroy(),this.outerTracker&&this.outerTracker.destroy(),t[this.hash]=null,delete t[this.hash],this.canvas=null,this.container=null,this.element=null}},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(e){return this.innerTracker.setTracking(e),this.outerTracker.setTracking(e),this.raiseEvent("mouse-enabled",{enabled:e}),this},areControlsEnabled:function(){var e,t=this.controls.length;for(e=0;e<this.controls.length;e++)t=t&&this.controls[e].isVisible();return t},setControlsEnabled:function(e){return e?u(this):c(this),this.raiseEvent("controls-enabled",{enabled:e}),this},setDebugMode:function(e){for(var t=0;t<this.world.getItemCount();t++)this.world.getItemAt(t).debugMode=e;this.debugMode=e,this.forceRedraw()},isFullPage:function(){return t[this.hash].fullPage},setFullPage:function(n){var r,i,o=document.body,a=o.style,s=document.documentElement.style,c=this;if(n==this.isFullPage())return this;var u={fullPage:n,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",u),u.preventDefaultAction)return this;if(n){for(this.elementSize=e.getElementSize(this.element),this.pageScroll=e.getPageScroll(),this.elementMargin=this.element.style.margin,this.element.style.margin="0",this.elementPadding=this.element.style.padding,this.element.style.padding="0",this.bodyMargin=a.margin,this.docMargin=s.margin,a.margin="0",s.margin="0",this.bodyPadding=a.padding,this.docPadding=s.padding,a.padding="0",s.padding="0",this.bodyWidth=a.width,this.docWidth=s.width,a.width="100%",s.width="100%",this.bodyHeight=a.height,this.docHeight=s.height,a.height="100%",s.height="100%",this.previousBody=[],t[this.hash].prevElementParent=this.element.parentNode,t[this.hash].prevNextSibling=this.element.nextSibling,t[this.hash].prevElementWidth=this.element.style.width,t[this.hash].prevElementHeight=this.element.style.height,r=o.childNodes.length,i=0;i<r;i++)this.previousBody.push(o.childNodes[0]),o.removeChild(o.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,o.appendChild(this.toolbar.element),e.addClass(this.toolbar.element,"fullpage")),e.addClass(this.element,"fullpage"),o.appendChild(this.element),this.element.style.height=e.getWindowSize().y+"px",this.element.style.width=e.getWindowSize().x+"px",this.toolbar&&this.toolbar.element&&(this.element.style.height=e.getElementSize(this.element).y-e.getElementSize(this.toolbar.element).y+"px"),t[this.hash].fullPage=!0,e.delegate(this,C)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,a.margin=this.bodyMargin,s.margin=this.docMargin,a.padding=this.bodyPadding,s.padding=this.docPadding,a.width=this.bodyWidth,s.width=this.docWidth,a.height=this.bodyHeight,s.height=this.docHeight,o.removeChild(this.element),r=this.previousBody.length,i=0;i<r;i++)o.appendChild(this.previousBody.shift());e.removeClass(this.element,"fullpage"),t[this.hash].prevElementParent.insertBefore(this.element,t[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(o.removeChild(this.toolbar.element),e.removeClass(this.toolbar.element,"fullpage"),this.toolbar.parentNode.insertBefore(this.toolbar.element,this.toolbar.nextSibling),delete this.toolbar.parentNode,delete this.toolbar.nextSibling),this.element.style.width=t[this.hash].prevElementWidth,this.element.style.height=t[this.hash].prevElementHeight;var l=0,f=function(){e.setPageScroll(c.pageScroll);var t=e.getPageScroll();++l<10&&(t.x!==c.pageScroll.x||t.y!==c.pageScroll.y)&&e.requestAnimationFrame(f)};e.requestAnimationFrame(f),t[this.hash].fullPage=!1,e.delegate(this,k)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:n}),this},setFullScreen:function(t){var n=this;if(!e.supportsFullScreen)return this.setFullPage(t);if(e.isFullScreen()===t)return this;var r={fullScreen:t,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",r),r.preventDefaultAction)return this;if(t){if(this.setFullPage(!0),!this.isFullPage())return this;this.fullPageStyleWidth=this.element.style.width,this.fullPageStyleHeight=this.element.style.height,this.element.style.width="100%",this.element.style.height="100%";var i=function(){var t=e.isFullScreen();t||(e.removeEvent(document,e.fullScreenEventName,i),e.removeEvent(document,e.fullScreenErrorEventName,i),n.setFullPage(!1),n.isFullPage()&&(n.element.style.width=n.fullPageStyleWidth,n.element.style.height=n.fullPageStyleHeight)),n.navigator&&n.viewport&&setTimeout((function(){n.navigator.update(n.viewport)})),n.raiseEvent("full-screen",{fullScreen:t})};e.addEvent(document,e.fullScreenEventName,i),e.addEvent(document,e.fullScreenErrorEventName,i),e.requestFullScreen(document.body)}else e.exitFullScreen();return this},isVisible:function(){return"hidden"!=this.container.style.visibility},setVisible:function(e){return this.container.style.visibility=e?"":"hidden",this.raiseEvent("visible",{visible:e}),this},addTiledImage:function(t){e.console.assert(t,"[Viewer.addTiledImage] options is required"),e.console.assert(t.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),e.console.assert(!t.replace||t.index>-1&&t.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var n=this;t.replace&&(t.replaceItem=n.world.getItemAt(t.index)),this._hideMessage(),void 0===t.placeholderFillStyle&&(t.placeholderFillStyle=this.placeholderFillStyle),void 0===t.opacity&&(t.opacity=this.opacity),void 0===t.preload&&(t.preload=this.preload),void 0===t.compositeOperation&&(t.compositeOperation=this.compositeOperation),void 0===t.crossOriginPolicy&&(t.crossOriginPolicy=void 0!==t.tileSource.crossOriginPolicy?t.tileSource.crossOriginPolicy:this.crossOriginPolicy),void 0===t.ajaxWithCredentials&&(t.ajaxWithCredentials=this.ajaxWithCredentials),void 0===t.loadTilesWithAjax&&(t.loadTilesWithAjax=this.loadTilesWithAjax),void 0===t.ajaxHeaders||null===t.ajaxHeaders?t.ajaxHeaders=this.ajaxHeaders:e.isPlainObject(t.ajaxHeaders)&&e.isPlainObject(this.ajaxHeaders)&&(t.ajaxHeaders=e.extend({},this.ajaxHeaders,t.ajaxHeaders));var r={options:t};function i(e){for(var i=0;i<n._loadQueue.length;i++)if(n._loadQueue[i]===r){n._loadQueue.splice(i,1);break}0===n._loadQueue.length&&o(r),n.raiseEvent("add-item-failed",e),t.error&&t.error(e)}function o(e){n.collectionMode&&(n.world.arrange({immediately:e.options.collectionImmediately,rows:n.collectionRows,columns:n.collectionColumns,layout:n.collectionLayout,tileSize:n.collectionTileSize,tileMargin:n.collectionTileMargin}),n.world.setAutoRefigureSizes(!0))}function a(){for(var t,r,i;n._loadQueue.length&&(t=n._loadQueue[0]).tileSource;){if(n._loadQueue.splice(0,1),t.options.replace){var a=n.world.getIndexOfItem(t.options.replaceItem);-1!=a&&(t.options.index=a),n.world.removeItem(t.options.replaceItem)}r=new e.TiledImage({viewer:n,source:t.tileSource,viewport:n.viewport,drawer:n.drawer,tileCache:n.tileCache,imageLoader:n.imageLoader,x:t.options.x,y:t.options.y,width:t.options.width,height:t.options.height,fitBounds:t.options.fitBounds,fitBoundsPlacement:t.options.fitBoundsPlacement,clip:t.options.clip,placeholderFillStyle:t.options.placeholderFillStyle,opacity:t.options.opacity,preload:t.options.preload,degrees:t.options.degrees,compositeOperation:t.options.compositeOperation,springStiffness:n.springStiffness,animationTime:n.animationTime,minZoomImageRatio:n.minZoomImageRatio,wrapHorizontal:n.wrapHorizontal,wrapVertical:n.wrapVertical,immediateRender:n.immediateRender,blendTime:n.blendTime,alwaysBlend:n.alwaysBlend,minPixelRatio:n.minPixelRatio,smoothTileEdgesMinZoom:n.smoothTileEdgesMinZoom,iOSDevice:n.iOSDevice,crossOriginPolicy:t.options.crossOriginPolicy,ajaxWithCredentials:t.options.ajaxWithCredentials,loadTilesWithAjax:t.options.loadTilesWithAjax,ajaxHeaders:t.options.ajaxHeaders,debugMode:n.debugMode}),n.collectionMode&&n.world.setAutoRefigureSizes(!1),n.world.addItem(r,{index:t.options.index}),0===n._loadQueue.length&&o(t),1!==n.world.getItemCount()||n.preserveViewport||n.viewport.goHome(!0),n.navigator&&(i=e.extend({},t.options,{replace:!1,originalTiledImage:r,tileSource:t.tileSource}),n.navigator.addTiledImage(i)),t.options.success&&t.options.success({item:r})}}e.isArray(t.tileSource)?setTimeout((function(){i({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:t.tileSource,options:t})})):(this._loadQueue.push(r),function(t,n,r,i,o){var a=t;if("string"==e.type(n))if(n.match(/^\s*<.*>\s*$/))n=e.parseXml(n);else if(n.match(/^\s*[\{\[].*[\}\]]\s*$/))try{var s=e.parseJSON(n);n=s}catch(e){}function c(e,t){e.ready?i(e):(e.addHandler("ready",(function(){i(e)})),e.addHandler("open-failed",(function(e){o({message:e.message,source:t})})))}setTimeout((function(){if("string"==e.type(n))(n=new e.TileSource({url:n,crossOriginPolicy:void 0!==r.crossOriginPolicy?r.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:t.ajaxHeaders,useCanvas:t.useCanvas,success:function(e){i(e.tileSource)}})).addHandler("open-failed",(function(e){o(e)}));else if(e.isPlainObject(n)||n.nodeType)if(void 0!==n.crossOriginPolicy||void 0===r.crossOriginPolicy&&void 0===t.crossOriginPolicy||(n.crossOriginPolicy=void 0!==r.crossOriginPolicy?r.crossOriginPolicy:t.crossOriginPolicy),void 0===n.ajaxWithCredentials&&(n.ajaxWithCredentials=t.ajaxWithCredentials),void 0===n.useCanvas&&(n.useCanvas=t.useCanvas),e.isFunction(n.getTileUrl)){var s=new e.TileSource(n);s.getTileUrl=n.getTileUrl,i(s)}else{var u=e.TileSource.determineType(a,n);if(!u)return void o({message:"Unable to load TileSource",source:n});var l=u.prototype.configure.apply(a,[n]);c(new u(l),n)}else c(n,n)}))}(this,t.tileSource,t,(function(e){r.tileSource=e,a()}),(function(e){e.options=t,i(e),a()})))},addSimpleImage:function(t){e.console.assert(t,"[Viewer.addSimpleImage] options is required"),e.console.assert(t.url,"[Viewer.addSimpleImage] options.url is required");var n=e.extend({},t,{tileSource:{type:"image",url:t.url}});delete n.url,this.addTiledImage(n)},addLayer:function(t){var n=this;e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var r=e.extend({},t,{success:function(e){n.raiseEvent("add-layer",{options:t,drawer:e.item})},error:function(e){n.raiseEvent("add-layer-failed",e)}});return this.addTiledImage(r),this},getLayerAtLevel:function(t){return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(t)},getLevelOfLayer:function(t){return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(t)},getLayersCount:function(){return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(t,n){return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(t,n)},removeLayer:function(t){return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(t)},forceRedraw:function(){return t[this.hash].forceRedraw=!0,this},bindSequenceControls:function(){var t=e.delegate(this,l),n=e.delegate(this,f),r=e.delegate(this,U),i=e.delegate(this,V),o=this.navImages,a=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(a=!1),this.previousButton=new e.Button({element:this.previousButton?e.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.PreviousPage"),srcRest:j(this.prefixUrl,o.previous.REST),srcGroup:j(this.prefixUrl,o.previous.GROUP),srcHover:j(this.prefixUrl,o.previous.HOVER),srcDown:j(this.prefixUrl,o.previous.DOWN),onRelease:i,onFocus:t,onBlur:n}),this.nextButton=new e.Button({element:this.nextButton?e.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.NextPage"),srcRest:j(this.prefixUrl,o.next.REST),srcGroup:j(this.prefixUrl,o.next.GROUP),srcHover:j(this.prefixUrl,o.next.HOVER),srcDown:j(this.prefixUrl,o.next.DOWN),onRelease:r,onFocus:t,onBlur:n}),this.navPrevNextWrap||this.previousButton.disable(),this.tileSources&&this.tileSources.length||this.nextButton.disable(),a&&(this.paging=new e.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:e.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var t=e.delegate(this,P),n=e.delegate(this,R),r=e.delegate(this,D),i=e.delegate(this,I),o=e.delegate(this,N),a=e.delegate(this,z),s=e.delegate(this,B),c=e.delegate(this,F),u=e.delegate(this,W),d=e.delegate(this,H),p=e.delegate(this,l),h=e.delegate(this,f),g=this.navImages,v=[],m=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(m=!1),this.showZoomControl&&(v.push(this.zoomInButton=new e.Button({element:this.zoomInButton?e.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomIn"),srcRest:j(this.prefixUrl,g.zoomIn.REST),srcGroup:j(this.prefixUrl,g.zoomIn.GROUP),srcHover:j(this.prefixUrl,g.zoomIn.HOVER),srcDown:j(this.prefixUrl,g.zoomIn.DOWN),onPress:t,onRelease:n,onClick:r,onEnter:t,onExit:n,onFocus:p,onBlur:h})),v.push(this.zoomOutButton=new e.Button({element:this.zoomOutButton?e.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomOut"),srcRest:j(this.prefixUrl,g.zoomOut.REST),srcGroup:j(this.prefixUrl,g.zoomOut.GROUP),srcHover:j(this.prefixUrl,g.zoomOut.HOVER),srcDown:j(this.prefixUrl,g.zoomOut.DOWN),onPress:i,onRelease:n,onClick:o,onEnter:i,onExit:n,onFocus:p,onBlur:h}))),this.showHomeControl&&v.push(this.homeButton=new e.Button({element:this.homeButton?e.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Home"),srcRest:j(this.prefixUrl,g.home.REST),srcGroup:j(this.prefixUrl,g.home.GROUP),srcHover:j(this.prefixUrl,g.home.HOVER),srcDown:j(this.prefixUrl,g.home.DOWN),onRelease:a,onFocus:p,onBlur:h})),this.showFullPageControl&&v.push(this.fullPageButton=new e.Button({element:this.fullPageButton?e.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.FullPage"),srcRest:j(this.prefixUrl,g.fullpage.REST),srcGroup:j(this.prefixUrl,g.fullpage.GROUP),srcHover:j(this.prefixUrl,g.fullpage.HOVER),srcDown:j(this.prefixUrl,g.fullpage.DOWN),onRelease:s,onFocus:p,onBlur:h})),this.showRotationControl&&(v.push(this.rotateLeftButton=new e.Button({element:this.rotateLeftButton?e.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateLeft"),srcRest:j(this.prefixUrl,g.rotateleft.REST),srcGroup:j(this.prefixUrl,g.rotateleft.GROUP),srcHover:j(this.prefixUrl,g.rotateleft.HOVER),srcDown:j(this.prefixUrl,g.rotateleft.DOWN),onRelease:c,onFocus:p,onBlur:h})),v.push(this.rotateRightButton=new e.Button({element:this.rotateRightButton?e.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateRight"),srcRest:j(this.prefixUrl,g.rotateright.REST),srcGroup:j(this.prefixUrl,g.rotateright.GROUP),srcHover:j(this.prefixUrl,g.rotateright.HOVER),srcDown:j(this.prefixUrl,g.rotateright.DOWN),onRelease:u,onFocus:p,onBlur:h}))),this.showFlipControl&&v.push(this.flipButton=new e.Button({element:this.flipButton?e.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Flip"),srcRest:j(this.prefixUrl,g.flip.REST),srcGroup:j(this.prefixUrl,g.flip.GROUP),srcHover:j(this.prefixUrl,g.flip.HOVER),srcDown:j(this.prefixUrl,g.flip.DOWN),onRelease:d,onFocus:p,onBlur:h})),m&&(this.buttons=new e.ButtonGroup({buttons:v,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttons.element,this.addHandler("open",e.delegate(this,L)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},currentPage:function(){return this._sequenceIndex},goToPage:function(e){return this.tileSources&&e>=0&&e<this.tileSources.length&&(this._sequenceIndex=e,this._updateSequenceButtons(e),this.open(this.tileSources[e]),this.referenceStrip&&this.referenceStrip.setFocus(e),this.raiseEvent("page",{page:e})),this},addOverlay:function(t,n,r,a){var s;if(s=e.isPlainObject(t)?t:{element:t,location:n,placement:r,onDraw:a},t=e.getElement(s.element),o(this.currentOverlays,t)>=0)return this;var c=i(this,s);return this.currentOverlays.push(c),c.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:s.location,placement:s.placement}),this},updateOverlay:function(n,r,i){var a;return n=e.getElement(n),(a=o(this.currentOverlays,n))>=0&&(this.currentOverlays[a].update(r,i),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:n,location:r,placement:i})),this},removeOverlay:function(n){var r;return n=e.getElement(n),(r=o(this.currentOverlays,n))>=0&&(this.currentOverlays[r].destroy(),this.currentOverlays.splice(r,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:n})),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(t){var n;return t=e.getElement(t),(n=o(this.currentOverlays,t))>=0?this.currentOverlays[n]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var n=e.makeNeutralElement("div");n.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(n),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e<t;e++)this.currentOverlays[e].drawHTML(this.overlaysContainer,this.viewport)},_cancelPendingImages:function(){this._loadQueue=[]},removeReferenceStrip:function(){this.showReferenceStrip=!1,this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null)},addReferenceStrip:function(){if(this.showReferenceStrip=!0,this.sequenceMode){if(this.referenceStrip)return;this.tileSources.length&&this.tileSources.length>1&&(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.')}})}(OpenSeadragon),function(e){function t(e){var t={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};if(this.viewer.raiseEvent("navigator-click",t),!t.preventDefaultAction&&e.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var n=this.viewport.pointFromPixel(e.position);this.panVertical?this.panHorizontal||(n.x=this.viewer.viewport.getCenter(!0).x):n.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(n),this.viewer.viewport.applyConstraints()}}function n(e){var t={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.viewer.raiseEvent("navigator-drag",t),!t.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.flipped&&(e.delta.x=-e.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function r(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function i(e){return this.viewer.raiseEvent("navigator-scroll",{tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent}),!1}function o(e,t){a(e,"rotate("+t+"deg)")}function a(e,t){e.style.webkitTransform=t,e.style.mozTransform=t,e.style.msTransform=t,e.style.oTransform=t,e.style.transform=t}e.Navigator=function(a){var s,c,u,l,f=a.viewer,d=this;function p(e){o(d.displayRegionContainer,e),o(d.displayRegion,-e),d.viewport.setRotation(e)}(a.id?(this.element=document.getElementById(a.id),a.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(a.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),a.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:a.autoFade},a.position&&("BOTTOM_RIGHT"==a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"==a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"==a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"==a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"==a.position&&(a.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,a.controlOptions.top=a.top,a.controlOptions.left=a.left,a.controlOptions.height=a.height,a.controlOptions.width=a.width))),this.element.id=a.id,this.element.className+=" navigator",(a=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},a,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:a.autoResize,minZoomImageRatio:1,background:a.background,opacity:a.opacity,borderColor:a.borderColor,displayRegionColor:a.displayRegionColor})).minPixelRatio=this.minPixelRatio=f.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),a.controlOptions.anchor!=e.ControlAnchor.NONE&&(u=this.element.style,l=this.borderWidth,u.margin="0px",u.border=l+"px solid "+a.borderColor,u.padding="0px",u.background=a.background,u.opacity=a.opacity,u.overflow="hidden"),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(e,t){e.position="relative",e.top="0px",e.left="0px",e.fontSize="0px",e.overflow="hidden",e.border=t+"px solid "+a.displayRegionColor,e.margin="0px",e.padding="0px",e.background="transparent",e.float="left",e.cssFloat="left",e.styleFloat="left",e.zIndex=999999999,e.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,a.controlOptions),this._resizeWithViewer=a.controlOptions.anchor!=e.ControlAnchor.ABSOLUTE&&a.controlOptions.anchor!=e.ControlAnchor.NONE,a.width&&a.height?(this.setWidth(a.width),this.setHeight(a.height)):this._resizeWithViewer&&(s=e.getElementSize(f.element),this.element.style.height=Math.round(s.y*a.sizeRatio)+"px",this.element.style.width=Math.round(s.x*a.sizeRatio)+"px",this.oldViewerSize=s,c=e.getElementSize(this.element),this.elementArea=c.x*c.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[a]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),a.navigatorRotate)&&(p(a.viewer.viewport?a.viewer.viewport.getRotation():a.viewer.degrees||0),a.viewer.addHandler("rotate",(function(e){p(e.degrees)})));this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({element:this.element,dragHandler:e.delegate(this,n),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,r),scrollHandler:e.delegate(this,i)}),this.addHandler("reset-size",(function(){d.viewport&&d.viewport.goHome(!0)})),f.world.addHandler("item-index-change",(function(e){window.setTimeout((function(){var t=d.world.getItemAt(e.previousIndex);d.world.setItemIndex(t,e.newIndex)}),1)})),f.world.addHandler("remove-item",(function(e){var t=e.item,n=d._getMatchingItem(t);n&&d.world.removeItem(n)})),this.update(f.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},setWidth:function(e){this.width=e,this.element.style.width="number"==typeof e?e+"px":e,this._resizeWithViewer=!1},setHeight:function(e){this.height=e,this.element.style.height="number"==typeof e?e+"px":e,this._resizeWithViewer=!1},setFlip:function(e){return this.viewport.setFlip(e),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(e){a(this.displayRegion,e),a(this.canvas,e),a(this.element,e)},update:function(t){var n,r,i,o,a,s;if(n=e.getElementSize(this.viewer.element),this._resizeWithViewer&&n.x&&n.y&&!n.equals(this.oldViewerSize)&&(this.oldViewerSize=n,this.maintainSizeRatio||!this.elementArea?(r=n.x*this.sizeRatio,i=n.y*this.sizeRatio):(r=Math.sqrt(this.elementArea*(n.x/n.y)),i=this.elementArea/r),this.element.style.width=Math.round(r)+"px",this.element.style.height=Math.round(i)+"px",this.elementArea||(this.elementArea=r*i),this.updateSize()),t&&this.viewport){o=t.getBoundsNoRotate(!0),a=this.viewport.pixelFromPointNoRotate(o.getTopLeft(),!1),s=this.viewport.pixelFromPointNoRotate(o.getBottomRight(),!1).minus(this.totalBorderWidths);var c=this.displayRegion.style;c.display=this.world.getItemCount()?"block":"none",c.top=Math.round(a.y)+"px",c.left=Math.round(a.x)+"px";var u=Math.abs(a.x-s.x),l=Math.abs(a.y-s.y);c.width=Math.round(Math.max(u,0))+"px",c.height=Math.round(Math.max(l,0))+"px"}},addTiledImage:function(t){var n=this,r=t.originalTiledImage;delete t.original;var i=e.extend({},t,{success:function(e){var t=e.item;function i(){n._matchBounds(t,r)}t._originalForNavigator=r,n._matchBounds(t,r,!0),r.addHandler("bounds-change",i),r.addHandler("clip-change",i),r.addHandler("opacity-change",(function(){n._matchOpacity(t,r)})),r.addHandler("composite-operation-change",(function(){n._matchCompositeOperation(t,r)}))}});return e.Viewer.prototype.addTiledImage.apply(this,[i])},_getMatchingItem:function(e){for(var t,n=this.world.getItemCount(),r=0;r<n;r++)if((t=this.world.getItemAt(r))._originalForNavigator===e)return t;return null},_matchBounds:function(e,t,n){var r=t.getBoundsNoRotate();e.setPosition(r.getTopLeft(),n),e.setWidth(r.width,n),e.setRotation(t.getRotation(),n),e.setClip(t.getClip())},_matchOpacity:function(e,t){e.setOpacity(t.opacity)},_matchCompositeOperation:function(e,t){e.setCompositeOperation(t.compositeOperation)}})}(OpenSeadragon),function(e){var t={Errors:{Dzc:"Sorry, we don't support Deep Zoom Collections!",Dzi:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Xml:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",ImageFormat:"Sorry, we don't support {0}-based Deep Zoom Images.",Security:"It looks like a security restriction stopped us from loading this Deep Zoom Image.",Status:"This space unintentionally left blank ({0} {1}).",OpenFailed:"Unable to open {0}: {1}"},Tooltips:{FullPage:"Toggle full page",Home:"Go home",ZoomIn:"Zoom in",ZoomOut:"Zoom out",NextPage:"Next page",PreviousPage:"Previous page",RotateLeft:"Rotate left",RotateRight:"Rotate right",Flip:"Flip Horizontally"}};e.extend(e,{getString:function(n){var r,i=n.split("."),o=null,a=arguments,s=t;for(r=0;r<i.length-1;r++)s=s[i[r]]||{};return"string"!=typeof(o=s[i[r]])&&(e.console.log("Untranslated source string:",n),o=""),o.replace(/\{\d+\}/g,(function(e){var t=parseInt(e.match(/\d+/),10)+1;return t<a.length?a[t]:""}))},setString:function(e,n){var r,i=e.split("."),o=t;for(r=0;r<i.length-1;r++)o[i[r]]||(o[i[r]]={}),o=o[i[r]];o[i[r]]=n}})}(OpenSeadragon),function(e){e.Point=function(e,t){this.x="number"==typeof e?e:0,this.y="number"==typeof t?t:0},e.Point.prototype={clone:function(){return new e.Point(this.x,this.y)},plus:function(t){return new e.Point(this.x+t.x,this.y+t.y)},minus:function(t){return new e.Point(this.x-t.x,this.y-t.y)},times:function(t){return new e.Point(this.x*t,this.y*t)},divide:function(t){return new e.Point(this.x/t,this.y/t)},negate:function(){return new e.Point(-this.x,-this.y)},distanceTo:function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},squaredDistanceTo:function(e){return Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2)},apply:function(t){return new e.Point(t(this.x),t(this.y))},equals:function(t){return t instanceof e.Point&&this.x===t.x&&this.y===t.y},rotate:function(t,n){var r,i;if(n=n||new e.Point(0,0),t%90==0){switch(e.positiveModulo(t,360)){case 0:r=1,i=0;break;case 90:r=0,i=1;break;case 180:r=-1,i=0;break;case 270:r=0,i=-1}}else{var o=t*Math.PI/180;r=Math.cos(o),i=Math.sin(o)}var a=r*(this.x-n.x)-i*(this.y-n.y)+n.x,s=i*(this.x-n.x)+r*(this.y-n.y)+n.y;return new e.Point(a,s)},toString:function(){return"("+Math.round(100*this.x)/100+","+Math.round(100*this.y)/100+")"}}}(OpenSeadragon),function(e){e.TileSource=function(t,n,r,i,o,a){var s,c,u=this,l=arguments;if(s=e.isPlainObject(t)?t:{width:l[0],height:l[1],tileSize:l[2],tileOverlap:l[3],minLevel:l[4],maxLevel:l[5]},e.EventSource.call(this),e.extend(!0,this,s),!this.success)for(c=0;c<arguments.length;c++)if(e.isFunction(arguments[c])){this.success=arguments[c];break}this.success&&this.addHandler("ready",(function(e){u.success(e)})),"string"==e.type(arguments[0])&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new e.Point(10,10),this._tileWidth=0,this._tileHeight=0,this.tileOverlap=0,this.minLevel=0,this.maxLevel=0,this.ready=!1,this.getImageInfo(this.url)):(this.ready=!0,this.aspectRatio=s.width&&s.height?s.width/s.height:1,this.dimensions=new e.Point(s.width,s.height),this.tileSize?(this._tileWidth=this._tileHeight=this.tileSize,delete this.tileSize):(this.tileWidth?(this._tileWidth=this.tileWidth,delete this.tileWidth):this._tileWidth=0,this.tileHeight?(this._tileHeight=this.tileHeight,delete this.tileHeight):this._tileHeight=0),this.tileOverlap=s.tileOverlap?s.tileOverlap:0,this.minLevel=s.minLevel?s.minLevel:0,this.maxLevel=void 0!==s.maxLevel&&null!==s.maxLevel?s.maxLevel:s.width&&s.height?Math.ceil(Math.log(Math.max(s.width,s.height))/Math.log(2)):0,this.success&&e.isFunction(this.success)&&this.success(this))},e.TileSource.prototype={getTileSize:function(t){return e.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(e){return this._tileWidth?this._tileWidth:this.getTileSize(e)},getTileHeight:function(e){return this._tileHeight?this._tileHeight:this.getTileSize(e)},getLevelScale:function(e){var t,n={};for(t=0;t<=this.maxLevel;t++)n[t]=1/Math.pow(2,this.maxLevel-t);return this.getLevelScale=function(e){return n[e]},this.getLevelScale(e)},getNumTiles:function(t){var n=this.getLevelScale(t),r=Math.ceil(n*this.dimensions.x/this.getTileWidth(t)),i=Math.ceil(n*this.dimensions.y/this.getTileHeight(t));return new e.Point(r,i)},getPixelRatio:function(t){var n=this.dimensions.times(this.getLevelScale(t)),r=1/n.x,i=1/n.y;return new e.Point(r,i)},getClosestLevel:function(){var e,t;for(e=this.minLevel+1;e<=this.maxLevel&&!((t=this.getNumTiles(e)).x>1||t.y>1);e++);return e-1},getTileAtPoint:function(t,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 i=this.dimensions.x*this.getLevelScale(t),o=n.x*i,a=n.y*i,s=Math.floor(o/this.getTileWidth(t)),c=Math.floor(a/this.getTileHeight(t));n.x>=1&&(s=this.getNumTiles(t).x-1);return n.y>=1/this.aspectRatio-1e-15&&(c=this.getNumTiles(t).y-1),new e.Point(s,c)},getTileBounds:function(t,n,r,i){var o=this.dimensions.times(this.getLevelScale(t)),a=this.getTileWidth(t),s=this.getTileHeight(t),c=0===n?0:a*n-this.tileOverlap,u=0===r?0:s*r-this.tileOverlap,l=a+(0===n?1:2)*this.tileOverlap,f=s+(0===r?1:2)*this.tileOverlap,d=1/o.x;return l=Math.min(l,o.x-c),f=Math.min(f,o.y-u),i?new e.Rect(0,0,l,f):new e.Rect(c*d,u*d,l*d,f*d)},getImageInfo:function(t){var n,r,i,o,a,s,c,u=this;t&&(c=(s=(a=t.split("/"))[a.length-1]).lastIndexOf("."))>-1&&(a[a.length-1]=s.slice(0,c)),r=function(n){"string"==typeof n&&(n=e.parseXml(n));var r=e.TileSource.determineType(u,n,t);r?(void 0===(o=r.prototype.configure.apply(u,[n,t])).ajaxWithCredentials&&(o.ajaxWithCredentials=u.ajaxWithCredentials),i=new r(o),u.ready=!0,u.raiseEvent("ready",{tileSource:i})):u.raiseEvent("open-failed",{message:"Unable to load TileSource",source:t})},t.match(/\.js$/)?(n=t.split("/").pop().replace(".js",""),e.jsonp({url:t,async:!1,callbackName:n,callback:r})):e.makeAjaxRequest({url:t,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(t){var n=function(t){var n,r,i=t.responseText,o=t.status;if(!t)throw new Error(e.getString("Errors.Security"));if(200!==t.status&&0!==t.status)throw o=t.status,n=404==o?"Not Found":t.statusText,new Error(e.getString("Errors.Status",o,n));if(i.match(/\s*<.*/))try{r=t.responseXML&&t.responseXML.documentElement?t.responseXML:e.parseXml(i)}catch(e){r=t.responseText}else if(i.match(/\s*[\{\[].*/))try{r=e.parseJSON(i)}catch(e){r=i}else r=i;return r}(t);r(n)},error:function(e,n){var r;try{r="HTTP "+e.status+" attempting to load TileSource"}catch(e){r=(void 0!==n&&n.toString?n.toString():"Unknown error")+" attempting to load TileSource"}u.raiseEvent("open-failed",{message:r,source:t})}})},supports:function(e,t){return!1},configure:function(e,t){throw new Error("Method not implemented.")},getTileUrl:function(e,t,n){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(e,t,n){return{}},tileExists:function(e,t,n){var r=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&n>=0&&t<r.x&&n<r.y}},e.extend(!0,e.TileSource.prototype,e.EventSource.prototype),e.TileSource.determineType=function(t,n,r){var i;for(i in OpenSeadragon)if(i.match(/.+TileSource$/)&&e.isFunction(OpenSeadragon[i])&&e.isFunction(OpenSeadragon[i].prototype.supports)&&OpenSeadragon[i].prototype.supports.call(t,n,r))return OpenSeadragon[i];e.console.error("No TileSource was able to open %s %s",r,n)}}(OpenSeadragon),function(e){function t(t,n){var r,i,o=n.Image,a=o.Url,s=o.Format,c=o.Size,u=o.DisplayRect||[],l=parseInt(c.Width,10),f=parseInt(c.Height,10),d=parseInt(o.TileSize,10),p=parseInt(o.Overlap,10),h=[];for(i=0;i<u.length;i++)r=u[i].Rect,h.push(new e.DisplayRect(parseInt(r.X,10),parseInt(r.Y,10),parseInt(r.Width,10),parseInt(r.Height,10),parseInt(r.MinLevel,10),parseInt(r.MaxLevel,10)));return e.extend(!0,{width:l,height:f,tileSize:d,tileOverlap:p,minLevel:null,maxLevel:null,tilesUrl:a,fileFormat:s,displayRects:h},n)}e.DziTileSource=function(t,n,r,i,o,a,s,c,u){var l,f,d,p;if(p=e.isPlainObject(t)?t:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4],fileFormat:arguments[5],displayRects:arguments[6],minLevel:arguments[7],maxLevel:arguments[8]},this._levelRects={},this.tilesUrl=p.tilesUrl,this.fileFormat=p.fileFormat,this.displayRects=p.displayRects,this.displayRects)for(l=this.displayRects.length-1;l>=0;l--)for(d=(f=this.displayRects[l]).minLevel;d<=f.maxLevel;d++)this._levelRects[d]||(this._levelRects[d]=[]),this._levelRects[d].push(f);e.TileSource.apply(this,[p])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var n;return e.Image?n=e.Image.xmlns:e.documentElement&&("Image"!=e.documentElement.localName&&"Image"!=e.documentElement.tagName||(n=e.documentElement.namespaceURI)),-1!==(n=(n||"").toLowerCase()).indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==n.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(n,r){var i;return i=e.isPlainObject(n)?t(this,n):function(n,r){if(!r||!r.documentElement)throw new Error(e.getString("Errors.Xml"));var i,o,a,s,c,u=r.documentElement,l=u.localName||u.tagName,f=r.documentElement.namespaceURI,d=null,p=[];if("Image"==l)try{if(void 0===(s=u.getElementsByTagName("Size")[0])&&(s=u.getElementsByTagNameNS(f,"Size")[0]),d={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:u.getAttribute("Url"),Format:u.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(u.getAttribute("Overlap"),10),TileSize:parseInt(u.getAttribute("TileSize"),10),Size:{Height:parseInt(s.getAttribute("Height"),10),Width:parseInt(s.getAttribute("Width"),10)}}},!e.imageFormatSupported(d.Image.Format))throw new Error(e.getString("Errors.ImageFormat",d.Image.Format.toUpperCase()));for(void 0===(i=u.getElementsByTagName("DisplayRect"))&&(i=u.getElementsByTagNameNS(f,"DisplayRect")[0]),c=0;c<i.length;c++)o=i[c],void 0===(a=o.getElementsByTagName("Rect")[0])&&(a=o.getElementsByTagNameNS(f,"Rect")[0]),p.push({Rect:{X:parseInt(a.getAttribute("X"),10),Y:parseInt(a.getAttribute("Y"),10),Width:parseInt(a.getAttribute("Width"),10),Height:parseInt(a.getAttribute("Height"),10),MinLevel:parseInt(o.getAttribute("MinLevel"),10),MaxLevel:parseInt(o.getAttribute("MaxLevel"),10)}});return p.length&&(d.Image.DisplayRect=p),t(n,d)}catch(t){throw t instanceof Error?t:new Error(e.getString("Errors.Dzi"))}else{if("Collection"==l)throw new Error(e.getString("Errors.Dzc"));if("Error"==l){var h=u.getElementsByTagName("Message")[0].firstChild.nodeValue;throw new Error(h)}}throw new Error(e.getString("Errors.Dzi"))}(this,n),r&&!i.tilesUrl&&(i.tilesUrl=r.replace(/([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/,"$1_files/"),-1!=r.search(/\.(dzi|xml|js)\?/)?i.queryParams=r.match(/\?.*/):i.queryParams=""),i},getTileUrl:function(e,t,n){return[this.tilesUrl,e,"/",t,"_",n,".",this.fileFormat,this.queryParams].join("")},tileExists:function(e,t,n){var r,i,o,a,s,c,u,l=this._levelRects[e];if(this.minLevel&&e<this.minLevel||this.maxLevel&&e>this.maxLevel)return!1;if(!l||!l.length)return!0;for(u=l.length-1;u>=0;u--)if(!(e<(r=l[u]).minLevel||e>r.maxLevel)&&(i=this.getLevelScale(e),o=r.x*i,a=r.y*i,s=o+r.width*i,c=a+r.height*i,o=Math.floor(o/this._tileWidth),a=Math.floor(a/this._tileWidth),s=Math.ceil(s/this._tileWidth),c=Math.ceil(c/this._tileWidth),o<=t&&t<s&&a<=n&&n<c))return!0;return!1}})}(OpenSeadragon),function(e){function t(e){var t=Array.isArray(e.profile)?e.profile[0]:e.profile,n=-1!==["http://library.stanford.edu/iiif/image-api/compliance.html#level0","http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0","http://iiif.io/api/image/2/level0.json","level0","https://iiif.io/api/image/3/level0.json"].indexOf(t),r=!1;return 2===e.version&&e.profile.length>1&&e.profile[1].supports&&(r=-1!==e.profile[1].supports.indexOf("sizeByW")),3===e.version&&e.extraFeatures&&(r=-1!==e.extraFeatures.indexOf("sizeByWh")),!n||r}function n(e){for(var t=[],n=0;n<e.sizes.length;n++)t.push({url:e["@id"]+"/full/"+e.sizes[n].width+","+(3===e.version?e.sizes[n].height:"")+"/0/default."+e.tileFormat,width:e.sizes[n].width,height:e.sizes[n].height});return t.sort((function(e,t){return e.width-t.width}))}e.IIIFTileSource=function(r){if(e.extend(!0,this,r),!(this.height&&this.width&&this["@id"]))throw new Error("IIIF required parameters not provided.");if(r.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=r.version,this.tile_width&&this.tile_height)r.tileWidth=this.tile_width,r.tileHeight=this.tile_height;else if(this.tile_width)r.tileSize=this.tile_width;else if(this.tile_height)r.tileSize=this.tile_height;else if(this.tiles)if(1==this.tiles.length)r.tileWidth=this.tiles[0].width,r.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var i=0;i<this.tiles.length;i++)for(var o=0;o<this.tiles[i].scaleFactors.length;o++){var a=this.tiles[i].scaleFactors[o];this.scale_factors.push(a),r.tileSizePerScaleFactor[a]={width:this.tiles[i].width,height:this.tiles[i].height||this.tiles[i].width}}}else if(t(r)){for(var s=Math.min(this.height,this.width),c=[256,512,1024],u=[],l=0;l<c.length;l++)c[l]<=s&&u.push(c[l]);u.length>0?r.tileSize=Math.max.apply(null,u):r.tileSize=s}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,r.levels=n(this),e.extend(!0,r,{width:r.levels[r.levels.length-1].width,height:r.levels[r.levels.length-1].height,tileSize:Math.max(r.height,r.width),tileOverlap:0,minLevel:0,maxLevel:r.levels.length-1}),this.levels=r.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!r.maxLevel&&!this.emulateLegacyImagePyramid)if(this.scale_factors){var f=Math.max.apply(null,this.scale_factors);r.maxLevel=Math.round(Math.log(f)*Math.LOG2E)}else r.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));e.TileSource.apply(this,[r])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return!(!e.protocol||"http://iiif.io/api/image"!=e.protocol)||(!(!e["@context"]||"http://library.stanford.edu/iiif/image-api/1.1/context.json"!=e["@context"]&&"http://iiif.io/api/image/1/context.json"!=e["@context"])||(!(!e.profile||0!==e.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html"))||(!!(e.identifier&&e.width&&e.height)||!(!e.documentElement||"info"!=e.documentElement.tagName||"http://library.stanford.edu/iiif/image-api/ns/"!=e.documentElement.namespaceURI))))},configure:function(t,n){if(e.isPlainObject(t)){if(t["@context"]){var r=t["@context"];if(Array.isArray(r))for(var i=0;i<r.length;i++)if("string"==typeof r[i]&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(r[i])||"http://library.stanford.edu/iiif/image-api/1.1/context.json"===r[i])){r=r[i];break}switch(r){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":t.version=1;break;case"http://iiif.io/api/image/2/context.json":t.version=2;break;case"http://iiif.io/api/image/3/context.json":t.version=3;break;default:e.console.error("Data has a @context property which contains no known IIIF context URI.")}}else t["@context"]="http://iiif.io/api/image/1.0/context.json",t["@id"]=n.replace("/info.json",""),t.version=1;if(!t["@id"]&&t.id&&(t["@id"]=t.id),t.preferredFormats)for(var o=0;o<t.preferredFormats.length;o++)if(OpenSeadragon.imageFormatSupported(t.preferredFormats[o])){t.tileFormat=t.preferredFormats[o];break}return t}var a=function(t){if(!t||!t.documentElement)throw new Error(e.getString("Errors.Xml"));var n=t.documentElement,r=n.tagName,i=null;if("info"==r)try{return function t(n,r,i){var o,a;if(3==n.nodeType&&i)(a=n.nodeValue.trim()).match(/^\d*$/)&&(a=Number(a)),r[i]?(e.isArray(r[i])||(r[i]=[r[i]]),r[i].push(a)):r[i]=a;else if(1==n.nodeType)for(o=0;o<n.childNodes.length;o++)t(n.childNodes[o],r,n.nodeName)}(n,i={}),i}catch(t){throw t instanceof Error?t:new Error(e.getString("Errors.IIIF"))}throw new Error(e.getString("Errors.IIIF"))}(t);return a["@context"]="http://iiif.io/api/image/1.0/context.json",a["@id"]=n.replace("/info.xml",""),a.version=1,a},getTileWidth:function(t){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileWidth.call(this,t);var n=Math.pow(2,this.maxLevel-t);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[n]?this.tileSizePerScaleFactor[n].width:this._tileWidth},getTileHeight:function(t){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileHeight.call(this,t);var n=Math.pow(2,this.maxLevel-t);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[n]?this.tileSizePerScaleFactor[n].height:this._tileHeight},getLevelScale:function(t){if(this.emulateLegacyImagePyramid){var n=NaN;return this.levels.length>0&&t>=this.minLevel&&t<=this.maxLevel&&(n=this.levels[t].width/this.levels[this.maxLevel].width),n}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){return this.emulateLegacyImagePyramid?this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0):e.TileSource.prototype.getNumTiles.call(this,t)},getTileAtPoint:function(t,n){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,t,n)},getTileUrl:function(e,t,n){if(this.emulateLegacyImagePyramid){var r=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].url),r}var i,o,a,s,c,u,l,f,d,p,h,g,v,m=Math.pow(.5,this.maxLevel-e),y=Math.ceil(this.width*m),b=Math.ceil(this.height*m);return i=this.getTileWidth(e),o=this.getTileHeight(e),a=Math.ceil(i/m),s=Math.ceil(o/m),v=1===this.version?"native."+this.tileFormat:"default."+this.tileFormat,y<i&&b<o?(p=2===this.version&&y===this.width||3===this.version&&y===this.width&&b===this.height?"max":3===this.version?y+","+b:y+",",c="full"):(u=t*a,l=n*s,f=Math.min(a,this.width-u),d=Math.min(s,this.height-l),c=0===t&&0===n&&f===this.width&&d===this.height?"full":[u,l,f,d].join(","),h=Math.ceil(f*m),g=Math.ceil(d*m),p=2===this.version&&h===this.width||3===this.version&&h===this.width&&g===this.height?"max":3===this.version?h+","+g:h+","),[this["@id"],c,p,"0",v].join("/")},__testonly__:{canBeTiled:t,constructLevels:n}})}(OpenSeadragon),function(e){e.OsmTileSource=function(t,n,r,i,o){var a;(a=e.isPlainObject(t)?t:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]}).width&&a.height||(a.width=65572864,a.height=65572864),a.tileSize||(a.tileSize=256,a.tileOverlap=0),a.tilesUrl||(a.tilesUrl="http://tile.openstreetmap.org/"),a.minLevel=8,e.TileSource.apply(this,[a])},e.extend(e.OsmTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"openstreetmaps"==e.type},configure:function(e,t){return e},getTileUrl:function(e,t,n){return this.tilesUrl+(e-8)+"/"+t+"/"+n+".png"}})}(OpenSeadragon),function(e){e.TmsTileSource=function(t,n,r,i,o){var a;a=e.isPlainObject(t)?t:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var s,c=256*Math.ceil(a.width/256),u=256*Math.ceil(a.height/256);s=c>u?c/256:u/256,a.maxLevel=Math.ceil(Math.log(s)/Math.log(2))-1,a.tileSize=256,a.width=c,a.height=u,e.TileSource.apply(this,[a])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"==e.type},configure:function(e,t){return e},getTileUrl:function(e,t,n){var r=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(r-n)+".png"}})}(OpenSeadragon),function(e){e.ZoomifyTileSource=function(e){e.tileSize=256;var t={x:e.width,y:e.height};for(e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];parseInt(t.x,10)>e.tileSize||parseInt(t.y,10)>e.tileSize;)t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),e.imageSizes.push({x:t.x,y:t.y}),e.gridSize.push(this._getGridSize(t.x,t.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[e])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(e,t,n){return{x:Math.ceil(e/n),y:Math.ceil(t/n)}},_calculateAbsoluteTileNumber:function(e,t,n){for(var r=0,i={},o=0;o<e;o++)r+=(i=this.gridSize[o]).x*i.y;return r+=(i=this.gridSize[e]).x*n+t},supports:function(e,t){return e.type&&"zoomifytileservice"==e.type},configure:function(e,t){return e},getTileUrl:function(e,t,n){var r,i=this._calculateAbsoluteTileNumber(e,t,n);return r=Math.floor(i/256),this.tilesUrl+"TileGroup"+r+"/"+e+"-"+t+"-"+n+".jpg"}})}(OpenSeadragon),function(e){function t(e,t){return t.levels}e.LegacyTileSource=function(t){var n,r,i;e.isArray(t)&&(n={type:"legacy-image-pyramid",levels:t}),n.levels=function(t){var n,r,i=[];for(r=0;r<t.length;r++)(n=t[r]).height&&n.width&&n.url?i.push({url:n.url,width:Number(n.width),height:Number(n.height)}):e.console.error("Unsupported image format: %s",n.url?n.url:"<no URL>");return i.sort((function(e,t){return e.height-t.height}))}(n.levels),n.levels.length>0?(r=n.levels[n.levels.length-1].width,i=n.levels[n.levels.length-1].height):(r=0,i=0,e.console.error("No supported image formats found")),e.extend(!0,n,{width:r,height:i,tileSize:Math.max(i,r),tileOverlap:0,minLevel:0,maxLevel:n.levels.length>0?n.levels.length-1:0}),e.TileSource.apply(this,[n]),this.levels=n.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"==e.type||e.documentElement&&"legacy-image-pyramid"==e.documentElement.getAttribute("type")},configure:function(n,r){return e.isPlainObject(n)?t(this,n):function(n,r){if(!r||!r.documentElement)throw new Error(e.getString("Errors.Xml"));var i,o,a=r.documentElement,s=a.tagName,c=null,u=[];if("image"==s)try{for(c={type:a.getAttribute("type"),levels:[]},u=a.getElementsByTagName("level"),o=0;o<u.length;o++)i=u[o],c.levels.push({url:i.getAttribute("url"),width:parseInt(i.getAttribute("width"),10),height:parseInt(i.getAttribute("height"),10)});return t(n,c)}catch(e){throw e instanceof Error?e:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if("collection"==s)throw new Error("Legacy Image Pyramid Collections not yet supported.");if("error"==s)throw new Error("Error: "+r)}throw new Error("Unknown element "+s)}(this,n)},getLevelScale:function(e){var t=NaN;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var r=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].url),r}})}(OpenSeadragon),function(e){e.ImageTileSource=function(t){t=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},t),e.TileSource.apply(this,[t])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t){return e},getImageInfo:function(t){var n=this._image=new Image,r=this;this.crossOriginPolicy&&(n.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(n.useCredentials=this.ajaxWithCredentials),e.addEvent(n,"load",(function(){r.width=Object.prototype.hasOwnProperty.call(n,"naturalWidth")?n.naturalWidth:n.width,r.height=Object.prototype.hasOwnProperty.call(n,"naturalHeight")?n.naturalHeight:n.height,r.aspectRatio=r.width/r.height,r.dimensions=new e.Point(r.width,r.height),r._tileWidth=r.width,r._tileHeight=r.height,r.tileOverlap=0,r.minLevel=0,r.levels=r._buildLevels(),r.maxLevel=r.levels.length-1,r.ready=!0,r.raiseEvent("ready",{tileSource:r})})),e.addEvent(n,"error",(function(){r.raiseEvent("open-failed",{message:"Error loading image at "+t,source:t})})),n.src=t},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var r=null;return e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].url),r},getContext2D:function(e,t,n){var r=null;return e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].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 n=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,r=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,i=document.createElement("canvas"),o=i.getContext("2d");if(i.width=n,i.height=r,o.drawImage(this._image,0,0,n,r),t[0].context2D=o,delete this._image,e.isCanvasTainted(i))return t;for(;n>=2&&r>=2;){n=Math.floor(n/2),r=Math.floor(r/2);var a=document.createElement("canvas"),s=a.getContext("2d");a.width=n,a.height=r,s.drawImage(i,0,0,n,r),t.splice(0,0,{context2D:s,width:n,height:r}),i=a,o=s}return t}})}(OpenSeadragon),function(e){e.TileSourceCollection=function(t,n,r,i){e.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(e){function t(n){e.requestAnimationFrame((function(){!function(n){var r,i,o;n.shouldFade&&(r=e.now(),i=r-n.fadeBeginTime,o=1-i/n.fadeLength,o=Math.min(1,o),o=Math.max(0,o),n.imgGroup&&e.setElementOpacity(n.imgGroup,o,!0),o>0&&t(n))}(n)}))}function n(t,n){t.element.disabled||(n>=e.ButtonState.GROUP&&t.currentState==e.ButtonState.REST&&(!function(t){t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0)}(t),t.currentState=e.ButtonState.GROUP),n>=e.ButtonState.HOVER&&t.currentState==e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),n>=e.ButtonState.DOWN&&t.currentState==e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function r(n,r){n.element.disabled||(r<=e.ButtonState.HOVER&&n.currentState==e.ButtonState.DOWN&&(n.imgDown&&(n.imgDown.style.visibility="hidden"),n.currentState=e.ButtonState.HOVER),r<=e.ButtonState.GROUP&&n.currentState==e.ButtonState.HOVER&&(n.imgHover&&(n.imgHover.style.visibility="hidden"),n.currentState=e.ButtonState.GROUP),r<=e.ButtonState.REST&&n.currentState==e.ButtonState.GROUP&&(!function(n){n.shouldFade=!0,n.fadeBeginTime=e.now()+n.fadeDelay,window.setTimeout((function(){t(n)}),n.fadeDelay)}(n),n.currentState=e.ButtonState.REST))}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(t){var i=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},t),this.element=t.element||e.makeNeutralElement("div"),t.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(t){t.insideElementPressed?(n(i,e.ButtonState.DOWN),i.raiseEvent("enter",{originalEvent:t.originalEvent})):t.buttonDownAny||n(i,e.ButtonState.HOVER)},focusHandler:function(e){this.enterHandler(e),i.raiseEvent("focus",{originalEvent:e.originalEvent})},exitHandler:function(t){r(i,e.ButtonState.GROUP),t.insideElementPressed&&i.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){this.exitHandler(e),i.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(t){n(i,e.ButtonState.DOWN),i.raiseEvent("press",{originalEvent:t.originalEvent})},releaseHandler:function(t){t.insideElementPressed&&t.insideElementReleased?(r(i,e.ButtonState.HOVER),i.raiseEvent("release",{originalEvent:t.originalEvent})):t.insideElementPressed?r(i,e.ButtonState.GROUP):n(i,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&i.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){return 13!==e.keyCode||(i.raiseEvent("click",{originalEvent:e.originalEvent}),i.raiseEvent("release",{originalEvent:e.originalEvent}),!1)}}),r(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){n(this,e.ButtonState.GROUP)},notifyGroupExit:function(){r(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()}})}(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 n,r=this.buttons.concat([]),i=this;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(this.element.style.display="inline-block",n=0;n<r.length;n++)this.element.appendChild(r[n].element);e.setElementTouchActionNone(this.element),this.tracker=new e.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(e){var t;for(t=0;t<i.buttons.length;t++)i.buttons[t].notifyGroupEnter()},exitHandler:function(e){var t;if(!e.insideElementPressed)for(t=0;t<i.buttons.length;t++)i.buttons[t].notifyGroupExit()}})},e.ButtonGroup.prototype={emulateEnter:function(){this.tracker.enterHandler({eventSource:this.tracker})},emulateExit:function(){this.tracker.exitHandler({eventSource:this.tracker})}}}(OpenSeadragon),function(e){e.Rect=function(t,n,r,i,o){var a,s;this.x="number"==typeof t?t:0,this.y="number"==typeof n?n:0,this.width="number"==typeof r?r:0,this.height="number"==typeof i?i:0,this.degrees="number"==typeof o?o:0,this.degrees=e.positiveModulo(this.degrees,360),this.degrees>=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,n,r){var i=t.distanceTo(n),o=t.distanceTo(r),a=n.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,i,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 n=this.getBoundingBox(),r=t.getBoundingBox(),i=Math.min(n.x,r.x),o=Math.min(n.y,r.y),a=Math.max(n.x+n.width,r.x+r.width),s=Math.max(n.y+n.height,r.y+r.height);return new e.Rect(i,o,a-i,s-o)},intersection:function(t){var n=[],r=this.getTopLeft();t.containsPoint(r,1e-10)&&n.push(r);var i=this.getTopRight();t.containsPoint(i,1e-10)&&n.push(i);var o=this.getBottomLeft();t.containsPoint(o,1e-10)&&n.push(o);var a=this.getBottomRight();t.containsPoint(a,1e-10)&&n.push(a);var s=t.getTopLeft();this.containsPoint(s,1e-10)&&n.push(s);var c=t.getTopRight();this.containsPoint(c,1e-10)&&n.push(c);var u=t.getBottomLeft();this.containsPoint(u,1e-10)&&n.push(u);var l=t.getBottomRight();this.containsPoint(l,1e-10)&&n.push(l);for(var f=this._getSegments(),d=t._getSegments(),p=0;p<f.length;p++)for(var h=f[p],g=0;g<d.length;g++){var v=d[g],m=y(h[0],h[1],v[0],v[1]);m&&n.push(m)}function y(t,n,r,i){var o=n.minus(t),a=i.minus(r),s=-a.x*o.y+o.x*a.y;if(0===s)return null;var c=(o.x*(t.y-r.y)-o.y*(t.x-r.x))/s,u=(a.x*(t.y-r.y)-a.y*(t.x-r.x))/s;return-1e-10<=c&&c<=1-1e-10&&-1e-10<=u&&u<=1-1e-10?new e.Point(t.x+u*o.x,t.y+u*o.y):null}if(0===n.length)return null;for(var b=n[0].x,w=n[0].x,_=n[0].y,x=n[0].y,O=1;O<n.length;O++){var S=n[O];S.x<b&&(b=S.x),S.x>w&&(w=S.x),S.y<_&&(_=S.y),S.y>x&&(x=S.y)}return new e.Rect(b,_,w-b,x-_)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),n=this.getBottomLeft(),r=this.getBottomRight();return[[e,t],[t,r],[r,n],[n,e]]},rotate:function(t,n){if(0===(t=e.positiveModulo(t,360)))return this.clone();n=n||this.getCenter();var r=this.getTopLeft().rotate(t,n),i=this.getTopRight().rotate(t,n).minus(r);i=i.apply((function(e){return Math.abs(e)<1e-15?0:e}));var o=Math.atan(i.y/i.x);return i.x<0?o+=Math.PI:i.y<0&&(o+=2*Math.PI),new e.Rect(r.x,r.y,this.width,this.height,o/Math.PI*180)},getBoundingBox:function(){if(0===this.degrees)return this.clone();var t=this.getTopLeft(),n=this.getTopRight(),r=this.getBottomLeft(),i=this.getBottomRight(),o=Math.min(t.x,n.x,r.x,i.x),a=Math.max(t.x,n.x,r.x,i.x),s=Math.min(t.y,n.y,r.y,i.y),c=Math.max(t.y,n.y,r.y,i.y);return new e.Rect(o,s,a-o,c-s)},getIntegerBoundingBox:function(){var t=this.getBoundingBox(),n=Math.floor(t.x),r=Math.floor(t.y),i=Math.ceil(t.width+t.x-n),o=Math.ceil(t.height+t.y-r);return new e.Rect(n,r,i,o)},containsPoint:function(e,t){t=t||0;var n=this.getTopLeft(),r=this.getTopRight(),i=this.getBottomLeft(),o=r.minus(n),a=i.minus(n);return(e.x-n.x)*o.x+(e.y-n.y)*o.y>=-t&&(e.x-r.x)*o.x+(e.y-r.y)*o.y<=t&&(e.x-n.x)*a.x+(e.y-n.y)*a.y>=-t&&(e.x-i.x)*a.x+(e.y-i.y)*a.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(OpenSeadragon),function(e){var t={};function n(t){var n=Number(this.element.style.marginLeft.replace("px","")),r=Number(this.element.style.marginTop.replace("px","")),o=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);return this.dragging=!0,this.element&&("horizontal"==this.scroll?-t.delta.x>0?n>-(o-s.x)&&(this.element.style.marginLeft=n+2*t.delta.x+"px",i(this,s.x,n+2*t.delta.x)):-t.delta.x<0&&n<0&&(this.element.style.marginLeft=n+2*t.delta.x+"px",i(this,s.x,n+2*t.delta.x)):-t.delta.y>0?r>-(a-s.y)&&(this.element.style.marginTop=r+2*t.delta.y+"px",i(this,s.y,r+2*t.delta.y)):-t.delta.y<0&&r<0&&(this.element.style.marginTop=r+2*t.delta.y+"px",i(this,s.y,r+2*t.delta.y))),!1}function r(t){var n=Number(this.element.style.marginLeft.replace("px","")),r=Number(this.element.style.marginTop.replace("px","")),o=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);return this.element&&("horizontal"==this.scroll?t.scroll>0?n>-(o-s.x)&&(this.element.style.marginLeft=n-60*t.scroll+"px",i(this,s.x,n-60*t.scroll)):t.scroll<0&&n<0&&(this.element.style.marginLeft=n-60*t.scroll+"px",i(this,s.x,n-60*t.scroll)):t.scroll<0?r>s.y-a&&(this.element.style.marginTop=r+60*t.scroll+"px",i(this,s.y,r+60*t.scroll)):t.scroll>0&&r<0&&(this.element.style.marginTop=r+60*t.scroll+"px",i(this,s.y,r+60*t.scroll))),!1}function i(t,n,r){var i,o,a,s,c,u,l;for(i="horizontal"==t.scroll?t.panelWidth:t.panelHeight,o=Math.ceil(n/i)+5,u=o=(o=(a=Math.ceil((Math.abs(r)+n)/i)+1)-o)<0?0:o;u<a&&u<t.panels.length;u++)if(!(l=t.panels[u]).activePanel){var f,d=t.viewer.tileSources[u];f=d.referenceStripThumbnailUrl?{type:"image",url:d.referenceStripThumbnailUrl}:d,(s=new e.Viewer({id:l.id,tileSources:[f],element:l,navigatorSizeRatio:t.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:t.viewer.loadTilesWithAjax,ajaxHeaders:t.viewer.ajaxHeaders,useCanvas:t.useCanvas})).displayRegion=e.makeNeutralElement("div"),s.displayRegion.id=l.id+"-displayregion",s.displayRegion.className="displayregion",(c=s.displayRegion.style).position="relative",c.top="0px",c.left="0px",c.fontSize="0px",c.overflow="hidden",c.float="left",c.cssFloat="left",c.styleFloat="left",c.zIndex=999999999,c.cursor="default",c.width=t.panelWidth-4+"px",c.height=t.panelHeight-4+"px",s.displayRegion.innerTracker=new e.MouseTracker({element:s.displayRegion,startDisabled:!0}),l.getElementsByTagName("div")[0].appendChild(s.displayRegion),t.miniViewers[l.id]=s,l.activePanel=!0}}function o(e){var t=e.eventSource.element;return"horizontal"==this.scroll?t.style.marginBottom="0px":t.style.marginLeft="0px",!1}function a(t){var n=t.eventSource.element;return"horizontal"==this.scroll?n.style.marginBottom="-"+e.getElementSize(n).y/2+"px":n.style.marginLeft="-"+e.getElementSize(n).x/2+"px",!1}function s(e){if(e.preventDefaultAction||e.ctrl||e.alt||e.meta)return!0;switch(e.keyCode){case 38:return r.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),!1;case 40:case 37:return r.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),!1;case 39:return r.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),!1;default:return!0}}function c(e){if(e.preventDefaultAction||e.ctrl||e.alt||e.meta)return!0;switch(e.keyCode){case 61:return r.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),!1;case 45:return r.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),!1;case 48:case 119:case 87:return r.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),!1;case 115:case 83:case 97:return r.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),!1;case 100:return r.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),!1;default:return!0}}e.ReferenceStrip=function(u){var l,f,d,p=u.viewer,h=e.getElementSize(p.element);for(u.id||(u.id="referencestrip-"+e.now(),this.element=e.makeNeutralElement("div"),this.element.id=u.id,this.element.className="referencestrip"),u=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.referenceStripSizeRatio,position:e.DEFAULT_SETTINGS.referenceStripPosition,scroll:e.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold},u,{element:this.element,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1}),e.extend(this,u),t[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,(f=this.element.style).marginTop="0px",f.marginRight="0px",f.marginBottom="0px",f.marginLeft="0px",f.left="0px",f.bottom="0px",f.border="0px",f.background="#000",f.position="relative",e.setElementTouchActionNone(this.element),e.setElementOpacity(this.element,.8),this.viewer=p,this.innerTracker=new e.MouseTracker({element:this.element,dragHandler:e.delegate(this,n),scrollHandler:e.delegate(this,r),enterHandler:e.delegate(this,o),exitHandler:e.delegate(this,a),keyDownHandler:e.delegate(this,s),keyHandler:e.delegate(this,c)}),u.width&&u.height?(this.element.style.width=u.width+"px",this.element.style.height=u.height+"px",p.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):"horizontal"==u.scroll?(this.element.style.width=h.x*u.sizeRatio*p.tileSources.length+12*p.tileSources.length+"px",this.element.style.height=h.y*u.sizeRatio+"px",p.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=h.y*u.sizeRatio*p.tileSources.length+12*p.tileSources.length+"px",this.element.style.width=h.x*u.sizeRatio+"px",p.addControl(this.element,{anchor:e.ControlAnchor.TOP_LEFT})),this.panelWidth=h.x*this.sizeRatio+8,this.panelHeight=h.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},d=0;d<p.tileSources.length;d++)(l=e.makeNeutralElement("div")).id=this.element.id+"-"+d,l.style.width=this.panelWidth+"px",l.style.height=this.panelHeight+"px",l.style.display="inline",l.style.float="left",l.style.cssFloat="left",l.style.styleFloat="left",l.style.padding="2px",e.setElementTouchActionNone(l),l.innerTracker=new e.MouseTracker({element:l,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,pressHandler:function(t){t.eventSource.dragging=e.now()},releaseHandler:function(t){var n=t.eventSource,r=n.element.id,i=Number(r.split("-")[2]),o=e.now();t.insideElementPressed&&t.insideElementReleased&&n.dragging&&o-n.dragging<n.clickTimeThreshold&&(n.dragging=null,p.goToPage(i))}}),this.element.appendChild(l),l.activePanel=!1,this.panels.push(l);i(this,"vertical"==this.scroll?h.y:h.x,0),this.setFocus(0)},e.extend(e.ReferenceStrip.prototype,e.EventSource.prototype,e.Viewer.prototype,{setFocus:function(t){var n,r=this.element.querySelector("#"+this.element.id+"-"+t),a=e.getElementSize(this.viewer.canvas),s=Number(this.element.style.width.replace("px","")),c=Number(this.element.style.height.replace("px","")),u=-Number(this.element.style.marginLeft.replace("px","")),l=-Number(this.element.style.marginTop.replace("px",""));this.currentSelected!==r&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=r,this.currentSelected.style.background="#999","horizontal"==this.scroll?(n=Number(t)*(this.panelWidth+3))>u+a.x-this.panelWidth?(n=Math.min(n,s-a.x),this.element.style.marginLeft=-n+"px",i(this,a.x,-n)):n<u&&(n=Math.max(0,n-a.x/2),this.element.style.marginLeft=-n+"px",i(this,a.x,-n)):(n=Number(t)*(this.panelHeight+3))>l+a.y-this.panelHeight?(n=Math.min(n,c-a.y),this.element.style.marginTop=-n+"px",i(this,a.y,-n)):n<l&&(n=Math.max(0,n-a.y/2),this.element.style.marginTop=-n+"px",i(this,a.y,-n)),this.currentPage=t,o.call(this,{eventSource:this.innerTracker}))},update:function(){return!!t[this.id].animating&&(e.console.log("image reference strip update"),!0)},destroy:function(){if(this.miniViewers)for(var e in this.miniViewers)this.miniViewers[e].destroy();this.element&&this.element.parentNode.removeChild(this.element)}})}(OpenSeadragon),function(e){e.DisplayRect=function(t,n,r,i,o,a){e.Rect.apply(this,[t,n,r,i]),this.minLevel=o,this.maxLevel=a},e.extend(e.DisplayRect.prototype,e.Rect.prototype)}(OpenSeadragon),function(e){e.Spring=function(t){var n=arguments;"object"!=typeof t&&(t={initial:n.length&&"number"==typeof n[0]?n[0]:void 0,springStiffness:n.length>1?n[1].springStiffness:5,animationTime:n.length>1?n[1].animationTime:1.5}),e.console.assert("number"==typeof t.springStiffness&&0!==t.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert("number"==typeof t.animationTime&&t.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),t.exponential&&(this._exponential=!0,delete t.exponential),e.extend(!0,this,t),this.current={value:"number"==typeof this.initial?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||0!==this.current.value,"[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(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=t,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(t){e.console.assert(!this._exponential||0!==t,"[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=t,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(t){this.start.value+=t,this.target.value+=t,this._exponential&&(e.console.assert(0!==this.target.value&&0!==this.start.value,"[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(t){this._exponential=t,this._exponential&&(e.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[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(){var t,n;this.current.time=e.now(),this._exponential?(t=this.start._logValue,n=this.target._logValue):(t=this.start.value,n=this.target.value);var r,i,o=this.current.time>=this.target.time?n:t+(n-t)*(r=this.springStiffness,i=(this.current.time-this.start.time)/(this.target.time-this.start.time),(1-Math.exp(r*-i))/(1-Math.exp(-r))),a=this.current.value;return this._exponential?this.current.value=Math.exp(o):this.current.value=o,a!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(OpenSeadragon),function(e){function t(t){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null},t),this.image=null}t.prototype={errorMsg:null,start:function(){var t=this,n=this.abort;this.image=new Image,this.image.onload=function(){t.finish(!0)},this.image.onabort=this.image.onerror=function(){t.errorMsg="Image load aborted",t.finish(!1)},this.jobId=window.setTimeout((function(){t.errorMsg="Image load exceeded timeout ("+t.timeout+" ms)",t.finish(!1)}),this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(e){var n;try{n=new window.Blob([e.response])}catch(t){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===t.name&&r){var i=new r;i.append(e.response),n=i.getBlob()}}0===n.size&&(t.errorMsg="Empty image response.",t.finish(!1));var o=(window.URL||window.webkitURL).createObjectURL(n);t.image.src=o},error:function(e){t.errorMsg="Image load aborted - XHR error",t.finish(!1)}}),this.abort=function(){t.request.abort(),"function"==typeof n&&n()}):(!1!==this.crossOriginPolicy&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(e){this.image.onload=this.image.onerror=this.image.onabort=null,e||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(t){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},t)},e.ImageLoader.prototype={addJob:function(e){var n=this,r=new t({src:e.src,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,callback:function(t){!function(e,t,n){e.jobsInProgress--,(!e.jobLimit||e.jobsInProgress<e.jobLimit)&&e.jobQueue.length>0&&(e.jobQueue.shift().start(),e.jobsInProgress++);n(t.image,t.errorMsg,t.request)}(n,t,e.callback)},abort:e.abort,timeout:this.timeout});!this.jobLimit||this.jobsInProgress<this.jobLimit?(r.start(),this.jobsInProgress++):this.jobQueue.push(r)},clear:function(){for(var e=0;e<this.jobQueue.length;e++){var t=this.jobQueue[e];"function"==typeof t.abort&&t.abort()}this.jobQueue=[]}}}(OpenSeadragon),function(e){e.Tile=function(e,t,n,r,i,o,a,s,c,u){this.level=e,this.x=t,this.y=n,this.bounds=r,this.sourceBounds=u,this.exists=i,this.url=o,this.context2D=a,this.loadWithAjax=s,this.ajaxHeaders=c,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){this.cacheImageRecord?this.loaded?(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)):e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString()):e.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString())},drawCanvas:function(t,n,r,i){var o,a,s,c=this.position.times(e.pixelDensityRatio),u=this.size.times(e.pixelDensityRatio);this.context2D||this.cacheImageRecord?(o=this.context2D||this.cacheImageRecord.getRenderedContext(),this.loaded&&o?(t.save(),t.globalAlpha=this.opacity,"number"==typeof r&&1!==r&&(c=c.times(r),u=u.times(r)),i instanceof e.Point&&(c=c.plus(i)),1===t.globalAlpha&&this._hasTransparencyChannel()&&t.clearRect(c.x,c.y,u.x,u.y),n({context:t,tile:this,rendered:o}),this.sourceBounds?(a=Math.min(this.sourceBounds.width,o.canvas.width),s=Math.min(this.sourceBounds.height,o.canvas.height)):(a=o.canvas.width,s=o.canvas.height),t.drawImage(o.canvas,0,0,a,s,c.x,c.y,u.x,u.y),t.restore()):e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString())):e.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString())},getScaleForEdgeSmoothing:function(){var t;if(this.cacheImageRecord)t=this.cacheImageRecord.getRenderedContext();else{if(!this.context2D)return e.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;t=this.context2D}return t.canvas.width/(this.size.x*e.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(t,n,r){var i=Math.max(1,Math.ceil((r.x-n.x)/2)),o=Math.max(1,Math.ceil((r.y-n.y)/2));return new e.Point(i,o).minus(this.position.times(e.pixelDensityRatio).times(t||1).apply((function(e){return e%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,n,r){var i;i=e.isPlainObject(t)?t:{element:t,location:n,placement:r},this.element=i.element,this.style=i.element.style,this._init(i)},e.Overlay.prototype={_init:function(t){this.location=t.location,this.placement=void 0===t.placement?e.Placement.TOP_LEFT:t.placement,this.onDraw=t.onDraw,this.checkResize=void 0===t.checkResize||t.checkResize,this.width=void 0===t.width?null:t.width,this.height=void 0===t.height?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=null!==this.width&&null!==this.height,this.bounds=new e.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(t,n){var r=e.Placement.properties[this.placement];r&&(r.isHorizontallyCentered?t.x-=n.x/2:r.isRight&&(t.x-=n.x),r.isVerticallyCentered?t.y-=n.y/2:r.isBottom&&(t.y-=n.y))},destroy:function(){var t=this.element,n=this.style;t.parentNode&&(t.parentNode.removeChild(t),t.prevElementParent&&(n.display="none",document.body.appendChild(t))),this.onDraw=null,n.top="",n.left="",n.position="",null!==this.width&&(n.width=""),null!==this.height&&(n.height="");var r=e.getCssPropertyWithVendorPrefix("transformOrigin"),i=e.getCssPropertyWithVendorPrefix("transform");r&&i&&(n[r]="",n[i]="")},drawHTML:function(t,n){var r=this.element;r.parentNode!==t&&(r.prevElementParent=r.parentNode,r.prevNextSibling=r.nextSibling,t.appendChild(r),this.style.position="absolute",this.size=e.getElementSize(r));var i=this._getOverlayPositionAndSize(n),o=i.position,a=this.size=i.size,s=i.rotate;if(this.onDraw)this.onDraw(o,a,this.element);else{var c=this.style;c.left=o.x+"px",c.top=o.y+"px",null!==this.width&&(c.width=a.x+"px"),null!==this.height&&(c.height=a.y+"px");var u=e.getCssPropertyWithVendorPrefix("transformOrigin"),l=e.getCssPropertyWithVendorPrefix("transform");u&&l&&(s?(c[u]=this._getTransformOrigin(),c[l]="rotate("+s+"deg)"):(c[u]="",c[l]="")),"none"!==c.display&&(c.display="block")}},_getOverlayPositionAndSize:function(t){var n=t.pixelFromPoint(this.location,!0),r=this._getSizeInPixels(t);this.adjust(n,r);var i=0;if(t.degrees&&this.rotationMode!==e.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX&&null!==this.width&&null!==this.height){var o=new e.Rect(n.x,n.y,r.x,r.y),a=this._getBoundingBox(o,t.degrees);n=a.getTopLeft(),r=a.getSize()}else i=t.degrees;return{position:n,size:r,rotate:i}},_getSizeInPixels:function(t){var n=this.size.x,r=this.size.y;if(null!==this.width||null!==this.height){var i=t.deltaPixelsFromPointsNoRotate(new e.Point(this.width||0,this.height||0),!0);null!==this.width&&(n=i.x),null!==this.height&&(r=i.y)}if(this.checkResize&&(null===this.width||null===this.height)){var o=this.size=e.getElementSize(this.element);null===this.width&&(n=o.x),null===this.height&&(r=o.y)}return new e.Point(n,r)},_getBoundingBox:function(e,t){var n=this._getPlacementPoint(e);return e.rotate(t,n).getBoundingBox()},_getPlacementPoint:function(t){var n=new e.Point(t.x,t.y),r=e.Placement.properties[this.placement];return r&&(r.isHorizontallyCentered?n.x+=t.width/2:r.isRight&&(n.x+=t.width),r.isVerticallyCentered?n.y+=t.height/2:r.isBottom&&(n.y+=t.height)),n},_getTransformOrigin:function(){var t="",n=e.Placement.properties[this.placement];return n?(n.isLeft?t="left":n.isRight&&(t="right"),n.isTop?t+=" top":n.isBottom&&(t+=" bottom"),t):t},update:function(t,n){var r=e.isPlainObject(t)?t:{location:t,placement:n};this._init({location:r.location||this.location,placement:void 0!==r.placement?r.placement:this.placement,onDraw:r.onDraw||this.onDraw,checkResize:r.checkResize||this.checkResize,width:void 0!==r.width?r.width:this.width,height:void 0!==r.height?r.height:this.height,rotationMode:r.rotationMode||this.rotationMode})},getBounds:function(t){e.console.assert(t,"A viewport must now be passed to Overlay.getBounds.");var n=this.width,r=this.height;if(null===n||null===r){var i=t.deltaPointsFromPixelsNoRotate(this.size,!0);null===n&&(n=i.x),null===r&&(r=i.y)}var o=this.location.clone();return this.adjust(o,new e.Point(n,r)),this._adjustBoundsForRotation(t,new e.Rect(o.x,o.y,n,r))},_adjustBoundsForRotation:function(t,n){if(!t||0===t.degrees||this.rotationMode===e.OverlayRotationMode.EXACT)return n;if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX){if(null===this.width||null===this.height)return n;var r=this._getOverlayPositionAndSize(t);return t.viewerElementToViewportRectangle(new e.Rect(r.position.x,r.position.y,r.size.x,r.size.y))}return n.rotate(-t.degrees,this._getPlacementPoint(n))}}}(OpenSeadragon),function(e){e.Drawer=function(t){e.console.assert(t.viewer,"[Drawer] options.viewer is required");var n=arguments;if(e.isPlainObject(t)||(t={source:n[0],viewport:n[1],element:n[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="string"==typeof t.debugGridColor?[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),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 r=this._calculateCanvasSize();this.canvas.width=r.x,this.canvas.height=r.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,n,r,i){return e.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(t,n,r,i),this},updateOverlay:function(t,n,r){return e.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(t,n,r),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 n=this.viewport.pixelFromPointNoRotate(t,!0);return new e.Point(n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio)},clipWithPolygons:function(e,t){if(this.useCanvas){var n=this._getContext(t);n.beginPath(),e.forEach((function(e){e.forEach((function(e,t){n[0===t?"moveTo":"lineTo"](e.x,e.y)}))})),n.clip()}},setOpacity:function(t){e.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var n=this.viewer.world,r=0;r<n.getItemCount();r++)n.getItemAt(r).setOpacity(t);return this},getOpacity:function(){e.console.error("drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.");for(var t=this.viewer.world,n=0,r=0;r<t.getItemCount();r++){var i=t.getItemAt(r).getOpacity();i>n&&(n=i)}return n},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 e=this._calculateCanvasSize();if((this.canvas.width!=e.x||this.canvas.height!=e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,this._updateImageSmoothingEnabled(this.context),null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(e,t){if(this.useCanvas){var n=this._getContext(e);if(t)n.clearRect(t.x,t.y,t.width,t.height);else{var r=n.canvas;n.clearRect(0,0,r.width,r.height)}}},viewportToDrawerRectangle:function(t){var n=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),r=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio,r.x*e.pixelDensityRatio,r.y*e.pixelDensityRatio)},drawTile:function(t,n,r,i,o){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(n,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var a=this._getContext(r);i=i||1,t.drawCanvas(a,n,i,o)}else t.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){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"),0===this.viewport.getRotation()){var r=this;this.viewer.addHandler("rotate",(function e(){if(0!==r.viewport.getRotation()){r.viewer.removeHandler("rotate",e);var t=r._calculateSketchCanvasSize();r.sketchCanvas.width=t.x,r.sketchCanvas.height=t.y}}))}this._updateImageSmoothingEnabled(this.sketchContext)}t=this.sketchContext}return t},saveContext:function(e){this.useCanvas&&this._getContext(e).save()},restoreContext:function(e){this.useCanvas&&this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var n=this._getContext(t);n.beginPath(),n.rect(e.x,e.y,e.width,e.height),n.clip()}},drawRectangle:function(e,t,n){if(this.useCanvas){var r=this._getContext(n);r.save(),r.fillStyle=t,r.fillRect(e.x,e.y,e.width,e.height),r.restore()}},blendSketch:function(t,n,r,i){var o=t;if(e.isPlainObject(o)||(o={opacity:t,scale:n,translate:r,compositeOperation:i}),this.useCanvas&&this.sketchCanvas){t=o.opacity,i=o.compositeOperation;var a=o.bounds;if(this.context.save(),this.context.globalAlpha=t,i&&(this.context.globalCompositeOperation=i),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{n=o.scale||1;var s=(r=o.translate)instanceof e.Point?r:new e.Point(0,0),c=0,u=0;if(r){var l=this.sketchCanvas.width-this.canvas.width,f=this.sketchCanvas.height-this.canvas.height;c=Math.round(l/2),u=Math.round(f/2)}this.context.drawImage(this.sketchCanvas,s.x-c*n,s.y-u*n,(this.canvas.width+2*c)*n,(this.canvas.height+2*u)*n,-c,-u,this.canvas.width+2*c,this.canvas.height+2*u)}this.context.restore()}},drawDebugInfo:function(t,n,r,i){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(i)%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],0!==this.viewport.degrees&&this._offsetForRotation({degrees:this.viewport.degrees}),i.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:i.getRotation(!0),point:i.viewport.pixelFromPointNoRotate(i._getRotationPoint(!0),!0)}),0===i.viewport.degrees&&i.getRotation(!0)%360==0&&i._drawer.viewer.viewport.getFlip()&&i._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,c=(t.position.y+t.size.y/2)*e.pixelDensityRatio;a.translate(s,c),a.rotate(Math.PI/180*-this.viewport.degrees),a.translate(-s,-c),0===t.x&&0===t.y&&(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: "+r+" of "+n,(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),0!==this.viewport.degrees&&this._restoreRotationChanges(),i.getRotation(!0)%360!=0&&this._restoreRotationChanges(),0===i.viewport.degrees&&i.getRotation(!0)%360==0&&i._drawer.viewer.viewport.getFlip()&&i._drawer._flip(),a.restore()}},debugRect:function(t){if(this.useCanvas){var n=this.context;n.save(),n.lineWidth=2*e.pixelDensityRatio,n.strokeStyle=this.debugGridColor[0],n.fillStyle=this.debugGridColor[0],n.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),n.restore()}},setImageSmoothingEnabled:function(e){this.useCanvas&&(this._imageSmoothingEnabled=e,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(e){e.msImageSmoothingEnabled=this._imageSmoothingEnabled,e.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(t){var n=this._getContext(t).canvas;return new e.Point(n.width,n.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var n=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(t.useSketch);r.save(),r.translate(n.x,n.y),this.viewer.viewport.flipped?(r.rotate(Math.PI/180*-t.degrees),r.scale(-1,1)):r.rotate(Math.PI/180*t.degrees),r.translate(-n.x,-n.y)},_flip:function(t){var n=(t=t||{}).point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(t.useSketch);r.translate(n.x,0),r.scale(-1,1),r.translate(-n.x,0)},_restoreRotationChanges:function(e){this._getContext(e).restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,n=this.viewport.getContainerSize();return{x:Math.round(n.x*t),y:Math.round(n.y*t)}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}}}(OpenSeadragon),function(e){e.Viewport=function(t){var n=arguments;n.length&&n[0]instanceof e.Point&&(t={containerSize:n[0],contentSize:n[1],config:n[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,n){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,n)},_setContentBounds:function(t,n){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(n),this._contentBounds=t.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(n),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:n,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e=this._contentAspectRatio/this.getAspectRatio();return(this.homeFillsViewer?e>=1?e:1:e>=1?1:e)/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),n=1/this.getHomeZoom(),r=n/this.getAspectRatio();return new e.Rect(t.x-n/2,t.y-r/2,n,r)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom();return this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,e/=this._contentBounds.width),Math.max(e,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("object"===e.type(t),"[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(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation())},getBoundsNoRotate:function(t){var n=this.getCenter(t),r=1/this.getZoom(t),i=r/this.getAspectRatio();return new e.Rect(n.x-r/2,n.y-i/2,r,i)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),n=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/n,t.y-=this._margins.top/n,t.width+=(this._margins.left+this._margins.right)/n,t.height+=(this._margins.top+this._margins.bottom)/n,t},getCenter:function(t){var n,r,i,o,a,s,c=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),u=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return t?c:this.zoomPoint?(n=this.pixelFromPoint(this.zoomPoint,!0),o=(i=1/(r=this.getZoom()))/this.getAspectRatio(),a=new e.Rect(c.x-i/2,c.y-o/2,i,o),s=this._pixelFromPoint(this.zoomPoint,a).minus(n).divide(this._containerInnerSize.x*r),u.plus(s)):u},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var n=new e.Rect(t.x,t.y,t.width,t.height);if(this.wrapHorizontal);else{var r=this.visibilityRatio*n.width,i=n.x+n.width,o=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,a=this._contentBoundsNoRotate.x-i+r,s=o-n.x-r;r>this._contentBoundsNoRotate.width?n.x+=(a+s)/2:s<0?n.x+=s:a>0&&(n.x+=a)}if(this.wrapVertical);else{var c=this.visibilityRatio*n.height,u=n.y+n.height,l=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,f=this._contentBoundsNoRotate.y-u+c,d=l-n.y-c;c>this._contentBoundsNoRotate.height?n.y+=(f+d)/2:d<0?n.y+=d:f>0&&(n.y+=f)}return n},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),n=this._applyZoomConstraints(t);t!==n&&this.zoomTo(n,this.zoomPoint,e);var r=this.getBoundsNoRotate(),i=this._applyBoundaryConstraints(r);return this._raiseConstraintsEvent(e),(r.x!==i.x||r.y!==i.y||e)&&this.fitBounds(i.rotate(-this.getRotation()),e),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(t,n){var r=(n=n||{}).immediately||!1,i=n.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 c=1/s.width;if(i){var u=s.getAspectRatio(),l=this._applyZoomConstraints(c);c!==l&&(c=l,s.width=1/c,s.x=a.x-s.width/2,s.height=s.width/u,s.y=a.y-s.height/2),a=(s=this._applyBoundaryConstraints(s)).getCenter(),this._raiseConstraintsEvent(r)}if(r)return this.panTo(a,!0),this.zoomTo(c,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var f=this.getBounds(),d=this.getZoom();if(0===d||Math.abs(c/d-1)<1e-8)return this.zoomTo(c,!0),this.panTo(a,r);var p=(s=s.rotate(-this.getRotation())).getTopLeft().times(c).minus(f.getTopLeft().times(d)).divide(c-d);return this.zoomTo(c,p,r)},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(t){var n=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(n,t)},fitHorizontally:function(t){var n=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(n,t)},getConstrainedBounds:function(e){var t;return t=this.getBounds(e),this._applyBoundaryConstraints(t)},panBy:function(t,n){var r=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(r.plus(t),n)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,n){return this.zoomTo(this.zoomSpring.target.value*e,t,n)},zoomTo:function(t,n,r){var i=this;return this.zoomPoint=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,r?this._adjustCenterSpringsForZoomPoint((function(){i.zoomSpring.resetTo(t)})):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:n,immediately:r}),this},setRotation:function(t){return this.viewer&&this.viewer.drawer.canRotate()?(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):this},getRotation:function(){return this.degrees},resize:function(e,t){var n,r=this.getBoundsNoRotate(),i=r;return this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(n=e.x/this.containerSize.x,i.width=r.width*n,i.height=i.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t}),this.fitBounds(i,!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 e=this;this._adjustCenterSpringsForZoomPoint((function(){e.zoomSpring.update()})),this.centerSpringX.update(),this.centerSpringY.update();var t=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,t},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var n=this.pixelFromPoint(this.zoomPoint,!0).minus(t),r=this.deltaPointsFromPixels(n,!0);this.centerSpringX.shiftBy(r.x),this.centerSpringY.shiftBy(r.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation()),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation())},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(t,n){return t.minus(n.getTopLeft()).times(this._containerInnerSize.x/n.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(t,n){var r=this.getBoundsNoRotate(n);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/r.width).plus(r.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(t,n){var r=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/r,n*this._contentSizeNoRotate.x/r)},viewportToImageCoordinates:function(t,n){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===r){return this.viewer.world.getItemAt(0).viewportToImageCoordinates(t,n,!0)}}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,n-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,n){var r=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*r,n/this._contentSizeNoRotate.x*r)},imageToViewportCoordinates:function(t,n){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===r){return this.viewer.world.getItemAt(0).imageToViewportCoordinates(t,n,!0)}}var i=this._imageToViewportDelta(t,n);return i.x+=this._contentBoundsNoRotate.x,i.y+=this._contentBoundsNoRotate.y,i},imageToViewportRectangle:function(t,n,r,i){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,r,i)),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(1===a){return this.viewer.world.getItemAt(0).imageToViewportRectangle(t,n,r,i,!0)}}var s=this.imageToViewportCoordinates(o.x,o.y),c=this._imageToViewportDelta(o.width,o.height);return new e.Rect(s.x,s.y,c.x,c.y,o.degrees)},viewportToImageRectangle:function(t,n,r,i){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,r,i)),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(1===a){return this.viewer.world.getItemAt(0).viewportToImageRectangle(t,n,r,i,!0)}}var s=this.viewportToImageCoordinates(o.x,o.y),c=this._viewportToImageDelta(o.width,o.height);return new e.Rect(s.x,s.y,c.x,c.y,o.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer."),this.imageToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!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 n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(n)},viewportToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."),this.viewportToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).viewportToImageZoom(t)}}var r=this._contentSizeNoRotate.x;return t*(this._containerInnerSize.x/r*this._contentBoundsNoRotate.width)},imageToViewportZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).imageToViewportZoom(t)}}return t*(this._contentSizeNoRotate.x/this._containerInnerSize.x/this._contentBoundsNoRotate.width)},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(e){return this.flipped===e||(this.flipped=e,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:e})),this}}}(OpenSeadragon),function(e){function t(e,t,r,i,o,a,c,u,l){var f=c.getBoundingBox().getTopLeft(),d=c.getBoundingBox().getBottomRight();e.viewer&&e.viewer.raiseEvent("update-level",{tiledImage:e,havedrawn:t,level:i,opacity:o,visibility:a,drawArea:c,topleft:f,bottomright:d,currenttime:u,best:l}),s(e.coverage,i),s(e.loadingCoverage,i);for(var p=e._getCornerTiles(i,f,d),h=p.topLeft,g=p.bottomRight,v=e.source.getNumTiles(i),m=e.viewport.pixelFromPoint(e.viewport.getCenter()),y=h.x;y<=g.x;y++)for(var b=h.y;b<=g.y;b++){if(!e.wrapHorizontal&&!e.wrapVertical){var w=e.source.getTileBounds(i,y,b);if(null===c.intersection(w))continue}l=n(e,r,t,y,b,i,o,a,m,v,u,l)}return l}function n(t,n,i,s,c,u,l,f,d,p,h,g){var v=function(t,n,r,i,o,a,s,c,u,l){var f,d,p,h,g,v,m,y,b;a[r]||(a[r]={});a[r][t]||(a[r][t]={});a[r][t][n]||(f=(c.x+t%c.x)%c.x,d=(c.y+n%c.y)%c.y,p=o.getTileBounds(r,f,d),h=o.getTileBounds(r,f,d,!0),g=o.tileExists(r,f,d),v=o.getTileUrl(r,f,d),i.loadTilesWithAjax?(m=o.getTileAjaxHeaders(r,f,d),e.isPlainObject(i.ajaxHeaders)&&(m=e.extend({},i.ajaxHeaders,m))):m=null,y=o.getContext2D?o.getContext2D(r,f,d):void 0,p.x+=(t-f)/c.x,p.y+=l/u*((n-d)/c.y),b=new e.Tile(r,t,n,p,g,v,y,i.loadTilesWithAjax,m,h),f===c.x-1&&(b.isRightMost=!0),d===c.y-1&&(b.isBottomMost=!0),a[r][t][n]=b);return(b=a[r][t][n]).lastTouchTime=s,b}(s,c,u,t,t.source,t.tilesMatrix,h,p,t._worldWidthCurrent,t._worldHeightCurrent),m=i;t.viewer&&t.viewer.raiseEvent("update-tile",{tiledImage:t,tile:v}),a(t.coverage,u,s,c,!1);var y=v.loaded||v.loading||o(t.loadingCoverage,u,s,c);if(a(t.loadingCoverage,u,s,c,y),!v.exists)return g;if(n&&!m&&(o(t.coverage,u,s,c)?a(t.coverage,u,s,c,!0):m=!0),!m)return g;if(function(t,n,r,i,o,a){var s=t.bounds.getTopLeft();s.x*=a._scaleSpring.current.value,s.y*=a._scaleSpring.current.value,s.x+=a._xSpring.current.value,s.y+=a._ySpring.current.value;var c=t.bounds.getSize();c.x*=a._scaleSpring.current.value,c.y*=a._scaleSpring.current.value;var u=r.pixelFromPointNoRotate(s,!0),l=r.pixelFromPointNoRotate(s,!1),f=r.deltaPixelsFromPointsNoRotate(c,!0),d=r.deltaPixelsFromPointsNoRotate(c,!1),p=l.plus(d.divide(2)),h=i.squaredDistanceTo(p);n||(f=f.plus(new e.Point(1,1)));t.isRightMost&&a.wrapHorizontal&&(f.x+=.75);t.isBottomMost&&a.wrapVertical&&(f.y+=.75);t.position=u,t.size=f,t.squaredDistance=h,t.visibility=o}(v,t.source.tileOverlap,t.viewport,d,f,t),!v.loaded)if(v.context2D)r(t,v);else{var b=t._tileCache.getImageRecord(v.cacheKey);if(b)r(t,v,b.getImage())}v.loaded?function(e,t,n,r,i,o,s){var c,u,l=1e3*e.blendTime;t.blendStart||(t.blendStart=s);c=s-t.blendStart,u=l?Math.min(1,c/l):1,e.alwaysBlend&&(u*=o);if(t.opacity=u,e.lastDrawn.push(t),1===u)a(e.coverage,i,n,r,!0),e._hasOpaqueTile=!0;else if(c<l)return!0;return!1}(t,v,s,c,u,l,h)&&(t._needsDraw=!0):v.loading?t._tilesLoading++:y||(g=function(e,t){if(!e)return t;if(t.visibility>e.visibility)return t;if(t.visibility==e.visibility&&t.squaredDistance<e.squaredDistance)return t;return e}(g,v));return g}function r(e,t,n,r,i){var o=0;function a(){return o++,s}function s(){0===--o&&(t.loading=!1,t.loaded=!0,t.context2D||e._tileCache.cacheTile({image:n,tile:t,cutoff:r,tiledImage:e}),e._needsDraw=!0)}e.viewer.raiseEvent("tile-loaded",{tile:t,tiledImage:e,tileRequest:i,image:n,getCompletionCallback:a}),a()()}function i(e,t,n,r){var i,o,a,s;if(!e[t])return!1;if(void 0===n||void 0===r){for(a in i=e[t])if(Object.prototype.hasOwnProperty.call(i,a))for(s in o=i[a])if(Object.prototype.hasOwnProperty.call(o,s)&&!o[s])return!1;return!0}return void 0===e[t][n]||void 0===e[t][n][r]||!0===e[t][n][r]}function o(e,t,n,r){return void 0===n||void 0===r?i(e,t+1):i(e,t+1,2*n,2*r)&&i(e,t+1,2*n,2*r+1)&&i(e,t+1,2*n+1,2*r)&&i(e,t+1,2*n+1,2*r+1)}function a(t,n,r,i,o){t[n]?(t[n][r]||(t[n][r]={}),t[n][r][i]=o):e.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",n)}function s(e,t){e[t]={}}e.TiledImage=function(t){var n=this;e.console.assert(t.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(t.drawer,"[TiledImage] options.drawer is required"),e.console.assert(t.viewer,"[TiledImage] options.viewer is required"),e.console.assert(t.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(t.source,"[TiledImage] options.source is required"),e.console.assert(!t.clip||t.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=t.tileCache,delete t.tileCache,this._drawer=t.drawer,delete t.drawer,this._imageLoader=t.imageLoader,delete t.imageLoader,t.clip instanceof e.Rect&&(this._clip=t.clip.clone()),delete t.clip;var r=t.x||0;delete t.x;var i=t.y||0;delete t.y,this.normHeight=t.source.dimensions.y/t.source.dimensions.x,this.contentAspectX=t.source.dimensions.x/t.source.dimensions.y;var o=1;t.width?(o=t.width,delete t.width,t.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete t.height)):t.height&&(o=t.height/this.normHeight,delete t.height);var a=t.fitBounds;delete t.fitBounds;var s=t.fitBoundsPlacement||OpenSeadragon.Placement.CENTER;delete t.fitBoundsPlacement;var c=t.degrees||0;delete t.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},t),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:r,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:i,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:c,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),a&&this.fitBounds(a,s,!0),this._drawingHandler=function(t){n.viewer.raiseEvent("tile-drawing",e.extend({tiledImage:n},t))}},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(e){e!==this._fullyLoaded&&(this._fullyLoaded=e,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(){var e=this._xSpring.update(),t=this._ySpring.update(),n=this._scaleSpring.update(),r=this._degreesSpring.update();return!!(e||t||n||r)&&(this._updateForScale(),this._needsDraw=!0,!0)},draw:function(){0!==this.opacity||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(this.getRotation(e),this._getRotationPoint(e))},getBoundsNoRotate:function(t){return t?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(t){var n=this.getBoundsNoRotate(t);if(this._clip){var r=(t?this._worldWidthCurrent:this._worldWidthTarget)/this.source.dimensions.x,i=this._clip.times(r);n=new e.Rect(n.x+i.x,n.y+i.y,i.width,i.height)}return n.rotate(this.getRotation(t),this._getRotationPoint(t))},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},_viewportToImageDelta:function(t,n,r){var i=r?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t*(this.source.dimensions.x/i),n*(this.source.dimensions.y*this.contentAspectX/i))},viewportToImageCoordinates:function(t,n,r){var i;return t instanceof e.Point?(r=n,i=t):i=new e.Point(t,n),i=i.rotate(-this.getRotation(r),this._getRotationPoint(r)),r?this._viewportToImageDelta(i.x-this._xSpring.current.value,i.y-this._ySpring.current.value):this._viewportToImageDelta(i.x-this._xSpring.target.value,i.y-this._ySpring.target.value)},_imageToViewportDelta:function(t,n,r){var i=r?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t/this.source.dimensions.x*i,n/this.source.dimensions.y/this.contentAspectX*i)},imageToViewportCoordinates:function(t,n,r){t instanceof e.Point&&(r=n,n=t.y,t=t.x);var i=this._imageToViewportDelta(t,n);return r?(i.x+=this._xSpring.current.value,i.y+=this._ySpring.current.value):(i.x+=this._xSpring.target.value,i.y+=this._ySpring.target.value),i.rotate(this.getRotation(r),this._getRotationPoint(r))},imageToViewportRectangle:function(t,n,r,i,o){var a=t;a instanceof e.Rect?o=n:a=new e.Rect(t,n,r,i);var s=this.imageToViewportCoordinates(a.getTopLeft(),o),c=this._imageToViewportDelta(a.width,a.height,o);return new e.Rect(s.x,s.y,c.x,c.y,a.degrees+this.getRotation(o))},viewportToImageRectangle:function(t,n,r,i,o){var a=t;t instanceof e.Rect?o=n:a=new e.Rect(t,n,r,i);var s=this.viewportToImageCoordinates(a.getTopLeft(),o),c=this._viewportToImageDelta(a.width,a.height,o);return new e.Rect(s.x,s.y,c.x,c.y,a.degrees-this.getRotation(o))},viewerElementToImageCoordinates:function(e){var t=this.viewport.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.viewport.pixelFromPoint(t,!0)},windowToImageCoordinates:function(e){var t=e.minus(OpenSeadragon.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(t)},imageToWindowCoordinates:function(e){return this.imageToViewerElementCoordinates(e).plus(OpenSeadragon.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(t){var n=this._scaleSpring.current.value;return t=t.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((t.x-this._xSpring.current.value)/n,(t.y-this._ySpring.current.value)/n,t.width/n,t.height/n,t.degrees)},viewportToImageZoom:function(e){return this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x*e},imageToViewportZoom:function(e){return e/(this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x)},setPosition:function(e,t){var n=this._xSpring.target.value===e.x&&this._ySpring.target.value===e.y;if(t){if(n&&this._xSpring.current.value===e.x&&this._ySpring.current.value===e.y)return;this._xSpring.resetTo(e.x),this._ySpring.resetTo(e.y),this._needsDraw=!0}else{if(n)return;this._xSpring.springTo(e.x),this._ySpring.springTo(e.y),this._needsDraw=!0}n||this._raiseBoundsChange()},setWidth:function(e,t){this._setScale(e,t)},setHeight:function(e,t){this._setScale(e/this.normHeight,t)},setCroppingPolygons:function(t){var n=function(t){return t.map((function(t){try{if(function(t){return t instanceof e.Point||"number"==typeof t.x&&"number"==typeof t.y}(t))return{x:t.x,y:t.y};throw new Error}catch(e){throw new Error("A Provided cropping polygon point is not supported")}}))};try{if(!e.isArray(t))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=t.map((function(e){return n(e)}))}catch(t){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(t),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(t,n,r){n=n||e.Placement.CENTER;var i=e.Placement.properties[n],o=this.contentAspectX,a=0,s=0,c=1,u=1;if(this._clip&&(o=this._clip.getAspectRatio(),c=this._clip.width/this.source.dimensions.x,u=this._clip.height/this.source.dimensions.y,t.getAspectRatio()>o?(a=this._clip.x/this._clip.height*t.height,s=this._clip.y/this._clip.height*t.height):(a=this._clip.x/this._clip.width*t.width,s=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>o){var l=t.height/u,f=0;i.isHorizontallyCentered?f=(t.width-t.height*o)/2:i.isRight&&(f=t.width-t.height*o),this.setPosition(new e.Point(t.x-a+f,t.y-s),r),this.setHeight(l,r)}else{var d=t.width/c,p=0;i.isVerticallyCentered?p=(t.height-t.width/o)/2:i.isBottom&&(p=t.height-t.width/o),this.setPosition(new e.Point(t.x-a,t.y-s+p),r),this.setWidth(d,r)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(e,t){var n=this._scaleSpring.target.value===e;if(t){if(n&&this._scaleSpring.current.value===e)return;this._scaleSpring.resetTo(e),this._updateForScale(),this._needsDraw=!0}else{if(n)return;this._scaleSpring.springTo(e),this._updateForScale(),this._needsDraw=!0}n||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 e=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),t=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,n=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(t/this.minPixelRatio)/Math.log(2))));return n=Math.max(n,this.source.minLevel||0),{lowestLevel:e=Math.min(e,n),highestLevel:n}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){this.lastDrawn.pop().beingDrawn=!1}var n=this.viewport,o=this._viewportToTiledImageRectangle(n.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var a=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(null===(o=o.intersection(a)))return}for(var s=this._getLevelsInterval(),c=s.lowestLevel,u=s.highestLevel,l=null,f=!1,d=e.now(),p=u;p>=c;p--){var h=!1,g=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(p),!0).x*this._scaleSpring.current.value;if(p===c||!f&&g>=this.minPixelRatio)h=!0,f=!0;else if(!f)continue;var v=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(p),!1).x*this._scaleSpring.current.value,m=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,y=this.immediateRender?1:m;if(l=t(this,f,h,p,Math.min(1,(g-.5)/.5),y/Math.abs(y-v),o,d,l),i(this.coverage,p))break}!function(t,n){if(0===t.opacity||0===n.length&&!t.placeholderFillStyle)return;var r,i,o,a=n[0];a&&(r=t.opacity<1||t.compositeOperation&&"source-over"!==t.compositeOperation||!t._isBottomItem()&&a._hasTransparencyChannel());var s,c=t.viewport.getZoom(!0),u=t.viewportToImageZoom(c);n.length>1&&u>t.smoothTileEdgesMinZoom&&!t.iOSDevice&&t.getRotation(!0)%360==0&&e.supportsCanvas&&(r=!0,i=a.getScaleForEdgeSmoothing(),o=a.getTranslationForEdgeSmoothing(i,t._drawer.getCanvasSize(!1),t._drawer.getCanvasSize(!0)));r&&(i||(s=t.viewport.viewportToViewerElementRectangle(t.getClippedBounds(!0)).getIntegerBoundingBox(),t._drawer.viewer.viewport.getFlip()&&(0===t.viewport.degrees&&t.getRotation(!0)%360==0||(s.x=t._drawer.viewer.container.clientWidth-(s.x+s.width))),s=s.times(e.pixelDensityRatio)),t._drawer._clear(!0,s));i||(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:r}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:r}),0===t.viewport.degrees&&t.getRotation(!0)%360==0&&t._drawer.viewer.viewport.getFlip()&&t._drawer._flip());var l=!1;if(t._clip){t._drawer.saveContext(r);var f=t.imageToViewportRectangle(t._clip,!0);f=f.rotate(-t.getRotation(!0),t._getRotationPoint(!0));var d=t._drawer.viewportToDrawerRectangle(f);i&&(d=d.times(i)),o&&(d=d.translate(o)),t._drawer.setClip(d,r),l=!0}if(t._croppingPolygons){t._drawer.saveContext(r);try{var p=t._croppingPolygons.map((function(e){return e.map((function(e){var n=t.imageToViewportCoordinates(e.x,e.y,!0).rotate(-t.getRotation(!0),t._getRotationPoint(!0)),r=t._drawer.viewportCoordToDrawerCoord(n);return i&&(r=r.times(i)),r}))}));t._drawer.clipWithPolygons(p,r)}catch(t){e.console.error(t)}l=!0}if(t.placeholderFillStyle&&!1===t._hasOpaqueTile){var h=t._drawer.viewportToDrawerRectangle(t.getBounds(!0));i&&(h=h.times(i)),o&&(h=h.translate(o));var g=null;g="function"==typeof t.placeholderFillStyle?t.placeholderFillStyle(t,t._drawer.context):t.placeholderFillStyle,t._drawer.drawRectangle(h,g,r)}for(var v=n.length-1;v>=0;v--)a=n[v],t._drawer.drawTile(a,t._drawingHandler,r,i,o),a.beingDrawn=!0,t.viewer&&t.viewer.raiseEvent("tile-drawn",{tiledImage:t,tile:a});l&&t._drawer.restoreContext(r);i||(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(r),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(r));r&&(i&&(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:!1}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:!1})),t._drawer.blendSketch({opacity:t.opacity,scale:i,translate:o,compositeOperation:t.compositeOperation,bounds:s}),i&&(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(!1),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(!1)));i||0===t.viewport.degrees&&t.getRotation(!0)%360==0&&t._drawer.viewer.viewport.getFlip()&&t._drawer._flip();!function(t,n){if(t.debugMode)for(var r=n.length-1;r>=0;r--){var i=n[r];try{t._drawer.drawDebugInfo(i,n.length,r,t)}catch(t){e.console.error(t)}}}(t,n)}(this,this.lastDrawn),l&&!l.context2D?(!function(t,n,i){n.loading=!0,t._imageLoader.addJob({src:n.url,loadWithAjax:n.loadWithAjax,ajaxHeaders:n.ajaxHeaders,crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,callback:function(o,a,s){!function(t,n,i,o,a,s){if(!o)return e.console.log("Tile %s failed to load: %s - error: %s",n,n.url,a),t.viewer.raiseEvent("tile-load-failed",{tile:n,tiledImage:t,time:i,message:a,tileRequest:s}),n.loading=!1,void(n.exists=!1);if(i<t.lastResetTime)return e.console.log("Ignoring tile %s loaded before reset: %s",n,n.url),void(n.loading=!1);var c=function(){var e=t.source.getClosestLevel();r(t,n,o,e,s)};t._midDraw?window.setTimeout(c,1):c()}(t,n,i,o,a,s)},abort:function(){n.loading=!1}})}(this,l,d),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(0===this._tilesLoading)},_getCornerTiles:function(t,n,r){var i,o,a,s;this.wrapHorizontal?(i=e.positiveModulo(n.x,1),o=e.positiveModulo(r.x,1)):(i=Math.max(0,n.x),o=Math.min(1,r.x));var c=1/this.source.aspectRatio;this.wrapVertical?(a=e.positiveModulo(n.y,c),s=e.positiveModulo(r.y,c)):(a=Math.max(0,n.y),s=Math.min(c,r.y));var u=this.source.getTileAtPoint(t,new e.Point(i,a)),l=this.source.getTileAtPoint(t,new e.Point(o,s)),f=this.source.getNumTiles(t);return this.wrapHorizontal&&(u.x+=f.x*Math.floor(n.x),l.x+=f.x*Math.floor(r.x)),this.wrapVertical&&(u.y+=f.y*Math.floor(n.y/c),l.y+=f.y*Math.floor(r.y/c)),{topLeft:u,bottomRight:l}}})}(OpenSeadragon),function(e){var t=function(t){e.console.assert(t,"[TileCache.cacheTile] options is required"),e.console.assert(t.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(t.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=t.tile,this.tiledImage=t.tiledImage},n=function(t){e.console.assert(t,"[ImageRecord] options is required"),e.console.assert(t.image,"[ImageRecord] options.image is required"),this._image=t.image,this._tiles=[]};n.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var e=document.createElement("canvas");e.width=this._image.width,e.height=this._image.height,this._renderedContext=e.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(t){e.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=t},addTile:function(t){e.console.assert(t,"[ImageRecord.addTile] tile is required"),this._tiles.push(t)},removeTile:function(t){for(var n=0;n<this._tiles.length;n++)if(this._tiles[n]===t)return void this._tiles.splice(n,1);e.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",t)},getTileCount:function(){return this._tiles.length}},e.TileCache=function(t){t=t||{},this._maxImageCacheCount=t.maxImageCacheCount||e.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},e.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(r){e.console.assert(r,"[TileCache.cacheTile] options is required"),e.console.assert(r.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(r.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),e.console.assert(r.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var i=r.cutoff||0,o=this._tilesLoaded.length,a=this._imagesLoaded[r.tile.cacheKey];if(a||(e.console.assert(r.image,"[TileCache.cacheTile] options.image is required to create an ImageRecord"),a=this._imagesLoaded[r.tile.cacheKey]=new n({image:r.image}),this._imagesLoadedCount++),a.addTile(r.tile),r.tile.cacheImageRecord=a,this._imagesLoadedCount>this._maxImageCacheCount){for(var s,c,u,l,f,d,p=null,h=-1,g=null,v=this._tilesLoaded.length-1;v>=0;v--)(s=(d=this._tilesLoaded[v]).tile).level<=i||s.beingDrawn||(p?(l=s.lastTouchTime,c=p.lastTouchTime,f=s.level,u=p.level,(l<c||l==c&&f>u)&&(p=s,h=v,g=d)):(p=s,h=v,g=d));p&&h>=0&&(this._unloadTile(g),o=h)}this._tilesLoaded[o]=new t({tile:r.tile,tiledImage:r.tiledImage})},clearTilesFor:function(t){var n;e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var r=0;r<this._tilesLoaded.length;++r)(n=this._tilesLoaded[r]).tiledImage===t&&(this._unloadTile(n),this._tilesLoaded.splice(r,1),r--)},getImageRecord:function(t){return e.console.assert(t,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[t]},_unloadTile:function(t){e.console.assert(t,"[TileCache._unloadTile] tileRecord is required");var n=t.tile,r=t.tiledImage;n.unload(),n.cacheImageRecord=null;var i=this._imagesLoaded[n.cacheKey];i.removeTile(n),i.getTileCount()||(i.destroy(),delete this._imagesLoaded[n.cacheKey],this._imagesLoadedCount--),r.viewer.raiseEvent("tile-unloaded",{tile:n,tiledImage:r})}}}(OpenSeadragon),function(e){e.World=function(t){var n=this;e.console.assert(t.viewer,"[World] options.viewer is required"),e.EventSource.call(this),this.viewer=t.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(e){n._autoRefigureSizes?n._figureSizes():n._needsSizesFigured=!0},this._figureSizes()},e.extend(e.World.prototype,e.EventSource.prototype,{addItem:function(t,n){if(e.console.assert(t,"[World.addItem] item is required"),e.console.assert(t instanceof e.TiledImage,"[World.addItem] only TiledImages supported at this time"),void 0!==(n=n||{}).index){var r=Math.max(0,Math.min(this._items.length,n.index));this._items.splice(r,0,t)}else this._items.push(t);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,t.addHandler("bounds-change",this._delegatedFigureSizes),t.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:t})},getItemAt:function(t){return e.console.assert(void 0!==t,"[World.getItemAt] index is required"),this._items[t]},getIndexOfItem:function(t){return e.console.assert(t,"[World.getIndexOfItem] item is required"),e.indexOf(this._items,t)},getItemCount:function(){return this._items.length},setItemIndex:function(t,n){e.console.assert(t,"[World.setItemIndex] item is required"),e.console.assert(void 0!==n,"[World.setItemIndex] index is required");var r=this.getIndexOfItem(t);if(n>=this._items.length)throw new Error("Index bigger than number of layers.");n!==r&&-1!==r&&(this._items.splice(r,1),this._items.splice(n,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:r,newIndex:n}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var n=e.indexOf(this._items,t);-1!==n&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(n,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){var e,t;for(this.viewer._cancelPendingImages(),t=0;t<this._items.length;t++)(e=this._items[t]).removeHandler("bounds-change",this._delegatedFigureSizes),e.removeHandler("clip-change",this._delegatedFigureSizes),e.destroy();var n=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,t=0;t<n.length;t++)e=n[t],this._raiseRemoveItem(e)},resetItems:function(){for(var e=0;e<this._items.length;e++)this._items[e].reset()},update:function(){for(var e=!1,t=0;t<this._items.length;t++)e=this._items[t].update()||e;return e},draw:function(){for(var e=0;e<this._items.length;e++)this._items[e].draw();this._needsDraw=!1},needsDraw:function(){for(var e=0;e<this._items.length;e++)if(this._items[e].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(e){this._autoRefigureSizes=e,e&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(t){var n,r=(t=t||{}).immediately||!1,i=t.layout||e.DEFAULT_SETTINGS.collectionLayout,o=t.rows||e.DEFAULT_SETTINGS.collectionRows,a=t.columns||e.DEFAULT_SETTINGS.collectionColumns,s=t.tileSize||e.DEFAULT_SETTINGS.collectionTileSize,c=s+(t.tileMargin||e.DEFAULT_SETTINGS.collectionTileMargin);n=!t.rows&&a?a:Math.ceil(this._items.length/o);var u,l,f,d,p,h=0,g=0;this.setAutoRefigureSizes(!1);for(var v=0;v<this._items.length;v++)v&&v%n==0&&("horizontal"===i?(g+=c,h=0):(h+=c,g=0)),d=(f=(l=(u=this._items[v]).getBounds()).width>l.height?s:s*(l.width/l.height))*(l.height/l.width),p=new e.Point(h+(s-f)/2,g+(s-d)/2),u.setPosition(p,r),u.setWidth(f,r),"horizontal"===i?h+=c:g+=c;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,n=this._contentSize?this._contentSize.clone():null,r=this._contentFactor||0;if(this._items.length){var i=this._items[0],o=i.getBounds();this._contentFactor=i.getContentSize().x/o.width;for(var a=i.getClippedBounds().getBoundingBox(),s=a.x,c=a.y,u=a.x+a.width,l=a.y+a.height,f=1;f<this._items.length;f++)o=(i=this._items[f]).getBounds(),this._contentFactor=Math.max(this._contentFactor,i.getContentSize().x/o.width),a=i.getClippedBounds().getBoundingBox(),s=Math.min(s,a.x),c=Math.min(c,a.y),u=Math.max(u,a.x+a.width),l=Math.max(l,a.y+a.height);this._homeBounds=new e.Rect(s,c,u-s,l-c),this._contentSize=new e.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}else this._homeBounds=new e.Rect(0,0,1,1),this._contentSize=new e.Point(1,1),this._contentFactor=1;this._contentFactor===r&&this._homeBounds.equals(t)&&this._contentSize.equals(n)||this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(e){this.raiseEvent("remove-item",{item:e})}})}(OpenSeadragon)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=n.n(o),s=(n(2),n(33)),c=n(3),u=n(31),l=n(39),f=n(5),d=n(118),p=n(50),h=n(58),g=n(53),v=n(95),m=n(220);function y(e,t){var n=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(o.isValidElement)(e)?t(e):e}(e)})),n}function b(e,t,n){return null!=n[t]?n[t]:e.props[t]}function w(e,t,n){var r=y(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var c in t){if(i[c])for(r=0;r<i[c].length;r++){var u=i[c][r];s[i[c][r]]=n(u)}s[c]=n(c)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(a){var s=i[a];if(Object(o.isValidElement)(s)){var c=a in t,u=a in r,l=t[a],f=Object(o.isValidElement)(l)&&!l.props.in;!u||c&&!f?u||!c||f?u&&c&&Object(o.isValidElement)(l)&&(i[a]=Object(o.cloneElement)(s,{onExited:n.bind(null,s),in:l.props.in,exit:b(s,"exit",e),enter:b(s,"enter",e)})):i[a]=Object(o.cloneElement)(s,{in:!1}):i[a]=Object(o.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:b(s,"exit",e),enter:b(s,"enter",e)})}})),i}var _=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},x=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Object(g.a)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Object(v.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,r=a,y(n.children,(function(e){return Object(o.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:b(e,"appear",n),enter:b(e,"enter",n),exit:b(e,"exit",n)})}))):w(e,i,a),firstRender:!1}},n.handleExited=function(e,t){var n=y(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Object(r.a)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Object(h.a)(e,["component","childFactory"]),i=this.state.contextValue,o=_(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a.a.createElement(m.a.Provider,{value:i},o):a.a.createElement(m.a.Provider,{value:i},a.a.createElement(t,r,o))},t}(a.a.Component);x.propTypes={},x.defaultProps={component:"div",childFactory:function(e){return e}};var O=x,S="undefined"==typeof window?o.useEffect:o.useLayoutEffect;var E=function(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,a=e.rippleY,s=e.rippleSize,u=e.in,f=e.onExited,d=void 0===f?function(){}:f,p=e.timeout,h=o.useState(!1),g=h[0],v=h[1],m=Object(c.a)(t.ripple,t.rippleVisible,r&&t.ripplePulsate),y={width:s,height:s,top:-s/2+a,left:-s/2+i},b=Object(c.a)(t.child,g&&t.childLeaving,r&&t.childPulsate),w=Object(l.a)(d);return S((function(){if(!u){v(!0);var e=setTimeout(w,p);return function(){clearTimeout(e)}}}),[w,u,p]),o.createElement("span",{className:m,style:y},o.createElement("span",{className:b}))},C=o.forwardRef((function(e,t){var n=e.center,a=void 0!==n&&n,s=e.classes,u=e.className,l=Object(i.a)(e,["center","classes","className"]),f=o.useState([]),d=f[0],h=f[1],g=o.useRef(0),v=o.useRef(null);o.useEffect((function(){v.current&&(v.current(),v.current=null)}),[d]);var m=o.useRef(!1),y=o.useRef(null),b=o.useRef(null),w=o.useRef(null);o.useEffect((function(){return function(){clearTimeout(y.current)}}),[]);var _=o.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,a=e.cb;h((function(e){return[].concat(Object(p.a)(e),[o.createElement(E,{key:g.current,classes:s,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i})])})),g.current+=1,v.current=a}),[s]),x=o.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,o=t.center,s=void 0===o?a||t.pulsate:o,c=t.fakeElement,u=void 0!==c&&c;if("mousedown"===e.type&&m.current)m.current=!1;else{"touchstart"===e.type&&(m.current=!0);var l,f,d,p=u?null:w.current,h=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)l=Math.round(h.width/2),f=Math.round(h.height/2);else{var g=e.touches?e.touches[0]:e,v=g.clientX,x=g.clientY;l=Math.round(v-h.left),f=Math.round(x-h.top)}if(s)(d=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2==0&&(d+=1);else{var O=2*Math.max(Math.abs((p?p.clientWidth:0)-l),l)+2,S=2*Math.max(Math.abs((p?p.clientHeight:0)-f),f)+2;d=Math.sqrt(Math.pow(O,2)+Math.pow(S,2))}e.touches?null===b.current&&(b.current=function(){_({pulsate:i,rippleX:l,rippleY:f,rippleSize:d,cb:n})},y.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):_({pulsate:i,rippleX:l,rippleY:f,rippleSize:d,cb:n})}}),[a,_]),S=o.useCallback((function(){x({},{pulsate:!0})}),[x]),C=o.useCallback((function(e,t){if(clearTimeout(y.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(y.current=setTimeout((function(){C(e,t)})));b.current=null,h((function(e){return e.length>0?e.slice(1):e})),v.current=t}),[]);return o.useImperativeHandle(t,(function(){return{pulsate:S,start:x,stop:C}}),[S,x,C]),o.createElement("span",Object(r.a)({className:Object(c.a)(s.root,u),ref:w},l),o.createElement(O,{component:null,exit:!0},d))})),k=Object(f.a)((function(e){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(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.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)"}}}}),{flip:!1,name:"MuiTouchRipple"})(o.memo(C)),T=o.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,f=e.centerRipple,p=void 0!==f&&f,h=e.children,g=e.classes,v=e.className,m=e.component,y=void 0===m?"button":m,b=e.disabled,w=void 0!==b&&b,_=e.disableRipple,x=void 0!==_&&_,O=e.disableTouchRipple,S=void 0!==O&&O,E=e.focusRipple,C=void 0!==E&&E,T=e.focusVisibleClassName,j=e.onBlur,P=e.onClick,I=e.onFocus,R=e.onFocusVisible,A=e.onKeyDown,M=e.onKeyUp,D=e.onMouseDown,N=e.onMouseLeave,L=e.onMouseUp,z=e.onTouchEnd,B=e.onTouchMove,F=e.onTouchStart,W=e.onDragLeave,H=e.tabIndex,V=void 0===H?0:H,U=e.TouchRippleProps,q=e.type,G=void 0===q?"button":q,K=Object(i.a)(e,["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"]),$=o.useRef(null);var Z=o.useRef(null),X=o.useState(!1),Q=X[0],Y=X[1];w&&Q&&Y(!1);var J=Object(d.a)(),ee=J.isFocusVisible,te=J.onBlurVisible,ne=J.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;return Object(l.a)((function(r){return t&&t(r),!n&&Z.current&&Z.current[e](r),!0}))}o.useImperativeHandle(n,(function(){return{focusVisible:function(){Y(!0),$.current.focus()}}}),[]),o.useEffect((function(){Q&&C&&!x&&Z.current.pulsate()}),[x,C,Q]);var ie=re("start",D),oe=re("stop",W),ae=re("stop",L),se=re("stop",(function(e){Q&&e.preventDefault(),N&&N(e)})),ce=re("start",F),ue=re("stop",z),le=re("stop",B),fe=re("stop",(function(e){Q&&(te(e),Y(!1)),j&&j(e)}),!1),de=Object(l.a)((function(e){$.current||($.current=e.currentTarget),ee(e)&&(Y(!0),R&&R(e)),I&&I(e)})),pe=function(){var e=s.findDOMNode($.current);return y&&"button"!==y&&!("A"===e.tagName&&e.href)},he=o.useRef(!1),ge=Object(l.a)((function(e){C&&!he.current&&Q&&Z.current&&" "===e.key&&(he.current=!0,e.persist(),Z.current.stop(e,(function(){Z.current.start(e)}))),e.target===e.currentTarget&&pe()&&" "===e.key&&e.preventDefault(),A&&A(e),e.target===e.currentTarget&&pe()&&"Enter"===e.key&&!w&&(e.preventDefault(),P&&P(e))})),ve=Object(l.a)((function(e){C&&" "===e.key&&Z.current&&Q&&!e.defaultPrevented&&(he.current=!1,e.persist(),Z.current.stop(e,(function(){Z.current.pulsate(e)}))),M&&M(e),P&&e.target===e.currentTarget&&pe()&&" "===e.key&&!e.defaultPrevented&&P(e)})),me=y;"button"===me&&K.href&&(me="a");var ye={};"button"===me?(ye.type=G,ye.disabled=w):("a"===me&&K.href||(ye.role="button"),ye["aria-disabled"]=w);var be=Object(u.a)(a,t),we=Object(u.a)(ne,$),_e=Object(u.a)(be,we),xe=o.useState(!1),Oe=xe[0],Se=xe[1];o.useEffect((function(){Se(!0)}),[]);var Ee=Oe&&!x&&!w;return o.createElement(me,Object(r.a)({className:Object(c.a)(g.root,v,Q&&[g.focusVisible,T],w&&g.disabled),onBlur:fe,onClick:P,onFocus:de,onKeyDown:ge,onKeyUp:ve,onMouseDown:ie,onMouseLeave:se,onMouseUp:ae,onDragLeave:oe,onTouchEnd:ue,onTouchMove:le,onTouchStart:ce,ref:_e,tabIndex:w?-1:V},ye,K),h,Ee?o.createElement(k,Object(r.a)({ref:Z,center:p},U)):null)}));t.a=Object(f.a)({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:{}},{name:"MuiButtonBase"})(T)},,,,,,,function(e,t,n){var r=n(78).Symbol;e.exports=r},function(e,t,n){var r=n(817),i=n(401),o=n(818),a=n(544),s=n(545),c=n(142),u=n(534),l=u(r),f=u(i),d=u(o),p=u(a),h=u(s),g=c;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||o&&"[object Promise]"!=g(o.resolve())||a&&"[object Set]"!=g(new a)||s&&"[object WeakMap]"!=g(new s))&&(g=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case d:return"[object Promise]";case p:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=g},function(e,t,n){var r=n(200),i=n(168);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},function(e,t,n){var r=n(56),i=n(410),o=n(549),a=n(411);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},function(e,t,n){var r=n(142),i=n(92);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(407),i=n(830);e.exports=function e(t,n,o,a,s){var c=-1,u=t.length;for(o||(o=i),s||(s=[]);++c<u;){var l=t[c];n>0&&o(l)?n>1?e(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(e,t,n){var r=n(202),i=n(550),o=n(413);e.exports=function(e,t){return o(i(e,t,r),e+"")}},function(e,t,n){"use strict";var r=n(244);n.d(t,"a",(function(){return r.b}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"b",(function(){return h})),n.d(t,"f",(function(){return g})),n.d(t,"a",(function(){return v})),n.d(t,"d",(function(){return m}));var r=n(10),i=n(90),o=n(88),a=n(38),s=n(319),c=n(76);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=Object(r.createSelector)([o.a,a.e],(function(e){var t=e.window,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(l({},t),n)}));function p(e){var t={};return Object.keys(Object(a.h)(e)).forEach((function(n){t[n]=Object(i.o)(e,{windowId:n})})),t}var h=Object(r.createSelector)([a.h],(function(e){return Object.values(e).filter((function(e){return!0===e.maximized})).map((function(e){return e.id}))})),g=Object(r.createSelector)([a.e,d,c.f,c.c],(function(e,t,n,r){var i=t.views,o=void 0===i?[]:i,a=t.defaultView;if(e&&e.view)return e.view;var s=(o||[]).find((function(e){return e.behaviors&&e.behaviors.some((function(e){return n===e||r.includes(e)}))}));return s&&s.key||a})),v=Object(r.createSelector)([c.f,c.c,d],(function(e,t,n){var r=n.views,i=void 0===r?[]:r,o=n.defaultView;return(i||[]).reduce((function(n,r){return r.key!==o&&r.behaviors&&!r.behaviors.some((function(n){return e===n||t.includes(n)}))||n.push(r.key),n}),[])})),m=Object(r.createSelector)([s.d,a.e,function(e){return Object(a.f)(e).length>1}],(function(e,t,n){return"elastic"===e||n&&t&&!1===t.maximized}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(155),i=n.n(r),o=n(48);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left-to-right";p(this,e),this.canvases=t.map((function(e){return new o.a(e)})),this.layers=n,this.viewingDirection=r,this._canvasDimensions=null}var t,n,r;return t=e,(n=[{key:"canvasIds",get:function(){return this.canvases.map((function(e){return e.id}))}},{key:"canvasDimensions",get:function(){if(this._canvasDimensions)return this._canvasDimensions;var e=l(this.canvasDirection,2),t=e[0],n=e[1],r=0===n?Math.min.apply(Math,u(this.canvases.map((function(e){return e.getHeight()})))):Math.min.apply(Math,u(this.canvases.map((function(e){return e.getWidth()})))),i=0,o=0,a=this.canvases.reduce((function(e,a){var s=0,c=0;return isNaN(a.aspectRatio)||(0===n?(s=r,c=Math.floor(r*a.aspectRatio)):(c=r,s=Math.floor(r*(1/a.aspectRatio)))),e.push({canvas:a,height:s,width:c,x:i,y:o}),i+=t*c,o+=n*s,e}),[]),c=0===n?r:Math.abs(o),f=0===t?r:Math.abs(i);return this._canvasDimensions=a.reduce((function(e,r){return e.push(s(s({},r),{},{x:-1===t?r.x+f-r.width:r.x,y:-1===n?r.y+c-r.height:r.y})),e}),[]),this._canvasDimensions}},{key:"contentResourceToWorldCoordinates",value:function(e){var t=this.canvases.findIndex((function(t){return t.imageResources.find((function(t){return t.id===e.id}))})),n=this.canvases[t];if(!n)return[];var r=l(this.canvasToWorldCoordinates(n.id),4),i=r[0],o=r[1],a=r[2],s=r[3],c=n.onFragment(e.id);return c?[i+c[0],o+c[1],c[2],c[3]]:[i,o,a,s]}},{key:"canvasToWorldCoordinates",value:function(e){var t=this.canvasDimensions.find((function(t){return t.canvas.id===e}));return[t.x,t.y,t.width,t.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(e){var t=this.canvases.find((function(t){return t.imageServiceIds.some((function(t){return i()(t,{stripAuthentication:!1})===i()(e,{stripAuthentication:!1})}))}));if(t)return t.imageResources.find((function(t){return i()(t.getServices()[0].id,{stripAuthentication:!1})===i()(e,{stripAuthentication:!1})}))}},{key:"getLayerMetadata",value:function(e){if(this.layers){var t=this.canvases.find((function(t){return t.imageResources.find((function(t){return t.id===e.id}))}));if(t){var n=t.imageResources.findIndex((function(t){return t.id===e.id})),r=this.layers[t.canvas.id],i=r&&r[e.id];return s({index:n,opacity:1,total:t.imageResources.length,visibility:!0},i)}}}},{key:"layerOpacityOfImageResource",value:function(e){var t=this.getLayerMetadata(e);return t?t.visibility?t.opacity:0:1}},{key:"layerIndexOfImageResource",value:function(e){var t=this.getLayerMetadata(e);if(t)return t.total-t.index-1}},{key:"offsetByCanvas",value:function(e){var t=this.canvasToWorldCoordinates(e);return{x:t[0],y:t[1]}}},{key:"worldBounds",value:function(){return[0,0,Math.max.apply(Math,u(this.canvasDimensions.map((function(e){return e.x+e.width})))),Math.max.apply(Math,u(this.canvasDimensions.map((function(e){return e.y+e.height}))))]}},{key:"canvasAtPoint",value:function(e){var t=this.canvasDimensions.find((function(t){return t.x<=e.x&&e.x<=t.x+t.width&&t.y<=e.y&&e.y<=t.y+t.height}));return t&&t.canvas}}])&&h(t.prototype,n),r&&h(t,r),e}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));var r=n(50),i=n(1),o=n(70),a=(n(2),n(136)),s={xs:0,sm:600,md:960,lg:1280,xl:1920},c={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(s[e],"px)")}};function u(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||c;return t.reduce((function(e,i,o){return e[r.up(r.keys[o])]=n(t[o]),e}),{})}if("object"===Object(o.a)(t)){var i=e.theme.breakpoints||c;return Object.keys(t).reduce((function(e,r){return e[i.up(r)]=n(t[r]),e}),{})}return n(t)}t.a=function(e){var t=function(t){var n=e(t),r=t.theme.breakpoints||c,o=r.keys.reduce((function(n,o){return t[o]&&((n=n||{})[r.up(o)]=e(Object(i.a)({theme:t.theme},t[o]))),n}),null);return Object(a.a)(n,o)};return t.propTypes={},t.filterProps=["xs","sm","md","lg","xl"].concat(Object(r.a)(e.filterProps)),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(248);function i(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a={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"}},function(e,t,n){"use strict";t.a={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"}},function(e,t,n){"use strict";t.a={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"}},function(e,t,n){"use strict";t.a={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"}},function(e,t,n){"use strict";t.a={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"}},function(e,t,n){"use strict";t.a={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"}},function(e,t,n){"use strict";t.a={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"}},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"SearchSharp");t.default=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return P}));var r=n(0),i=n(683),o=n.n(i),a=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},c={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return a(t,e),t.prototype.render=function(){return r.createElement("div",{className:this.props.className||"",style:s(s({position:"absolute",userSelect:"none"},c[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(r.PureComponent),l=n(158),f=n.n(l),d=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},h={width:"auto",height:"auto"},g=f()((function(e,t,n){return Math.max(Math.min(e,n),t)})),v=f()((function(e,t){return Math.round(e/t)*t})),m=f()((function(e,t){return new RegExp(e,"i").test(t)})),y=function(e){return Boolean(e.touches&&e.touches.length)},b=f()((function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n}),0),i=Math.abs(t[r]-e);return 0===n||i<n?t[r]:e})),w=f()((function(e,t){return e.substr(e.length-t.length,t.length)===t})),_=f()((function(e){return"auto"===(e=e.toString())||w(e,"px")||w(e,"%")||w(e,"vh")||w(e,"vw")||w(e,"vmax")||w(e,"vmin")?e:e+"px"})),x=function(e,t,n,r){if(e&&"string"==typeof e){if(w(e,"px"))return Number(e.replace("px",""));if(w(e,"%"))return t*(Number(e.replace("%",""))/100);if(w(e,"vw"))return n*(Number(e.replace("vw",""))/100);if(w(e,"vh"))return r*(Number(e.replace("vh",""))/100)}return e},O=f()((function(e,t,n,r,i,o,a){return r=x(r,e.width,t,n),i=x(i,e.height,t,n),o=x(o,e.width,t,n),a=x(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===i?void 0:Number(i),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===a?void 0:Number(a)}})),S=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],E=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0",t.classList?t.classList.add("__resizable_base__"):t.className+="__resizable_base__",e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return d(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&w(e.propsSize[t].toString(),"%")){if(w(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return _(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?_(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?_(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,i=this.props.boundsByDirection,o=this.state.direction,a=i&&m("left",o),s=i&&m("top",o);if("parent"===this.props.bounds){var c=this.parentNode;c&&(n=a?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,i=this.state,o=i.direction,a=i.original,s=this.props,c=s.lockAspectRatio,u=s.lockAspectRatioExtraHeight,l=s.lockAspectRatioExtraWidth,f=a.width,d=a.height,p=u||0,h=l||0;return m("right",o)&&(f=a.width+(e-a.x)*r/n,c&&(d=(f-h)/this.ratio+p)),m("left",o)&&(f=a.width-(e-a.x)*r/n,c&&(d=(f-h)/this.ratio+p)),m("bottom",o)&&(d=a.height+(t-a.y)*r/n,c&&(f=(d-p)*this.ratio+h)),m("top",o)&&(d=a.height-(t-a.y)*r/n,c&&(f=(d-p)*this.ratio+h)),{newWidth:f,newHeight:d}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,o=i.lockAspectRatio,a=i.lockAspectRatioExtraHeight,s=i.lockAspectRatioExtraWidth,c=void 0===r.width?10:r.width,u=void 0===n.width||n.width<0?e:n.width,l=void 0===r.height?10:r.height,f=void 0===n.height||n.height<0?t:n.height,d=a||0,p=s||0;if(o){var h=(l-d)*this.ratio+p,v=(f-d)*this.ratio+p,m=(c-p)/this.ratio+d,y=(u-p)/this.ratio+d,b=Math.max(c,h),w=Math.min(u,v),_=Math.max(l,m),x=Math.min(f,y);e=g(e,b,w),t=g(t,_,x)}else e=g(e,c,u),t=g(t,l,f);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),i=r.left,o=r.top,a=r.right,s=r.bottom;this.resizableLeft=i,this.resizableRight=a,this.resizableTop=o,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,i=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,i=e.nativeEvent.clientY):e.nativeEvent&&y(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,i=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var o=this.window.getComputedStyle(this.resizable);if("auto"!==o.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=o.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var c={original:{x:r,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:p(p({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(c)}},t.prototype.onMouseMove=function(e){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&y(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var t=this.props,n=t.maxWidth,r=t.maxHeight,i=t.minWidth,o=t.minHeight,a=y(e)?e.touches[0].clientX:e.clientX,s=y(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,l=c.original,f=c.width,d=c.height,p=this.getParentSize(),h=O(p,this.window.innerWidth,this.window.innerHeight,n,r,i,o);n=h.maxWidth,r=h.maxHeight,i=h.minWidth,o=h.minHeight;var g=this.calculateNewSizeFromDirection(a,s),m=g.newHeight,_=g.newWidth,x=this.calculateNewMaxFromBoundary(n,r),S=this.calculateNewSizeFromAspectRatio(_,m,{width:x.maxWidth,height:x.maxHeight},{width:i,height:o});if(_=S.newWidth,m=S.newHeight,this.props.grid){var E=v(_,this.props.grid[0]),C=v(m,this.props.grid[1]),k=this.props.snapGap||0;_=0===k||Math.abs(E-_)<=k?E:_,m=0===k||Math.abs(C-m)<=k?C:m}this.props.snap&&this.props.snap.x&&(_=b(_,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(m=b(m,this.props.snap.y,this.props.snapGap));var T={width:_-l.width,height:m-l.height};if(f&&"string"==typeof f)if(w(f,"%"))_=_/p.width*100+"%";else if(w(f,"vw")){_=_/this.window.innerWidth*100+"vw"}else if(w(f,"vh")){_=_/this.window.innerHeight*100+"vh"}if(d&&"string"==typeof d)if(w(d,"%"))m=m/p.height*100+"%";else if(w(d,"vw")){m=m/this.window.innerWidth*100+"vw"}else if(w(d,"vh")){m=m/this.window.innerHeight*100+"vh"}var j={width:this.createSizeForCssProperty(_,"width"),height:this.createSizeForCssProperty(m,"height")};"row"===this.flexDir?j.flexBasis=j.width:"column"===this.flexDir&&(j.flexBasis=j.height),this.setState(j),this.props.onResize&&this.props.onResize(e,u,this.resizable,T)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,i=t.original;if(n&&this.resizable){var o={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:p(p({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,i=t.handleStyles,o=t.handleClasses,a=t.handleWrapperStyle,s=t.handleWrapperClass,c=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?r.createElement(u,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:o&&o[t]},c&&c[t]?c[t]:null):null}));return r.createElement("div",{className:s,style:a},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==S.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=p(p(p({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r.createElement(i,p({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(r.PureComponent),C=function(e,t){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var k=function(){return(k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};var T=o.a,j={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},P=function(e){function t(t){var n=e.call(this,t)||this;return n.resizingPosition={x:0,y:0},n.offsetFromParent={left:0,top:0},n.resizableElement={current:null},n.originalPosition={x:0,y:0},n.refDraggable=function(e){e&&(n.draggable=e)},n.refResizable=function(e){e&&(n.resizable=e,n.resizableElement.current=e.resizable)},n.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},n.onResizeStart=n.onResizeStart.bind(n),n.onResize=n.onResize.bind(n),n.onResizeStop=n.onResizeStop.bind(n),n.onDragStart=n.onDragStart.bind(n),n.onDrag=n.onDrag.bind(n),n.onDragStop=n.onDragStop.bind(n),n.getMaxSizesFromProps=n.getMaxSizesFromProps.bind(n),n}return function(e,t){function n(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var e=this.offsetFromParent,t=e.left,n=e.top,r=this.getDraggablePosition(),i=r.x,o=r.y;this.draggable.setState({x:i-t,y:o-n}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var e=this.draggable.state;return{x:e.x,y:e.y}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/t;case"body":return document.body.offsetHeight/t;default:return e.offsetHeight}},t.prototype.getOffsetWidth=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/t;case"body":return document.body.offsetWidth/t;default:return e.offsetWidth}},t.prototype.onDragStart=function(e,t){this.props.onDragStart&&this.props.onDragStart(e,t);var n=this.getDraggablePosition();if(this.originalPosition=n,this.props.bounds){var r,i=this.getParent(),o=this.props.scale;if("parent"===this.props.bounds)r=i;else{if("body"===this.props.bounds){var a=i.getBoundingClientRect(),s=a.left,c=a.top,u=document.body.getBoundingClientRect(),l=-(s-i.offsetLeft*o-u.left)/o,f=-(c-i.offsetTop*o-u.top)/o,d=(document.body.offsetWidth-this.resizable.size.width*o)/o+l,p=(document.body.offsetHeight-this.resizable.size.height*o)/o+f;return this.setState({bounds:{top:f,right:d,bottom:p,left:l}})}if("window"===this.props.bounds){if(!this.resizable)return;var h=i.getBoundingClientRect(),g=h.left,v=h.top,m=-(g-i.offsetLeft*o)/o,y=-(v-i.offsetTop*o)/o;d=(window.innerWidth-this.resizable.size.width*o)/o+m,p=(window.innerHeight-this.resizable.size.height*o)/o+y;return this.setState({bounds:{top:y,right:d,bottom:p,left:m}})}r=document.querySelector(this.props.bounds)}if(r instanceof HTMLElement&&i instanceof HTMLElement){var b=r.getBoundingClientRect(),w=b.left,_=b.top,x=i.getBoundingClientRect(),O=(w-x.left)/o,S=_-x.top;if(this.resizable){this.updateOffsetFromParent();var E=this.offsetFromParent;this.setState({bounds:{top:S-E.top,right:O+(r.offsetWidth-this.resizable.size.width)-E.left/o,bottom:S+(r.offsetHeight-this.resizable.size.height)-E.top,left:O-E.left/o}})}}}},t.prototype.onDrag=function(e,t){if(this.props.onDrag){var n=this.offsetFromParent,r=n.left,i=n.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(e,k(k({},t),{x:t.x+r,y:this.originalPosition.y+i,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(e,k(k({},t),{x:this.originalPosition.x+r,y:t.y+i,deltaX:0})):void 0:this.props.onDrag(e,k(k({},t),{x:t.x-r,y:t.y-i}))}},t.prototype.onDragStop=function(e,t){if(this.props.onDragStop){var n=this.offsetFromParent,r=n.left,i=n.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(e,k(k({},t),{x:t.x+r,y:this.originalPosition.y+i,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(e,k(k({},t),{x:this.originalPosition.x+r,y:t.y+i,deltaX:0})):void 0:this.props.onDragStop(e,k(k({},t),{x:t.x+r,y:t.y+i}))}},t.prototype.onResizeStart=function(e,t,n){e.stopPropagation(),this.setState({resizing:!0});var r=this.props.scale,i=this.offsetFromParent,o=this.getDraggablePosition();if(this.resizingPosition={x:o.x+i.left,y:o.y+i.top},this.originalPosition=o,this.props.bounds){var a=this.getParent(),s=void 0;s="parent"===this.props.bounds?a:"body"===this.props.bounds?document.body:"window"===this.props.bounds?window:document.querySelector(this.props.bounds);var c=this.getSelfElement();if(c instanceof Element&&(s instanceof HTMLElement||s===window)&&a instanceof HTMLElement){var u=this.getMaxSizesFromProps(),l=u.maxWidth,f=u.maxHeight,d=this.getParentSize();if(l&&"string"==typeof l)if(l.endsWith("%")){var p=Number(l.replace("%",""))/100;l=d.width*p}else l.endsWith("px")&&(l=Number(l.replace("px","")));if(f&&"string"==typeof f)if(f.endsWith("%")){p=Number(f.replace("%",""))/100;f=d.width*p}else f.endsWith("px")&&(f=Number(f.replace("px","")));var h=c.getBoundingClientRect(),g=h.left,v=h.top,m="window"===this.props.bounds?{left:0,top:0}:s.getBoundingClientRect(),y=m.left,b=m.top,w=this.getOffsetWidth(s),_=this.getOffsetHeight(s),x=t.toLowerCase().endsWith("left"),O=t.toLowerCase().endsWith("right"),S=t.startsWith("top"),E=t.startsWith("bottom");if((x||S)&&this.resizable){var C=(g-y)/r+this.resizable.size.width;this.setState({maxWidth:C>Number(l)?l:C})}if(O||this.props.lockAspectRatio&&!x&&!S){C=w+(y-g)/r;this.setState({maxWidth:C>Number(l)?l:C})}if((S||x)&&this.resizable){C=(v-b)/r+this.resizable.size.height;this.setState({maxHeight:C>Number(f)?f:C})}if(E||this.props.lockAspectRatio&&!S&&!x){C=_+(b-v)/r;this.setState({maxHeight:C>Number(f)?f:C})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(e,t,n)},t.prototype.onResize=function(e,t,n,r){var i={x:this.originalPosition.x,y:this.originalPosition.y},o=-r.width,a=-r.height;-1!==["top","left","topLeft","bottomLeft","topRight"].indexOf(t)&&("bottomLeft"===t?i.x+=o:("topRight"===t||(i.x+=o),i.y+=a)),i.x===this.draggable.state.x&&i.y===this.draggable.state.y||this.draggable.setState(i),this.updateOffsetFromParent();var s=this.offsetFromParent,c=this.getDraggablePosition().x+s.left,u=this.getDraggablePosition().y+s.top;this.resizingPosition={x:c,y:u},this.props.onResize&&this.props.onResize(e,t,n,r,{x:c,y:u})},t.prototype.onResizeStop=function(e,t,n,r){this.setState({resizing:!1});var i=this.getMaxSizesFromProps(),o=i.maxWidth,a=i.maxHeight;this.setState({maxWidth:o,maxHeight:a}),this.props.onResizeStop&&this.props.onResizeStop(e,t,n,r,this.resizingPosition)},t.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},t.prototype.updatePosition=function(e){this.draggable.setState(e)},t.prototype.updateOffsetFromParent=function(){var e=this.props.scale,t=this.getParent(),n=this.getSelfElement();if(!t||null===n)return{top:0,left:0};var r=t.getBoundingClientRect(),i=r.left,o=r.top,a=n.getBoundingClientRect(),s=this.getDraggablePosition(),c=t.scrollLeft,u=t.scrollTop;this.offsetFromParent={left:a.left-i+c-s.x*e,top:a.top-o+u-s.y*e}},t.prototype.render=function(){var e=this.props,t=e.disableDragging,n=e.style,i=e.dragHandleClassName,o=e.position,a=e.onMouseDown,s=e.onMouseUp,c=e.dragAxis,u=e.dragGrid,l=e.bounds,f=e.enableUserSelectHack,d=e.cancel,p=e.children,h=(e.onResizeStart,e.onResize,e.onResizeStop,e.onDragStart,e.onDrag,e.onDragStop,e.resizeHandleStyles),g=e.resizeHandleClasses,v=e.resizeHandleComponent,m=e.enableResizing,y=e.resizeGrid,b=e.resizeHandleWrapperClass,w=e.resizeHandleWrapperStyle,_=e.scale,x=e.allowAnyClick,O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick"]),S=this.props.default?k({},this.props.default):void 0;delete O.default;var C,P=t||i?{cursor:"auto"}:{cursor:"move"},I=k(k(k({},j),P),n),R=this.offsetFromParent,A=R.left,M=R.top;o&&(C={x:o.x-A,y:o.y-M});var D,N=this.state.resizing?void 0:C,L=this.state.resizing?"both":c;return Object(r.createElement)(T,{ref:this.refDraggable,handle:i?"."+i:void 0,defaultPosition:S,onMouseDown:a,onMouseUp:s,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:L,disabled:t,grid:u,bounds:l?this.state.bounds:void 0,position:N,enableUserSelectHack:f,cancel:d,scale:_,allowAnyClick:x,nodeRef:this.resizableElement},Object(r.createElement)(E,k({},O,{ref:this.refResizable,defaultSize:S,size:this.props.size,enable:"boolean"==typeof m?(D=m,{bottom:D,bottomLeft:D,bottomRight:D,left:D,right:D,top:D,topLeft:D,topRight:D}):m,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:I,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:y,handleWrapperClass:b,handleWrapperStyle:w,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:h,handleClasses:g,handleComponent:v,scale:this.props.scale}),p))},t.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(r.PureComponent)},function(e,t,n){"use strict";var r=n(0),i=n.n(r);t.a=i.a.createContext(null)},function(e,t,n){var r=n(399),i=n(198),o=n(279),a=n(56),s=n(166),c=n(280),u=n(282),l=n(396),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t,n){"use strict";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 r=n(1090);Object.defineProperty(t,"Mosaic",{enumerable:!0,get:function(){return r.Mosaic}}),Object.defineProperty(t,"MosaicWithoutDragDropContext",{enumerable:!0,get:function(){return r.MosaicWithoutDragDropContext}});var i=n(317);Object.defineProperty(t,"MosaicDragType",{enumerable:!0,get:function(){return i.MosaicDragType}});var o=n(100);Object.defineProperty(t,"MosaicContext",{enumerable:!0,get:function(){return o.MosaicContext}}),Object.defineProperty(t,"MosaicWindowContext",{enumerable:!0,get:function(){return o.MosaicWindowContext}});var a=n(181);Object.defineProperty(t,"buildSpecFromUpdate",{enumerable:!0,get:function(){return a.buildSpecFromUpdate}}),Object.defineProperty(t,"createDragToUpdates",{enumerable:!0,get:function(){return a.createDragToUpdates}}),Object.defineProperty(t,"createExpandUpdate",{enumerable:!0,get:function(){return a.createExpandUpdate}}),Object.defineProperty(t,"createHideUpdate",{enumerable:!0,get:function(){return a.createHideUpdate}}),Object.defineProperty(t,"createRemoveUpdate",{enumerable:!0,get:function(){return a.createRemoveUpdate}}),Object.defineProperty(t,"updateTree",{enumerable:!0,get:function(){return a.updateTree}});var s=n(109);Object.defineProperty(t,"createBalancedTreeFromLeaves",{enumerable:!0,get:function(){return s.createBalancedTreeFromLeaves}}),Object.defineProperty(t,"Corner",{enumerable:!0,get:function(){return s.Corner}}),Object.defineProperty(t,"getAndAssertNodeAtPathExists",{enumerable:!0,get:function(){return s.getAndAssertNodeAtPathExists}}),Object.defineProperty(t,"getLeaves",{enumerable:!0,get:function(){return s.getLeaves}}),Object.defineProperty(t,"getNodeAtPath",{enumerable:!0,get:function(){return s.getNodeAtPath}}),Object.defineProperty(t,"getOtherBranch",{enumerable:!0,get:function(){return s.getOtherBranch}}),Object.defineProperty(t,"getOtherDirection",{enumerable:!0,get:function(){return s.getOtherDirection}}),Object.defineProperty(t,"getPathToCorner",{enumerable:!0,get:function(){return s.getPathToCorner}}),Object.defineProperty(t,"isParent",{enumerable:!0,get:function(){return s.isParent}});var c=n(1104);Object.defineProperty(t,"MosaicWindow",{enumerable:!0,get:function(){return c.MosaicWindow}});var u=n(241);Object.defineProperty(t,"createDefaultToolbarButton",{enumerable:!0,get:function(){return u.createDefaultToolbarButton}});var l=n(659);Object.defineProperty(t,"MosaicZeroState",{enumerable:!0,get:function(){return l.MosaicZeroState}});var f=n(666);Object.defineProperty(t,"Separator",{enumerable:!0,get:function(){return f.Separator}});var d=n(662);Object.defineProperty(t,"ExpandButton",{enumerable:!0,get:function(){return d.ExpandButton}});var p=n(664);Object.defineProperty(t,"ReplaceButton",{enumerable:!0,get:function(){return p.ReplaceButton}});var h=n(665);Object.defineProperty(t,"SplitButton",{enumerable:!0,get:function(){return h.SplitButton}});var g=n(663);Object.defineProperty(t,"RemoveButton",{enumerable:!0,get:function(){return g.RemoveButton}});var v=n(661);Object.defineProperty(t,"DEFAULT_CONTROLS_WITH_CREATION",{enumerable:!0,get:function(){return v.DEFAULT_CONTROLS_WITH_CREATION}}),Object.defineProperty(t,"DEFAULT_CONTROLS_WITHOUT_CREATION",{enumerable:!0,get:function(){return v.DEFAULT_CONTROLS_WITHOUT_CREATION}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n.n(r),o=n(332);function a(){return i.a.useContext(o.a)}},,,,function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t){e.exports=function(){}},function(e,t,n){"use strict";function r(e,t,n,r,i){return null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(457);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.r(t);var r=n(455);n.d(t,"default",(function(){return r.a}))},function(e,t,n){var r=n(422),i=n(278);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,c=t.length;++s<c;){var u=t[s],l=o?o(n[u],e[u],u,n,e):void 0;void 0===l&&(l=e[u]),a?i(n,u,l):r(n,u,l)}return n}},function(e,t,n){var r=n(929);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){"use strict";var r=n(40).OrderedMap,i={createFromArray:function(e){return r(e.map((function(e){return[e.getKey(),e]})))}};e.exports=i},function(e,t,n){"use strict";e.exports=function(e,t,n,r){if(e.size){var i=0;e.reduce((function(e,o,a){return t(e,o)||(n(e)&&r(i,a),i=a),o})),n(e.last())&&r(i,e.count())}}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)}},function(e,t,n){"use strict";var r=n(85),i=n(146)("draft_tree_data_support");e.exports=function(e,t,n){var o=e.getSelection(),a=e.getCurrentContent(),s=o,c=o.getAnchorKey(),u=o.getFocusKey(),l=a.getBlockForKey(c);if(i&&"forward"===n&&c!==u)return a;if(o.isCollapsed()){if("forward"===n){if(e.isSelectionAtEndOfContent())return a;if(i)if(o.getAnchorOffset()===a.getBlockForKey(c).getLength()){var f=a.getBlockForKey(l.nextSibling);if(!f||0===f.getLength())return a}}else if(e.isSelectionAtStartOfContent())return a;if((s=t(e))===o)return a}return r.removeRange(a,s,n)}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(242);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.c}))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createDefaultToolbarButton=void 0;var i=r(n(23)),o=r(n(0)),a=n(175);t.createDefaultToolbarButton=function(e,t,n,r){return o.default.createElement("button",{title:e,onClick:n,className:i.default("mosaic-default-control",a.OptionalBlueprint.getClasses("BUTTON","MINIMAL"),t)},r&&o.default.createElement("span",{className:"control-text"},r))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return p})),n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return v}));var r,i=n(1),o=n(4),a=n(0),s=n.n(a),c=(n(2),n(756)),u=n(59),l=n(762),f=Object(u.c)(Object(l.a)()),d=Object(c.a)(),p=new Map,h={disableGeneration:!1,generateClassName:d,jss:f,sheetsCache:null,sheetsManager:p,sheetsRegistry:null},g=s.a.createContext(h);function v(e){var t=e.children,n=e.injectFirst,a=void 0!==n&&n,c=e.disableGeneration,f=void 0!==c&&c,d=Object(o.a)(e,["children","injectFirst","disableGeneration"]),p=s.a.useContext(g),h=Object(i.a)({},p,{disableGeneration:f},d);if(!h.jss.options.insertionPoint&&a&&"undefined"!=typeof window){if(!r){var v=document.head;r=document.createComment("mui-inject-first"),v.insertBefore(r,v.firstChild)}h.jss=Object(u.c)({plugins:Object(l.a)().plugins,insertionPoint:r})}return s.a.createElement(g.Provider,{value:h},t)}},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return h}));var r=n(77),i=n(60),o=n(50),a=n(338),s=n(47),c=n(149);function u(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function l(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function f(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,a=[t,n].concat(Object(o.a)(r)),s=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===a.indexOf(e)&&-1===s.indexOf(e.tagName)&&u(e,i)}))}function d(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function p(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(s.a)(e);return t.body===e?Object(c.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var u=Object(a.a)();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(l(o)+u,"px"),n=Object(s.a)(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(l(e)+u,"px")}))}var f=o.parentElement,d="HTML"===f.nodeName&&"scroll"===window.getComputedStyle(f)["overflow-y"]?f:o;r.push({value:d.style.overflow,key:"overflow",el:d}),d.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var h=function(){function e(){Object(r.a)(this,e),this.modals=[],this.containers=[]}return Object(i.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&u(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);f(t,e.mountNode,e.modalRef,r,!0);var i=d(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=d(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=p(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=d(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&u(e.modalRef,!0),f(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&u(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"OSDReferences",(function(){return r}));var r={get:function(e){return this.refs[e]},refs:{},set:function(e,t){this.refs[e]=t}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return w})),n.d(t,"c",(function(){return O})),n.d(t,"b",(function(){return S})),n.d(t,"d",(function(){return E})),n.d(t,"a",(function(){return C}));var r=n(10),i=n(672),o=n.n(i),a=n(326),s=n.n(a),c=n(35),u=n(45),l=n(148),f=n(76);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function g(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e){return void 0===e.parentNode?[]:void 0===e.parentNode.parentNode?[e.parentNode.id]:[].concat(g(m(e.parentNode)),[e.parentNode.id])}function y(e,t){return e.reduce((function(e,n){var r=[];r.push.apply(r,g(e));var i=t.reduce((function(e,t){return e||function(e,t){for(var n=e.getCanvasIds(),r=0;r<n.length;r+=1)if(c.d.normalisedUrlsMatch(n[r],t))return!0;return!1}(n.data,t)}),!1),o=n.nodes.length>0?y(n.nodes,t):[];return r.push.apply(r,g(o)),(i||o.length>0)&&r.push({containsVisibleCanvas:i,descendantsContainVisibleCanvas:o.length>0,id:n.id,leaf:0===n.nodes.length,parentIds:m(n)}),r}),[])}var b=Object(r.createSelector)([f.d,u.getVisibleCanvasIds],(function(e,t){return 0!==t.length&&e?y(e.nodes,t):[]})),w=Object(r.createSelector)([b],(function(e){return e.map((function(e){return e.id}))})),_=Object(r.createSelector)([b],(function(e){return e.reduce((function(e,t){return t.leaf||!t.descendantsContainVisibleCanvas?e:[].concat(g(e),[t.id])}),[])})),x=Object(r.createSelector)([b],(function(e){return e.reduce((function(e,t){return t.containsVisibleCanvas?[].concat(g(e),[t]):e}),[])}));function O(e,t,n){var r=t.companionWindowId,i=Object(l.getCompanionWindow)(e,{companionWindowId:r});return i.tocNodes?Object.keys(i.tocNodes).reduce((function(e,t){return i.tocNodes[t].expanded===n?[].concat(g(e),[t]):e}),[]):[]}function S(e,t){var n=t.companionWindowId,r=t.windowId,i=_(e,{companionWindowId:n,windowId:r}),a=O(e,{companionWindowId:n},!0),c=O(e,{companionWindowId:n},!1);return s.a.apply(void 0,[o()(a,i)].concat(g(c)))}function E(e,t){var n=h({},t),r=x(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n)),i=O(e,n,!1);if(r&&r.length>0){for(var o=0;o<r[0].parentIds.length;o+=1)if(-1!==i.indexOf(r[0].parentIds[o]))return r[0].parentIds[o];return r[0].id}return null}var C=Object(r.createSelector)([f.d],(function(e){return e&&e.nodes&&e.nodes.length>0?"tableOfContents":"item"}))},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n(43);t.a=Object(i.a)(r.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")},function(e,t,n){"use strict";var r=n(0),i=n(43);t.a=Object(i.a)(r.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},function(e,t,n){var r=n(650)("set",n(652));r.placeholder=n(447),e.exports=r},function(e,t,n){!function(e,t,n,r){"use strict";function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t,n=1;n<arguments.length;n++)t=null==arguments[n]?{}:arguments[n],n%2?i(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function a(e){var t=e.srcList,r=e.imgPromise,i=void 0===r?c({decode:!0}):r,a=e.useSuspense,s=void 0===a||a,p=n.useState(!0)[1],h=u(l(t)),g=h.join("");if(f[g]||(f[g]={promise:d(h,i),cache:"pending",error:null}),f[g].promise.then((function(e){f[g]=o(o({},f[g]),{},{cache:"resolved",src:e}),s||p(!1)})).catch((function(e){f[g]=o(o({},f[g]),{},{cache:"rejected",error:e}),s||p(!1)})),"resolved"===f[g].cache)return{src:f[g].src,isLoading:!1,error:null};if("rejected"===f[g].cache){if(s)throw f[g].error;return{isLoading:!1,error:f[g].error,src:void 0}}if(s)throw f[g].promise;return{isLoading:!0,src:void 0,error:null}}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var s="default"in n?n.default:n;r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;var c=function(e){var t=e.decode,n=e.crossOrigin,r=void 0===n?"":n;return function(e){return new Promise((function(n,i){var o=new Image;r&&(o.crossOrigin=r),o.onload=function(){(void 0===t||t)&&o.decode?o.decode().then(n).catch(i):n()},o.onerror=i,o.src=e}))}},u=function(e){return e.filter((function(e){return e}))},l=function(e){return Array.isArray(e)?e:[e]},f={},d=function(e,t){var n=!1;return new Promise((function(r,i){var o=function(e){return t(e).then((function(){n=!0,r(e)}))};e.reduce((function(e,t){return e.catch((function(){if(!n)return o(t)}))}),o(e.shift())).catch(i)}))},p=function(e){return e};e.Img=function(e){var n=e.decode,r=e.src,i=void 0===r?[]:r,o=e.loader,u=void 0===o?null:o,l=e.unloader,f=void 0===l?null:l,d=e.container,h=void 0===d?p:d,g=e.loaderContainer,v=void 0===g?p:g,m=e.unloaderContainer,y=void 0===m?p:m,b=e.imgPromise,w=e.crossorigin,_=e.useSuspense,x=void 0!==_&&_,O=t(e,["decode","src","loader","unloader","container","loaderContainer","unloaderContainer","imgPromise","crossorigin","useSuspense"]),S=a({srcList:i,imgPromise:b=b||c({decode:!(void 0!==n)||n,crossOrigin:w}),useSuspense:x}),E=S.src,C=S.isLoading;return E?h(s.createElement("img",Object.assign({src:E},O))):!x&&C?v(u):!x&&f?y(f):null},e.useImage=a,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(591),n(0),n(134))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return null!==e&&"object"===r(e)&&e.hasOwnProperty("current")}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(7),i=n(9),o=n(1175),a=n(5),s=n(8),c=n(558),u=n(0),l=n.n(u),f=n(140),d=n(711),p=n(1),h=n(95),g=n(53),v=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function m(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||v(r)&&v(i)))return!1;var r,i;return!0}var y=function(e,t){var n;void 0===t&&(t=m);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}},b=(n(58),"object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()});function w(e){cancelAnimationFrame(e.id)}function _(e,t){var n=b();var r={id:requestAnimationFrame((function i(){b()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var x=null;function O(e){if(void 0===e&&(e=!1),null===x||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?x="positive-descending":(t.scrollLeft=1,x=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),x}return x}var S=function(e,t){return e};function E(e){var t,n,r=e.getItemOffset,i=e.getEstimatedTotalSize,o=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,c=e.getStopIndexForStartIndex,l=e.initInstanceProps,f=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return n=t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=l(n.props,Object(g.a)(Object(g.a)(n))),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:Object(g.a)(Object(g.a)(n)),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=y((function(e,t,r,i){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:i})})),n._callOnScroll=void 0,n._callOnScroll=y((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,i=n.props,a=i.direction,s=i.itemSize,c=i.layout,u=n._getItemStyleCache(f&&s,f&&c,f&&a);if(u.hasOwnProperty(e))t=u[e];else{var l=r(n.props,e,n._instanceProps),d=o(n.props,e,n._instanceProps),p="horizontal"===a||"horizontal"===c,h="rtl"===a,g=p?l:0;u[e]=t={position:"absolute",left:h?void 0:g,right:h?g:void 0,top:p?0:l,height:p?"100%":d,width:p?d:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=y((function(e,t,n){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===i)return null;var t=n.props.direction,a=i;if("rtl"===t)switch(O()){case"negative":a=-i;break;case"positive-descending":a=o-r-i}return a=Math.max(0,Math.min(a,o-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<i?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;n.setState((function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&w(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=_(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}Object(h.a)(t,e),t.getDerivedStateFromProps=function(e,t){return C(e,t),d(e),null};var n=t.prototype;return n.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},n.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props.itemCount,r=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1)),this.scrollTo(a(this.props,e,t,r,this._instanceProps))},n.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},n.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(O()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},n.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&w(this._resetIsScrollingTimeoutId)},n.render=function(){var e=this.props,t=e.children,n=e.className,r=e.direction,o=e.height,a=e.innerRef,s=e.innerElementType,c=e.innerTagName,l=e.itemCount,f=e.itemData,d=e.itemKey,h=void 0===d?S:d,g=e.layout,v=e.outerElementType,m=e.outerTagName,y=e.style,b=e.useIsScrolling,w=e.width,_=this.state.isScrolling,x="horizontal"===r||"horizontal"===g,O=x?this._onScrollHorizontal:this._onScrollVertical,E=this._getRangeToRender(),C=E[0],k=E[1],T=[];if(l>0)for(var j=C;j<=k;j++)T.push(Object(u.createElement)(t,{data:f,key:h(j,f),index:j,isScrolling:b?_:void 0,style:this._getItemStyle(j)}));var P=i(this.props,this._instanceProps);return Object(u.createElement)(v||m||"div",{className:n,onScroll:O,ref:this._outerRefSetter,style:Object(p.a)({position:"relative",height:o,width:w,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:r},y)},Object(u.createElement)(s||c||"div",{children:T,ref:a,style:{height:x?"100%":P,pointerEvents:_?"none":void 0,width:x?P:"100%"}}))},n._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,c=o.scrollUpdateWasRequested;this._callOnScroll(a,s,c)}},n._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var u=s(this.props,a,this._instanceProps),l=c(this.props,u,a,this._instanceProps),f=i&&"backward"!==o?1:Math.max(1,n),d=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,u-f),Math.max(0,Math.min(t-1,l+d)),u,l]},t}(u.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var C=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},k=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var c=o+1;c<=t;c++){var u=r(c);i[c]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return i[t]},T=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=k(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},j=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&k(e,n,t).offset<r;)n+=o,o*=2;return T(e,t,Math.min(n,i-1),Math.floor(n/2),r)},P=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},I=E({getItemOffset:function(e,t,n){return k(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:P,getOffsetForIndexAndAlignment:function(e,t,n,r,i){var o=e.direction,a=e.height,s=e.layout,c=e.width,u="horizontal"===o||"horizontal"===s?c:a,l=k(e,t,i),f=P(e,i),d=Math.max(0,Math.min(f-u,l.offset)),p=Math.max(0,l.offset-u+l.size);switch("smart"===n&&(n=r>=p-u&&r<=d+u?"auto":"center"),n){case"start":return d;case"end":return p;case"center":return Math.round(p+(d-p)/2);case"auto":default:return r>=p&&r<=d?r:r<p?p:d}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?T(e,t,i,0,n):j(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,c=e.width,u="horizontal"===i||"horizontal"===s?c:o,l=k(e,t,r),f=n+u,d=l.offset+l.size,p=t;p<a-1&&d<f;)p++,d+=k(e,p,r).size;return p},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});var R=n(23),A=n.n(R),M=n(207),D=n(26),N=n(45),L=n(123),z=n(14);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var i=K(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return q(this,n)}}function q(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return G(e)}function G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&V(e,t)}(o,e);var t,n,r,i=U(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).setCanvas=t.setCanvas.bind(G(t)),t}return t=o,(n=[{key:"setCanvas",value:function(e){var t=this.props.setCanvas;t(e.currentTarget.dataset.canvasId)}},{key:"currentCanvasClass",value:function(e){var t=this.props.index;return e.includes(t)?"current-canvas-grouping":""}},{key:"render",value:function(){var e=this.props,t=e.index,n=e.style,r=e.data,i=e.classes,o=e.currentCanvasId,a=r.canvasGroupings,s=r.position,c=r.height,u=a[t];return l.a.createElement("div",{style:F(F({},n),{},{boxSizing:"content-box",height:Number.isInteger(n.height)?n.height-8:null,left:n.left+8,top:n.top+8,width:Number.isInteger(n.width)?n.width-8:null}),className:Object(z.a)("thumbnail-nav-container"),role:"gridcell","aria-colindex":t+1},l.a.createElement("div",{role:"button","data-canvas-id":u[0].id,"data-canvas-index":u[0].index,onKeyUp:this.setCanvas,onClick:this.setCanvas,tabIndex:-1,style:{height:"far-right"===s?"auto":"".concat(c-8,"px"),width:"far-bottom"===s?"auto":"".concat(n.width,"px")},className:A()(Object(z.a)(["thumbnail-nav-canvas","thumbnail-nav-canvas-".concat(t),this.currentCanvasClass(u.map((function(e){return e.index})))]),i.canvas,W({},i.currentCanvas,u.map((function(e){return e.id})).includes(o)))},u.map((function(e,t){return l.a.createElement(L.a,{key:e.id,resource:e,labelled:!0,maxHeight:"far-right"===s?n.height-12:c-12,variant:"inside"})}))))}}])&&H(t.prototype,n),r&&H(t,r),o}(u.PureComponent),Z=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{canvas:{"&$currentCanvas":{outline:"2px solid ".concat(e.palette.primary.main),outlineOffset:"3px"},"&:hover":{outline:"9px solid ".concat(e.palette.action.hover),outlineOffset:"-2px"},boxSizing:"border-box",color:e.palette.common.white,cursor:"pointer",display:"inline-block",outline:0,whiteSpace:"nowrap"},currentCanvas:{}}})),Object(i.b)((function(e,t){var n=t.data;return{currentCanvasId:(Object(N.getCurrentCanvas)(e,{windowId:n.windowId})||{}).id}}),(function(e,t){var n=t.data;return{setCanvas:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e(c.a.apply(D,[n.windowId].concat(r)))}}})),Object(s.a)("ThumbnailCanvasGrouping"))($);function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=te(e);if(t){var i=te(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return J(this,n)}}function J(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ee(e)}function ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(o,e);var t,n,r,i=Y(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).scrollbarSize=15,t.spacing=8,t.calculateScaledSize=t.calculateScaledSize.bind(ee(t)),t.itemCount=t.itemCount.bind(ee(t)),t.handleKeyUp=t.handleKeyUp.bind(ee(t)),t.nextCanvas=t.nextCanvas.bind(ee(t)),t.previousCanvas=t.previousCanvas.bind(ee(t)),t.gridRef=l.a.createRef(),t}return t=o,(n=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.canvasIndex,r=t.position,i=t.view;if(e.view!==i&&"off"!==r&&this.gridRef.current.resetAfterIndex(0),e.canvasIndex!==n){var o=n;"book"===i&&(o=Math.ceil(o/2)),this.gridRef.current.scrollToItem(o,"center")}}},{key:"handleKeyUp",value:function(e){var t="ArrowRight",n="ArrowLeft";switch("far-right"===this.props.position&&(t="ArrowDown",n="ArrowUp"),e.key){case t:this.nextCanvas();break;case n:this.previousCanvas()}}},{key:"calculateScaledSize",value:function(e){var t=this.props,n=t.thumbnailNavigation,r=t.canvasGroupings,i=t.position,o=r[e]||[],a=new M.a(o).worldBounds();switch(i){case"far-right":var s=Math.floor(this.calculatingWidth(o.length)*a[3]/a[2]);return Number.isInteger(s)?s+this.spacing:n.width+this.spacing;default:return 0===a[3]?n.width+this.spacing:Math.ceil((n.height-this.scrollbarSize-this.spacing-4)*a[2]/a[3])}}},{key:"calculatingWidth",value:function(e){var t=this.props.thumbnailNavigation;return 1===e?t.width:2*t.width}},{key:"rightWidth",value:function(){var e=this.props,t=e.view,n=e.thumbnailNavigation;switch(t){case"book":return 2*n.width;default:return n.width}}},{key:"style",value:function(){var e=this.props,t=e.position,n=e.thumbnailNavigation;switch(t){case"far-right":return{height:"100%",minHeight:0,width:"".concat(this.rightWidth()+this.scrollbarSize+this.spacing,"px")};default:return{height:"".concat(n.height,"px"),width:"100%"}}}},{key:"areaHeight",value:function(e){var t=this.props,n=t.position,r=t.thumbnailNavigation;switch(n){case"far-right":return e;default:return r.height}}},{key:"itemCount",value:function(){return this.props.canvasGroupings.length}},{key:"nextCanvas",value:function(){var e=this.props,t=e.hasNextCanvas,n=e.setNextCanvas;t&&n()}},{key:"previousCanvas",value:function(){var e=this.props,t=e.hasPreviousCanvas,n=e.setPreviousCanvas;t&&n()}},{key:"render",value:function(){var e=this,t=this.props,n=t.t,r=t.canvasGroupings,i=t.classes,o=t.position,a=t.thumbnailNavigation,s=t.viewingDirection,c=t.windowId;if("off"===o)return l.a.createElement(l.a.Fragment,null);var u="right-to-left"===s?"rtl":"ltr",p={canvasGroupings:r,height:a.height-this.spacing-this.scrollbarSize,position:o,windowId:c};return l.a.createElement(f.a,{className:A()(Object(z.a)("thumb-navigation"),i.thumbNavigation),"aria-label":n("thumbnailNavigation"),square:!0,elevation:0,style:this.style(),tabIndex:0,onKeyUp:this.handleKeyUp,role:"grid"},l.a.createElement("div",{role:"row",style:{height:"100%",width:"100%"}},l.a.createElement(d.a,{defaultHeight:100,defaultWidth:400},(function(t){var n=t.height,r=t.width;return l.a.createElement(I,{direction:u,height:e.areaHeight(n),itemCount:e.itemCount(),itemSize:e.calculateScaledSize,width:r,layout:"far-bottom"===o?"horizontal":"vertical",itemData:p,ref:e.gridRef},Z)}))))}}])&&X(t.prototype,n),r&&X(t,r),o}(u.Component);ne.defaultProps={hasNextCanvas:!1,hasPreviousCanvas:!1,setNextCanvas:function(){},setPreviousCanvas:function(){},view:void 0,viewingDirection:""};var re=n(76),ie=n(148),oe=n(38),ae=n(88),se=n(206),ce=Object(r.compose)(Object(a.a)((function(e){return{thumbNavigation:{"&:focus":{boxShadow:0,outline:0}}}})),Object(o.a)(),Object(i.b)((function(e,t){var n=t.windowId;return{canvasGroupings:Object(N.getCanvasGroupings)(e,{windowId:n}),canvasIndex:Object(re.a)(e,{windowId:n}),hasNextCanvas:!!Object(N.getNextCanvasGrouping)(e,{windowId:n}),hasPreviousCanvas:!!Object(N.getPreviousCanvasGrouping)(e,{windowId:n}),position:Object(ie.getCompanionWindow)(e,{companionWindowId:Object(oe.e)(e,{windowId:n}).thumbnailNavigationId}).position,thumbnailNavigation:Object(ae.a)(e).thumbnailNavigation,view:Object(se.f)(e,{windowId:n}),viewingDirection:Object(re.e)(e,{windowId:n})}}),(function(e,t){var n=t.windowId;return{setNextCanvas:function(){return e(c.b(n))},setPreviousCanvas:function(){return e(c.c(n))}}})),Object(s.a)("ThumbnailNavigation"))(ne),ue=n(667),le=n(96),fe=n(560),de=n(351),pe=n.n(de),he=n(352),ge=n.n(he),ve=n(34);function me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function be(e,t){return(be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function we(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xe(e);if(t){var i=xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _e(this,n)}}function _e(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&be(e,t)}(o,e);var t,n,r,i=we(o);function o(){return me(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.displayAll,n=e.displayAllDisabled,r=e.t,i=e.toggleAnnotationDisplay;return l.a.createElement(ve.a,{"aria-label":r(t?"displayNoAnnotations":"highlightAllAnnotations"),onClick:i,disabled:n,size:"small"},t?l.a.createElement(pe.a,null):l.a.createElement(ge.a,null))}}])&&ye(t.prototype,n),r&&ye(t,r),o}(u.Component),Se=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e,t){var n=t.windowId;return{displayAll:Object(oe.e)(e,{windowId:n}).highlightAllAnnotations,displayAllDisabled:Object(ue.a)(e,{windowId:n}).length<2}}),(function(e,t){var n=t.windowId;return{toggleAnnotationDisplay:function(){e(fe.h(n))}}})),Object(s.a)("AnnotationSettings"))(Oe),Ee=n(3),Ce=n(1177),ke=n(454),Te=n(579),je=n(578),Pe=n(72);function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Re(e,t){return(Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=De(e);if(t){var i=De(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Me(this,n)}}function Me(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function De(e){return(De=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Re(e,t)}(o,e);var t,n,r,i=Ae(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).scrollToRef=l.a.createRef(),t}return t=o,(n=[{key:"componentDidMount",value:function(){this.props.scrollTo&&this.scrollToElement()}},{key:"componentDidUpdate",value:function(e){var t=this.props.scrollTo;t&&e.scrollTo!==t&&this.scrollToElement()}},{key:"containerBoundingRect",value:function(){var e=this.props.containerRef;return e&&e.current&&e.current.domEl?e.current.domEl.getBoundingClientRect():{}}},{key:"scrollToBoundingRect",value:function(){return this.elementToScrollTo()?this.elementToScrollTo().getBoundingClientRect():{}}},{key:"elementToScrollTo",value:function(){return this.scrollToRef&&this.scrollToRef.current?this.scrollToRef.current:null}},{key:"scrollabelContainer",value:function(){var e=this.props.containerRef;return e&&e.current&&e.current.domEl?e.current.domEl.getElementsByClassName("mirador-scrollto-scrollable")[0]:null}},{key:"elementIsVisible",value:function(){var e=this.props.offsetTop;return!(this.scrollToBoundingRect().top<this.containerBoundingRect().top+e||this.scrollToBoundingRect().bottom>this.containerBoundingRect().bottom)}},{key:"scrollToElement",value:function(){var e=this.props,t=e.offsetTop;if(e.scrollTo&&this.elementToScrollTo()&&!this.elementIsVisible()&&this.scrollabelContainer()){var n=this.elementToScrollTo().offsetTop-this.containerBoundingRect().height/2+t;this.scrollabelContainer().scrollTo(0,n)}}},{key:"render",value:function(){var e=this.props,t=e.children;return e.scrollTo?l.a.createElement("div",{ref:this.scrollToRef},t):t}}])&&Ie(t.prototype,n),r&&Ie(t,r),o}(u.Component);function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=He(e);if(t){var i=He(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fe(this,n)}}function Fe(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return We(e)}function We(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ne.defaultProps={offsetTop:0};var Ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ze(e,t)}(o,e);var t,n,r,i=Be(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleClick=t.handleClick.bind(We(t)),t.handleAnnotationHover=t.handleAnnotationHover.bind(We(t)),t.handleAnnotationBlur=t.handleAnnotationBlur.bind(We(t)),t}return t=o,(n=[{key:"handleClick",value:function(e,t){var n=this.props,r=n.deselectAnnotation,i=n.selectAnnotation,o=n.selectedAnnotationId,a=n.windowId;o===t.id?r(a,t.id):i(a,t.id)}},{key:"handleAnnotationHover",value:function(e){var t=this.props;(0,t.hoverAnnotation)(t.windowId,[e.id])}},{key:"handleAnnotationBlur",value:function(){var e=this.props;(0,e.hoverAnnotation)(e.windowId,[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.annotations,r=t.classes,i=t.index,o=t.label,a=t.selectedAnnotationId,s=t.t,c=t.totalSize,u=t.listContainerComponent,f=t.htmlSanitizationRuleSet,d=t.hoveredAnnotationIds,p=t.containerRef;return 0===n.length?l.a.createElement(l.a.Fragment,null):l.a.createElement(l.a.Fragment,null,l.a.createElement(le.a,{className:r.sectionHeading,variant:"overline"},s("annotationCanvasLabel",{context:"".concat(i+1,"/").concat(c),label:o})),l.a.createElement(ke.a,{autoFocusItem:!0,variant:"selectedMenu"},n.map((function(t){return l.a.createElement(Ne,{containerRef:p,key:"".concat(t.id,"-scroll"),offsetTop:96,scrollTo:a===t.id},l.a.createElement(Te.a,{button:!0,component:u,className:Object(Ee.a)(r.annotationListItem,(n={},i=r.hovered,o=d.includes(t.id),i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o,n)),key:t.id,annotationid:t.id,selected:a===t.id,onClick:function(n){return e.handleClick(n,t)},onFocus:function(){return e.handleAnnotationHover(t)},onBlur:e.handleAnnotationBlur,onMouseEnter:function(){return e.handleAnnotationHover(t)},onMouseLeave:e.handleAnnotationBlur},l.a.createElement(je.a,{primaryTypographyProps:{variant:"body2"}},l.a.createElement(Pe.a,{ruleSet:f,htmlString:t.content}),l.a.createElement("div",null,t.tags.map((function(e){return l.a.createElement(Ce.a,{size:"small",variant:"outlined",label:e,id:e,className:r.chip,key:e.toString()})}))))));var n,i,o}))))}}])&&Le(t.prototype,n),r&&Le(t,r),o}(u.Component);Ve.defaultProps={annotations:[],classes:{},containerRef:void 0,hoveredAnnotationIds:[],htmlSanitizationRuleSet:"iiif",listContainerComponent:"li",selectedAnnotationId:void 0};var Ue={deselectAnnotation:fe.a,hoverAnnotation:fe.b,selectAnnotation:fe.g},qe=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{annotationListItem:{"&$hovered":{backgroundColor:e.palette.action.hover},"&:hover,&:focus":{backgroundColor:e.palette.action.hover},borderBottom:"0.5px solid ".concat(e.palette.divider),cursor:"pointer",whiteSpace:"normal"},chip:{backgroundColor:e.palette.background.paper,marginRight:e.spacing(.5),marginTop:e.spacing(1)},hovered:{},sectionHeading:{paddingLeft:e.spacing(2),paddingRight:e.spacing(1),paddingTop:e.spacing(2)}}})),Object(i.b)((function(e,t){var n,r=t.canvasId,i=t.windowId;return{annotations:(n=Object(ue.b)(e,{canvasId:r,windowId:i}),n.map((function(e,t){return{content:e.chars,id:e.id,tags:e.tags,targetId:e.targetId}}))),htmlSanitizationRuleSet:Object(ae.a)(e).annotations.htmlSanitizationRuleSet,label:Object(N.getCanvasLabel)(e,{canvasId:r,windowId:i}),selectedAnnotationId:Object(ue.e)(e,{windowId:i})}}),Ue),Object(s.a)("CanvasAnnotations"))(Ve),Ge=n(62);function Ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $e(e,t){return($e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qe(e);if(t){var i=Qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xe(this,n)}}function Xe(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qe(e){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ye=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$e(e,t)}(o,e);var t,n,r,i=Ze(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).containerRef=l.a.createRef(),t}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props,n=t.annotationCount,r=t.classes,i=t.canvasIds,o=t.t,a=t.windowId,s=t.id;return l.a.createElement(Ge.default,{title:o("annotations"),paperClassName:Object(z.a)("window-sidebar-annotation-panel"),windowId:a,id:s,ref:this.containerRef,otherRef:this.containerRef,titleControls:l.a.createElement(Se,{windowId:a})},l.a.createElement("div",{className:r.section},l.a.createElement(le.a,{component:"p",variant:"subtitle2"},o("showingNumAnnotations",{count:n,number:n}))),i.map((function(t,n){return l.a.createElement(qe,{canvasId:t,containerRef:e.containerRef,key:t,index:n,totalSize:i.length,windowId:a})})))}}])&&Ke(t.prototype,n),r&&Ke(t,r),o}(u.Component);Ye.defaultProps={canvasIds:[],t:function(e){return e}};var Je=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{section:{borderBottom:".5px solid ".concat(e.palette.section_divider),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(1),paddingTop:e.spacing(2)}}})),Object(i.b)((function(e,t){var n=t.windowId;return{annotationCount:Object(ue.a)(e,{windowId:n}).length,canvasIds:Object(N.getVisibleCanvasIds)(e,{windowId:n})}}),null),Object(s.a)("WindowSideBarAnnotationsPanel"))(Ye),et=n(531),tt=n(90),nt=n(124),rt=n(151),it=n(37);function ot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function at(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function st(e,t){return(st=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ct(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lt(e);if(t){var i=lt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ut(this,n)}}function ut(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&st(e,t)}(o,e);var t,n,r,i=ct(o);function o(){return ot(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.canvasDescription,n=e.canvasLabel,r=e.canvasMetadata,i=e.id,o=e.index,a=e.t,s=e.totalSize;return l.a.createElement(nt.a,{id:"".concat(i,"-currentItem-").concat(o),label:a("currentItem",{context:"".concat(o+1,"/").concat(s)})},n&&l.a.createElement(le.a,{"aria-labelledby":"".concat(i,"-currentItem-").concat(o," ").concat(i,"-currentItem-").concat(o,"-heading"),id:"".concat(i,"-currentItem-").concat(o,"-heading"),variant:"h4",component:"h5"},n),t&&l.a.createElement(le.a,{variant:"body1"},l.a.createElement(Pe.a,{htmlString:t,ruleSet:"iiif"})),r&&r.length>0&&l.a.createElement(rt.a,{labelValuePairs:r}),l.a.createElement(it.a,this.props))}}])&&at(t.prototype,n),r&&at(t,r),o}(u.Component);ft.defaultProps={canvasDescription:null,canvasLabel:null,canvasMetadata:[],index:1,t:function(e){return e},totalSize:1};var dt=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e,t){var n=t.canvasId,r=t.id,i=t.windowId;return{canvasDescription:Object(N.getCanvasDescription)(e,{canvasId:n,companionWindowId:r,windowId:i}),canvasLabel:Object(N.getCanvasLabel)(e,{canvasId:n,companionWindowId:r,windowId:i}),canvasMetadata:Object(tt.a)(Object(N.getCanvas)(e,{canvasId:n,companionWindowId:r,windowId:i}))}})),Object(s.a)("CanvasInfo"))(ft),pt=n(456),ht=n(1137);function gt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mt(e,t){return(mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wt(e);if(t){var i=wt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bt(this,n)}}function bt(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wt(e){return(wt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mt(e,t)}(o,e);var t,n,r,i=yt(o);function o(){return gt(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.availableLocales,n=e.classes,r=e.locale,i=e.setLocale;return!i||t.length<2?l.a.createElement(l.a.Fragment,null):l.a.createElement(pt.a,null,l.a.createElement(ht.a,{MenuProps:{anchorOrigin:{horizontal:"left",vertical:"bottom"},getContentAnchorEl:null},displayEmpty:!0,value:r,onChange:function(e){i(e.target.value)},name:"locale",classes:{select:n.select},className:n.selectEmpty},t.map((function(e){return l.a.createElement(Te.a,{key:e,value:e},l.a.createElement(le.a,{variant:"body2"},e))}))))}}])&&vt(t.prototype,n),r&&vt(t,r),o}(u.Component);_t.defaultProps={availableLocales:[],classes:{},locale:"",setLocale:void 0};var xt=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{select:{"&:focus":{backgroundColor:e.palette.background.paper}},selectEmpty:{backgroundColor:e.palette.background.paper}}})))(_t),Ot=n(369),St=n(555),Et=n(571),Ct=n(353),kt=n.n(Ct);function Tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jt(e,t){return(jt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=At(e);if(t){var i=At(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return It(this,n)}}function It(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Rt(e)}function Rt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function At(e){return(At=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jt(e,t)}(o,e);var t,n,r,i=Pt(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).openCollectionDialog=t.openCollectionDialog.bind(Rt(t)),t}return t=o,(n=[{key:"openCollectionDialog",value:function(){var e=this.props,t=e.collectionPath,n=e.showCollectionDialog,r=e.windowId;n(t[t.length-1],t.slice(0,-1),r)}},{key:"render",value:function(){var e=this.props,t=e.collectionLabel,n=e.collectionPath,r=e.id,i=e.t;return 0===n.length?null:l.a.createElement(nt.a,{id:"".concat(r,"-collection"),label:i("collection")},t&&l.a.createElement(le.a,{"aria-labelledby":"".concat(r,"-resource ").concat(r,"-resource-heading"),id:"".concat(r,"-resource-heading"),variant:"h4"},t),l.a.createElement(Et.a,{color:"primary",onClick:this.openCollectionDialog,startIcon:l.a.createElement(kt.a,null)},i("showCollection")))}}])&&Tt(t.prototype,n),r&&Tt(t,r),o}(u.Component);Mt.defaultProps={collectionLabel:null,collectionPath:[],t:function(e){return e},windowId:null};var Dt={showCollectionDialog:St.j},Nt=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e,t){t.id;var n=t.windowId,r=(Object(oe.e)(e,{windowId:n})||{}).collectionPath,i=r[r.length-1];return{collectionLabel:Object(tt.o)(e,{manifestId:i}),collectionPath:r}}),Dt),Object(s.a)("CollectionInfo"))(Mt),Lt=n(1162);function zt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ft(e,t){return(Ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vt(e);if(t){var i=Vt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ht(this,n)}}function Ht(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vt(e){return(Vt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ut=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ft(e,t)}(o,e);var t,n,r,i=Wt(o);function o(){return zt(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.homepage,r=e.manifestUrl,i=e.renderings,o=e.seeAlso,a=e.id,s=e.t;return l.a.createElement(nt.a,{id:"".concat(a,"-related"),label:s("related")},l.a.createElement(le.a,{"aria-labelledby":"".concat(a,"-related ").concat(a,"-related-heading"),id:"".concat(a,"-related-heading"),variant:"h4",component:"h5"},s("links")),l.a.createElement("dl",{className:A()(Object(z.a)("label-value-metadata"),t.labelValueMetadata)},n&&l.a.createElement(l.a.Fragment,null,l.a.createElement(le.a,{variant:"subtitle2",component:"dt"},s("iiif_homepage")),n.map((function(e){return l.a.createElement(le.a,{key:e.value,variant:"body1",component:"dd"},l.a.createElement(Lt.a,{target:"_blank",rel:"noopener noreferrer",href:e.value},e.label||e.value))}))),i&&i.length>0&&l.a.createElement(l.a.Fragment,null,l.a.createElement(le.a,{variant:"subtitle2",component:"dt"},s("iiif_renderings")),i.map((function(e){return l.a.createElement(le.a,{key:e.value,variant:"body1",component:"dd"},l.a.createElement(Lt.a,{target:"_blank",rel:"noopener noreferrer",href:e.value},e.label||e.value))}))),o&&l.a.createElement(l.a.Fragment,null,l.a.createElement(le.a,{variant:"subtitle2",component:"dt"},s("iiif_seeAlso")),o.map((function(e){return l.a.createElement(le.a,{key:e.value,variant:"body1",component:"dd"},l.a.createElement(Lt.a,{target:"_blank",rel:"noopener noreferrer",href:e.value},e.label||e.value),e.format&&l.a.createElement(le.a,{component:"span"}," (".concat(e.format,")")))}))),r&&l.a.createElement(l.a.Fragment,null,l.a.createElement(le.a,{variant:"subtitle2",component:"dt"},s("iiif_manifest")),l.a.createElement(le.a,{variant:"body1",component:"dd"},l.a.createElement(Lt.a,{target:"_blank",rel:"noopener noreferrer",href:r},r)))),l.a.createElement(it.a,this.props))}}])&&Bt(t.prototype,n),r&&Bt(t,r),o}(u.Component);Ut.defaultProps={homepage:null,manifestUrl:null,renderings:null,seeAlso:null,t:function(e){return e}};var qt=Object(r.compose)(Object(a.a)({labelValueMetadata:{"& dd":{marginBottom:".5em",marginLeft:"0"}}}),Object(o.a)(),Object(i.b)((function(e,t){t.id;var n=t.windowId;return{homepage:Object(tt.e)(e,{windowId:n}),manifestUrl:Object(tt.p)(e,{windowId:n}),renderings:Object(tt.k)(e,{windowId:n}),seeAlso:Object(tt.j)(e,{windowId:n})}})),Object(s.a)("ManifestRelatedLinks"))(Ut);function Gt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $t(e,t){return($t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qt(e);if(t){var i=Qt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xt(this,n)}}function Xt(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qt(e){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$t(e,t)}(o,e);var t,n,r,i=Zt(o);function o(){return Gt(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.windowId,n=e.id,r=e.canvasIds,i=e.classes,o=e.collectionPath,a=e.t,s=e.locale,c=e.setLocale,u=e.availableLocales,f=e.showLocalePicker;return l.a.createElement(Ge.default,{title:a("aboutThisItem"),paperClassName:Object(z.a)("window-sidebar-info-panel"),windowId:t,id:n,titleControls:f&&l.a.createElement(xt,{locale:s,setLocale:c,availableLocales:u})},r.map((function(e,o){return l.a.createElement("div",{key:e,className:i.section},l.a.createElement(dt,{id:n,canvasId:e,index:o,totalSize:r.length,windowId:t}))})),o.length>0&&l.a.createElement("div",{className:i.section},l.a.createElement(Nt,{id:n,windowId:t})),l.a.createElement("div",{className:i.section},l.a.createElement(Ot.a,{id:n,windowId:t})),l.a.createElement("div",{className:i.section},l.a.createElement(qt,{id:n,windowId:t})))}}])&&Kt(t.prototype,n),r&&Kt(t,r),o}(u.Component);Yt.defaultProps={availableLocales:[],canvasIds:[],classes:{},collectionPath:[],locale:"",setLocale:void 0,showLocalePicker:!1,t:function(e){return e}};var Jt=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{section:{borderBottom:".5px solid ".concat(e.palette.section_divider),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(1),paddingTop:e.spacing(2)}}})),Object(i.b)((function(e,t){var n=t.id,r=t.windowId;return{availableLocales:Object(tt.r)(e,{companionWindowId:n,windowId:r}),canvasIds:Object(N.getVisibleCanvasIds)(e,{windowId:r}),collectionPath:(Object(oe.e)(e,{windowId:r})||{}).collectionPath,locale:Object(ie.getCompanionWindow)(e,{companionWindowId:n}).locale||Object(tt.f)(e,{windowId:r}),showLocalePicker:Object(se.c)(e,{windowId:r}).showLocalePicker}}),(function(e,t){var n=t.windowId,r=t.id;return{setLocale:function(t){return e(et.e(n,r,{locale:t}))}}})),Object(s.a)("WindowSideBarInfoPanel"))(Yt),en=n(1173),tn=n(1165),nn=n(1121),rn=n(701),on=n.n(rn),an=n(700),sn=n.n(an),cn=n(702),un=n.n(cn),ln=n(48);function fn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pn(e,t){return(pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vn(e);if(t){var i=vn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gn(this,n)}}function gn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pn(e,t)}(o,e);var t,n,r,i=hn(o);function o(){return fn(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.label;return l.a.createElement(l.a.Fragment,null,l.a.createElement(le.a,{className:A()(t.label),variant:"body1"},n))}}])&&dn(t.prototype,n),r&&dn(t,r),o}(u.Component),yn=Object(r.compose)(Object(a.a)((function(e){return{label:{paddingLeft:e.spacing(1)}}})),Object(o.a)(),Object(i.b)(null,null),Object(s.a)("SidebarIndexItem"))(mn);function bn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _n(e,t){return(_n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sn(e);if(t){var i=Sn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return On(this,n)}}function On(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sn(e){return(Sn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var En=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_n(e,t)}(o,e);var t,n,r,i=xn(o);function o(){return bn(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.canvas,r=e.height,i=e.label,o=e.width;return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{style:{minWidth:50}},l.a.createElement(L.a,{label:i,resource:n,className:A()(t.clickable),maxHeight:r,maxWidth:o})),l.a.createElement(le.a,{className:A()(t.label),variant:"body1"},i))}}])&&wn(t.prototype,n),r&&wn(t,r),o}(u.Component);function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}En.defaultProps={height:void 0,width:void 0};var Tn=Object(r.compose)(Object(a.a)((function(e){return{label:{paddingLeft:e.spacing(1)}}})),Object(o.a)(),Object(i.b)((function(e,t){t.data;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(n),!0).forEach((function(t){kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Object(ae.a)(e).canvasNavigation||{})}),null),Object(s.a)("SidebarIndexThumbnail"))(En);function jn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function In(e,t){return(In=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mn(e);if(t){var i=Mn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return An(this,n)}}function An(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Mn(e){return(Mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&In(e,t)}(o,e);var t,n,r,i=Rn(o);function o(){return jn(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"getIdAndLabelOfCanvases",value:function(){return this.props.canvases.map((function(e,t){return{id:e.id,label:new ln.a(e).getLabel()}}))}},{key:"render",value:function(){var e,t=this.props,n=t.canvases,r=t.classes,i=t.containerRef,o=t.selectedCanvasIds,a=t.setCanvas,s=t.variant,c=t.windowId,u=this.getIdAndLabelOfCanvases(n);switch(s){case"thumbnail":e=Tn;break;default:e=yn}return l.a.createElement(ke.a,{variant:"selectedMenu"},u.map((function(t,u){return l.a.createElement(Ne,{containerRef:i,key:"".concat(t.id,"-").concat(s),offsetTop:96,scrollTo:o.includes(t.id)},l.a.createElement(Te.a,{key:t.id,className:r.listItem,alignItems:"flex-start",onClick:function(){a(c,t.id)},button:!0,component:"li",selected:o.includes(t.id)},l.a.createElement(e,{label:t.label,canvas:n[u]})))})))}}])&&Pn(t.prototype,n),r&&Pn(t,r),o}(u.Component);Dn.defaultProps={selectedCanvasIds:[],variant:"item"};var Nn=Object(r.compose)(Object(a.a)((function(e){return{label:{paddingLeft:e.spacing(1)},listItem:{borderBottom:"0.5px solid ".concat(e.palette.divider),paddingRight:e.spacing(1)}}})),Object(o.a)(),Object(i.b)((function(e,t){var n=t.id,r=t.windowId;return{canvases:Object(N.getCanvases)(e,{windowId:r}),selectedCanvasIds:Object(N.getVisibleCanvasIds)(e,{windowId:r}),variant:Object(ie.getCompanionWindow)(e,{companionWindowId:n,windowId:r}).variant}}),(function(e,t){t.id,t.windowId;return{setCanvas:function(){return e(c.a.apply(D,arguments))}}})),Object(s.a)("SidebarIndexList"))(Dn),Ln=n(71),zn=n(41),Bn=n(4),Fn=(n(2),n(75));var Wn=u.createContext({});var Hn=function(e,t,n){for(var r=t;r<e.length;r+=1)if(n===e[r])return r;return-1},Vn=[],Un=[],qn=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.defaultCollapseIcon,a=e.defaultEndIcon,s=e.defaultExpanded,c=void 0===s?Vn:s,l=e.defaultExpandIcon,f=e.defaultParentIcon,d=e.defaultSelected,h=void 0===d?Un:d,g=e.disableSelection,v=void 0!==g&&g,m=e.multiSelect,y=void 0!==m&&m,b=e.expanded,w=e.onNodeSelect,_=e.onNodeToggle,x=e.selected,O=Object(Bn.a)(e,["children","classes","className","defaultCollapseIcon","defaultEndIcon","defaultExpanded","defaultExpandIcon","defaultParentIcon","defaultSelected","disableSelection","multiSelect","expanded","onNodeSelect","onNodeToggle","selected"]),S=u.useState(null),E=S[0],C=S[1],k=u.useState(null),T=k[0],j=k[1],P=u.useRef({}),I=u.useRef({}),R=u.useRef([]),A=Object(Fn.a)({controlled:b,default:c,name:"TreeView",state:"expanded"}),M=Object(zn.a)(A,2),D=M[0],N=M[1],L=Object(Fn.a)({controlled:x,default:h,name:"TreeView",state:"selected"}),z=Object(zn.a)(L,2),B=z[0],F=z[1],W=u.useCallback((function(e){return!!Array.isArray(D)&&-1!==D.indexOf(e)}),[D]),H=u.useCallback((function(e){return Array.isArray(B)?-1!==B.indexOf(e):B===e}),[B]),V=function(e){var t=R.current.indexOf(e);return-1!==t&&t+1<R.current.length?R.current[t+1]:null},U=function(e){var t=R.current.indexOf(e);return-1!==t&&t-1>=0?R.current[t-1]:null},q=function(){return R.current[R.current.length-1]},G=function(){return R.current[0]},K=function(e){e&&(C(e),j(e))},$=u.useRef(null),Z=u.useRef(!1),X=u.useRef([]),Q=function(e,t){var n=B,r=t.start,i=t.next,o=t.current;i&&o&&(-1===X.current.indexOf(o)&&(X.current=[]),Z.current?-1!==X.current.indexOf(i)?(n=n.filter((function(e){return e===r||e!==o})),X.current=X.current.filter((function(e){return e===r||e!==o}))):(n.push(i),X.current.push(i)):(n.push(i),X.current.push(o,i)),w&&w(e,n),F(n))},Y=function(e,t){var n=B,r=t.start,i=t.end;Z.current&&(n=B.filter((function(e){return-1===X.current.indexOf(e)})));var o=function(e,t){var n=R.current.indexOf(e),r=R.current.indexOf(t),i=Math.min(n,r),o=Math.max(n,r);return R.current.slice(i,o+1)}(r,i);X.current=o;var a=n.concat(o);a=a.filter((function(e,t){return a.indexOf(e)===t})),w&&w(e,a),F(a)},J=function(e,t){var n=[];n=-1!==B.indexOf(t)?B.filter((function(e){return e!==t})):[t].concat(B),w&&w(e,n),F(n)},ee=function(e,t){var n=y?[t]:t;w&&w(e,n),F(n)},te=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.start,i=void 0===r?$.current:r,o=t.end,a=t.current;return n?Q(e,{start:i,next:o,current:a}):Y(e,{start:i,end:o}),Z.current=!0,!0},ne=u.useCallback((function(e){var t=P.current[e],n=[];return t&&(n.push(e),t.children&&(n.concat(t.children),t.children.forEach((function(e){n.concat(ne(e))})))),n}),[]),re=u.useCallback((function(e){var t=Object(p.a)({},I.current);e.forEach((function(e){t[e]&&delete t[e]})),I.current=t}),[]),ie=u.useCallback((function(e){var t=ne(e);re(t);var n=Object(p.a)({},P.current);t.forEach((function(e){var t=n[e];if(t){if(t.parent){var r=n[t.parent];if(r&&r.children){var i=r.children.filter((function(t){return t!==e}));n[t.parent]=Object(p.a)({},r,{children:i})}}delete n[e]}})),P.current=n,j((function(t){return t===e?null:t}))}),[ne,re]),oe=u.useRef([]),ae=u.useState(!1),se=ae[0],ce=ae[1];u.useEffect((function(){var e=[];u.Children.forEach(n,(function(t){u.isValidElement(t)&&t.props.nodeId&&e.push(t.props.nodeId)})),function(e,t){if(e.length!==t.length)return!0;for(var n=0;n<e.length;n+=1)if(e[n]!==t[n])return!0;return!1}(oe.current,e)&&(P.current[-1]={parent:null,children:e},e.forEach((function(e,t){0===t&&C(e)})),R.current=P.current[-1].children,oe.current=e,ce(!0))}),[n]),u.useEffect((function(){se&&(R.current=function e(t){for(var n=[],r=0;r<t.length;r+=1){var i=t[r];n.push(i);var o=P.current[i].children;W(i)&&o&&(n=n.concat(e(o)))}return n}(P.current[-1].children))}),[D,se,W,n]);var ue=function(){return!1};return u.createElement(Wn.Provider,{value:{icons:{defaultCollapseIcon:o,defaultExpandIcon:l,defaultParentIcon:f,defaultEndIcon:a},focus:K,focusFirstNode:function(){return K(G())},focusLastNode:function(){return K(q())},focusNextNode:function(e){return K(V(e))},focusPreviousNode:function(e){return K(U(e))},focusByFirstCharacter:function(e,t){var n,r,i=t.toLowerCase(),o=[],a=[];Object.keys(I.current).forEach((function(e){var t=I.current[e],n=P.current[e];(!n.parent||W(n.parent))&&(o.push(e),a.push(t))})),(n=o.indexOf(e)+1)===P.current.length&&(n=0),-1===(r=Hn(a,n,i))&&(r=Hn(a,0,i)),r>-1&&K(o[r])},expandAllSiblings:function(e,t){var n,r=P.current[t],i=P.current[r.parent];i?n=i.children.filter((function(e){return!W(e)})):n=P.current[-1].children.filter((function(e){return!W(e)}));var o=D.concat(n);n.length>0&&(N(o),_&&_(e,o))},toggleExpansion:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T;-1!==D.indexOf(n)?(t=D.filter((function(e){return e!==n})),C((function(e){var t=P.current[e];return e&&(t&&t.parent?t.parent.id:null)===n?n:e}))):t=[n].concat(D),_&&_(e,t),N(t)},isExpanded:W,isFocused:function(e){return T===e},isSelected:H,selectNode:v?ue:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!t&&(n?J(e,t):ee(e,t),$.current=t,Z.current=!1,X.current=[],!0)},selectRange:v?ue:te,selectNextNode:v?ue:function(e,t){return te(e,{end:V(t),current:t},!0)},selectPreviousNode:v?ue:function(e,t){return te(e,{end:U(t),current:t},!0)},rangeSelectToFirst:v?ue:function(e,t){$.current||($.current=t);var n=Z.current?$.current:t;return te(e,{start:n,end:G()})},rangeSelectToLast:v?ue:function(e,t){$.current||($.current=t);var n=Z.current?$.current:t;return te(e,{start:n,end:q()})},selectAllNodes:v?ue:function(e){return te(e,{start:G(),end:q()})},isTabbable:function(e){return E===e},multiSelect:y,getParent:function(e){return P.current[e].parent},mapFirstChar:function(e,t){I.current[e]=t},addNodeToNodeMap:function(e,t){var n=P.current[e];P.current[e]=Object(p.a)({},n,{children:t,id:e}),t.forEach((function(t){var n=P.current[t];P.current[t]=Object(p.a)({},n,{parent:e,id:t})}))},removeNodeFromNodeMap:ie}},u.createElement("ul",Object(p.a)({role:"tree","aria-multiselectable":y,className:Object(Ee.a)(r.root,i),ref:t},O),n))})),Gn=Object(a.a)({root:{padding:0,margin:0,listStyle:"none"}},{name:"MuiTreeView"})(qn),Kn=n(217),$n=n.n(Kn),Zn=n(699),Xn=n.n(Zn),Qn=n(1127),Yn=n(24),Jn=n(36),er=n(31),tr=u.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.collapseIcon,a=e.endIcon,s=e.expandIcon,c=e.icon,l=e.label,f=e.nodeId,d=e.onClick,h=e.onLabelClick,g=e.onIconClick,v=e.onFocus,m=e.onKeyDown,y=e.onMouseDown,b=e.TransitionComponent,w=void 0===b?Qn.a:b,_=e.TransitionProps,x=Object(Bn.a)(e,["children","classes","className","collapseIcon","endIcon","expandIcon","icon","label","nodeId","onClick","onLabelClick","onIconClick","onFocus","onKeyDown","onMouseDown","TransitionComponent","TransitionProps"]),O=u.useContext(Wn),S=O.icons,E=O.focus,C=O.focusFirstNode,k=O.focusLastNode,T=O.focusNextNode,j=O.focusPreviousNode,P=O.focusByFirstCharacter,I=O.selectNode,R=O.selectRange,A=O.selectNextNode,M=O.selectPreviousNode,D=O.rangeSelectToFirst,N=O.rangeSelectToLast,L=O.selectAllNodes,z=O.expandAllSiblings,B=O.toggleExpansion,F=O.isExpanded,W=O.isFocused,H=O.isSelected,V=O.isTabbable,U=O.multiSelect,q=O.getParent,G=O.mapFirstChar,K=O.addNodeToNodeMap,$=O.removeNodeFromNodeMap,Z=u.useRef(null),X=u.useRef(null),Q=Object(er.a)(Z,t),Y=c,J=Boolean(Array.isArray(n)?n.length:n),ee=!!F&&F(f),te=!!W&&W(f),ne=!!V&&V(f),re=!!H&&H(f),ie=S||{},oe=Object(Jn.a)();Y||(J?(Y=ee?o||ie.defaultCollapseIcon:s||ie.defaultExpandIcon)||(Y=ie.defaultParentIcon):Y=a||ie.defaultEndIcon);var ae,se=function(e){return J&&(ee?T(f):B(e)),!0},ce=function(e){if(ee)return B(e,f),!0;var t=q(f);return!!t&&(E(t),!0)};return u.useEffect((function(){if(K){var e=[];u.Children.forEach(n,(function(t){u.isValidElement(t)&&t.props.nodeId&&e.push(t.props.nodeId)})),K(f,e)}}),[n,f,K]),u.useEffect((function(){if($)return function(){$(f)}}),[f,$]),u.useEffect((function(){G&&l&&G(f,X.current.textContent.substring(0,1).toLowerCase())}),[G,f,l]),u.useEffect((function(){te&&Z.current.focus()}),[te]),U?ae=re:re&&(ae=!0),u.createElement("li",Object(p.a)({className:Object(Ee.a)(r.root,i,ee&&r.expanded,re&&r.selected),role:"treeitem",onKeyDown:function(e){var t=!1,n=e.key;if(!e.altKey&&e.currentTarget===e.target){var r,i=e.ctrlKey||e.metaKey;switch(n){case" ":Z.current===e.currentTarget&&(t=U&&e.shiftKey?R(e,{end:f}):U?I(e,f,!0):I(e,f)),e.stopPropagation();break;case"Enter":Z.current===e.currentTarget&&J&&(B(e),t=!0),e.stopPropagation();break;case"ArrowDown":U&&e.shiftKey&&A(e,f),T(f),t=!0;break;case"ArrowUp":U&&e.shiftKey&&M(e,f),j(f),t=!0;break;case"ArrowRight":t="rtl"===oe.direction?ce(e):se(e);break;case"ArrowLeft":t="rtl"===oe.direction?se(e):ce(e);break;case"Home":U&&i&&e.shiftKey&&D(e,f),C(),t=!0;break;case"End":U&&i&&e.shiftKey&&N(e,f),k(),t=!0;break;default:"*"===n?(z(e,f),t=!0):U&&i&&"a"===n.toLowerCase()?t=L(e):!i&&!e.shiftKey&&((r=n)&&1===r.length&&r.match(/\S/))&&(P(f,n),t=!0)}t&&(e.preventDefault(),e.stopPropagation()),m&&m(e)}},onFocus:function(e){te||e.currentTarget!==e.target||E(f),v&&v(e)},"aria-expanded":J?ee:null,"aria-selected":ae,ref:Q,tabIndex:ne?0:-1},x),u.createElement("div",{className:r.content,onClick:function(e){te||E(f);var t=U&&(e.shiftKey||e.ctrlKey||e.metaKey);!J||e.defaultPrevented||t&&F(f)||B(e,f),t?e.shiftKey?R(e,{end:f}):I(e,f,!0):I(e,f),d&&d(e)},onMouseDown:function(e){(e.shiftKey||e.ctrlKey||e.metaKey)&&e.preventDefault(),y&&y(e)},ref:X},u.createElement("div",{onClick:g,className:r.iconContainer},Y),u.createElement(le.a,{onClick:h,component:"div",className:r.label},l)),n&&u.createElement(w,Object(p.a)({unmountOnExit:!0,className:r.group,in:ee,component:"ul",role:"group"},_),n))})),nr=Object(a.a)((function(e){return{root:{listStyle:"none",margin:0,padding:0,outline:0,WebkitTapHighlightColor:"transparent","&:focus > $content $label":{backgroundColor:e.palette.action.hover},"&$selected > $content $label":{backgroundColor:Object(Yn.a)(e.palette.primary.main,e.palette.action.selectedOpacity)},"&$selected > $content $label:hover, &$selected:focus > $content $label":{backgroundColor:Object(Yn.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},expanded:{},selected:{},group:{margin:0,padding:0,marginLeft:17},content:{width:"100%",display:"flex",alignItems:"center",cursor:"pointer"},iconContainer:{marginRight:4,width:15,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},label:{width:"100%",paddingLeft:4,position:"relative","&:hover":{backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}}}),{name:"MuiTreeItem"})(tr);function rr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ir(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function or(e,t){return(or=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cr(e);if(t){var i=cr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sr(this,n)}}function sr(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cr(e){return(cr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ur=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&or(e,t)}(o,e);var t,n,r,i=ar(o);function o(){return rr(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleKeyPressed",value:function(e,t){var n=this.props,r=n.expandedNodeIds,i=n.toggleNode;"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||this.selectTreeItem(t),("ArrowLeft"===e.key&&-1!==r.indexOf(t.id)||"ArrowRight"===e.key&&-1===r.indexOf(t.id)&&t.nodes.length>0)&&i(t.id)}},{key:"selectTreeItem",value:function(e){var t=this.props,n=t.setCanvas,r=t.toggleNode,i=t.windowId;if(e.nodes.length>0&&r(e.id),e.data.getCanvasIds()&&0!==e.data.getCanvasIds().length&&!(e.nodes.length>0)){var o=function(e){var t=e.data.__jsonld;if(t.startCanvas&&"string"==typeof t.startCanvas)return t.startCanvas;if(t.start){if("Canvas"===t.start.type&&"string"==typeof t.start.id)return t.start.id;if("SpecificResource"===t.start.type&&"string"==typeof t.start.source)return t.start.source}return e.data.getCanvasIds()[0]}(e);n(i,-1===o.indexOf("#")?o:o.substr(0,o.indexOf("#")))}}},{key:"buildTreeItems",value:function(e,t,n,r){var i=this,o=this.props.classes;return e?e.map((function(e){return l.a.createElement(Ne,{containerRef:n,key:"".concat(e.id,"-scroll"),offsetTop:96,scrollTo:r===e.id},l.a.createElement(nr,{key:e.id,nodeId:e.id,classes:{content:o.content,group:o.group,label:o.label,root:o.treeItemRoot,selected:o.selected},label:l.a.createElement("div",{className:Object(Ee.a)((a={},s=o.visibleNode,c=-1!==t.indexOf(e.id),s in a?Object.defineProperty(a,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[s]=c,a))},e.label),onClick:function(){return i.selectTreeItem(e)},onKeyDown:function(t){return i.handleKeyPressed(t,e)}},e.nodes&&e.nodes.length>0?i.buildTreeItems(e.nodes,t,n,r):null));var a,s,c})):null}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.treeStructure,r=e.visibleNodeIds,i=e.expandedNodeIds,o=e.containerRef,a=e.nodeIdToScrollTo;return n?l.a.createElement(l.a.Fragment,null,l.a.createElement(Gn,{className:t.root,defaultCollapseIcon:l.a.createElement($n.a,{color:"action"}),defaultExpandIcon:l.a.createElement(Xn.a,{color:"action"}),defaultEndIcon:l.a.createElement(l.a.Fragment,null),expanded:i},this.buildTreeItems(n.nodes,r,o,a))):l.a.createElement(l.a.Fragment,null)}}])&&ir(t.prototype,n),r&&ir(t,r),o}(u.Component),lr=n(246),fr=Object(r.compose)(Object(a.a)((function(e){return{content:{alignItems:"flex-start",borderLeft:"1px solid transparent",padding:"8px 16px 8px 0",width:"auto"},group:{borderLeft:"1px solid ".concat(e.palette.grey[300])},label:{paddingLeft:0},root:{flexGrow:1},selected:{},treeItemRoot:{"&:focus > $content":{backgroundColor:e.palette.action.selected},"&:hover > $content":{backgroundColor:e.palette.action.hover},"&:hover >$content $label, &:focus > $content $label, &$selected > $content $label, &$selected > $content $label:hover, &$selected:focus > $content $label":{backgroundColor:"transparent"}},visibleNode:{backgroundColor:Object(Ln.fade)(e.palette.highlights.primary,.35),display:"inline"}}})),Object(o.a)(),Object(i.b)((function(e,t){var n=t.id,r=t.windowId;return{expandedNodeIds:Object(lr.b)(e,{companionWindowId:n,windowId:r}),nodeIdToScrollTo:Object(lr.d)(e,{companionWindowId:n,windowId:r}),treeStructure:Object(re.d)(e,{windowId:r}),visibleNodeIds:Object(lr.e)(e,{companionWindowId:n,windowId:r})}}),(function(e,t){var n=t.id,r=t.windowId;return{setCanvas:function(){return e(c.a.apply(D,arguments))},toggleNode:function(t){return e(et.d(r,n,t))}}})),Object(s.a)("SidebarIndexTableOfContents"))(ur);function dr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pr(e,t){return(pr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mr(e);if(t){var i=mr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gr(this,n)}}function gr(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return vr(e)}function vr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mr(e){return(mr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pr(e,t)}(o,e);var t,n,r,i=hr(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleSequenceChange=t.handleSequenceChange.bind(vr(t)),t.handleVariantChange=t.handleVariantChange.bind(vr(t)),t.containerRef=l.a.createRef(),t}return t=o,r=[{key:"getUseableLabel",value:function(e,t){return e&&e.getLabel&&e.getLabel().length>0?e.getLabel().getValue():e.id}}],(n=[{key:"handleSequenceChange",value:function(e){(0,this.props.updateSequence)(e.target.value)}},{key:"handleVariantChange",value:function(e,t){(0,this.props.updateVariant)(t)}},{key:"render",value:function(){var e,t=this.props,n=t.classes,r=t.collection,i=t.id,a=t.showMultipart,s=t.sequenceId,c=t.sequences,u=t.t,f=t.variant,d=t.showToc,p=t.windowId;return e="tableOfContents"===f?l.a.createElement(fr,{id:i,containerRef:this.containerRef,windowId:p}):l.a.createElement(Nn,{id:i,containerRef:this.containerRef,windowId:p}),l.a.createElement(Ge.default,{title:u("canvasIndex"),id:i,windowId:p,ref:this.containerRef,otherRef:this.containerRef,titleControls:l.a.createElement(l.a.Fragment,null,c&&c.length>1&&l.a.createElement(pt.a,null,l.a.createElement(ht.a,{MenuProps:{anchorOrigin:{horizontal:"left",vertical:"bottom"},getContentAnchorEl:null},displayEmpty:!0,value:s,onChange:this.handleSequenceChange,name:"sequenceId",classes:{select:n.select},className:n.selectEmpty},c.map((function(e,t){return l.a.createElement(Te.a,{value:e.id,key:e.id},l.a.createElement(le.a,{variant:"body2"},o.getUseableLabel(e,t)))})))),l.a.createElement("div",{className:n.break}),l.a.createElement(en.a,{value:f,onChange:this.handleVariantChange,variant:"fullWidth",indicatorColor:"primary",textColor:"primary"},d&&l.a.createElement(nn.a,{title:u("tableOfContentsList"),value:"tableOfContents"},l.a.createElement(tn.a,{className:n.variantTab,value:"tableOfContents","aria-label":u("tableOfContentsList"),"aria-controls":"tab-panel-".concat(i),icon:l.a.createElement(sn.a,{style:{transform:"scale(-1, 1)"}})})),l.a.createElement(nn.a,{title:u("itemList"),value:"item"},l.a.createElement(tn.a,{className:n.variantTab,value:"item","aria-label":u("itemList"),"aria-controls":"tab-panel-".concat(i),icon:l.a.createElement(on.a,null)})),l.a.createElement(nn.a,{title:u("thumbnailList"),value:"thumbnail"},l.a.createElement(tn.a,{className:n.variantTab,value:"thumbnail","aria-label":u("thumbnailList"),"aria-controls":"tab-panel-".concat(i),icon:l.a.createElement(kt.a,null)}))))},l.a.createElement("div",{id:"tab-panel-".concat(i)},r&&l.a.createElement(Et.a,{fullWidth:!0,onClick:a,endIcon:l.a.createElement(un.a,null)},l.a.createElement(le.a,{className:n.collectionNavigationButton},o.getUseableLabel(r))),e))}}])&&dr(t.prototype,n),r&&dr(t,r),o}(u.Component);yr.defaultProps={collection:null,sequenceId:null,sequences:[],showToc:!1};var br=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{break:{flexBasis:"100%",height:0},collectionNavigationButton:{textTransform:"none"},label:{paddingLeft:e.spacing(1)},select:{"&:focus":{backgroundColor:e.palette.background.paper}},selectEmpty:{backgroundColor:e.palette.background.paper},variantTab:{minWidth:"auto"}}})),Object(i.b)((function(e,t){var n=t.id,r=t.windowId,i=Object(re.d)(e,{windowId:r}),o=Object(oe.e)(e,{windowId:r}),a=e.config,s=Object(ie.getCompanionWindow)(e,{companionWindowId:n}),c=o.collectionPath||[],u=c&&c[c.length-1],l=Object(re.b)(e,{windowId:r});return{collection:u&&Object(tt.q)(e,{manifestId:u}),config:a,sequenceId:l&&l.id,sequences:Object(re.g)(e,{windowId:r}),showToc:i&&i.nodes&&i.nodes.length>0,variant:s.variant||Object(lr.a)(e,{windowId:r})}}),(function(e,t){var n=t.id,r=t.windowId;return{showMultipart:function(){return e(et.b(r,{content:"collection",position:"right"}))},updateSequence:function(t){return e(St.l(r,{sequenceId:t}))},updateVariant:function(t){return e(et.e(r,n,{variant:t}))}}})),Object(s.a)("WindowSideBarCanvasPanel"))(yr),wr=n(1169),_r=n(252);function xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sr(e,t){return(Sr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Er(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kr(e);if(t){var i=kr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cr(this,n)}}function Cr(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function kr(e){return(kr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sr(e,t)}(o,e);var t,n,r,i=Er(o);function o(){return xr(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.manifestLogo,n=e.requiredStatement,r=e.rights,i=e.windowId,o=e.id,a=e.classes,s=e.t;return l.a.createElement(Ge.default,{title:s("attributionTitle"),paperClassName:Object(z.a)("attribution-panel"),windowId:i,id:o},l.a.createElement("div",{className:a.section},n&&l.a.createElement(rt.a,{labelValuePairs:n,defaultLabel:s("attribution")}),r&&r.length>0&&l.a.createElement("dl",{className:Object(z.a)("label-value-metadata")},l.a.createElement(le.a,{variant:"subtitle2",component:"dt"},s("rights")),r.map((function(e){return l.a.createElement(le.a,{variant:"body1",component:"dd",key:e.toString()},l.a.createElement(Lt.a,{target:"_blank",rel:"noopener noreferrer",href:e},e))})))),t&&l.a.createElement("div",{className:a.section},l.a.createElement(_r.Img,{src:[t],alt:"",role:"presentation",className:a.logo,unloader:l.a.createElement(wr.a,{className:a.placeholder,variant:"rect",height:60,width:60})})),l.a.createElement(it.a,this.props))}}])&&Or(t.prototype,n),r&&Or(t,r),o}(u.Component);Tr.defaultProps={classes:{},manifestLogo:null,requiredStatement:null,rights:null,t:function(e){return e}};var jr=Object(r.compose)(Object(a.a)((function(e){return{logo:{maxWidth:"100%"},placeholder:{backgroundColor:e.palette.grey[300]},section:{borderBottom:".5px solid ".concat(e.palette.section_divider),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(1),paddingTop:e.spacing(2)}}})),Object(o.a)(),Object(i.b)((function(e,t){t.id;var n=t.windowId;return{manifestLogo:Object(tt.g)(e,{windowId:n}),requiredStatement:Object(tt.s)(e,{windowId:n}),rights:Object(tt.t)(e,{windowId:n})}})),Object(s.a)("AttributionPanel"))(Tr),Pr=n(563),Ir=n(371),Rr=n.n(Ir),Ar=n(180),Mr=n.n(Ar),Dr=n(68),Nr=n.n(Dr),Lr=n(27),zr=n(1122),Br=n(1163),Fr=n(757),Wr=n(354),Hr=n(43),Vr=Object(Hr.a)(u.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Ur=(n(70),n(135)),qr=n(39),Gr=n(64);function Kr(e){return void 0!==e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function $r(e,t){for(var n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}var Zr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ignoreAccents,n=void 0===t||t,r=e.ignoreCase,i=void 0===r||r,o=e.limit,a=e.matchFrom,s=void 0===a?"any":a,c=e.stringify,u=e.trim,l=void 0!==u&&u;return function(e,t){var r=t.inputValue,a=t.getOptionLabel,u=l?r.trim():r;i&&(u=u.toLowerCase()),n&&(u=Kr(u));var f=e.filter((function(e){var t=(c||a)(e);return i&&(t=t.toLowerCase()),n&&(t=Kr(t)),"start"===s?0===t.indexOf(u):t.indexOf(u)>-1}));return"number"==typeof o?f.slice(0,o):f}}();function Xr(e){var t=e.autoComplete,n=void 0!==t&&t,r=e.autoHighlight,i=void 0!==r&&r,o=e.autoSelect,a=void 0!==o&&o,s=e.blurOnSelect,c=void 0!==s&&s,l=e.clearOnBlur,f=void 0===l?!e.freeSolo:l,d=e.clearOnEscape,h=void 0!==d&&d,g=e.componentName,v=void 0===g?"useAutocomplete":g,m=e.debug,y=void 0!==m&&m,b=e.defaultValue,w=void 0===b?e.multiple?[]:null:b,_=e.disableClearable,x=void 0!==_&&_,O=e.disableCloseOnSelect,S=void 0!==O&&O,E=e.disabledItemsFocusable,C=void 0!==E&&E,k=e.disableListWrap,T=void 0!==k&&k,j=e.filterOptions,P=void 0===j?Zr:j,I=e.filterSelectedOptions,R=void 0!==I&&I,A=e.freeSolo,M=void 0!==A&&A,D=e.getOptionDisabled,N=e.getOptionLabel,L=void 0===N?function(e){return e}:N,z=e.getOptionSelected,B=void 0===z?function(e,t){return e===t}:z,F=e.groupBy,W=e.handleHomeEndKeys,H=void 0===W?!e.freeSolo:W,V=e.id,U=e.includeInputInList,q=void 0!==U&&U,G=e.inputValue,K=e.multiple,$=void 0!==K&&K,Z=e.onChange,X=e.onClose,Q=e.onHighlightChange,Y=e.onInputChange,J=e.onOpen,ee=e.open,te=e.openOnFocus,ne=void 0!==te&&te,re=e.options,ie=e.selectOnFocus,oe=void 0===ie?!e.freeSolo:ie,ae=e.value,se=Object(Ur.a)(V),ce=L;var ue=u.useRef(!1),le=u.useRef(!0),fe=u.useRef(null),de=u.useRef(null),pe=u.useState(null),he=pe[0],ge=pe[1],ve=u.useState(-1),me=ve[0],ye=ve[1],be=i?0:-1,we=u.useRef(be),_e=Object(Fn.a)({controlled:ae,default:w,name:v}),xe=Object(zn.a)(_e,2),Oe=xe[0],Se=xe[1],Ee=Object(Fn.a)({controlled:G,default:"",name:v,state:"inputValue"}),Ce=Object(zn.a)(Ee,2),ke=Ce[0],Te=Ce[1],je=u.useState(!1),Pe=je[0],Ie=je[1],Re=Object(qr.a)((function(e,t){var n;if($)n="";else if(null==t)n="";else{var r=ce(t);n="string"==typeof r?r:""}ke!==n&&(Te(n),Y&&Y(e,n,"reset"))}));u.useEffect((function(){Re(null,Oe)}),[Oe,Re]);var Ae=Object(Fn.a)({controlled:ee,default:!1,name:v,state:"open"}),Me=Object(zn.a)(Ae,2),De=Me[0],Ne=Me[1],Le=!$&&null!=Oe&&ke===ce(Oe),ze=De,Be=ze?P(re.filter((function(e){return!R||!($?Oe:[Oe]).some((function(t){return null!==t&&B(e,t)}))})),{inputValue:Le?"":ke,getOptionLabel:ce}):[],Fe=Object(qr.a)((function(e){-1===e?fe.current.focus():he.querySelector('[data-tag-index="'.concat(e,'"]')).focus()}));u.useEffect((function(){$&&me>Oe.length-1&&(ye(-1),Fe(-1))}),[Oe,$,me,Fe]);var We=Object(qr.a)((function(e){var t=e.event,n=e.index,r=e.reason,i=void 0===r?"auto":r;if(we.current=n,-1===n?fe.current.removeAttribute("aria-activedescendant"):fe.current.setAttribute("aria-activedescendant","".concat(se,"-option-").concat(n)),Q&&Q(t,-1===n?null:Be[n],i),de.current){var o=de.current.querySelector("[data-focus]");o&&o.removeAttribute("data-focus");var a=de.current.parentElement.querySelector('[role="listbox"]');if(a)if(-1!==n){var s=de.current.querySelector('[data-option-index="'.concat(n,'"]'));if(s&&(s.setAttribute("data-focus","true"),a.scrollHeight>a.clientHeight&&"mouse"!==i)){var c=s,u=a.clientHeight+a.scrollTop,l=c.offsetTop+c.offsetHeight;l>u?a.scrollTop=l-a.clientHeight:c.offsetTop-c.offsetHeight*(F?1.3:0)<a.scrollTop&&(a.scrollTop=c.offsetTop-c.offsetHeight*(F?1.3:0))}}else a.scrollTop=0}})),He=Object(qr.a)((function(e){var t=e.event,r=e.diff,i=e.direction,o=void 0===i?"next":i,a=e.reason,s=void 0===a?"auto":a;if(ze){var c=function(e,t){if(!de.current||-1===e)return-1;for(var n=e;;){if("next"===t&&n===Be.length||"previous"===t&&-1===n)return-1;var r=de.current.querySelector('[data-option-index="'.concat(n,'"]')),i=!C&&(r&&(r.disabled||"true"===r.getAttribute("aria-disabled")));if(!(r&&!r.hasAttribute("tabindex")||i))return n;n+="next"===t?1:-1}}(function(){var e=Be.length-1;if("reset"===r)return be;if("start"===r)return 0;if("end"===r)return e;var t=we.current+r;return t<0?-1===t&&q?-1:T&&-1!==we.current||Math.abs(r)>1?0:e:t>e?t===e+1&&q?-1:T||Math.abs(r)>1?e:0:t}(),o);if(We({index:c,reason:s,event:t}),n&&"reset"!==r)if(-1===c)fe.current.value=ke;else{var u=ce(Be[c]);fe.current.value=u,0===u.toLowerCase().indexOf(ke.toLowerCase())&&ke.length>0&&fe.current.setSelectionRange(ke.length,u.length)}}})),Ve=u.useCallback((function(){if(ze){var e=$?Oe[0]:Oe;if(0!==Be.length&&null!=e){if(de.current)if(R||null==e)we.current>=Be.length-1?We({index:Be.length-1}):We({index:we.current});else{var t=Be[we.current];if($&&t&&-1!==$r(Oe,(function(e){return B(t,e)})))return;var n=$r(Be,(function(t){return B(t,e)}));-1===n?He({diff:"reset"}):We({index:n})}}else He({diff:"reset"})}}),[0===Be.length,!$&&Oe,R,He,We,ze,ke,$]),Ue=Object(qr.a)((function(e){Object(Gr.a)(de,e),e&&Ve()}));u.useEffect((function(){Ve()}),[Ve]);var qe=function(e){De||(Ne(!0),J&&J(e))},Ge=function(e,t){De&&(Ne(!1),X&&X(e,t))},Ke=function(e,t,n,r){Oe!==t&&(Z&&Z(e,t,n,r),Se(t))},$e=u.useRef(!1),Ze=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"select-option",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",i=n,o=t;if($){var a=$r(o=Array.isArray(Oe)?Oe.slice():[],(function(e){return B(t,e)}));-1===a?o.push(t):"freeSolo"!==r&&(o.splice(a,1),i="remove-option")}Re(e,o),Ke(e,o,i,{option:t}),S||Ge(e,i),(!0===c||"touch"===c&&$e.current||"mouse"===c&&!$e.current)&&fe.current.blur()};var Xe=function(e,t){if($){Ge(e,"toggleInput");var n=me;-1===me?""===ke&&"previous"===t&&(n=Oe.length-1):((n+="next"===t?1:-1)<0&&(n=0),n===Oe.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;for(var n=e;;){if("next"===t&&n===Oe.length||"previous"===t&&-1===n)return-1;var r=he.querySelector('[data-tag-index="'.concat(n,'"]'));if(!r||r.hasAttribute("tabindex")&&!r.disabled&&"true"!==r.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),ye(n),Fe(n)}},Qe=function(e){ue.current=!0,Te(""),Y&&Y(e,"","clear"),Ke(e,$?[]:null,"clear")},Ye=function(e){return function(t){switch(-1!==me&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(ye(-1),Fe(-1)),t.key){case"Home":ze&&H&&(t.preventDefault(),He({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":ze&&H&&(t.preventDefault(),He({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),He({diff:-5,direction:"previous",reason:"keyboard",event:t}),qe(t);break;case"PageDown":t.preventDefault(),He({diff:5,direction:"next",reason:"keyboard",event:t}),qe(t);break;case"ArrowDown":t.preventDefault(),He({diff:1,direction:"next",reason:"keyboard",event:t}),qe(t);break;case"ArrowUp":t.preventDefault(),He({diff:-1,direction:"previous",reason:"keyboard",event:t}),qe(t);break;case"ArrowLeft":Xe(t,"previous");break;case"ArrowRight":Xe(t,"next");break;case"Enter":if(229===t.which)break;if(-1!==we.current&&ze){var r=Be[we.current],i=!!D&&D(r);if(t.preventDefault(),i)return;Ze(t,r,"select-option"),n&&fe.current.setSelectionRange(fe.current.value.length,fe.current.value.length)}else M&&""!==ke&&!1===Le&&($&&t.preventDefault(),Ze(t,ke,"create-option","freeSolo"));break;case"Escape":ze?(t.preventDefault(),t.stopPropagation(),Ge(t,"escape")):h&&(""!==ke||$&&Oe.length>0)&&(t.preventDefault(),t.stopPropagation(),Qe(t));break;case"Backspace":if($&&""===ke&&Oe.length>0){var o=-1===me?Oe.length-1:me,a=Oe.slice();a.splice(o,1),Ke(t,a,"remove-option",{option:Oe[o]})}}e.onKeyDown&&e.onKeyDown(t)}},Je=function(e){Ie(!0),ne&&!ue.current&&qe(e)},et=function(e){null===de.current||document.activeElement!==de.current.parentElement?(Ie(!1),le.current=!0,ue.current=!1,y&&""!==ke||(a&&-1!==we.current&&ze?Ze(e,Be[we.current],"blur"):a&&M&&""!==ke?Ze(e,ke,"blur","freeSolo"):f&&Re(e,Oe),Ge(e,"blur"))):fe.current.focus()},tt=function(e){var t=e.target.value;ke!==t&&(Te(t),Y&&Y(e,t,"input")),""===t?x||$||Ke(e,null,"clear"):qe(e)},nt=function(e){We({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},rt=function(){$e.current=!0},it=function(e){var t=Number(e.currentTarget.getAttribute("data-option-index"));Ze(e,Be[t],"select-option"),$e.current=!1},ot=function(e){return function(t){var n=Oe.slice();n.splice(e,1),Ke(t,n,"remove-option",{option:Oe[e]})}},at=function(e){De?Ge(e,"toggleInput"):qe(e)},st=function(e){e.target.getAttribute("id")!==se&&e.preventDefault()},ct=function(){fe.current.focus(),oe&&le.current&&fe.current.selectionEnd-fe.current.selectionStart==0&&fe.current.select(),le.current=!1},ut=function(e){""!==ke&&De||at(e)},lt=M&&ke.length>0;lt=lt||($?Oe.length>0:null!==Oe);var ft=Be;if(F){new Map;ft=Be.reduce((function(e,t,n){var r=F(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e}),[])}return{getRootProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(p.a)({"aria-owns":ze?"".concat(se,"-popup"):null,role:"combobox","aria-expanded":ze},e,{onKeyDown:Ye(e),onMouseDown:st,onClick:ct})},getInputLabelProps:function(){return{id:"".concat(se,"-label"),htmlFor:se}},getInputProps:function(){return{id:se,value:ke,onBlur:et,onFocus:Je,onChange:tt,onMouseDown:ut,"aria-activedescendant":ze?"":null,"aria-autocomplete":n?"both":"list","aria-controls":ze?"".concat(se,"-popup"):null,autoComplete:"off",ref:fe,autoCapitalize:"none",spellCheck:"false"}},getClearProps:function(){return{tabIndex:-1,onClick:Qe}},getPopupIndicatorProps:function(){return{tabIndex:-1,onClick:at}},getTagProps:function(e){var t=e.index;return{key:t,"data-tag-index":t,tabIndex:-1,onDelete:ot(t)}},getListboxProps:function(){return{role:"listbox",id:"".concat(se,"-popup"),"aria-labelledby":"".concat(se,"-label"),ref:Ue,onMouseDown:function(e){e.preventDefault()}}},getOptionProps:function(e){var t=e.index,n=e.option,r=($?Oe:[Oe]).some((function(e){return null!=e&&B(n,e)})),i=!!D&&D(n);return{key:t,tabIndex:-1,role:"option",id:"".concat(se,"-option-").concat(t),onMouseOver:nt,onClick:it,onTouchStart:rt,"data-option-index":t,"aria-disabled":i,"aria-selected":r}},id:se,inputValue:ke,value:Oe,dirty:lt,popupOpen:ze,focused:Pe||-1!==me,anchorEl:he,setAnchorEl:ge,focusedTag:me,groupedOptions:ft}}function Qr(e){e.anchorEl,e.open;var t=Object(Bn.a)(e,["anchorEl","open"]);return u.createElement("div",t)}var Yr=u.createElement(Wr.a,{fontSize:"small"}),Jr=u.createElement(Vr,null),ei=u.forwardRef((function(e,t){e.autoComplete,e.autoHighlight,e.autoSelect,e.blurOnSelect;var n,r=e.ChipProps,i=e.classes,o=e.className,a=e.clearOnBlur,s=(void 0===a&&e.freeSolo,e.clearOnEscape,e.clearText),c=void 0===s?"Clear":s,l=e.closeIcon,d=void 0===l?Yr:l,h=e.closeText,g=void 0===h?"Close":h,v=(e.debug,e.defaultValue),m=(void 0===v&&e.multiple,e.disableClearable),y=void 0!==m&&m,b=(e.disableCloseOnSelect,e.disabled),w=void 0!==b&&b,_=(e.disabledItemsFocusable,e.disableListWrap,e.disablePortal),x=void 0!==_&&_,O=(e.filterOptions,e.filterSelectedOptions,e.forcePopupIcon),S=void 0===O?"auto":O,E=e.freeSolo,C=void 0!==E&&E,k=e.fullWidth,T=void 0!==k&&k,j=e.getLimitTagsText,P=void 0===j?function(e){return"+".concat(e)}:j,I=(e.getOptionDisabled,e.getOptionLabel),R=void 0===I?function(e){return e}:I,A=(e.getOptionSelected,e.groupBy),M=e.handleHomeEndKeys,D=(void 0===M&&e.freeSolo,e.id,e.includeInputInList,e.inputValue,e.limitTags),N=void 0===D?-1:D,L=e.ListboxComponent,z=void 0===L?"ul":L,B=e.ListboxProps,F=e.loading,W=void 0!==F&&F,H=e.loadingText,V=void 0===H?"Loading…":H,U=e.multiple,q=void 0!==U&&U,G=e.noOptionsText,K=void 0===G?"No options":G,$=(e.onChange,e.onClose,e.onHighlightChange,e.onInputChange,e.onOpen,e.open,e.openOnFocus,e.openText),Z=void 0===$?"Open":$,X=(e.options,e.PaperComponent),Q=void 0===X?f.a:X,Y=e.PopperComponent,J=void 0===Y?zr.a:Y,ee=e.popupIcon,te=void 0===ee?Jr:ee,ne=e.renderGroup,re=e.renderInput,ie=e.renderOption,oe=e.renderTags,ae=e.selectOnFocus,se=(void 0===ae&&e.freeSolo,e.size),ce=void 0===se?"medium":se,ue=(e.value,Object(Bn.a)(e,["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","classes","className","clearOnBlur","clearOnEscape","clearText","closeIcon","closeText","debug","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","getOptionSelected","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","value"])),le=x?Qr:J,fe=Xr(Object(p.a)({},e,{componentName:"Autocomplete"})),de=fe.getRootProps,pe=fe.getInputProps,he=fe.getInputLabelProps,ge=fe.getPopupIndicatorProps,ve=fe.getClearProps,me=fe.getTagProps,ye=fe.getListboxProps,be=fe.getOptionProps,we=fe.value,_e=fe.dirty,xe=fe.id,Oe=fe.popupOpen,Se=fe.focused,ke=fe.focusedTag,Te=fe.anchorEl,je=fe.setAnchorEl,Pe=fe.inputValue,Ie=fe.groupedOptions;if(q&&we.length>0){var Re=function(e){return Object(p.a)({className:Object(Ee.a)(i.tag,"small"===ce&&i.tagSizeSmall),disabled:w},me(e))};n=oe?oe(we,Re):we.map((function(e,t){return u.createElement(Ce.a,Object(p.a)({label:R(e),size:ce},Re({index:t}),r))}))}if(N>-1&&Array.isArray(n)){var Ae=n.length-N;!Se&&Ae>0&&(n=n.splice(0,N)).push(u.createElement("span",{className:i.tag,key:n.length},P(Ae)))}var Me=ne||function(e){return u.createElement("li",{key:e.key},u.createElement(Br.a,{className:i.groupLabel,component:"div"},e.group),u.createElement("ul",{className:i.groupUl},e.children))},De=ie||R,Ne=function(e,t){var n=be({option:e,index:t});return u.createElement("li",Object(p.a)({},n,{className:i.option}),De(e,{selected:n["aria-selected"],inputValue:Pe}))},Le=!y&&!w,ze=(!C||!0===S)&&!1!==S;return u.createElement(u.Fragment,null,u.createElement("div",Object(p.a)({ref:t,className:Object(Ee.a)(i.root,o,Se&&i.focused,T&&i.fullWidth,Le&&i.hasClearIcon,ze&&i.hasPopupIcon)},de(ue)),re({id:xe,disabled:w,fullWidth:!0,size:"small"===ce?"small":void 0,InputLabelProps:he(),InputProps:{ref:je,className:i.inputRoot,startAdornment:n,endAdornment:u.createElement("div",{className:i.endAdornment},Le?u.createElement(Fr.a,Object(p.a)({},ve(),{"aria-label":c,title:c,className:Object(Ee.a)(i.clearIndicator,_e&&i.clearIndicatorDirty)}),d):null,ze?u.createElement(Fr.a,Object(p.a)({},ge(),{disabled:w,"aria-label":Oe?g:Z,title:Oe?g:Z,className:Object(Ee.a)(i.popupIndicator,Oe&&i.popupIndicatorOpen)}),te):null)},inputProps:Object(p.a)({className:Object(Ee.a)(i.input,-1===ke&&i.inputFocused),disabled:w},pe())})),Oe&&Te?u.createElement(le,{className:Object(Ee.a)(i.popper,x&&i.popperDisablePortal),style:{width:Te?Te.clientWidth:null},role:"presentation",anchorEl:Te,open:!0},u.createElement(Q,{className:i.paper},W&&0===Ie.length?u.createElement("div",{className:i.loading},V):null,0!==Ie.length||C||W?null:u.createElement("div",{className:i.noOptions},K),Ie.length>0?u.createElement(z,Object(p.a)({className:i.listbox},ye(),B),Ie.map((function(e,t){return A?Me({key:e.key,group:e.group,children:e.options.map((function(t,n){return Ne(t,e.index+n)}))}):Ne(e,t)}))):null)):null)})),ti=Object(a.a)((function(e){var t;return{root:{"&$focused $clearIndicatorDirty":{visibility:"visible"},"@media (pointer: fine)":{"&:hover $clearIndicatorDirty":{visibility:"visible"}}},fullWidth:{width:"100%"},focused:{},tag:{margin:3,maxWidth:"calc(100% - 6px)"},tagSizeSmall:{margin:2,maxWidth:"calc(100% - 4px)"},hasPopupIcon:{},hasClearIcon:{},inputRoot:{flexWrap:"wrap","$hasPopupIcon &, $hasClearIcon &":{paddingRight:30},"$hasPopupIcon$hasClearIcon &":{paddingRight:56},"& $input":{width:0,minWidth:30},'&[class*="MuiInput-root"]':{paddingBottom:1,"& $input":{padding:4},"& $input:first-child":{padding:"6px 0"}},'&[class*="MuiInput-root"][class*="MuiInput-marginDense"]':{"& $input":{padding:"4px 4px 5px"},"& $input:first-child":{padding:"3px 0 6px"}},'&[class*="MuiOutlinedInput-root"]':{padding:9,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:39},"$hasPopupIcon$hasClearIcon &":{paddingRight:65},"& $input":{padding:"9.5px 4px"},"& $input:first-child":{paddingLeft:6},"& $endAdornment":{right:9}},'&[class*="MuiOutlinedInput-root"][class*="MuiOutlinedInput-marginDense"]':{padding:6,"& $input":{padding:"4.5px 4px"}},'&[class*="MuiFilledInput-root"]':{paddingTop:19,paddingLeft:8,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:39},"$hasPopupIcon$hasClearIcon &":{paddingRight:65},"& $input":{padding:"9px 4px"},"& $endAdornment":{right:9}},'&[class*="MuiFilledInput-root"][class*="MuiFilledInput-marginDense"]':{paddingBottom:1,"& $input":{padding:"4.5px 4px"}}},input:{flexGrow:1,textOverflow:"ellipsis",opacity:0},inputFocused:{opacity:1},endAdornment:{position:"absolute",right:0,top:"calc(50% - 14px)"},clearIndicator:{marginRight:-2,padding:4,visibility:"hidden"},clearIndicatorDirty:{},popupIndicator:{padding:2,marginRight:-2},popupIndicatorOpen:{transform:"rotate(180deg)"},popper:{zIndex:e.zIndex.modal},popperDisablePortal:{position:"absolute"},paper:Object(p.a)({},e.typography.body1,{overflow:"hidden",margin:"4px 0"}),listbox:{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto"},loading:{color:e.palette.text.secondary,padding:"14px 16px"},noOptions:{color:e.palette.text.secondary,padding:"14px 16px"},option:(t={minHeight:48,display:"flex",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16},Object(Lr.a)(t,e.breakpoints.up("sm"),{minHeight:"auto"}),Object(Lr.a)(t,'&[aria-selected="true"]',{backgroundColor:e.palette.action.selected}),Object(Lr.a)(t,'&[data-focus="true"]',{backgroundColor:e.palette.action.hover}),Object(Lr.a)(t,"&:active",{backgroundColor:e.palette.action.selected}),Object(Lr.a)(t,'&[aria-disabled="true"]',{opacity:e.palette.action.disabledOpacity,pointerEvents:"none"}),t),groupLabel:{backgroundColor:e.palette.background.paper,top:-8},groupUl:{padding:0,"& $option":{paddingLeft:24}}}}),{name:"MuiAutocomplete"})(ei),ni=n(1158),ri=n(1168),ii=n(218),oi=n.n(ii),ai=n(709),si=n.n(ai),ci=n(710),ui=n.n(ci);function li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function di(e,t){return(di=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gi(e);if(t){var i=gi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hi(this,n)}}function hi(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gi(e){return(gi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&di(e,t)}(o,e);var t,n,r,i=pi(o);function o(){return li(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"nextSearchResult",value:function(e){var t=this.props,n=t.searchHits;(0,t.selectAnnotation)(n[e+1].annotations[0])}},{key:"previousSearchResult",value:function(e){var t=this.props,n=t.searchHits;(0,t.selectAnnotation)(n[e-1].annotations[0])}},{key:"hasNextResult",value:function(e){var t=this.props.searchHits;return 0!==t.length&&e<t.length-1}},{key:"hasPreviousResult",value:function(e){return 0!==this.props.searchHits.length&&e>0}},{key:"render",value:function(){var e=this,t=this.props,n=t.numTotal,r=t.searchHits,i=t.selectedContentSearchAnnotation,o=t.classes,a=t.t,s="rtl"===t.direction?{transform:"rotate(180deg)"}:{},c=r.findIndex((function(e){return e.annotations.includes(i[0])})),u=r.length;return r.length<n&&(u+="+"),l.a.createElement(l.a.Fragment,null,r.length>0&&l.a.createElement(le.a,{variant:"body2",align:"center",classes:o},l.a.createElement(ve.a,{"aria-label":a("searchPreviousResult"),disabled:!this.hasPreviousResult(c),onClick:function(){return e.previousSearchResult(c)}},l.a.createElement(si.a,{style:s})),l.a.createElement("span",{style:{unicodeBidi:"plaintext"}},a("pagination",{current:c+1,total:u})),l.a.createElement(ve.a,{"aria-label":a("searchNextResult"),disabled:!this.hasNextResult(c),onClick:function(){return e.nextSearchResult(c)}},l.a.createElement(ui.a,{style:s}))))}}])&&fi(t.prototype,n),r&&fi(t,r),o}(u.Component);vi.defaultProps={classes:{},numTotal:void 0,searchHits:[],t:function(e){return e}};var mi=n(566),yi=Object(r.compose)(Object(i.b)((function(e,t){var n=t.companionWindowId,r=t.windowId;return{direction:Object(ae.h)(e),numTotal:Object(mi.i)(e,{companionWindowId:n,windowId:r}),searchHits:Object(mi.m)(e,{companionWindowId:n,windowId:r}),selectedContentSearchAnnotation:Object(mi.k)(e,{companionWindowId:n,windowId:r})}}),(function(e,t){var n=t.windowId;return{selectAnnotation:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e(fe.g.apply(D,[n].concat(r)))}}})),Object(a.a)((function(e){return{body2:{marginLeft:"-16px",width:"100%"}}})),Object(o.a)(),Object(s.a)("SearchPanelNavigation"))(vi);function bi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bi(Object(n),!0).forEach((function(t){_i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oi(e,t){return(Oi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Si(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ki(e);if(t){var i=ki(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ei(this,n)}}function Ei(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ci(e)}function Ci(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ki(e){return(ki=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ti=function(e){return Nr()(e)?e.match:e},ji=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oi(e,t)}(o,e);var t,n,r,i=Si(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={search:e.query,suggestions:[]},t.handleChange=t.handleChange.bind(Ci(t)),t.submitSearch=t.submitSearch.bind(Ci(t)),t.getSuggestions=t.getSuggestions.bind(Ci(t)),t.selectItem=t.selectItem.bind(Ci(t)),t.fetchAutocomplete=Mr()(t.fetchAutocomplete.bind(Ci(t)),500),t.receiveAutocomplete=t.receiveAutocomplete.bind(Ci(t)),t}return t=o,(n=[{key:"componentDidUpdate",value:function(e){var t=this.props.query;t!==e.query&&this.setState({search:t})}},{key:"handleChange",value:function(e,t,n){("reset"!==n||t)&&(this.setState({search:t,suggestions:[]}),t&&this.fetchAutocomplete(t))}},{key:"getSuggestions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.showEmpty,r=void 0!==n&&n,i=this.state.suggestions,o=Rr()(e.trim()).toLowerCase(),a=o.length;return 0!==a||r?i:[]}},{key:"fetchAutocomplete",value:function(e){var t=this.props.autocompleteService;t&&e&&fetch("".concat(t.id,"?q=").concat(e)).then((function(e){return e.json()})).then(this.receiveAutocomplete)}},{key:"receiveAutocomplete",value:function(e){this.setState({suggestions:e.terms})}},{key:"submitSearch",value:function(e){var t=this.props,n=t.companionWindowId,r=t.fetchSearch,i=t.searchService,o=t.windowId,a=this.state.search;e&&e.preventDefault(),a&&r(o,n,"".concat(i.id,"?q=").concat(a),a)}},{key:"selectItem",value:function(e,t,n){t&&Ti(t)&&this.setState({search:Ti(t)},this.submitSearch)}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.companionWindowId,r=e.searchIsFetching,i=e.t,o=e.windowId,a=this.state,s=a.search,c=a.suggestions,u="search-".concat(n);return l.a.createElement(l.a.Fragment,null,l.a.createElement("form",{onSubmit:this.submitSearch,className:t.form},l.a.createElement(ti,{id:u,inputValue:s,options:c,getOptionLabel:Ti,getOptionSelected:function(e,t){return Rr()(Ti(e).trim()).toLowerCase()===Rr()(Ti(t).trim()).toLowerCase()},noOptionsText:"",onChange:this.selectItem,onInputChange:this.handleChange,freeSolo:!0,renderInput:function(e){return l.a.createElement(ri.a,Object.assign({},e,{label:i("searchInputLabel"),InputProps:wi(wi({},e.InputProps),{},{endAdornment:l.a.createElement("div",{className:t.endAdornment},l.a.createElement(ve.a,{"aria-label":i("searchSubmitAria"),type:"submit"},l.a.createElement(oi.a,null)),Boolean(r)&&l.a.createElement(ni.a,{className:t.searchProgress,size:50}))})}))}})),l.a.createElement(yi,{windowId:o,companionWindowId:n}))}}])&&xi(t.prototype,n),r&&xi(t,r),o}(u.Component);ji.defaultProps={autocompleteService:void 0,classes:{},query:"",t:function(e){return e}};var Pi={fetchSearch:Pr.a},Ii=Object(r.compose)(Object(i.b)((function(e,t){var n=t.companionWindowId,r=t.windowId;return{autocompleteService:Object(tt.b)(e,{windowId:r}),query:Object(mi.j)(e,{companionWindowId:n,windowId:r}),searchIsFetching:Object(mi.h)(e,{companionWindowId:n,windowId:r}),searchService:Object(tt.l)(e,{windowId:r})}}),Pi),Object(a.a)((function(e){return{endAdornment:{position:"absolute",right:0},form:{paddingBottom:e.spacing(1),paddingRight:e.spacing(1.5),width:"100%"},searchProgress:{position:"absolute",right:0}}})),Object(o.a)(),Object(s.a)("SearchPanelControls"))(ji),Ri=n(1124),Ai=n(355),Mi=n.n(Ai),Di=n(366),Ni=n(1125);function Li(e){return function(e){if(Array.isArray(e))return zi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zi(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Wi=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.maxChars,o=void 0===i?200:i,a=r.minimum,s=void 0===a?20:a;Bi(this,e),this.hit=t,this.annotation=n,this.maxChars=o||200,this.minimum=s||20}var t,n,r;return t=e,(n=[{key:"match",get:function(){return this.hit.match||this.annotation&&this.annotation.resource.resource.chars||"-"}},{key:"charsOnSide",get:function(){var e=(this.maxChars-this.match.length)/2,t=[(this.hit.before||"").length,(this.hit.after||"").length].filter((function(e){return e>0}));return Math.max(Math.min.apply(Math,[e].concat(Li(t))),this.minimum)}},{key:"before",get:function(){return this.hit.before?this.hit.before.substring(this.hit.before.length-this.charsOnSide,this.hit.before.length):""}},{key:"after",get:function(){return this.hit.after?this.hit.after.substring(0,Math.min(this.hit.after.length,this.charsOnSide)):""}}])&&Fi(t.prototype,n),r&&Fi(t,r),e}();function Hi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ui(e,t){return(Ui=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$i(e);if(t){var i=$i(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gi(this,n)}}function Gi(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ki(e)}function Ki(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $i(e){return($i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ui(e,t)}(o,e);var t,n,r,i=qi(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleClick=t.handleClick.bind(Ki(t)),t}return t=o,(n=[{key:"componentDidMount",value:function(){this.props.selected&&this.announceHit()}},{key:"componentDidUpdate",value:function(e){var t=this.props.selected;t&&t!==e.selected&&this.announceHit()}},{key:"handleClick",value:function(){var e=this.props,t=e.annotation,n=e.annotationId,r=e.selectAnnotation;t&&n&&r(n)}},{key:"announceHit",value:function(){var e=this.props,t=e.annotation,n=e.annotationLabel,r=e.announcer,i=e.canvasLabel,o=e.hit,a=e.index,s=e.t,c=e.total;if(o){var u=new Wi(o,t);r([s("pagination",{current:a+1,total:c}),i,n,u.before,u.match,u.after].join(" "))}}},{key:"render",value:function(){var e,t=this.props,n=t.adjacent,r=t.annotation,i=t.annotationLabel,o=t.canvasLabel,a=t.classes,s=t.companionWindowId,c=t.containerRef,u=t.hit,f=t.focused,d=t.index,p=t.showDetails,h=t.selected,g=t.t,v=t.windowSelected;if(f&&!h)return null;var m=f?u:u&&new Wi(u,r),y=u&&m.before!==u.before&&m.after!==u.after,b="".concat(s,"-").concat(d);return l.a.createElement(Ne,{containerRef:c,offsetTop:96,scrollTo:v&&!f},l.a.createElement(Ni.a,{className:Object(Ee.a)(a.listItem,(e={},Hi(e,a.adjacent,n),Hi(e,a.selected,h),Hi(e,a.focused,f),Hi(e,a.windowSelected,v),e)),button:!h,component:"li",onClick:this.handleClick,selected:h},l.a.createElement(je.a,{primaryTypographyProps:{variant:"body1"}},l.a.createElement(le.a,{variant:"subtitle2",className:a.subtitle},l.a.createElement(Ce.a,{component:"span",label:d+1,className:a.hitCounter}),l.a.createElement("span",{id:b},o)),i&&l.a.createElement(le.a,{variant:"subtitle2"},i),u&&l.a.createElement(l.a.Fragment,null,l.a.createElement(Pe.a,{ruleSet:"iiif",htmlString:m.before})," ",l.a.createElement("strong",null,l.a.createElement(Pe.a,{ruleSet:"iiif",htmlString:m.match}))," ",l.a.createElement(Pe.a,{ruleSet:"iiif",htmlString:m.after})," ",y&&!f&&l.a.createElement(Et.a,{className:a.inlineButton,onClick:p,color:"secondary",size:"small","aria-describedby":b},g("more"))),!u&&r&&l.a.createElement(Pe.a,{ruleSet:"iiif",htmlString:r.chars}))))}}])&&Vi(t.prototype,n),r&&Vi(t,r),o}(u.Component);function Xi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xi(Object(n),!0).forEach((function(t){Yi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ji(e){return function(e){if(Array.isArray(e))return eo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eo(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Zi.defaultProps={adjacent:!1,annotation:void 0,annotationId:void 0,annotationLabel:void 0,canvasLabel:void 0,classes:{},companionWindowId:void 0,containerRef:void 0,focused:!1,hit:void 0,index:void 0,selectAnnotation:function(){},selected:!1,showDetails:function(){},t:function(e){return e},total:void 0,windowSelected:!1};var to=Object(r.compose)(Object(i.b)((function(e,t){var n=t.annotationId,r=t.hit,i=void 0===r?{annotations:[]}:r,o=t.companionWindowId,a=t.windowId,s=n||i.annotations[0],c=Object(mi.c)(e,{annotationUri:s,companionWindowId:o,windowId:a}),u=Object(mi.d)(e,{annotationUri:s,companionWindowId:o,windowId:a}),l=Object(N.getVisibleCanvasIds)(e,{windowId:a}),f=Object(mi.k)(e,{companionWindowId:o,windowId:a}),d=Object(ue.e)(e,{windowId:a}),p=[n].concat(Ji(i.annotations));return{adjacent:l.includes(c.targetId),annotation:c,annotationId:s,annotationLabel:u[0],canvasLabel:c&&Object(N.getCanvasLabel)(e,{canvasId:c.targetId,windowId:a}),selected:f[0]&&p.includes(f[0]),windowSelected:d&&p.includes(d)}}),(function(e,t){var n=t.windowId;return{selectAnnotation:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e(fe.g.apply(D,[n].concat(r)))}}})),Object(a.a)((function(e){return{adjacent:{},focused:{},hitCounter:Qi(Qi({},e.typography.subtitle2),{},{backgroundColor:e.palette.hitCounter.default,height:30,marginRight:e.spacing(1),verticalAlign:"inherit"}),inlineButton:{"& span":{lineHeight:"1.5em"},margin:0,padding:0,textTransform:"none"},listItem:{"&$adjacent":{"& $hitCounter":{backgroundColor:e.palette.highlights.secondary},"&$windowSelected":{"& $hitCounter":{backgroundColor:e.palette.highlights.primary}}},"&$windowSelected":{"& $hitCounter":{backgroundColor:e.palette.highlights.primary},"&$focused":{"&:hover":{backgroundColor:"inherit"},backgroundColor:"inherit"}},borderBottom:"0.5px solid ".concat(e.palette.divider),paddingRight:8},selected:{},subtitle:{marginBottom:e.spacing(1.5)},windowSelected:{}}})),Object(o.a)(),Object(s.a)("SearchHit"))(Zi);function no(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ro(e,t){return(ro=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function io(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=so(e);if(t){var i=so(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oo(this,n)}}function oo(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ao(e)}function ao(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function so(e){return(so=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var co=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ro(e,t)}(o,e);var t,n,r,i=io(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={focused:!1},t.toggleFocus=t.toggleFocus.bind(ao(t)),t}return t=o,(n=[{key:"toggleFocus",value:function(){var e=this.state.focused;this.setState({focused:!e})}},{key:"renderSearchHitsAndAnnotations",value:function(e){var t=this,n=this.props,r=n.companionWindowId,i=n.containerRef,o=n.searchAnnotations,a=n.searchHits,s=n.windowId,c=this.state.focused;return 0===a.length&&o.length>0?o.map((function(n,a){return l.a.createElement(to,{announcer:e,annotationId:n.id,companionWindowId:r,containerRef:i,key:n.id,focused:c,index:a,total:o.length,windowId:s,showDetails:t.toggleFocus})})):a.map((function(n,o){return l.a.createElement(to,{announcer:e,containerRef:i,companionWindowId:r,key:n.annotations[0],focused:c,hit:n,index:o,total:a.length,windowId:s,showDetails:t.toggleFocus})}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.companionWindowId,i=t.containerRef,o=t.isFetching,a=t.fetchSearch,s=t.nextSearch,c=t.query,u=t.searchAnnotations,f=t.searchHits,d=t.searchNumTotal,p=t.t,h=t.windowId,g=this.state.focused,v=c&&!o&&0===f.length&&0===u.length;return l.a.createElement(l.a.Fragment,null,g&&l.a.createElement(Ne,{containerRef:i,offsetTop:96,scrollTo:!0},l.a.createElement(Et.a,{onClick:this.toggleFocus,className:n.navigation,size:"small"},l.a.createElement(Mi.a,null),p("backToResults"))),v&&l.a.createElement(le.a,{className:n.noResults},p("searchNoResults")),l.a.createElement(Ri.a,{disablePadding:!0},l.a.createElement(Di.b,null,(function(t){var n=t.announcePolite;return e.renderSearchHitsAndAnnotations(n)}))),s&&l.a.createElement(Et.a,{className:n.moreButton,color:"secondary",onClick:function(){return a(h,r,s,c)}},p("moreResults"),l.a.createElement("br",null),"(".concat(p("searchResultsRemaining",{numLeft:d-f.length}),")")))}}])&&no(t.prototype,n),r&&no(t,r),o}(u.Component);function uo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uo(Object(n),!0).forEach((function(t){fo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}co.defaultProps={classes:{},containerRef:void 0,isFetching:!1,nextSearch:void 0,query:void 0,searchAnnotations:[],searchHits:[],searchNumTotal:void 0,t:function(e){return e}};var po={fetchSearch:Pr.a},ho=Object(r.compose)(Object(i.b)((function(e,t){var n=t.companionWindowId,r=t.windowId;return{isFetching:Object(mi.h)(e,{companionWindowId:n,windowId:r}),nextSearch:Object(mi.b)(e,{companionWindowId:n,windowId:r}),query:Object(mi.j)(e,{companionWindowId:n,windowId:r}),searchAnnotations:Object(mi.l)(e,{companionWindowId:n,windowId:r}),searchHits:Object(mi.m)(e,{companionWindowId:n,windowId:r}),searchNumTotal:Object(mi.i)(e,{companionWindowId:n,windowId:r})}}),po),Object(a.a)((function(e){return{moreButton:{width:"100%"},navigation:{textTransform:"none"},noResults:lo(lo({},e.typography.h6),{},{padding:e.spacing(2)}),toggleFocus:lo({},e.typography.subtitle1)}})),Object(o.a)(),Object(s.a)("SearchResults"))(co);function go(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vo(e,t){return(vo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bo(e);if(t){var i=bo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yo(this,n)}}function yo(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function bo(e){return(bo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vo(e,t)}(o,e);var t,n,r,i=mo(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).containerRef=l.a.createRef(),t}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.fetchSearch,r=e.windowId,i=e.id,o=e.query,a=e.removeSearch,s=e.searchService,c=e.suggestedSearches,u=e.t;return l.a.createElement(Ge.default,{ariaLabel:u("searchTitle"),title:l.a.createElement(l.a.Fragment,null,u("searchTitle"),o&&""!==o&&l.a.createElement(Ce.a,{className:t.clearChip,color:"secondary",label:u("clearSearch"),onClick:a,onDelete:a,size:"small",variant:"outlined"})),windowId:r,id:i,titleControls:l.a.createElement(Ii,{companionWindowId:i,windowId:r}),ref:this.containerRef},l.a.createElement(ho,{containerRef:this.containerRef,companionWindowId:i,windowId:r}),n&&c&&""===o&&c.map((function(e){return l.a.createElement(le.a,{component:"p",key:e,variant:"body1"},l.a.createElement(Et.a,{className:t.inlineButton,color:"secondary",onClick:function(){return n("".concat(s.id,"?q=").concat(e),e)}},u("suggestSearch",{query:e})))})))}}])&&go(t.prototype,n),r&&go(t,r),o}(u.Component);wo.defaultProps={classes:{},fetchSearch:void 0,query:"",suggestedSearches:[],t:function(e){return e}};var _o=Object(r.compose)(Object(i.b)((function(e,t){var n=t.id,r=t.windowId;return{query:Object(mi.j)(e,{companionWindowId:n,windowId:r}),searchService:Object(tt.l)(e,{windowId:r}),suggestedSearches:Object(oe.e)(e,{windowId:r}).suggestedSearches}}),(function(e,t){return{fetchSearch:function(n,r){return e(Pr.a(t.windowId,t.id,n,r))},removeSearch:function(){return e(Pr.d(t.windowId,t.id))}}})),Object(a.a)((function(e){return{clearChip:{marginLeft:e.spacing(1)},inlineButton:{"& span":{lineHeight:"1.5em"},margin:e.spacing(2),padding:0,textAlign:"inherit",textTransform:"none"}}})),Object(o.a)(),Object(s.a)("SearchPanel"))(wo),xo=n(564),Oo=n(321),So=n(126),Eo=n(761),Co=n(1161),ko=n(1178),To=n(708),jo=n.n(To),Po=n(706),Io=n.n(Po),Ro=n(707),Ao=n.n(Ro);function Mo(e,t){var n=Object(u.useState)((function(){return{inputs:t,result:e()}}))[0],r=Object(u.useRef)(!0),i=Object(u.useRef)(n),o=r.current||Boolean(t&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.current.inputs))?i.current:{inputs:t,result:e()};return Object(u.useEffect)((function(){r.current=!1,i.current=o}),[o]),o.result}var Do=Mo,No=function(e,t){return Mo((function(){return e}),t)};var Lo=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},zo=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Bo=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Fo={top:0,right:0,bottom:0,left:0},Wo=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Fo:n,i=e.border,o=void 0===i?Fo:i,a=e.padding,s=void 0===a?Fo:a,c=Lo(zo(t,r)),u=Lo(Bo(t,o)),l=Lo(Bo(u,s));return{marginBox:c,borderBox:Lo(t),paddingBox:u,contentBox:l,margin:r,border:o,padding:s}},Ho=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e,t){if(!e)throw new Error("Invariant failed")}(!1),n},Vo=function(e,t){var n,r,i=e.borderBox,o=e.border,a=e.margin,s=e.padding,c=(r=t,{top:(n=i).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return Wo({borderBox:c,border:o,margin:a,padding:s})},Uo=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Vo(e,t)},qo=function(e,t){var n={top:Ho(t.marginTop),right:Ho(t.marginRight),bottom:Ho(t.marginBottom),left:Ho(t.marginLeft)},r={top:Ho(t.paddingTop),right:Ho(t.paddingRight),bottom:Ho(t.paddingBottom),left:Ho(t.paddingLeft)},i={top:Ho(t.borderTopWidth),right:Ho(t.borderRightWidth),bottom:Ho(t.borderBottomWidth),left:Ho(t.borderLeftWidth)};return Wo({borderBox:e,margin:n,padding:r,border:i})},Go=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return qo(t,n)},Ko=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t=i,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r},$o=n(33),Zo=n.n($o);function Xo(e,t){}Xo.bind(null,"warn"),Xo.bind(null,"error");function Qo(){}function Yo(e,t,n){var r=t.map((function(t){var r,i,o=(r=n,i=t.options,Object(p.a)({},r,{},i));return e.addEventListener(t.eventName,t.fn,o),function(){e.removeEventListener(t.eventName,t.fn,o)}}));return function(){r.forEach((function(e){e()}))}}function Jo(e){this.message=e}function ea(e,t){if(!e)throw new Jo("Invariant failed")}Jo.prototype.toString=function(){return this.message};var ta=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=Qo,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof Jo&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}Object(h.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=Yo(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof Jo))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(l.a.Component),na=function(e){return e+1},ra=function(e,t){var n=e.droppableId===t.droppableId,r=na(e.index),i=na(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+i+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+i+"\n "},ia=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},oa=function(e){return"\n The item has returned to its starting position\n of "+na(e.index)+"\n"},aa="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",sa=function(e){return"\n You have lifted an item in position "+na(e.source.index)+"\n"},ca=function(e){var t=e.destination;if(t)return ra(e.source,t);var n=e.combine;return n?ia(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},ua=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+oa(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+ra(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+ia(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+oa(e.source)+"\n "},la={x:0,y:0},fa=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},da=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},pa=function(e,t){return e.x===t.x&&e.y===t.y},ha=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},ga=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},va=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},ma=function(e,t){return Math.min.apply(Math,t.map((function(t){return va(e,t)})))},ya=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},ba=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},wa=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},_a=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=Lo({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):Lo(e)},xa=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=function(e,t,n){var r;return n&&n.increasedBy?Object(p.a)({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(function(e,t){return t?ba(e,t.scroll.diff.displacement):e}(t.marginBox,i),r,n);return{page:t,withPlaceholder:n,active:_a(o,i)}},Oa=function(e,t){e.frame||ea(!1);var n=e.frame,r=da(t,n.scroll.initial),i=ha(r),o=Object(p.a)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),a=xa({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o});return Object(p.a)({},e,{frame:o,subject:a})};function Sa(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function Ea(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function Ca(e,t){if(e.find)return e.find(t);var n=Ea(e,t);return-1!==n?e[n]:void 0}function ka(e){return Array.prototype.slice.call(e)}var Ta=y((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),ja=y((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),Pa=y((function(e){return Sa(e)})),Ia=y((function(e){return Sa(e)})),Ra=y((function(e,t){return Ia(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}))}));function Aa(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Ma(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Da=y((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),Na=function(e,t){return e.descriptor.droppableId===t.descriptor.id},La={point:la,value:0},za={invisible:{},visible:{},all:[]},Ba={displaced:za,displacedBy:La,at:null},Fa=function(e,t){return function(n){return e<=n&&n<=t}},Wa=function(e){var t=Fa(e.top,e.bottom),n=Fa(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var i=t(r.top)||t(r.bottom),o=n(r.left)||n(r.right);if(i&&o)return!0;var a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return!(!a||!s)||(a&&o||s&&i)}},Ha=function(e){var t=Fa(e.top,e.bottom),n=Fa(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},Va={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Ua={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},qa=function(e){var t=e.target,n=e.destination,r=e.viewport,i=e.withDroppableDisplacement,o=e.isVisibleThroughFrameFn,a=i?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:la;return ba(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,o)&&function(e,t,n){return n(t)(e)}(a,r,o)},Ga=function(e){return qa(Object(p.a)({},e,{isVisibleThroughFrameFn:Wa}))},Ka=function(e){return qa(Object(p.a)({},e,{isVisibleThroughFrameFn:Ha}))};function $a(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return t.reduce((function(e,t){var s=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Lo(zo(n,r))}(t,r),c=t.descriptor.id;if(e.all.push(c),!Ga({target:s,destination:n,viewport:i,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var u={draggableId:c,shouldAnimate:function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,i=t.visible;if(r[e])return!1;var o=i[e];return!o||o.shouldAnimate}(c,a,o)};return e.visible[c]=u,e}),{all:[],visible:{},invisible:{}})}function Za(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:za,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Xa(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,s=e.index,c=e.forceShouldAnimate,u=Na(t,r);if(null==s)return Za({insideDestination:n,inHomeList:u,displacedBy:o,destination:r});var l=Ca(n,(function(e){return e.descriptor.index===s}));if(!l)return Za({insideDestination:n,inHomeList:u,displacedBy:o,destination:r});var f=Da(t,n),d=n.indexOf(l);return{displaced:$a({afterDragging:f.slice(d),destination:r,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:c}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function Qa(e,t){return Boolean(t.effected[e])}var Ya=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,s=e.previousImpact,c=e.viewport,u=e.afterCritical,l=s.at;if(l||ea(!1),"REORDER"===l.type){var f=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,a=t?o+1:o-1,s=r[0].descriptor.index,c=r[r.length-1].descriptor.index;return a<s||a>(n?c:c+1)?null:a}({isMovingForward:t,isInHomeList:n,location:l.destination,insideDestination:a});return null==f?null:Xa({draggable:r,insideDestination:a,destination:o,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:f})}var d=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var a=i.draggableId,s=r[a].descriptor.index;return Qa(a,o)?t?s:s-1:t?s+1:s}({isMovingForward:t,destination:o,displaced:s.displaced,draggables:i,combine:l.combine,afterCritical:u});return null==d?null:Xa({draggable:r,insideDestination:a,destination:o,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:d})},Ja=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=Ma(n);i||ea(!1);var o=i.draggableId,a=r[o].page.borderBox.center,s=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=Boolean(t.visible[r]||t.invisible[r]);return Qa(r,n)?o?la:ha(i.point):o?i.point:la}({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return fa(a,s)},es=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},ts=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},ns=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return ga(t.line,n.marginBox[t.end]+es(t,r),ts(t,n.marginBox,r))},rs=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return ga(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),ts(t,n.marginBox,r))},is=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,a=Ra(i.descriptor.id,r),s=n.page,c=i.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return ga(t.line,n.contentBox[t.start]+es(t,r),ts(t,n.contentBox,r))}({axis:c,moveInto:i.page,isMoving:s});var u=t.displaced,l=t.displacedBy,f=u.all[0];if(f){var d=r[f];if(Qa(f,o))return rs({axis:c,moveRelativeTo:d.page,isMoving:s});var p=Vo(d.page,l.point);return rs({axis:c,moveRelativeTo:p,isMoving:s})}var h=a[a.length-1];if(h.descriptor.id===n.descriptor.id)return s.borderBox.center;if(Qa(h.descriptor.id,o)){var g=Vo(h.page,ha(o.displacedBy.point));return ns({axis:c,moveRelativeTo:g,isMoving:s})}return ns({axis:c,moveRelativeTo:h.page,isMoving:s})},os=function(e,t){var n=e.frame;return n?fa(t,n.scroll.diff.displacement):t},as=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.afterCritical,a=n.page.borderBox.center,s=t.at;return r&&s?"REORDER"===s.type?is({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:o}):Ja({impact:t,draggables:i,afterCritical:o}):a}(e),n=e.droppable;return n?os(n,t):t},ss=function(e,t){var n=da(t,e.scroll.initial),r=ha(n);return{frame:Lo({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function cs(e,t){return e.map((function(e){return t[e]}))}var us=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=function(e,t){return fa(e.scroll.diff.displacement,t)}(e.viewport,t),i=da(r,n.page.borderBox.center);return fa(n.client.borderBox.center,i)},ls=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,s=void 0!==a&&a,c=da(r,t.page.borderBox.center),u={target:ba(t.page.borderBox,c),destination:n,withDroppableDisplacement:o,viewport:i};return s?function(e){return qa(Object(p.a)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=Fa(e.top,e.bottom),r=Fa(e.left,e.right);return function(e){return t===Va?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(u):Ka(u)},fs=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,s=e.previousPageBorderBoxCenter,c=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var l=Ra(r.descriptor.id,i),f=Na(n,r),d=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;if(!Aa(o))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return Object(p.a)({},o,{at:t})}var s=o.displaced.all,c=s.length?s[0]:null;if(t)return c?a(c):null;var u=Da(n,i);if(!c)return u.length?a(u[u.length-1].descriptor.id):null;var l=Ea(u,(function(e){return e.descriptor.id===c}));-1===l&&ea(!1);var f=l-1;return f<0?null:a(u[f].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:l,previousImpact:o})||Ya({isMovingForward:t,isInHomeList:f,draggable:n,draggables:i,destination:r,insideDestination:l,previousImpact:o,viewport:a,afterCritical:u});if(!d)return null;var h=as({impact:d,draggable:n,droppable:r,draggables:i,afterCritical:u});if(ls({draggable:n,destination:r,newPageBorderBoxCenter:h,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:us({pageBorderBoxCenter:h,draggable:n,viewport:a}),impact:d,scrollJumpRequest:null};var g=da(h,s);return{clientSelection:c,impact:function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,o=e.maxScrollChange,a=ss(n,fa(n.scroll.current,o)),s=r.frame?Oa(r,fa(r.frame.scroll.current,o)):r,c=t.displaced,u=$a({afterDragging:cs(c.all,i),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:c,forceShouldAnimate:!1}),l=$a({afterDragging:cs(c.all,i),destination:s,displacedBy:t.displacedBy,viewport:n.frame,last:c,forceShouldAnimate:!1}),f={},d={},h=[c,u,l];return c.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,h);t?d[e]=t:f[e]=!0})),Object(p.a)({},t,{displaced:{all:c.all,invisible:f,visible:d}})}({impact:d,viewport:a,destination:r,draggables:i,maxScrollChange:g}),scrollJumpRequest:g}},ds=function(e){var t=e.subject.active;return t||ea(!1),t},ps=function(e,t){var n=e.page.borderBox.center;return Qa(e.descriptor.id,t)?da(n,t.displacedBy.point):n},hs=function(e,t){var n=e.page.borderBox;return Qa(e.descriptor.id,t)?ba(n,ha(t.displacedBy.point)):n},gs=y((function(e,t){var n=t[e.line];return{value:n,point:ga(e.line,n)}})),vs=function(e,t){return Object(p.a)({},e,{scroll:Object(p.a)({},e.scroll,{max:t})})},ms=function(e,t,n){var r=e.frame;Na(t,e)&&ea(!1),e.subject.withPlaceholder&&ea(!1);var i=gs(e.axis,t.displaceBy).point,o=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return ga(r.line,t[r.line]);var i=e.subject.page.contentBox[r.size],o=Ra(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[r.size]}),0)+t[r.line]-i;return o<=0?null:ga(r.line,o)}(e,i,n),a={placeholderSize:i,increasedBy:o,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){var s=xa({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return Object(p.a)({},e,{subject:s})}var c=o?fa(r.scroll.max,o):r.scroll.max,u=vs(r,c),l=xa({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:u});return Object(p.a)({},e,{subject:l,frame:u})},ys=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,s=e.viewport,c=e.afterCritical,u=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,o=e.viewport,a=r.subject.active;if(!a)return null;var s=r.axis,c=Fa(a[s.start],a[s.end]),u=Pa(i).filter((function(e){return e!==r})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return Wa(o.frame)(ds(e))})).filter((function(e){var n=ds(e);return t?a[s.crossAxisEnd]<n[s.crossAxisEnd]:n[s.crossAxisStart]<a[s.crossAxisStart]})).filter((function(e){var t=ds(e),n=Fa(t[s.start],t[s.end]);return c(t[s.start])||c(t[s.end])||n(a[s.start])||n(a[s.end])})).sort((function(e,n){var r=ds(e)[s.crossAxisStart],i=ds(n)[s.crossAxisStart];return t?r-i:i-r})).filter((function(e,t,n){return ds(e)[s.crossAxisStart]===ds(n[0])[s.crossAxisStart]}));if(!u.length)return null;if(1===u.length)return u[0];var l=u.filter((function(e){return Fa(ds(e)[s.start],ds(e)[s.end])(n[s.line])}));return 1===l.length?l[0]:l.length>1?l.sort((function(e,t){return ds(e)[s.start]-ds(t)[s.start]}))[0]:u.sort((function(e,t){var r=ma(n,wa(ds(e))),i=ma(n,wa(ds(t)));return r!==i?r-i:ds(e)[s.start]-ds(t)[s.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:s});if(!u)return null;var l=Ra(u.descriptor.id,o),f=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,s=e.viewport,c=e.afterCritical;if(!n){if(r.length)return null;var u={displaced:za,displacedBy:La,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},l=as({impact:u,draggable:i,droppable:a,draggables:o,afterCritical:c}),f=Na(i,a)?a:ms(a,i,o);return ls({draggable:i,destination:f,newPageBorderBoxCenter:l,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?u:null}var d,p=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),h=(d=n.descriptor.index,n.descriptor.id===i.descriptor.id||p?d:d+1),g=gs(a.axis,i.displaceBy);return Xa({draggable:i,insideDestination:r,destination:a,viewport:s,displacedBy:g,last:za,index:h})}({previousPageBorderBoxCenter:n,destination:u,draggable:r,draggables:o,moveRelativeTo:function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical;return i.filter((function(e){return Ka({target:hs(e,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var i=va(t,os(r,ps(e,o))),a=va(t,os(r,ps(n,o)));return i<a?-1:a<i?1:e.descriptor.index-n.descriptor.index}))[0]||null}({pageBorderBoxCenter:n,viewport:s,destination:u,insideDestination:l,afterCritical:c}),insideDestination:l,viewport:s,afterCritical:c});if(!f)return null;var d=as({impact:f,draggable:r,droppable:u,draggables:o,afterCritical:c});return{clientSelection:us({pageBorderBoxCenter:d,draggable:r,viewport:s}),impact:f,scrollJumpRequest:null}},bs=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},ws=function(e){var t=e.state,n=e.type,r=function(e,t){var n=bs(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),i=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],a=r||o,s=a.axis.direction,c="vertical"===s&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===s&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(c&&!i)return null;var u="MOVE_DOWN"===n||"MOVE_RIGHT"===n,l=t.dimensions.draggables[t.critical.draggable.id],f=t.current.page.borderBoxCenter,d=t.dimensions,p=d.draggables,h=d.droppables;return c?fs({isMovingForward:u,previousPageBorderBoxCenter:f,draggable:l,destination:a,draggables:p,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):ys({isMovingForward:u,previousPageBorderBoxCenter:f,draggable:l,isOver:a,draggables:p,droppables:h,viewport:t.viewport,afterCritical:t.afterCritical})};function _s(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function xs(e){var t=Fa(e.top,e.bottom),n=Fa(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function Os(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=Pa(r).filter((function(e){if(!e.isEnabled)return!1;var n,r,i=e.subject.active;if(!i)return!1;if(r=i,!((n=t).left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top))return!1;if(xs(i)(t.center))return!0;var o=e.axis,a=i.center[o.crossAxisLine],s=t[o.crossAxisStart],c=t[o.crossAxisEnd],u=Fa(i[o.crossAxisStart],i[o.crossAxisEnd]),l=u(s),f=u(c);return!l&&!f||(l?s<a:c>a)}));return i.length?1===i.length?i[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map((function(e){var n=e.axis,r=ga(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:va(i,r)}})).sort((function(e,t){return t.distance-e.distance}));return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:i}):null}var Ss=function(e,t){return Lo(ba(e,t))};function Es(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var Cs=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,s=e.afterCritical,c=Ss(n.page.borderBox,t),u=Os({pageBorderBox:c,draggable:n,droppables:i});if(!u)return Ba;var l,f,d=i[u],p=Ra(d.descriptor.id,r),h=(l=c,(f=d.frame)?Ss(l,f.scroll.diff.value):l);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var s=i.axis,c=gs(i.axis,t.displaceBy),u=c.value,l=n[s.start],f=n[s.end],d=Ca(Da(t,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox,i=n[s.size]/4,o=Qa(t,a),c=Es({displaced:r.displaced,id:t});return o?c?f>n[s.start]+i&&f<n[s.end]-i:l>n[s.start]-u+i&&l<n[s.end]-u-i:c?f>n[s.start]+u+i&&f<n[s.end]+u-i:l>n[s.start]+i&&l<n[s.end]-i}));return d?{displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:d.descriptor.id,droppableId:i.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:o,destination:d,insideDestination:p,afterCritical:s})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,s=e.afterCritical,c=r.axis,u=gs(r.axis,n.displaceBy),l=u.value,f=t[c.start],d=t[c.end],p=function(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:Ca(Da(n,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[c.line],r=Qa(t,s),i=Es({displaced:o,id:t});return r?i?d<=n:f<n-l:i?d<=n+l:f<n})),inHomeList:Na(n,r)});return Xa({draggable:n,insideDestination:i,destination:r,viewport:a,last:o,displacedBy:u,index:p})}({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:d,insideDestination:p,last:o.displaced,viewport:a,afterCritical:s})},ks=function(e,t){var n;return Object(p.a)({},e,((n={})[t.descriptor.id]=t,n))},Ts=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,i=bs(t),o=bs(n);if(!i)return r;if(i===o)return r;var a=r[i];if(!a.subject.withPlaceholder)return r;var s=function(e){var t=e.subject.withPlaceholder;t||ea(!1);var n=e.frame;if(!n){var r=xa({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return Object(p.a)({},e,{subject:r})}var i=t.oldFrameMaxScroll;i||ea(!1);var o=vs(n,i),a=xa({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return Object(p.a)({},e,{subject:a,frame:o})}(a);return ks(r,s)},js=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,s=i||t.viewport,c=r||t.dimensions,u=n||t.current.client.selection,l=da(u,t.initial.client.selection),f={offset:l,selection:u,borderBoxCenter:fa(t.initial.client.borderBoxCenter,l)},d={selection:fa(f.selection,s.scroll.current),borderBoxCenter:fa(f.borderBoxCenter,s.scroll.current),offset:fa(f.offset,s.scroll.diff.value)},h={client:f,page:d};if("COLLECTING"===t.phase)return Object(p.a)({phase:"COLLECTING"},t,{dimensions:c,viewport:s,current:h});var g=c.draggables[t.critical.draggable.id],v=o||Cs({pageOffset:d.offset,draggable:g,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:s,afterCritical:t.afterCritical}),m=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,a=Ts({previousImpact:i,impact:o,droppables:r}),s=bs(o);if(!s)return a;var c=r[s];if(Na(t,c))return a;if(c.subject.withPlaceholder)return a;var u=ms(c,t,n);return ks(a,u)}({draggable:g,impact:v,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables});return Object(p.a)({},t,{current:h,dimensions:{draggables:c.draggables,droppables:m},impact:v,viewport:s,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})};var Ps=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=t.displaced,s=$a({afterDragging:function(e,t){return e.map((function(e){return t[e]}))}(a.all,r),destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:a});return Object(p.a)({},t,{displaced:s})},Is=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,s=as({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a});return us({pageBorderBoxCenter:s,draggable:n,viewport:o})},Rs=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&ea(!1);var i=t.impact,o=r||t.viewport,a=n||t.dimensions,s=a.draggables,c=a.droppables,u=s[t.critical.draggable.id],l=bs(i);l||ea(!1);var f=c[l],d=Ps({impact:i,viewport:o,destination:f,draggables:s}),p=Is({impact:d,draggable:u,droppable:f,draggables:s,viewport:o,afterCritical:t.afterCritical});return js({impact:d,clientSelection:p,state:t,dimensions:a,viewport:o})},As=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=gs(n.axis,t.displaceBy),a=Ra(n.descriptor.id,r),s=a.indexOf(t);-1===s&&ea(!1);var c,u=a.slice(s+1),l=u.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),f={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:o,effected:l};return{impact:{displaced:$a({afterDragging:u,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(c=t.descriptor,{index:c.index,droppableId:c.droppableId})}},afterCritical:f}},Ms=function(e){0},Ds=function(e){0},Ns=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,o=function(e){var t=e.frame;return t||ea(!1),t}(n[t]).scroll.diff.value;return function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=Vo(t.client,n),o=Uo(i,r);return Object(p.a)({},t,{placeholder:Object(p.a)({},t.placeholder,{client:i}),client:i,page:o})}({draggable:e,offset:fa(i,o),initialWindowScroll:r.scroll.initial})}))},Ls=function(e){return"SNAP"===e.movementMode},zs=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:ks(e.droppables,t)}}(e.dimensions,t);return!Ls(e)||n?js({state:e,dimensions:r}):Rs({state:e,dimensions:r})};function Bs(e){return e.isDragging&&"SNAP"===e.movementMode?Object(p.a)({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Fs={phase:"IDLE",completed:null,shouldFlush:!1},Ws=function(e,t){if(void 0===e&&(e=Fs),"FLUSH"===t.type)return Object(p.a)({},Fs,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&ea(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,a=n.dimensions,s=n.movementMode,c=a.draggables[r.draggable.id],u=a.droppables[r.droppable.id],l={selection:i,borderBoxCenter:c.client.borderBox.center,offset:la},f={client:l,page:{selection:fa(l.selection,o.scroll.initial),borderBoxCenter:fa(l.selection,o.scroll.initial),offset:fa(l.selection,o.scroll.diff.value)}},d=Pa(a.droppables).every((function(e){return!e.isFixedOnPage})),h=As({draggable:c,home:u,draggables:a.draggables,viewport:o}),g=h.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:s,dimensions:a,initial:f,current:f,isWindowScrollAllowed:d,impact:g,afterCritical:h.afterCritical,onLiftImpact:g,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&ea(!1),Object(p.a)({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&ea(!1),function(e){var t=e.state,n=e.published;Ms();var r=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return Oa(n,e.scroll)})),i=Object(p.a)({},t.dimensions.droppables,{},Ta(r)),o=ja(Ns({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),a=Object(p.a)({},t.dimensions.draggables,{},o);n.removals.forEach((function(e){delete a[e]}));var s={droppables:i,draggables:a},c=bs(t.impact),u=c?s.droppables[c]:null,l=s.draggables[t.critical.draggable.id],f=s.droppables[t.critical.droppable.id],d=As({draggable:l,home:f,draggables:a,viewport:t.viewport}),h=d.impact,g=d.afterCritical,v=u&&u.isCombineEnabled?t.impact:h,m=Cs({pageOffset:t.current.page.offset,draggable:s.draggables[t.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:v,viewport:t.viewport,afterCritical:g});Ds();var y=Object(p.a)({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:m,onLiftImpact:h,dimensions:s,afterCritical:g,forceShouldAnimate:!1});return"COLLECTING"===t.phase?y:Object(p.a)({phase:"DROP_PENDING"},y,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;_s(e)||ea(!1);var v=t.payload.client;return pa(v,e.current.client.selection)?e:js({state:e,clientSelection:v,impact:Ls(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return Bs(e);if("COLLECTING"===e.phase)return Bs(e);_s(e)||ea(!1);var m=t.payload,y=m.id,b=m.newScroll,w=e.dimensions.droppables[y];if(!w)return e;var _=Oa(w,b);return zs(e,_,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;_s(e)||ea(!1);var x=t.payload,O=x.id,S=x.isEnabled,E=e.dimensions.droppables[O];E||ea(!1),E.isEnabled===S&&ea(!1);var C=Object(p.a)({},E,{isEnabled:S});return zs(e,C,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;_s(e)||ea(!1);var k=t.payload,T=k.id,j=k.isCombineEnabled,P=e.dimensions.droppables[T];P||ea(!1),P.isCombineEnabled===j&&ea(!1);var I=Object(p.a)({},P,{isCombineEnabled:j});return zs(e,I,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;_s(e)||ea(!1),e.isWindowScrollAllowed||ea(!1);var R=t.payload.newScroll;if(pa(e.viewport.scroll.current,R))return Bs(e);var A=ss(e.viewport,R);return Ls(e)?Rs({state:e,viewport:A}):js({state:e,viewport:A})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!_s(e))return e;var M=t.payload.maxScroll;if(pa(M,e.viewport.scroll.max))return e;var D=Object(p.a)({},e.viewport,{scroll:Object(p.a)({},e.viewport.scroll,{max:M})});return Object(p.a)({phase:"DRAGGING"},e,{viewport:D})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&ea(!1);var N=ws({state:e,type:t.type});return N?js({state:e,impact:N.impact,clientSelection:N.clientSelection,scrollJumpRequest:N.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var L=t.payload.reason;return"COLLECTING"!==e.phase&&ea(!1),Object(p.a)({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:L})}if("DROP_ANIMATE"===t.type){var z=t.payload,B=z.completed,F=z.dropDuration,W=z.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&ea(!1),{phase:"DROP_ANIMATING",completed:B,dropDuration:F,newHomeClientOffset:W,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},Hs=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},Vs=function(){return{type:"COLLECTION_STARTING",payload:null}},Us=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},qs=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Gs=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Ks=function(e){return{type:"MOVE",payload:e}},$s=function(){return{type:"MOVE_UP",payload:null}},Zs=function(){return{type:"MOVE_DOWN",payload:null}},Xs=function(){return{type:"MOVE_RIGHT",payload:null}},Qs=function(){return{type:"MOVE_LEFT",payload:null}},Ys=function(e){return{type:"DROP_COMPLETE",payload:e}},Js=function(e){return{type:"DROP",payload:e}},ec=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};var tc="cubic-bezier(.2,1,.1,1)",nc={drop:0,combining:.7},rc={drop:.75},ic=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",oc={fluid:"opacity "+ic,snap:"transform "+ic+", opacity "+ic,drop:function(e){var t=e+"s "+tc;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+ic,placeholder:"height "+ic+", width "+ic+", margin "+ic},ac=function(e){return pa(e,la)?null:"translate("+e.x+"px, "+e.y+"px)"},sc=ac,cc=function(e,t){var n=ac(e);return n?t?n+" scale("+rc.drop+")":n:null},uc=.33,lc=.55,fc=lc-uc,dc=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var i=t(),o=r.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&ea(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&ea(!1);var a=i.critical,s=i.dimensions,c=s.draggables[i.critical.draggable.id],u=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:Object(p.a)({},r,{displaced:za}),didDropInsideDroppable:!0}:{impact:Ps({draggables:t,impact:a,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:o,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),l=u.impact,f=u.didDropInsideDroppable,d=f?Aa(l):null,h=f?Ma(l):null,g={index:a.draggable.index,droppableId:a.droppable.id},v={draggableId:c.descriptor.id,type:c.descriptor.type,source:g,reason:o,mode:i.movementMode,destination:d,combine:h},m=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,a=r.draggables,s=r.droppables,c=bs(t),u=c?s[c]:null,l=s[n.descriptor.droppableId],f=Is({impact:t,draggable:n,draggables:a,afterCritical:o,droppable:u||l,viewport:i});return da(f,n.client.borderBox.center)}({impact:l,draggable:c,dimensions:s,viewport:i.viewport,afterCritical:i.afterCritical}),y={critical:i.critical,afterCritical:i.afterCritical,result:v,impact:l};if(!pa(i.current.client.offset,m)||Boolean(v.combine)){var b=function(e){var t=e.current,n=e.destination,r=e.reason,i=va(t,n);if(i<=0)return uc;if(i>=1500)return lc;var o=uc+fc*(i/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))}({current:i.current.client.offset,destination:m,reason:o});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:m,dropDuration:b,completed:y}))}else n(Ys({completed:y}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:o}))}else e(r)}}},pc=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function hc(e){var t=e.onWindowScroll;var n,r=Ko((function(){t(pc())})),i=(n=r,{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(e){e.target!==window&&e.target!==window.document||n()}}),o=Qo;function a(){return o!==Qo}return{start:function(){a()&&ea(!1),o=Yo(window,[i])},stop:function(){a()||ea(!1),r.cancel(),o(),o=Qo},isActive:a}}var gc=function(e){var t=hc({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},vc=function(){var e=[];return{add:function(t){var n=setTimeout((function(){return function(t){var n=Ea(e,(function(e){return e.timerId===t}));-1===n&&ea(!1),e.splice(n,1)[0].callback()}(n)})),r={timerId:n,callback:t};e.push(r)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},mc=function(e,t){Ms(),t(),Ds()},yc=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},bc=function(e,t,n,r){if(e){var i=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),i=function(i){t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=function(){return t},i}(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}else n(r(t))},wc=function(e,t){var n=function(e,t){var n=vc(),r=null,i=function(n){r||ea(!1),r=null,mc(0,(function(){return bc(e().onDragEnd,n,t,ua)}))};return{beforeCapture:function(t,n){r&&ea(!1),mc(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){r&&ea(!1),mc(0,(function(){var r=e().onBeforeDragStart;r&&r(yc(t,n))}))},start:function(i,o){r&&ea(!1);var a=yc(i,o);r={mode:o,lastCritical:i,lastLocation:a.source,lastCombine:null},n.add((function(){mc(0,(function(){return bc(e().onDragStart,a,t,sa)}))}))},update:function(i,o){var a=Aa(o),s=Ma(o);r||ea(!1);var c=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(i,r.lastCritical);c&&(r.lastCritical=i);var u,l,f=(u=r.lastLocation,l=a,!(null==u&&null==l||null!=u&&null!=l&&u.droppableId===l.droppableId&&u.index===l.index));f&&(r.lastLocation=a);var d=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&(e.draggableId===t.draggableId&&e.droppableId===t.droppableId)}(r.lastCombine,s);if(d&&(r.lastCombine=s),c||f||d){var h=Object(p.a)({},yc(i,r.mode),{combine:s,destination:a});n.add((function(){mc(0,(function(){return bc(e().onDragUpdate,h,t,ca)}))}))}},flush:function(){r||ea(!1),n.flush()},drop:i,abort:function(){if(r){var e=Object(p.a)({},yc(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var i=r.payload.critical;return n.beforeStart(i,r.payload.movementMode),t(r),void n.start(i,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var o=r.payload.completed.result;return n.flush(),t(r),void n.drop(o)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},_c=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&ea(!1),e.dispatch(Ys({completed:r.completed}))}else t(n)}}},xc=function(e){var t=null,n=null;return function(r){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(i),"DROP_ANIMATE"===i.type){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=Yo(window,[o])}))}}}},Oc=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Js({reason:r.reason})))}}}},Sc=r.compose,Ec=function(e){var t,n=e.dimensionMarshal,i=e.focusMarshal,o=e.styleMarshal,a=e.getResponders,s=e.announce,c=e.autoScroller;return Object(r.createStore)(Ws,Sc(Object(r.applyMiddleware)((t=o,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(i){if("LIFT"===i.type){var o=i.payload,a=o.id,s=o.clientSelection,c=o.movementMode,u=n();"DROP_ANIMATING"===u.phase&&r(Ys({completed:u.completed})),"IDLE"!==n().phase&&ea(!1),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:c}});var l={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===c}},f=e.startPublishing(l),d=f.critical,p=f.dimensions,h=f.viewport;r(function(e){return{type:"INITIAL_PUBLISH",payload:e}}({critical:d,dimensions:p,clientSelection:s,movementMode:c,viewport:h}))}else t(i)}}}}(n),dc,_c,xc,Oc,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var i=t.getState();return"DRAGGING"!==i.phase&&ea(!1),void e.start(i)}n(r),e.scroll(t.getState())}}}}(c),gc,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(i),wc(a,s))))};var Cc=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=da({x:n,y:t},{x:i,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},kc=function(){var e=document.documentElement;return e||ea(!1),e},Tc=function(){var e=kc();return Cc({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},jc=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;Ms();var i,o,a,s,c,u,l,f=(i=pc(),o=Tc(),a=i.y,s=i.x,c=kc(),u=c.clientWidth,l=c.clientHeight,{frame:Lo({top:a,left:s,right:s+u,bottom:a+l}),scroll:{initial:i,current:i,max:o,diff:{value:la,displacement:la}}}),d=f.scroll.current,p=t.droppable,h=r.droppable.getAllByType(p.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(d,n)})),g=r.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(d)})),v={draggables:ja(g),droppables:Ta(h)};return Ds(),{dimensions:v,critical:t,viewport:f}};function Pc(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var Ic,Rc,Ac=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame((function(){i=null,Ms();var e=r,o=e.additions,a=e.removals,s=e.modified,c=Object.keys(o).map((function(e){return t.draggable.getById(e).getDimension(la)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),u=Object.keys(s).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),l={additions:c,removals:Object.keys(a),modified:u};r={additions:{},removals:{},modified:{}},Ds(),n.publish(l)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:function(){i&&(cancelAnimationFrame(i),i=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(t){n||ea(!1);var i=n.critical.draggable;"ADDITION"===t.type&&Pc(e,i,t.value)&&r.add(t.value),"REMOVAL"===t.type&&Pc(e,i,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:function(r,i){e.droppable.exists(r)||ea(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:function(r,i){n&&(e.droppable.exists(r)||ea(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,i){n&&(e.droppable.exists(r)||ea(!1),t.updateDroppableScroll({id:r,newScroll:i}))},startPublishing:function(t){n&&ea(!1);var r=e.draggable.getById(t.draggableId),o=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:o.descriptor},s=e.subscribe(i);return n={critical:a,unsubscribe:s},jc({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}}},Mc=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},Dc=function(e){window.scrollBy(e.x,e.y)},Nc=y((function(e){return Pa(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),Lc=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}return function(e,t){return Ca(Nc(t),(function(t){return t.frame||ea(!1),xs(t.frame.pageMarginBox)(e)}))}(t,r)},zc=.25,Bc=.05,Fc=28,Wc=function(e){return Math.pow(e,2)},Hc={stopDampeningAt:1200,accelerateAt:360},Vc=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;return 0===i?0:(r-t)/i},Uc=Hc.accelerateAt,qc=Hc.stopDampeningAt,Gc=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,o=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Fc;if(e===t.startScrollingFrom)return 1;var n=Vc({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=Fc*Wc(1-n);return Math.ceil(r)}(t,n);return 0===o?0:i?Math.max(function(e,t){var n=t,r=qc,i=Date.now()-n;if(i>=qc)return e;if(i<Uc)return 1;var o=Vc({startOfRange:Uc,endOfRange:r,current:i}),a=e*Wc(o);return Math.ceil(a)}(o,r),1):o},Kc=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:e[t.size]*zc,maxScrollValueAt:e[t.size]*Bc}}(t,i);return n[i.end]<n[i.start]?Gc({distanceToEdge:n[i.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o}):-1*Gc({distanceToEdge:n[i.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o})},$c=ya((function(e){return 0===e?0:e})),Zc=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},s=Kc({container:n,distanceToEdges:a,dragStartTime:t,axis:Va,shouldUseTimeDampening:o}),c=Kc({container:n,distanceToEdges:a,dragStartTime:t,axis:Ua,shouldUseTimeDampening:o}),u=$c({x:c,y:s});if(pa(u,la))return null;var l=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,o=n.width>t.width;return o||i?o&&i?null:{x:o?0:r.x,y:i?0:r.y}:r}({container:n,subject:r,proposedScroll:u});return l?pa(l,la)?null:l:null},Xc=ya((function(e){return 0===e?0:e>0?1:-1})),Qc=(Ic=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,i=fa(t,r),o={x:Ic(i.x,n.x),y:Ic(i.y,n.y)};return pa(o,la)?null:o}),Yc=function(e){var t=e.max,n=e.current,r=e.change,i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},o=Xc(r),a=Qc({max:i,current:n,change:o});return!a||(0!==o.x&&0===a.x||0!==o.y&&0===a.y)},Jc=function(e,t){return Yc({current:e.scroll.current,max:e.scroll.max,change:t})},eu=function(e,t){var n=e.frame;return!!n&&Yc({current:n.scroll.current,max:n.scroll.max,change:t})},tu=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var c=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=Zc({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return a&&Jc(t,a)?a:null}({dragStartTime:n,viewport:t.viewport,subject:s,center:a,shouldUseTimeDampening:r});if(c)return void i(c)}var u=Lc({center:a,destination:bs(t.impact),droppables:t.dimensions.droppables});if(u){var l=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var s=Zc({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return s&&eu(t,s)?s:null}({dragStartTime:n,droppable:u,subject:s,center:a,shouldUseTimeDampening:r});l&&o(u.descriptor.id,l)}},nu=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(e,t){if(!eu(e,t))return t;var r=function(e,t){var n=e.frame;return n&&eu(e,t)?Qc({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var i=da(t,r);return n(e.descriptor.id,i),da(t,i)},o=function(e,t,n){if(!e)return n;if(!Jc(t,n))return n;var i=function(e,t){if(!Jc(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return Qc({current:r,max:n,change:t})}(t,n);if(!i)return r(n),null;var o=da(n,i);return r(o),da(n,o)};return function(e){var n=e.scrollJumpRequest;if(n){var r=bs(e.impact);r||ea(!1);var a=i(e.dimensions.droppables[r],n);if(a){var s=e.viewport,c=o(e.isWindowScrollAllowed,s,a);c&&function(e,n){var r=fa(e.current.client.selection,n);t({client:r})}(e,c)}}}},ru=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Ko(t),i=Ko(n),o=null,a=function(e){o||ea(!1);var t=o,n=t.shouldUseTimeDampening,a=t.dragStartTime;tu({state:e,scrollWindow:r,scrollDroppable:i,dragStartTime:a,shouldUseTimeDampening:n})};return{start:function(e){Ms(),o&&ea(!1);var t=Date.now(),n=!1,r=function(){n=!0};tu({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),o={dragStartTime:t,shouldUseTimeDampening:n},Ds(),n&&a(e)},stop:function(){o&&(r.cancel(),i.cancel(),o=null)},scroll:a}}({scrollWindow:n,scrollDroppable:t}),o=nu({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):i.scroll(e))},start:i.start,stop:i.stop}},iu={base:Rc="data-rbd-drag-handle",draggableId:Rc+"-draggable-id",contextId:Rc+"-context-id"},ou=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),au=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),su={contextId:"data-rbd-scroll-container-context-id"},cu=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},uu="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect,lu=function(){var e=document.querySelector("head");return e||ea(!1),e},fu=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function du(e,t){var n=Do((function(){return function(e){var t,n,r,i=(t=e,function(e){return"["+e+'="'+t+'"]'}),o=(n="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:i(iu.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),a=[(r="\n transition: "+oc.outOfTheWay+";\n ",{selector:i(ou.contextId),styles:{dragging:r,dropAnimating:r,userCancel:r}}),o,{selector:i(au.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:cu(a,"always"),resting:cu(a,"resting"),dragging:cu(a,"dragging"),dropAnimating:cu(a,"dropAnimating"),userCancel:cu(a,"userCancel")}}(e)}),[e]),r=Object(u.useRef)(null),i=Object(u.useRef)(null),o=No(y((function(e){var t=i.current;t||ea(!1),t.textContent=e})),[]),a=No((function(e){var t=r.current;t||ea(!1),t.textContent=e}),[]);uu((function(){(r.current||i.current)&&ea(!1);var s=fu(t),c=fu(t);return r.current=s,i.current=c,s.setAttribute("data-rbd-always",e),c.setAttribute("data-rbd-dynamic",e),lu().appendChild(s),lu().appendChild(c),a(n.always),o(n.resting),function(){var e=function(e){var t=e.current;t||ea(!1),lu().removeChild(t),e.current=null};e(r),e(i)}}),[t,a,o,n.always,n.resting,e]);var s=No((function(){return o(n.dragging)}),[o,n.dragging]),c=No((function(e){o("DROP"!==e?n.userCancel:n.dropAnimating)}),[o,n.dropAnimating,n.userCancel]),l=No((function(){i.current&&o(n.resting)}),[o,n.resting]);return Do((function(){return{dragging:s,dropping:c,resting:l}}),[s,c,l])}var pu=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function hu(e){return e instanceof pu(e).HTMLElement}function gu(e,t){var n="["+iu.contextId+'="'+e+'"]',r=ka(document.querySelectorAll(n));if(!r.length)return null;var i=Ca(r,(function(e){return e.getAttribute(iu.draggableId)===t}));return i&&hu(i)?i:null}function vu(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function i(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var i=t.descriptor.id,o=r(i);o&&t.uniqueId===o.uniqueId&&(delete e.draggables[i],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||ea(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return Sa(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=i(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=i(e);return t||ea(!1),t},findById:i,exists:function(e){return Boolean(i(e))},getAllByType:function(t){return Sa(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var mu=l.a.createContext(null),yu=function(){var e=document.body;return e||ea(!1),e},bu={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var wu=0,_u={separator:"::"};function xu(e,t){return void 0===t&&(t=_u),Do((function(){return""+e+t.separator+wu++}),[t.separator,e])}var Ou=l.a.createContext(null);function Su(e){0}function Eu(e,t){Su()}function Cu(){Eu()}function ku(e){var t=Object(u.useRef)(e);return Object(u.useEffect)((function(){t.current=e})),t}var Tu,ju=((Tu={})[13]=!0,Tu[9]=!0,Tu),Pu=function(e){ju[e.keyCode]&&e.preventDefault()},Iu=function(){var e="visibilitychange";return"undefined"==typeof document?e:Ca([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}();var Ru,Au={type:"IDLE"};function Mu(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,o=e.clientY;if(0===t){var a={x:n,y:o},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&ea(!1);var c=s.point;if(u=c,l=a,Math.abs(l.x-u.x)>=5||Math.abs(l.y-u.y)>=5){var u,l;e.preventDefault();var f=s.actions.fluidLift(a);i({type:"DRAGGING",actions:f})}}}},{eventName:"mouseup",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void Pu(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&ea(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:Iu,fn:t}]}function Du(){}var Nu=((Ru={})[34]=!0,Ru[33]=!0,Ru[36]=!0,Ru[35]=!0,Ru);function Lu(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(Nu[r.keyCode]?r.preventDefault():Pu(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Iu,fn:n}]}var zu={type:"IDLE"};var Bu={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Fu(e,t){var n=t.target;return!!hu(n)&&function e(t,n){if(null==n)return!1;if(Boolean(Bu[n.tagName.toLowerCase()]))return!0;var r=n.getAttribute("contenteditable");return"true"===r||""===r||n!==t&&e(t,n.parentElement)}(e,n)}var Wu=function(e){return Lo(e.getBoundingClientRect()).center};var Hu="undefined"==typeof document?"matches":Ca(["matches","msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||"matches";function Vu(e,t){return e.closest?e.closest(t):function e(t,n){return null==t?null:t[Hu](n)?t:e(t.parentElement,n)}(e,t)}function Uu(e,t){var n,r=t.target;if(!((n=r)instanceof pu(n).Element))return null;var i=Vu(r,function(e){return"["+iu.contextId+'="'+e+'"]'}(e));return i&&hu(i)?i:null}function qu(e){e.preventDefault()}function Gu(e){var t=e.expected,n=e.phase,r=e.isLockActive;e.shouldWarn;return!!r()&&t===n}function Ku(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!!o&&(!!o.options.isEnabled&&!!Mc(n.getState(),i))}function $u(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent;if(!Ku({lockAPI:t,store:r,registry:i,draggableId:o}))return null;var c=i.draggable.getById(o),u=function(e,t){var n="["+ou.contextId+'="'+e+'"]',r=Ca(ka(document.querySelectorAll(n)),(function(e){return e.getAttribute(ou.id)===t}));return r&&hu(r)?r:null}(n,c.descriptor.id);if(!u)return null;if(s&&!c.options.canDragInteractiveElements&&Fu(u,s))return null;var l=t.claim(a||Qo),f="PRE_DRAG";function d(){return c.options.shouldRespectForcePress}function h(){return t.isActive(l)}var g=function(e,t){Gu({expected:e,phase:f,isLockActive:h,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function v(e){function n(){t.release(),f="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var o=Yo(window,[{eventName:"click",fn:qu,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(o)}n(),r.dispatch(Js({reason:t}))}return"PRE_DRAG"!==f&&(n(),"PRE_DRAG"!==f&&ea(!1)),r.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),f="DRAGGING",Object(p.a)({isActive:function(){return Gu({expected:"DRAGGING",phase:f,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:d,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}return{isActive:function(){return Gu({expected:"PRE_DRAG",phase:f,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:d,fluidLift:function(e){var t=Ko((function(e){g((function(){return Ks({client:e})}))})),n=v({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return Object(p.a)({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return g($s)},moveRight:function(){return g(Xs)},moveDown:function(){return g(Zs)},moveLeft:function(){return g(Qs)}};return v({liftActionArgs:{id:o,clientSelection:Wu(u),movementMode:"SNAP"},cleanup:Qo,actions:e})},abort:function(){Gu({expected:"PRE_DRAG",phase:f,isLockActive:h,shouldWarn:!0})&&t.release()}}}var Zu=[function(e){var t=Object(u.useRef)(Au),n=Object(u.useRef)(Qo),r=Do((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,a,{sourceEvent:t});if(i){t.preventDefault();var o={x:t.clientX,y:t.clientY};n.current(),l(i,o)}}}}}}),[e]),i=Do((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),o=No((function(){n.current=Yo(window,[i,r],{passive:!1,capture:!0})}),[i,r]),a=No((function(){"IDLE"!==t.current.type&&(t.current=Au,n.current(),o())}),[o]),s=No((function(){var e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[a]),c=No((function(){var e=Mu({cancel:s,completed:a,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=Yo(window,e,{capture:!0,passive:!1})}),[s,a]),l=No((function(e,n){"IDLE"!==t.current.type&&ea(!1),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);uu((function(){return o(),function(){n.current()}}),[o])},function(e){var t=Object(u.useRef)(Du),n=Do((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var i=e.findClosestDraggableId(n);if(i){var o=e.tryGetLock(i,c,{sourceEvent:n});if(o){n.preventDefault();var a=!0,s=o.snapLift();t.current(),t.current=Yo(window,Lu(s,c),{capture:!0,passive:!1})}}}function c(){a||ea(!1),a=!1,t.current(),r()}}}}),[e]),r=No((function(){t.current=Yo(window,[n],{passive:!1,capture:!0})}),[n]);uu((function(){return r(),function(){t.current()}}),[r])},function(e){var t=Object(u.useRef)(zu),n=Object(u.useRef)(Qo),r=No((function(){return t.current}),[]),i=No((function(e){t.current=e}),[]),o=Do((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,s,{sourceEvent:t});if(i){var o=t.touches[0],a={x:o.clientX,y:o.clientY};n.current(),d(i,a)}}}}}}),[e]),a=No((function(){n.current=Yo(window,[o],{capture:!0,passive:!1})}),[o]),s=No((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(zu),n.current(),a())}),[a,i]),c=No((function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),l=No((function(){var e={capture:!0,passive:!1},t={cancel:c,completed:s,getPhase:r},i=Yo(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var i=e.touches[0],o={x:i.clientX,y:i.clientY};e.preventDefault(),n.actions.move(o)}else t()}},{eventName:"touchend",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&ea(!1);var i=e.touches[0];if(i&&i.force>=.15){var o=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return o?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();o&&t()}}},{eventName:Iu,fn:t}]}(t),e),o=Yo(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:Iu,fn:t}]}(t),e);n.current=function(){i(),o()}}),[c,r,s]),f=No((function(){var e=r();"PENDING"!==e.type&&ea(!1);var t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,i]),d=No((function(e,t){"IDLE"!==r().type&&ea(!1);var n=setTimeout(f,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),l()}),[l,r,i,f]);uu((function(){return a(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(zu))}}),[r,a,i]),uu((function(){return Yo(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function Xu(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,a=[].concat(o?Zu:[],i||[]),s=Object(u.useState)((function(){return function(){var e=null;function t(){e||ea(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&ea(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],c=No((function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()}),[s]);uu((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();c(e,t),e=t}))}),[s,n,c]),uu((function(){return s.tryAbandon}),[s.tryAbandon]);var l=No((function(e){return Ku({lockAPI:s,registry:r,store:n,draggableId:e})}),[s,r,n]),f=No((function(e,i,o){return $u({lockAPI:s,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:i,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null})}),[t,s,r,n]),d=No((function(e){return function(e,t){var n=Uu(e,t);return n?n.getAttribute(iu.draggableId):null}(t,e)}),[t]),p=No((function(e){var t=r.draggable.findById(e);return t?t.options:null}),[r.draggable]),h=No((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[s,n]),g=No(s.isClaimed,[s]),v=Do((function(){return{canGetLock:l,tryGetLock:f,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:h,isLockClaimed:g}}),[l,f,d,p,h,g]);Su();for(var m=0;m<a.length;m++)a[m](v)}function Qu(e){return e.current||ea(!1),e.current}function Yu(e){var t=e.contextId,n=e.setCallbacks,o=e.sensors,a=e.nonce,s=e.dragHandleUsageInstructions,c=Object(u.useRef)(null);Cu();var f=ku(e),d=No((function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(f.current)}),[f]),h=function(e){var t=Do((function(){return function(e){return"rbd-announcement-"+e}(e)}),[e]),n=Object(u.useRef)(null);return Object(u.useEffect)((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Object(p.a)(e.style,bu),yu().appendChild(e),function(){setTimeout((function(){var t=yu();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),No((function(e){var t=n.current;t&&(t.textContent=e)}),[])}(t),g=function(e){var t=e.contextId,n=e.text,r=xu("hidden-text",{separator:"-"}),i=Do((function(){return"rbd-hidden-text-"+(e={contextId:t,uniqueId:r}).contextId+"-"+e.uniqueId;var e}),[r,t]);return Object(u.useEffect)((function(){var e=document.createElement("div");return e.id=i,e.textContent=n,e.style.display="none",yu().appendChild(e),function(){var t=yu();t.contains(e)&&t.removeChild(e)}}),[i,n]),i}({contextId:t,text:s}),v=du(t,a),m=No((function(e){Qu(c).dispatch(e)}),[]),y=Do((function(){return Object(r.bindActionCreators)({publishWhileDragging:Hs,updateDroppableScroll:Us,updateDroppableIsEnabled:qs,updateDroppableIsCombineEnabled:Gs,collectionStarting:Vs},m)}),[m]),b=function(){var e=Do(vu,[]);return Object(u.useEffect)((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),w=Do((function(){return Ac(b,y)}),[b,y]),_=Do((function(){return ru(Object(p.a)({scrollWindow:Dc,scrollDroppable:w.scrollDroppable},Object(r.bindActionCreators)({move:Ks},m)))}),[w.scrollDroppable,m]),x=function(e){var t=Object(u.useRef)({}),n=Object(u.useRef)(null),r=Object(u.useRef)(null),i=Object(u.useRef)(!1),o=No((function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}}),[]),a=No((function(t){var n=gu(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),s=No((function(e,t){n.current===e&&(n.current=t)}),[]),c=No((function(){r.current||i.current&&(r.current=requestAnimationFrame((function(){r.current=null;var e=n.current;e&&a(e)})))}),[a]),l=No((function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(iu.draggableId)===e&&(n.current=e)}),[]);return uu((function(){return i.current=!0,function(){i.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}}),[]),Do((function(){return{register:o,tryRecordFocus:l,tryRestoreFocusRecorded:c,tryShiftRecord:s}}),[o,l,c,s])}(t),O=Do((function(){return Ec({announce:h,autoScroller:_,dimensionMarshal:w,focusMarshal:x,getResponders:d,styleMarshal:v})}),[h,_,w,x,d,v]);c.current=O;var S=No((function(){var e=Qu(c);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),E=No((function(){var e=Qu(c).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n(Do((function(){return{isDragging:E,tryAbort:S}}),[E,S]));var C=No((function(e){return Mc(Qu(c).getState(),e)}),[]),k=No((function(){return _s(Qu(c).getState())}),[]),T=Do((function(){return{marshal:w,focus:x,contextId:t,canLift:C,isMovementAllowed:k,dragHandleUsageInstructionsId:g,registry:b}}),[t,w,g,x,C,k,b]);return Xu({contextId:t,store:O,registry:b,customSensors:o,enableDefaultSensors:!1!==e.enableDefaultSensors}),Object(u.useEffect)((function(){return S}),[S]),l.a.createElement(Ou.Provider,{value:T},l.a.createElement(i.a,{context:mu,store:O},e.children))}var Ju=0;function el(e){var t=Do((function(){return""+Ju++}),[]),n=e.dragHandleUsageInstructions||aa;return l.a.createElement(ta,null,(function(r){return l.a.createElement(Yu,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))}var tl=function(e){return function(t){return e===t}},nl=tl("scroll"),rl=tl("auto"),il=(tl("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),ol=function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return il(n,nl)||il(n,rl)},al=function e(t){return null==t||t===document.body||t===document.documentElement?null:ol(t)?t:e(t.parentElement)},sl=function(e){return{x:e.scrollLeft,y:e.scrollTop}},cl=function(e){return{closestScrollable:al(e),isFixedOnPage:function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))}(e)}},ul=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,s=e.isCombineEnabled,c=e.shouldClipSubject,u=r.closestScrollable,l=function(e,t){var n=Go(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,o=r+t.scrollHeight,a=i+t.scrollWidth,s=zo({top:r,right:a,bottom:o,left:i},n.border);return Wo({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})}(t,u),f=Uo(l,i),d=function(){if(!u)return null;var e=Go(u),t={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:e,page:Uo(e,i),scroll:sl(u),scrollSize:t,shouldClipSubject:c}}();return function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,s=e.page,c=e.closest,u=function(){if(!c)return null;var e=c.scrollSize,t=c.client,n=Cc({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:n,diff:{value:la,displacement:la}}}}(),l="vertical"===o?Va:Ua;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:l,isEnabled:n,client:a,page:s,frame:u,subject:xa({page:s,withPlaceholder:null,axis:l,frame:u})}}({descriptor:n,isEnabled:!a,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:o,client:l,page:f,closest:d})},ll={passive:!1},fl={passive:!0},dl=function(e){return e.shouldPublishImmediately?ll:fl};function pl(e){var t=Object(u.useContext)(e);return t||ea(!1),t}var hl=function(e){return e&&e.env.closestScrollable||null};function gl(){}var vl={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},ml=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,i=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate;return t||"close"===r?vl:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?oc.placeholder:null}};var yl=l.a.memo((function(e){var t=Object(u.useRef)(null),n=No((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,s=Object(u.useState)("open"===e.animate),c=s[0],f=s[1];Object(u.useEffect)((function(){return c?"open"!==r?(n(),f(!1),gl):t.current?gl:(t.current=setTimeout((function(){t.current=null,f(!1)})),n):gl}),[r,c,n]);var d=No((function(e){"height"===e.propertyName&&(i(),"close"===r&&o())}),[r,o,i]),p=ml({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return l.a.createElement(e.placeholder.tagName,{style:p,"data-rbd-placeholder-context-id":a,onTransitionEnd:d,ref:e.innerRef})})),bl=l.a.createContext(null);var wl=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return Object(h.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(l.a.PureComponent),_l=5e3,xl=4500,Ol=function(e,t){return t?oc.drop(t.duration):e?oc.snap:oc.fluid},Sl=function(e,t){return e?t?nc.drop:nc.combining:null};function El(e){return"DRAGGING"===e.type?(r=(n=e).dimension.client,i=n.offset,o=n.combineWith,a=n.dropping,s=Boolean(o),c=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(n),u=Boolean(a),l=u?cc(i,s):sc(i),{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:Ol(c,a),transform:l,opacity:Sl(s,u),zIndex:u?xl:_l,pointerEvents:"none"}):{transform:sc((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t,n,r,i,o,a,s,c,u,l}function Cl(e){var t=xu("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,s=e.isEnabled,c=Do((function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:s}}),[o,s,a]),l=No((function(e){var t=i();return t||ea(!1),function(e,t,n){void 0===n&&(n=la);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=qo(i,r),a=Uo(o,n);return{descriptor:e,placeholder:{client:o,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:a}}(n,t,e)}),[n,i]),f=Do((function(){return{uniqueId:t,descriptor:n,options:c,getDimension:l}}),[n,l,c,t]),d=Object(u.useRef)(f),p=Object(u.useRef)(!0);uu((function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}}),[r.draggable]),uu((function(){if(p.current)p.current=!1;else{var e=d.current;d.current=f,r.draggable.update(f,e)}}),[f,r.draggable])}function kl(e,t,n){Eu()}function Tl(e){e.preventDefault()}var jl=function(e,t){return e===t},Pl=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function Il(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var Rl={mapped:{type:"SECONDARY",offset:la,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Il(null)}};var Al={dropAnimationFinished:ec},Ml=Object(i.b)((function(){var e,t,n,r=(e=y((function(e,t){return{x:e,y:t}})),t=y((function(e,t,n,r,i){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=y((function(e,n,r,i,o,a,s){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,i,o,a,null)}}})),function(r,i){if(r.isDragging){if(r.critical.draggable.id!==i.draggableId)return null;var o=r.current.client.offset,a=r.dimensions.draggables[i.draggableId],s=bs(r.impact),c=(l=r.impact).at&&"COMBINE"===l.at.type?l.at.combine.draggableId:null,u=r.forceShouldAnimate;return n(e(o.x,o.y),r.movementMode,a,i.isClone,s,c,u)}var l;if("DROP_ANIMATING"===r.phase){var f=r.completed;if(f.result.draggableId!==i.draggableId)return null;var d=i.isClone,p=r.dimensions.draggables[i.draggableId],h=f.result,g=h.mode,v=Pl(h),m=function(e){return e.combine?e.combine.draggableId:null}(h),y={duration:r.dropDuration,curve:tc,moveTo:r.newHomeClientOffset,opacity:m?nc.drop:null,scale:m?rc.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:p,dropping:y,draggingOver:v,combineWith:m,mode:g,forceShouldAnimate:null,snapshot:t(g,d,v,m,y)}}}return null}),i=function(){var e=y((function(e,t){return{x:e,y:t}})),t=y(Il),n=y((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=function(e){return e?n(la,e,!0):null},i=function(t,i,o,a){var s=o.displaced.visible[t],c=Boolean(a.inVirtualList&&a.effected[t]),u=Ma(o),l=u&&u.draggableId===t?i:null;if(!s){if(!c)return r(l);if(o.displaced.invisible[t])return null;var f=ha(a.displacedBy.point),d=e(f.x,f.y);return n(d,l,!0)}if(c)return r(l);var p=o.displacedBy.point,h=e(p.x,p.y);return n(h,l,s.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:i(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:i(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(e,t){return r(e,t)||i(e,t)||Rl}}),Al,null,{context:mu,pure:!0,areStatePropsEqual:jl})((function(e){var t=Object(u.useRef)(null),n=No((function(e){t.current=e}),[]),r=No((function(){return t.current}),[]),i=pl(Ou),o=i.contextId,a=i.dragHandleUsageInstructionsId,s=i.registry,c=pl(bl),l=c.type,f=c.droppableId,d=Do((function(){return{id:e.draggableId,index:e.index,type:l,droppableId:f}}),[e.draggableId,e.index,l,f]),p=e.children,h=e.draggableId,g=e.isEnabled,v=e.shouldRespectForcePress,m=e.canDragInteractiveElements,y=e.isClone,b=e.mapped,w=e.dropAnimationFinished;kl(),Su(),y||Cl(Do((function(){return{descriptor:d,registry:s,getDraggableRef:r,canDragInteractiveElements:m,shouldRespectForcePress:v,isEnabled:g}}),[d,s,r,m,v,g]));var _=Do((function(){return g?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":h,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:Tl}:null}),[o,a,h,g]),x=No((function(e){"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&w()}),[w,b]),O=Do((function(){var e=El(b),t="DRAGGING"===b.type&&b.dropping?x:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":h,style:e,onTransitionEnd:t},dragHandleProps:_}}),[o,_,h,b,x,n]),S=Do((function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}}),[d.droppableId,d.id,d.index,d.type]);return p(O,b.snapshot,S)}));function Dl(e){return pl(bl).isUsingCloneFor!==e.draggableId||e.isClone?l.a.createElement(Ml,e):null}function Nl(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return l.a.createElement(Dl,Object(p.a)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var Ll=function(e,t){return e===t.droppable.type},zl=function(e,t){return t.draggables[e.draggable.id]},Bl={updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}};var Fl={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||ea(!1),document.body}},Wl=Object(i.b)((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=Object(p.a)({},e,{shouldAnimatePlaceholder:!1}),n=y((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),r=y((function(r,i,o,a,s,c){var u=s.descriptor.id;if(s.descriptor.droppableId===r){var l=c?{render:c,dragging:n(s.descriptor)}:null,f={isDraggingOver:o,draggingOverWith:o?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:f,useClone:l}}if(!i)return t;if(!a)return e;var d={isDraggingOver:o,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:d,useClone:null}}));return function(n,i){var o=i.droppableId,a=i.type,s=!i.isDropDisabled,c=i.renderClone;if(n.isDragging){var u=n.critical;if(!Ll(a,u))return t;var l=zl(u,n.dimensions),f=bs(n.impact)===o;return r(o,s,f,f,l,c)}if("DROP_ANIMATING"===n.phase){var d=n.completed;if(!Ll(a,d.critical))return t;var p=zl(d.critical,n.dimensions);return r(o,s,Pl(d.result)===o,bs(d.impact)===o,p,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var h=n.completed;if(!Ll(a,h.critical))return t;var g=bs(h.impact)===o,v=Boolean(h.impact.at&&"COMBINE"===h.impact.at.type),m=h.critical.droppable.id===o;return g?v?e:t:m?e:t}return t}}),Bl,null,{context:mu,pure:!0,areStatePropsEqual:jl})((function(e){var t=Object(u.useContext)(Ou);t||ea(!1);var n=t.contextId,r=t.isMovementAllowed,i=Object(u.useRef)(null),o=Object(u.useRef)(null),a=e.children,s=e.droppableId,c=e.type,f=e.mode,d=e.direction,p=e.ignoreContainerClipping,h=e.isDropDisabled,g=e.isCombineEnabled,v=e.snapshot,m=e.useClone,b=e.updateViewportMaxScroll,w=e.getContainerForClone,_=No((function(){return i.current}),[]),x=No((function(e){i.current=e}),[]),O=(No((function(){return o.current}),[]),No((function(e){o.current=e}),[]));Eu();var S=No((function(){r()&&b({maxScroll:Tc()})}),[r,b]);!function(e){var t=Object(u.useRef)(null),n=pl(Ou),r=xu("droppable"),i=n.registry,o=n.marshal,a=ku(e),s=Do((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),c=Object(u.useRef)(s),l=Do((function(){return y((function(e,n){t.current||ea(!1);var r={x:e,y:n};o.updateDroppableScroll(s.id,r)}))}),[s.id,o]),f=No((function(){var e=t.current;return e&&e.env.closestScrollable?sl(e.env.closestScrollable):la}),[]),d=No((function(){var e=f();l(e.x,e.y)}),[f,l]),p=Do((function(){return Ko(d)}),[d]),h=No((function(){var e=t.current,n=hl(e);e&&n||ea(!1),e.scrollOptions.shouldPublishImmediately?d():p()}),[p,d]),g=No((function(e,r){t.current&&ea(!1);var i=a.current,o=i.getDroppableRef();o||ea(!1);var c=cl(o),u={ref:o,descriptor:s,env:c,scrollOptions:r};t.current=u;var l=ul({ref:o,descriptor:s,env:c,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),f=c.closestScrollable;return f&&(f.setAttribute(su.contextId,n.contextId),f.addEventListener("scroll",h,dl(u.scrollOptions))),l}),[n.contextId,s,h,a]),v=No((function(){var e=t.current,n=hl(e);return e&&n||ea(!1),sl(n)}),[]),m=No((function(){var e=t.current;e||ea(!1);var n=hl(e);t.current=null,n&&(p.cancel(),n.removeAttribute(su.contextId),n.removeEventListener("scroll",h,dl(e.scrollOptions)))}),[h,p]),b=No((function(e){var n=t.current;n||ea(!1);var r=hl(n);r||ea(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),w=Do((function(){return{getDimensionAndWatchScroll:g,getScrollWhileDragging:v,dragStopped:m,scroll:b}}),[m,g,v,b]),_=Do((function(){return{uniqueId:r,descriptor:s,callbacks:w}}),[w,s,r]);uu((function(){return c.current=_.descriptor,i.droppable.register(_),function(){t.current&&m(),i.droppable.unregister(_)}}),[w,s,m,_,o,i.droppable]),uu((function(){t.current&&o.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,o]),uu((function(){t.current&&o.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,o])}({droppableId:s,type:c,mode:f,direction:d,isDropDisabled:h,isCombineEnabled:g,ignoreContainerClipping:p,getDroppableRef:_});var E=l.a.createElement(wl,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,r=e.data,i=e.animate;return l.a.createElement(yl,{placeholder:r,onClose:t,innerRef:O,animate:i,contextId:n,onTransitionEnd:S})})),C=Do((function(){return{innerRef:x,placeholder:E,droppableProps:{"data-rbd-droppable-id":s,"data-rbd-droppable-context-id":n}}}),[n,s,E,x]),k=m?m.dragging.draggableId:null,T=Do((function(){return{droppableId:s,type:c,isUsingCloneFor:k}}),[s,k,c]);return l.a.createElement(bl.Provider,{value:T},a(C,v),function(){if(!m)return null;var e=m.dragging,t=m.render,n=l.a.createElement(Dl,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(n,r){return t(n,r,e)}));return Zo.a.createPortal(n,w())}())}));function Hl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ul(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ql(e,t){return(ql=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zl(e);if(t){var i=Zl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kl(this,n)}}function Kl(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $l(e)}function $l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zl(e){return(Zl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ql(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ql(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ql(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Wl.defaultProps=Fl;var Yl=function(e,t,n){var r=Array.from(e),i=Xl(r.splice(t,1),1)[0];return r.splice(n,0,i),r},Jl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ql(e,t)}(o,e);var t,n,r,i=Gl(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).droppableId=Object(So.a)(),t.onDragEnd=t.onDragEnd.bind($l(t)),t.handleOpacityChange=t.handleOpacityChange.bind($l(t)),t.setLayerVisibility=t.setLayerVisibility.bind($l(t)),t.moveToTop=t.moveToTop.bind($l(t)),t}return t=o,r=[{key:"getUseableLabel",value:function(e,t){return e&&e.getLabel&&e.getLabel().length>0?e.getLabel().getValue():String(t+1)}}],(n=[{key:"handleOpacityChange",value:function(e,t){var n=this.props,r=n.canvasId;(0,n.updateLayers)(n.windowId,r,Vl({},e,{opacity:t/100}))}},{key:"onDragEnd",value:function(e){var t=this.props,n=t.canvasId,r=t.layers,i=t.updateLayers,o=t.windowId;if(e.destination&&e.destination.droppableId===this.droppableId&&e.source.droppableId===this.droppableId){var a=Yl(r.map((function(e){return e.id})),e.source.index,e.destination.index);i(o,n,r.reduce((function(e,t){return e[t.id]={index:a.indexOf(t.id)},e}),{}))}}},{key:"setLayerVisibility",value:function(e,t){var n=this.props,r=n.canvasId;(0,n.updateLayers)(n.windowId,r,Vl({},e,{visibility:t}))}},{key:"moveToTop",value:function(e){var t=this.props,n=t.canvasId,r=t.layers,i=t.updateLayers,o=t.windowId,a=Yl(r.map((function(e){return e.id})),r.findIndex((function(t){return t.id===e})),0);i(o,n,r.reduce((function(e,t){return e[t.id]={index:a.indexOf(t.id)},e}),{}))}},{key:"renderLayer",value:function(e,t){var n=this,r=this.props,i=r.classes,a=r.layerMetadata,s=r.t,c={height:void 0,width:50},u=c.width,f=c.height,d=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hl(Object(n),!0).forEach((function(t){Vl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({opacity:1,visibility:!0},(a||{})[e.id]);return l.a.createElement("div",{style:{flex:1}},l.a.createElement("div",{style:{alignItems:"flex-start",display:"flex"}},l.a.createElement(L.a,{maxHeight:f,maxWidth:u,resource:e,classes:{image:i.image,root:i.thumbnail}}),l.a.createElement(le.a,{className:i.label,component:"div",variant:"body1"},o.getUseableLabel(e,t),l.a.createElement("div",null,l.a.createElement(ve.a,{"aria-label":s(d.visibility?"layer_hide":"layer_show"),edge:"start",size:"small",onClick:function(){n.setLayerVisibility(e.id,!d.visibility)}},d.visibility?l.a.createElement(pe.a,null):l.a.createElement(ge.a,null)),0!==d.index&&l.a.createElement(ve.a,{"aria-label":s("layer_moveToTop"),size:"small",onClick:function(){n.moveToTop(e.id)}},l.a.createElement(Io.a,null))))),l.a.createElement("div",{style:{alignItems:"center",display:"flex"}},l.a.createElement(nn.a,{title:s("layer_opacity")},l.a.createElement(Ao.a,{className:i.opacityIcon,color:d.visibility?"inherit":"disabled",fontSize:"small"})),l.a.createElement(Eo.a,{classes:{input:i.opacityInput},disabled:!d.visibility,value:Math.round(100*d.opacity),type:"number",min:0,max:100,onChange:function(t){return n.handleOpacityChange(e.id,t.target.value)},endAdornment:l.a.createElement(Co.a,{disableTypography:!0,position:"end"},l.a.createElement(le.a,{variant:"caption"},"%")),inputProps:{"aria-label":s("layer_opacity")}}),l.a.createElement(ko.a,{className:i.slider,disabled:!d.visibility,value:100*d.opacity,onChange:function(t,r){return n.handleOpacityChange(e.id,r)}})))}},{key:"renderDraggableLayer",value:function(e,t){var n=this,r=this.props,i=r.classes,o=r.t;return l.a.createElement(Nl,{key:e.id,draggableId:e.id,index:t},(function(r,a){return l.a.createElement(Ni.a,Object.assign({ref:r.innerRef},r.draggableProps,{component:"li",className:Object(Ee.a)(i.listItem,Vl({},i.dragging,a.isDragging)),disableGutters:!0,key:e.id}),l.a.createElement("div",Object.assign({},r.dragHandleProps,{className:i.dragHandle}),l.a.createElement(nn.a,{title:o("layer_move")},l.a.createElement(jo.a,null))),n.renderLayer(e,t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.index,i=t.label,o=t.layers,a=t.t,s=t.totalSize;return l.a.createElement(l.a.Fragment,null,s>1&&l.a.createElement(le.a,{className:n.sectionHeading,variant:"overline"},a("annotationCanvasLabel",{context:"".concat(r+1,"/").concat(s),label:i})),l.a.createElement(el,{onDragEnd:this.onDragEnd},l.a.createElement(Wl,{droppableId:this.droppableId},(function(t,r){return l.a.createElement(Ri.a,Object.assign({className:n.list},t.droppableProps,{ref:t.innerRef}),o&&o.map((function(t,n){return e.renderDraggableLayer(t,n)})),t.placeholder)}))))}}])&&Ul(t.prototype,n),r&&Ul(t,r),o}(u.Component);function ef(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ef(Object(n),!0).forEach((function(t){nf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ef(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Jl.defaultProps={classes:{},layerMetadata:void 0};var rf={updateLayers:xo.a},of=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{dragging:{},dragHandle:{alignItems:"center",borderRight:"0.5px solid ".concat(e.palette.divider),display:"flex",flex:1,flexDirection:"row",marginBottom:-1*e.spacing(2)+.5,marginRight:e.spacing(1),marginTop:-1*e.spacing(2),maxWidth:e.spacing(3),width:e.spacing(3)},image:{borderBottom:"1px solid ".concat(e.palette.divider)},label:{paddingLeft:e.spacing(1)},list:{paddingTop:0},listItem:{"& $dragHandle":{"&:hover":{backgroundColor:e.palette.action.hover},backgroundColor:e.palette.shades.light},"&$dragging":{"& $dragHandle, & $dragHandle:hover":{backgroundColor:e.palette.action.selected},backgroundColor:e.palette.action.hover},alignItems:"stretch",borderBottom:"0.5px solid ".concat(e.palette.divider),cursor:"pointer",paddingBottom:e.spacing(2),paddingRight:e.spacing(1),paddingTop:e.spacing(2)},opacityIcon:{marginRight:e.spacing(.5)},opacityInput:tf(tf({},e.typography.caption),{},{"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"-moz-appearance":"textfield",textAlign:"right",width:"3ch"}),sectionHeading:{paddingLeft:e.spacing(2),paddingRight:e.spacing(1),paddingTop:e.spacing(2)},slider:{marginLeft:e.spacing(2),marginRight:e.spacing(2),maxWidth:150},thumbnail:{minWidth:50}}})),Object(i.b)((function(e,t){var n=t.canvasId,r=t.windowId;return{label:Object(N.getCanvasLabel)(e,{canvasId:n,windowId:r}),layerMetadata:Object(Oo.b)(e,{canvasId:n,windowId:r}),layers:Object(Oo.d)(e,{canvasId:n,windowId:r})}}),rf))(Jl);function af(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cf(e,t){return(cf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ff(e);if(t){var i=ff(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lf(this,n)}}function lf(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ff(e){return(ff=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var df=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cf(e,t)}(o,e);var t,n,r,i=uf(o);function o(){return af(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.canvasIds,n=e.id,r=e.t,i=e.windowId;return l.a.createElement(Ge.default,{title:r("layers"),id:n,windowId:i},t.map((function(e,n){return l.a.createElement(of,{canvasId:e,index:n,key:e,totalSize:t.length,windowId:i})})))}}])&&sf(t.prototype,n),r&&sf(t,r),o}(u.Component);df.defaultProps={canvasIds:[]};var pf=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{}})),Object(i.b)((function(e,t){t.id;var n=t.windowId;return{canvasIds:Object(N.getVisibleCanvasIds)(e,{windowId:n})}})),Object(s.a)("LayersPanel"))(df);function hf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vf(e,t){return(vf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bf(e);if(t){var i=bf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yf(this,n)}}function yf(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function bf(e){return(bf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vf(e,t)}(o,e);var t,n,r,i=mf(o);function o(){return hf(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.id,n=e.children,r=e.t,i=e.title,o=e.windowId;return l.a.createElement(Ge.default,{title:r(i),id:t,windowId:o},n)}}])&&gf(t.prototype,n),r&&gf(t,r),o}(u.Component);wf.defaultProps={children:null};var _f=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{}})),Object(i.b)((function(e,t){t.id,t.windowId;return{}})),Object(s.a)("CustomPanel"))(wf),xf=n(577),Of=n(703),Sf=n.n(Of),Ef=["manifest"];function Cf(e){return function(e){if(Array.isArray(e))return kf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return kf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kf(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tf(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function If(e,t){return(If=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mf(e);if(t){var i=Mf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Af(this,n)}}function Af(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Mf(e){return(Mf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Df=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&If(e,t)}(o,e);var t,n,r,i=Rf(o);function o(){return jf(this,o),i.apply(this,arguments)}return t=o,r=[{key:"getUseableLabel",value:function(e,t){return e&&e.getLabel&&e.getLabel().length>0?e.getLabel().getValue():e.id}}],(n=[{key:"isMultipart",value:function(){var e=this.props.collection;if(!e)return!1;var t=e.getProperty("behavior");return Array.isArray(t)?e.includes("multi-part"):"multi-part"===t}},{key:"render",value:function(){var e=this.props,t=e.canvasNavigation,n=e.classes,r=e.collectionPath,i=e.collection,a=e.id,s=e.isFetching,c=e.manifestId,u=e.parentCollection,f=e.updateCompanionWindow,d=e.updateWindow,p=e.t,h=e.variant,g=e.windowId,v=function(e){var r=e.manifest,i=Tf(e,Ef);return l.a.createElement(Te.a,Object.assign({className:n.menuItem,alignItems:"flex-start",button:!0,component:"li",selected:c===r.id},i),"thumbnail"===h&&l.a.createElement(xf.a,null,l.a.createElement(L.a,{resource:r,maxHeight:t.height,maxWidth:t.width})),l.a.createElement(je.a,null,o.getUseableLabel(r)))};return l.a.createElement(Ge.default,{title:p(this.isMultipart()?"multipartCollection":"collection"),windowId:g,id:a,titleControls:l.a.createElement(l.a.Fragment,null,u&&l.a.createElement(Ri.a,null,l.a.createElement(Ni.a,{button:!0,onClick:function(){return f({collectionPath:r.slice(0,-1)})}},l.a.createElement(xf.a,null,l.a.createElement(Sf.a,null)),l.a.createElement(je.a,{primaryTypographyProps:{variant:"body1"}},o.getUseableLabel(u)))),l.a.createElement(le.a,{variant:"h6"},i&&o.getUseableLabel(i),s&&l.a.createElement(wr.a,{className:n.placeholder,variant:"text"})))},l.a.createElement(ke.a,null,s&&l.a.createElement(Te.a,null,l.a.createElement(je.a,null,l.a.createElement(wr.a,{className:n.placeholder,variant:"text"}),l.a.createElement(wr.a,{className:n.placeholder,variant:"text"}),l.a.createElement(wr.a,{className:n.placeholder,variant:"text"}))),i&&i.getCollections().map((function(e){return l.a.createElement(v,{key:e.id,onClick:function(){f({collectionPath:[].concat(Cf(r),[e.id])})},manifest:e})})),i&&i.getManifests().map((function(e){return l.a.createElement(v,{key:e.id,onClick:function(){d({canvasId:null,collectionPath:r,manifestId:e.id}),f({multipart:!1})},manifest:e})}))))}}])&&Pf(t.prototype,n),r&&Pf(t,r),o}(u.Component);Df.defaultProps={collection:null,collectionPath:[],error:null,isFetching:!1,parentCollection:null,ready:!1,t:function(e){return e},variant:null};var Nf={annotations:Je,attribution:jr,canvas:br,collection:Object(r.compose)(Object(a.a)((function(e){return{label:{paddingLeft:e.spacing(1)},menuItem:{borderBottom:"0.5px solid ".concat(e.palette.divider),paddingRight:e.spacing(1),whiteSpace:"normal"}}})),Object(o.a)(),Object(i.b)((function(e,t){var n=t.id,r=t.windowId,i=Object(oe.e)(e,{windowId:r}),o=Object(ie.getCompanionWindow)(e,{companionWindowId:n}),a=o.collectionPath||i.collectionPath,s=a&&a[a.length-1],c=a&&a[a.length-2],u=s&&Object(oe.b)(e,{manifestId:s}),l=c&&Object(oe.b)(e,{manifestId:c}),f=Object(oe.b)(e,{windowId:r});return{canvasNavigation:e.config.canvasNavigation,collection:u&&Object(tt.q)(e,{manifestId:u.id}),collectionId:s,collectionPath:a,error:u&&u.error,isFetching:u&&u.isFetching,manifestId:f&&f.id,parentCollection:l&&Object(tt.q)(e,{manifestId:l.id}),ready:u&&!!u.json,variant:o.variant||Object(lr.a)(e,{windowId:r})}}),(function(e,t){var n=t.id,r=t.windowId;return{updateCompanionWindow:function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return e(et.e.apply(D,[r,n].concat(i)))},updateWindow:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e(St.l.apply(D,[r].concat(n)))}}})),Object(s.a)("WindowSideBarCollectionPanel"))(Df),custom:_f,info:Jt,layers:pf,search:_o,thumbnailNavigation:ce};t.a=Nf},function(e,t,n){"use strict";var r=n(4),i=n(1),o=n(0),a=n(33),s=(n(2),n(223)),c=n(475),u=n(47),l=n(1123),f=n(82),d=n(31),p=n(39),h=n(337),g=n(244),v=n(1148),m={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},y=o.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,c=Object(r.a)(e,["invisible","open"]);return s?o.createElement("div",Object(i.a)({"aria-hidden":!0,ref:t},c,{style:Object(i.a)({},m.root,a?m.invisible:{},c.style)})):null}));var b=new g.b,w=o.forwardRef((function(e,t){var n=Object(s.a)(),m=Object(c.a)({name:"MuiModal",props:Object(i.a)({},e),theme:n}),w=m.BackdropComponent,_=void 0===w?y:w,x=m.BackdropProps,O=m.children,S=m.closeAfterTransition,E=void 0!==S&&S,C=m.container,k=m.disableAutoFocus,T=void 0!==k&&k,j=m.disableBackdropClick,P=void 0!==j&&j,I=m.disableEnforceFocus,R=void 0!==I&&I,A=m.disableEscapeKeyDown,M=void 0!==A&&A,D=m.disablePortal,N=void 0!==D&&D,L=m.disableRestoreFocus,z=void 0!==L&&L,B=m.disableScrollLock,F=void 0!==B&&B,W=m.hideBackdrop,H=void 0!==W&&W,V=m.keepMounted,U=void 0!==V&&V,q=m.manager,G=void 0===q?b:q,K=m.onBackdropClick,$=m.onClose,Z=m.onEscapeKeyDown,X=m.onRendered,Q=m.open,Y=Object(r.a)(m,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),J=o.useState(!0),ee=J[0],te=J[1],ne=o.useRef({}),re=o.useRef(null),ie=o.useRef(null),oe=Object(d.a)(ie,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(m),se=function(){return Object(u.a)(re.current)},ce=function(){return ne.current.modalRef=ie.current,ne.current.mountNode=re.current,ne.current},ue=function(){G.mount(ce(),{disableScrollLock:F}),ie.current.scrollTop=0},le=Object(p.a)((function(){var e=function(e){return e="function"==typeof e?e():e,a.findDOMNode(e)}(C)||se().body;G.add(ce(),e),ie.current&&ue()})),fe=o.useCallback((function(){return G.isTopModal(ce())}),[G]),de=Object(p.a)((function(e){re.current=e,e&&(X&&X(),Q&&fe()?ue():Object(g.a)(ie.current,!0))})),pe=o.useCallback((function(){G.remove(ce())}),[G]);if(o.useEffect((function(){return function(){pe()}}),[pe]),o.useEffect((function(){Q?le():ae&&E||pe()}),[Q,pe,ae,E,le]),!U&&!Q&&(!ae||ee))return null;var he=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:h.a}),ge={};return void 0===O.props.tabIndex&&(ge.tabIndex=O.props.tabIndex||"-1"),ae&&(ge.onEnter=Object(f.a)((function(){te(!1)}),O.props.onEnter),ge.onExited=Object(f.a)((function(){te(!0),E&&pe()}),O.props.onExited)),o.createElement(l.a,{ref:de,container:C,disablePortal:N},o.createElement("div",Object(i.a)({ref:oe,onKeyDown:function(e){"Escape"===e.key&&fe()&&(Z&&Z(e),M||(e.stopPropagation(),$&&$(e,"escapeKeyDown")))},role:"presentation"},Y,{style:Object(i.a)({},he.root,!Q&&ee?he.hidden:{},Y.style)}),H?null:o.createElement(_,Object(i.a)({open:Q,onClick:function(e){e.target===e.currentTarget&&(K&&K(e),!P&&$&&$(e,"backdropClick"))}},x)),o.createElement(v.a,{disableEnforceFocus:R,disableAutoFocus:T,disableRestoreFocus:z,getDoc:se,isEnabled:fe,open:Q},o.cloneElement(O,ge))))}));t.a=w},function(e,t,n){var r=n(409),i=n(838),o=n(167),a=n(56);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){var r;!function(i){var o=/^\s+/,a=/\s+$/,s=0,c=i.round,u=i.min,l=i.max,f=i.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,c=null,f=!1,d=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(a,"").toLowerCase();var t,n=!1;if(P[e])e=P[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=V.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=V.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=V.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=V.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=V.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=V.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=V.hex8.exec(e))return{r:D(t[1]),g:D(t[2]),b:D(t[3]),a:B(t[4]),format:n?"name":"hex8"};if(t=V.hex6.exec(e))return{r:D(t[1]),g:D(t[2]),b:D(t[3]),format:n?"name":"hex"};if(t=V.hex4.exec(e))return{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),a:B(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=V.hex3.exec(e))return{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(p=e.r,h=e.g,g=e.b,t={r:255*A(p,255),g:255*A(h,255),b:255*A(g,255)},f=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(r=L(e.s),s=L(e.v),t=function(e,t,n){e=6*A(e,360),t=A(t,100),n=A(n,100);var r=i.floor(e),o=e-r,a=n*(1-t),s=n*(1-o*t),c=n*(1-(1-o)*t),u=r%6;return{r:255*[n,s,a,a,c,n][u],g:255*[c,n,n,s,a,a][u],b:255*[a,a,c,n,n,s][u]}}(e.h,r,s),f=!0,d="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(r=L(e.s),c=L(e.l),t=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=A(e,360),t=A(t,100),n=A(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=a(c,s,e+1/3),i=a(c,s,e),o=a(c,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,c),f=!0,d="hsl"),e.hasOwnProperty("a")&&(n=e.a));var p,h,g;return n=R(n),{ok:f,format:e.format||d,r:u(255,l(t.r,0)),g:u(255,l(t.g,0)),b:u(255,l(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=c(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=n.ok,this._tc_id=s++}function p(e,t,n){e=A(e,255),t=A(t,255),n=A(n,255);var r,i,o=l(e,t,n),a=u(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var c=o-a;switch(i=s>.5?c/(2-o-a):c/(o+a),o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,l:s}}function h(e,t,n){e=A(e,255),t=A(t,255),n=A(n,255);var r,i,o=l(e,t,n),a=u(e,t,n),s=o,c=o-a;if(i=0===o?0:c/o,o==a)r=0;else{switch(o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,v:s}}function g(e,t,n,r){var i=[N(c(e).toString(16)),N(c(t).toString(16)),N(c(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function v(e,t,n,r){return[N(z(r)),N(c(e).toString(16)),N(c(t).toString(16)),N(c(n).toString(16))].join("")}function m(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s-=t/100,n.s=M(n.s),d(n)}function y(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s+=t/100,n.s=M(n.s),d(n)}function b(e){return d(e).desaturate(100)}function w(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l+=t/100,n.l=M(n.l),d(n)}function _(e,t){t=0===t?0:t||10;var n=d(e).toRgb();return n.r=l(0,u(255,n.r-c(-t/100*255))),n.g=l(0,u(255,n.g-c(-t/100*255))),n.b=l(0,u(255,n.b-c(-t/100*255))),d(n)}function x(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l-=t/100,n.l=M(n.l),d(n)}function O(e,t){var n=d(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,d(n)}function S(e){var t=d(e).toHsl();return t.h=(t.h+180)%360,d(t)}function E(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+120)%360,s:t.s,l:t.l}),d({h:(n+240)%360,s:t.s,l:t.l})]}function C(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+90)%360,s:t.s,l:t.l}),d({h:(n+180)%360,s:t.s,l:t.l}),d({h:(n+270)%360,s:t.s,l:t.l})]}function k(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+72)%360,s:t.s,l:t.l}),d({h:(n+216)%360,s:t.s,l:t.l})]}function T(e,t,n){t=t||6,n=n||30;var r=d(e).toHsl(),i=360/n,o=[d(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(d(r));return o}function j(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(d({h:r,s:i,v:o})),o=(o+s)%1;return a}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=R(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),n=c(100*e.s),r=c(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=p(this._r,this._g,this._b),t=c(360*e.h),n=c(100*e.s),r=c(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[N(c(e).toString(16)),N(c(t).toString(16)),N(c(n).toString(16)),N(z(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*A(this._r,255))+"%",g:c(100*A(this._g,255))+"%",b:c(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*A(this._r,255))+"%, "+c(100*A(this._g,255))+"%, "+c(100*A(this._b,255))+"%)":"rgba("+c(100*A(this._r,255))+"%, "+c(100*A(this._g,255))+"%, "+c(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(I[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=d(e);n="#"+v(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:f(),g:f(),b:f()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),i=d(t).toRgb(),o=n/100;return d({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,i,o=d.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},d.mostReadable=function(e,t,n){var r,i,o,a,s=null,c=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var u=0;u<t.length;u++)(r=d.readability(e,t[u]))>c&&(c=r,s=d(t[u]));return d.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var P=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},I=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(P);function R(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function A(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function M(e){return u(1,l(0,e))}function D(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function z(e){return i.round(255*parseFloat(e)).toString(16)}function B(e){return D(e)/255}var F,W,H,V=(W="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",H="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+W),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+W),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+W),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!V.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},,,,,,,,,,,,,,,,,,,,,function(e,t,n){var r=n(532);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(781),i=n(92),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},function(e,t,n){(function(e){var r=n(78),i=n(782),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;e.exports=c}).call(this,n(281)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(788),i=n(789),o=n(790),a=n(791),s=n(792);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},function(e,t,n){var r=n(285);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(164)(Object,"create");e.exports=r},function(e,t,n){var r=n(806);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(166),i=n(92);e.exports=function(e){return i(e)&&r(e)}},function(e,t,n){"use strict";n.r(t);var r=n(575);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return l}));var r=n(1),i=n(4),o=n(0),a=n.n(o),s=(n(2),n(83)),c=n.n(s),u=n(223);function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=function(e){var n=a.a.forwardRef((function(n,o){var s=n.innerRef,c=Object(i.a)(n,["innerRef"]),l=Object(u.a)()||t;return a.a.createElement(e,Object(r.a)({theme:l,ref:s||o},c))}));return c()(n,e),n};return n}var f=l();t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(50),i=n(1),o=(n(2),n(136));function a(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function s(e){var t=function(t){var n=e(t);return t.css?Object(i.a)({},Object(o.a)(n,e(Object(i.a)({theme:t.theme},t.css))),a(t.css,[e.filterProps])):t.sx?Object(i.a)({},Object(o.a)(n,e(Object(i.a)({theme:t.theme},t.sx))),a(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat(Object(r.a)(e.filterProps)),t}function c(e){return s(e)}t.b=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"e",(function(){return d}));var r=n(22),i=n(69);function o(e){return"number"!=typeof e?e:"".concat(e,"px solid")}var a=Object(r.a)({prop:"border",themeKey:"borders",transform:o}),s=Object(r.a)({prop:"borderTop",themeKey:"borders",transform:o}),c=Object(r.a)({prop:"borderRight",themeKey:"borders",transform:o}),u=Object(r.a)({prop:"borderBottom",themeKey:"borders",transform:o}),l=Object(r.a)({prop:"borderLeft",themeKey:"borders",transform:o}),f=Object(r.a)({prop:"borderColor",themeKey:"palette"}),d=Object(r.a)({prop:"borderRadius",themeKey:"shape"}),p=Object(i.a)(a,s,c,u,l,f,d);t.h=p},function(e,t,n){"use strict";n.d(t,"f",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"k",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return l})),n.d(t,"n",(function(){return f})),n.d(t,"e",(function(){return d})),n.d(t,"h",(function(){return p})),n.d(t,"i",(function(){return h})),n.d(t,"c",(function(){return g})),n.d(t,"l",(function(){return v})),n.d(t,"m",(function(){return m}));var r=n(22),i=n(69),o=Object(r.a)({prop:"flexBasis"}),a=Object(r.a)({prop:"flexDirection"}),s=Object(r.a)({prop:"flexWrap"}),c=Object(r.a)({prop:"justifyContent"}),u=Object(r.a)({prop:"alignItems"}),l=Object(r.a)({prop:"alignContent"}),f=Object(r.a)({prop:"order"}),d=Object(r.a)({prop:"flex"}),p=Object(r.a)({prop:"flexGrow"}),h=Object(r.a)({prop:"flexShrink"}),g=Object(r.a)({prop:"alignSelf"}),v=Object(r.a)({prop:"justifyItems"}),m=Object(r.a)({prop:"justifySelf"}),y=Object(i.a)(o,a,s,c,u,l,f,d,p,h,g,v,m);t.d=y},function(e,t,n){"use strict";n.d(t,"h",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"e",(function(){return d})),n.d(t,"l",(function(){return p})),n.d(t,"m",(function(){return h})),n.d(t,"k",(function(){return g})),n.d(t,"b",(function(){return v}));var r=n(22),i=n(69),o=Object(r.a)({prop:"gridGap"}),a=Object(r.a)({prop:"gridColumnGap"}),s=Object(r.a)({prop:"gridRowGap"}),c=Object(r.a)({prop:"gridColumn"}),u=Object(r.a)({prop:"gridRow"}),l=Object(r.a)({prop:"gridAutoFlow"}),f=Object(r.a)({prop:"gridAutoColumns"}),d=Object(r.a)({prop:"gridAutoRows"}),p=Object(r.a)({prop:"gridTemplateColumns"}),h=Object(r.a)({prop:"gridTemplateRows"}),g=Object(r.a)({prop:"gridTemplateAreas"}),v=Object(r.a)({prop:"gridArea"}),m=Object(i.a)(o,a,s,c,u,l,f,d,p,h,g,v);t.a=m},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return l}));var r=n(22),i=n(69),o=Object(r.a)({prop:"position"}),a=Object(r.a)({prop:"zIndex",themeKey:"zIndex"}),s=Object(r.a)({prop:"top"}),c=Object(r.a)({prop:"right"}),u=Object(r.a)({prop:"bottom"}),l=Object(r.a)({prop:"left"});t.b=Object(i.a)(o,a,s,c,u,l)},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(22),i=n(69),o=Object(r.a)({prop:"color",themeKey:"palette"}),a=Object(r.a)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),s=Object(i.a)(o,a);t.c=s},function(e,t,n){"use strict";n.d(t,"j",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"i",(function(){return d})),n.d(t,"h",(function(){return p})),n.d(t,"a",(function(){return h}));var r=n(22),i=n(69);function o(e){return e<=1?"".concat(100*e,"%"):e}var a=Object(r.a)({prop:"width",transform:o}),s=Object(r.a)({prop:"maxWidth",transform:o}),c=Object(r.a)({prop:"minWidth",transform:o}),u=Object(r.a)({prop:"height",transform:o}),l=Object(r.a)({prop:"maxHeight",transform:o}),f=Object(r.a)({prop:"minHeight",transform:o}),d=Object(r.a)({prop:"size",cssProperty:"width",transform:o}),p=Object(r.a)({prop:"size",cssProperty:"height",transform:o}),h=Object(r.a)({prop:"boxSizing"}),g=Object(i.a)(a,s,c,u,l,f,h);t.b=g},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return f}));var r=n(22),i=n(69),o=Object(r.a)({prop:"fontFamily",themeKey:"typography"}),a=Object(r.a)({prop:"fontSize",themeKey:"typography"}),s=Object(r.a)({prop:"fontStyle",themeKey:"typography"}),c=Object(r.a)({prop:"fontWeight",themeKey:"typography"}),u=Object(r.a)({prop:"letterSpacing"}),l=Object(r.a)({prop:"lineHeight"}),f=Object(r.a)({prop:"textAlign"}),d=Object(i.a)(o,a,s,c,u,l,f);t.a=d},function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return p}));var r=n(1),i=n(4),o=n(0),a=(n(2),n(475)),s=n(83),c=n.n(s),u=n(36),l=n(111),f=n(1133),d=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n?l.b.indexOf(e)<=l.b.indexOf(t):l.b.indexOf(e)<l.b.indexOf(t)},p=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n?l.b.indexOf(t)<=l.b.indexOf(e):l.b.indexOf(t)<l.b.indexOf(e)},h="undefined"==typeof window?o.useEffect:o.useLayoutEffect;t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=e.withTheme,s=void 0!==n&&n,l=e.noSSR,d=void 0!==l&&l,p=e.initialWidth;function g(e){var n=Object(u.a)(),c=e.theme||n,l=Object(a.a)({theme:c,name:"MuiWithWidth",props:Object(r.a)({},e)}),g=l.initialWidth,v=l.width,m=Object(i.a)(l,["initialWidth","width"]),y=o.useState(!1),b=y[0],w=y[1];h((function(){w(!0)}),[]);var _=c.breakpoints.keys.slice().reverse().reduce((function(e,t){var n=Object(f.a)(c.breakpoints.up(t));return!e&&n?t:e}),null),x=Object(r.a)({width:v||(b||d?_:void 0)||g||p},s?{theme:c}:{},m);return void 0===x.width?null:o.createElement(t,x)}return c()(g,t),g}}},function(e,t,n){"use strict";n.r(t);var r=n(582);n.d(t,"default",(function(){return r.a}))},function(e,t,n){var r=n(400),i=n(421),o=n(422),a=n(587),s=n(877),c=n(880),u=n(302),l=n(881),f=n(882),d=n(541),p=n(424),h=n(198),g=n(883),v=n(884),m=n(889),y=n(56),b=n(280),w=n(890),_=n(68),x=n(892),O=n(165),S=n(423),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,e.exports=function e(t,n,C,k,T,j){var P,I=1&n,R=2&n,A=4&n;if(C&&(P=T?C(t,k,T,j):C(t)),void 0!==P)return P;if(!_(t))return t;var M=y(t);if(M){if(P=g(t),!I)return u(t,P)}else{var D=h(t),N="[object Function]"==D||"[object GeneratorFunction]"==D;if(b(t))return c(t,I);if("[object Object]"==D||"[object Arguments]"==D||N&&!T){if(P=R||N?{}:m(t),!I)return R?f(t,s(P,t)):l(t,a(P,t))}else{if(!E[D])return T?t:{};P=v(t,D,I)}}j||(j=new r);var L=j.get(t);if(L)return L;j.set(t,P),x(t)?t.forEach((function(r){P.add(e(r,n,C,r,t,j))})):w(t)&&t.forEach((function(r,i){P.set(i,e(r,n,C,i,t,j))}));var z=M?void 0:(A?R?p:d:R?S:O)(t);return i(z||t,(function(r,i){z&&(r=t[i=r]),o(P,i,e(r,n,C,i,t,j))})),P}},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(68),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},function(e,t,n){var r=n(303),i=n(68);e.exports=function(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=r(e.prototype),o=e.apply(n,t);return i(o)?o:n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findInArray=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},t.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},t.isNum=function(e){return"number"==typeof e&&!isNaN(e)},t.int=function(e){return parseInt(e,10)},t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}},function(e,t,n){"use strict";var r=n(609),i=n(610);e.exports=function(e,t){var n=t.getStartKey(),o=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),c=i(e,t).getBlockMap(),u=c.keySeq(),l=u.indexOf(n),f=u.indexOf(a)+1;return r(c.slice(l,f).map((function(e,t){var r=e.getText(),i=e.getCharacterList();return n===a?e.merge({text:r.slice(o,s),characterList:i.slice(o,s)}):t===n?e.merge({text:r.slice(o),characterList:i.slice(o)}):t===a?e.merge({text:r.slice(0,s),characterList:i.slice(0,s)}):e})))}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(615),o=n(40),a=n(42),s=n(957),c=(0,o.Map)(),u=s();function l(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var f={getLastCreatedEntityKey:function(){return l("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),f.__getLastCreatedEntityKey()},create:function(e,t,n){return l("DraftEntity.create","contentState.createEntity"),f.__create(e,t,n)},add:function(e){return l("DraftEntity.add","contentState.addEntity"),f.__add(e)},get:function(e){return l("DraftEntity.get","contentState.getEntity"),f.__get(e)},__getAll:function(){return c},__loadWithEntities:function(e){c=e,u=s()},mergeData:function(e,t){return l("DraftEntity.mergeData","contentState.mergeEntityData"),f.__mergeData(e,t)},replaceData:function(e,t){return l("DraftEntity.replaceData","contentState.replaceEntityData"),f.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return u},__create:function(e,t,n){return f.__add(new i({type:e,mutability:t,data:n||{}}))},__add:function(e){return u=s(),c=c.set(u,e),u},__get:function(e){var t=c.get(e);return t||a(!1),t},__mergeData:function(e,t){var n=f.__get(e),i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){r(e,t,n[t])}))}return e}({},n.getData(),t),o=n.set("data",i);return c=c.set(e,o),o},__replaceData:function(e,t){var n=f.__get(e).set("data",t);return c=c.set(e,n),n}};e.exports=f},function(e,t,n){"use strict";var r=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},i.getAnchorKey=function(){return this.get("anchorKey")},i.getAnchorOffset=function(){return this.get("anchorOffset")},i.getFocusKey=function(){return this.get("focusKey")},i.getFocusOffset=function(){return this.get("focusOffset")},i.getIsBackward=function(){return this.get("isBackward")},i.getHasFocus=function(){return this.get("hasFocus")},i.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var o=this.getStartOffset(),a=this.getEndOffset();return t<=o&&o<=n||t<=a&&a<=n}if(e!==r&&e!==i)return!1;var s=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=s&&n>=s},i.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},i.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},i.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},i.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},i.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},r.createEmpty=function(e){return new r({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},r}((0,n(40).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=r},function(e,t,n){"use strict";var r=n(42),i=null;function o(e){return"LTR"===e||"RTL"===e}function a(e){return o(e)||r(!1),"LTR"===e?"ltr":"rtl"}function s(e){i=e}var c={NEUTRAL:"NEUTRAL",LTR:"LTR",RTL:"RTL",isStrong:o,getHTMLDir:a,getHTMLDirIfDifferent:function(e,t){return o(e)||r(!1),o(t)||r(!1),e===t?null:a(e)},setGlobalDir:s,initGlobalDir:function(){s("LTR")},getGlobalDir:function(){return i||this.initGlobalDir(),i||r(!1),i}};e.exports=c},function(e,t,n){"use strict";var r=n(311),i=n(618);e.exports=function(e){for(var t=e;t&&t!==r(e).documentElement;){var n=i(t);if(null!=n)return n;t=t.parentNode}return null}},function(e,t,n){"use strict";e.exports=function(e){return e&&e.ownerDocument?e.ownerDocument:document}},function(e,t,n){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},function(e,t,n){"use strict";function r(e,t){var n=i.get(e,t);return"auto"===n||"scroll"===n}var i={get:n(980),getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(r(e,"overflow")||r(e,"overflowY")||r(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}};e.exports=i},function(e,t,n){"use strict";var r=n(984),i=n(985);e.exports=function(e){var t=r(e.ownerDocument||e.document);e.Window&&e instanceof e.Window&&(e=t);var n=i(e),o=e===t?e.ownerDocument.documentElement:e,a=e.scrollWidth-o.clientWidth,s=e.scrollHeight-o.clientHeight;return n.x=Math.max(0,Math.min(n.x,a)),n.y=Math.max(0,Math.min(n.y,s)),n}},function(e,t,n){"use strict";e.exports=function(e){return"handled"===e||!0===e}},function(e,t){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicDragType=void 0,t.MosaicDragType={WINDOW:"MosaicWindow"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(41),i=n(208),o=n(136);var a,s,c={m:"margin",p:"padding"},u={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},f=(a=function(e){if(e.length>2){if(!l[e])return[e];e=l[e]}var t=e.split(""),n=Object(r.a)(t,2),i=n[0],o=n[1],a=c[i],s=u[o]||"";return Array.isArray(s)?s.map((function(e){return a+e})):[a+s]},s={},function(e){return void 0===s[e]&&(s[e]=a(e)),s[e]}),d=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function p(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}function h(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"==typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function g(e){var t=p(e.theme);return Object.keys(e).map((function(n){if(-1===d.indexOf(n))return null;var r=h(f(n),t),o=e[n];return Object(i.b)(e,o,r)})).reduce(o.a,{})}g.propTypes={},g.filterProps=d;t.b=g},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return p}));var r=n(10),i=n(38),o=n(46);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){return Object(o.a)(e).elasticLayout}var u=Object(r.createSelector)([i.i],(function(e){return e.isFullscreenEnabled}));function l(e){var t=a(Object(o.a)(e).errors.items,1)[0];return Object(o.a)(e).errors[t]}var f=Object(r.createSelector)([i.i],(function(e){return e.type})),d=Object(r.createSelector)([i.i],(function(e){return e.focusedWindowId})),p=function(e,t){var n=t.windowId;return d(e)===n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"b",(function(){return f}));var r=n(126),i=n(6);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return{config:e,type:i.a.IMPORT_CONFIG}}function u(e){return{config:e,type:i.a.SET_CONFIG}}function l(e){return{config:e,type:i.a.UPDATE_CONFIG}}function f(e){return{state:a(a({},e),{},{workspace:a(a({},e.workspace),{},{id:Object(r.a)()})}),type:i.a.IMPORT_MIRADOR_STATE}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return l}));var r=n(10),i=n(48),o=n(45),a=n(46),s=Object(r.createSelector)([o.getCanvas],(function(e){return e?new i.a(e).imageResources:[]})),c=Object(r.createSelector)([function(e){return Object(a.a)(e).layers||{}},function(e,t){return t.windowId},function(e,t){return t.canvasId}],(function(e,t,n){return(e[t]||{})[n]})),u=Object(r.createSelector)([s,c],(function(e,t){return t?e.sort((function(e,n){return t[e.id]&&void 0!==t[e.id].index&&t[n.id]&&void 0!==t[n.id].index?t[e.id].index-t[n.id].index:t[e.id]&&void 0!==t[e.id].index?-1:t[n.id]&&void 0!==t[n.id].index?1:0})):e})),l=Object(r.createSelector)([o.getVisibleCanvasIds,function(e,t){var n=t.windowId;return function(t){return c(e,{canvasId:t,windowId:n})}}],(function(e,t){return e.reduce((function(e,n){return e[n]=t(n),e}),{})}))},function(e,t,n){"use strict";var r=n(1),i=n(1126),o=n(121);t.a=function(e){var t=Object(i.a)(e);return function(e,n){return t(e,Object(r.a)({defaultTheme:o.a},n))}}},function(e,t,n){var r=n(1064),i=n(165);e.exports=function(e){return null==e?[]:r(e,i(e))}},function(e,t,n){var r=n(316),i=n(234);e.exports=function(e,t,n){var o=null==e?0:e.length;return o?(t=n||void 0===t?1:i(t),r(e,0,(t=o-t)<0?0:t)):[]}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return o}));var i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}},function(e,t,n){var r=n(416),i=n(204),o=n(288),a=i((function(e,t){return o(e)?r(e,t):[]}));e.exports=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(35),i=n(328),o=n(48),a=n(110);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){var t=e&&e.getServices().find((function(e){return function(e){var t=e.getProperty("type")||[];return Object(a.a)(t).some((function(e){return e.startsWith("ImageService")}))}(e)||r.d.isImageProfile(e.getProfile())}));if(t)return t}var l=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,e),this.resource=t,this.iiifOpts=n}var t,n,l;return t=e,l=[{key:"staticImageUrl",value:function(e){return{height:e.getProperty("height"),url:e.id,width:e.getProperty("width")}}},{key:"getPreferredImage",value:function(e){var t=new o.a(e);return t.iiifImageResources[0]||t.imageResource}},{key:"selectBestImageSize",value:function(e,t){var n=Object(a.a)(e.getProperty("sizes")),r={default:!0,height:e.getProperty("height")||Number.MAX_SAFE_INTEGER,width:e.getProperty("width")||Number.MAX_SAFE_INTEGER},i=function(e){return e.width*e.height-t};if((r=n.reduce((function(e,t){var n=i(t);return n<0?e:Math.abs(n)<Math.abs(i(e))?t:e}),r)).width*r.height>6*t&&(r=n.reduce((function(e,t){return Math.abs(i(t))<Math.abs(i(e))?t:e}),r)),!r.default)return r}}],(n=[{key:"iiifThumbnailUrl",value:function(t){var n,i,o,a=120,s=120,c=this.iiifOpts,l=c.maxHeight,f=c.maxWidth;l&&(a=Math.max(l,120)),f&&(s=Math.max(f,120));var d=u(t);if(!d)return e.staticImageUrl(t);var p=t.getWidth()&&t.getHeight()&&t.getWidth()/t.getHeight(),h=f&&l?f*l:a*s,g=e.selectBestImageSize(d,h);if(g)i=g.width,o=g.height,n="".concat(i,",").concat(o);else if(function(e){var t=e.getProfile();return!t.endsWith("#level1")&&!t.endsWith("#level2")&&("level0"===t||r.d.isLevel0ImageProfile(t))}(d)){if(!d.getProperty("height")&&!d.getProperty("width"))return e.staticImageUrl(t)}else l&&f?function(e){var t=e.getProfile();return!t.endsWith("#level0")&&!t.endsWith("#level1")&&("level2"===t||r.d.isLevel2ImageProfile(t))}(d)?(n="!".concat(s,",").concat(a),i=s,o=a,p&&p>1&&(o=Math.round(s/p)),p&&p<1&&(i=Math.round(a*p))):s/a<p?(n="".concat(s,","),i=s,p&&(o=Math.round(s/p))):(n=",".concat(a),o=a,p&&(i=Math.round(a*p))):l&&!f?(n=",".concat(a),o=a,p&&(i=Math.round(a*p))):!l&&f?(n="".concat(s,","),i=s,p&&(o=Math.round(s/p))):(n=",".concat(120),o=120,p&&(i=Math.round(o*p)));var v=r.d.getImageQuality(d.getProfile()),m=d.id.replace(/\/+$/,""),y=this.getFormat(d);return{height:o,url:[m,"full",n,0,"".concat(v,".").concat(y)].join("/"),width:i}}},{key:"getFormat",value:function(e){var t=this.iiifOpts.preferredFormats,n=void 0===t?[]:t,r=e.getProperty("preferredFormats");if(!r)return"jpg";var i=r.filter((function(e){return n.includes(e)}));return i[0]?i[0]:!r.includes("jpg")&&n.includes("jpg")?"jpg":r[0]?r[0]:"jpg"}},{key:"getSourceContentResource",value:function(t){var n=t.getThumbnail();if(n)return"string"==typeof n.__jsonld?n.__jsonld:t.isCollection()||t.isManifest()||t.isCanvas()||"image"!==t.getType()||!u(t)||u(n)?n:t;if(t.isCollection()){var r=t.getManifests()[0];return r?this.getSourceContentResource(r):void 0}if(t.isManifest()){var o=new i.a(t),a=o.startCanvas||o.canvasAt(0);return a?this.getSourceContentResource(a):void 0}if(t.isCanvas()){var s=e.getPreferredImage(t);return s?this.getSourceContentResource(s):void 0}return"image"===t.getType()?t:void 0}},{key:"get",value:function(){if(this.resource){var e=this.getSourceContentResource(this.resource);if(e)return"string"==typeof e?{url:e}:this.iiifThumbnailUrl(e)}}}])&&c(t.prototype,n),l&&c(t,l),e}();function f(e,t){return new l(e,t).get()}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,"a",(function(){return i}));var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.manifest=t}var t,n,i;return t=e,(n=[{key:"startCanvas",get:function(){var e,t=this.manifest.getSequences()[0];if(t){if(!(e=t.getProperty("startCanvas"))){var n=this.manifest.getProperty("start")||t.getProperty("start");e=n&&(n.id||n.source)}return e&&t.getCanvasById(e)||void 0}}},{key:"canvasAt",value:function(e){var t=this.manifest.getSequences()[0],n=t&&t.getCanvases();return n&&n[e]}}])&&r(t.prototype,n),i&&r(t,i),e}()},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(11),u=o.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,l=e.color,f=void 0===l?"inherit":l,d=e.component,p=void 0===d?"svg":d,h=e.fontSize,g=void 0===h?"medium":h,v=e.htmlColor,m=e.titleAccess,y=e.viewBox,b=void 0===y?"0 0 24 24":y,w=Object(i.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return o.createElement(p,Object(r.a)({className:Object(a.a)(s.root,u,"inherit"!==f&&s["color".concat(Object(c.a)(f))],"default"!==g&&"medium"!==g&&s["fontSize".concat(Object(c.a)(g))]),focusable:"false",viewBox:b,color:v,"aria-hidden":!m||void 0,role:m?"img":void 0,ref:t},w),n,m?o.createElement("title",null,m):null)}));u.muiName="SvgIcon",t.a=Object(s.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(u)},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),i=n(70);function o(e){return e&&"object"===Object(i.a)(e)&&e.constructor===Object}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?Object(r.a)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(o(t[r])&&r in e?i[r]=a(e[r],t[r],n):i[r]=t[r])})),i}},function(e,t,n){"use strict";var r=n(0),i=n.n(r).a.createContext(null);t.a=i},function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";function r(){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}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(335),i=n(333),o=n(209),a=n(336);function s(e){return Object(r.a)(e)||Object(i.a)(e)||Object(o.a)(e)||Object(a.a)()}},function(e,t,n){"use strict";var r=n(0),i=r.createContext({});t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(43);t.a=Object(i.a)(r.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(11),c=o.forwardRef((function(e,t){var n=e.classes,c=e.className,u=e.disabled,l=e.IconComponent,f=e.inputRef,d=e.variant,p=void 0===d?"standard":d,h=Object(i.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return o.createElement(o.Fragment,null,o.createElement("select",Object(r.a)({className:Object(a.a)(n.root,n.select,n[p],c,u&&n.disabled),disabled:u,ref:f||t},h)),e.multiple?null:o.createElement(l,{className:Object(a.a)(n.icon,n["icon".concat(Object(s.a)(p))],u&&n.disabled)}))}));t.a=c},function(e,t,n){var r=n(142),i=n(56),o=n(92);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(91))},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(0),o=r(i),a=r(n(33)),s=r(n(898)),c=n(899),u=r(n(900)),l=r(n(911));function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?x(e):t}var S={};function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll";return S[e]||(S[e]=u({strategy:e})),S[e]}var C="react-sizeme: an error occurred whilst stopping to listen to node size changes",k={monitorWidth:!0,monitorHeight:!1,monitorPosition:!1,refreshRate:16,refreshMode:"throttle",noPlaceholder:!1,resizeDetectorStrategy:"scroll"};function T(e){return e.displayName||e.name||"Component"}var j=function(e){function t(){return f(this,t),O(this,b(t).apply(this,arguments))}return y(t,e),p(t,[{key:"render",value:function(){return i.Children.only(this.props.children)}}]),t}(i.Component);function P(e){var t=e.className,n=e.style,r={};return t||n?(t&&(r.className=t),n&&(r.style=n)):r.style={width:"100%",height:"100%"},o.createElement("div",r)}h(j,"displayName","SizeMeReferenceWrapper"),P.displayName="SizeMePlaceholder";var I=function(e){function t(t){var n=t.explicitRef,r=t.className,i=t.style,a=t.size,s=t.disablePlaceholder,c=(t.onSize,_(t,["explicitRef","className","style","size","disablePlaceholder","onSize"])),u=(null==a||null==a.width&&null==a.height&&null==a.position)&&!s,l={className:r,style:i};null!=a&&(l.size=a);var f=u?o.createElement(P,{className:r,style:i}):o.createElement(e,g({},l,c));return o.createElement(j,{ref:n},f)}return t.displayName="SizeMeRenderer(".concat(T(e),")"),t};function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=e.monitorWidth,n=void 0===t?k.monitorWidth:t,r=e.monitorHeight,i=void 0===r?k.monitorHeight:r,u=e.monitorPosition,l=void 0===u?k.monitorPosition:u,d=e.refreshRate,v=void 0===d?k.refreshRate:d,w=e.refreshMode,_=void 0===w?k.refreshMode:w,S=e.noPlaceholder,j=void 0===S?k.noPlaceholder:S,P=e.resizeDetectorStrategy,A=void 0===P?k.resizeDetectorStrategy:P;s(n||i||l,'You have to monitor at least one of the width, height, or position when using "sizeMe"'),s(v>=16,"It is highly recommended that you don't put your refreshRate lower than 16 as this may cause layout thrashing."),s("throttle"===_||"debounce"===_,'The refreshMode should have a value of "throttle" or "debounce"');var M="throttle"===_?c.throttle:c.debounce;return function(e){var t=I(e),r=function(e){function r(){var e,t;f(this,r);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return h(x(t=O(this,(e=b(r)).call.apply(e,[this].concat(a)))),"domEl",null),h(x(t),"state",{width:void 0,height:void 0,position:void 0}),h(x(t),"uninstall",(function(){if(t.domEl){try{t.detector.uninstall(t.domEl)}catch(e){console.warn(C)}t.domEl=null}})),h(x(t),"determineStrategy",(function(e){e.onSize?(t.callbackState||(t.callbackState=m({},t.state)),t.strategy="callback"):t.strategy="render"})),h(x(t),"strategisedSetState",(function(e){"callback"===t.strategy&&(t.callbackState=e,t.props.onSize(e)),t.setState(e)})),h(x(t),"strategisedGetState",(function(){return"callback"===t.strategy?t.callbackState:t.state})),h(x(t),"refCallback",(function(e){t.element=e})),h(x(t),"hasSizeChanged",(function(e,t){var r=e,o=t,a=r.position||{},s=o.position||{};return n&&r.width!==o.width||i&&r.height!==o.height||l&&(a.top!==s.top||a.left!==s.left||a.bottom!==s.bottom||a.right!==s.right)})),h(x(t),"checkIfSizeChanged",M(v,(function(e){var r=e.getBoundingClientRect(),o=r.width,a=r.height,s=r.right,c=r.left,u=r.top,f=r.bottom,d={width:n?o:null,height:i?a:null,position:l?{right:s,left:c,top:u,bottom:f}:null};t.hasSizeChanged(t.strategisedGetState(),d)&&t.strategisedSetState(d)}))),t}return y(r,e),p(r,[{key:"componentDidMount",value:function(){this.detector=E(A),this.determineStrategy(this.props),this.handleDOMNode()}},{key:"componentDidUpdate",value:function(){this.determineStrategy(this.props),this.handleDOMNode()}},{key:"componentWillUnmount",value:function(){this.hasSizeChanged=function(){},this.checkIfSizeChanged=function(){},this.uninstall()}},{key:"handleDOMNode",value:function(){var e=this.element&&a.findDOMNode(this.element);e?this.domEl?(this.domEl.isSameNode&&!this.domEl.isSameNode(e)||this.domEl!==e)&&(this.uninstall(),this.domEl=e,this.detector.listenTo(this.domEl,this.checkIfSizeChanged)):(this.domEl=e,this.detector.listenTo(this.domEl,this.checkIfSizeChanged)):this.uninstall()}},{key:"render",value:function(){var e=R.enableSSRBehaviour||R.noPlaceholders||j||"callback"===this.strategy,n=m({},this.state);return o.createElement(t,g({explicitRef:this.refCallback,size:"callback"===this.strategy?null:n,disablePlaceholder:e},this.props))}}]),r}(o.Component);return h(r,"displayName","SizeMe(".concat(T(e),")")),r.WrappedComponent=e,r}}R.enableSSRBehaviour=!1,R.noPlaceholders=!1;var A=function(e){function t(e){var n;f(this,t),h(x(n=O(this,b(t).call(this,e))),"createComponent",(function(e){n.SizeAware=R(e)((function(e){return e.children}))})),h(x(n),"onSize",(function(e){return n.setState({size:e})}));e.children,e.render;var r=_(e,["children","render"]);return n.createComponent(r),n.state={size:{width:void 0,height:void 0}},n}return y(t,e),p(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=(t.children,t.render,_(t,["children","render"])),r=(e.children,e.render,_(e,["children","render"]));l(n,r)||this.createComponent(n)}},{key:"render",value:function(){var e=this.SizeAware,t=this.props.children||this.props.render;return o.createElement(e,{onSize:this.onSize},t({size:this.state.size}))}}]),t}(i.Component);h(A,"defaultProps",{children:void 0,render:void 0}),R.SizeMe=A,R.withSize=R,e.exports=R},function(e,t,n){var r=n(912),i=n(913),o=n(914),a=n(916);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(0),i=n.n(r).a.createContext();t.a=i},function(e,t,n){var r=n(1045)(!0);e.exports=r},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(239)),o=n(80),a=r(n(648));var s=function(e,t){return(0,o.withStyles)(e,(0,i.default)({defaultTheme:a.default},t))};t.default=s},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}),"TuneSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"VisibilitySharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24zM3.42 2.45L2.01 3.87l2.68 2.68C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l3.43 3.43 1.41-1.41L3.42 2.45zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5zm2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64l2.64 2.64z"}),"VisibilityOffSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h12v-4H8v4zm0 5h12v-4H8v4zM8 5v4h12V5H8z"}),"ViewListSharp");t.default=a},function(e,t,n){"use strict";var r=n(0),i=n(43);t.a=Object(i.a)(r.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")},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBackSharp");t.default=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(84),i=n(0),o=n(94);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t,n){var s=a(Object(i.useState)((function(){return t(e)})),2),c=s[0],u=s[1],l=Object(i.useCallback)((function(){var i=t(e);Object(r.a)(c,i)||(u(i),n&&n())}),[c,e,n]);return Object(o.a)(l,[]),[c,l]}},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"}),"ExpandMoreSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(17);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=!1,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t,n,a;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;Object(r.a)(!o,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return o=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{o=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&i(t.prototype,n),a&&i(t,a),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(84),i=n(370),o=n(253);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Object(i.a)({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,Object(o.a)(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,n,s;return t=e,(n=[{key:"reconnect",value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}},{key:"receiveHandlerId",value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!Object(r.a)(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}},{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}}])&&a(t.prototype,n),s&&a(t,s),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(94),i=n(356);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t,n){var a=o(Object(i.a)(e,t,n),2),s=a[0],c=a[1];return Object(r.a)((function(){var t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(c,{handlerIds:[t]})}),[e,c]),s}},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"MenuSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M21.99 2H2v16h16l4 4-.01-20zM18 14H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"}),"CommentSharp");t.default=a},function(e,t,n){"use strict";n.r(t),n.d(t,"getEmptyImage",(function(){return R})),n.d(t,"NativeTypes",(function(){return r}));var r={};function i(e){var t=null;return function(){return null==t&&(t=e()),t}}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(r),n.d(r,"FILE",(function(){return g})),n.d(r,"URL",(function(){return v})),n.d(r,"TEXT",(function(){return m}));var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.entered=[],this.isNodeInDocument=t}var t,n,r;return t=e,(n=[{key:"enter",value:function(e){var t=this,n=this.entered.length;return this.entered=function(e,t){var n=new Set,r=function(e){return n.add(e)};e.forEach(r),t.forEach(r);var i=[];return n.forEach((function(e){return i.push(e)})),i}(this.entered.filter((function(n){return t.isNodeInDocument(n)&&(!n.contains||n.contains(e))})),[e]),0===n&&this.entered.length>0}},{key:"leave",value:function(e){var t,n,r=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),n=e,t.filter((function(e){return e!==n}))),r>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&o(t.prototype,n),r&&o(t,r),e}(),s=i((function(){return/firefox/i.test(navigator.userAgent)})),c=i((function(){return Boolean(window.safari)}));function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=t.length,i=[],o=0;o<r;o++)i.push(o);i.sort((function(e,n){return t[e]<t[n]?-1:1}));for(var a,s,c=[],u=[],l=[],f=0;f<r-1;f++)a=t[f+1]-t[f],s=n[f+1]-n[f],u.push(a),c.push(s),l.push(s/a);for(var d=[l[0]],p=0;p<u.length-1;p++){var h=l[p],g=l[p+1];if(h*g<=0)d.push(0);else{a=u[p];var v=u[p+1],m=a+v;d.push(3*m/((m+v)/h+(m+a)/g))}}d.push(l[l.length-1]);for(var y,b=[],w=[],_=0;_<d.length-1;_++){y=l[_];var x=d[_],O=1/u[_],S=x+d[_+1]-y-y;b.push((y-x-S)*O),w.push(S*O*O)}this.xs=t,this.ys=n,this.c1s=d,this.c2s=b,this.c3s=w}var t,n,r;return t=e,(n=[{key:"interpolate",value:function(e){var t=this.xs,n=this.ys,r=this.c1s,i=this.c2s,o=this.c3s,a=t.length-1;if(e===t[a])return n[a];for(var s,c=0,u=o.length-1;c<=u;){var l=t[s=Math.floor(.5*(c+u))];if(l<e)c=s+1;else{if(!(l>e))return n[s];u=s-1}}var f=e-t[a=Math.max(0,u)],d=f*f;return n[a]+r[a]*f+i[a]*d+o[a]*f*d}}])&&u(t.prototype,n),r&&u(t,r),e}();function f(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function d(e){return{x:e.clientX,y:e.clientY}}function p(e,t,n,r,i){var o,a,u="IMG"===(o=t).nodeName&&(s()||!document.documentElement.contains(o)),d=f(u?e:t),p={x:n.x-d.x,y:n.y-d.y},h=e.offsetWidth,g=e.offsetHeight,v=r.anchorX,m=r.anchorY,y=function(e,t,n,r){var i=e?t.width:n,o=e?t.height:r;return c()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(u,t,h,g),b=y.dragPreviewWidth,w=y.dragPreviewHeight,_=i.offsetX,x=i.offsetY,O=0===x||x;return{x:0===_||_?_:new l([0,.5,1],[p.x,p.x/h*b,p.x+b-h]).interpolate(v),y:O?x:(a=new l([0,.5,1],[p.y,p.y/g*w,p.y+w-g]).interpolate(m),c()&&u&&(a+=(window.devicePixelRatio-1)*w),a)}}var h,g="__NATIVE_FILE__",v="__NATIVE_URL__",m="__NATIVE_TEXT__";function y(e,t,n){var r=t.reduce((function(t,n){return t||e.getData(n)}),"");return null!=r?r:n}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=(b(h={},g,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),b(h,v,{exposeProperties:{urls:function(e,t){return y(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),b(h,m,{exposeProperties:{text:function(e,t){return y(e,t,"")}},matchesTypes:["Text","text/plain"]}),h);function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var x=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.item={},this.initializeExposedProperties()}var t,n,r;return t=e,(n=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach((function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var n={};Object.keys(this.config.exposeProperties).forEach((function(r){n[r]={value:t.config.exposeProperties[r](e,t.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,n)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}])&&_(t.prototype,n),r&&_(t,r),e}();function O(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(w).filter((function(e){return w[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var E=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.globalContext=t}var t,n,r;return t=e,(n=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&S(t.prototype,n),r&&S(t,r),e}();function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var P,I=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(e){return f(r.sourceNodes.get(e))},this.endDragNativeItem=function(){r.isDraggingNativeItem()&&(r.actions.endDrag(),r.registry.removeSource(r.currentNativeHandle),r.currentNativeHandle=null,r.currentNativeSource=null)},this.isNodeInDocument=function(e){return r.document&&r.document.body&&document.body.contains(e)},this.endDragIfSourceWasRemovedFromDOM=function(){var e=r.currentDragSourceNode;r.isNodeInDocument(e)||r.clearCurrentDragSourceNode()&&r.actions.endDrag()},this.handleTopDragStartCapture=function(){r.clearCurrentDragSourceNode(),r.dragStartSourceIds=[]},this.handleTopDragStart=function(e){if(!e.defaultPrevented){var t=r.dragStartSourceIds;r.dragStartSourceIds=null;var n=d(e);r.monitor.isDragging()&&r.actions.endDrag(),r.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:r.getSourceClientOffset,clientOffset:n});var i=e.dataTransfer,o=O(i);if(r.monitor.isDragging()){if(i&&"function"==typeof i.setDragImage){var a=r.monitor.getSourceId(),s=r.sourceNodes.get(a),c=r.sourcePreviewNodes.get(a)||s;if(c){var u=r.getCurrentSourcePreviewNodeOptions(),l=p(s,c,n,{anchorX:u.anchorX,anchorY:u.anchorY},{offsetX:u.offsetX,offsetY:u.offsetY});i.setDragImage(c,l.x,l.y)}}try{i.setData("application/json",{})}catch(e){}r.setCurrentDragSourceNode(e.target),r.getCurrentSourcePreviewNodeOptions().captureDraggingState?r.actions.publishDragSource():setTimeout((function(){return r.actions.publishDragSource()}),0)}else if(o)r.beginDragNativeItem(o);else{if(i&&!i.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}},this.handleTopDragEndCapture=function(){r.clearCurrentDragSourceNode()&&r.actions.endDrag()},this.handleTopDragEnterCapture=function(e){if(r.dragEnterTargetIds=[],r.enterLeaveCounter.enter(e.target)&&!r.monitor.isDragging()){var t=e.dataTransfer,n=O(t);n&&r.beginDragNativeItem(n,t)}},this.handleTopDragEnter=function(e){var t=r.dragEnterTargetIds;(r.dragEnterTargetIds=[],r.monitor.isDragging())&&(r.altKeyPressed=e.altKey,s()||r.actions.hover(t,{clientOffset:d(e)}),t.some((function(e){return r.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=r.getCurrentDropEffect())))},this.handleTopDragOverCapture=function(){r.dragOverTargetIds=[]},this.handleTopDragOver=function(e){var t=r.dragOverTargetIds;if(r.dragOverTargetIds=[],!r.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));r.altKeyPressed=e.altKey,r.actions.hover(t||[],{clientOffset:d(e)}),(t||[]).some((function(e){return r.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=r.getCurrentDropEffect())):r.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(e){r.isDraggingNativeItem()&&e.preventDefault(),r.enterLeaveCounter.leave(e.target)&&r.isDraggingNativeItem()&&r.endDragNativeItem()},this.handleTopDropCapture=function(e){r.dropTargetIds=[],e.preventDefault(),r.isDraggingNativeItem()&&r.currentNativeSource.loadDataTransfer(e.dataTransfer),r.enterLeaveCounter.reset()},this.handleTopDrop=function(e){var t=r.dropTargetIds;r.dropTargetIds=[],r.actions.hover(t,{clientOffset:d(e)}),r.actions.drop({dropEffect:r.getCurrentDropEffect()}),r.isDraggingNativeItem()?r.endDragNativeItem():r.endDragIfSourceWasRemovedFromDOM()},this.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new E(n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new a(this.isNodeInDocument)}var t,n,i;return t=e,(n=[{key:"setup",value:function(){if(void 0!==this.window){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}}},{key:"teardown",value:function(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,n){var r=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);var i=function(t){return r.handleDragStart(t,e)},o=function(e){return r.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",i),t.addEventListener("selectstart",o),function(){r.sourceNodes.delete(e),r.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",i),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},i=function(t){return n.handleDragOver(t,e)},o=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",i),t.addEventListener("drop",o),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",i),t.removeEventListener("drop",o)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return k({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return k({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(r).some((function(t){return r[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var n=new x(w[e]);return n.loadDataTransfer(t),n}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){return t.window&&t.window.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}}])&&j(t.prototype,n),i&&j(t,i),e}();function R(){return P||((P=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),P}t.default=function(e,t){return new I(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return S}));var r=n(0),i=n.n(r),o=(n(2),{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",padding:0,width:"1px",position:"absolute"}),a=function(e){var t=e.message,n=e["aria-live"];return i.a.createElement("div",{style:o,role:"log","aria-live":n},t||"")};a.propTypes={};var s=a;function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function t(){var n,r;c(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=u(this,e.call.apply(e,[this].concat(o))),r.state={assertiveMessage1:"",assertiveMessage2:"",politeMessage1:"",politeMessage2:"",oldPolitemessage:"",oldPoliteMessageId:"",oldAssertiveMessage:"",oldAssertiveMessageId:"",setAlternatePolite:!1,setAlternateAssertive:!1},u(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.getDerivedStateFromProps=function(e,t){var n=t.oldPolitemessage,r=t.oldPoliteMessageId,i=t.oldAssertiveMessage,o=t.oldAssertiveMessageId,a=e.politeMessage,s=e.politeMessageId,c=e.assertiveMessage,u=e.assertiveMessageId;return n!==a||r!==s?{politeMessage1:t.setAlternatePolite?"":a,politeMessage2:t.setAlternatePolite?a:"",oldPolitemessage:a,oldPoliteMessageId:s,setAlternatePolite:!t.setAlternatePolite}:i!==c||o!==u?{assertiveMessage1:t.setAlternateAssertive?"":c,assertiveMessage2:t.setAlternateAssertive?c:"",oldAssertiveMessage:c,oldAssertiveMessageId:u,setAlternateAssertive:!t.setAlternateAssertive}:null},t.prototype.render=function(){var e=this.state,t=e.assertiveMessage1,n=e.assertiveMessage2,r=e.politeMessage1,o=e.politeMessage2;return i.a.createElement("div",null,i.a.createElement(s,{"aria-live":"assertive",message:t}),i.a.createElement(s,{"aria-live":"assertive",message:n}),i.a.createElement(s,{"aria-live":"polite",message:r}),i.a.createElement(s,{"aria-live":"polite",message:o}))},t}(r.Component);l.propTypes={};var f=l;function d(){console.warn("Announcement failed, LiveAnnouncer context is missing")}var p=i.a.createContext({announceAssertive:d,announcePolite:d});var h=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.announcePolite=function(e,t){r.setState({announcePoliteMessage:e,politeMessageId:t||""})},r.announceAssertive=function(e,t){r.setState({announceAssertiveMessage:e,assertiveMessageId:t||""})},r.state={announcePoliteMessage:"",politeMessageId:"",announceAssertiveMessage:"",assertiveMessageId:"",updateFunctions:{announcePolite:r.announcePolite,announceAssertive:r.announceAssertive}},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.state,t=e.announcePoliteMessage,n=e.politeMessageId,r=e.announceAssertiveMessage,o=e.assertiveMessageId,a=e.updateFunctions;return i.a.createElement(p.Provider,{value:a},this.props.children,i.a.createElement(f,{assertiveMessage:r,assertiveMessageId:o,politeMessage:t,politeMessageId:n}))},t}(r.Component),g=n(466),v=n.n(g);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var b=function(e){function t(){var n,r;m(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=y(this,e.call.apply(e,[this].concat(o))),r.announce=function(){var e=r.props,t=e.message,n=e["aria-live"],i=e.announceAssertive,o=e.announcePolite;"assertive"===n&&i(t||"",v()()),"polite"===n&&o(t||"",v()())},y(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){this.announce()},t.prototype.componentDidUpdate=function(e){this.props.message!==e.message&&this.announce()},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.clearOnUnmount,n=e.announceAssertive,r=e.announcePolite;!0!==t&&"true"!==t||(n(""),r(""))},t.prototype.render=function(){return null},t}(r.Component);b.propTypes={};var w=b,_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x=function(e){return i.a.createElement(p.Consumer,null,(function(t){return i.a.createElement(w,_({},t,e))}))};x.propTypes={};var O=function(e){var t=e.children;return i.a.createElement(p.Consumer,null,(function(e){return t(e)}))};O.propTypes={};var S=O},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r,i=n(0),o=n.n(i),a=n(33),s=/^-?\d*\.?\d+(px|%)$/;function c(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length?e.some((function(n,r){return c(e[r],t[r])})):e!==t}var u=(r=Object.prototype).hasOwnProperty,l=r.toString;function f(e){return e&&u.call(e,"ref")}var d=new Map;function p(e){void 0===e&&(e={});for(var t,n=e.root||null,r=function(e){var t=(e?e.trim():"0px").split(/\s+/).map((function(e){if(!s.test(e))throw new Error("rootMargin must be a string literal containing pixels and/or percent values");return e})),n=t.shift(),r=t[0],i=void 0===r?n:r,o=t[1],a=void 0===o?n:o,c=t[2];return n+" "+i+" "+a+" "+(void 0===c?i:c)}(e.rootMargin),i=Array.isArray(e.threshold)?e.threshold:[null!=e.threshold?e.threshold:0],o=d.keys();t=o.next().value;){if(!(n!==t.root||r!==t.rootMargin||c(i,t.thresholds)))return t}return null}function h(e,t){var n=d.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 g(e,t){for(var n=0;n<e.length;n++){var r=h(t,e[n]);r&&r.handleChange(e[n])}}function v(e){var t=p(e);if(t)return t;var n=new IntersectionObserver(g,e);return d.set(n,new Set),n}function m(e){var t;e.observer&&!d.has(e.observer)&&d.set(e.observer,new Set),null===(t=d.get(e.observer))||void 0===t||t.add(e),e.observer.observe(e.target)}function y(e,t){if(d.has(e.observer)){var n=d.get(e.observer);(null==n?void 0:n.delete(e))&&(n.size>0?e.observer.unobserve(t):(e.observer.disconnect(),d.delete(e.observer)))}}var b,w=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),_=["root","rootMargin","threshold"],x=["root","rootMargin","threshold","disabled"],O=function(e){return _.reduce((function(t,n){var r,i="root"===n&&"[object String]"===l.call(e.root);return Object.assign(t,((r={})[n]=i?document.querySelector(e[n]):e[n],r))}),{})},S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleChange=function(e){t.props.onChange(e,t.externalUnobserve)},t.handleNode=function(e){var n=t.props.children;if(f(n)){var r=n.ref;"function"==typeof r?r(e):r&&u.call(r,"current")&&(r.current=e)}if(t.targetNode=void 0,e){var i=Object(a.findDOMNode)(e);i&&1===i.nodeType&&(t.targetNode=i)}},t.observe=function(){if(null==t.props.children||t.props.disabled)return!1;if(!t.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 t.observer=v(O(t.props)),t.target=t.targetNode,m(t),!0},t.unobserve=function(e){y(t,e)},t.externalUnobserve=function(){t.targetNode&&t.unobserve(t.targetNode)},t}return w(t,e),t.prototype.getSnapshotBeforeUpdate=function(e){var t=this;this.prevTargetNode=this.targetNode;var n=x.some((function(n){return c(t.props[n],e[n])}));return n&&this.prevTargetNode&&(e.disabled||this.unobserve(this.prevTargetNode)),n},t.prototype.componentDidUpdate=function(e,t,n){var r=!1;n||(r=this.prevTargetNode!==this.targetNode)&&null!=this.prevTargetNode&&this.unobserve(this.prevTargetNode),(n||r)&&this.observe()},t.prototype.componentDidMount=function(){this.observe()},t.prototype.componentWillUnmount=function(){this.targetNode&&this.unobserve(this.targetNode)},t.prototype.render=function(){var e=this.props.children;return null!=e?o.a.cloneElement(o.a.Children.only(e),{ref:this.handleNode}):null},t.displayName="IntersectionObserver",t}(o.a.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(29),i=n.n(r),o=n(139),a=n.n(o),s=n(126);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),this.resource=t}var t,n,r;return t=e,(n=[{key:"isOnlyTag",value:function(){return 1===this.motivations.length&&"oa:tagging"===this.motivations[0]}},{key:"id",get:function(){return this._id=this._id||this.resource["@id"]||this.resources[0]&&this.resources[0]["@id"]||Object(s.a)(),this._id}},{key:"targetId",get:function(){var e=this.on[0];switch(typeof e){case"string":return e.replace(/#?xywh=(.*)$/,"");case"object":return e.full.replace(/#?xywh=(.*)$/,"");default:return null}}},{key:"motivations",get:function(){return i()(a()(new Array(this.resource.motivation)))}},{key:"resources",get:function(){return i()(a()(new Array(this.resource.resource)))}},{key:"on",get:function(){return i()(a()(new Array(this.resource.on)))}},{key:"tags",get:function(){return this.isOnlyTag()?this.resources.map((function(e){return e.chars})):this.resources.filter((function(e){return"oa:Tag"===e["@type"]})).map((function(e){return e.chars}))}},{key:"chars",get:function(){return this.resources.filter((function(e){return"oa:Tag"!==e["@type"]})).map((function(e){return e.chars})).join(" ")}},{key:"selector",get:function(){var e=this.on[0];switch(typeof e){case"string":return e;case"object":return"oa:Choice"===e.selector["@type"]?e.selector.default:e.selector;default:return null}}},{key:"svgSelector",get:function(){var e=this.on[0];switch(typeof e){case"string":return null;case"object":return e.selector&&e.selector.item&&"oa:SvgSelector"===e.selector.item["@type"]?e.selector.item:null;default:return null}}},{key:"fragmentSelector",get:function(){var e,t=this.selector;switch(typeof t){case"string":e=t.match(/xywh=(.*)$/);break;case"object":e=t.value.match(/xywh=(.*)$/);break;default:return null}return e&&e[1].split(",").map((function(e){return parseInt(e,10)}))}}])&&u(t.prototype,n),r&&u(t,r),e}();function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.json=t,this.target=n}var t,n,r;return t=e,(n=[{key:"id",get:function(){return this.json["@id"]}},{key:"present",value:function(){return this.resources&&this.resources.length>0}},{key:"resources",get:function(){var e=this;return this._resources=this._resources||(e.json&&e.json.resources?i()([e.json.resources]).map((function(e){return new l(e)})):[]),this._resources}}])&&f(t.prototype,n),r&&f(t,r),e}()},function(e,t,n){"use strict";var r=n(7),i=n(9),o=n(1175),a=n(8),s=n(90),c=n(0),u=n.n(c),l=n(96),f=n(124),d=n(72),p=n(151),h=n(37);function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var i=w(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(o,e);var t,n,r,i=y(o);function o(){return g(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.manifestDescription,n=e.manifestLabel,r=e.manifestMetadata,i=e.id,o=e.t;return u.a.createElement(f.a,{id:"".concat(i,"-resource"),label:o("resource")},n&&u.a.createElement(l.a,{"aria-labelledby":"".concat(i,"-resource ").concat(i,"-resource-heading"),id:"".concat(i,"-resource-heading"),variant:"h4",component:"h5"},n),t&&u.a.createElement(l.a,{variant:"body1"},u.a.createElement(d.a,{htmlString:t,ruleSet:"iiif"})),r.length>0&&u.a.createElement(p.a,{labelValuePairs:r}),u.a.createElement(h.a,this.props))}}])&&v(t.prototype,n),r&&v(t,r),o}(c.Component);_.defaultProps={manifestDescription:null,manifestLabel:null,manifestMetadata:[],t:function(e){return e}};var x=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e,t){var n=t.id,r=t.manifestId,i=t.windowId;return{manifestDescription:Object(s.c)(e,{companionWindowId:n,manifestId:r,windowId:i}),manifestLabel:Object(s.o)(e,{companionWindowId:n,manifestId:r,windowId:i}),manifestMetadata:Object(s.h)(e,{companionWindowId:n,manifestId:r,windowId:i})}})),Object(a.a)("ManifestInfo"));t.a=x(_)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),i=n(17);function o(e,t){"function"==typeof e?e(t):e.current=t}function a(e,t){var n=e.ref;return Object(i.a)("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?Object(r.cloneElement)(e,{ref:function(e){o(n,e),o(t,e)}}):Object(r.cloneElement)(e,{ref:t})}function s(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function c(e){var t={};return Object.keys(e).forEach((function(n){var i=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var o=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Object(r.isValidElement)(t)){var i=t;return e(i,n),i}var o=t;s(o);var c=n?function(t){return e(t,n)}:e;return a(o,c)}}(i);t[n]=function(){return o}}})),t}},function(e,t,n){var r=n(1078),i=n(411),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},function(e,t,n){"use strict";var r=n(58),i=n(95),o=(n(2),n(0)),a=n.n(o),s=n(33),c=n.n(s),u=!1,l=n(220),f=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}Object(i.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[c.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||u?this.safeSetState({status:"entered"},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:"entering"},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:c.a.findDOMNode(this);t&&!u?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:c.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(l.a.Provider,{value:null},"function"==typeof n?n(e,i):a.a.cloneElement(a.a.Children.only(n),i))},t}(a.a.Component);function d(){}f.contextType=l.a,f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED="unmounted",f.EXITED="exited",f.ENTERING="entering",f.ENTERED="entered",f.EXITING="exiting";t.a=f},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var r=n(536),i=n(785)(r);e.exports=i},function(e,t,n){var r=n(783),i=n(228),o=n(398),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){(function(e){var r=n(533),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n(281)(e))},function(e,t,n){var r=n(282),i=n(784),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(283),i=n(793),o=n(794),a=n(795),s=n(796),c=n(797);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},function(e,t,n){var r=n(164)(n(78),"Map");e.exports=r},function(e,t,n){var r=n(798),i=n(805),o=n(807),a=n(808),s=n(809);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},function(e,t,n){var r=n(810),i=n(92);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},function(e,t,n){var r=n(402),i=n(811),o=n(812);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(409),i=n(543),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},function(e,t,n){var r=n(56),i=n(201),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(823);e.exports=function(e){return null==e?"":r(e)}},function(e,t){e.exports=function(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)}},function(e,t,n){var r=n(831),i=n(551)(r);e.exports=i},function(e,t,n){var r=n(404),i=n(415),o=n(552),a=n(405),s=n(837),c=n(406);e.exports=function(e,t,n){var u=-1,l=i,f=e.length,d=!0,p=[],h=p;if(n)d=!1,l=o;else if(f>=200){var g=t?null:s(e);if(g)return c(g);d=!1,l=a,h=new r}else h=t?[]:p;e:for(;++u<f;){var v=e[u],m=t?t(v):v;if(v=n||0!==v?v:0,d&&m==m){for(var y=h.length;y--;)if(h[y]===m)continue e;t&&h.push(m),p.push(v)}else l(h,m,n)||(h!==p&&h.push(m),p.push(v))}return p}},function(e,t,n){var r=n(833);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(404),i=n(415),o=n(552),a=n(143),s=n(228),c=n(405);e.exports=function(e,t,n,u){var l=-1,f=i,d=!0,p=e.length,h=[],g=t.length;if(!p)return h;n&&(t=a(t,s(n))),u?(f=o,d=!1):t.length>=200&&(f=c,d=!1,t=new r(t));e:for(;++l<p;){var v=e[l],m=null==n?v:n(v);if(v=u||0!==v?v:0,d&&m==m){for(var y=g;y--;)if(t[y]===m)continue e;h.push(v)}else f(t,m,u)||h.push(v)}return h}},function(e,t,n){"use strict";function r(e){return function(){return null}}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(536),i=n(585);e.exports=function(e,t){return e&&r(e,i(t))}},function(e,t,n){var r=n(142),i=n(420),o=n(92),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(e,t,n){var r=n(538)(Object.getPrototypeOf,Object);e.exports=r},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(278),i=n(285),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(537),i=n(878),o=n(166);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(542),i=n(588),o=n(423);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(540);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){var r=n(592),i=n(917),o=n(918),a=n(594),s=n(927),c=n(430),u=n(928),l=n(600),f=n(601),d=n(234),p=Math.max;e.exports=function(e,t,n,h,g,v,m,y){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var w=h?h.length:0;if(w||(t&=-97,h=g=void 0),m=void 0===m?m:p(d(m),0),y=void 0===y?y:d(y),w-=g?g.length:0,64&t){var _=h,x=g;h=g=void 0}var O=b?void 0:c(e),S=[e,t,n,h,g,_,x,v,m,y];if(O&&u(S,O),e=S[0],t=S[1],n=S[2],h=S[3],g=S[4],!(y=S[9]=void 0===S[9]?b?0:e.length:p(S[9]-w,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||16==t?o(e,t,y):32!=t&&33!=t||g.length?a.apply(void 0,S):s(e,t,n,h);else var E=i(e,t,n);return f((O?r:l)(E,S),e,t)}},function(e,t,n){var r=n(303),i=n(429);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(593),i=n(229),o=r?function(e){return r.get(e)}:i;e.exports=o},function(e,t,n){var r=n(303),i=n(429);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},function(e,t){e.exports=function(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&"__lodash_placeholder__"!==a||(e[n]="__lodash_placeholder__",o[i++]=n)}return o}},function(e,t,n){var r=n(930),i=n(68),o=n(201),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.matchesSelector=f,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(f(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.addEvent=function(e,t,n,r){if(!e)return;var i=c({capture:!0},r);e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n,r){if(!e)return;var i=c({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,i.int)(n.borderTopWidth),t+=(0,i.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,i.int)(n.borderLeftWidth),t+=(0,i.int)(n.borderRightWidth)},t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,i.int)(n.paddingTop),t-=(0,i.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,i.int)(n.paddingLeft),t-=(0,i.int)(n.paddingRight)},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,o=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:o}},t.createCSSTransform=function(e,t){var n=d(e,t,"px");return u({},(0,o.browserPrefixToKey)("transform",o.default),n)},t.createSVGTransform=function(e,t){return d(e,t,"")},t.getTranslation=d,t.getTouch=function(e,t){return e.targetTouches&&(0,i.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,i.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&p(e.body,"react-draggable-transparent-selection")},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&h(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}},t.addClassName=p,t.removeClassName=h;var i=n(305),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(933));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l="";function f(e,t){return l||(l=(0,i.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,i.isFunction)(e[t])}))),!!(0,i.isFunction)(e[l])&&e[l](t)}function d(e,t,n){var r=e.x,i=e.y,o="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){var a="".concat("string"==typeof t.x?t.x:t.x+n),s="".concat("string"==typeof t.y?t.y:t.y+n);o="translate(".concat(a,", ").concat(s,")")+o}return o}function p(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function h(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},function(e,t,n){var r,i,o;(function(a,s){var c=(a=a||n(606)).window,u=a.document,l=new function(){var e=/^(statics|enumerable|beans|preserve)$/,t=[],n=t.slice,r=Object.create,i=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=t.forEach||function(e,t){for(var n=0,r=this.length;n<r;n++)e.call(t,this[n],n,this)},c=function(e,t){for(var n in this)this.hasOwnProperty(n)&&e.call(t,this[n],n,this)},u=Object.assign||function(e){for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e},l=function(e,t,n){if(e){var r=i(e,"length");(r&&"number"==typeof r.value?a:c).call(e,t,n=n||e)}return n};function f(t,n,r,a,s){var c={};function u(e,u){"string"==typeof(u=u||(u=i(n,e))&&(u.get?u:u.value))&&"#"===u[0]&&(u=t[u.substring(1)]||u);var l,f="function"==typeof u,p=u,h=s||f&&!u.base?u&&u.get?e in t:t[e]:null;s&&h||(f&&h&&(u.base=h),f&&!1!==a&&(l=e.match(/^([gs]et|is)(([A-Z])(.*))$/))&&(c[l[3].toLowerCase()+l[4]]=l[2]),p&&!f&&p.get&&"function"==typeof p.get&&d.isPlainObject(p)||(p={value:p,writable:!0}),(i(t,e)||{configurable:!0}).configurable&&(p.configurable=!0,p.enumerable=null!=r?r:!l),o(t,e,p))}if(n){for(var l in n)n.hasOwnProperty(l)&&!e.test(l)&&u(l);for(var l in c){var f=c[l],p=t["set"+f],h=t["get"+f]||p&&t["is"+f];!h||!0!==a&&0!==h.length||u(l,{get:h,set:p})}}return t}function d(){for(var e=0,t=arguments.length;e<t;e++){var n=arguments[e];n&&u(this,n)}return this}return f(d,{inject:function(e){if(e){var t=!0===e.statics?e:e.statics,n=e.beans,r=e.preserve;t!==e&&f(this.prototype,e,e.enumerable,n,r),f(this,t,null,n,r)}for(var i=1,o=arguments.length;i<o;i++)this.inject(arguments[i]);return this},extend:function(){for(var e,t,n,i=this,a=0,s=arguments.length;a<s&&(!e||!t);a++)n=arguments[a],e=e||n.initialize,t=t||n.prototype;return t=(e=e||function(){i.apply(this,arguments)}).prototype=t||r(this.prototype),o(t,"constructor",{value:e,writable:!0,configurable:!0}),f(e,this),arguments.length&&this.inject.apply(e,arguments),e.base=i,e}}).inject({enumerable:!1,initialize:d,set:d,inject:function(){for(var e=0,t=arguments.length;e<t;e++){var n=arguments[e];n&&f(this,n,n.enumerable,n.beans,n.preserve)}return this},extend:function(){var e=r(this);return e.inject.apply(e,arguments)},each:function(e,t){return l(this,e,t)},clone:function(){return new this.constructor(this)},statics:{set:u,each:l,create:r,define:o,describe:i,clone:function(e){return u(new e.constructor,e)},isPlainObject:function(e){var t=null!=e&&e.constructor;return t&&(t===Object||t===d||"Object"===t.name)},pick:function(e,t){return e!==s?e:t},slice:function(e,t,r){return n.call(e,t,r)}}})};e.exports=l,l.inject({enumerable:!1,toString:function(){return null!=this._id?(this._class||"Object")+(this._name?" '"+this._name+"'":" @"+this._id):"{ "+l.each(this,(function(e,t){if(!/^_/.test(t)){var n=typeof e;this.push(t+": "+("number"===n?g.instance.number(e):"string"===n?"'"+e+"'":e))}}),[]).join(", ")+" }"},getClassName:function(){return this._class||""},importJSON:function(e){return l.importJSON(e,this)},exportJSON:function(e){return l.exportJSON(this,e)},toJSON:function(){return l.serialize(this)},set:function(e,t){return e&&l.filter(this,e,t,this._prioritize),this}},{beans:!1,statics:{exports:{},extend:function e(){var t=e.base.apply(this,arguments),n=t.prototype._class;return n&&!l.exports[n]&&(l.exports[n]=t),t},equals:function(e,t){if(e===t)return!0;if(e&&e.equals)return e.equals(t);if(t&&t.equals)return t.equals(e);if(e&&t&&"object"==typeof e&&"object"==typeof t){if(Array.isArray(e)&&Array.isArray(t)){if((n=e.length)!==t.length)return!1;for(;n--;)if(!l.equals(e[n],t[n]))return!1}else{var n,r=Object.keys(e);if((n=r.length)!==Object.keys(t).length)return!1;for(;n--;){var i=r[n];if(!t.hasOwnProperty(i)||!l.equals(e[i],t[i]))return!1}}return!0}return!1},read:function(e,t,n,r){if(this===l){var i=this.peek(e,t);return e.__index++,i}var o=this.prototype,a=o._readIndex,c=t||a&&e.__index||0,u=e.length,f=e[c];if(r=r||u-c,f instanceof this||n&&n.readNull&&null==f&&r<=1)return a&&(e.__index=c+1),f&&n&&n.clone?f.clone():f;if(f=l.create(o),a&&(f.__read=!0),f=f.initialize.apply(f,c>0||c+r<u?l.slice(e,c,c+r):e)||f,a){e.__index=c+f.__read;var d=f.__filtered;d&&(e.__filtered=d,f.__filtered=s),f.__read=s}return f},peek:function(e,t){return e[e.__index=t||e.__index||0]},remain:function(e){return e.length-(e.__index||0)},readList:function(e,t,n,r){for(var i,o=[],a=t||0,s=r?a+r:e.length,c=a;c<s;c++)o.push(Array.isArray(i=e[c])?this.read(i,0,n):this.read(e,c,n,1));return o},readNamed:function(e,t,n,r,i){var o=this.getNamed(e,t),a=o!==s;if(a){var c=e.__filtered;if(!c){var u=this.getSource(e);(c=e.__filtered=l.create(u)).__unfiltered=u}c[t]=s}return this.read(a?[o]:e,n,r,i)},readSupported:function(e,t){var n=this.getSource(e),r=this,i=!1;return n&&Object.keys(n).forEach((function(n){if(n in t){var o=r.readNamed(e,n);o!==s&&(t[n]=o),i=!0}})),i},getSource:function(e){var t=e.__source;if(t===s){var n=1===e.length&&e[0];t=e.__source=n&&l.isPlainObject(n)?n:null}return t},getNamed:function(e,t){var n=this.getSource(e);if(n)return t?n[t]:e.__filtered||n},hasNamed:function(e,t){return!!this.getNamed(e,t)},filter:function(e,t,n,r){var i;function o(r){if(!(n&&r in n||i&&r in i)){var o=t[r];o!==s&&(e[r]=o)}}if(r){for(var a,c={},u=0,l=r.length;u<l;u++)(a=r[u])in t&&(o(a),c[a]=!0);i=c}return Object.keys(t.__unfiltered||t).forEach(o),e},isPlainValue:function(e,t){return l.isPlainObject(e)||Array.isArray(e)||t&&"string"==typeof e},serialize:function(e,t,n,r){t=t||{};var i,o=!r;if(o&&(t.formatter=new g(t.precision),r={length:0,definitions:{},references:{},add:function(e,t){var n="#"+e._id,r=this.references[n];if(!r){this.length++;var i=t.call(e),o=e._class;o&&i[0]!==o&&i.unshift(o),this.definitions[n]=i,r=this.references[n]=[n]}return r}}),e&&e._serialize){i=e._serialize(t,r);var a=e._class;!a||e._compactSerialize||!o&&n||i[0]===a||i.unshift(a)}else if(Array.isArray(e)){i=[];for(var s=0,c=e.length;s<c;s++)i[s]=l.serialize(e[s],t,n,r)}else if(l.isPlainObject(e)){i={};var u=Object.keys(e);for(s=0,c=u.length;s<c;s++){var f=u[s];i[f]=l.serialize(e[f],t,n,r)}}else i="number"==typeof e?t.formatter.number(e,t.precision):e;return o&&r.length>0?[["dictionary",r.definitions],i]:i},deserialize:function(e,t,n,r,i){var o=e,a=!n,s=a&&e&&e.length&&"dictionary"===e[0][0];if(n=n||{},Array.isArray(e)){var c=e[0],u="dictionary"===c;if(1==e.length&&/^#/.test(c))return n.dictionary[c];o=[];for(var f=(c=l.exports[c])?1:0,d=e.length;f<d;f++)o.push(l.deserialize(e[f],t,n,u,s));if(c){var p=o;o=t?t(c,p,a||i):new c(p)}}else if(l.isPlainObject(e))for(var h in o={},r&&(n.dictionary=o),e)o[h]=l.deserialize(e[h],t,n);return s?o[1]:o},exportJSON:function(e,t){var n=l.serialize(e,t);return t&&0==t.asString?n:JSON.stringify(n)},importJSON:function(e,t){return l.deserialize("string"==typeof e?JSON.parse(e):e,(function(e,n,r){var i=r&&t&&t.constructor===e,o=i?t:l.create(e.prototype);if(1===n.length&&o instanceof k&&(i||!(o instanceof j))){var a=n[0];l.isPlainObject(a)&&(a.insert=!1,i&&(n=n.concat([{insert:!0}])))}return(i?o.set:e).apply(o,n),i&&(t=null),o}))},push:function(e,t){var n=t.length;if(n<4096)e.push.apply(e,t);else{var r=e.length;e.length+=n;for(var i=0;i<n;i++)e[r+i]=t[i]}return e},splice:function(e,t,n,r){var i=t&&t.length,o=n===s;(n=o?e.length:n)>e.length&&(n=e.length);for(var a=0;a<i;a++)t[a]._index=n+a;if(o)return l.push(e,t),[];var c=[n,r];t&&l.push(c,t);for(var u=e.splice.apply(e,c),f=(a=0,u.length);a<f;a++)u[a]._index=s;for(a=n+i,f=e.length;a<f;a++)e[a]._index=a;return u},capitalize:function(e){return e.replace(/\b[a-z]/g,(function(e){return e.toUpperCase()}))},camelize:function(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))},hyphenate:function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}});var f={on:function(e,t){if("string"!=typeof e)l.each(e,(function(e,t){this.on(t,e)}),this);else{var n=this._eventTypes,r=n&&n[e],i=this._callbacks=this._callbacks||{};-1===(i=i[e]=i[e]||[]).indexOf(t)&&(i.push(t),r&&r.install&&1===i.length&&r.install.call(this,e))}return this},off:function(e,t){if("string"==typeof e){var n,r=this._eventTypes,i=r&&r[e],o=this._callbacks&&this._callbacks[e];return o&&(!t||-1!==(n=o.indexOf(t))&&1===o.length?(i&&i.uninstall&&i.uninstall.call(this,e),delete this._callbacks[e]):-1!==n&&o.splice(n,1)),this}l.each(e,(function(e,t){this.off(t,e)}),this)},once:function(e,t){return this.on(e,(function n(){t.apply(this,arguments),this.off(e,n)}))},emit:function(e,t){var n=this._callbacks&&this._callbacks[e];if(!n)return!1;var r=l.slice(arguments,1),i=t&&t.target&&!t.currentTarget;n=n.slice(),i&&(t.currentTarget=this);for(var o=0,a=n.length;o<a;o++)if(0==n[o].apply(this,r)){t&&t.stop&&t.stop();break}return i&&delete t.currentTarget,!0},responds:function(e){return!(!this._callbacks||!this._callbacks[e])},attach:"#on",detach:"#off",fire:"#emit",_installEvents:function(e){var t=this._eventTypes,n=this._callbacks,r=e?"install":"uninstall";if(t)for(var i in n)if(n[i].length>0){var o=t[i],a=o&&o[r];a&&a.call(this,i)}},statics:{inject:function e(t){var n=t._events;if(n){var r={};l.each(n,(function(e,n){var i="string"==typeof e,o=i?e:n,a=l.capitalize(o),s=o.substring(2).toLowerCase();r[s]=i?{}:e,o="_"+o,t["get"+a]=function(){return this[o]},t["set"+a]=function(e){var t=this[o];t&&this.off(s,t),e&&this.on(s,e),this[o]=e}})),t._eventTypes=r}return e.base.apply(this,arguments)}}},d=l.extend({_class:"PaperScope",initialize:function e(){de=this,this.settings=new l({applyMatrix:!0,insertItems:!0,handleSize:4,hitTolerance:0}),this.project=null,this.projects=[],this.tools=[],this._id=e._id++,e._scopes[this._id]=this;var t=e.prototype;if(!this.support){var n=ce.getContext(1,1)||{};t.support={nativeDash:"setLineDash"in n||"mozDash"in n,nativeBlendModes:ue.nativeModes},ce.release(n)}if(!this.agent){var r=a.navigator.userAgent.toLowerCase(),i=(/(darwin|win|mac|linux|freebsd|sunos)/.exec(r)||[])[0],o="darwin"===i?"mac":i,s=t.agent=t.browser={platform:o};o&&(s[o]=!0),r.replace(/(opera|chrome|safari|webkit|firefox|msie|trident|atom|node|jsdom)\/?\s*([.\d]+)(?:.*version\/([.\d]+))?(?:.*rv\:v?([.\d]+))?/g,(function(e,t,n,r,i){if(!s.chrome){var o="opera"===t?r:/^(node|trident)$/.test(t)?i:n;s.version=o,s.versionNumber=parseFloat(o),t={trident:"msie",jsdom:"node"}[t]||t,s.name=t,s[t]=!0}})),s.chrome&&delete s.webkit,s.atom&&delete s.chrome}},version:"0.12.15",getView:function(){var e=this.project;return e&&e._view},getPaper:function(){return this},execute:function(e,t){var n=de.PaperScript.execute(e,this,t);return Y.updateFocus(),n},install:function(e){var t=this;for(var n in l.each(["project","view","tool"],(function(n){l.define(e,n,{configurable:!0,get:function(){return t[n]}})})),this)!/^_/.test(n)&&this[n]&&(e[n]=this[n])},setup:function(e){return de=this,this.project=new C(e),this},createCanvas:function(e,t){return ce.getCanvas(e,t)},activate:function(){de=this},clear:function(){for(var e=this.projects,t=this.tools,n=e.length-1;n>=0;n--)e[n].remove();for(n=t.length-1;n>=0;n--)t[n].remove()},remove:function(){this.clear(),delete d._scopes[this._id]},statics:new function(){function e(e){return e+="Attribute",function(t,n){return t[e](n)||t[e]("data-paper-"+n)}}return{_scopes:{},_id:0,get:function(e){return this._scopes[e]||null},getAttribute:e("get"),hasAttribute:e("has")}}}),p=l.extend(f,{initialize:function(e){this._scope=de,this._index=this._scope[this._list].push(this)-1,!e&&this._scope[this._reference]||this.activate()},activate:function(){if(!this._scope)return!1;var e=this._scope[this._reference];return e&&e!==this&&e.emit("deactivate"),this._scope[this._reference]=this,this.emit("activate",e),!0},isActive:function(){return this._scope[this._reference]===this},remove:function(){return null!=this._index&&(l.splice(this._scope[this._list],null,this._index,1),this._scope[this._reference]==this&&(this._scope[this._reference]=null),this._scope=null,!0)},getView:function(){return this._scope.getView()}}),h={findItemBoundsCollisions:function(e,t,n){function r(e){for(var t=new Array(e.length),n=0;n<e.length;n++){var r=e[n].getBounds();t[n]=[r.left,r.top,r.right,r.bottom]}return t}var i=r(e),o=t&&t!==e?r(t):i;return this.findBoundsCollisions(i,o,n||0)},findCurveBoundsCollisions:function(e,t,n,r){function i(e){for(var t=Math.min,n=Math.max,r=new Array(e.length),i=0;i<e.length;i++){var o=e[i];r[i]=[t(o[0],o[2],o[4],o[6]),t(o[1],o[3],o[5],o[7]),n(o[0],o[2],o[4],o[6]),n(o[1],o[3],o[5],o[7])]}return r}var o=i(e),a=t&&t!==e?i(t):o;if(r){for(var s=this.findBoundsCollisions(o,a,n||0,!1,!0),c=this.findBoundsCollisions(o,a,n||0,!0,!0),u=[],l=0,f=s.length;l<f;l++)u[l]={hor:s[l],ver:c[l]};return u}return this.findBoundsCollisions(o,a,n||0)},findBoundsCollisions:function(e,t,n,r,i){var o=!t||e===t,a=o?e:e.concat(t),s=e.length,c=a.length;function u(e,t,n){for(var r=0,i=e.length;r<i;){var o=i+r>>>1;a[e[o]][t]<n?r=o+1:i=o}return r-1}for(var l=r?1:0,f=l+2,d=r?0:1,p=d+2,h=new Array(c),g=0;g<c;g++)h[g]=g;h.sort((function(e,t){return a[e][l]-a[t][l]}));var v=[],m=new Array(s);for(g=0;g<c;g++){var y=h[g],b=a[y],w=o?y:y-s,_=y<s,x=o||!_,O=_?[]:null;if(v.length){var S=u(v,f,b[l]-n)+1;if(v.splice(0,S),o&&i){O=O.concat(v);for(var E=0;E<v.length;E++){m[T=v[E]].push(w)}}else{var C=b[p],k=b[d];for(E=0;E<v.length;E++){var T=v[E],j=a[T],P=T<s,I=o||T>=s;(i||(_&&I||x&&P)&&C>=j[d]-n&&k<=j[p]+n)&&(_&&I&&O.push(o?T:T-s),x&&P&&m[T].push(w))}}}if(_&&(e===t&&O.push(y),m[y]=O),v.length){var R=u(v,f,b[f]);v.splice(R+1,0,y)}else v.push(y)}for(g=0;g<m.length;g++){var A=m[g];A&&A.sort((function(e,t){return e-t}))}return m}},g=l.extend({initialize:function(e){this.precision=l.pick(e,5),this.multiplier=Math.pow(10,this.precision)},number:function(e){return this.precision<16?Math.round(e*this.multiplier)/this.multiplier:e},pair:function(e,t,n){return this.number(e)+(n||",")+this.number(t)},point:function(e,t){return this.number(e.x)+(t||",")+this.number(e.y)},size:function(e,t){return this.number(e.width)+(t||",")+this.number(e.height)},rectangle:function(e,t){return this.point(e,t)+(t||",")+this.size(e,t)}});g.instance=new g;var v=new function(){var e=[[.5773502691896257],[0,.7745966692414834],[.33998104358485626,.8611363115940526],[0,.5384693101056831,.906179845938664],[.2386191860831969,.6612093864662645,.932469514203152],[0,.4058451513773972,.7415311855993945,.9491079123427585],[.1834346424956498,.525532409916329,.7966664774136267,.9602898564975363],[0,.3242534234038089,.6133714327005904,.8360311073266358,.9681602395076261],[.14887433898163122,.4333953941292472,.6794095682990244,.8650633666889845,.9739065285171717],[0,.26954315595234496,.5190961292068118,.7301520055740494,.8870625997680953,.978228658146057],[.1252334085114689,.3678314989981802,.5873179542866175,.7699026741943047,.9041172563704749,.9815606342467192],[0,.2304583159551348,.44849275103644687,.6423493394403402,.8015780907333099,.9175983992229779,.9841830547185881],[.10805494870734367,.31911236892788974,.5152486363581541,.6872929048116855,.827201315069765,.9284348836635735,.9862838086968123],[0,.20119409399743451,.3941513470775634,.5709721726085388,.7244177313601701,.8482065834104272,.937273392400706,.9879925180204854],[.09501250983763744,.2816035507792589,.45801677765722737,.6178762444026438,.755404408355003,.8656312023878318,.9445750230732326,.9894009349916499]],t=[[1],[.8888888888888888,.5555555555555556],[.6521451548625461,.34785484513745385],[.5688888888888889,.47862867049936647,.23692688505618908],[.46791393457269104,.3607615730481386,.17132449237917036],[.4179591836734694,.3818300505051189,.27970539148927664,.1294849661688697],[.362683783378362,.31370664587788727,.22238103445337448,.10122853629037626],[.3302393550012598,.31234707704000286,.26061069640293544,.1806481606948574,.08127438836157441],[.29552422471475287,.26926671930999635,.21908636251598204,.1494513491505806,.06667134430868814],[.2729250867779006,.26280454451024665,.23319376459199048,.18629021092773426,.1255803694649046,.05566856711617366],[.24914704581340277,.2334925365383548,.20316742672306592,.16007832854334622,.10693932599531843,.04717533638651183],[.2325515532308739,.22628318026289723,.2078160475368885,.17814598076194574,.13887351021978725,.09212149983772845,.04048400476531588],[.2152638534631578,.2051984637212956,.18553839747793782,.15720316715819355,.12151857068790319,.08015808715976021,.03511946033175186],[.2025782419255613,.19843148532711158,.1861610000155622,.16626920581699392,.13957067792615432,.10715922046717194,.07036604748810812,.03075324199611727],[.1894506104550685,.18260341504492358,.16915651939500254,.14959598881657674,.12462897125553388,.09515851168249279,.062253523938647894,.027152459411754096]],n=Math.abs,r=Math.sqrt,i=Math.pow,o=Math.log2||function(e){return Math.log(e)*Math.LOG2E};function a(e,t,n){return e<t?t:e>n?n:e}function s(e,t,r){function i(e){var t=134217729*e,n=e-t+t;return[n,e-n]}var o=t*t-e*r,a=t*t+e*r;if(3*n(o)<a){var s=i(e),c=i(t),u=i(r),l=t*t,f=e*r;o=l-f+(c[0]*c[0]-l+2*c[0]*c[1]+c[1]*c[1]-(s[0]*u[0]-f+s[0]*u[1]+s[1]*u[0]+s[1]*u[1]))}return o}function c(){var e=Math.max.apply(Math,arguments);return e&&(e<1e-8||e>1e8)?i(2,-Math.round(o(e))):0}return{EPSILON:1e-12,MACHINE_EPSILON:112e-18,CURVETIME_EPSILON:1e-8,GEOMETRIC_EPSILON:1e-7,TRIGONOMETRIC_EPSILON:1e-8,KAPPA:4*(r(2)-1)/3,isZero:function(e){return e>=-1e-12&&e<=1e-12},isMachineZero:function(e){return e>=-112e-18&&e<=112e-18},clamp:a,integrate:function(n,r,i,o){for(var a=e[o-2],s=t[o-2],c=.5*(i-r),u=c+r,l=0,f=o+1>>1,d=1&o?s[l++]*n(u):0;l<f;){var p=c*a[l];d+=s[l++]*(n(u+p)+n(u-p))}return c*d},findRoot:function(e,t,r,i,o,s,c){for(var u=0;u<s;u++){var l=e(r),f=l/t(r),d=r-f;if(n(f)<c){r=d;break}l>0?(o=r,r=d<=i?.5*(i+o):d):(i=r,r=d>=o?.5*(i+o):d)}return a(r,i,o)},solveQuadratic:function(e,t,i,o,u,l){var f,d=1/0;if(n(e)<1e-12){if(n(t)<1e-12)return n(i)<1e-12?-1:0;f=-i/t}else{var p=s(e,t*=-.5,i);if(p&&n(p)<112e-18){var h=c(n(e),n(t),n(i));h&&(p=s(e*=h,t*=h,i*=h))}if(p>=-112e-18){var g=p<0?0:r(p),v=t+(t<0?-g:g);0===v?d=-(f=i/e):(f=v/e,d=i/v)}}var m=0,y=null==u,b=u-1e-12,w=l+1e-12;return isFinite(f)&&(y||f>b&&f<w)&&(o[m++]=y?f:a(f,u,l)),d!==f&&isFinite(d)&&(y||d>b&&d<w)&&(o[m++]=y?d:a(d,u,l)),m},solveCubic:function(e,t,o,s,u,l,f){var d,p,h,g,m,y=c(n(e),n(t),n(o),n(s));function b(n){var r=e*(d=n);g=(r+(p=r+t))*d+(h=p*d+o),m=h*d+s}if(y&&(e*=y,t*=y,o*=y,s*=y),n(e)<1e-12)e=t,p=o,h=s,d=1/0;else if(n(s)<1e-12)p=t,h=o,d=0;else{b(-t/e/3);var w=m/e,_=i(n(w),1/3),x=w<0?-1:1,O=-g/e,S=O>0?1.324717957244746*Math.max(_,r(O)):_,E=d-x*S;if(E!==d){do{b(E),E=0===g?d:d-m/g/(1+112e-18)}while(x*E>x*d);n(e)*d*d>n(s/d)&&(p=((h=-s/d)-o)/d)}}var C=v.solveQuadratic(e,p,h,u,l,f),k=null==l;return isFinite(d)&&(0===C||C>0&&d!==u[0]&&d!==u[1])&&(k||d>l-1e-12&&d<f+1e-12)&&(u[C++]=k?d:a(d,l,f)),C}}},m={_id:1,_pools:{},get:function(e){if(e){var t=this._pools[e];return t||(t=this._pools[e]={_id:1}),t._id++}return this._id++}},y=l.extend({_class:"Point",_readIndex:!0,initialize:function(e,t){var n=typeof e,r=this.__read,i=0;if("number"===n){var o="number"==typeof t;this._set(e,o?t:e),r&&(i=o?2:1)}else if("undefined"===n||null===e)this._set(0,0),r&&(i=null===e?1:0);else{var a="string"===n?e.split(/[\s,]+/)||[]:e;i=1,Array.isArray(a)?this._set(+a[0],+(a.length>1?a[1]:a[0])):"x"in a?this._set(a.x||0,a.y||0):"width"in a?this._set(a.width||0,a.height||0):"angle"in a?(this._set(a.length||0,0),this.setAngle(a.angle||0)):(this._set(0,0),i=0)}return r&&(this.__read=i),this},set:"#initialize",_set:function(e,t){return this.x=e,this.y=t,this},equals:function(e){return this===e||e&&(this.x===e.x&&this.y===e.y||Array.isArray(e)&&this.x===e[0]&&this.y===e[1])||!1},clone:function(){return new y(this.x,this.y)},toString:function(){var e=g.instance;return"{ x: "+e.number(this.x)+", y: "+e.number(this.y)+" }"},_serialize:function(e){var t=e.formatter;return[t.number(this.x),t.number(this.y)]},getLength:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},setLength:function(e){if(this.isZero()){var t=this._angle||0;this._set(Math.cos(t)*e,Math.sin(t)*e)}else{var n=e/this.getLength();v.isZero(n)&&this.getAngle(),this._set(this.x*n,this.y*n)}},getAngle:function(){return 180*this.getAngleInRadians.apply(this,arguments)/Math.PI},setAngle:function(e){this.setAngleInRadians.call(this,e*Math.PI/180)},getAngleInDegrees:"#getAngle",setAngleInDegrees:"#setAngle",getAngleInRadians:function(){if(arguments.length){var e=y.read(arguments),t=this.getLength()*e.getLength();if(v.isZero(t))return NaN;var n=this.dot(e)/t;return Math.acos(n<-1?-1:n>1?1:n)}return this.isZero()?this._angle||0:this._angle=Math.atan2(this.y,this.x)},setAngleInRadians:function(e){if(this._angle=e,!this.isZero()){var t=this.getLength();this._set(Math.cos(e)*t,Math.sin(e)*t)}},getQuadrant:function(){return this.x>=0?this.y>=0?1:4:this.y>=0?2:3}},{beans:!1,getDirectedAngle:function(){var e=y.read(arguments);return 180*Math.atan2(this.cross(e),this.dot(e))/Math.PI},getDistance:function(){var e=arguments,t=y.read(e),n=t.x-this.x,r=t.y-this.y,i=n*n+r*r,o=l.read(e);return o?i:Math.sqrt(i)},normalize:function(e){e===s&&(e=1);var t=this.getLength(),n=0!==t?e/t:0,r=new y(this.x*n,this.y*n);return n>=0&&(r._angle=this._angle),r},rotate:function(e,t){if(0===e)return this.clone();e=e*Math.PI/180;var n=t?this.subtract(t):this,r=Math.sin(e),i=Math.cos(e);return n=new y(n.x*i-n.y*r,n.x*r+n.y*i),t?n.add(t):n},transform:function(e){return e?e._transformPoint(this):this},add:function(){var e=y.read(arguments);return new y(this.x+e.x,this.y+e.y)},subtract:function(){var e=y.read(arguments);return new y(this.x-e.x,this.y-e.y)},multiply:function(){var e=y.read(arguments);return new y(this.x*e.x,this.y*e.y)},divide:function(){var e=y.read(arguments);return new y(this.x/e.x,this.y/e.y)},modulo:function(){var e=y.read(arguments);return new y(this.x%e.x,this.y%e.y)},negate:function(){return new y(-this.x,-this.y)},isInside:function(){return x.read(arguments).contains(this)},isClose:function(){var e=arguments,t=y.read(e),n=l.read(e);return this.getDistance(t)<=n},isCollinear:function(){var e=y.read(arguments);return y.isCollinear(this.x,this.y,e.x,e.y)},isColinear:"#isCollinear",isOrthogonal:function(){var e=y.read(arguments);return y.isOrthogonal(this.x,this.y,e.x,e.y)},isZero:function(){var e=v.isZero;return e(this.x)&&e(this.y)},isNaN:function(){return isNaN(this.x)||isNaN(this.y)},isInQuadrant:function(e){return this.x*(e>1&&e<4?-1:1)>=0&&this.y*(e>2?-1:1)>=0},dot:function(){var e=y.read(arguments);return this.x*e.x+this.y*e.y},cross:function(){var e=y.read(arguments);return this.x*e.y-this.y*e.x},project:function(){var e=y.read(arguments),t=e.isZero()?0:this.dot(e)/e.dot(e);return new y(e.x*t,e.y*t)},statics:{min:function(){var e=arguments,t=y.read(e),n=y.read(e);return new y(Math.min(t.x,n.x),Math.min(t.y,n.y))},max:function(){var e=arguments,t=y.read(e),n=y.read(e);return new y(Math.max(t.x,n.x),Math.max(t.y,n.y))},random:function(){return new y(Math.random(),Math.random())},isCollinear:function(e,t,n,r){return Math.abs(e*r-t*n)<=1e-8*Math.sqrt((e*e+t*t)*(n*n+r*r))},isOrthogonal:function(e,t,n,r){return Math.abs(e*n+t*r)<=1e-8*Math.sqrt((e*e+t*t)*(n*n+r*r))}}},l.each(["round","ceil","floor","abs"],(function(e){var t=Math[e];this[e]=function(){return new y(t(this.x),t(this.y))}}),{})),b=y.extend({initialize:function(e,t,n,r){this._x=e,this._y=t,this._owner=n,this._setter=r},_set:function(e,t,n){return this._x=e,this._y=t,n||this._owner[this._setter](this),this},getX:function(){return this._x},setX:function(e){this._x=e,this._owner[this._setter](this)},getY:function(){return this._y},setY:function(e){this._y=e,this._owner[this._setter](this)},isSelected:function(){return!!(this._owner._selection&this._getSelection())},setSelected:function(e){this._owner._changeSelection(this._getSelection(),e)},_getSelection:function(){return"setPosition"===this._setter?4:0}}),w=l.extend({_class:"Size",_readIndex:!0,initialize:function(e,t){var n=typeof e,r=this.__read,i=0;if("number"===n){var o="number"==typeof t;this._set(e,o?t:e),r&&(i=o?2:1)}else if("undefined"===n||null===e)this._set(0,0),r&&(i=null===e?1:0);else{var a="string"===n?e.split(/[\s,]+/)||[]:e;i=1,Array.isArray(a)?this._set(+a[0],+(a.length>1?a[1]:a[0])):"width"in a?this._set(a.width||0,a.height||0):"x"in a?this._set(a.x||0,a.y||0):(this._set(0,0),i=0)}return r&&(this.__read=i),this},set:"#initialize",_set:function(e,t){return this.width=e,this.height=t,this},equals:function(e){return e===this||e&&(this.width===e.width&&this.height===e.height||Array.isArray(e)&&this.width===e[0]&&this.height===e[1])||!1},clone:function(){return new w(this.width,this.height)},toString:function(){var e=g.instance;return"{ width: "+e.number(this.width)+", height: "+e.number(this.height)+" }"},_serialize:function(e){var t=e.formatter;return[t.number(this.width),t.number(this.height)]},add:function(){var e=w.read(arguments);return new w(this.width+e.width,this.height+e.height)},subtract:function(){var e=w.read(arguments);return new w(this.width-e.width,this.height-e.height)},multiply:function(){var e=w.read(arguments);return new w(this.width*e.width,this.height*e.height)},divide:function(){var e=w.read(arguments);return new w(this.width/e.width,this.height/e.height)},modulo:function(){var e=w.read(arguments);return new w(this.width%e.width,this.height%e.height)},negate:function(){return new w(-this.width,-this.height)},isZero:function(){var e=v.isZero;return e(this.width)&&e(this.height)},isNaN:function(){return isNaN(this.width)||isNaN(this.height)},statics:{min:function(e,t){return new w(Math.min(e.width,t.width),Math.min(e.height,t.height))},max:function(e,t){return new w(Math.max(e.width,t.width),Math.max(e.height,t.height))},random:function(){return new w(Math.random(),Math.random())}}},l.each(["round","ceil","floor","abs"],(function(e){var t=Math[e];this[e]=function(){return new w(t(this.width),t(this.height))}}),{})),_=w.extend({initialize:function(e,t,n,r){this._width=e,this._height=t,this._owner=n,this._setter=r},_set:function(e,t,n){return this._width=e,this._height=t,n||this._owner[this._setter](this),this},getWidth:function(){return this._width},setWidth:function(e){this._width=e,this._owner[this._setter](this)},getHeight:function(){return this._height},setHeight:function(e){this._height=e,this._owner[this._setter](this)}}),x=l.extend({_class:"Rectangle",_readIndex:!0,beans:!0,initialize:function(e,t,n,r){var i,o=arguments,a=typeof e;if("number"===a?(this._set(e,t,n,r),i=4):"undefined"===a||null===e?(this._set(0,0,0,0),i=null===e?1:0):1===o.length&&(Array.isArray(e)?(this._set.apply(this,e),i=1):e.x!==s||e.width!==s?(this._set(e.x||0,e.y||0,e.width||0,e.height||0),i=1):e.from===s&&e.to===s&&(this._set(0,0,0,0),l.readSupported(o,this)&&(i=1))),i===s){var c,u,f=y.readNamed(o,"from"),d=l.peek(o),p=f.x,h=f.y;if(d&&d.x!==s||l.hasNamed(o,"to")){var g=y.readNamed(o,"to");c=g.x-p,u=g.y-h,c<0&&(p=g.x,c=-c),u<0&&(h=g.y,u=-u)}else{var v=w.read(o);c=v.width,u=v.height}this._set(p,h,c,u),i=o.__index}var m=o.__filtered;return m&&(this.__filtered=m),this.__read&&(this.__read=i),this},set:"#initialize",_set:function(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this},clone:function(){return new x(this.x,this.y,this.width,this.height)},equals:function(e){var t=l.isPlainValue(e)?x.read(arguments):e;return t===this||t&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height||!1},toString:function(){var e=g.instance;return"{ x: "+e.number(this.x)+", y: "+e.number(this.y)+", width: "+e.number(this.width)+", height: "+e.number(this.height)+" }"},_serialize:function(e){var t=e.formatter;return[t.number(this.x),t.number(this.y),t.number(this.width),t.number(this.height)]},getPoint:function(e){return new(e?y:b)(this.x,this.y,this,"setPoint")},setPoint:function(){var e=y.read(arguments);this.x=e.x,this.y=e.y},getSize:function(e){return new(e?w:_)(this.width,this.height,this,"setSize")},_fw:1,_fh:1,setSize:function(){var e=w.read(arguments),t=this._sx,n=this._sy,r=e.width,i=e.height;t&&(this.x+=(this.width-r)*t),n&&(this.y+=(this.height-i)*n),this.width=r,this.height=i,this._fw=this._fh=1},getLeft:function(){return this.x},setLeft:function(e){if(!this._fw){var t=e-this.x;this.width-=.5===this._sx?2*t:t}this.x=e,this._sx=this._fw=0},getTop:function(){return this.y},setTop:function(e){if(!this._fh){var t=e-this.y;this.height-=.5===this._sy?2*t:t}this.y=e,this._sy=this._fh=0},getRight:function(){return this.x+this.width},setRight:function(e){if(!this._fw){var t=e-this.x;this.width=.5===this._sx?2*t:t}this.x=e-this.width,this._sx=1,this._fw=0},getBottom:function(){return this.y+this.height},setBottom:function(e){if(!this._fh){var t=e-this.y;this.height=.5===this._sy?2*t:t}this.y=e-this.height,this._sy=1,this._fh=0},getCenterX:function(){return this.x+this.width/2},setCenterX:function(e){this._fw||.5===this._sx?this.x=e-this.width/2:(this._sx&&(this.x+=2*(e-this.x)*this._sx),this.width=2*(e-this.x)),this._sx=.5,this._fw=0},getCenterY:function(){return this.y+this.height/2},setCenterY:function(e){this._fh||.5===this._sy?this.y=e-this.height/2:(this._sy&&(this.y+=2*(e-this.y)*this._sy),this.height=2*(e-this.y)),this._sy=.5,this._fh=0},getCenter:function(e){return new(e?y:b)(this.getCenterX(),this.getCenterY(),this,"setCenter")},setCenter:function(){var e=y.read(arguments);return this.setCenterX(e.x),this.setCenterY(e.y),this},getArea:function(){return this.width*this.height},isEmpty:function(){return 0===this.width||0===this.height},contains:function(e){return e&&e.width!==s||4===(Array.isArray(e)?e:arguments).length?this._containsRectangle(x.read(arguments)):this._containsPoint(y.read(arguments))},_containsPoint:function(e){var t=e.x,n=e.y;return t>=this.x&&n>=this.y&&t<=this.x+this.width&&n<=this.y+this.height},_containsRectangle:function(e){var t=e.x,n=e.y;return t>=this.x&&n>=this.y&&t+e.width<=this.x+this.width&&n+e.height<=this.y+this.height},intersects:function(){var e=x.read(arguments),t=l.read(arguments)||0;return e.x+e.width>this.x-t&&e.y+e.height>this.y-t&&e.x<this.x+this.width+t&&e.y<this.y+this.height+t},intersect:function(){var e=x.read(arguments),t=Math.max(this.x,e.x),n=Math.max(this.y,e.y),r=Math.min(this.x+this.width,e.x+e.width),i=Math.min(this.y+this.height,e.y+e.height);return new x(t,n,r-t,i-n)},unite:function(){var e=x.read(arguments),t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),r=Math.max(this.x+this.width,e.x+e.width),i=Math.max(this.y+this.height,e.y+e.height);return new x(t,n,r-t,i-n)},include:function(){var e=y.read(arguments),t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),r=Math.max(this.x+this.width,e.x),i=Math.max(this.y+this.height,e.y);return new x(t,n,r-t,i-n)},expand:function(){var e=w.read(arguments),t=e.width,n=e.height;return new x(this.x-t/2,this.y-n/2,this.width+t,this.height+n)},scale:function(e,t){return this.expand(this.width*e-this.width,this.height*(t===s?e:t)-this.height)}},l.each([["Top","Left"],["Top","Right"],["Bottom","Left"],["Bottom","Right"],["Left","Center"],["Top","Center"],["Right","Center"],["Bottom","Center"]],(function(e,t){var n=e.join(""),r=/^[RL]/.test(n);t>=4&&(e[1]+=r?"Y":"X");var i=e[r?0:1],o=e[r?1:0],a="get"+i,s="get"+o,c="set"+i,u="set"+o,l="set"+n;this["get"+n]=function(e){return new(e?y:b)(this[a](),this[s](),this,l)},this[l]=function(){var e=y.read(arguments);this[c](e.x),this[u](e.y)}}),{beans:!0})),O=x.extend({initialize:function(e,t,n,r,i,o){this._set(e,t,n,r,!0),this._owner=i,this._setter=o},_set:function(e,t,n,r,i){return this._x=e,this._y=t,this._width=n,this._height=r,i||this._owner[this._setter](this),this}},new function(){var e=x.prototype;return l.each(["x","y","width","height"],(function(e){var t=l.capitalize(e),n="_"+e;this["get"+t]=function(){return this[n]},this["set"+t]=function(e){this[n]=e,this._dontNotify||this._owner[this._setter](this)}}),l.each(["Point","Size","Center","Left","Top","Right","Bottom","CenterX","CenterY","TopLeft","TopRight","BottomLeft","BottomRight","LeftCenter","TopCenter","RightCenter","BottomCenter"],(function(t){var n="set"+t;this[n]=function(){this._dontNotify=!0,e[n].apply(this,arguments),this._dontNotify=!1,this._owner[this._setter](this)}}),{isSelected:function(){return!!(2&this._owner._selection)},setSelected:function(e){var t=this._owner;t._changeSelection&&t._changeSelection(2,e)}}))}),S=l.extend({_class:"Matrix",initialize:function e(t,n){var r=arguments,i=r.length,o=!0;if(i>=6?this._set.apply(this,r):1===i||2===i?t instanceof e?this._set(t._a,t._b,t._c,t._d,t._tx,t._ty,n):Array.isArray(t)?this._set.apply(this,n?t.concat([n]):t):o=!1:i?o=!1:this.reset(),!o)throw new Error("Unsupported matrix parameters");return this},set:"#initialize",_set:function(e,t,n,r,i,o,a){return this._a=e,this._b=t,this._c=n,this._d=r,this._tx=i,this._ty=o,a||this._changed(),this},_serialize:function(e,t){return l.serialize(this.getValues(),e,!0,t)},_changed:function(){var e=this._owner;e&&(e._applyMatrix?e.transform(null,!0):e._changed(25))},clone:function(){return new S(this._a,this._b,this._c,this._d,this._tx,this._ty)},equals:function(e){return e===this||e&&this._a===e._a&&this._b===e._b&&this._c===e._c&&this._d===e._d&&this._tx===e._tx&&this._ty===e._ty},toString:function(){var e=g.instance;return"[["+[e.number(this._a),e.number(this._c),e.number(this._tx)].join(", ")+"], ["+[e.number(this._b),e.number(this._d),e.number(this._ty)].join(", ")+"]]"},reset:function(e){return this._a=this._d=1,this._b=this._c=this._tx=this._ty=0,e||this._changed(),this},apply:function(e,t){var n=this._owner;return!!n&&(n.transform(null,l.pick(e,!0),t),this.isIdentity())},translate:function(){var e=y.read(arguments),t=e.x,n=e.y;return this._tx+=t*this._a+n*this._c,this._ty+=t*this._b+n*this._d,this._changed(),this},scale:function(){var e=arguments,t=y.read(e),n=y.read(e,0,{readNull:!0});return n&&this.translate(n),this._a*=t.x,this._b*=t.x,this._c*=t.y,this._d*=t.y,n&&this.translate(n.negate()),this._changed(),this},rotate:function(e){e*=Math.PI/180;var t=y.read(arguments,1),n=t.x,r=t.y,i=Math.cos(e),o=Math.sin(e),a=n-n*i+r*o,s=r-n*o-r*i,c=this._a,u=this._b,l=this._c,f=this._d;return this._a=i*c+o*l,this._b=i*u+o*f,this._c=-o*c+i*l,this._d=-o*u+i*f,this._tx+=a*c+s*l,this._ty+=a*u+s*f,this._changed(),this},shear:function(){var e=arguments,t=y.read(e),n=y.read(e,0,{readNull:!0});n&&this.translate(n);var r=this._a,i=this._b;return this._a+=t.y*this._c,this._b+=t.y*this._d,this._c+=t.x*r,this._d+=t.x*i,n&&this.translate(n.negate()),this._changed(),this},skew:function(){var e=arguments,t=y.read(e),n=y.read(e,0,{readNull:!0}),r=Math.PI/180,i=new y(Math.tan(t.x*r),Math.tan(t.y*r));return this.shear(i,n)},append:function(e,t){if(e){var n=this._a,r=this._b,i=this._c,o=this._d,a=e._a,s=e._c,c=e._b,u=e._d,l=e._tx,f=e._ty;this._a=a*n+c*i,this._c=s*n+u*i,this._b=a*r+c*o,this._d=s*r+u*o,this._tx+=l*n+f*i,this._ty+=l*r+f*o,t||this._changed()}return this},prepend:function(e,t){if(e){var n=this._a,r=this._b,i=this._c,o=this._d,a=this._tx,s=this._ty,c=e._a,u=e._c,l=e._b,f=e._d,d=e._tx,p=e._ty;this._a=c*n+u*r,this._c=c*i+u*o,this._b=l*n+f*r,this._d=l*i+f*o,this._tx=c*a+u*s+d,this._ty=l*a+f*s+p,t||this._changed()}return this},appended:function(e){return this.clone().append(e)},prepended:function(e){return this.clone().prepend(e)},invert:function(){var e=this._a,t=this._b,n=this._c,r=this._d,i=this._tx,o=this._ty,a=e*r-t*n,s=null;return a&&!isNaN(a)&&isFinite(i)&&isFinite(o)&&(this._a=r/a,this._b=-t/a,this._c=-n/a,this._d=e/a,this._tx=(n*o-r*i)/a,this._ty=(t*i-e*o)/a,s=this),s},inverted:function(){return this.clone().invert()},concatenate:"#append",preConcatenate:"#prepend",chain:"#appended",_shiftless:function(){return new S(this._a,this._b,this._c,this._d,0,0)},_orNullIfIdentity:function(){return this.isIdentity()?null:this},isIdentity:function(){return 1===this._a&&0===this._b&&0===this._c&&1===this._d&&0===this._tx&&0===this._ty},isInvertible:function(){var e=this._a*this._d-this._c*this._b;return e&&!isNaN(e)&&isFinite(this._tx)&&isFinite(this._ty)},isSingular:function(){return!this.isInvertible()},transform:function(e,t,n){return arguments.length<3?this._transformPoint(y.read(arguments)):this._transformCoordinates(e,t,n)},_transformPoint:function(e,t,n){var r=e.x,i=e.y;return t||(t=new y),t._set(r*this._a+i*this._c+this._tx,r*this._b+i*this._d+this._ty,n)},_transformCoordinates:function(e,t,n){for(var r=0,i=2*n;r<i;r+=2){var o=e[r],a=e[r+1];t[r]=o*this._a+a*this._c+this._tx,t[r+1]=o*this._b+a*this._d+this._ty}return t},_transformCorners:function(e){var t=e.x,n=e.y,r=t+e.width,i=n+e.height,o=[t,n,r,n,r,i,t,i];return this._transformCoordinates(o,o,4)},_transformBounds:function(e,t,n){for(var r=this._transformCorners(e),i=r.slice(0,2),o=i.slice(),a=2;a<8;a++){var s=r[a],c=1&a;s<i[c]?i[c]=s:s>o[c]&&(o[c]=s)}return t||(t=new x),t._set(i[0],i[1],o[0]-i[0],o[1]-i[1],n)},inverseTransform:function(){return this._inverseTransform(y.read(arguments))},_inverseTransform:function(e,t,n){var r=this._a,i=this._b,o=this._c,a=this._d,s=this._tx,c=this._ty,u=r*a-i*o,l=null;if(u&&!isNaN(u)&&isFinite(s)&&isFinite(c)){var f=e.x-this._tx,d=e.y-this._ty;t||(t=new y),l=t._set((f*a-d*o)/u,(d*r-f*i)/u,n)}return l},decompose:function(){var e,t,n,r=this._a,i=this._b,o=this._c,a=this._d,s=r*a-i*o,c=Math.sqrt,u=Math.atan2,l=180/Math.PI;if(0!==r||0!==i){var f=c(r*r+i*i);e=Math.acos(r/f)*(i>0?1:-1),t=[f,s/f],n=[u(r*o+i*a,f*f),0]}else if(0!==o||0!==a){var d=c(o*o+a*a);e=Math.asin(o/d)*(a>0?1:-1),t=[s/d,d],n=[0,u(r*o+i*a,d*d)]}else e=0,n=t=[0,0];return{translation:this.getTranslation(),rotation:e*l,scaling:new y(t),skewing:new y(n[0]*l,n[1]*l)}},getValues:function(){return[this._a,this._b,this._c,this._d,this._tx,this._ty]},getTranslation:function(){return new y(this._tx,this._ty)},getScaling:function(){return this.decompose().scaling},getRotation:function(){return this.decompose().rotation},applyToContext:function(e){this.isIdentity()||e.transform(this._a,this._b,this._c,this._d,this._tx,this._ty)}},l.each(["a","b","c","d","tx","ty"],(function(e){var t=l.capitalize(e),n="_"+e;this["get"+t]=function(){return this[n]},this["set"+t]=function(e){this[n]=e,this._changed()}}),{})),E=l.extend({_class:"Line",initialize:function(e,t,n,r,i){var o=!1;arguments.length>=4?(this._px=e,this._py=t,this._vx=n,this._vy=r,o=i):(this._px=e.x,this._py=e.y,this._vx=t.x,this._vy=t.y,o=n),o||(this._vx-=this._px,this._vy-=this._py)},getPoint:function(){return new y(this._px,this._py)},getVector:function(){return new y(this._vx,this._vy)},getLength:function(){return this.getVector().getLength()},intersect:function(e,t){return E.intersect(this._px,this._py,this._vx,this._vy,e._px,e._py,e._vx,e._vy,!0,t)},getSide:function(e,t){return E.getSide(this._px,this._py,this._vx,this._vy,e.x,e.y,!0,t)},getDistance:function(e){return Math.abs(this.getSignedDistance(e))},getSignedDistance:function(e){return E.getSignedDistance(this._px,this._py,this._vx,this._vy,e.x,e.y,!0)},isCollinear:function(e){return y.isCollinear(this._vx,this._vy,e._vx,e._vy)},isOrthogonal:function(e){return y.isOrthogonal(this._vx,this._vy,e._vx,e._vy)},statics:{intersect:function(e,t,n,r,i,o,a,s,c,u){c||(n-=e,r-=t,a-=i,s-=o);var l=n*s-r*a;if(!v.isMachineZero(l)){var f=e-i,d=t-o,p=(a*d-s*f)/l,h=(n*d-r*f)/l;if(u||-1e-12<p&&p<1+1e-12&&-1e-12<h&&h<1+1e-12)return u||(p=p<=0?0:p>=1?1:p),new y(e+p*n,t+p*r)}},getSide:function(e,t,n,r,i,o,a,s){a||(n-=e,r-=t);var c=i-e,u=c*r-(o-t)*n;return!s&&v.isMachineZero(u)&&(u=(c*n+c*n)/(n*n+r*r))>=0&&u<=1&&(u=0),u<0?-1:u>0?1:0},getSignedDistance:function(e,t,n,r,i,o,a){return a||(n-=e,r-=t),0===n?r>0?i-e:e-i:0===r?n<0?o-t:t-o:((i-e)*r-(o-t)*n)/(r>n?r*Math.sqrt(1+n*n/(r*r)):n*Math.sqrt(1+r*r/(n*n)))},getDistance:function(e,t,n,r,i,o,a){return Math.abs(E.getSignedDistance(e,t,n,r,i,o,a))}}}),C=p.extend({_class:"Project",_list:"projects",_reference:"project",_compactSerialize:!0,initialize:function(e){p.call(this,!0),this._children=[],this._namedChildren={},this._activeLayer=null,this._currentStyle=new Z(null,null,this),this._view=Y.create(this,e||ce.getCanvas(1,1)),this._selectionItems={},this._selectionCount=0,this._updateVersion=0},_serialize:function(e,t){return l.serialize(this._children,e,!0,t)},_changed:function(e,t){if(1&e){var n=this._view;n&&(n._needsUpdate=!0,!n._requested&&n._autoUpdate&&n.requestUpdate())}var r=this._changes;if(r&&t){var i=this._changesById,o=t._id,a=i[o];a?a.flags|=e:r.push(i[o]={item:t,flags:e})}},clear:function(){for(var e=this._children,t=e.length-1;t>=0;t--)e[t].remove()},isEmpty:function(){return!this._children.length},remove:function e(){return!!e.base.call(this)&&(this._view&&this._view.remove(),!0)},getView:function(){return this._view},getCurrentStyle:function(){return this._currentStyle},setCurrentStyle:function(e){this._currentStyle.set(e)},getIndex:function(){return this._index},getOptions:function(){return this._scope.settings},getLayers:function(){return this._children},getActiveLayer:function(){return this._activeLayer||new j({project:this,insert:!0})},getSymbolDefinitions:function(){var e=[],t={};return this.getItems({class:R,match:function(n){var r=n._definition,i=r._id;return t[i]||(t[i]=!0,e.push(r)),!1}}),e},getSymbols:"getSymbolDefinitions",getSelectedItems:function(){var e=this._selectionItems,t=[];for(var n in e){var r=e[n],i=r._selection;1&i&&r.isInserted()?t.push(r):i||this._updateSelection(r)}return t},_updateSelection:function(e){var t=e._id,n=this._selectionItems;e._selection?n[t]!==e&&(this._selectionCount++,n[t]=e):n[t]===e&&(this._selectionCount--,delete n[t])},selectAll:function(){for(var e=this._children,t=0,n=e.length;t<n;t++)e[t].setFullySelected(!0)},deselectAll:function(){var e=this._selectionItems;for(var t in e)e[t].setFullySelected(!1)},addLayer:function(e){return this.insertLayer(s,e)},insertLayer:function(e,t){if(t instanceof j){t._remove(!1,!0),l.splice(this._children,[t],e,0),t._setProject(this,!0);var n=t._name;n&&t.setName(n),this._changes&&t._changed(5),this._activeLayer||(this._activeLayer=t)}else t=null;return t},_insertItem:function(e,t,n){return t=this.insertLayer(e,t)||(this._activeLayer||this._insertItem(s,new j(k.NO_INSERT),!0)).insertChild(e,t),n&&t.activate&&t.activate(),t},getItems:function(e){return k._getItems(this,e)},getItem:function(e){return k._getItems(this,e,null,null,!0)[0]||null},importJSON:function(e){this.activate();var t=this._activeLayer;return l.importJSON(e,t&&t.isEmpty()&&t)},removeOn:function(e){var t=this._removeSets;if(t){"mouseup"===e&&(t.mousedrag=null);var n=t[e];if(n){for(var r in n){var i=n[r];for(var o in t){var a=t[o];a&&a!=n&&delete a[i._id]}i.remove()}t[e]=null}}},draw:function(e,t,n){this._updateVersion++,e.save(),t.applyToContext(e);for(var r=this._children,i=new l({offset:new y(0,0),pixelRatio:n,viewMatrix:t.isIdentity()?null:t,matrices:[new S],updateMatrix:!0}),o=0,a=r.length;o<a;o++)r[o].draw(e,i);if(e.restore(),this._selectionCount>0){e.save(),e.strokeWidth=1;var s=this._selectionItems,c=this._scope.settings.handleSize,u=this._updateVersion;for(var f in s)s[f]._drawSelection(e,t,c,s,u);e.restore()}}}),k=l.extend(f,{statics:{extend:function e(t){return t._serializeFields&&(t._serializeFields=l.set({},this.prototype._serializeFields,t._serializeFields)),e.base.apply(this,arguments)},NO_INSERT:{insert:!1}},_class:"Item",_name:null,_applyMatrix:!0,_canApplyMatrix:!0,_canScaleStroke:!1,_pivot:null,_visible:!0,_blendMode:"normal",_opacity:1,_locked:!1,_guide:!1,_clipMask:!1,_selection:0,_selectBounds:!0,_selectChildren:!1,_serializeFields:{name:null,applyMatrix:null,matrix:new S,pivot:null,visible:!0,blendMode:"normal",opacity:1,locked:!1,guide:!1,clipMask:!1,selected:!1,data:{}},_prioritize:["applyMatrix"]},new function(){var e=["onMouseDown","onMouseUp","onMouseDrag","onClick","onDoubleClick","onMouseMove","onMouseEnter","onMouseLeave"];return l.each(e,(function(e){this._events[e]={install:function(e){this.getView()._countItemEvent(e,1)},uninstall:function(e){this.getView()._countItemEvent(e,-1)}}}),{_events:{onFrame:{install:function(){this.getView()._animateItem(this,!0)},uninstall:function(){this.getView()._animateItem(this,!1)}},onLoad:{},onError:{}},statics:{_itemHandlers:e}})},{initialize:function(){},_initialize:function(e,t){var n=e&&l.isPlainObject(e),r=n&&!0===e.internal,i=this._matrix=new S,o=n&&e.project||de.project,a=de.settings;return this._id=r?null:m.get(),this._parent=this._index=null,this._applyMatrix=this._canApplyMatrix&&a.applyMatrix,t&&i.translate(t),i._owner=this,this._style=new Z(o._currentStyle,this,o),r||n&&0==e.insert||!a.insertItems&&(!n||!0!==e.insert)?this._setProject(o):(n&&e.parent||o)._insertItem(s,this,!0),n&&e!==k.NO_INSERT&&this.set(e,{internal:!0,insert:!0,project:!0,parent:!0}),n},_serialize:function(e,t){var n={},r=this;function i(i){for(var o in i){var a=r[o];l.equals(a,"leading"===o?1.2*i.fontSize:i[o])||(n[o]=l.serialize(a,e,"data"!==o,t))}}return i(this._serializeFields),this instanceof T||i(this._style._defaults),[this._class,n]},_changed:function(e){var t=this._symbol,n=this._parent||t,r=this._project;8&e&&(this._bounds=this._position=this._decomposed=s),16&e&&(this._globalMatrix=s),n&&72&e&&k._clearBoundsCache(n),2&e&&k._clearBoundsCache(this),r&&r._changed(e,this),t&&t._changed(e)},getId:function(){return this._id},getName:function(){return this._name},setName:function(e){if(this._name&&this._removeNamed(),e===+e+"")throw new Error("Names consisting only of numbers are not supported.");var t=this._getOwner();if(e&&t){var n=t._children,r=t._namedChildren;(r[e]=r[e]||[]).push(this),e in n||(n[e]=this)}this._name=e||s,this._changed(256)},getStyle:function(){return this._style},setStyle:function(e){this.getStyle().set(e)}},l.each(["locked","visible","blendMode","opacity","guide"],(function(e){var t=l.capitalize(e),n="_"+e,r={locked:256,visible:265};this["get"+t]=function(){return this[n]},this["set"+t]=function(t){t!=this[n]&&(this[n]=t,this._changed(r[e]||257))}}),{}),{beans:!0,getSelection:function(){return this._selection},setSelection:function(e){if(e!==this._selection){this._selection=e;var t=this._project;t&&(t._updateSelection(this),this._changed(257))}},_changeSelection:function(e,t){var n=this._selection;this.setSelection(t?n|e:n&~e)},isSelected:function(){if(this._selectChildren)for(var e=this._children,t=0,n=e.length;t<n;t++)if(e[t].isSelected())return!0;return!!(1&this._selection)},setSelected:function(e){if(this._selectChildren)for(var t=this._children,n=0,r=t.length;n<r;n++)t[n].setSelected(e);this._changeSelection(1,e)},isFullySelected:function(){var e=this._children,t=!!(1&this._selection);if(e&&t){for(var n=0,r=e.length;n<r;n++)if(!e[n].isFullySelected())return!1;return!0}return t},setFullySelected:function(e){var t=this._children;if(t)for(var n=0,r=t.length;n<r;n++)t[n].setFullySelected(e);this._changeSelection(1,e)},isClipMask:function(){return this._clipMask},setClipMask:function(e){this._clipMask!=(e=!!e)&&(this._clipMask=e,e&&(this.setFillColor(null),this.setStrokeColor(null)),this._changed(257),this._parent&&this._parent._changed(2048))},getData:function(){return this._data||(this._data={}),this._data},setData:function(e){this._data=e},getPosition:function(e){var t=e?y:b,n=this._position||(this._position=this._getPositionFromBounds());return new t(n.x,n.y,this,"setPosition")},setPosition:function(){this.translate(y.read(arguments).subtract(this.getPosition(!0)))},_getPositionFromBounds:function(e){return this._pivot?this._matrix._transformPoint(this._pivot):(e||this.getBounds()).getCenter(!0)},getPivot:function(){var e=this._pivot;return e?new b(e.x,e.y,this,"setPivot"):null},setPivot:function(){this._pivot=y.read(arguments,0,{clone:!0,readNull:!0}),this._position=s}},l.each({getStrokeBounds:{stroke:!0},getHandleBounds:{handle:!0},getInternalBounds:{internal:!0}},(function(e,t){this[t]=function(t){return this.getBounds(t,e)}}),{beans:!0,getBounds:function(e,t){var n=t||e instanceof S,r=l.set({},n?t:e,this._boundsOptions);r.stroke&&!this.getStrokeScaling()||(r.cacheItem=this);var i=this._getCachedBounds(n&&e,r).rect;return arguments.length?i:new O(i.x,i.y,i.width,i.height,this,"setBounds")},setBounds:function(){var e=x.read(arguments),t=this.getBounds(),n=this._matrix,r=new S,i=e.getCenter();r.translate(i),e.width==t.width&&e.height==t.height||(n.isInvertible()||(n.set(n._backup||(new S).translate(n.getTranslation())),t=this.getBounds()),r.scale(0!==t.width?e.width/t.width:0,0!==t.height?e.height/t.height:0)),i=t.getCenter(),r.translate(-i.x,-i.y),this.transform(r)},_getBounds:function(e,t){var n=this._children;return n&&n.length?(k._updateBoundsCache(this,t.cacheItem),k._getBounds(n,e,t)):new x},_getBoundsCacheKey:function(e,t){return[e.stroke?1:0,e.handle?1:0,t?1:0].join("")},_getCachedBounds:function(e,t,n){e=e&&e._orNullIfIdentity();var r=t.internal&&!n,i=t.cacheItem,o=r?null:this._matrix._orNullIfIdentity(),a=i&&(!e||e.equals(o))&&this._getBoundsCacheKey(t,r),s=this._bounds;if(k._updateBoundsCache(this._parent||this._symbol,i),a&&s&&a in s)return{rect:(d=s[a]).rect.clone(),nonscaling:d.nonscaling};var c=this._getBounds(e||o,t),u=c.rect||c,l=this._style,f=c.nonscaling||l.hasStroke()&&!l.getStrokeScaling();if(a){s||(this._bounds=s={});var d=s[a]={rect:u.clone(),nonscaling:f,internal:r}}return{rect:u,nonscaling:f}},_getStrokeMatrix:function(e,t){var n=this.getStrokeScaling()?null:t&&t.internal?this:this._parent||this._symbol&&this._symbol._item,r=n?n.getViewMatrix().invert():e;return r&&r._shiftless()},statics:{_updateBoundsCache:function(e,t){if(e&&t){var n=t._id,r=e._boundsCache=e._boundsCache||{ids:{},list:[]};r.ids[n]||(r.list.push(t),r.ids[n]=t)}},_clearBoundsCache:function(e){var t=e._boundsCache;if(t){e._bounds=e._position=e._boundsCache=s;for(var n=0,r=t.list,i=r.length;n<i;n++){var o=r[n];o!==e&&(o._bounds=o._position=s,o._boundsCache&&k._clearBoundsCache(o))}}},_getBounds:function(e,t,n){var r=1/0,i=-r,o=r,a=i,s=!1;n=n||{};for(var c=0,u=e.length;c<u;c++){var l=e[c];if(l._visible&&!l.isEmpty(!0)){var f=l._getCachedBounds(t&&t.appended(l._matrix),n,!0),d=f.rect;r=Math.min(d.x,r),o=Math.min(d.y,o),i=Math.max(d.x+d.width,i),a=Math.max(d.y+d.height,a),f.nonscaling&&(s=!0)}}return{rect:isFinite(r)?new x(r,o,i-r,a-o):new x,nonscaling:s}}}}),{beans:!0,_decompose:function(){return this._applyMatrix?null:this._decomposed||(this._decomposed=this._matrix.decompose())},getRotation:function(){var e=this._decompose();return e?e.rotation:0},setRotation:function(e){var t=this.getRotation();if(null!=t&&null!=e){var n=this._decomposed;this.rotate(e-t),n&&(n.rotation=e,this._decomposed=n)}},getScaling:function(){var e=this._decompose(),t=e&&e.scaling;return new b(t?t.x:1,t?t.y:1,this,"setScaling")},setScaling:function(){var e=this.getScaling(),t=y.read(arguments,0,{clone:!0,readNull:!0});if(e&&t&&!e.equals(t)){var n=this.getRotation(),r=this._decomposed,i=new S,o=v.isZero;if(o(e.x)||o(e.y))i.translate(r.translation),n&&i.rotate(n),i.scale(t.x,t.y),this._matrix.set(i);else{var a=this.getPosition(!0);i.translate(a),n&&i.rotate(n),i.scale(t.x/e.x,t.y/e.y),n&&i.rotate(-n),i.translate(a.negate()),this.transform(i)}r&&(r.scaling=t,this._decomposed=r)}},getMatrix:function(){return this._matrix},setMatrix:function(){var e=this._matrix;e.set.apply(e,arguments)},getGlobalMatrix:function(e){var t=this._globalMatrix;if(t)for(var n=this._parent,r=[];n;){if(!n._globalMatrix){t=null;for(var i=0,o=r.length;i<o;i++)r[i]._globalMatrix=null;break}r.push(n),n=n._parent}t||(t=this._globalMatrix=this._matrix.clone(),(n=this._parent)&&t.prepend(n.getGlobalMatrix(!0)));return e?t:t.clone()},getViewMatrix:function(){return this.getGlobalMatrix().prepend(this.getView()._matrix)},getApplyMatrix:function(){return this._applyMatrix},setApplyMatrix:function(e){(this._applyMatrix=this._canApplyMatrix&&!!e)&&this.transform(null,!0)},getTransformContent:"#getApplyMatrix",setTransformContent:"#setApplyMatrix"},{getProject:function(){return this._project},_setProject:function(e,t){if(this._project!==e){this._project&&this._installEvents(!1),this._project=e;for(var n=this._children,r=0,i=n&&n.length;r<i;r++)n[r]._setProject(e);t=!0}t&&this._installEvents(!0)},getView:function(){return this._project._view},_installEvents:function e(t){e.base.call(this,t);for(var n=this._children,r=0,i=n&&n.length;r<i;r++)n[r]._installEvents(t)},getLayer:function(){for(var e=this;e=e._parent;)if(e instanceof j)return e;return null},getParent:function(){return this._parent},setParent:function(e){return e.addChild(this)},_getOwner:"#getParent",getChildren:function(){return this._children},setChildren:function(e){this.removeChildren(),this.addChildren(e)},getFirstChild:function(){return this._children&&this._children[0]||null},getLastChild:function(){return this._children&&this._children[this._children.length-1]||null},getNextSibling:function(){var e=this._getOwner();return e&&e._children[this._index+1]||null},getPreviousSibling:function(){var e=this._getOwner();return e&&e._children[this._index-1]||null},getIndex:function(){return this._index},equals:function(e){return e===this||e&&this._class===e._class&&this._style.equals(e._style)&&this._matrix.equals(e._matrix)&&this._locked===e._locked&&this._visible===e._visible&&this._blendMode===e._blendMode&&this._opacity===e._opacity&&this._clipMask===e._clipMask&&this._guide===e._guide&&this._equals(e)||!1},_equals:function(e){return l.equals(this._children,e._children)},clone:function(e){var t=new this.constructor(k.NO_INSERT),n=this._children,r=l.pick(e?e.insert:s,e===s||!0===e),i=l.pick(e?e.deep:s,!0);n&&t.copyAttributes(this),n&&!i||t.copyContent(this),n||t.copyAttributes(this),r&&t.insertAbove(this);var o=this._name,a=this._parent;if(o&&a){n=a._children;for(var c=o,u=1;n[o];)o=c+" "+u++;o!==c&&t.setName(o)}return t},copyContent:function(e){for(var t=e._children,n=0,r=t&&t.length;n<r;n++)this.addChild(t[n].clone(!1),!0)},copyAttributes:function(e,t){this.setStyle(e._style);for(var n=["_locked","_visible","_blendMode","_opacity","_clipMask","_guide"],r=0,i=n.length;r<i;r++){var o=n[r];e.hasOwnProperty(o)&&(this[o]=e[o])}t||this._matrix.set(e._matrix,!0),this.setApplyMatrix(e._applyMatrix),this.setPivot(e._pivot),this.setSelection(e._selection);var a=e._data,s=e._name;this._data=a?l.clone(a):null,s&&this.setName(s)},rasterize:function(e,t){var n,r,i;l.isPlainObject(e)?(n=e.resolution,r=e.insert,i=e.raster):(n=e,r=t),i?i.matrix.reset(!0):i=new I(k.NO_INSERT);var o=this.getStrokeBounds(),a=(n||this.getView().getResolution())/72,c=o.getTopLeft().floor(),u=o.getBottomRight().ceil(),f=new w(u.subtract(c)),d=f.multiply(a);if(i.setSize(d,!0),!d.isZero()){var p=i.getContext(!0),h=(new S).scale(a).translate(c.negate());p.save(),h.applyToContext(p),this.draw(p,new l({matrices:[h]})),p.restore()}return i.transform((new S).translate(c.add(f.divide(2))).scale(1/a)),(r===s||r)&&i.insertAbove(this),i},contains:function(){var e=this._matrix;return e.isInvertible()&&!!this._contains(e._inverseTransform(y.read(arguments)))},_contains:function(e){var t=this._children;if(t){for(var n=t.length-1;n>=0;n--)if(t[n].contains(e))return!0;return!1}return e.isInside(this.getInternalBounds())},isInside:function(){return x.read(arguments).contains(this.getBounds())},_asPathItem:function(){return new F.Rectangle({rectangle:this.getInternalBounds(),matrix:this._matrix,insert:!1})},intersects:function(e,t){return e instanceof k&&this._asPathItem().getIntersections(e._asPathItem(),null,t,!0).length>0}},new function(){function e(){var e=arguments;return this._hitTest(y.read(e),M.getOptions(e))}function t(){var e=arguments,t=y.read(e),n=M.getOptions(e),r=[];return this._hitTest(t,new l({all:r},n)),r}function n(e,t,n,r){var i=this._children;if(i)for(var o=i.length-1;o>=0;o--){var a=i[o],s=a!==r&&a._hitTest(e,t,n);if(s&&!t.all)return s}return null}return C.inject({hitTest:e,hitTestAll:t,_hitTest:n}),{hitTest:e,hitTestAll:t,_hitTestChildren:n}},{_hitTest:function(e,t,n){if(this._locked||!this._visible||this._guide&&!t.guides||this.isEmpty())return null;var r=this._matrix,i=n?n.appended(r):this.getGlobalMatrix().prepend(this.getView()._matrix),o=Math.max(t.tolerance,1e-12),a=t._tolerancePadding=new w(F._getStrokePadding(o,r._shiftless().invert()));if(!(e=r._inverseTransform(e))||!this._children&&!this.getBounds({internal:!0,stroke:!0,handle:!0}).expand(a.multiply(2))._containsPoint(e))return null;var s,c,u=!(t.guides&&!this._guide||t.selected&&!this.isSelected()||t.type&&t.type!==l.hyphenate(this._class)||t.class&&!(this instanceof t.class)),f=t.match,d=this;function p(e){return e&&f&&!f(e)&&(e=null),e&&t.all&&t.all.push(e),e}function h(t,n){var r=n?s["get"+n]():d.getPosition();if(e.subtract(r).divide(a).length<=1)return new M(t,d,{name:n?l.hyphenate(n):t,point:r})}var g=t.position,v=t.center,m=t.bounds;if(u&&this._parent&&(g||v||m)){if((v||m)&&(s=this.getInternalBounds()),!(c=g&&h("position")||v&&h("center","Center"))&&m)for(var y=["TopLeft","TopRight","BottomLeft","BottomRight","LeftCenter","TopCenter","RightCenter","BottomCenter"],b=0;b<8&&!c;b++)c=h("bounds",y[b]);c=p(c)}return c||(c=this._hitTestChildren(e,t,i)||u&&p(this._hitTestSelf(e,t,i,this.getStrokeScaling()?null:i._shiftless().invert()))||null),c&&c.point&&(c.point=r.transform(c.point)),c},_hitTestSelf:function(e,t){if(t.fill&&this.hasFill()&&this._contains(e))return new M("fill",this)},matches:function(e,t){var n=typeof e;if("object"===n){for(var r in e)if(e.hasOwnProperty(r)&&!this.matches(r,e[r]))return!1;return!0}if("function"===n)return e(this);if("match"===e)return t(this);var i=/^(empty|editable)$/.test(e)?this["is"+l.capitalize(e)]():"type"===e?l.hyphenate(this._class):this[e];if("class"===e){if("function"==typeof t)return this instanceof t;i=this._class}if("function"==typeof t)return!!t(i);if(t){if(t.test)return t.test(i);if(l.isPlainObject(t))return function e(t,n){for(var r in t)if(t.hasOwnProperty(r)){var i=t[r],o=n[r];if(l.isPlainObject(i)&&l.isPlainObject(o)){if(!e(i,o))return!1}else if(!l.equals(i,o))return!1}return!0}(t,i)}return l.equals(i,t)},getItems:function(e){return k._getItems(this,e,this._matrix)},getItem:function(e){return k._getItems(this,e,this._matrix,null,!0)[0]||null},statics:{_getItems:function e(t,n,r,i,o){if(!i){var a="object"==typeof n&&n,s=a&&a.overlapping,c=a&&a.inside,u=(y=s||c)&&x.read([y]);i={items:[],recursive:a&&!1!==a.recursive,inside:!!c,overlapping:!!s,rect:u,path:s&&new F.Rectangle({rectangle:u,insert:!1})},a&&(n=l.filter({},n,{recursive:!0,inside:!0,overlapping:!0}))}var f=t._children,d=i.items;r=(u=i.rect)&&(r||new S);for(var p=0,h=f&&f.length;p<h;p++){var g=f[p],v=r&&r.appended(g._matrix),m=!0;if(u){var y=g.getBounds(v);if(!u.intersects(y))continue;u.contains(y)||i.overlapping&&(y.contains(u)||i.path.intersects(g,v))||(m=!1)}if(m&&g.matches(n)&&(d.push(g),o))break;if(!1!==i.recursive&&e(g,n,v,i,o),o&&d.length>0)break}return d}}},{importJSON:function(e){var t=l.importJSON(e,this);return t!==this?this.addChild(t):t},addChild:function(e){return this.insertChild(s,e)},insertChild:function(e,t){var n=t?this.insertChildren(e,[t]):null;return n&&n[0]},addChildren:function(e){return this.insertChildren(this._children.length,e)},insertChildren:function(e,t){var n=this._children;if(n&&t&&t.length>0){for(var r={},i=(t=l.slice(t)).length-1;i>=0;i--){var o=(u=t[i])&&u._id;!u||r[o]?t.splice(i,1):(u._remove(!1,!0),r[o]=!0)}l.splice(n,t,e,0);for(var a=this._project,s=a._changes,c=(i=0,t.length);i<c;i++){var u,f=(u=t[i])._name;u._parent=this,u._setProject(a,!0),f&&u.setName(f),s&&u._changed(5)}this._changed(11)}else t=null;return t},_insertItem:"#insertChild",_insertAt:function(e,t){var n=e&&e._getOwner(),r=e!==this&&n?this:null;return r&&(r._remove(!1,!0),n._insertItem(e._index+t,r)),r},insertAbove:function(e){return this._insertAt(e,1)},insertBelow:function(e){return this._insertAt(e,0)},sendToBack:function(){var e=this._getOwner();return e?e._insertItem(0,this):null},bringToFront:function(){var e=this._getOwner();return e?e._insertItem(s,this):null},appendTop:"#addChild",appendBottom:function(e){return this.insertChild(0,e)},moveAbove:"#insertAbove",moveBelow:"#insertBelow",addTo:function(e){return e._insertItem(s,this)},copyTo:function(e){return this.clone(!1).addTo(e)},reduce:function(e){var t=this._children;if(t&&1===t.length){var n=t[0].reduce(e);return this._parent?(n.insertAbove(this),this.remove()):n.remove(),n}return this},_removeNamed:function(){var e=this._getOwner();if(e){var t=e._children,n=e._namedChildren,r=this._name,i=n[r],o=i?i.indexOf(this):-1;-1!==o&&(t[r]==this&&delete t[r],i.splice(o,1),i.length?t[r]=i[0]:delete n[r])}},_remove:function(e,t){var n=this._getOwner(),r=this._project,i=this._index;return this._style&&this._style._dispose(),!!n&&(this._name&&this._removeNamed(),null!=i&&(r._activeLayer===this&&(r._activeLayer=this.getNextSibling()||this.getPreviousSibling()),l.splice(n._children,null,i,1)),this._installEvents(!1),e&&r._changes&&this._changed(5),t&&n._changed(11,this),this._parent=null,!0)},remove:function(){return this._remove(!0,!0)},replaceWith:function(e){var t=e&&e.insertBelow(this);return t&&this.remove(),t},removeChildren:function(e,t){if(!this._children)return null;e=e||0,t=l.pick(t,this._children.length);for(var n=l.splice(this._children,null,e,t-e),r=n.length-1;r>=0;r--)n[r]._remove(!0,!1);return n.length>0&&this._changed(11),n},clear:"#removeChildren",reverseChildren:function(){if(this._children){this._children.reverse();for(var e=0,t=this._children.length;e<t;e++)this._children[e]._index=e;this._changed(11)}},isEmpty:function(e){var t=this._children,n=t?t.length:0;if(e){for(var r=0;r<n;r++)if(!t[r].isEmpty(e))return!1;return!0}return!n},isEditable:function(){for(var e=this;e;){if(!e._visible||e._locked)return!1;e=e._parent}return!0},hasFill:function(){return this.getStyle().hasFill()},hasStroke:function(){return this.getStyle().hasStroke()},hasShadow:function(){return this.getStyle().hasShadow()},_getOrder:function(e){function t(e){var t=[];do{t.unshift(e)}while(e=e._parent);return t}for(var n=t(this),r=t(e),i=0,o=Math.min(n.length,r.length);i<o;i++)if(n[i]!=r[i])return n[i]._index<r[i]._index?1:-1;return 0},hasChildren:function(){return this._children&&this._children.length>0},isInserted:function(){return!!this._parent&&this._parent.isInserted()},isAbove:function(e){return-1===this._getOrder(e)},isBelow:function(e){return 1===this._getOrder(e)},isParent:function(e){return this._parent===e},isChild:function(e){return e&&e._parent===this},isDescendant:function(e){for(var t=this;t=t._parent;)if(t===e)return!0;return!1},isAncestor:function(e){return!!e&&e.isDescendant(this)},isSibling:function(e){return this._parent===e._parent},isGroupedWith:function(e){for(var t=this._parent;t;){if(t._parent&&/^(Group|Layer|CompoundPath)$/.test(t._class)&&e.isDescendant(t))return!0;t=t._parent}return!1}},l.each(["rotate","scale","shear","skew"],(function(e){var t="rotate"===e;this[e]=function(){var n=arguments,r=(t?l:y).read(n),i=y.read(n,0,{readNull:!0});return this.transform((new S)[e](r,i||this.getPosition(!0)))}}),{translate:function(){var e=new S;return this.transform(e.translate.apply(e,arguments))},transform:function(e,t,n){var r=this._matrix,i=e&&!e.isIdentity(),o=n&&this._canApplyMatrix||this._applyMatrix&&(i||!r.isIdentity()||t&&this._children);if(!i&&!o)return this;if(i){!e.isInvertible()&&r.isInvertible()&&(r._backup=r.getValues()),r.prepend(e,!0);var a=this._style,s=a.getFillColor(!0),c=a.getStrokeColor(!0);s&&s.transform(e),c&&c.transform(e)}if(o&&(o=this._transformContent(r,t,n))){var u=this._pivot;u&&r._transformPoint(u,u,!0),r.reset(!0),n&&this._canApplyMatrix&&(this._applyMatrix=!0)}var l=this._bounds,f=this._position;(i||o)&&this._changed(25);var d=i&&l&&e.decompose();if(d&&d.skewing.isZero()&&d.rotation%90==0){for(var p in l){var h=l[p];if(h.nonscaling)delete l[p];else if(o||!h.internal){var g=h.rect;e._transformBounds(g,g)}}this._bounds=l;var v=l[this._getBoundsCacheKey(this._boundsOptions||{})];v&&(this._position=this._getPositionFromBounds(v.rect))}else i&&f&&this._pivot&&(this._position=e._transformPoint(f,f));return this},_transformContent:function(e,t,n){var r=this._children;if(r){for(var i=0,o=r.length;i<o;i++)r[i].transform(e,t,n);return!0}},globalToLocal:function(){return this.getGlobalMatrix(!0)._inverseTransform(y.read(arguments))},localToGlobal:function(){return this.getGlobalMatrix(!0)._transformPoint(y.read(arguments))},parentToLocal:function(){return this._matrix._inverseTransform(y.read(arguments))},localToParent:function(){return this._matrix._transformPoint(y.read(arguments))},fitBounds:function(e,t){e=x.read(arguments);var n=this.getBounds(),r=n.height/n.width,i=e.height/e.width,o=(t?r>i:r<i)?e.width/n.width:e.height/n.height,a=new x(new y,new w(n.width*o,n.height*o));a.setCenter(e.getCenter()),this.setBounds(a)}}),{_setStyles:function(e,t,n){var r=this._style,i=this._matrix;if(r.hasFill()&&(e.fillStyle=r.getFillColor().toCanvasStyle(e,i)),r.hasStroke()){e.strokeStyle=r.getStrokeColor().toCanvasStyle(e,i),e.lineWidth=r.getStrokeWidth();var o=r.getStrokeJoin(),a=r.getStrokeCap(),s=r.getMiterLimit();if(o&&(e.lineJoin=o),a&&(e.lineCap=a),s&&(e.miterLimit=s),de.support.nativeDash){var c=r.getDashArray(),u=r.getDashOffset();c&&c.length&&("setLineDash"in e?(e.setLineDash(c),e.lineDashOffset=u):(e.mozDash=c,e.mozDashOffset=u))}}if(r.hasShadow()){var l=t.pixelRatio||1,f=n._shiftless().prepend((new S).scale(l,l)),d=f.transform(new y(r.getShadowBlur(),0)),p=f.transform(this.getShadowOffset());e.shadowColor=r.getShadowColor().toCanvasStyle(e),e.shadowBlur=d.getLength(),e.shadowOffsetX=p.x,e.shadowOffsetY=p.y}},draw:function(e,t,n){this._updateVersion=this._project._updateVersion;if(this._visible&&0!==this._opacity){var r=t.matrices,i=t.viewMatrix,o=this._matrix,a=r[r.length-1].appended(o);if(a.isInvertible()){i=i?i.appended(a):a,r.push(a),t.updateMatrix&&(this._globalMatrix=a);var s,c,u,l=this._blendMode,f=v.clamp(this._opacity,0,1),d="normal"===l,p=ue.nativeModes[l],h=d&&1===f||t.dontStart||t.clip||(p||d&&f<1)&&this._canComposite(),g=t.pixelRatio||1;if(!h){var m=this.getStrokeBounds(i);if(!m.width||!m.height)return void r.pop();u=t.offset,c=t.offset=m.getTopLeft().floor(),s=e,e=ce.getContext(m.getSize().ceil().add(1).multiply(g)),1!==g&&e.scale(g,g)}e.save();var y=n?n.appended(o):this._canScaleStroke&&!this.getStrokeScaling(!0)&&i,b=!h&&t.clipItem,w=!y||b;if(h?(e.globalAlpha=f,p&&(e.globalCompositeOperation=l)):w&&e.translate(-c.x,-c.y),w&&(h?o:i).applyToContext(e),b&&t.clipItem.draw(e,t.extend({clip:!0})),y){e.setTransform(g,0,0,g,0,0);var _=t.offset;_&&e.translate(-_.x,-_.y)}this._draw(e,t,i,y),e.restore(),r.pop(),t.clip&&!t.dontFinish&&e.clip(this.getFillRule()),h||(ue.process(l,e,s,f,c.subtract(u).multiply(g)),ce.release(e),t.offset=u)}}},_isUpdated:function(e){var t=this._parent;if(t instanceof W)return t._isUpdated(e);var n=this._updateVersion===e;return!n&&t&&t._visible&&t._isUpdated(e)&&(this._updateVersion=e,n=!0),n},_drawSelection:function(e,t,n,r,i){var o=this._selection,a=1&o,s=2&o||a&&this._selectBounds,c=4&o;if(this._drawSelected||(a=!1),(a||s||c)&&this._isUpdated(i)){var u,l=this.getSelectedColor(!0)||(u=this.getLayer())&&u.getSelectedColor(!0),f=t.appended(this.getGlobalMatrix(!0)),d=n/2;if(e.strokeStyle=e.fillStyle=l?l.toCanvasStyle(e):"#009dec",a&&this._drawSelected(e,f,r),c){var p=this.getPosition(!0),h=this._parent,g=h?h.localToGlobal(p):p,v=g.x,m=g.y;e.beginPath(),e.arc(v,m,d,0,2*Math.PI,!0),e.stroke();for(var y=[[0,-1],[1,0],[0,1],[-1,0]],b=d,w=n+1,_=0;_<4;_++){var x=y[_],O=x[0],S=x[1];e.moveTo(v+O*b,m+S*b),e.lineTo(v+O*w,m+S*w),e.stroke()}}if(s){var E=f._transformCorners(this.getInternalBounds());e.beginPath();for(_=0;_<8;_++)e[_?"lineTo":"moveTo"](E[_],E[++_]);e.closePath(),e.stroke();for(_=0;_<8;_++)e.fillRect(E[_]-d,E[++_]-d,n,n)}}},_canComposite:function(){return!1}},l.each(["down","drag","up","move"],(function(e){this["removeOn"+l.capitalize(e)]=function(){var t={};return t[e]=!0,this.removeOn(t)}}),{removeOn:function(e){for(var t in e)if(e[t]){var n="mouse"+t,r=this._project,i=r._removeSets=r._removeSets||{};i[n]=i[n]||{},i[n][this._id]=this}return this}}),{tween:function(e,t,n){n||(n=t,t=e,e=null,n||(n=t,t=null));var r=n&&n.easing,i=n&&n.start,o=null!=n&&("number"==typeof n?n:n.duration),a=new ae(this,e,t,o,r,i);return o&&this.on("frame",(function e(t){a._handleFrame(1e3*t.time),a.running||this.off("frame",e)})),a},tweenTo:function(e,t){return this.tween(null,e,t)},tweenFrom:function(e,t){return this.tween(e,null,t)}}),T=k.extend({_class:"Group",_selectBounds:!1,_selectChildren:!0,_serializeFields:{children:[]},initialize:function(e){this._children=[],this._namedChildren={},this._initialize(e)||this.addChildren(Array.isArray(e)?e:arguments)},_changed:function e(t){e.base.call(this,t),2050&t&&(this._clipItem=s)},_getClipItem:function(){var e=this._clipItem;if(e===s){e=null;for(var t=this._children,n=0,r=t.length;n<r;n++)if(t[n]._clipMask){e=t[n];break}this._clipItem=e}return e},isClipped:function(){return!!this._getClipItem()},setClipped:function(e){var t=this.getFirstChild();t&&t.setClipMask(e)},_getBounds:function e(t,n){var r=this._getClipItem();return r?r._getCachedBounds(r._matrix.prepended(t),l.set({},n,{stroke:!1})):e.base.call(this,t,n)},_hitTestChildren:function e(t,n,r){var i=this._getClipItem();return(!i||i.contains(t))&&e.base.call(this,t,n,r,i)},_draw:function(e,t){var n=t.clip,r=!n&&this._getClipItem();t=t.extend({clipItem:r,clip:!1}),n?(e.beginPath(),t.dontStart=t.dontFinish=!0):r&&r.draw(e,t.extend({clip:!0}));for(var i=this._children,o=0,a=i.length;o<a;o++){var s=i[o];s!==r&&s.draw(e,t)}}}),j=T.extend({_class:"Layer",initialize:function(){T.apply(this,arguments)},_getOwner:function(){return this._parent||null!=this._index&&this._project},isInserted:function e(){return this._parent?e.base.call(this):null!=this._index},activate:function(){this._project._activeLayer=this},_hitTestSelf:function(){}}),P=k.extend({_class:"Shape",_applyMatrix:!1,_canApplyMatrix:!1,_canScaleStroke:!0,_serializeFields:{type:null,size:null,radius:null},initialize:function(e,t){this._initialize(e,t)},_equals:function(e){return this._type===e._type&&this._size.equals(e._size)&&l.equals(this._radius,e._radius)},copyContent:function(e){this.setType(e._type),this.setSize(e._size),this.setRadius(e._radius)},getType:function(){return this._type},setType:function(e){this._type=e},getShape:"#getType",setShape:"#setType",getSize:function(){var e=this._size;return new _(e.width,e.height,this,"setSize")},setSize:function(){var e=w.read(arguments);if(this._size){if(!this._size.equals(e)){var t=this._type,n=e.width,r=e.height;"rectangle"===t?this._radius.set(w.min(this._radius,e.divide(2).abs())):"circle"===t?(n=r=(n+r)/2,this._radius=n/2):"ellipse"===t&&this._radius._set(n/2,r/2),this._size._set(n,r),this._changed(9)}}else this._size=e.clone()},getRadius:function(){var e=this._radius;return"circle"===this._type?e:new _(e.width,e.height,this,"setRadius")},setRadius:function(e){var t=this._type;if("circle"===t){if(e===this._radius)return;var n=2*e;this._radius=e,this._size._set(n,n)}else if(e=w.read(arguments),this._radius){if(this._radius.equals(e))return;if(this._radius.set(e),"rectangle"===t){n=w.max(this._size,e.multiply(2));this._size.set(n)}else"ellipse"===t&&this._size._set(2*e.width,2*e.height)}else this._radius=e.clone();this._changed(9)},isEmpty:function(){return!1},toPath:function(e){var t=new(F[l.capitalize(this._type)])({center:new y,size:this._size,radius:this._radius,insert:!1});return t.copyAttributes(this),de.settings.applyMatrix&&t.setApplyMatrix(!0),(e===s||e)&&t.insertAbove(this),t},toShape:"#clone",_asPathItem:function(){return this.toPath(!1)},_draw:function(e,t,n,r){var i=this._style,o=i.hasFill(),a=i.hasStroke(),s=t.dontFinish||t.clip,c=!r;if(o||a||s){var u=this._type,l=this._radius,f="circle"===u;if(t.dontStart||e.beginPath(),c&&f)e.arc(0,0,l,0,2*Math.PI,!0);else{var d=f?l:l.width,p=f?l:l.height,h=this._size,g=h.width,v=h.height;if(c&&"rectangle"===u&&0===d&&0===p)e.rect(-g/2,-v/2,g,v);else{var m=g/2,y=v/2,b=.44771525016920644,w=d*b,_=p*b,x=[-m,-y+p,-m,-y+_,-m+w,-y,-m+d,-y,m-d,-y,m-w,-y,m,-y+_,m,-y+p,m,y-p,m,y-_,m-w,y,m-d,y,-m+d,y,-m+w,y,-m,y-_,-m,y-p];r&&r.transform(x,x,32),e.moveTo(x[0],x[1]),e.bezierCurveTo(x[2],x[3],x[4],x[5],x[6],x[7]),m!==d&&e.lineTo(x[8],x[9]),e.bezierCurveTo(x[10],x[11],x[12],x[13],x[14],x[15]),y!==p&&e.lineTo(x[16],x[17]),e.bezierCurveTo(x[18],x[19],x[20],x[21],x[22],x[23]),m!==d&&e.lineTo(x[24],x[25]),e.bezierCurveTo(x[26],x[27],x[28],x[29],x[30],x[31])}}e.closePath()}s||!o&&!a||(this._setStyles(e,t,n),o&&(e.fill(i.getFillRule()),e.shadowColor="rgba(0,0,0,0)"),a&&e.stroke())},_canComposite:function(){return!(this.hasFill()&&this.hasStroke())},_getBounds:function(e,t){var n=new x(this._size).setCenter(0,0),r=this._style,i=t.stroke&&r.hasStroke()&&r.getStrokeWidth();return e&&(n=e._transformBounds(n)),i?n.expand(F._getStrokePadding(i,this._getStrokeMatrix(e,t))):n}},new function(){function e(e,t,n){var r=e._radius;if(!r.isZero())for(var i=e._size.divide(2),o=1;o<=4;o++){var a=new y(o>1&&o<4?-1:1,o>2?-1:1),s=a.multiply(i),c=s.subtract(a.multiply(r));if(new x(n?s.add(a.multiply(n)):s,c).contains(t))return{point:c,quadrant:o}}}function t(e,t,n,r){var i=e.divide(t);return(!r||i.isInQuadrant(r))&&i.subtract(i.normalize()).multiply(t).divide(n).length<=1}return{_contains:function t(n){if("rectangle"===this._type){var r=e(this,n);return r?n.subtract(r.point).divide(this._radius).getLength()<=1:t.base.call(this,n)}return n.divide(this.size).getLength()<=.5},_hitTestSelf:function n(r,i,o,a){var s=!1,c=this._style,u=i.stroke&&c.hasStroke(),l=i.fill&&c.hasFill();if(u||l){var f=this._type,d=this._radius,p=u?c.getStrokeWidth()/2:0,h=i._tolerancePadding.add(F._getStrokePadding(p,!c.getStrokeScaling()&&a));if("rectangle"===f){var g=h.multiply(2),v=e(this,r,g);if(v)s=t(r.subtract(v.point),d,h,v.quadrant);else{var m=new x(this._size).setCenter(0,0),y=m.expand(g),b=m.expand(g.negate());s=y._containsPoint(r)&&!b._containsPoint(r)}}else s=t(r,d,h)}return s?new M(u?"stroke":"fill",this):n.base.apply(this,arguments)}}},{statics:new function(){function e(e,t,n,r,i){var o=l.create(P.prototype);return o._type=e,o._size=n,o._radius=r,o._initialize(l.getNamed(i),t),o}return{Circle:function(){var t=arguments,n=y.readNamed(t,"center"),r=l.readNamed(t,"radius");return e("circle",n,new w(2*r),r,t)},Rectangle:function(){var t=arguments,n=x.readNamed(t,"rectangle"),r=w.min(w.readNamed(t,"radius"),n.getSize(!0).divide(2));return e("rectangle",n.getCenter(!0),n.getSize(!0),r,t)},Ellipse:function(){var t=arguments,n=P._readEllipse(t),r=n.radius;return e("ellipse",n.center,r.multiply(2),r,t)},_readEllipse:function(e){var t,n;if(l.hasNamed(e,"radius"))t=y.readNamed(e,"center"),n=w.readNamed(e,"radius");else{var r=x.readNamed(e,"rectangle");t=r.getCenter(!0),n=r.getSize(!0).divide(2)}return{center:t,radius:n}}}}}),I=k.extend({_class:"Raster",_applyMatrix:!1,_canApplyMatrix:!1,_boundsOptions:{stroke:!1,handle:!1},_serializeFields:{crossOrigin:null,source:null},_prioritize:["crossOrigin"],_smoothing:"low",beans:!0,initialize:function(e,t){if(!this._initialize(e,t!==s&&y.read(arguments))){var n,r=typeof e,i="string"===r?u.getElementById(e):"object"===r?e:null;if(i&&i!==k.NO_INSERT)if(i.getContext||null!=i.naturalHeight)n=i;else if(i){var o=w.read(arguments);o.isZero()||(n=ce.getCanvas(o))}n?this.setImage(n):this.setSource(e)}this._size||(this._size=new w,this._loaded=!1)},_equals:function(e){return this.getSource()===e.getSource()},copyContent:function(e){var t=e._image,n=e._canvas;if(t)this._setImage(t);else if(n){var r=ce.getCanvas(e._size);r.getContext("2d").drawImage(n,0,0),this._setImage(r)}this._crossOrigin=e._crossOrigin},getSize:function(){var e=this._size;return new _(e?e.width:0,e?e.height:0,this,"setSize")},setSize:function(e,t){var n=w.read(arguments);if(n.equals(this._size))t&&this.clear();else if(n.width>0&&n.height>0){var r=!t&&this.getElement();this._setImage(ce.getCanvas(n)),r&&this.getContext(!0).drawImage(r,0,0,n.width,n.height)}else this._canvas&&ce.release(this._canvas),this._size=n.clone()},getWidth:function(){return this._size?this._size.width:0},setWidth:function(e){this.setSize(e,this.getHeight())},getHeight:function(){return this._size?this._size.height:0},setHeight:function(e){this.setSize(this.getWidth(),e)},getLoaded:function(){return this._loaded},isEmpty:function(){var e=this._size;return!e||0===e.width&&0===e.height},getResolution:function(){var e=this._matrix,t=new y(0,0).transform(e),n=new y(1,0).transform(e).subtract(t),r=new y(0,1).transform(e).subtract(t);return new w(72/n.getLength(),72/r.getLength())},getPpi:"#getResolution",getImage:function(){return this._image},setImage:function(e){var t=this;function n(e){var n=t.getView(),r=e&&e.type||"load";n&&t.responds(r)&&(de=n._scope,t.emit(r,new ee(e)))}this._setImage(e),this._loaded?setTimeout(n,0):e&&Q.add(e,{load:function(r){t._setImage(e),n(r)},error:n})},_setImage:function(e){this._canvas&&ce.release(this._canvas),e&&e.getContext?(this._image=null,this._canvas=e,this._loaded=!0):(this._image=e,this._canvas=null,this._loaded=!!(e&&e.src&&e.complete)),this._size=new w(e?e.naturalWidth||e.width:0,e?e.naturalHeight||e.height:0),this._context=null,this._changed(1033)},getCanvas:function(){if(!this._canvas){var e=ce.getContext(this._size);try{this._image&&e.drawImage(this._image,0,0),this._canvas=e.canvas}catch(t){ce.release(e)}}return this._canvas},setCanvas:"#setImage",getContext:function(e){return this._context||(this._context=this.getCanvas().getContext("2d")),e&&(this._image=null,this._changed(1025)),this._context},setContext:function(e){this._context=e},getSource:function(){var e=this._image;return e&&e.src||this.toDataURL()},setSource:function(e){var t=new a.Image,n=this._crossOrigin;n&&(t.crossOrigin=n),e&&(t.src=e),this.setImage(t)},getCrossOrigin:function(){var e=this._image;return e&&e.crossOrigin||this._crossOrigin||""},setCrossOrigin:function(e){this._crossOrigin=e;var t=this._image;t&&(t.crossOrigin=e)},getSmoothing:function(){return this._smoothing},setSmoothing:function(e){this._smoothing="string"==typeof e?e:e?"low":"off",this._changed(257)},getElement:function(){return this._canvas||this._loaded&&this._image}},{beans:!1,getSubCanvas:function(){var e=x.read(arguments),t=ce.getContext(e.getSize());return t.drawImage(this.getCanvas(),e.x,e.y,e.width,e.height,0,0,e.width,e.height),t.canvas},getSubRaster:function(){var e=x.read(arguments),t=new I(k.NO_INSERT);return t._setImage(this.getSubCanvas(e)),t.translate(e.getCenter().subtract(this.getSize().divide(2))),t._matrix.prepend(this._matrix),t.insertAbove(this),t},toDataURL:function(){var e=this._image,t=e&&e.src;if(/^data:/.test(t))return t;var n=this.getCanvas();return n?n.toDataURL.apply(n,arguments):null},drawImage:function(e){var t=y.read(arguments,1);this.getContext(!0).drawImage(e,t.x,t.y)},getAverageColor:function(e){var t,n;if(e?e instanceof B?(n=e,t=e.getBounds()):"object"==typeof e&&("width"in e?t=new x(e):"x"in e&&(t=new x(e.x-.5,e.y-.5,1,1))):t=this.getBounds(),!t)return null;var r=Math.min(t.width,32),i=Math.min(t.height,32),o=I._sampleContext;o?o.clearRect(0,0,33,33):o=I._sampleContext=ce.getContext(new w(32)),o.save();var a=(new S).scale(r/t.width,i/t.height).translate(-t.x,-t.y);a.applyToContext(o),n&&n.draw(o,new l({clip:!0,matrices:[a]})),this._matrix.applyToContext(o);var s=this.getElement(),c=this._size;s&&o.drawImage(s,-c.width/2,-c.height/2),o.restore();for(var u=o.getImageData(.5,.5,Math.ceil(r),Math.ceil(i)).data,f=[0,0,0],d=0,p=0,h=u.length;p<h;p+=4){var g=u[p+3];d+=g,g/=255,f[0]+=u[p]*g,f[1]+=u[p+1]*g,f[2]+=u[p+2]*g}for(p=0;p<3;p++)f[p]/=d;return d?G.read(f):null},getPixel:function(){var e=y.read(arguments),t=this.getContext().getImageData(e.x,e.y,1,1).data;return new G("rgb",[t[0]/255,t[1]/255,t[2]/255],t[3]/255)},setPixel:function(){var e=arguments,t=y.read(e),n=G.read(e),r=n._convert("rgb"),i=n._alpha,o=this.getContext(!0),a=o.createImageData(1,1),s=a.data;s[0]=255*r[0],s[1]=255*r[1],s[2]=255*r[2],s[3]=null!=i?255*i:255,o.putImageData(a,t.x,t.y)},clear:function(){var e=this._size;this.getContext(!0).clearRect(0,0,e.width+1,e.height+1)},createImageData:function(){var e=w.read(arguments);return this.getContext().createImageData(e.width,e.height)},getImageData:function(){var e=x.read(arguments);return e.isEmpty()&&(e=new x(this._size)),this.getContext().getImageData(e.x,e.y,e.width,e.height)},setImageData:function(e){var t=y.read(arguments,1);this.getContext(!0).putImageData(e,t.x,t.y)},_getBounds:function(e,t){var n=new x(this._size).setCenter(0,0);return e?e._transformBounds(n):n},_hitTestSelf:function(e){if(this._contains(e)){var t=this;return new M("pixel",t,{offset:e.add(t._size.divide(2)).round(),color:{get:function(){return t.getPixel(this.offset)}}})}},_draw:function(e,t,n){var r=this.getElement();if(r&&r.width>0&&r.height>0){e.globalAlpha=v.clamp(this._opacity,0,1),this._setStyles(e,t,n);var i=this._smoothing,o="off"===i;X.setPrefixed(e,o?"imageSmoothingEnabled":"imageSmoothingQuality",!o&&i),e.drawImage(r,-this._size.width/2,-this._size.height/2)}},_canComposite:function(){return!0}}),R=k.extend({_class:"SymbolItem",_applyMatrix:!1,_canApplyMatrix:!1,_boundsOptions:{stroke:!0},_serializeFields:{symbol:null},initialize:function(e,t){this._initialize(e,t!==s&&y.read(arguments,1))||this.setDefinition(e instanceof A?e:new A(e))},_equals:function(e){return this._definition===e._definition},copyContent:function(e){this.setDefinition(e._definition)},getDefinition:function(){return this._definition},setDefinition:function(e){this._definition=e,this._changed(9)},getSymbol:"#getDefinition",setSymbol:"#setDefinition",isEmpty:function(){return this._definition._item.isEmpty()},_getBounds:function(e,t){var n=this._definition._item;return n._getCachedBounds(n._matrix.prepended(e),t)},_hitTestSelf:function(e,t,n){var r=t.extend({all:!1}),i=this._definition._item._hitTest(e,r,n);return i&&(i.item=this),i},_draw:function(e,t){this._definition._item.draw(e,t)}}),A=l.extend({_class:"SymbolDefinition",initialize:function(e,t){this._id=m.get(),this.project=de.project,e&&this.setItem(e,t)},_serialize:function(e,t){return t.add(this,(function(){return l.serialize([this._class,this._item],e,!1,t)}))},_changed:function(e){8&e&&k._clearBoundsCache(this),1&e&&this.project._changed(e)},getItem:function(){return this._item},setItem:function(e,t){e._symbol&&(e=e.clone()),this._item&&(this._item._symbol=null),this._item=e,e.remove(),e.setSelected(!1),t||e.setPosition(new y),e._symbol=this,this._changed(9)},getDefinition:"#getItem",setDefinition:"#setItem",place:function(e){return new R(this,e)},clone:function(){return new A(this._item.clone(!1))},equals:function(e){return e===this||e&&this._item.equals(e._item)||!1}}),M=l.extend({_class:"HitResult",initialize:function(e,t,n){this.type=e,this.item=t,n&&this.inject(n)},statics:{getOptions:function(e){var t=e&&l.read(e);return new l({type:null,tolerance:de.settings.hitTolerance,fill:!t,stroke:!t,segments:!t,handles:!1,ends:!1,position:!1,center:!1,bounds:!1,guides:!1,selected:!1},t)}}}),D=l.extend({_class:"Segment",beans:!0,_selection:0,initialize:function(e,t,n,r,i,o){var a,c,u,l,f=arguments.length;f>0&&(null==e||"object"==typeof e?1===f&&e&&"point"in e?(a=e.point,c=e.handleIn,u=e.handleOut,l=e.selection):(a=e,c=t,u=n,l=r):(a=[e,t],c=n!==s?[n,r]:null,u=i!==s?[i,o]:null)),new N(a,this,"_point"),new N(c,this,"_handleIn"),new N(u,this,"_handleOut"),l&&this.setSelection(l)},_serialize:function(e,t){var n=this._point,r=this._selection,i=r||this.hasHandles()?[n,this._handleIn,this._handleOut]:n;return r&&i.push(r),l.serialize(i,e,!0,t)},_changed:function(e){var t=this._path;if(t){var n,r=t._curves,i=this._index;r&&(e&&e!==this._point&&e!==this._handleIn||!(n=i>0?r[i-1]:t._closed?r[r.length-1]:null)||n._changed(),e&&e!==this._point&&e!==this._handleOut||!(n=r[i])||n._changed()),t._changed(41)}},getPoint:function(){return this._point},setPoint:function(){this._point.set(y.read(arguments))},getHandleIn:function(){return this._handleIn},setHandleIn:function(){this._handleIn.set(y.read(arguments))},getHandleOut:function(){return this._handleOut},setHandleOut:function(){this._handleOut.set(y.read(arguments))},hasHandles:function(){return!this._handleIn.isZero()||!this._handleOut.isZero()},isSmooth:function(){var e=this._handleIn,t=this._handleOut;return!e.isZero()&&!t.isZero()&&e.isCollinear(t)},clearHandles:function(){this._handleIn._set(0,0),this._handleOut._set(0,0)},getSelection:function(){return this._selection},setSelection:function(e){var t=this._selection,n=this._path;this._selection=e=e||0,n&&e!==t&&(n._updateSelection(this,t,e),n._changed(257))},_changeSelection:function(e,t){var n=this._selection;this.setSelection(t?n|e:n&~e)},isSelected:function(){return!!(7&this._selection)},setSelected:function(e){this._changeSelection(7,e)},getIndex:function(){return this._index!==s?this._index:null},getPath:function(){return this._path||null},getCurve:function(){var e=this._path,t=this._index;return e?(t>0&&!e._closed&&t===e._segments.length-1&&t--,e.getCurves()[t]||null):null},getLocation:function(){var e=this.getCurve();return e?new z(e,this===e._segment1?0:1):null},getNext:function(){var e=this._path&&this._path._segments;return e&&(e[this._index+1]||this._path._closed&&e[0])||null},smooth:function(e,t,n){var r=e||{},i=r.type,o=r.factor,a=this.getPrevious(),c=this.getNext(),u=(a||this)._point,l=this._point,f=(c||this)._point,d=u.getDistance(l),p=l.getDistance(f);if(i&&"catmull-rom"!==i){if("geometric"!==i)throw new Error("Smoothing method '"+i+"' not supported.");if(a&&c){var h=u.subtract(f),g=o===s?.4:o,v=g*d/(d+p);t||this.setHandleIn(h.multiply(v)),n||this.setHandleOut(h.multiply(v-g))}}else{var m=o===s?.5:o,b=Math.pow(d,m),w=b*b,_=Math.pow(p,m),x=_*_;if(!t&&a){var O=2*x+3*_*b+w,S=3*_*(_+b);this.setHandleIn(0!==S?new y((x*u._x+O*l._x-w*f._x)/S-l._x,(x*u._y+O*l._y-w*f._y)/S-l._y):new y)}if(!n&&c){O=2*w+3*b*_+x,S=3*b*(b+_);this.setHandleOut(0!==S?new y((w*f._x+O*l._x-x*u._x)/S-l._x,(w*f._y+O*l._y-x*u._y)/S-l._y):new y)}}},getPrevious:function(){var e=this._path&&this._path._segments;return e&&(e[this._index-1]||this._path._closed&&e[e.length-1])||null},isFirst:function(){return!this._index},isLast:function(){var e=this._path;return e&&this._index===e._segments.length-1||!1},reverse:function(){var e=this._handleIn,t=this._handleOut,n=e.clone();e.set(t),t.set(n)},reversed:function(){return new D(this._point,this._handleOut,this._handleIn)},remove:function(){return!!this._path&&!!this._path.removeSegment(this._index)},clone:function(){return new D(this._point,this._handleIn,this._handleOut)},equals:function(e){return e===this||e&&this._class===e._class&&this._point.equals(e._point)&&this._handleIn.equals(e._handleIn)&&this._handleOut.equals(e._handleOut)||!1},toString:function(){var e=["point: "+this._point];return this._handleIn.isZero()||e.push("handleIn: "+this._handleIn),this._handleOut.isZero()||e.push("handleOut: "+this._handleOut),"{ "+e.join(", ")+" }"},transform:function(e){this._transformCoordinates(e,new Array(6),!0),this._changed()},interpolate:function(e,t,n){var r=1-n,i=n,o=e._point,a=t._point,s=e._handleIn,c=t._handleIn,u=t._handleOut,l=e._handleOut;this._point._set(r*o._x+i*a._x,r*o._y+i*a._y,!0),this._handleIn._set(r*s._x+i*c._x,r*s._y+i*c._y,!0),this._handleOut._set(r*l._x+i*u._x,r*l._y+i*u._y,!0),this._changed()},_transformCoordinates:function(e,t,n){var r=this._point,i=n&&this._handleIn.isZero()?null:this._handleIn,o=n&&this._handleOut.isZero()?null:this._handleOut,a=r._x,s=r._y,c=2;return t[0]=a,t[1]=s,i&&(t[c++]=i._x+a,t[c++]=i._y+s),o&&(t[c++]=o._x+a,t[c++]=o._y+s),e&&(e._transformCoordinates(t,t,c/2),a=t[0],s=t[1],n?(r._x=a,r._y=s,c=2,i&&(i._x=t[c++]-a,i._y=t[c++]-s),o&&(o._x=t[c++]-a,o._y=t[c++]-s)):(i||(t[c++]=a,t[c++]=s),o||(t[c++]=a,t[c++]=s))),t}}),N=y.extend({initialize:function(e,t,n){var r,i,o;if(e)if((r=e[0])!==s)i=e[1];else{var a=e;(r=a.x)===s&&(r=(a=y.read(arguments)).x),i=a.y,o=a.selected}else r=i=0;this._x=r,this._y=i,this._owner=t,t[n]=this,o&&this.setSelected(!0)},_set:function(e,t){return this._x=e,this._y=t,this._owner._changed(this),this},getX:function(){return this._x},setX:function(e){this._x=e,this._owner._changed(this)},getY:function(){return this._y},setY:function(e){this._y=e,this._owner._changed(this)},isZero:function(){var e=v.isZero;return e(this._x)&&e(this._y)},isSelected:function(){return!!(this._owner._selection&this._getSelection())},setSelected:function(e){this._owner._changeSelection(this._getSelection(),e)},_getSelection:function(){var e=this._owner;return this===e._point?1:this===e._handleIn?2:this===e._handleOut?4:0}}),L=l.extend({_class:"Curve",beans:!0,initialize:function(e,t,n,r,i,o,a,s){var c,u,l,f,d,p,h=arguments.length;3===h?(this._path=e,c=t,u=n):h?1===h?"segment1"in e?(c=new D(e.segment1),u=new D(e.segment2)):"point1"in e?(l=e.point1,d=e.handle1,p=e.handle2,f=e.point2):Array.isArray(e)&&(l=[e[0],e[1]],f=[e[6],e[7]],d=[e[2]-e[0],e[3]-e[1]],p=[e[4]-e[6],e[5]-e[7]]):2===h?(c=new D(e),u=new D(t)):4===h?(l=e,d=t,p=n,f=r):8===h&&(l=[e,t],f=[a,s],d=[n-e,r-t],p=[i-a,o-s]):(c=new D,u=new D),this._segment1=c||new D(l,null,d),this._segment2=u||new D(f,p,null)},_serialize:function(e,t){return l.serialize(this.hasHandles()?[this.getPoint1(),this.getHandle1(),this.getHandle2(),this.getPoint2()]:[this.getPoint1(),this.getPoint2()],e,!0,t)},_changed:function(){this._length=this._bounds=s},clone:function(){return new L(this._segment1,this._segment2)},toString:function(){var e=["point1: "+this._segment1._point];return this._segment1._handleOut.isZero()||e.push("handle1: "+this._segment1._handleOut),this._segment2._handleIn.isZero()||e.push("handle2: "+this._segment2._handleIn),e.push("point2: "+this._segment2._point),"{ "+e.join(", ")+" }"},classify:function(){return L.classify(this.getValues())},remove:function(){var e=!1;if(this._path){var t=this._segment2,n=t._handleOut;(e=t.remove())&&this._segment1._handleOut.set(n)}return e},getPoint1:function(){return this._segment1._point},setPoint1:function(){this._segment1._point.set(y.read(arguments))},getPoint2:function(){return this._segment2._point},setPoint2:function(){this._segment2._point.set(y.read(arguments))},getHandle1:function(){return this._segment1._handleOut},setHandle1:function(){this._segment1._handleOut.set(y.read(arguments))},getHandle2:function(){return this._segment2._handleIn},setHandle2:function(){this._segment2._handleIn.set(y.read(arguments))},getSegment1:function(){return this._segment1},getSegment2:function(){return this._segment2},getPath:function(){return this._path},getIndex:function(){return this._segment1._index},getNext:function(){var e=this._path&&this._path._curves;return e&&(e[this._segment1._index+1]||this._path._closed&&e[0])||null},getPrevious:function(){var e=this._path&&this._path._curves;return e&&(e[this._segment1._index-1]||this._path._closed&&e[e.length-1])||null},isFirst:function(){return!this._segment1._index},isLast:function(){var e=this._path;return e&&this._segment1._index===e._curves.length-1||!1},isSelected:function(){return this.getPoint1().isSelected()&&this.getHandle1().isSelected()&&this.getHandle2().isSelected()&&this.getPoint2().isSelected()},setSelected:function(e){this.getPoint1().setSelected(e),this.getHandle1().setSelected(e),this.getHandle2().setSelected(e),this.getPoint2().setSelected(e)},getValues:function(e){return L.getValues(this._segment1,this._segment2,e)},getPoints:function(){for(var e=this.getValues(),t=[],n=0;n<8;n+=2)t.push(new y(e[n],e[n+1]));return t}},{getLength:function(){return null==this._length&&(this._length=L.getLength(this.getValues(),0,1)),this._length},getArea:function(){return L.getArea(this.getValues())},getLine:function(){return new E(this._segment1._point,this._segment2._point)},getPart:function(e,t){return new L(L.getPart(this.getValues(),e,t))},getPartLength:function(e,t){return L.getLength(this.getValues(),e,t)},divideAt:function(e){return this.divideAtTime(e&&e.curve===this?e.time:this.getTimeAt(e))},divideAtTime:function(e,t){var n=null;if(e>=1e-8&&e<=1-1e-8){var r=L.subdivide(this.getValues(),e),i=r[0],o=r[1],a=t||this.hasHandles(),s=this._segment1,c=this._segment2,u=this._path;a&&(s._handleOut._set(i[2]-i[0],i[3]-i[1]),c._handleIn._set(o[4]-o[6],o[5]-o[7]));var l=i[6],f=i[7],d=new D(new y(l,f),a&&new y(i[4]-l,i[5]-f),a&&new y(o[2]-l,o[3]-f));u?(u.insert(s._index+1,d),n=this.getNext()):(this._segment2=d,this._changed(),n=new L(d,c))}return n},splitAt:function(e){var t=this._path;return t?t.splitAt(e):null},splitAtTime:function(e){return this.splitAt(this.getLocationAtTime(e))},divide:function(e,t){return this.divideAtTime(e===s?.5:t?e:this.getTimeAt(e))},split:function(e,t){return this.splitAtTime(e===s?.5:t?e:this.getTimeAt(e))},reversed:function(){return new L(this._segment2.reversed(),this._segment1.reversed())},clearHandles:function(){this._segment1._handleOut._set(0,0),this._segment2._handleIn._set(0,0)},statics:{getValues:function(e,t,n,r){var i=e._point,o=e._handleOut,a=t._handleIn,s=t._point,c=i.x,u=i.y,l=s.x,f=s.y,d=r?[c,u,c,u,l,f,l,f]:[c,u,c+o._x,u+o._y,l+a._x,f+a._y,l,f];return n&&n._transformCoordinates(d,d,4),d},subdivide:function(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],l=e[7];t===s&&(t=.5);var f=1-t,d=f*n+t*i,p=f*r+t*o,h=f*i+t*a,g=f*o+t*c,v=f*a+t*u,m=f*c+t*l,y=f*d+t*h,b=f*p+t*g,w=f*h+t*v,_=f*g+t*m,x=f*y+t*w,O=f*b+t*_;return[[n,r,d,p,y,b,x,O],[x,O,w,_,v,m,u,l]]},getMonoCurves:function(e,t){var n=[],r=t?0:1,i=e[r+0],o=e[r+2],a=e[r+4],s=e[r+6];if(i>=o==o>=a&&o>=a==a>=s||L.isStraight(e))n.push(e);else{var c=3*(o-a)-i+s,u=2*(i+a)-4*o,l=o-i,f=[],d=v.solveQuadratic(c,u,l,f,1e-8,1-1e-8);if(d){f.sort();var p=f[0],h=L.subdivide(e,p);n.push(h[0]),d>1&&(p=(f[1]-p)/(1-p),h=L.subdivide(h[1],p),n.push(h[0])),n.push(h[1])}else n.push(e)}return n},solveCubic:function(e,t,n,r,i,o){var a=e[t],s=e[t+2],c=e[t+4],u=e[t+6],l=0;if(!(a<n&&u<n&&s<n&&c<n||a>n&&u>n&&s>n&&c>n)){var f=3*(s-a),d=3*(c-s)-f,p=u-a-f-d;l=v.solveCubic(p,d,f,a-n,r,i,o)}return l},getTimeOf:function(e,t){var n=new y(e[0],e[1]),r=new y(e[6],e[7]);if(null===(t.isClose(n,1e-12)?0:t.isClose(r,1e-12)?1:null))for(var i=[t.x,t.y],o=[],a=0;a<2;a++)for(var s=L.solveCubic(e,a,i[a],o,0,1),c=0;c<s;c++){var u=o[c];if(t.isClose(L.getPoint(e,u),1e-7))return u}return t.isClose(n,1e-7)?0:t.isClose(r,1e-7)?1:null},getNearestTime:function(e,t){if(L.isStraight(e)){var n=e[0],r=e[1],i=e[6]-n,o=e[7]-r,a=i*i+o*o;if(0===a)return 0;var s=((t.x-n)*i+(t.y-r)*o)/a;return s<1e-12?0:s>.999999999999?1:L.getTimeOf(e,new y(n+s*i,r+s*o))}var c=1/0,u=0;function l(n){if(n>=0&&n<=1){var r=t.getDistance(L.getPoint(e,n),!0);if(r<c)return c=r,u=n,!0}}for(var f=0;f<=100;f++)l(f/100);for(var d=.005;d>1e-8;)l(u-d)||l(u+d)||(d/=2);return u},getPart:function(e,t,n){var r=t>n;if(r){var i=t;t=n,n=i}return t>0&&(e=L.subdivide(e,t)[1]),n<1&&(e=L.subdivide(e,(n-t)/(1-t))[0]),r?[e[6],e[7],e[4],e[5],e[2],e[3],e[0],e[1]]:e},isFlatEnough:function(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=3*i-2*n-c,f=3*o-2*r-u,d=3*a-2*c-n,p=3*s-2*u-r;return Math.max(l*l,d*d)+Math.max(f*f,p*p)<=16*t*t},getArea:function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7];return 3*((c-n)*(r+o)-(s-t)*(i+a)+i*(t-o)-r*(n-a)+c*(o+t/3)-s*(a+n/3))/20},getBounds:function(e){for(var t=e.slice(0,2),n=t.slice(),r=[0,0],i=0;i<2;i++)L._addBounds(e[i],e[i+2],e[i+4],e[i+6],i,0,t,n,r);return new x(t[0],t[1],n[0]-t[0],n[1]-t[1])},_addBounds:function(e,t,n,r,i,o,a,s,c){function u(e,t){var n=e-t,r=e+t;n<a[i]&&(a[i]=n),r>s[i]&&(s[i]=r)}o/=2;var l=a[i]+o,f=s[i]-o;if(e<l||t<l||n<l||r<l||e>f||t>f||n>f||r>f)if(t<e!=t<r&&n<e!=n<r)u(e,0),u(r,0);else{var d=3*(t-n)-e+r,p=2*(e+n)-4*t,h=t-e,g=v.solveQuadratic(d,p,h,c);u(r,0);for(var m=0;m<g;m++){var y=c[m],b=1-y;1e-8<=y&&y<=1-1e-8&&u(b*b*b*e+3*b*b*y*t+3*b*y*y*n+y*y*y*r,o)}}}}},l.each(["getBounds","getStrokeBounds","getHandleBounds"],(function(e){this[e]=function(){this._bounds||(this._bounds={});var t=this._bounds[e];return t||(t=this._bounds[e]=F[e]([this._segment1,this._segment2],!1,this._path)),t.clone()}}),{}),l.each({isStraight:function(e,t,n,r){if(t.isZero()&&n.isZero())return!0;var i=r.subtract(e);if(i.isZero())return!1;if(i.isCollinear(t)&&i.isCollinear(n)){var o=new E(e,r);if(o.getDistance(e.add(t))<1e-7&&o.getDistance(r.add(n))<1e-7){var a=i.dot(i),s=i.dot(t)/a,c=i.dot(n)/a;return s>=0&&s<=1&&c<=0&&c>=-1}}return!1},isLinear:function(e,t,n,r){var i=r.subtract(e).divide(3);return t.equals(i)&&n.negate().equals(i)}},(function(e,t){this[t]=function(t){var n=this._segment1,r=this._segment2;return e(n._point,n._handleOut,r._handleIn,r._point,t)},this.statics[t]=function(t,n){var r=t[0],i=t[1],o=t[6],a=t[7];return e(new y(r,i),new y(t[2]-r,t[3]-i),new y(t[4]-o,t[5]-a),new y(o,a),n)}}),{statics:{},hasHandles:function(){return!this._segment1._handleOut.isZero()||!this._segment2._handleIn.isZero()},hasLength:function(e){return(!this.getPoint1().equals(this.getPoint2())||this.hasHandles())&&this.getLength()>(e||0)},isCollinear:function(e){return e&&this.isStraight()&&e.isStraight()&&this.getLine().isCollinear(e.getLine())},isHorizontal:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).y)<1e-8},isVertical:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).x)<1e-8}}),{beans:!1,getLocationAt:function(e,t){return this.getLocationAtTime(t?e:this.getTimeAt(e))},getLocationAtTime:function(e){return null!=e&&e>=0&&e<=1?new z(this,e):null},getTimeAt:function(e,t){return L.getTimeAt(this.getValues(),e,t)},getParameterAt:"#getTimeAt",getTimesWithTangent:function(){var e=y.read(arguments);return e.isZero()?[]:L.getTimesWithTangent(this.getValues(),e)},getOffsetAtTime:function(e){return this.getPartLength(0,e)},getLocationOf:function(){return this.getLocationAtTime(this.getTimeOf(y.read(arguments)))},getOffsetOf:function(){var e=this.getLocationOf.apply(this,arguments);return e?e.getOffset():null},getTimeOf:function(){return L.getTimeOf(this.getValues(),y.read(arguments))},getParameterOf:"#getTimeOf",getNearestLocation:function(){var e=y.read(arguments),t=this.getValues(),n=L.getNearestTime(t,e),r=L.getPoint(t,n);return new z(this,n,r,null,e.getDistance(r))},getNearestPoint:function(){var e=this.getNearestLocation.apply(this,arguments);return e?e.getPoint():e}},new function(){var e=["getPoint","getTangent","getNormal","getWeightedTangent","getWeightedNormal","getCurvature"];return l.each(e,(function(e){this[e+"At"]=function(t,n){var r=this.getValues();return L[e](r,n?t:L.getTimeAt(r,t))},this[e+"AtTime"]=function(t){return L[e](this.getValues(),t)}}),{statics:{_evaluateMethods:e}})},new function(){function e(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],u=9*(r-o)+3*(s-t),l=6*(t+o)-12*r,f=3*(r-t),d=9*(i-a)+3*(c-n),p=6*(n+a)-12*i,h=3*(i-n);return function(e){var t=(u*e+l)*e+f,n=(d*e+p)*e+h;return Math.sqrt(t*t+n*n)}}function t(e,t){return Math.max(2,Math.min(16,Math.ceil(32*Math.abs(t-e))))}function n(e,t,n,r){if(null==t||t<0||t>1)return null;var i=e[0],o=e[1],a=e[2],s=e[3],c=e[4],u=e[5],l=e[6],f=e[7],d=v.isZero;d(a-i)&&d(s-o)&&(a=i,s=o),d(c-l)&&d(u-f)&&(c=l,u=f);var p,h,g=3*(a-i),m=3*(c-a)-g,b=l-i-g-m,w=3*(s-o),_=3*(u-s)-w,x=f-o-w-_;if(0===n)p=0===t?i:1===t?l:((b*t+m)*t+g)*t+i,h=0===t?o:1===t?f:((x*t+_)*t+w)*t+o;else{if(t<1e-8?(p=g,h=w):t>1-1e-8?(p=3*(l-c),h=3*(f-u)):(p=(3*b*t+2*m)*t+g,h=(3*x*t+2*_)*t+w),r){0===p&&0===h&&(t<1e-8||t>1-1e-8)&&(p=c-a,h=u-s);var O=Math.sqrt(p*p+h*h);O&&(p/=O,h/=O)}if(3===n){c=6*b*t+2*m,u=6*x*t+2*_;var S=Math.pow(p*p+h*h,1.5);p=0!==S?(p*u-h*c)/S:0,h=0}}return 2===n?new y(h,-p):new y(p,h)}return{statics:{classify:function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],l=r*(n-u)+i*(c-t)+t*u-n*c,f=3*(o*(i-n)+a*(t-r)+r*n-i*t),d=f-l,p=d-l+(t*(u-a)+n*(o-c)+c*a-u*o),h=Math.sqrt(p*p+d*d+f*f),g=0!==h?1/h:0,m=v.isZero;function y(e,t,n){var r=t!==s,i=r&&t>0&&t<1,o=r&&n>0&&n<1;return!r||(i||o)&&("loop"!==e||i&&o)||(e="arch",i=o=!1),{type:e,roots:i||o?i&&o?t<n?[t,n]:[n,t]:[i?t:n]:null}}if(d*=g,f*=g,m(p*=g))return m(d)?y(m(f)?"line":"quadratic"):y("serpentine",f/(3*d));var b=3*d*d-4*p*f;if(m(b))return y("cusp",d/(2*p));var w=b>0?Math.sqrt(b/3):Math.sqrt(-b),_=2*p;return y(b>0?"serpentine":"loop",(d+w)/_,(d-w)/_)},getLength:function(n,r,i,o){if(r===s&&(r=0),i===s&&(i=1),L.isStraight(n)){var a=n;i<1&&(a=L.subdivide(a,i)[0],r/=i),r>0&&(a=L.subdivide(a,r)[1]);var c=a[6]-a[0],u=a[7]-a[1];return Math.sqrt(c*c+u*u)}return v.integrate(o||e(n),r,i,t(r,i))},getTimeAt:function(n,r,i){if(i===s&&(i=r<0?1:0),0===r)return i;var o=Math.abs,a=r>0,c=a?i:0,u=a?1:i,l=e(n),f=L.getLength(n,c,u,l),d=o(r)-f;if(o(d)<1e-12)return a?u:c;if(d>1e-12)return null;var p=r/f,h=0;return v.findRoot((function(e){return h+=v.integrate(l,i,e,t(i,e)),i=e,h-r}),l,i+p,c,u,32,1e-12)},getPoint:function(e,t){return n(e,t,0,!1)},getTangent:function(e,t){return n(e,t,1,!0)},getWeightedTangent:function(e,t){return n(e,t,1,!1)},getNormal:function(e,t){return n(e,t,2,!0)},getWeightedNormal:function(e,t){return n(e,t,2,!1)},getCurvature:function(e,t){return n(e,t,3,!1).x},getPeaks:function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=3*r-t-3*o+e[6],c=3*t-6*r+3*o,u=-3*t+3*r,l=3*i-n-3*a+e[7],f=3*n-6*i+3*a,d=-3*n+3*i,p=[];return v.solveCubic(9*(s*s+l*l),9*(s*c+f*l),2*(c*c+f*f)+3*(u*s+d*l),u*c+f*d,p,1e-8,1-1e-8),p.sort()}}}},new function(){function e(e,t,n,r,i,o,a){var s=!a&&n.getPrevious()===i,c=!a&&n!==i&&n.getNext()===i;if(null!==r&&r>=(s?1e-8:0)&&r<=(c?1-1e-8:1)&&null!==o&&o>=(c?1e-8:0)&&o<=(s?1-1e-8:1)){var u=new z(n,r,null,a),l=new z(i,o,null,a);u._intersection=l,l._intersection=u,t&&!t(u)||z.insert(e,u,!0)}}function t(r,i,o,a,s,c,u,l,f,d,p,h,g){if(++f>=4096||++l>=40)return f;var v,m,y=i[0],b=i[1],w=i[6],_=i[7],x=E.getSignedDistance,O=x(y,b,w,_,i[2],i[3]),S=x(y,b,w,_,i[4],i[5]),C=O*S>0?3/4:4/9,k=C*Math.min(0,O,S),T=C*Math.max(0,O,S),j=x(y,b,w,_,r[0],r[1]),P=x(y,b,w,_,r[2],r[3]),I=x(y,b,w,_,r[4],r[5]),R=x(y,b,w,_,r[6],r[7]),A=function(e,t,n,r){var i,o=[0,e],a=[1/3,t],s=[2/3,n],c=[1,r],u=t-(2*e+r)/3,l=n-(e+2*r)/3;if(u*l<0)i=[[o,a,c],[o,s,c]];else{var f=u/l;i=[f>=2?[o,a,c]:f<=.5?[o,s,c]:[o,a,s,c],[o,c]]}return(u||l)<0?i.reverse():i}(j,P,I,R),M=A[0],D=A[1];if(0===O&&0===S&&0===j&&0===P&&0===I&&0===R||null==(v=n(M,D,k,T))||null==(m=n(M.reverse(),D.reverse(),k,T)))return f;var N=d+(p-d)*v,z=d+(p-d)*m;if(Math.max(g-h,z-N)<1e-9){var B=(N+z)/2,F=(h+g)/2;e(s,c,u?a:o,u?F:B,u?o:a,u?B:F)}else{r=L.getPart(r,v,m);var W=g-h;if(m-v>.8)if(z-N>W){B=(N+z)/2;f=t(i,(H=L.subdivide(r,.5))[0],a,o,s,c,!u,l,f,h,g,N,B),f=t(i,H[1],a,o,s,c,!u,l,f,h,g,B,z)}else{var H;F=(h+g)/2;f=t((H=L.subdivide(i,.5))[0],r,a,o,s,c,!u,l,f,h,F,N,z),f=t(H[1],r,a,o,s,c,!u,l,f,F,g,N,z)}else f=0===W||W>=1e-9?t(i,r,a,o,s,c,!u,l,f,h,g,N,z):t(r,i,o,a,s,c,u,l,f,N,z,h,g)}return f}function n(e,t,n,i){return e[0][1]<n?r(e,!0,n):t[0][1]>i?r(t,!1,i):e[0][0]}function r(e,t,n){for(var r=e[0][0],i=e[0][1],o=1,a=e.length;o<a;o++){var s=e[o][0],c=e[o][1];if(t?c>=n:c<=n)return c===n?s:r+(n-i)*(s-r)/(c-i);r=s,i=c}return null}function i(e,t,n,r,i){var o=v.isZero;if(o(r)&&o(i)){var a=L.getTimeOf(e,new y(t,n));return null===a?[]:[a]}for(var s=Math.atan2(-i,r),c=Math.sin(s),u=Math.cos(s),l=[],f=[],d=0;d<8;d+=2){var p=e[d]-t,h=e[d+1]-n;l.push(p*u-h*c,p*c+h*u)}return L.solveCubic(l,1,0,f,0,1),f}function o(t,n,r,o,a,s,c){for(var u=n[0],l=n[1],f=i(t,u,l,n[6]-u,n[7]-l),d=0,p=f.length;d<p;d++){var h=f[d],g=L.getPoint(t,h),v=L.getTimeOf(n,g);null!==v&&e(a,s,c?o:r,c?v:h,c?r:o,c?h:v)}}function a(t,n,r,i,o,a){var s=E.intersect(t[0],t[1],t[6],t[7],n[0],n[1],n[6],n[7]);s&&e(o,a,r,L.getTimeOf(t,s),i,L.getTimeOf(n,s))}function s(n,r,i,s,c,l){var f=Math.min,d=Math.max;if(d(n[0],n[2],n[4],n[6])+1e-12>f(r[0],r[2],r[4],r[6])&&f(n[0],n[2],n[4],n[6])-1e-12<d(r[0],r[2],r[4],r[6])&&d(n[1],n[3],n[5],n[7])+1e-12>f(r[1],r[3],r[5],r[7])&&f(n[1],n[3],n[5],n[7])-1e-12<d(r[1],r[3],r[5],r[7])){var p=u(n,r);if(p)for(var h=0;h<2;h++){var g=p[h];e(c,l,i,g[0],s,g[1],!0)}else{var v=L.isStraight(n),m=L.isStraight(r),b=v&&m,w=v&&!m,_=c.length;if((b?a:v||m?o:t)(w?r:n,w?n:r,w?s:i,w?i:s,c,l,w,0,0,0,1,0,1),!b||c.length===_)for(h=0;h<4;h++){var x=h>>1,O=1&h,S=6*x,E=6*O,C=new y(n[S],n[S+1]),k=new y(r[E],r[E+1]);C.isClose(k,1e-12)&&e(c,l,i,x,s,O)}}}return c}function c(t,n,r,i){var o=L.classify(t);if("loop"===o.type){var a=o.roots;e(r,i,n,a[0],n,a[1])}return r}function u(e,t){function n(e){var t=e[6]-e[0],n=e[7]-e[1];return t*t+n*n}var r=Math.abs,i=E.getDistance,o=L.isStraight(e),a=L.isStraight(t),s=o&&a,c=n(e)<n(t),u=c?t:e,l=c?e:t,f=u[0],d=u[1],p=u[6]-f,h=u[7]-d;if(i(f,d,p,h,l[0],l[1],!0)<1e-7&&i(f,d,p,h,l[6],l[7],!0)<1e-7)!s&&i(f,d,p,h,u[2],u[3],!0)<1e-7&&i(f,d,p,h,u[4],u[5],!0)<1e-7&&i(f,d,p,h,l[2],l[3],!0)<1e-7&&i(f,d,p,h,l[4],l[5],!0)<1e-7&&(o=a=s=!0);else if(s)return null;if(o^a)return null;for(var g=[e,t],v=[],m=0;m<4&&v.length<2;m++){var b=1&m,w=1^b,_=m>>1,x=L.getTimeOf(g[b],new y(g[w][_?6:0],g[w][_?7:1]));if(null!=x){var O=b?[_,x]:[x,_];(!v.length||r(O[0]-v[0][0])>1e-8&&r(O[1]-v[0][1])>1e-8)&&v.push(O)}if(m>2&&!v.length)break}if(2!==v.length)v=null;else if(!s){var S=L.getPart(e,v[0][0],v[1][0]),C=L.getPart(t,v[0][1],v[1][1]);(r(C[2]-S[2])>1e-7||r(C[3]-S[3])>1e-7||r(C[4]-S[4])>1e-7||r(C[5]-S[5])>1e-7)&&(v=null)}return v}return{getIntersections:function(e){var t=this.getValues(),n=e&&e!==this&&e.getValues();return n?s(t,n,this,e,[]):c(t,this,[])},statics:{getOverlaps:u,getIntersections:function(e,t,n,r,i,o){var a=!t;a&&(t=e);for(var u=e.length,l=t.length,f=new Array(u),d=a?f:new Array(l),p=[],g=0;g<u;g++)f[g]=e[g].getValues(r);if(!a)for(g=0;g<l;g++)d[g]=t[g].getValues(i);for(var v=h.findCurveBoundsCollisions(f,d,1e-7),m=0;m<u;m++){var y=e[m],b=f[m];a&&c(b,y,p,n);var w=v[m];if(w)for(var _=0;_<w.length;_++){if(o&&p.length)return p;var x=w[_];if(!a||x>m){var O=t[x];s(b,d[x],y,O,p,n)}}}return p},getCurveLineIntersections:i,getTimesWithTangent:function(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=t.normalize(),f=l.x,d=l.y,p=3*c-9*a+9*i-3*n,h=3*u-9*s+9*o-3*r,g=6*a-12*i+6*n,m=6*s-12*o+6*r,y=3*i-3*n,b=3*o-3*r,w=2*p*d-2*h*f,_=[];if(Math.abs(w)<v.CURVETIME_EPSILON){if(0!=(w=p*m-h*g)){var x=-(p*b-h*y)/w;x>=0&&x<=1&&_.push(x)}}else{var O=(g*g-4*p*y)*d*d+(-2*g*m+4*h*y+4*p*b)*f*d+(m*m-4*h*b)*f*f,S=g*d-m*f;if(O>=0&&0!=w){var E=Math.sqrt(O),C=-(S+E)/w,k=(-S+E)/w;C>=0&&C<=1&&_.push(C),k>=0&&k<=1&&_.push(k)}}return _}}}}),z=l.extend({_class:"CurveLocation",initialize:function(e,t,n,r,i){if(t>=.99999999){var o=e.getNext();o&&(t=0,e=o)}this._setCurve(e),this._time=t,this._point=n||e.getPointAtTime(t),this._overlap=r,this._distance=i,this._intersection=this._next=this._previous=null},_setPath:function(e){this._path=e,this._version=e?e._version:0},_setCurve:function(e){this._setPath(e._path),this._curve=e,this._segment=null,this._segment1=e._segment1,this._segment2=e._segment2},_setSegment:function(e){var t=e.getCurve();t?this._setCurve(t):(this._setPath(e._path),this._segment1=e,this._segment2=null),this._segment=e,this._time=e===this._segment1?0:1,this._point=e._point.clone()},getSegment:function(){var e=this._segment;if(!e){var t=this.getCurve(),n=this.getTime();0===n?e=t._segment1:1===n?e=t._segment2:null!=n&&(e=t.getPartLength(0,n)<t.getPartLength(n,1)?t._segment1:t._segment2),this._segment=e}return e},getCurve:function(){var e=this._path,t=this;function n(e){var n=e&&e.getCurve();if(n&&null!=(t._time=n.getTimeOf(t._point)))return t._setCurve(n),n}return e&&e._version!==this._version&&(this._time=this._offset=this._curveOffset=this._curve=null),this._curve||n(this._segment)||n(this._segment1)||n(this._segment2.getPrevious())},getPath:function(){var e=this.getCurve();return e&&e._path},getIndex:function(){var e=this.getCurve();return e&&e.getIndex()},getTime:function(){var e=this.getCurve(),t=this._time;return e&&null==t?this._time=e.getTimeOf(this._point):t},getParameter:"#getTime",getPoint:function(){return this._point},getOffset:function(){var e=this._offset;if(null==e){e=0;var t=this.getPath(),n=this.getIndex();if(t&&null!=n)for(var r=t.getCurves(),i=0;i<n;i++)e+=r[i].getLength();this._offset=e+=this.getCurveOffset()}return e},getCurveOffset:function(){var e=this._curveOffset;if(null==e){var t=this.getCurve(),n=this.getTime();this._curveOffset=e=null!=n&&t&&t.getPartLength(0,n)}return e},getIntersection:function(){return this._intersection},getDistance:function(){return this._distance},divide:function(){var e=this.getCurve(),t=e&&e.divideAtTime(this.getTime());return t&&this._setSegment(t._segment1),t},split:function(){var e=this.getCurve(),t=e._path,n=e&&e.splitAtTime(this.getTime());return n&&this._setSegment(t.getLastSegment()),n},equals:function(e,t){var n=this===e;if(!n&&e instanceof z){var r=this.getCurve(),i=e.getCurve(),o=r._path;if(o===i._path){var a=Math.abs,s=a(this.getOffset()-e.getOffset()),c=!t&&this._intersection,u=!t&&e._intersection;n=(s<1e-7||o&&a(o.getLength()-s)<1e-7)&&(!c&&!u||c&&u&&c.equals(u,!0))}}return n},toString:function(){var e=[],t=this.getPoint(),n=g.instance;t&&e.push("point: "+t);var r=this.getIndex();null!=r&&e.push("index: "+r);var i=this.getTime();return null!=i&&e.push("time: "+n.number(i)),null!=this._distance&&e.push("distance: "+n.number(this._distance)),"{ "+e.join(", ")+" }"},isTouching:function(){var e=this._intersection;if(e&&this.getTangent().isCollinear(e.getTangent())){var t=this.getCurve(),n=e.getCurve();return!(t.isStraight()&&n.isStraight()&&t.getLine().intersect(n.getLine()))}return!1},isCrossing:function(){var e=this._intersection;if(!e)return!1;var t=this.getTime(),n=e.getTime(),r=t>=1e-8&&t<=1-1e-8,i=n>=1e-8&&n<=1-1e-8;if(r&&i)return!this.isTouching();var o=this.getCurve(),a=o&&t<1e-8?o.getPrevious():o,s=e.getCurve(),c=s&&n<1e-8?s.getPrevious():s;if(t>1-1e-8&&(o=o.getNext()),n>1-1e-8&&(s=s.getNext()),!(a&&o&&c&&s))return!1;var u=[];function l(e,t){var n=e.getValues(),r=L.classify(n).roots||L.getPeaks(n),i=r.length,o=L.getLength(n,t&&i?r[i-1]:0,!t&&i?r[0]:1);u.push(i?o:o/32)}function f(e,t,n){return t<n?e>t&&e<n:e>t||e<n}r||(l(a,!0),l(o,!1)),i||(l(c,!0),l(s,!1));var d=this.getPoint(),p=Math.min.apply(Math,u),h=r?o.getTangentAtTime(t):o.getPointAt(p).subtract(d),g=r?h.negate():a.getPointAt(-p).subtract(d),v=i?s.getTangentAtTime(n):s.getPointAt(p).subtract(d),m=i?v.negate():c.getPointAt(-p).subtract(d),y=g.getAngle(),b=h.getAngle(),w=m.getAngle(),_=v.getAngle();return!!(r?f(y,w,_)^f(b,w,_)&&f(y,_,w)^f(b,_,w):f(w,y,b)^f(_,y,b)&&f(w,b,y)^f(_,b,y))},hasOverlap:function(){return!!this._overlap}},l.each(L._evaluateMethods,(function(e){var t=e+"At";this[e]=function(){var e=this.getCurve(),n=this.getTime();return null!=n&&e&&e[t](n,!0)}}),{preserve:!0}),new function(){function e(e,t,n){var r=e.length,i=0,o=r-1;function a(n,i){for(var o=n+i;o>=-1&&o<=r;o+=i){var a=e[(o%r+r)%r];if(!t.getPoint().isClose(a.getPoint(),1e-7))break;if(t.equals(a))return a}return null}for(;i<=o;){var s,c=i+o>>>1,u=e[c];if(n&&(s=t.equals(u)?u:a(c,-1)||a(c,1)))return t._overlap&&(s._overlap=s._intersection._overlap=!0),s;var l=t.getPath(),f=u.getPath();(l!==f?l._id-f._id:t.getIndex()+t.getTime()-(u.getIndex()+u.getTime()))<0?o=c-1:i=c+1}return e.splice(i,0,t),t}return{statics:{insert:e,expand:function(t){for(var n=t.slice(),r=t.length-1;r>=0;r--)e(n,t[r]._intersection,!1);return n}}}}),B=k.extend({_class:"PathItem",_selectBounds:!1,_canScaleStroke:!0,beans:!0,initialize:function(){},statics:{create:function(e){var t,n,r;if(l.isPlainObject(e)?(n=e.segments,t=e.pathData):Array.isArray(e)?n=e:"string"==typeof e&&(t=e),n){var i=n[0];r=i&&Array.isArray(i[0])}else t&&(r=(t.match(/m/gi)||[]).length>1||/z\s*\S+/i.test(t));return new(r?W:F)(e)}},_asPathItem:function(){return this},isClockwise:function(){return this.getArea()>=0},setClockwise:function(e){this.isClockwise()!=(e=!!e)&&this.reverse()},setPathData:function(e){var t,n,r,i=e&&e.match(/[mlhvcsqtaz][^mlhvcsqtaz]*/gi),o=!1,a=new y,s=new y;function c(e,n){var r=+t[e];return o&&(r+=a[n]),r}function u(e){return new y(c(e,"x"),c(e+1,"y"))}this.clear();for(var l=0,f=i&&i.length;l<f;l++){var d=i[l],p=d[0],h=p.toLowerCase(),g=(t=d.match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g))&&t.length;switch(o=p===h,"z"!==n||/[mz]/.test(h)||this.moveTo(a),h){case"m":case"l":for(var v="m"===h,m=0;m<g;m+=2)this[v?"moveTo":"lineTo"](a=u(m)),v&&(s=a,v=!1);r=a;break;case"h":case"v":var b="h"===h?"x":"y";a=a.clone();for(m=0;m<g;m++)a[b]=c(m,b),this.lineTo(a);r=a;break;case"c":for(m=0;m<g;m+=6)this.cubicCurveTo(u(m),r=u(m+2),a=u(m+4));break;case"s":for(m=0;m<g;m+=4)this.cubicCurveTo(/[cs]/.test(n)?a.multiply(2).subtract(r):a,r=u(m),a=u(m+2)),n=h;break;case"q":for(m=0;m<g;m+=4)this.quadraticCurveTo(r=u(m),a=u(m+2));break;case"t":for(m=0;m<g;m+=2)this.quadraticCurveTo(r=/[qt]/.test(n)?a.multiply(2).subtract(r):a,a=u(m)),n=h;break;case"a":for(m=0;m<g;m+=7)this.arcTo(a=u(m+5),new w(+t[m],+t[m+1]),+t[m+2],+t[m+4],+t[m+3]);break;case"z":this.closePath(1e-12),a=s}n=h}},_canComposite:function(){return!(this.hasFill()&&this.hasStroke())},_contains:function(e){var t=e.isInside(this.getBounds({internal:!0,handle:!0}))?this._getWinding(e):{};return t.onPath||!!("evenodd"===this.getFillRule()?1&t.windingL||1&t.windingR:t.winding)},getIntersections:function(e,t,n,r){var i=this===e||!e,o=this._matrix._orNullIfIdentity(),a=i?o:(n||e._matrix)._orNullIfIdentity();return i||this.getBounds(o).intersects(e.getBounds(a),1e-12)?L.getIntersections(this.getCurves(),!i&&e.getCurves(),t,o,a,r):[]},getCrossings:function(e){return this.getIntersections(e,(function(e){return e.isCrossing()}))},getNearestLocation:function(){for(var e=y.read(arguments),t=this.getCurves(),n=1/0,r=null,i=0,o=t.length;i<o;i++){var a=t[i].getNearestLocation(e);a._distance<n&&(n=a._distance,r=a)}return r},getNearestPoint:function(){var e=this.getNearestLocation.apply(this,arguments);return e?e.getPoint():e},interpolate:function(e,t,n){var r=!this._children,i=r?"_segments":"_children",o=e[i],a=t[i],s=this[i];if(!o||!a||o.length!==a.length)throw new Error("Invalid operands in interpolate() call: "+e+", "+t);var c=s.length,u=a.length;if(c<u)for(var l=r?D:F,f=c;f<u;f++)this.add(new l);else c>u&&this[r?"removeSegments":"removeChildren"](u,c);for(f=0;f<u;f++)s[f].interpolate(o[f],a[f],n);r&&(this.setClosed(e._closed),this._changed(9))},compare:function(e){var t=!1;if(e){var n=this._children||[this],r=e._children?e._children.slice():[e],i=n.length,o=r.length,a=[],s=0;t=!0;for(var c=h.findItemBoundsCollisions(n,r,v.GEOMETRIC_EPSILON),u=i-1;u>=0&&t;u--){var l=n[u];t=!1;var f=c[u];if(f)for(var d=f.length-1;d>=0&&!t;d--)l.compare(r[f[d]])&&(a[f[d]]||(a[f[d]]=!0,s++),t=!0)}t=t&&s===o}return t}}),F=B.extend({_class:"Path",_serializeFields:{segments:[],closed:!1},initialize:function(e){this._closed=!1,this._segments=[],this._version=0;var t=arguments,n=Array.isArray(e)?"object"==typeof e[0]?e:t:!e||e.size!==s||e.x===s&&e.point===s?null:t;n&&n.length>0?this.setSegments(n):(this._curves=s,this._segmentSelection=0,n||"string"!=typeof e||(this.setPathData(e),e=null)),this._initialize(!n&&e)},_equals:function(e){return this._closed===e._closed&&l.equals(this._segments,e._segments)},copyContent:function(e){this.setSegments(e._segments),this._closed=e._closed},_changed:function e(t){if(e.base.call(this,t),8&t){if(this._length=this._area=s,32&t)this._version++;else if(this._curves)for(var n=0,r=this._curves.length;n<r;n++)this._curves[n]._changed()}else 64&t&&(this._bounds=s)},getStyle:function(){var e=this._parent;return(e instanceof W?e:this)._style},getSegments:function(){return this._segments},setSegments:function(e){var t=this.isFullySelected(),n=e&&e.length;if(this._segments.length=0,this._segmentSelection=0,this._curves=s,n){var r=e[n-1];"boolean"==typeof r&&(this.setClosed(r),n--),this._add(D.readList(e,0,{},n))}t&&this.setFullySelected(!0)},getFirstSegment:function(){return this._segments[0]},getLastSegment:function(){return this._segments[this._segments.length-1]},getCurves:function(){var e=this._curves,t=this._segments;if(!e){var n=this._countCurves();e=this._curves=new Array(n);for(var r=0;r<n;r++)e[r]=new L(this,t[r],t[r+1]||t[0])}return e},getFirstCurve:function(){return this.getCurves()[0]},getLastCurve:function(){var e=this.getCurves();return e[e.length-1]},isClosed:function(){return this._closed},setClosed:function(e){if(this._closed!=(e=!!e)){if(this._closed=e,this._curves){var t=this._curves.length=this._countCurves();e&&(this._curves[t-1]=new L(this,this._segments[t-1],this._segments[0]))}this._changed(41)}}},{beans:!0,getPathData:function(e,t){var n,r,i,o,a,s,c,u,l=this._segments,f=l.length,d=new g(t),p=new Array(6),h=!0,v=[];function m(t,l){if(t._transformCoordinates(e,p),n=p[0],r=p[1],h)v.push("M"+d.pair(n,r)),h=!1;else if(a=p[2],s=p[3],a===n&&s===r&&c===i&&u===o){if(!l){var f=n-i,g=r-o;v.push(0===f?"v"+d.number(g):0===g?"h"+d.number(f):"l"+d.pair(f,g))}}else v.push("c"+d.pair(c-i,u-o)+" "+d.pair(a-i,s-o)+" "+d.pair(n-i,r-o));i=n,o=r,c=p[4],u=p[5]}if(!f)return"";for(var y=0;y<f;y++)m(l[y]);return this._closed&&f>0&&(m(l[0],!0),v.push("z")),v.join("")},isEmpty:function(){return!this._segments.length},_transformContent:function(e){for(var t=this._segments,n=new Array(6),r=0,i=t.length;r<i;r++)t[r]._transformCoordinates(e,n,!0);return!0},_add:function(e,t){for(var n=this._segments,r=this._curves,i=e.length,o=null==t,a=(t=o?n.length:t,0);a<i;a++){var s=e[a];s._path&&(s=e[a]=s.clone()),s._path=this,s._index=t+a,s._selection&&this._updateSelection(s,0,s._selection)}if(o)l.push(n,e);else{n.splice.apply(n,[t,0].concat(e));a=t+i;for(var c=n.length;a<c;a++)n[a]._index=a}if(r){var u=this._countCurves(),f=t>0&&t+i-1===u?t-1:t,d=f,p=Math.min(f+i,u);e._curves&&(r.splice.apply(r,[f,0].concat(e._curves)),d+=e._curves.length);for(a=d;a<p;a++)r.splice(a,0,new L(this,null,null));this._adjustCurves(f,p)}return this._changed(41),e},_adjustCurves:function(e,t){for(var n,r=this._segments,i=this._curves,o=e;o<t;o++)(n=i[o])._path=this,n._segment1=r[o],n._segment2=r[o+1]||r[0],n._changed();(n=i[this._closed&&!e?r.length-1:e-1])&&(n._segment2=r[e]||r[0],n._changed()),(n=i[t])&&(n._segment1=r[t],n._changed())},_countCurves:function(){var e=this._segments.length;return!this._closed&&e>0?e-1:e},add:function(e){var t=arguments;return t.length>1&&"number"!=typeof e?this._add(D.readList(t)):this._add([D.read(t)])[0]},insert:function(e,t){var n=arguments;return n.length>2&&"number"!=typeof t?this._add(D.readList(n,1),e):this._add([D.read(n,1)],e)[0]},addSegment:function(){return this._add([D.read(arguments)])[0]},insertSegment:function(e){return this._add([D.read(arguments,1)],e)[0]},addSegments:function(e){return this._add(D.readList(e))},insertSegments:function(e,t){return this._add(D.readList(t),e)},removeSegment:function(e){return this.removeSegments(e,e+1)[0]||null},removeSegments:function(e,t,n){e=e||0,t=l.pick(t,this._segments.length);var r=this._segments,i=this._curves,o=r.length,a=r.splice(e,t-e),s=a.length;if(!s)return a;for(var c=0;c<s;c++){var u=a[c];u._selection&&this._updateSelection(u,u._selection,0),u._index=u._path=null}c=e;for(var f=r.length;c<f;c++)r[c]._index=c;if(i){var d=e>0&&t===o+(this._closed?1:0)?e-1:e;for(c=(i=i.splice(d,s)).length-1;c>=0;c--)i[c]._path=null;n&&(a._curves=i.slice(1)),this._adjustCurves(d,d)}return this._changed(41),a},clear:"#removeSegments",hasHandles:function(){for(var e=this._segments,t=0,n=e.length;t<n;t++)if(e[t].hasHandles())return!0;return!1},clearHandles:function(){for(var e=this._segments,t=0,n=e.length;t<n;t++)e[t].clearHandles()},getLength:function(){if(null==this._length){for(var e=this.getCurves(),t=0,n=0,r=e.length;n<r;n++)t+=e[n].getLength();this._length=t}return this._length},getArea:function(){var e=this._area;if(null==e){var t=this._segments,n=this._closed;e=0;for(var r=0,i=t.length;r<i;r++){var o=r+1===i;e+=L.getArea(L.getValues(t[r],t[o?0:r+1],null,o&&!n))}this._area=e}return e},isFullySelected:function(){var e=this._segments.length;return this.isSelected()&&e>0&&this._segmentSelection===7*e},setFullySelected:function(e){e&&this._selectSegments(!0),this.setSelected(e)},setSelection:function e(t){1&t||this._selectSegments(!1),e.base.call(this,t)},_selectSegments:function(e){var t=this._segments,n=t.length,r=e?7:0;this._segmentSelection=r*n;for(var i=0;i<n;i++)t[i]._selection=r},_updateSelection:function(e,t,n){e._selection=n,(this._segmentSelection+=n-t)>0&&this.setSelected(!0)},divideAt:function(e){var t,n=this.getLocationAt(e);return n&&(t=n.getCurve().divideAt(n.getCurveOffset()))?t._segment1:null},splitAt:function(e){var t=this.getLocationAt(e),n=t&&t.index,r=t&&t.time;r>1-1e-8&&(n++,r=0);var i=this.getCurves();if(n>=0&&n<i.length){r>=1e-8&&i[n++].divideAtTime(r);var o,a=this.removeSegments(n,this._segments.length,!0);return this._closed?(this.setClosed(!1),o=this):((o=new F(k.NO_INSERT)).insertAbove(this),o.copyAttributes(this)),o._add(a,0),this.addSegment(a[0]),o}return null},split:function(e,t){var n,r=t===s?e:(n=this.getCurves()[e])&&n.getLocationAtTime(t);return null!=r?this.splitAt(r):null},join:function(e,t){var n=t||0;if(e&&e!==this){var r=e._segments,i=this.getLastSegment(),o=e.getLastSegment();if(!o)return this;i&&i._point.isClose(o._point,n)&&e.reverse();var a=e.getFirstSegment();if(i&&i._point.isClose(a._point,n))i.setHandleOut(a._handleOut),this._add(r.slice(1));else{var s=this.getFirstSegment();s&&s._point.isClose(a._point,n)&&e.reverse(),o=e.getLastSegment(),s&&s._point.isClose(o._point,n)?(s.setHandleIn(o._handleIn),this._add(r.slice(0,r.length-1),0)):this._add(r.slice())}e._closed&&this._add([r[0]]),e.remove()}var c=this.getFirstSegment(),u=this.getLastSegment();return c!==u&&c._point.isClose(u._point,n)&&(c.setHandleIn(u._handleIn),u.remove(),this.setClosed(!0)),this},reduce:function(e){for(var t=this.getCurves(),n=e&&e.simplify,r=n?1e-7:0,i=t.length-1;i>=0;i--){var o=t[i];!o.hasHandles()&&(!o.hasLength(r)||n&&o.isCollinear(o.getNext()))&&o.remove()}return this},reverse:function(){this._segments.reverse();for(var e=0,t=this._segments.length;e<t;e++){var n=this._segments[e],r=n._handleIn;n._handleIn=n._handleOut,n._handleOut=r,n._index=e}this._curves=null,this._changed(9)},flatten:function(e){for(var t=new H(this,e||.25,256,!0).parts,n=t.length,r=[],i=0;i<n;i++)r.push(new D(t[i].curve.slice(0,2)));!this._closed&&n>0&&r.push(new D(t[n-1].curve.slice(6))),this.setSegments(r)},simplify:function(e){var t=new V(this).fit(e||2.5);return t&&this.setSegments(t),!!t},smooth:function(e){var t=this,n=e||{},r=n.type||"asymmetric",i=this._segments,o=i.length,a=this._closed;function c(e,n){var r=e&&e.index;if(null!=r){var i=e.path;if(i&&i!==t)throw new Error(e._class+" "+r+" of "+i+" is not part of "+t);n&&e instanceof L&&r++}else r="number"==typeof e?e:n;return Math.min(r<0&&a?r%o:r<0?r+o:r,o-1)}var u=a&&n.from===s&&n.to===s,l=c(n.from,0),f=c(n.to,o-1);if(l>f)if(a)l-=o;else{var d=l;l=f,f=d}if(/^(?:asymmetric|continuous)$/.test(r)){var p="asymmetric"===r,h=Math.min,g=f-l+1,v=g-1,m=u?h(g,4):1,y=m,b=m,w=[];if(a||(y=h(1,l),b=h(1,o-f-1)),(v+=y+b)<=1)return;for(var _=0,x=l-y;_<=v;_++,x++)w[_]=i[(x<0?x+o:x)%o]._point;var O=w[0]._x+2*w[1]._x,S=w[0]._y+2*w[1]._y,E=2,C=v-1,k=[O],T=[S],j=[E],P=[],I=[];for(_=1;_<v;_++){var R=_<C,A=R?4:p?2:7,M=R?4:p?3:8,D=R?2:p?0:1,N=(R||p?1:2)/E;E=j[_]=A-N,O=k[_]=M*w[_]._x+D*w[_+1]._x-N*O,S=T[_]=M*w[_]._y+D*w[_+1]._y-N*S}P[C]=k[C]/j[C],I[C]=T[C]/j[C];for(_=v-2;_>=0;_--)P[_]=(k[_]-P[_+1])/j[_],I[_]=(T[_]-I[_+1])/j[_];P[v]=(3*w[v]._x-P[C])/2,I[v]=(3*w[v]._y-I[C])/2;_=y;var z=v-b;for(x=l;_<=z;_++,x++){var B=i[x<0?x+o:x],F=B._point,W=P[_]-F._x,H=I[_]-F._y;(u||_<z)&&B.setHandleOut(W,H),(u||_>y)&&B.setHandleIn(-W,-H)}}else for(_=l;_<=f;_++)i[_<0?_+o:_].smooth(n,!u&&_===l,!u&&_===f)},toShape:function(e){if(!this._closed)return null;var t,n,r,i,o,a,c,u=this._segments;function l(e,t){var n=u[e],r=n.getNext(),i=u[t],o=i.getNext();return n._handleOut.isZero()&&r._handleIn.isZero()&&i._handleOut.isZero()&&o._handleIn.isZero()&&r._point.subtract(n._point).isCollinear(o._point.subtract(i._point))}function f(e){var t=u[e],n=t.getNext(),r=t._handleOut,i=n._handleIn,o=.5522847498307936;if(r.isOrthogonal(i)){var a=t._point,s=n._point,c=new E(a,r,!0).intersect(new E(s,i,!0),!0);return c&&v.isZero(r.getLength()/c.subtract(a).getLength()-o)&&v.isZero(i.getLength()/c.subtract(s).getLength()-o)}return!1}function d(e,t){return u[e]._point.getDistance(u[t]._point)}if(!this.hasHandles()&&4===u.length&&l(0,2)&&l(1,3)&&(o=u[1],a=o.getPrevious(),c=o.getNext(),a._handleOut.isZero()&&o._handleIn.isZero()&&o._handleOut.isZero()&&c._handleIn.isZero()&&o._point.subtract(a._point).isOrthogonal(c._point.subtract(o._point)))?(t=P.Rectangle,n=new w(d(0,3),d(0,1)),i=u[1]._point.add(u[2]._point).divide(2)):8===u.length&&f(0)&&f(2)&&f(4)&&f(6)&&l(1,5)&&l(3,7)?(t=P.Rectangle,r=(n=new w(d(1,6),d(0,3))).subtract(new w(d(0,7),d(1,2))).divide(2),i=u[3]._point.add(u[4]._point).divide(2)):4===u.length&&f(0)&&f(1)&&f(2)&&f(3)&&(v.isZero(d(0,2)-d(1,3))?(t=P.Circle,r=d(0,2)/2):(t=P.Ellipse,r=new w(d(2,0)/2,d(3,1)/2)),i=u[1]._point),t){var p=this.getPosition(!0),h=new t({center:p,size:n,radius:r,insert:!1});return h.copyAttributes(this,!0),h._matrix.prepend(this._matrix),h.rotate(i.subtract(p).getAngle()+90),(e===s||e)&&h.insertAbove(this),h}return null},toPath:"#clone",compare:function e(t){if(!t||t instanceof W)return e.base.call(this,t);var n=this.getCurves(),r=t.getCurves(),i=n.length,o=r.length;if(!i||!o)return i==o;for(var a,s,c=n[0].getValues(),u=[],l=0,f=0,d=0;d<o;d++){var p=r[d].getValues();if(u.push(p),v=L.getOverlaps(c,p)){a=!d&&v[0][0]>0?o-1:d,s=v[0][1];break}}var h,g=Math.abs;for(p=u[a];c&&p;){var v;if(v=L.getOverlaps(c,p))if(g(v[0][0]-f)<1e-8){1===(f=v[1][0])&&(c=++l<i?n[l].getValues():null,f=0);var m=v[0][1];if(g(m-s)<1e-8){if(h||(h=[a,m]),1===(s=v[1][1])&&(++a>=o&&(a=0),p=u[a]||r[a].getValues(),s=0),!c)return h[0]===a&&h[1]===s;continue}}break}return!1},_hitTestSelf:function(e,t,n,r){var i,o,a,s,c,u,l=this,f=this.getStyle(),d=this._segments,p=d.length,h=this._closed,g=t._tolerancePadding,v=g,m=t.stroke&&f.hasStroke(),y=t.fill&&f.hasFill(),b=t.curves,w=m?f.getStrokeWidth()/2:y&&t.tolerance>0||b?0:null;function _(t,n){return e.subtract(t).divide(n).length<=1}function x(e,n,r){if(!t.selected||n.isSelected()){var i=e._point;if(n!==i&&(n=n.add(i)),_(n,v))return new M(r,l,{segment:e,point:n})}}function O(e,n){return(n||t.segments)&&x(e,e._point,"segment")||!n&&t.handles&&(x(e,e._handleIn,"handle-in")||x(e,e._handleOut,"handle-out"))}function S(e){s.add(e)}function E(t){var n,c=h||t._index>0&&t._index<p-1;return"round"===(c?i:o)?_(t._point,v):(s=new F({internal:!0,closed:!0}),c?t.isSmooth()||F._addBevelJoin(t,i,w,a,null,r,S,!0):"square"===o&&F._addSquareCap(t,o,w,null,r,S,!0),s.isEmpty()?void 0:s.contains(e)||(n=s.getNearestLocation(e))&&_(n.getPoint(),g))}if(null!==w&&(w>0?(i=f.getStrokeJoin(),o=f.getStrokeCap(),a=f.getMiterLimit(),v=v.add(F._getStrokePadding(w,r))):i=o="round"),!t.ends||t.segments||h){if(t.segments||t.handles)for(var C=0;C<p;C++)if(u=O(d[C]))return u}else if(u=O(d[0],!0)||O(d[p-1],!0))return u;if(null!==w){if(c=this.getNearestLocation(e)){var k=c.getTime();0===k||1===k&&p>1?E(c.getSegment())||(c=null):_(c.getPoint(),v)||(c=null)}if(!c&&"miter"===i&&p>1)for(C=0;C<p;C++){var T=d[C];if(e.getDistance(T._point)<=a*w&&E(T)){c=T.getLocation();break}}}return!c&&y&&this._contains(e)||c&&!m&&!b?new M("fill",this):c?new M(m?"stroke":"curve",this,{location:c,point:c.getPoint()}):null}},l.each(L._evaluateMethods,(function(e){this[e+"At"]=function(t){var n=this.getLocationAt(t);return n&&n[e]()}}),{beans:!1,getLocationOf:function(){for(var e=y.read(arguments),t=this.getCurves(),n=0,r=t.length;n<r;n++){var i=t[n].getLocationOf(e);if(i)return i}return null},getOffsetOf:function(){var e=this.getLocationOf.apply(this,arguments);return e?e.getOffset():null},getLocationAt:function(e){if("number"==typeof e){for(var t=this.getCurves(),n=0,r=0,i=t.length;r<i;r++){var o=n,a=t[r];if((n+=a.getLength())>e)return a.getLocationAt(e-o)}if(t.length>0&&e<=this.getLength())return new z(t[t.length-1],1)}else if(e&&e.getPath&&e.getPath()===this)return e;return null},getOffsetsWithTangent:function(){var e=y.read(arguments);if(e.isZero())return[];for(var t=[],n=0,r=this.getCurves(),i=0,o=r.length;i<o;i++){for(var a=r[i],s=a.getTimesWithTangent(e),c=0,u=s.length;c<u;c++){var l=n+a.getOffsetAtTime(s[c]);t.indexOf(l)<0&&t.push(l)}n+=a.length}return t}}),new function(){function e(e,t,n){var r,i,o,a,s,c,u,l,f=t._segments,d=f.length,p=new Array(6),h=!0;function g(t){if(n)t._transformCoordinates(n,p),r=p[0],i=p[1];else{var f=t._point;r=f._x,i=f._y}if(h)e.moveTo(r,i),h=!1;else{if(n)s=p[2],c=p[3];else{var d=t._handleIn;s=r+d._x,c=i+d._y}s===r&&c===i&&u===o&&l===a?e.lineTo(r,i):e.bezierCurveTo(u,l,s,c,r,i)}if(o=r,a=i,n)u=p[4],l=p[5];else{d=t._handleOut;u=o+d._x,l=a+d._y}}for(var v=0;v<d;v++)g(f[v]);t._closed&&d>0&&g(f[0])}return{_draw:function(t,n,r,i){var o=n.dontStart,a=n.dontFinish||n.clip,s=this.getStyle(),c=s.hasFill(),u=s.hasStroke(),l=s.getDashArray(),f=!de.support.nativeDash&&u&&l&&l.length;function d(e){return l[(e%f+f)%f]}if(o||t.beginPath(),(c||u&&!f||a)&&(e(t,this,i),this._closed&&t.closePath()),!a&&(c||u)&&(this._setStyles(t,n,r),c&&(t.fill(s.getFillRule()),t.shadowColor="rgba(0,0,0,0)"),u)){if(f){o||t.beginPath();for(var p,h=new H(this,.25,32,!1,i),g=h.length,v=-s.getDashOffset(),m=0;v>0;)v-=d(m--)+d(m--);for(;v<g;)p=v+d(m++),(v>0||p>0)&&h.drawPart(t,Math.max(v,0),Math.max(p,0)),v=p+d(m++)}t.stroke()}},_drawSelected:function(t,n){t.beginPath(),e(t,this,n),t.stroke(),function(e,t,n,r){if(!(r<=0))for(var i,o,a=r/2,s=r-2,c=a-1,u=new Array(6),l=0,f=t.length;l<f;l++){var d=t[l],p=d._selection;if(d._transformCoordinates(n,u),i=u[0],o=u[1],2&p&&g(2),4&p&&g(4),e.fillRect(i-a,o-a,r,r),s>0&&!(1&p)){var h=e.fillStyle;e.fillStyle="#ffffff",e.fillRect(i-c,o-c,s,s),e.fillStyle=h}}function g(t){var n=u[t],r=u[t+1];i==n&&o==r||(e.beginPath(),e.moveTo(i,o),e.lineTo(n,r),e.stroke(),e.beginPath(),e.arc(n,r,a,0,2*Math.PI,!0),e.fill())}}(t,this._segments,n,de.settings.handleSize)}}},new function(){function e(e){var t=e._segments;if(!t.length)throw new Error("Use a moveTo() command first");return t[t.length-1]}return{moveTo:function(){var e=this._segments;1===e.length&&this.removeSegment(0),e.length||this._add([new D(y.read(arguments))])},moveBy:function(){throw new Error("moveBy() is unsupported on Path items.")},lineTo:function(){this._add([new D(y.read(arguments))])},cubicCurveTo:function(){var t=arguments,n=y.read(t),r=y.read(t),i=y.read(t),o=e(this);o.setHandleOut(n.subtract(o._point)),this._add([new D(i,r.subtract(i))])},quadraticCurveTo:function(){var t=arguments,n=y.read(t),r=y.read(t),i=e(this)._point;this.cubicCurveTo(n.add(i.subtract(n).multiply(1/3)),n.add(r.subtract(n).multiply(1/3)),r)},curveTo:function(){var t=arguments,n=y.read(t),r=y.read(t),i=l.pick(l.read(t),.5),o=1-i,a=e(this)._point,s=n.subtract(a.multiply(o*o)).subtract(r.multiply(i*i)).divide(2*i*o);if(s.isNaN())throw new Error("Cannot put a curve through points with parameter = "+i);this.quadraticCurveTo(s,r)},arcTo:function(){var t,n,r,i,o=arguments,a=Math.abs,s=Math.sqrt,c=e(this),u=c._point,f=y.read(o),d=l.peek(o);if("boolean"==typeof(b=l.pick(d,!0)))var p=(x=u.add(f).divide(2)).add(x.subtract(u).rotate(b?-90:90));else if(l.remain(o)<=2)p=f,f=y.read(o);else if(!u.equals(f)){var h=w.read(o),g=v.isZero;if(g(h.width)||g(h.height))return this.lineTo(f);var m=l.read(o),b=!!l.read(o),_=!!l.read(o),x=u.add(f).divide(2),O=($=u.subtract(x).rotate(-m)).x,C=$.y,k=a(h.width),T=a(h.height),j=k*k,P=T*T,I=O*O,R=C*C,A=s(I/j+R/P);if(A>1&&(j=(k*=A)*k,P=(T*=A)*T),a(A=(j*P-j*R-P*I)/(j*R+P*I))<1e-12&&(A=0),A<0)throw new Error("Cannot create an arc with the given arguments");t=new y(k*C/T,-T*O/k).multiply((_===b?-1:1)*s(A)).rotate(m).add(x),n=(r=(i=(new S).translate(t).rotate(m).scale(k,T))._inverseTransform(u)).getDirectedAngle(i._inverseTransform(f)),!b&&n>0?n-=360:b&&n<0&&(n+=360)}if(p){var M=new E(u.add(p).divide(2),p.subtract(u).rotate(90),!0),N=new E(p.add(f).divide(2),f.subtract(p).rotate(90),!0),L=new E(u,f),z=L.getSide(p);if(!(t=M.intersect(N,!0))){if(!z)return this.lineTo(f);throw new Error("Cannot create an arc with the given arguments")}n=(r=u.subtract(t)).getDirectedAngle(f.subtract(t));var B=L.getSide(t,!0);0===B?n=z*a(n):z===B&&(n+=n<0?360:-360)}if(n){for(var F=1e-7,W=a(n),H=W>=360?4:Math.ceil((W-F)/90),V=n/H,U=V*Math.PI/360,q=4/3*Math.sin(U)/(1+Math.cos(U)),G=[],K=0;K<=H;K++){var $=f,Z=null;if(K<H&&(Z=r.rotate(90).multiply(q),i?($=i._transformPoint(r),Z=i._transformPoint(r.add(Z)).subtract($)):$=t.add(r)),K){var X=r.rotate(-90).multiply(q);i&&(X=i._transformPoint(r.add(X)).subtract($)),G.push(new D($,X,Z))}else c.setHandleOut(Z);r=r.rotate(V)}this._add(G)}},lineBy:function(){var t=y.read(arguments),n=e(this)._point;this.lineTo(n.add(t))},curveBy:function(){var t=arguments,n=y.read(t),r=y.read(t),i=l.read(t),o=e(this)._point;this.curveTo(o.add(n),o.add(r),i)},cubicCurveBy:function(){var t=arguments,n=y.read(t),r=y.read(t),i=y.read(t),o=e(this)._point;this.cubicCurveTo(o.add(n),o.add(r),o.add(i))},quadraticCurveBy:function(){var t=arguments,n=y.read(t),r=y.read(t),i=e(this)._point;this.quadraticCurveTo(i.add(n),i.add(r))},arcBy:function(){var t=arguments,n=e(this)._point,r=n.add(y.read(t)),i=l.pick(l.peek(t),!0);"boolean"==typeof i?this.arcTo(r,i):this.arcTo(r,n.add(y.read(t)))},closePath:function(e){this.setClosed(!0),this.join(this,e)}}},{_getBounds:function(e,t){var n=t.handle?"getHandleBounds":t.stroke?"getStrokeBounds":"getBounds";return F[n](this._segments,this._closed,this,e,t)},statics:{getBounds:function(e,t,n,r,i,o){var a=e[0];if(!a)return new x;var s=new Array(6),c=a._transformCoordinates(r,new Array(6)),u=c.slice(0,2),l=u.slice(),f=new Array(2);function d(e){e._transformCoordinates(r,s);for(var t=0;t<2;t++)L._addBounds(c[t],c[t+4],s[t+2],s[t],t,o?o[t]:0,u,l,f);var n=c;c=s,s=n}for(var p=1,h=e.length;p<h;p++)d(e[p]);return t&&d(a),new x(u[0],u[1],l[0]-u[0],l[1]-u[1])},getStrokeBounds:function(e,t,n,r,i){var o=n.getStyle(),a=o.hasStroke(),s=o.getStrokeWidth(),c=a&&n._getStrokeMatrix(r,i),u=a&&F._getStrokePadding(s,c),l=F.getBounds(e,t,n,r,i,u);if(!a)return l;var f=s/2,d=o.getStrokeJoin(),p=o.getStrokeCap(),h=o.getMiterLimit(),g=new x(new w(u));function v(e){l=l.include(e)}function m(e){l=l.unite(g.setCenter(e._point.transform(r)))}function y(e,t){"round"===t||e.isSmooth()?m(e):F._addBevelJoin(e,t,f,h,r,c,v)}function b(e,t){"round"===t?m(e):F._addSquareCap(e,t,f,r,c,v)}var _=e.length-(t?0:1);if(_>0){for(var O=1;O<_;O++)y(e[O],d);t?y(e[0],d):(b(e[0],p),b(e[e.length-1],p))}return l},_getStrokePadding:function(e,t){if(!t)return[e,e];var n=new y(e,0).transform(t),r=new y(0,e).transform(t),i=n.getAngleInRadians(),o=n.getLength(),a=r.getLength(),s=Math.sin(i),c=Math.cos(i),u=Math.tan(i),l=Math.atan2(a*u,o),f=Math.atan2(a,u*o);return[Math.abs(o*Math.cos(l)*c+a*Math.sin(l)*s),Math.abs(a*Math.sin(f)*c+o*Math.cos(f)*s)]},_addBevelJoin:function(e,t,n,r,i,o,a,s){var c=e.getCurve(),u=c.getPrevious(),l=c.getPoint1().transform(i),f=u.getNormalAtTime(1).multiply(n).transform(o),d=c.getNormalAtTime(0).multiply(n).transform(o),p=f.getDirectedAngle(d);if((p<0||p>=180)&&(f=f.negate(),d=d.negate()),s&&a(l),a(l.add(f)),"miter"===t){var h=new E(l.add(f),new y(-f.y,f.x),!0).intersect(new E(l.add(d),new y(-d.y,d.x),!0),!0);h&&l.getDistance(h)<=r*n&&a(h)}a(l.add(d))},_addSquareCap:function(e,t,n,r,i,o,a){var s=e._point.transform(r),c=e.getLocation(),u=c.getNormal().multiply(0===c.getTime()?n:-n).transform(i);"square"===t&&(a&&(o(s.subtract(u)),o(s.add(u))),s=s.add(u.rotate(-90))),o(s.add(u)),o(s.subtract(u))},getHandleBounds:function(e,t,n,r,i){var o,a,s=n.getStyle();if(i.stroke&&s.hasStroke()){var c=n._getStrokeMatrix(r,i),u=s.getStrokeWidth()/2,l=u;"miter"===s.getStrokeJoin()&&(l=u*s.getMiterLimit()),"square"===s.getStrokeCap()&&(l=Math.max(l,u*Math.SQRT2)),o=F._getStrokePadding(u,c),a=F._getStrokePadding(l,c)}for(var f=new Array(6),d=1/0,p=-d,h=d,g=p,v=0,m=e.length;v<m;v++){e[v]._transformCoordinates(r,f);for(var y=0;y<6;y+=2){var b=y?o:a,w=b?b[0]:0,_=b?b[1]:0,O=f[y],S=f[y+1],E=O-w,C=O+w,k=S-_,T=S+_;E<d&&(d=E),C>p&&(p=C),k<h&&(h=k),T>g&&(g=T)}}return new x(d,h,p-d,g-h)}}});F.inject({statics:new function(){var e=.5522847498307936,t=[new D([-1,0],[0,e],[0,-e]),new D([0,-1],[-e,0],[e,0]),new D([1,0],[0,-e],[0,e]),new D([0,1],[e,0],[-e,0])];function n(e,t,n){var r=l.getNamed(n),i=new F(r&&0==r.insert&&k.NO_INSERT);return i._add(e),i._closed=t,i.set(r,{insert:!0})}function r(e,r,i){for(var o=new Array(4),a=0;a<4;a++){var s=t[a];o[a]=new D(s._point.multiply(r).add(e),s._handleIn.multiply(r),s._handleOut.multiply(r))}return n(o,!0,i)}return{Line:function(){var e=arguments;return n([new D(y.readNamed(e,"from")),new D(y.readNamed(e,"to"))],!1,e)},Circle:function(){var e=arguments,t=y.readNamed(e,"center"),n=l.readNamed(e,"radius");return r(t,new w(n),e)},Rectangle:function(){var t,r=arguments,i=x.readNamed(r,"rectangle"),o=w.readNamed(r,"radius",0,{readNull:!0}),a=i.getBottomLeft(!0),s=i.getTopLeft(!0),c=i.getTopRight(!0),u=i.getBottomRight(!0);if(!o||o.isZero())t=[new D(a),new D(s),new D(c),new D(u)];else{var l=(o=w.min(o,i.getSize(!0).divide(2))).width,f=o.height,d=l*e,p=f*e;t=[new D(a.add(l,0),null,[-d,0]),new D(a.subtract(0,f),[0,p]),new D(s.add(0,f),null,[0,-p]),new D(s.add(l,0),[-d,0],null),new D(c.subtract(l,0),null,[d,0]),new D(c.add(0,f),[0,-p],null),new D(u.subtract(0,f),null,[0,p]),new D(u.subtract(l,0),[d,0])]}return n(t,!0,r)},RoundRectangle:"#Rectangle",Ellipse:function(){var e=arguments,t=P._readEllipse(e);return r(t.center,t.radius,e)},Oval:"#Ellipse",Arc:function(){var e=arguments,t=y.readNamed(e,"from"),n=y.readNamed(e,"through"),r=y.readNamed(e,"to"),i=l.getNamed(e),o=new F(i&&0==i.insert&&k.NO_INSERT);return o.moveTo(t),o.arcTo(n,r),o.set(i)},RegularPolygon:function(){for(var e=arguments,t=y.readNamed(e,"center"),r=l.readNamed(e,"sides"),i=l.readNamed(e,"radius"),o=360/r,a=r%3==0,s=new y(0,a?-i:i),c=a?-1:.5,u=new Array(r),f=0;f<r;f++)u[f]=new D(t.add(s.rotate((f+c)*o)));return n(u,!0,e)},Star:function(){for(var e=arguments,t=y.readNamed(e,"center"),r=2*l.readNamed(e,"points"),i=l.readNamed(e,"radius1"),o=l.readNamed(e,"radius2"),a=360/r,s=new y(0,-1),c=new Array(r),u=0;u<r;u++)c[u]=new D(t.add(s.rotate(a*u).multiply(u%2?o:i)));return n(c,!0,e)}}}});var W=B.extend({_class:"CompoundPath",_serializeFields:{children:[]},beans:!0,initialize:function(e){this._children=[],this._namedChildren={},this._initialize(e)||("string"==typeof e?this.setPathData(e):this.addChildren(Array.isArray(e)?e:arguments))},insertChildren:function e(t,n){var r=n,i=r[0];i&&"number"==typeof i[0]&&(r=[r]);for(var o=n.length-1;o>=0;o--){var a=r[o];r!==n||a instanceof F||(r=l.slice(r)),Array.isArray(a)?r[o]=new F({segments:a,insert:!1}):a instanceof W&&(r.splice.apply(r,[o,1].concat(a.removeChildren())),a.remove())}return e.base.call(this,t,r)},reduce:function e(t){for(var n=this._children,r=n.length-1;r>=0;r--){var i;(i=n[r].reduce(t)).isEmpty()&&i.remove()}return n.length?e.base.call(this):((i=new F(k.NO_INSERT)).copyAttributes(this),i.insertAbove(this),this.remove(),i)},isClosed:function(){for(var e=this._children,t=0,n=e.length;t<n;t++)if(!e[t]._closed)return!1;return!0},setClosed:function(e){for(var t=this._children,n=0,r=t.length;n<r;n++)t[n].setClosed(e)},getFirstSegment:function(){var e=this.getFirstChild();return e&&e.getFirstSegment()},getLastSegment:function(){var e=this.getLastChild();return e&&e.getLastSegment()},getCurves:function(){for(var e=this._children,t=[],n=0,r=e.length;n<r;n++)l.push(t,e[n].getCurves());return t},getFirstCurve:function(){var e=this.getFirstChild();return e&&e.getFirstCurve()},getLastCurve:function(){var e=this.getLastChild();return e&&e.getLastCurve()},getArea:function(){for(var e=this._children,t=0,n=0,r=e.length;n<r;n++)t+=e[n].getArea();return t},getLength:function(){for(var e=this._children,t=0,n=0,r=e.length;n<r;n++)t+=e[n].getLength();return t},getPathData:function(e,t){for(var n=this._children,r=[],i=0,o=n.length;i<o;i++){var a=n[i],s=a._matrix;r.push(a.getPathData(e&&!s.isIdentity()?e.appended(s):e,t))}return r.join("")},_hitTestChildren:function e(t,n,r){return e.base.call(this,t,n.class===F||"path"===n.type?n:l.set({},n,{fill:!1}),r)},_draw:function(e,t,n,r){var i=this._children;if(i.length){t=t.extend({dontStart:!0,dontFinish:!0}),e.beginPath();for(var o=0,a=i.length;o<a;o++)i[o].draw(e,t,r);if(!t.clip){this._setStyles(e,t,n);var s=this._style;s.hasFill()&&(e.fill(s.getFillRule()),e.shadowColor="rgba(0,0,0,0)"),s.hasStroke()&&e.stroke()}}},_drawSelected:function(e,t,n){for(var r=this._children,i=0,o=r.length;i<o;i++){var a=r[i],s=a._matrix;n[a._id]||a._drawSelected(e,s.isIdentity()?t:t.appended(s))}}},new function(){function e(e,t){var n=e._children;if(t&&!n.length)throw new Error("Use a moveTo() command first");return n[n.length-1]}return l.each(["lineTo","cubicCurveTo","quadraticCurveTo","curveTo","arcTo","lineBy","cubicCurveBy","quadraticCurveBy","curveBy","arcBy"],(function(t){this[t]=function(){var n=e(this,!0);n[t].apply(n,arguments)}}),{moveTo:function(){var t=e(this),n=t&&t.isEmpty()?t:new F(k.NO_INSERT);n!==t&&this.addChild(n),n.moveTo.apply(n,arguments)},moveBy:function(){var t=e(this,!0),n=t&&t.getLastSegment(),r=y.read(arguments);this.moveTo(n?r.add(n._point):r)},closePath:function(t){e(this,!0).closePath(t)}})},l.each(["reverse","flatten","simplify","smooth"],(function(e){this[e]=function(t){for(var n,r=this._children,i=0,o=r.length;i<o;i++)n=r[i][e](t)||n;return n}}),{}));B.inject(new function(){var e=Math.min,t=Math.max,n=Math.abs,r={unite:{1:!0,2:!0},intersect:{2:!0},subtract:{1:!0},exclude:{1:!0,"-1":!0}};function i(e){return e._children||[e]}function o(e,t){var n=e.clone(!1).reduce({simplify:!0}).transform(null,!0,!0);if(t){for(var r=i(n),o=0,a=r.length;o<a;o++){(e=r[o])._closed||e.isEmpty()||(e.closePath(1e-12),e.getFirstSegment().setHandleIn(0,0),e.getLastSegment().setHandleOut(0,0))}n=n.resolveCrossings().reorient("nonzero"===n.getFillRule(),!0)}return n}function a(e,t,n,r,i){var o=new W(k.NO_INSERT);return o.addChildren(e,!0),o=o.reduce({simplify:t}),i&&0==i.insert||o.insertAbove(r&&n.isSibling(r)&&n.getIndex()<r.getIndex()?r:n),o.copyAttributes(n,!0),o}function c(e){return e.hasOverlap()||e.isCrossing()}function u(e,t,n,s){if(s&&(0==s.trace||s.stroke)&&/^(subtract|intersect)$/.test(n))return f(e,t,n);var u=o(e,!0),d=t&&e!==t&&o(t,!0),p=r[n];p[n]=!0,d&&(p.subtract||p.exclude)^d.isClockwise()^u.isClockwise()&&d.reverse();var v,y=m(z.expand(u.getIntersections(d,c))),_=i(u),x=d&&i(d),O=[],S=[];function E(e){for(var t=0,n=e.length;t<n;t++){var r=e[t];l.push(O,r._segments),l.push(S,r.getCurves()),r._overlapsOnly=!0}}function C(e){for(var t=[],n=0,r=e&&e.length;n<r;n++)t.push(S[e[n]]);return t}if(y.length){E(_),x&&E(x);for(var k=new Array(S.length),T=0,j=S.length;T<j;T++)k[T]=S[T].getValues();var P=h.findCurveBoundsCollisions(k,k,0,!0),I={};for(T=0;T<S.length;T++){var R=S[T],A=R._path._id;(I[A]=I[A]||{})[R.getIndex()]={hor:C(P[T].hor),ver:C(P[T].ver)}}for(T=0,j=y.length;T<j;T++)b(y[T]._segment,u,d,I,p);for(T=0,j=O.length;T<j;T++){var M=O[T],D=M._intersection;M._winding||b(M,u,d,I,p),D&&D._overlap||(M._path._overlapsOnly=!1)}v=w(O,p)}else v=g(x?_.concat(x):_.slice(),(function(e){return!!p[e]}));return a(v,!0,e,t,s)}function f(e,t,n){var r=o(e),i=o(t),s=r.getIntersections(i,c),u="subtract"===n,l="divide"===n,f={},d=[];function p(e){if(!f[e._id]&&(l||i.contains(e.getPointAt(e.getLength()/2))^u))return d.unshift(e),f[e._id]=!0}for(var h=s.length-1;h>=0;h--){var g=s[h].split();g&&(p(g)&&g.getFirstSegment().setHandleIn(0,0),r.getLastSegment().setHandleOut(0,0))}return p(r),a(d,!1,e,t)}function d(e,t){for(var n=e;n;){if(n===t)return;n=n._previous}for(;e._next&&e._next!==t;)e=e._next;if(!e._next){for(;t._previous;)t=t._previous;e._next=t,t._previous=e}}function p(e){for(var t=e.length-1;t>=0;t--)e[t].clearHandles()}function g(e,t,r){var i=e&&e.length;if(i){var o=l.each(e,(function(e,t){this[e._id]={container:null,winding:e.isClockwise()?1:-1,index:t}}),{}),a=e.slice().sort((function(e,t){return n(t.getArea())-n(e.getArea())})),s=a[0],c=h.findItemBoundsCollisions(a,null,v.GEOMETRIC_EPSILON);null==r&&(r=s.isClockwise());for(var u=0;u<i;u++){var f=a[u],d=o[f._id],p=0,g=c[u];if(g)for(var m=null,y=g.length-1;y>=0;y--)if(g[y]<u){m=m||f.getInteriorPoint();var b=a[g[y]];if(b.contains(m)){var w=o[b._id];p=w.winding,d.winding+=p,d.container=w.exclude?w.container:b;break}}if(t(d.winding)===t(p))d.exclude=!0,e[d.index]=null;else{var _=d.container;f.setClockwise(_?!_.isClockwise():r)}}}return e}function m(e,t,n){var r,i,o,a=t&&[],s=!1,c=n||[],u=n&&{};function l(e){return e._path._id+"."+e._segment1._index}for(var f=(n&&n.length)-1;f>=0;f--){(h=n[f])._path&&(u[l(h)]=!0)}for(f=e.length-1;f>=0;f--){var h,g,v=e[f],m=v._time,y=m,b=t&&!t(v);if((h=v._curve)&&(h!==i?(s=!h.hasHandles()||u&&u[l(h)],r=[],o=null,i=h):o>=1e-8&&(m/=o)),b)r&&r.push(v);else{if(t&&a.unshift(v),o=y,m<1e-8)g=h._segment1;else if(m>1-1e-8)g=h._segment2;else{var w=h.divideAtTime(m,!0);s&&c.push(h,w),g=w._segment1;for(var _=r.length-1;_>=0;_--){var x=r[_];x._time=(x._time-m)/(1-m)}}v._setSegment(g);var O=g._intersection,S=v._intersection;if(O){d(O,S);for(var E=O;E;)d(E._intersection,O),E=E._next}else g._intersection=S}}return n||p(c),a||e}function y(r,i,o,a,s){var c,u,l=Array.isArray(i)?i:i[o?"hor":"ver"],f=o?1:0,d=1^f,p=[r.x,r.y],h=p[f],g=p[d],v=h-1e-9,m=h+1e-9,b=0,w=0,_=0,x=0,O=!1,S=!1,E=1,C=[];function k(n){var u=n[d+0],l=n[d+6];if(!(g<e(u,l)||g>t(u,l))){var p=n[f+0],b=n[f+2],w=n[f+4],S=n[f+6];if(u!==l){var k=g===u?0:g===l||v>t(p,b,w,S)||m<e(p,b,w,S)?1:L.solveCubic(n,d,g,C,0,1)>0?C[0]:1,T=0===k?p:1===k?S:L.getPoint(n,k)[o?"y":"x"],j=u>l?1:-1,P=c[d]>c[d+6]?1:-1,I=c[f+6];return g!==u?(T<v?_+=j:T>m?x+=j:O=!0,T>h-1e-6&&T<h+1e-6&&(E/=2)):(j!==P?p<v?_+=j:p>m&&(x+=j):p!=I&&(I<m&&T>m?(x+=j,O=!0):I>v&&T<v&&(_+=j,O=!0)),E/=4),c=n,!s&&T>v&&T<m&&0===L.getTangent(n,k)[o?"x":"y"]&&y(r,i,!o,a,!0)}(p<m&&S>v||S<m&&p>v)&&(O=!0)}}function T(n){var r=n[d+0],i=n[d+2],a=n[d+4],s=n[d+6];if(g<=t(r,i,a,s)&&g>=e(r,i,a,s))for(var c,u=n[f+0],l=n[f+2],p=n[f+4],h=n[f+6],y=v>t(u,l,p,h)||m<e(u,l,p,h)?[n]:L.getMonoCurves(n,o),b=0,w=y.length;b<w;b++)if(c=k(y[b]))return c}for(var j=0,P=l.length;j<P;j++){var I,R=l[j],A=R._path,M=R.getValues();if(!(j&&l[j-1]._path===A||(c=null,A._closed||(u=L.getValues(A.getLastCurve().getSegment2(),R.getSegment1(),null,!a))[d]!==u[d+6]&&(c=u),c))){c=M;for(var D=A.getLastCurve();D&&D!==R;){var N=D.getValues();if(N[d]!==N[d+6]){c=N;break}D=D.getPrevious()}}if(I=T(M))return I;if(j+1===P||l[j+1]._path!==A){if(u&&(I=T(u)))return I;!O||_||x||(_=x=A.isClockwise(a)^o?1:-1),b+=_,w+=x,_=x=0,O&&(S=!0,O=!1),u=null}}return b=n(b),w=n(w),{winding:t(b,w),windingL:b,windingR:w,quality:E,onPath:S}}function b(e,t,r,i,o){var a=[],s=e,c=0;do{if(b=e.getCurve()){var u=b.getLength();a.push({segment:e,curve:b,length:u}),c+=u}e=e.getNext()}while(e&&!e._intersection&&e!==s);for(var l=[.5,.25,.75],f={winding:0,quality:-1},d=0;d<l.length&&f.quality<.5;d++){u=c*l[d];for(var p=0,h=a.length;p<h;p++){var g=a[p],m=g.length;if(u<=m){var b,w=(b=g.curve)._path,_=w._parent,x=_ instanceof W?_:w,O=v.clamp(b.getTimeAt(u),.001,.999),S=b.getPointAtTime(O),E=n(b.getTangentAtTime(O).y)<Math.SQRT1_2,C=null;if(o.subtract&&r){var k=(x===t?r:t)._getWinding(S,E,!0);if(x===t&&k.winding||x===r&&!k.winding){if(k.quality<1)continue;C={winding:0,quality:1}}}(C=C||y(S,i[w._id][b.getIndex()],E,!0)).quality>f.quality&&(f=C);break}u-=m}}for(p=a.length-1;p>=0;p--)a[p].segment._winding=f}function w(e,t){var n,r=[];function i(e){var n;return!(!e||e._visited||t&&(!t[(n=e._winding||{}).winding]||t.unite&&2===n.winding&&n.windingL&&n.windingR))}function o(e){if(e)for(var t=0,r=n.length;t<r;t++)if(e===n[t])return!0;return!1}function a(e){for(var t=e._segments,n=0,r=t.length;n<r;n++)t[n]._visited=!0}function s(e,t){var r=e._intersection,a=r,s=[];function c(r,a){for(;r&&r!==a;){var c=r._segment,u=c&&c._path;if(u){var l=c.getNext()||u.getFirstSegment(),f=l._intersection;c!==e&&(o(c)||o(l)||l&&i(c)&&(i(l)||f&&i(f._segment)))&&s.push(c),t&&n.push(c)}r=r._next}}if(t&&(n=[e]),r){for(c(r);r&&r._previous;)r=r._previous;c(r,a)}return s}e.sort((function(e,t){var n=e._intersection,r=t._intersection,i=!(!n||!n._overlap),o=!(!r||!r._overlap),a=e._path,s=t._path;return i^o?i?1:-1:!n^!r?n?1:-1:a!==s?a._id-s._id:e._index-t._index}));for(var c=0,u=e.length;c<u;c++){var l,f,d,p=e[c],h=i(p),g=null,v=!1,m=!0,y=[];if(h&&p._path._overlapsOnly){var b=p._path,w=p._intersection._segment._path;b.compare(w)&&(b.getArea()&&r.push(b.clone(!1)),a(b),a(w),h=!1)}for(;h;){var _=!g,x=s(p,_),O=x.shift(),S=!(v=!_&&(o(p)||o(O)))&&O;if(_&&(g=new F(k.NO_INSERT),l=null),v){(p.isFirst()||p.isLast())&&(m=p._path._closed),p._visited=!0;break}if(S&&l&&(y.push(l),l=null),l||(S&&x.push(p),l={start:g._segments.length,crossings:x,visited:f=[],handleIn:d}),S&&(p=O),!i(p)){g.removeSegments(l.start);for(var E=0,C=f.length;E<C;E++)f[E]._visited=!1;f.length=0;do{(p=l&&l.crossings.shift())&&p._path||(p=null,(l=y.pop())&&(f=l.visited,d=l.handleIn))}while(l&&!i(p));if(!p)break}var T=p.getNext();g.add(new D(p._point,d,T&&p._handleOut)),p._visited=!0,f.push(p),p=T||p._path.getFirstSegment(),d=T&&T._handleIn}v&&(m&&(g.getFirstSegment().setHandleIn(d),g.setClosed(m)),0!==g.getArea()&&r.push(g))}return r}return{_getWinding:function(e,t,n){return y(e,this.getCurves(),t,n)},unite:function(e,t){return u(this,e,"unite",t)},intersect:function(e,t){return u(this,e,"intersect",t)},subtract:function(e,t){return u(this,e,"subtract",t)},exclude:function(e,t){return u(this,e,"exclude",t)},divide:function(e,t){return t&&(0==t.trace||t.stroke)?f(this,e,"divide"):a([this.subtract(e,t),this.intersect(e,t)],!0,this,e,t)},resolveCrossings:function(){var e=this._children,t=e||[this];function n(e,t){var n=e&&e._intersection;return n&&n._overlap&&n._path===t}var r=!1,i=!1,o=this.getIntersections(null,(function(e){return e.hasOverlap()&&(r=!0)||e.isCrossing()&&(i=!0)})),a=r&&i&&[];if(o=z.expand(o),r)for(var s=m(o,(function(e){return e.hasOverlap()}),a),c=s.length-1;c>=0;c--){var u=s[c],f=u._path,d=u._segment,h=d.getPrevious(),g=d.getNext();n(h,f)&&n(g,f)&&(d.remove(),h._handleOut._set(0,0),g._handleIn._set(0,0),h===d||h.getCurve().hasLength()||(g._handleIn.set(h._handleIn),h.remove()))}i&&(m(o,r&&function(e){var t=e.getCurve(),n=e.getSegment(),r=e._intersection,i=r._curve,o=r._segment;if(t&&i&&t._path&&i._path)return!0;n&&(n._intersection=null),o&&(o._intersection=null)},a),a&&p(a),t=w(l.each(t,(function(e){l.push(this,e._segments)}),[])));var v,y=t.length;return y>1&&e?(t!==e&&this.setChildren(t),v=this):1!==y||e||(t[0]!==this&&this.setSegments(t[0].removeSegments()),v=this),v||((v=new W(k.NO_INSERT)).addChildren(t),(v=v.reduce()).copyAttributes(this),this.replaceWith(v)),v},reorient:function(e,t){var n=this._children;return n&&n.length?this.setChildren(g(this.removeChildren(),(function(t){return!!(e?t:1&t)}),t)):t!==s&&this.setClockwise(t),this},getInteriorPoint:function(){var n=this.getBounds().getCenter(!0);if(!this.contains(n)){for(var r=this.getCurves(),i=n.y,o=[],a=[],s=0,c=r.length;s<c;s++){var u=r[s].getValues(),l=u[1],f=u[3],d=u[5],p=u[7];if(i>=e(l,f,d,p)&&i<=t(l,f,d,p))for(var h=L.getMonoCurves(u),g=0,v=h.length;g<v;g++){var m=h[g],y=m[1],b=m[7];if(y!==b&&(i>=y&&i<=b||i>=b&&i<=y)){var w=i===y?m[0]:i===b?m[6]:1===L.solveCubic(m,1,i,a,0,1)?L.getPoint(m,a[0]).x:(m[0]+m[6])/2;o.push(w)}}}o.length>1&&(o.sort((function(e,t){return e-t})),n.x=(o[0]+o[1])/2)}return n}}});var H=l.extend({_class:"PathFlattener",initialize:function(e,t,n,r,i){var o,a=[],s=[],c=0,u=1/(n||32),l=e._segments,f=l[0];function d(e,n){var o=L.getValues(e,n,i);a.push(o),function e(n,i,o,a){if(!(a-o>u)||r&&L.isStraight(n)||L.isFlatEnough(n,t||.25)){var l=n[6]-n[0],f=n[7]-n[1],d=Math.sqrt(l*l+f*f);d>0&&(c+=d,s.push({offset:c,curve:n,index:i,time:a}))}else{var p=L.subdivide(n,.5),h=(o+a)/2;e(p[0],i,o,h),e(p[1],i,h,a)}}(o,e._index,0,1)}for(var p=1,h=l.length;p<h;p++)d(f,o=l[p]),f=o;e._closed&&d(o||f,l[0]),this.curves=a,this.parts=s,this.length=c,this.index=0},_get:function(e){for(var t,n=this.parts,r=n.length,i=this.index;t=i,i&&!(n[--i].offset<e););for(;t<r;t++){var o=n[t];if(o.offset>=e){this.index=t;var a=n[t-1],s=a&&a.index===o.index?a.time:0,c=a?a.offset:0;return{index:o.index,time:s+(o.time-s)*(e-c)/(o.offset-c)}}}return{index:n[r-1].index,time:1}},drawPart:function(e,t,n){for(var r=this._get(t),i=this._get(n),o=r.index,a=i.index;o<=a;o++){var s=L.getPart(this.curves[o],o===r.index?r.time:0,o===i.index?i.time:1);o===r.index&&e.moveTo(s[0],s[1]),e.bezierCurveTo.apply(e,s.slice(2))}}},l.each(L._evaluateMethods,(function(e){this[e+"At"]=function(t){var n=this._get(t);return L[e](this.curves[n.index],n.time)}}),{})),V=l.extend({initialize:function(e){for(var t,n=this.points=[],r=e._segments,i=e._closed,o=0,a=r.length;o<a;o++){var s=r[o].point;t&&t.equals(s)||n.push(t=s.clone())}i&&(n.unshift(n[n.length-1]),n.push(n[1])),this.closed=i},fit:function(e){var t=this.points,n=t.length,r=null;return n>0&&(r=[new D(t[0])],n>1&&(this.fitCubic(r,e,0,n-1,t[1].subtract(t[0]),t[n-2].subtract(t[n-1])),this.closed&&(r.shift(),r.pop()))),r},fitCubic:function(e,t,n,r,i,o){var a=this.points;if(r-n!=1){for(var s,c=this.chordLengthParameterize(n,r),u=Math.max(t,t*t),l=!0,f=0;f<=4;f++){var d=this.generateBezier(n,r,c,i,o),p=this.findMaxError(n,r,d,c);if(p.error<t&&l)return void this.addCurve(e,d);if(s=p.index,p.error>=u)break;l=this.reparameterize(n,r,c,d),u=p.error}var h=a[s-1].subtract(a[s+1]);this.fitCubic(e,t,n,s,i,h),this.fitCubic(e,t,s,r,h.negate(),o)}else{var g=a[n],v=a[r],m=g.getDistance(v)/3;this.addCurve(e,[g,g.add(i.normalize(m)),v.add(o.normalize(m)),v])}},addCurve:function(e,t){e[e.length-1].setHandleOut(t[1].subtract(t[0])),e.push(new D(t[3],t[2].subtract(t[3])))},generateBezier:function(e,t,n,r,i){for(var o=Math.abs,a=this.points,s=a[e],c=a[t],u=[[0,0],[0,0]],l=[0,0],f=0,d=t-e+1;f<d;f++){var p=n[f],h=1-p,g=3*p*h,v=h*h*h,m=g*h,y=g*p,b=p*p*p,w=r.normalize(m),_=i.normalize(y),x=a[e+f].subtract(s.multiply(v+m)).subtract(c.multiply(y+b));u[0][0]+=w.dot(w),u[0][1]+=w.dot(_),u[1][0]=u[0][1],u[1][1]+=_.dot(_),l[0]+=w.dot(x),l[1]+=_.dot(x)}var O,S,E=u[0][0]*u[1][1]-u[1][0]*u[0][1];if(o(E)>1e-12){var C=u[0][0]*l[1]-u[1][0]*l[0];O=(l[0]*u[1][1]-l[1]*u[0][1])/E,S=C/E}else{var k=u[0][0]+u[0][1],T=u[1][0]+u[1][1];O=S=o(k)>1e-12?l[0]/k:o(T)>1e-12?l[1]/T:0}var j,P,I=c.getDistance(s),R=1e-12*I;if(O<R||S<R)O=S=I/3;else{var A=c.subtract(s);j=r.normalize(O),P=i.normalize(S),j.dot(A)-P.dot(A)>I*I&&(O=S=I/3,j=P=null)}return[s,s.add(j||r.normalize(O)),c.add(P||i.normalize(S)),c]},reparameterize:function(e,t,n,r){for(var i=e;i<=t;i++)n[i-e]=this.findRoot(r,this.points[i],n[i-e]);i=1;for(var o=n.length;i<o;i++)if(n[i]<=n[i-1])return!1;return!0},findRoot:function(e,t,n){for(var r=[],i=[],o=0;o<=2;o++)r[o]=e[o+1].subtract(e[o]).multiply(3);for(o=0;o<=1;o++)i[o]=r[o+1].subtract(r[o]).multiply(2);var a=this.evaluate(3,e,n),s=this.evaluate(2,r,n),c=this.evaluate(1,i,n),u=a.subtract(t),l=s.dot(s)+u.dot(c);return v.isMachineZero(l)?n:n-u.dot(s)/l},evaluate:function(e,t,n){for(var r=t.slice(),i=1;i<=e;i++)for(var o=0;o<=e-i;o++)r[o]=r[o].multiply(1-n).add(r[o+1].multiply(n));return r[0]},chordLengthParameterize:function(e,t){for(var n=[0],r=e+1;r<=t;r++)n[r-e]=n[r-e-1]+this.points[r].getDistance(this.points[r-1]);r=1;for(var i=t-e;r<=i;r++)n[r]/=n[i];return n},findMaxError:function(e,t,n,r){for(var i=Math.floor((t-e+1)/2),o=0,a=e+1;a<t;a++){var s=this.evaluate(3,n,r[a-e]).subtract(this.points[a]),c=s.x*s.x+s.y*s.y;c>=o&&(o=c,i=a)}return{error:o,index:i}}}),U=k.extend({_class:"TextItem",_applyMatrix:!1,_canApplyMatrix:!1,_serializeFields:{content:null},_boundsOptions:{stroke:!1,handle:!1},initialize:function(e){this._content="",this._lines=[];var t=e&&l.isPlainObject(e)&&e.x===s&&e.y===s;this._initialize(t&&e,!t&&y.read(arguments))},_equals:function(e){return this._content===e._content},copyContent:function(e){this.setContent(e._content)},getContent:function(){return this._content},setContent:function(e){this._content=""+e,this._lines=this._content.split(/\r\n|\n|\r/gm),this._changed(521)},isEmpty:function(){return!this._content},getCharacterStyle:"#getStyle",setCharacterStyle:"#setStyle",getParagraphStyle:"#getStyle",setParagraphStyle:"#setStyle"}),q=U.extend({_class:"PointText",initialize:function(){U.apply(this,arguments)},getPoint:function(){var e=this._matrix.getTranslation();return new b(e.x,e.y,this,"setPoint")},setPoint:function(){var e=y.read(arguments);this.translate(e.subtract(this._matrix.getTranslation()))},_draw:function(e,t,n){if(this._content){this._setStyles(e,t,n);var r=this._lines,i=this._style,o=i.hasFill(),a=i.hasStroke(),s=i.getLeading(),c=e.shadowColor;e.font=i.getFontStyle(),e.textAlign=i.getJustification();for(var u=0,l=r.length;u<l;u++){e.shadowColor=c;var f=r[u];o&&(e.fillText(f,0,0),e.shadowColor="rgba(0,0,0,0)"),a&&e.strokeText(f,0,0),e.translate(0,s)}}},_getBounds:function(e,t){var n=this._style,r=this._lines,i=r.length,o=n.getJustification(),a=n.getLeading(),s=this.getView().getTextWidth(n.getFontStyle(),r),c=0;"left"!==o&&(c-=s/("center"===o?2:1));var u=new x(c,i?-.75*a:0,s,i*a);return e?e._transformBounds(u,u):u}}),G=l.extend(new function(){var e,t={gray:["gray"],rgb:["red","green","blue"],hsb:["hue","saturation","brightness"],hsl:["hue","saturation","lightness"],gradient:["gradient","origin","destination","highlight"]},n={},r={transparent:[0,0,0,0]};function i(t){var n,i=t.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i)||t.match(/^#([\da-f])([\da-f])([\da-f])([\da-f])?$/i),o="rgb";if(i){var a=i[4]?4:3;n=new Array(a);for(var s=0;s<a;s++){var u=i[s+1];n[s]=parseInt(1==u.length?u+u:u,16)/255}}else if(i=t.match(/^(rgb|hsl)a?\((.*)\)$/)){o=i[1],n=i[2].trim().split(/[,\s]+/g);for(var l="hsl"===o,f=(s=0,Math.min(n.length,4));s<f;s++){var d=n[s];u=parseFloat(d);if(l)if(0===s){var p=d.match(/([a-z]*)$/)[1];u*={turn:360,rad:180/Math.PI,grad:.9}[p]||1}else s<3&&(u/=100);else s<3&&(u/=/%$/.test(d)?100:255);n[s]=u}}else{var h=r[t];if(!h)if(c){e||((e=ce.getContext(1,1)).globalCompositeOperation="copy"),e.fillStyle="rgba(0,0,0,0)",e.fillStyle=t,e.fillRect(0,0,1,1);var g=e.getImageData(0,0,1,1).data;h=r[t]=[g[0]/255,g[1]/255,g[2]/255]}else h=[0,0,0];n=h.slice()}return[o,n]}var o=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]],a={"rgb-hsb":function(e,t,n){var r=Math.max(e,t,n),i=r-Math.min(e,t,n);return[0===i?0:60*(r==e?(t-n)/i+(t<n?6:0):r==t?(n-e)/i+2:(e-t)/i+4),0===r?0:i/r,r]},"hsb-rgb":function(e,t,n){var r,i=(e=(e/60%6+6)%6)-(r=Math.floor(e)),a=[n,n*(1-t),n*(1-t*i),n*(1-t*(1-i))];return[a[(r=o[r])[0]],a[r[1]],a[r[2]]]},"rgb-hsl":function(e,t,n){var r=Math.max(e,t,n),i=Math.min(e,t,n),o=r-i,a=0===o,s=(r+i)/2;return[a?0:60*(r==e?(t-n)/o+(t<n?6:0):r==t?(n-e)/o+2:(e-t)/o+4),a?0:s<.5?o/(r+i):o/(2-r-i),s]},"hsl-rgb":function(e,t,n){if(0===t)return[n,n,n];for(var r=[(e=(e/360%1+1)%1)+1/3,e,e-1/3],i=n<.5?n*(1+t):n+t-n*t,o=2*n-i,a=[],s=0;s<3;s++){var c=r[s];c<0&&(c+=1),c>1&&(c-=1),a[s]=6*c<1?o+6*(i-o)*c:2*c<1?i:3*c<2?o+(i-o)*(2/3-c)*6:o}return a},"rgb-gray":function(e,t,n){return[.2989*e+.587*t+.114*n]},"gray-rgb":function(e){return[e,e,e]},"gray-hsb":function(e){return[0,0,e]},"gray-hsl":function(e){return[0,0,e]},"gradient-rgb":function(){return[]},"rgb-gradient":function(){return[]}};return l.each(t,(function(e,r){n[r]=[],l.each(e,(function(e,i){var o=l.capitalize(e),a=/^(hue|saturation)$/.test(e),s=n[r][i]="gradient"===r?"gradient"===e?function(e){var t=this._components[0];return t!==(e=K.read(Array.isArray(e)?e:arguments,0,{readNull:!0}))&&(t&&t._removeOwner(this),e&&e._addOwner(this)),e}:function(){return y.read(arguments,0,{readNull:"highlight"===e,clone:!0})}:function(e){return null==e||isNaN(e)?0:+e};this["get"+o]=function(){return this._type===r||a&&/^hs[bl]$/.test(this._type)?this._components[i]:this._convert(r)[i]},this["set"+o]=function(e){this._type===r||a&&/^hs[bl]$/.test(this._type)||(this._components=this._convert(r),this._properties=t[r],this._type=r),this._components[i]=s.call(this,e),this._changed()}}),this)}),{_class:"Color",_readIndex:!0,initialize:function e(r){var o,a,s,c,u=arguments,f=this.__read,d=0;Array.isArray(r)&&(r=(u=r)[0]);var p=null!=r&&typeof r;if("string"===p&&r in t&&(o=r,r=u[1],Array.isArray(r)?(a=r,s=u[2]):(f&&(d=1),u=l.slice(u,1),p=typeof r)),!a){if(c="number"===p?u:"object"===p&&null!=r.length?r:null){o||(o=c.length>=3?"rgb":"gray");var h=t[o].length;s=c[h],f&&(d+=c===arguments?h+(null!=s?1:0):1),c.length>h&&(c=l.slice(c,0,h))}else if("string"===p){var g=i(r);o=g[0],4===(a=g[1]).length&&(s=a[3],a.length--)}else if("object"===p)if(r.constructor===e){if(o=r._type,a=r._components.slice(),s=r._alpha,"gradient"===o)for(var v=1,m=a.length;v<m;v++){var y=a[v];y&&(a[v]=y.clone())}}else if(r.constructor===K)o="gradient",c=u;else{var b=t[o="hue"in r?"lightness"in r?"hsl":"hsb":"gradient"in r||"stops"in r||"radial"in r?"gradient":"gray"in r?"gray":"rgb"],w=n[o];this._components=a=[];for(v=0,m=b.length;v<m;v++){null==(_=r[b[v]])&&!v&&"gradient"===o&&"stops"in r&&(_={stops:r.stops,radial:r.radial}),null!=(_=w[v].call(this,_))&&(a[v]=_)}s=r.alpha}f&&o&&(d=1)}if(this._type=o||"rgb",!a){this._components=a=[];for(v=0,m=(w=n[this._type]).length;v<m;v++){var _;null!=(_=w[v].call(this,c&&c[v]))&&(a[v]=_)}}return this._components=a,this._properties=t[this._type],this._alpha=s,f&&(this.__read=d),this},set:"#initialize",_serialize:function(e,t){var n=this.getComponents();return l.serialize(/^(gray|rgb)$/.test(this._type)?n:[this._type].concat(n),e,!0,t)},_changed:function(){this._canvasStyle=null,this._owner&&(this._setter?this._owner[this._setter](this):this._owner._changed(129))},_convert:function(e){var t;return this._type===e?this._components.slice():(t=a[this._type+"-"+e])?t.apply(this,this._components):a["rgb-"+e].apply(this,a[this._type+"-rgb"].apply(this,this._components))},convert:function(e){return new G(e,this._convert(e),this._alpha)},getType:function(){return this._type},setType:function(e){this._components=this._convert(e),this._properties=t[e],this._type=e},getComponents:function(){var e=this._components.slice();return null!=this._alpha&&e.push(this._alpha),e},getAlpha:function(){return null!=this._alpha?this._alpha:1},setAlpha:function(e){this._alpha=null==e?null:Math.min(Math.max(e,0),1),this._changed()},hasAlpha:function(){return null!=this._alpha},equals:function(e){var t=l.isPlainValue(e,!0)?G.read(arguments):e;return t===this||t&&this._class===t._class&&this._type===t._type&&this.getAlpha()===t.getAlpha()&&l.equals(this._components,t._components)||!1},toString:function(){for(var e=this._properties,t=[],n="gradient"===this._type,r=g.instance,i=0,o=e.length;i<o;i++){var a=this._components[i];null!=a&&t.push(e[i]+": "+(n?a:r.number(a)))}return null!=this._alpha&&t.push("alpha: "+r.number(this._alpha)),"{ "+t.join(", ")+" }"},toCSS:function(e){var t=this._convert("rgb"),n=e||null==this._alpha?1:this._alpha;function r(e){return Math.round(255*(e<0?0:e>1?1:e))}return t=[r(t[0]),r(t[1]),r(t[2])],n<1&&t.push(n<0?0:n),e?"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+t[2]).toString(16).slice(1):(4==t.length?"rgba(":"rgb(")+t.join(",")+")"},toCanvasStyle:function(e,t){if(this._canvasStyle)return this._canvasStyle;if("gradient"!==this._type)return this._canvasStyle=this.toCSS();var n,r=this._components,i=r[0],o=i._stops,a=r[1],s=r[2],c=r[3],u=t&&t.inverted();if(u&&(a=u._transformPoint(a),s=u._transformPoint(s),c&&(c=u._transformPoint(c))),i._radial){var l=s.getDistance(a);if(c){var f=c.subtract(a);f.getLength()>l&&(c=a.add(f.normalize(l-.1)))}var d=c||a;n=e.createRadialGradient(d.x,d.y,0,a.x,a.y,l)}else n=e.createLinearGradient(a.x,a.y,s.x,s.y);for(var p=0,h=o.length;p<h;p++){var g=o[p],v=g._offset;n.addColorStop(null==v?p/(h-1):v,g._color.toCanvasStyle())}return this._canvasStyle=n},transform:function(e){if("gradient"===this._type){for(var t=this._components,n=1,r=t.length;n<r;n++){var i=t[n];e._transformPoint(i,i,!0)}this._changed()}},statics:{_types:t,random:function(){var e=Math.random;return new G(e(),e(),e())},_setOwner:function(e,t,n){return e&&(e._owner&&t&&e._owner!==t&&(e=e.clone()),!e._owner^!t&&(e._owner=t||null,e._setter=n||null)),e}}})},new function(){return l.each({add:function(e,t){return e+t},subtract:function(e,t){return e-t},multiply:function(e,t){return e*t},divide:function(e,t){return e/t}},(function(e,t){this[t]=function(t){t=G.read(arguments);for(var n=this._type,r=this._components,i=t._convert(n),o=0,a=r.length;o<a;o++)i[o]=e(r[o],i[o]);return new G(n,i,null!=this._alpha?e(this._alpha,t.getAlpha()):null)}}),{})}),K=l.extend({_class:"Gradient",initialize:function(e,t){this._id=m.get(),e&&l.isPlainObject(e)&&(this.set(e),e=t=null),null==this._stops&&this.setStops(e||["white","black"]),null==this._radial&&this.setRadial("string"==typeof t&&"radial"===t||t||!1)},_serialize:function(e,t){return t.add(this,(function(){return l.serialize([this._stops,this._radial],e,!0,t)}))},_changed:function(){for(var e=0,t=this._owners&&this._owners.length;e<t;e++)this._owners[e]._changed()},_addOwner:function(e){this._owners||(this._owners=[]),this._owners.push(e)},_removeOwner:function(e){var t=this._owners?this._owners.indexOf(e):-1;-1!=t&&(this._owners.splice(t,1),this._owners.length||(this._owners=s))},clone:function(){for(var e=[],t=0,n=this._stops.length;t<n;t++)e[t]=this._stops[t].clone();return new K(e,this._radial)},getStops:function(){return this._stops},setStops:function(e){if(e.length<2)throw new Error("Gradient stop list needs to contain at least two stops.");var t=this._stops;if(t)for(var n=0,r=t.length;n<r;n++)t[n]._owner=s;for(n=0,r=(t=this._stops=$.readList(e,0,{clone:!0})).length;n<r;n++)t[n]._owner=this;this._changed()},getRadial:function(){return this._radial},setRadial:function(e){this._radial=e,this._changed()},equals:function(e){if(e===this)return!0;if(e&&this._class===e._class){var t=this._stops,n=e._stops,r=t.length;if(r===n.length){for(var i=0;i<r;i++)if(!t[i].equals(n[i]))return!1;return!0}}return!1}}),$=l.extend({_class:"GradientStop",initialize:function(e,t){var n=e,r=t;"object"==typeof e&&t===s&&(Array.isArray(e)&&"number"!=typeof e[0]?(n=e[0],r=e[1]):("color"in e||"offset"in e||"rampPoint"in e)&&(n=e.color,r=e.offset||e.rampPoint||0)),this.setColor(n),this.setOffset(r)},clone:function(){return new $(this._color.clone(),this._offset)},_serialize:function(e,t){var n=this._color,r=this._offset;return l.serialize(null==r?[n]:[n,r],e,!0,t)},_changed:function(){this._owner&&this._owner._changed(129)},getOffset:function(){return this._offset},setOffset:function(e){this._offset=e,this._changed()},getRampPoint:"#getOffset",setRampPoint:"#setOffset",getColor:function(){return this._color},setColor:function(){G._setOwner(this._color,null),this._color=G._setOwner(G.read(arguments,0),this,"setColor"),this._changed()},equals:function(e){return e===this||e&&this._class===e._class&&this._color.equals(e._color)&&this._offset==e._offset||!1}}),Z=l.extend(new function(){var e={fillColor:null,fillRule:"nonzero",strokeColor:null,strokeWidth:1,strokeCap:"butt",strokeJoin:"miter",strokeScaling:!0,miterLimit:10,dashOffset:0,dashArray:[],shadowColor:null,shadowBlur:0,shadowOffset:new y,selectedColor:null},t=l.set({},e,{fontFamily:"sans-serif",fontWeight:"normal",fontSize:12,leading:null,justification:"left"}),n=l.set({},t,{fillColor:new G}),r={strokeWidth:193,strokeCap:193,strokeJoin:193,strokeScaling:201,miterLimit:193,fontFamily:9,fontWeight:9,fontSize:9,font:9,leading:9,justification:9},i={beans:!0},o={_class:"Style",beans:!0,initialize:function(r,i,o){this._values={},this._owner=i,this._project=i&&i._project||o||de.project,this._defaults=!i||i instanceof T?t:i instanceof U?n:e,r&&this.set(r)}};return l.each(t,(function(e,t){var n=/Color$/.test(t),a="shadowOffset"===t,c=l.capitalize(t),u=r[t],f="set"+c,d="get"+c;o[f]=function(e){var r=this._owner,i=r&&r._children,o=i&&i.length>0&&!(r instanceof W);if(o)for(var a=0,s=i.length;a<s;a++)i[a]._style[f](e);if(("selectedColor"===t||!o)&&t in this._defaults){var c=this._values[t];c!==e&&(n&&(c&&(G._setOwner(c,null),c._canvasStyle=null),e&&e.constructor===G&&(e=G._setOwner(e,r,o&&f))),this._values[t]=e,r&&r._changed(u||129))}},o[d]=function(e){var r=this._owner,i=r&&r._children,o=i&&i.length>0&&!(r instanceof W);if(o&&!e)for(var c=0,u=i.length;c<u;c++){var p=i[c]._style[d]();if(c){if(!l.equals(h,p))return s}else h=p}else if(t in this._defaults){var h;if((h=this._values[t])===s)(h=this._defaults[t])&&h.clone&&(h=h.clone());else{var g=n?G:a?y:null;!g||h&&h.constructor===g||(this._values[t]=h=g.read([h],0,{readNull:!0,clone:!0}))}}return h&&n&&(h=G._setOwner(h,r,o&&f)),h},i[d]=function(e){return this._style[d](e)},i[f]=function(e){this._style[f](e)}})),l.each({Font:"FontFamily",WindingRule:"FillRule"},(function(e,t){var n="get"+t,r="set"+t;o[n]=i[n]="#get"+e,o[r]=i[r]="#set"+e})),k.inject(i),o},{set:function(e){var t=e instanceof Z,n=t?e._values:e;if(n)for(var r in n)if(r in this._defaults){var i=n[r];this[r]=i&&t&&i.clone?i.clone():i}},equals:function(e){function t(e,t,n){var r=e._values,i=t._values,o=t._defaults;for(var a in r){var c=r[a],u=i[a];if(!(n&&a in i||l.equals(c,u===s?o[a]:u)))return!1}return!0}return e===this||e&&this._class===e._class&&t(this,e)&&t(e,this,!0)||!1},_dispose:function(){var e;(e=this.getFillColor())&&(e._canvasStyle=null),(e=this.getStrokeColor())&&(e._canvasStyle=null),(e=this.getShadowColor())&&(e._canvasStyle=null)},hasFill:function(){var e=this.getFillColor();return!!e&&e.alpha>0},hasStroke:function(){var e=this.getStrokeColor();return!!e&&e.alpha>0&&this.getStrokeWidth()>0},hasShadow:function(){var e=this.getShadowColor();return!!e&&e.alpha>0&&(this.getShadowBlur()>0||!this.getShadowOffset().isZero())},getView:function(){return this._project._view},getFontStyle:function(){var e=this.getFontSize();return this.getFontWeight()+" "+e+(/[a-z]/i.test(e+"")?" ":"px ")+this.getFontFamily()},getFont:"#getFontFamily",setFont:"#setFontFamily",getLeading:function e(){var t=e.base.call(this),n=this.getFontSize();return/pt|em|%|px/.test(n)&&(n=this.getView().getPixelSize(n)),null!=t?t:1.2*n}}),X=new function(){function e(e,t,n,r){for(var i=["","webkit","moz","Moz","ms","o"],o=t[0].toUpperCase()+t.substring(1),a=0;a<6;a++){var s=i[a],c=s?s+o:t;if(c in e){if(!n)return e[c];e[c]=r;break}}}return{getStyles:function(e){var t=e&&9!==e.nodeType?e.ownerDocument:e,n=t&&t.defaultView;return n&&n.getComputedStyle(e,"")},getBounds:function(e,t){var n,r=e.ownerDocument,i=r.body,o=r.documentElement;try{n=e.getBoundingClientRect()}catch(e){n={left:0,top:0,width:0,height:0}}var a=n.left-(o.clientLeft||i.clientLeft||0),s=n.top-(o.clientTop||i.clientTop||0);if(!t){var c=r.defaultView;a+=c.pageXOffset||o.scrollLeft||i.scrollLeft,s+=c.pageYOffset||o.scrollTop||i.scrollTop}return new x(a,s,n.width,n.height)},getViewportBounds:function(e){var t=e.ownerDocument,n=t.defaultView,r=t.documentElement;return new x(0,0,n.innerWidth||r.clientWidth,n.innerHeight||r.clientHeight)},getOffset:function(e,t){return X.getBounds(e,t).getPoint()},getSize:function(e){return X.getBounds(e,!0).getSize()},isInvisible:function(e){return X.getSize(e).equals(new w(0,0))},isInView:function(e){return!X.isInvisible(e)&&X.getViewportBounds(e).intersects(X.getBounds(e,!0))},isInserted:function(e){return u.body.contains(e)},getPrefixed:function(t,n){return t&&e(t,n)},setPrefixed:function(t,n,r){if("object"==typeof n)for(var i in n)e(t,i,!0,n[i]);else e(t,n,!0,r)}}},Q={add:function(e,t){if(e)for(var n in t)for(var r=t[n],i=n.split(/[\s,]+/g),o=0,a=i.length;o<a;o++){var s=i[o],c=e===u&&("touchstart"===s||"touchmove"===s)&&{passive:!1};e.addEventListener(s,r,c)}},remove:function(e,t){if(e)for(var n in t)for(var r=t[n],i=n.split(/[\s,]+/g),o=0,a=i.length;o<a;o++)e.removeEventListener(i[o],r,!1)},getPoint:function(e){var t=e.targetTouches?e.targetTouches.length?e.targetTouches[0]:e.changedTouches[0]:e;return new y(t.pageX||t.clientX+u.documentElement.scrollLeft,t.pageY||t.clientY+u.documentElement.scrollTop)},getTarget:function(e){return e.target||e.srcElement},getRelatedTarget:function(e){return e.relatedTarget||e.toElement},getOffset:function(e,t){return Q.getPoint(e).subtract(X.getOffset(t||Q.getTarget(e)))}};Q.requestAnimationFrame=new function(){var e,t=X.getPrefixed(c,"requestAnimationFrame"),n=!1,r=[];function i(){var e=r;r=[];for(var o=0,a=e.length;o<a;o++)e[o]();(n=t&&r.length)&&t(i)}return function(o){r.push(o),t?n||(t(i),n=!0):e||(e=setInterval(i,1e3/60))}};var Y=l.extend(f,{_class:"View",initialize:function e(t,n){function r(e){return n[e]||parseInt(n.getAttribute(e),10)}function i(){var e=X.getSize(n);return e.isNaN()||e.isZero()?new w(r("width"),r("height")):e}var o;if(c&&n){this._id=n.getAttribute("id"),null==this._id&&n.setAttribute("id",this._id="paper-view-"+e._id++),Q.add(n,this._viewEvents);if(X.setPrefixed(n.style,{userDrag:"none",userSelect:"none",touchCallout:"none",contentZooming:"none",tapHighlightColor:"rgba(0,0,0,0)"}),d.hasAttribute(n,"resize")){var a=this;Q.add(c,this._windowEvents={resize:function(){a.setViewSize(i())}})}if(o=i(),d.hasAttribute(n,"stats")&&"undefined"!=typeof Stats){this._stats=new Stats;var s=this._stats.domElement,l=s.style,f=X.getOffset(n);l.position="absolute",l.left=f.x+"px",l.top=f.y+"px",u.body.appendChild(s)}}else o=new w(n),n=null;this._project=t,this._scope=t._scope,this._element=n,this._pixelRatio||(this._pixelRatio=c&&c.devicePixelRatio||1),this._setElementSize(o.width,o.height),this._viewSize=o,e._views.push(this),e._viewsById[this._id]=this,(this._matrix=new S)._owner=this,e._focused||(e._focused=this),this._frameItems={},this._frameItemCount=0,this._itemEvents={native:{},virtual:{}},this._autoUpdate=!de.agent.node,this._needsUpdate=!1},remove:function(){if(!this._project)return!1;Y._focused===this&&(Y._focused=null),Y._views.splice(Y._views.indexOf(this),1),delete Y._viewsById[this._id];var e=this._project;return e._view===this&&(e._view=null),Q.remove(this._element,this._viewEvents),Q.remove(c,this._windowEvents),this._element=this._project=null,this.off("frame"),this._animate=!1,this._frameItems={},!0},_events:l.each(k._itemHandlers.concat(["onResize","onKeyDown","onKeyUp"]),(function(e){this[e]={}}),{onFrame:{install:function(){this.play()},uninstall:function(){this.pause()}}}),_animate:!1,_time:0,_count:0,getAutoUpdate:function(){return this._autoUpdate},setAutoUpdate:function(e){this._autoUpdate=e,e&&this.requestUpdate()},update:function(){},draw:function(){this.update()},requestUpdate:function(){if(!this._requested){var e=this;Q.requestAnimationFrame((function(){if(e._requested=!1,e._animate){e.requestUpdate();var t=e._element;X.getPrefixed(u,"hidden")&&"true"!==d.getAttribute(t,"keepalive")||!X.isInView(t)||e._handleFrame()}e._autoUpdate&&e.update()})),this._requested=!0}},play:function(){this._animate=!0,this.requestUpdate()},pause:function(){this._animate=!1},_handleFrame:function(){de=this._scope;var e=Date.now()/1e3,t=this._last?e-this._last:0;this._last=e,this.emit("frame",new l({delta:t,time:this._time+=t,count:this._count++})),this._stats&&this._stats.update()},_animateItem:function(e,t){var n=this._frameItems;t?(n[e._id]={item:e,time:0,count:0},1==++this._frameItemCount&&this.on("frame",this._handleFrameItems)):(delete n[e._id],0==--this._frameItemCount&&this.off("frame",this._handleFrameItems))},_handleFrameItems:function(e){for(var t in this._frameItems){var n=this._frameItems[t];n.item.emit("frame",new l(e,{time:n.time+=e.delta,count:n.count++}))}},_changed:function(){this._project._changed(4097),this._bounds=this._decomposed=s},getElement:function(){return this._element},getPixelRatio:function(){return this._pixelRatio},getResolution:function(){return 72*this._pixelRatio},getViewSize:function(){var e=this._viewSize;return new _(e.width,e.height,this,"setViewSize")},setViewSize:function(){var e=w.read(arguments),t=e.subtract(this._viewSize);t.isZero()||(this._setElementSize(e.width,e.height),this._viewSize.set(e),this._changed(),this.emit("resize",{size:e,delta:t}),this._autoUpdate&&this.update())},_setElementSize:function(e,t){var n=this._element;n&&(n.width!==e&&(n.width=e),n.height!==t&&(n.height=t))},getBounds:function(){return this._bounds||(this._bounds=this._matrix.inverted()._transformBounds(new x(new y,this._viewSize))),this._bounds},getSize:function(){return this.getBounds().getSize()},isVisible:function(){return X.isInView(this._element)},isInserted:function(){return X.isInserted(this._element)},getPixelSize:function(e){var t,n=this._element;if(n){var r=n.parentNode,i=u.createElement("div");i.style.fontSize=e,r.appendChild(i),t=parseFloat(X.getStyles(i).fontSize),r.removeChild(i)}else t=parseFloat(t);return t},getTextWidth:function(e,t){return 0}},l.each(["rotate","scale","shear","skew"],(function(e){var t="rotate"===e;this[e]=function(){var n=arguments,r=(t?l:y).read(n),i=y.read(n,0,{readNull:!0});return this.transform((new S)[e](r,i||this.getCenter(!0)))}}),{_decompose:function(){return this._decomposed||(this._decomposed=this._matrix.decompose())},translate:function(){var e=new S;return this.transform(e.translate.apply(e,arguments))},getCenter:function(){return this.getBounds().getCenter()},setCenter:function(){var e=y.read(arguments);this.translate(this.getCenter().subtract(e))},getZoom:function(){var e=this._decompose().scaling;return(e.x+e.y)/2},setZoom:function(e){this.transform((new S).scale(e/this.getZoom(),this.getCenter()))},getRotation:function(){return this._decompose().rotation},setRotation:function(e){var t=this.getRotation();null!=t&&null!=e&&this.rotate(e-t)},getScaling:function(){var e=this._decompose().scaling;return new b(e.x,e.y,this,"setScaling")},setScaling:function(){var e=this.getScaling(),t=y.read(arguments,0,{clone:!0,readNull:!0});e&&t&&this.scale(t.x/e.x,t.y/e.y)},getMatrix:function(){return this._matrix},setMatrix:function(){var e=this._matrix;e.set.apply(e,arguments)},transform:function(e){this._matrix.append(e)},scrollBy:function(){this.translate(y.read(arguments).negate())}}),{projectToView:function(){return this._matrix._transformPoint(y.read(arguments))},viewToProject:function(){return this._matrix._inverseTransform(y.read(arguments))},getEventPoint:function(e){return this.viewToProject(Q.getOffset(e,this._element))}},{statics:{_views:[],_viewsById:{},_id:0,create:function(e,t){return u&&"string"==typeof t&&(t=u.getElementById(t)),new(c?J:Y)(e,t)}}},new function(){if(c){var e,t,n,r,i,o=!1,a=!1,s=c.navigator;s.pointerEnabled||s.msPointerEnabled?(n="pointerdown MSPointerDown",r="pointermove MSPointerMove",i="pointerup pointercancel MSPointerUp MSPointerCancel"):(n="touchstart",r="touchmove",i="touchend touchcancel","ontouchstart"in c&&s.userAgent.match(/mobile|tablet|ip(ad|hone|od)|android|silk/i)||(n+=" mousedown",r+=" mousemove",i+=" mouseup"));var l={},f={mouseout:function(e){var t=Y._focused,n=Q.getRelatedTarget(e);if(t&&(!n||"HTML"===n.nodeName)){var r=Q.getOffset(e,t._element),i=r.x,o=Math.abs,a=o(i),s=a-(1<<25);r.x=o(s)<a?s*(i<0?-1:1):i,k(t,e,t.viewToProject(r))}},scroll:C};l[n]=function(e){var t=Y._focused=E(e);o||(o=!0,t._handleMouseEvent("mousedown",e))},f[r]=function(n){var r=Y._focused;if(!a){var i=E(n);i?r!==i&&(r&&k(r,n),e||(e=r),r=Y._focused=t=i):t&&t===r&&(e&&!e.isInserted()&&(e=null),r=Y._focused=e,e=null,C())}r&&k(r,n)},f[n]=function(){a=!0},f[i]=function(e){var t=Y._focused;t&&o&&t._handleMouseEvent("mouseup",e),a=o=!1},Q.add(u,f),Q.add(c,{load:C});var d,p,h,g,v,m,y,b,w=!1,_=!1,x={doubleclick:"click",mousedrag:"mousemove"},O=!1,S={mousedown:{mousedown:1,mousedrag:1,click:1,doubleclick:1},mouseup:{mouseup:1,mousedrag:1,click:1,doubleclick:1},mousemove:{mousedrag:1,mousemove:1,mouseenter:1,mouseleave:1}};return{_viewEvents:l,_handleMouseEvent:function(e,t,n){var r=this._itemEvents,i=r.native[e],a="mousemove"===e,s=this._scope.tool,c=this;function u(e){return r.virtual[e]||c.responds(e)||s&&s.responds(e)}a&&o&&u("mousedrag")&&(e="mousedrag"),n||(n=this.getEventPoint(t));var l=this.getBounds().contains(n),f=i&&l&&c._project.hitTest(n,{tolerance:0,fill:!0,stroke:!0}),x=f&&f.item||null,S=!1,E={};if(E[e.substr(5)]=!0,i&&x!==g&&(g&&T(g,null,"mouseleave",t,n),x&&T(x,null,"mouseenter",t,n),g=x),O^l&&(T(this,null,l?"mouseenter":"mouseleave",t,n),l?this:null,S=!0),!l&&!E.drag||n.equals(p)||(j(this,x,a?e:"mousemove",t,n,p),S=!0),O=l,E.down&&l||E.up&&d){if(j(this,x,e,t,n,d),E.down){if(b=x===m&&Date.now()-y<300,h=m=x,!_&&x){for(var C=x;C&&!C.responds("mousedrag");)C=C._parent;C&&(v=x)}d=n}else E.up&&(_||x!==h||(y=Date.now(),j(this,x,b?"doubleclick":"click",t,n,d),b=!1),h=v=null);O=!1,S=!0}p=n,S&&s&&(w=s._handleMouseEvent(e,t,n,E)||w),!1!==t.cancelable&&(w&&!E.move||E.down&&u("mouseup"))&&t.preventDefault()},_handleKeyEvent:function(e,t,n,r){var i,o=this._scope,a=o.tool;function s(a){a.responds(e)&&(de=o,a.emit(e,i=i||new te(e,t,n,r)))}this.isVisible()&&(s(this),a&&a.responds(e)&&s(a))},_countItemEvent:function(e,t){var n=this._itemEvents,r=n.native,i=n.virtual;for(var o in S)r[o]=(r[o]||0)+(S[o][e]||0)*t;i[e]=(i[e]||0)+t},statics:{updateFocus:C,_resetState:function(){o=a=w=O=!1,e=t=d=p=h=g=v=m=y=b=null}}}}function E(e){var t=Q.getTarget(e);return t.getAttribute&&Y._viewsById[t.getAttribute("id")]}function C(){var e=Y._focused;if(!e||!e.isVisible())for(var n=0,r=Y._views.length;n<r;n++)if((e=Y._views[n]).isVisible()){Y._focused=t=e;break}}function k(e,t,n){e._handleMouseEvent("mousemove",t,n)}function T(e,t,n,r,i,o,a){var s,c=!1;function u(e,n){if(e.responds(n)){if(s||(s=new re(n,r,i,t||e,o?i.subtract(o):null)),e.emit(n,s)&&(w=!0,s.prevented&&(_=!0),s.stopped))return c=!0}else{var a=x[n];if(a)return u(e,a)}}for(;e&&e!==a&&!u(e,n);)e=e._parent;return c}function j(e,t,n,r,i,o){return e._project.removeOn(n),_=w=!1,v&&T(v,null,n,r,i,o)||t&&t!==v&&!t.isDescendant(v)&&T(t,null,"mousedrag"===n?"mousemove":n,r,i,o,v)||T(e,v||t||e,n,r,i,o)}}),J=Y.extend({_class:"CanvasView",initialize:function(e,t){if(!(t instanceof c.HTMLCanvasElement)){var n=w.read(arguments,1);if(n.isZero())throw new Error("Cannot create CanvasView with the provided argument: "+l.slice(arguments,1));t=ce.getCanvas(n)}var r=this._context=t.getContext("2d");if(r.save(),this._pixelRatio=1,!/^off|false$/.test(d.getAttribute(t,"hidpi"))){var i=c.devicePixelRatio||1,o=X.getPrefixed(r,"backingStorePixelRatio")||1;this._pixelRatio=i/o}Y.call(this,e,t),this._needsUpdate=!0},remove:function e(){return this._context.restore(),e.base.call(this)},_setElementSize:function e(t,n){var r=this._pixelRatio;if(e.base.call(this,t*r,n*r),1!==r){var i=this._element,o=this._context;if(!d.hasAttribute(i,"resize")){var a=i.style;a.width=t+"px",a.height=n+"px"}o.restore(),o.save(),o.scale(r,r)}},getContext:function(){return this._context},getPixelSize:function e(t){var n,r=de.agent;if(r&&r.firefox)n=e.base.call(this,t);else{var i=this._context,o=i.font;i.font=t+" serif",n=parseFloat(i.font),i.font=o}return n},getTextWidth:function(e,t){var n=this._context,r=n.font,i=0;n.font=e;for(var o=0,a=t.length;o<a;o++)i=Math.max(i,n.measureText(t[o]).width);return n.font=r,i},update:function(){if(!this._needsUpdate)return!1;var e=this._project,t=this._context,n=this._viewSize;return t.clearRect(0,0,n.width+1,n.height+1),e&&e.draw(t,this._matrix,this._pixelRatio),this._needsUpdate=!1,!0}}),ee=l.extend({_class:"Event",initialize:function(e){this.event=e,this.type=e&&e.type},prevented:!1,stopped:!1,preventDefault:function(){this.prevented=!0,this.event.preventDefault()},stopPropagation:function(){this.stopped=!0,this.event.stopPropagation()},stop:function(){this.stopPropagation(),this.preventDefault()},getTimeStamp:function(){return this.event.timeStamp},getModifiers:function(){return ne.modifiers}}),te=ee.extend({_class:"KeyEvent",initialize:function(e,t,n,r){this.type=e,this.event=t,this.key=n,this.character=r},toString:function(){return"{ type: '"+this.type+"', key: '"+this.key+"', character: '"+this.character+"', modifiers: "+this.getModifiers()+" }"}}),ne=new function(){var e,t,n={"\t":"tab"," ":"space","\b":"backspace","":"delete",Spacebar:"space",Del:"delete",Win:"meta",Esc:"escape"},r={tab:"\t",space:" ",enter:"\r"},i={},o={},a=new l({shift:!1,control:!1,alt:!1,meta:!1,capsLock:!1,space:!1}).inject({option:{get:function(){return this.alt}},command:{get:function(){var e=de&&de.agent;return e&&e.mac?this.meta:this.control}}});function f(e){var t=e.key||e.keyIdentifier;return t=/^U\+/.test(t)?String.fromCharCode(parseInt(t.substr(2),16)):/^Arrow[A-Z]/.test(t)?t.substr(5):"Unidentified"===t||t===s?String.fromCharCode(e.keyCode):t,n[t]||(t.length>1?l.hyphenate(t):t.toLowerCase())}function d(t,n,r,s){var c,u=Y._focused;if(i[n]=t,t?o[n]=r:delete o[n],n.length>1&&(c=l.camelize(n))in a){a[c]=t;var f=de&&de.agent;if("meta"===c&&f&&f.mac)if(t)e={};else{for(var p in e)p in o&&d(!1,p,e[p],s);e=null}}else t&&e&&(e[n]=r);u&&u._handleKeyEvent(t?"keydown":"keyup",s,n,r)}return Q.add(u,{keydown:function(e){var n=f(e),i=de&&de.agent;n.length>1||i&&i.chrome&&(e.altKey||i.mac&&e.metaKey||!i.mac&&e.ctrlKey)?d(!0,n,r[n]||(n.length>1?"":n),e):t=n},keypress:function(e){if(t){var n=f(e),r=e.charCode,i=r>=32?String.fromCharCode(r):n.length>1?"":n;n!==t&&(n=i.toLowerCase()),d(!0,n,i,e),t=null}},keyup:function(e){var t=f(e);t in o&&d(!1,t,o[t],e)}}),Q.add(c,{blur:function(e){for(var t in o)d(!1,t,o[t],e)}}),{modifiers:a,isDown:function(e){return!!i[e]}}},re=ee.extend({_class:"MouseEvent",initialize:function(e,t,n,r,i){this.type=e,this.event=t,this.point=n,this.target=r,this.delta=i},toString:function(){return"{ type: '"+this.type+"', point: "+this.point+", target: "+this.target+(this.delta?", delta: "+this.delta:"")+", modifiers: "+this.getModifiers()+" }"}}),ie=ee.extend({_class:"ToolEvent",_item:null,initialize:function(e,t,n){this.tool=e,this.type=t,this.event=n},_choosePoint:function(e,t){return e||(t?t.clone():null)},getPoint:function(){return this._choosePoint(this._point,this.tool._point)},setPoint:function(e){this._point=e},getLastPoint:function(){return this._choosePoint(this._lastPoint,this.tool._lastPoint)},setLastPoint:function(e){this._lastPoint=e},getDownPoint:function(){return this._choosePoint(this._downPoint,this.tool._downPoint)},setDownPoint:function(e){this._downPoint=e},getMiddlePoint:function(){return!this._middlePoint&&this.tool._lastPoint?this.tool._point.add(this.tool._lastPoint).divide(2):this._middlePoint},setMiddlePoint:function(e){this._middlePoint=e},getDelta:function(){return!this._delta&&this.tool._lastPoint?this.tool._point.subtract(this.tool._lastPoint):this._delta},setDelta:function(e){this._delta=e},getCount:function(){return this.tool[/^mouse(down|up)$/.test(this.type)?"_downCount":"_moveCount"]},setCount:function(e){this.tool[/^mouse(down|up)$/.test(this.type)?"downCount":"count"]=e},getItem:function(){if(!this._item){var e=this.tool._scope.project.hitTest(this.getPoint());if(e){for(var t=e.item,n=t._parent;/^(Group|CompoundPath)$/.test(n._class);)t=n,n=n._parent;this._item=t}}return this._item},setItem:function(e){this._item=e},toString:function(){return"{ type: "+this.type+", point: "+this.getPoint()+", count: "+this.getCount()+", modifiers: "+this.getModifiers()+" }"}}),oe=p.extend({_class:"Tool",_list:"tools",_reference:"tool",_events:["onMouseDown","onMouseUp","onMouseDrag","onMouseMove","onActivate","onDeactivate","onEditOptions","onKeyDown","onKeyUp"],initialize:function(e){p.call(this),this._moveCount=-1,this._downCount=-1,this.set(e)},getMinDistance:function(){return this._minDistance},setMinDistance:function(e){this._minDistance=e,null!=e&&null!=this._maxDistance&&e>this._maxDistance&&(this._maxDistance=e)},getMaxDistance:function(){return this._maxDistance},setMaxDistance:function(e){this._maxDistance=e,null!=this._minDistance&&null!=e&&e<this._minDistance&&(this._minDistance=e)},getFixedDistance:function(){return this._minDistance==this._maxDistance?this._minDistance:null},setFixedDistance:function(e){this._minDistance=this._maxDistance=e},_handleMouseEvent:function(e,t,n,r){de=this._scope,r.drag&&!this.responds(e)&&(e="mousemove");var i=r.move||r.drag,o=this.responds(e),a=this.minDistance,s=this.maxDistance,c=!1,u=this;function l(e,t){var o=n,a=i?u._point:u._downPoint||o;if(i){if(u._moveCount>=0&&o.equals(a))return!1;if(a&&(null!=e||null!=t)){var s=o.subtract(a),c=s.getLength();if(c<(e||0))return!1;t&&(o=a.add(s.normalize(Math.min(c,t))))}u._moveCount++}return u._point=o,u._lastPoint=a||o,r.down&&(u._moveCount=-1,u._downPoint=o,u._downCount++),!0}function f(){o&&(c=u.emit(e,new ie(u,e,t))||c)}if(r.down)l(),f();else if(r.up)l(null,s),f();else if(o)for(;l(a,s);)f();return c}}),ae=l.extend(f,{_class:"Tween",statics:{easings:new l({linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:2*(2-e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}})},initialize:function e(t,n,r,i,o,a){this.object=t;var s=typeof o,c="function"===s;this.type=c?s:"string"===s?o:"linear",this.easing=c?o:e.easings[this.type],this.duration=i,this.running=!1,this._then=null,this._startTime=null;var u=n||r;this._keys=u?Object.keys(u):[],this._parsedKeys=this._parseKeys(this._keys),this._from=u&&this._getState(n),this._to=u&&this._getState(r),!1!==a&&this.start()},then:function(e){return this._then=e,this},start:function(){return this._startTime=null,this.running=!0,this},stop:function(){return this.running=!1,this},update:function(e){if(this.running){e>=1&&(e=1,this.running=!1);for(var t=this.easing(e),n=this._keys,r=function(n){return"function"==typeof n?n(t,e):n},i=0,o=n&&n.length;i<o;i++){var a=n[i],s=r(this._from[a]),c=r(this._to[a]),u=s&&c&&s.__add&&c.__add?c.__subtract(s).__multiply(t).__add(s):(c-s)*t+s;this._setProperty(this._parsedKeys[a],u)}this.responds("update")&&this.emit("update",new l({progress:e,factor:t})),!this.running&&this._then&&this._then(this.object)}return this},_events:{onUpdate:{}},_handleFrame:function(e){var t=this._startTime,n=t?(e-t)/this.duration:0;t||(this._startTime=e),this.update(n)},_getState:function(e){for(var t=this._keys,n={},r=0,i=t.length;r<i;r++){var o,a=t[r],s=this._parsedKeys[a],c=this._getProperty(s);if(e){var u=this._resolveValue(c,e[a]);this._setProperty(s,u),o=(o=this._getProperty(s))&&o.clone?o.clone():o,this._setProperty(s,c)}else o=c&&c.clone?c.clone():c;n[a]=o}return n},_resolveValue:function(e,t){if(t){if(Array.isArray(t)&&2===t.length){var n=t[0];return n&&n.match&&n.match(/^[+\-\*\/]=/)?this._calculate(e,n[0],t[1]):t}if("string"==typeof t){var r=t.match(/^[+\-*/]=(.*)/);if(r){var i=JSON.parse(r[1].replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": '));return this._calculate(e,t[0],i)}}}return t},_calculate:function(e,t,n){return de.PaperScript.calculateBinary(e,t,n)},_parseKeys:function(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n],o=i.replace(/\.([^.]*)/g,"/$1").replace(/\[['"]?([^'"\]]*)['"]?\]/g,"/$1");t[i]=o.split("/")}return t},_getProperty:function(e,t){for(var n=this.object,r=0,i=e.length-(t||0);r<i&&n;r++)n=n[e[r]];return n},_setProperty:function(e,t){var n=this._getProperty(e,1);n&&(n[e[e.length-1]]=t)}}),se=function(e){var t=new a.XMLHttpRequest;return t.open((e.method||"get").toUpperCase(),e.url,l.pick(e.async,!0)),e.mimeType&&t.overrideMimeType(e.mimeType),t.onload=function(){var n=t.status;0===n||200===n?e.onLoad&&e.onLoad.call(t,t.responseText):t.onerror()},t.onerror=function(){var n=t.status,r='Could not load "'+e.url+'" (Status: '+n+")";if(!e.onError)throw new Error(r);e.onError(r,n)},t.send(null)},ce=l.exports.CanvasProvider={canvases:[],getCanvas:function(e,t){if(!c)return null;var n,r=!0;"object"==typeof e&&(t=e.height,e=e.width),this.canvases.length?n=this.canvases.pop():(n=u.createElement("canvas"),r=!1);var i=n.getContext("2d");if(!i)throw new Error("Canvas "+n+" is unable to provide a 2D context.");return n.width===e&&n.height===t?r&&i.clearRect(0,0,e+1,t+1):(n.width=e,n.height=t),i.save(),n},getContext:function(e,t){var n=this.getCanvas(e,t);return n?n.getContext("2d"):null},release:function(e){var t=e&&e.canvas?e.canvas:e;t&&t.getContext&&(t.getContext("2d").restore(),this.canvases.push(t))}},ue=new function(){var e,t,n,r,i,o,a,s,c,u,f,d=Math.min,p=Math.max,h=Math.abs;function g(e,t,n){return.2989*e+.587*t+.114*n}function v(e,t,n,r){var i=r-g(e,t,n),o=(r=g(c=e+i,u=t+i,f=n+i),d(c,u,f)),a=p(c,u,f);if(o<0){var s=r-o;c=r+(c-r)*r/s,u=r+(u-r)*r/s,f=r+(f-r)*r/s}if(a>255){var l=255-r,h=a-r;c=r+(c-r)*l/h,u=r+(u-r)*l/h,f=r+(f-r)*l/h}}function m(e,t,n){return p(e,t,n)-d(e,t,n)}function y(e,t,n,r){var i,o=[e,t,n],a=p(e,t,n),s=d(e,t,n);i=0===d(s=s===e?0:s===t?1:2,a=a===e?0:a===t?1:2)?1===p(s,a)?2:1:0,o[a]>o[s]?(o[i]=(o[i]-o[s])*r/(o[a]-o[s]),o[a]=r):o[i]=o[a]=0,o[s]=0,c=o[0],u=o[1],f=o[2]}var b={multiply:function(){c=i*e/255,u=o*t/255,f=a*n/255},screen:function(){c=i+e-i*e/255,u=o+t-o*t/255,f=a+n-a*n/255},overlay:function(){c=i<128?2*i*e/255:255-2*(255-i)*(255-e)/255,u=o<128?2*o*t/255:255-2*(255-o)*(255-t)/255,f=a<128?2*a*n/255:255-2*(255-a)*(255-n)/255},"soft-light":function(){var r=e*i/255;c=r+i*(255-(255-i)*(255-e)/255-r)/255,u=(r=t*o/255)+o*(255-(255-o)*(255-t)/255-r)/255,f=(r=n*a/255)+a*(255-(255-a)*(255-n)/255-r)/255},"hard-light":function(){c=e<128?2*e*i/255:255-2*(255-e)*(255-i)/255,u=t<128?2*t*o/255:255-2*(255-t)*(255-o)/255,f=n<128?2*n*a/255:255-2*(255-n)*(255-a)/255},"color-dodge":function(){c=0===i?0:255===e?255:d(255,255*i/(255-e)),u=0===o?0:255===t?255:d(255,255*o/(255-t)),f=0===a?0:255===n?255:d(255,255*a/(255-n))},"color-burn":function(){c=255===i?255:0===e?0:p(0,255-255*(255-i)/e),u=255===o?255:0===t?0:p(0,255-255*(255-o)/t),f=255===a?255:0===n?0:p(0,255-255*(255-a)/n)},darken:function(){c=i<e?i:e,u=o<t?o:t,f=a<n?a:n},lighten:function(){c=i>e?i:e,u=o>t?o:t,f=a>n?a:n},difference:function(){(c=i-e)<0&&(c=-c),(u=o-t)<0&&(u=-u),(f=a-n)<0&&(f=-f)},exclusion:function(){c=i+e*(255-i-i)/255,u=o+t*(255-o-o)/255,f=a+n*(255-a-a)/255},hue:function(){y(e,t,n,m(i,o,a)),v(c,u,f,g(i,o,a))},saturation:function(){y(i,o,a,m(e,t,n)),v(c,u,f,g(i,o,a))},luminosity:function(){v(i,o,a,g(e,t,n))},color:function(){v(e,t,n,g(i,o,a))},add:function(){c=d(i+e,255),u=d(o+t,255),f=d(a+n,255)},subtract:function(){c=p(i-e,0),u=p(o-t,0),f=p(a-n,0)},average:function(){c=(i+e)/2,u=(o+t)/2,f=(a+n)/2},negation:function(){c=255-h(255-e-i),u=255-h(255-t-o),f=255-h(255-n-a)}},w=this.nativeModes=l.each(["source-over","source-in","source-out","source-atop","destination-over","destination-in","destination-out","destination-atop","lighter","darker","copy","xor"],(function(e){this[e]=!0}),{}),_=ce.getContext(1,1);_&&(l.each(b,(function(e,t){var n="darken"===t,r=!1;_.save();try{_.fillStyle=n?"#300":"#a00",_.fillRect(0,0,1,1),_.globalCompositeOperation=t,_.globalCompositeOperation===t&&(_.fillStyle=n?"#a00":"#300",_.fillRect(0,0,1,1),r=_.getImageData(0,0,1,1).data[0]!==n?170:51)}catch(e){}_.restore(),w[t]=r})),ce.release(_)),this.process=function(l,d,p,h,g){var v=d.canvas,m="normal"===l;if(m||w[l])p.save(),p.setTransform(1,0,0,1,0,0),p.globalAlpha=h,m||(p.globalCompositeOperation=l),p.drawImage(v,g.x,g.y),p.restore();else{var y=b[l];if(!y)return;for(var _=p.getImageData(g.x,g.y,v.width,v.height),x=_.data,O=d.getImageData(0,0,v.width,v.height).data,S=0,E=x.length;S<E;S+=4){e=O[S],i=x[S],t=O[S+1],o=x[S+1],n=O[S+2],a=x[S+2],r=O[S+3],s=x[S+3],y();var C=r*h/255,k=1-C;x[S]=C*c+k*i,x[S+1]=C*u+k*o,x[S+2]=C*f+k*a,x[S+3]=r*h+k*s}p.putImageData(_,g.x,g.y)}}},le=new function(){var e="http://www.w3.org/2000/svg",t="http://www.w3.org/2000/xmlns",n="http://www.w3.org/1999/xlink",r={href:n,xlink:t,xmlns:t+"/","xmlns:xlink":t+"/"};function i(e,t,n){for(var i in t){var o=t[i],a=r[i];"number"==typeof o&&n&&(o=n.number(o)),a?e.setAttributeNS(a,i,o):e.setAttribute(i,o)}return e}return{svg:e,xmlns:t,xlink:n,create:function(t,n,r){return i(u.createElementNS(e,t),n,r)},get:function(e,t){var n=r[t],i=n?e.getAttributeNS(n,t):e.getAttribute(t);return"null"===i?null:i},set:i}},fe=l.each({fillColor:["fill","color"],fillRule:["fill-rule","string"],strokeColor:["stroke","color"],strokeWidth:["stroke-width","number"],strokeCap:["stroke-linecap","string"],strokeJoin:["stroke-linejoin","string"],strokeScaling:["vector-effect","lookup",{true:"none",false:"non-scaling-stroke"},function(e,t){return!t&&(e instanceof B||e instanceof P||e instanceof U)}],miterLimit:["stroke-miterlimit","number"],dashArray:["stroke-dasharray","array"],dashOffset:["stroke-dashoffset","number"],fontFamily:["font-family","string"],fontWeight:["font-weight","string"],fontSize:["font-size","number"],justification:["text-anchor","lookup",{left:"start",center:"middle",right:"end"}],opacity:["opacity","number"],blendMode:["mix-blend-mode","style"]},(function(e,t){var n=l.capitalize(t),r=e[2];this[t]={type:e[1],property:t,attribute:e[0],toSVG:r,fromSVG:r&&l.each(r,(function(e,t){this[e]=t}),{}),exportFilter:e[3],get:"get"+n,set:"set"+n}}),{});new function(){var e;function t(t,n,r){var i,o=new l,a=t.getTranslation();n&&(t.isInvertible()?(i=(t=t._shiftless())._inverseTransform(a),a=null):i=new y,o[r?"cx":"x"]=i.x,o[r?"cy":"y"]=i.y);if(!t.isIdentity()){var s=t.decompose();if(s){var c=[],u=s.rotation,f=s.scaling,d=s.skewing;a&&!a.isZero()&&c.push("translate("+e.point(a)+")"),u&&c.push("rotate("+e.number(u)+")"),v.isZero(f.x-1)&&v.isZero(f.y-1)||c.push("scale("+e.point(f)+")"),d.x&&c.push("skewX("+e.number(d.x)+")"),d.y&&c.push("skewY("+e.number(d.y)+")"),o.transform=c.join(" ")}else o.transform="matrix("+t.getValues().join(",")+")"}return o}function n(n,r){for(var i=t(n._matrix),o=n._children,a=le.create("g",i,e),s=0,c=o.length;s<c;s++){var l=o[s],f=d(l,r);if(f)if(l.isClipMask()){var p=le.create("clipPath");p.appendChild(f),u(l,p,"clip"),le.set(a,{"clip-path":"url(#"+p.id+")"})}else a.appendChild(f)}return a}function r(n){var r=n._type,i=n._radius,o=t(n._matrix,!0,"rectangle"!==r);if("rectangle"===r){r="rect";var a=n._size,s=a.width,c=a.height;o.x-=s/2,o.y-=c/2,o.width=s,o.height=c,i.isZero()&&(i=null)}return i&&("circle"===r?o.r=i:(o.rx=i.width,o.ry=i.height)),le.create(r,o,e)}var i,o={Group:n,Layer:n,Raster:function(n,r){var i=t(n._matrix,!0),o=n.getSize(),a=n.getImage();return i.x-=o.width/2,i.y-=o.height/2,i.width=o.width,i.height=o.height,i.href=0==r.embedImages&&a&&a.src||n.toDataURL(),le.create("image",i,e)},Path:function(n,i){var o=i.matchShapes;if(o){var a=n.toShape(!1);if(a)return r(a)}var s,c=n._segments,u=c.length,l=t(n._matrix);if(o&&u>=2&&!n.hasHandles())if(u>2){s=n._closed?"polygon":"polyline";for(var f=[],d=0;d<u;d++)f.push(e.point(c[d]._point));l.points=f.join(" ")}else{s="line";var p=c[0]._point,h=c[1]._point;l.set({x1:p.x,y1:p.y,x2:h.x,y2:h.y})}else s="path",l.d=n.getPathData(null,i.precision);return le.create(s,l,e)},Shape:r,CompoundPath:function(n,r){var i=t(n._matrix),o=n.getPathData(null,r.precision);return o&&(i.d=o),le.create("path",i,e)},SymbolItem:function(n,r){var i=t(n._matrix,!0),o=n._definition,a=c(o,"symbol"),s=o._item,l=s.getStrokeBounds();return a||((a=le.create("symbol",{viewBox:e.rectangle(l)})).appendChild(d(s,r)),u(o,a,"symbol")),i.href="#"+a.id,i.x+=l.x,i.y+=l.y,i.width=l.width,i.height=l.height,i.overflow="visible",le.create("use",i,e)},PointText:function(n){var r=le.create("text",t(n._matrix,!0),e);return r.textContent=n._content,r}};function s(t,n,r){var i={},o=!r&&t.getParent(),a=[];return null!=t._name&&(i.id=t._name),l.each(fe,(function(n){var r=n.get,s=n.type,f=t[r]();if(n.exportFilter?n.exportFilter(t,f):!o||!l.equals(o[r](),f)){if("color"===s&&null!=f){var d=f.getAlpha();d<1&&(i[n.attribute+"-opacity"]=d)}"style"===s?a.push(n.attribute+": "+f):i[n.attribute]=null==f?"none":"color"===s?f.gradient?function(t){var n=c(t,"color");if(!n){var r,i=t.getGradient(),o=i._radial,a=t.getOrigin(),s=t.getDestination();if(o){r={cx:a.x,cy:a.y,r:a.getDistance(s)};var l=t.getHighlight();l&&(r.fx=l.x,r.fy=l.y)}else r={x1:a.x,y1:a.y,x2:s.x,y2:s.y};r.gradientUnits="userSpaceOnUse",n=le.create((o?"radial":"linear")+"Gradient",r,e);for(var f=i._stops,d=0,p=f.length;d<p;d++){var h=f[d],g=h._color,v=g.getAlpha(),m=h._offset;r={offset:null==m?d/(p-1):m},g&&(r["stop-color"]=g.toCSS(!0)),v<1&&(r["stop-opacity"]=v),n.appendChild(le.create("stop",r,e))}u(t,n,"color")}return"url(#"+n.id+")"}(f):f.toCSS(!0):"array"===s?f.join(","):"lookup"===s?n.toSVG[f]:f}})),a.length&&(i.style=a.join(";")),1===i.opacity&&delete i.opacity,t._visible||(i.visibility="hidden"),le.set(n,i,e)}function c(e,t){return i||(i={ids:{},svgs:{}}),e&&i.svgs[t+"-"+(e._id||e.__id||(e.__id=m.get("svg")))]}function u(e,t,n){i||c();var r=i.ids[n]=(i.ids[n]||0)+1;t.id=n+"-"+r,i.svgs[n+"-"+(e._id||e.__id)]=t}function f(e,t){var n=e,r=null;if(i){for(var o in n="svg"===e.nodeName.toLowerCase()&&e,i.svgs)r||(n||(n=le.create("svg")).appendChild(e),r=n.insertBefore(le.create("defs"),n.firstChild)),r.appendChild(i.svgs[o]);i=null}return t.asString?(new a.XMLSerializer).serializeToString(n):n}function d(e,t,n){var r=o[e._class],i=r&&r(e,t);if(i){var a=t.onExport;a&&(i=a(e,i,t)||i);var c=JSON.stringify(e._data);c&&"{}"!==c&&"null"!==c&&i.setAttribute("data-paper-data",c)}return i&&s(e,i,n)}function p(t){return t||(t={}),e=new g(t.precision),t}k.inject({exportSVG:function(e){return f(d(this,e=p(e),!0),e)}}),C.inject({exportSVG:function(n){n=p(n);var r=this._children,i=this.getView(),o=l.pick(n.bounds,"view"),a=n.matrix||"view"===o&&i._matrix,s=a&&S.read([a]),c="view"===o?new x([0,0],i.getViewSize()):"content"===o?k._getBounds(r,s,{stroke:!0}).rect:x.read([o],0,{readNull:!0}),u={version:"1.1",xmlns:le.svg,"xmlns:xlink":le.xlink};c&&(u.width=c.width,u.height=c.height,(c.x||0===c.x||c.y||0===c.y)&&(u.viewBox=e.rectangle(c)));var h=le.create("svg",u,e),g=h;s&&!s.isIdentity()&&(g=h.appendChild(le.create("g",t(s),e)));for(var v=0,m=r.length;v<m;v++)g.appendChild(d(r[v],n,!0));return f(h,n)}})},new function(){var e,t={};function n(t,n,r,i,o,a){var s=le.get(t,n)||a,c=null==s?i?null:r?"":0:r?s:parseFloat(s);return/%\s*$/.test(s)?c/100*(o?1:e[/x|^width/.test(n)?"width":"height"]):c}function r(e,t,r,i,o,a,s){return t=n(e,t||"x",!1,i,o,a),r=n(e,r||"y",!1,i,o,s),!i||null!=t&&null!=r?new y(t,r):null}function i(e,t,r,i,o){return t=n(e,t||"width",!1,i,o),r=n(e,r||"height",!1,i,o),!i||null!=t&&null!=r?new w(t,r):null}function o(e,t,n){return"none"===e?null:"number"===t?parseFloat(e):"array"===t?e?e.split(/[\s,]+/g).map(parseFloat):[]:"color"===t?O(e)||e:"lookup"===t?n[e]:e}function f(e,t,n,r){var i=e.childNodes,o="clippath"===t,a="defs"===t,s=new T,c=s._project,u=c._currentStyle,l=[];if(o||a||(s=_(s,e,r),c._currentStyle=s._style.clone()),r)for(var f=e.querySelectorAll("defs"),d=0,p=f.length;d<p;d++)E(f[d],n,!1);for(d=0,p=i.length;d<p;d++){var h,g=i[d];1!==g.nodeType||/^defs$/i.test(g.nodeName)||!(h=E(g,n,!1))||h instanceof A||l.push(h)}return s.addChildren(l),o&&(s=_(s.reduce(),e,r)),c._currentStyle=u,(o||a)&&(s.remove(),s=null),s}function d(e,t){for(var n=e.getAttribute("points").match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g),r=[],i=0,o=n.length;i<o;i+=2)r.push(new y(parseFloat(n[i]),parseFloat(n[i+1])));var a=new F(r);return"polygon"===t&&a.closePath(),a}function p(e,i){var o,a=(n(e,"href",!0)||"").substring(1),s="radialgradient"===i;if(a)(o=t[a].getGradient())._radial^s&&((o=o.clone())._radial=s);else{for(var c=e.childNodes,u=[],l=0,f=c.length;l<f;l++){var d=c[l];1===d.nodeType&&u.push(_(new $,d))}o=new K(u,s)}var p,h,g,v="userSpaceOnUse"!==n(e,"gradientUnits",!0);return s?(h=(p=r(e,"cx","cy",!1,v,"50%","50%")).add(n(e,"r",!1,!1,v,"50%"),0),g=r(e,"fx","fy",!0,v)):(p=r(e,"x1","y1",!1,v,"0%","0%"),h=r(e,"x2","y2",!1,v,"100%","0%")),_(new G(o,p,h,g),e)._scaleToBounds=v,null}var h={"#document":function(e,t,n,r){for(var i=e.childNodes,o=0,a=i.length;o<a;o++){var s=i[o];if(1===s.nodeType)return E(s,n,r)}},g:f,svg:f,clippath:f,polygon:d,polyline:d,path:function(e){return B.create(e.getAttribute("d"))},lineargradient:p,radialgradient:p,image:function(e){var t=new I(n(e,"href",!0));return t.on("load",(function(){var t=i(e);this.setSize(t);var n=r(e).add(t.divide(2));this._matrix.append((new S).translate(n))})),t},symbol:function(e,t,n,r){return new A(f(e,t,n,r),!0)},defs:f,use:function(e){var i=(n(e,"href",!0)||"").substring(1),o=t[i],a=r(e);return o?o instanceof A?o.place(a):o.clone().translate(a):null},circle:function(e){return new P.Circle(r(e,"cx","cy"),n(e,"r"))},ellipse:function(e){return new P.Ellipse({center:r(e,"cx","cy"),radius:i(e,"rx","ry")})},rect:function(e){return new P.Rectangle(new x(r(e),i(e)),i(e,"rx","ry"))},line:function(e){return new F.Line(r(e,"x1","y1"),r(e,"x2","y2"))},text:function(e){var t=new q(r(e).add(r(e,"dx","dy")));return t.setContent(e.textContent.trim()||""),t},switch:f};function g(e,t,n,r){if(e.transform){for(var i=(r.getAttribute(n)||"").split(/\)\s*/g),o=new S,a=0,s=i.length;a<s;a++){var c=i[a];if(!c)break;for(var u=c.split(/\(\s*/),l=u[0],f=u[1].split(/[\s,]+/g),d=0,p=f.length;d<p;d++)f[d]=parseFloat(f[d]);switch(l){case"matrix":o.append(new S(f[0],f[1],f[2],f[3],f[4],f[5]));break;case"rotate":o.rotate(f[0],f[1]||0,f[2]||0);break;case"translate":o.translate(f[0],f[1]||0);break;case"scale":o.scale(f);break;case"skewX":o.skew(f[0],0);break;case"skewY":o.skew(0,f[0])}}e.transform(o)}}function v(e,t,n){var r="fill-opacity"===n?"getFillColor":"getStrokeColor",i=e[r]&&e[r]();i&&i.setAlpha(parseFloat(t))}var m=l.set(l.each(fe,(function(e){this[e.attribute]=function(t,n){if(t[e.set]&&(t[e.set](o(n,e.type,e.fromSVG)),"color"===e.type)){var r=t[e.get]();if(r&&r._scaleToBounds){var i=t.getBounds();r.transform((new S).translate(i.getPoint()).scale(i.getSize()))}}}}),{}),{id:function(e,n){t[n]=e,e.setName&&e.setName(n)},"clip-path":function(e,t){var n=O(t);if(n){if((n=n.clone()).setClipMask(!0),!(e instanceof T))return new T(n,e);e.insertChild(0,n)}},gradientTransform:g,transform:g,"fill-opacity":v,"stroke-opacity":v,visibility:function(e,t){e.setVisible&&e.setVisible("visible"===t)},display:function(e,t){e.setVisible&&e.setVisible(null!==t)},"stop-color":function(e,t){e.setColor&&e.setColor(t)},"stop-opacity":function(e,t){e._color&&e._color.setAlpha(parseFloat(t))},offset:function(e,t){if(e.setOffset){var n=t.match(/(.*)%$/);e.setOffset(n?n[1]/100:parseFloat(t))}},viewBox:function(e,t,n,r,a){var s,c=new x(o(t,"array")),u=i(r,null,null,!0);if(e instanceof T){var l=u?u.divide(c.getSize()):1,f=(new S).scale(l).translate(c.getPoint().negate());s=e}else e instanceof A&&(u&&c.setSize(u),s=e._item);if(s){if("visible"!==b(r,"overflow",a)){var d=new P.Rectangle(c);d.setClipMask(!0),s.addChild(d)}f&&s.transform(f)}}});function b(e,t,n){var r=e.attributes[t],i=r&&r.value;if(!i&&e.style){var o=l.camelize(t);(i=e.style[o])||n.node[o]===n.parent[o]||(i=n.node[o])}return i?"none"===i?null:i:s}function _(e,t,n){var r=t.parentNode,i={node:X.getStyles(t)||{},parent:!n&&!/^defs$/i.test(r.tagName)&&X.getStyles(r)||{}};return l.each(m,(function(n,r){var o=b(t,r,i);e=o!==s&&n(e,o,r,t,i)||e})),e}function O(e){var n=e&&e.match(/\((?:["'#]*)([^"')]+)/),r=n&&n[1],i=r&&t[c?r.replace(c.location.href.split("#")[0]+"#",""):r];return i&&i._scaleToBounds&&((i=i.clone())._scaleToBounds=!0),i}function E(n,r,o){var a,s,c,f=n.nodeName.toLowerCase(),d="#document"!==f,p=u.body;o&&d&&(e=de.getView().getSize(),e=i(n,null,null,!0)||e,a=le.create("svg",{style:"stroke-width: 1px; stroke-miterlimit: 10"}),s=n.parentNode,c=n.nextSibling,a.appendChild(n),p.appendChild(a));var g=de.settings,v=g.applyMatrix,m=g.insertItems;g.applyMatrix=!1,g.insertItems=!1;var y=h[f],b=y&&y(n,f,r,o)||null;if(g.insertItems=m,g.applyMatrix=v,b){!d||b instanceof T||(b=_(b,n,o));var w=r.onImport,x=d&&n.getAttribute("data-paper-data");w&&(b=w(n,b,r)||b),r.expandShapes&&b instanceof P&&(b.remove(),b=b.toPath()),x&&(b._data=JSON.parse(x))}return a&&(p.removeChild(a),s&&(c?s.insertBefore(n,c):s.appendChild(n))),o&&(t={},b&&l.pick(r.applyMatrix,v)&&b.matrix.apply(!0,!0)),b}function j(e,t,n){if(!e)return null;t="function"==typeof t?{onLoad:t}:t||{};var r=de,i=null;function o(o){try{var u="object"==typeof o?o:(new a.DOMParser).parseFromString(o.trim(),"image/svg+xml");if(!u.nodeName)throw u=null,new Error("Unsupported SVG source: "+e);de=r,i=E(u,t,!0),t&&!1===t.insert||n._insertItem(s,i);var l=t.onLoad;l&&l(i,o)}catch(e){c(e)}}function c(e,n){var r=t.onError;if(!r)throw new Error(e);r(e,n)}if("string"!=typeof e||/^[\s\S]*</.test(e)){if("undefined"!=typeof File&&e instanceof File){var l=new FileReader;return l.onload=function(){o(l.result)},l.onerror=function(){c(l.error)},l.readAsText(e)}o(e)}else{var f=u.getElementById(e);f?o(f):se({url:e,async:!0,onLoad:o,onError:c})}return i}k.inject({importSVG:function(e,t){return j(e,t,this)}}),C.inject({importSVG:function(e,t){return this.activate(),j(e,t,this)}})},l.exports.PaperScript=function(){var e,t,f,p=this,h=p.acorn;if(!h)try{h=n(942)}catch(e){}h||(h=e=t={},f=function(e){"use strict";var t,n,r,i;e.version="0.5.0",e.parse=function(e,i){return n=String(e),r=n.length,a(i),Ge(),function(e){m=y=s,t.locations&&(b=new qe),w=x=null,_=[],Ye();var n=e||lt(),r=!0;for(e||(n.body=[]);d!==P;){var i=xt();n.body.push(i),r&&pt(i)&&st(!0),r=!1}return dt(n,"Program")}(t.program)};var o=e.defaultOptions={ecmaVersion:5,strictSemicolons:!1,allowTrailingCommas:!0,forbidReserved:!1,allowReturnOutsideFunction:!1,locations:!1,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null};function a(e){for(var n in t=e||{},o)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=o[n]);i=t.sourceFile||null}var s,c,u,l,f,d,p,h,g,v,m,y,b,w,_,x,O=e.getLineInfo=function(e,t){for(var n=1,r=0;;){He.lastIndex=r;var i=He.exec(e);if(!(i&&i.index<t))break;++n,r=i.index+i[0].length}return{line:n,column:t-r}};function S(e,t){var r=O(n,e);t+=" ("+r.line+":"+r.column+")";var i=new SyntaxError(t);throw i.pos=e,i.loc=r,i.raisedAt=s,i}e.tokenize=function(e,i){n=String(e),r=n.length,a(i),Ge();var o={};function m(e){return y=u,Ye(e),o.start=c,o.end=u,o.startLoc=l,o.endLoc=f,o.type=d,o.value=p,o}return m.jumpTo=function(e,r){var i;if(s=e,t.locations)for(g=1,v=He.lastIndex=0;(i=He.exec(n))&&i.index<e;)++g,v=i.index+i[0].length;h=r,Xe()},m};var E=[],C={type:"num"},k={type:"regexp"},T={type:"string"},j={type:"name"},P={type:"eof"},I={keyword:"break"},R={keyword:"case",beforeExpr:!0},A={keyword:"catch"},M={keyword:"continue"},D={keyword:"debugger"},N={keyword:"default"},L={keyword:"do",isLoop:!0},z={keyword:"else",beforeExpr:!0},B={keyword:"finally"},F={keyword:"for",isLoop:!0},W={keyword:"function"},H={keyword:"if"},V={keyword:"return",beforeExpr:!0},U={keyword:"switch"},q={keyword:"throw",beforeExpr:!0},G={keyword:"try"},K={keyword:"var"},$={keyword:"while",isLoop:!0},Z={keyword:"with"},X={keyword:"new",beforeExpr:!0},Q={keyword:"this"},Y={keyword:"null",atomValue:null},J={keyword:"true",atomValue:!0},ee={keyword:"false",atomValue:!1},te={keyword:"in",binop:7,beforeExpr:!0},ne={break:I,case:R,catch:A,continue:M,debugger:D,default:N,do:L,else:z,finally:B,for:F,function:W,if:H,return:V,switch:U,throw:q,try:G,var:K,while:$,with:Z,null:Y,true:J,false:ee,new:X,in:te,instanceof:{keyword:"instanceof",binop:7,beforeExpr:!0},this:Q,typeof:{keyword:"typeof",prefix:!0,beforeExpr:!0},void:{keyword:"void",prefix:!0,beforeExpr:!0},delete:{keyword:"delete",prefix:!0,beforeExpr:!0}},re={type:"[",beforeExpr:!0},ie={type:"]"},oe={type:"{",beforeExpr:!0},ae={type:"}"},se={type:"(",beforeExpr:!0},ce={type:")"},ue={type:",",beforeExpr:!0},le={type:";",beforeExpr:!0},fe={type:":",beforeExpr:!0},de={type:"."},pe={type:"?",beforeExpr:!0},he={binop:10,beforeExpr:!0},ge={isAssign:!0,beforeExpr:!0},ve={isAssign:!0,beforeExpr:!0},me={postfix:!0,prefix:!0,isUpdate:!0},ye={prefix:!0,beforeExpr:!0},be={binop:1,beforeExpr:!0},we={binop:2,beforeExpr:!0},_e={binop:3,beforeExpr:!0},xe={binop:4,beforeExpr:!0},Oe={binop:5,beforeExpr:!0},Se={binop:6,beforeExpr:!0},Ee={binop:7,beforeExpr:!0},Ce={binop:8,beforeExpr:!0},ke={binop:9,prefix:!0,beforeExpr:!0},Te={binop:10,beforeExpr:!0};for(var je in e.tokTypes={bracketL:re,bracketR:ie,braceL:oe,braceR:ae,parenL:se,parenR:ce,comma:ue,semi:le,colon:fe,dot:de,question:pe,slash:he,eq:ge,name:j,eof:P,num:C,regexp:k,string:T},ne)e.tokTypes["_"+je]=ne[je];function Pe(e){e=e.split(" ");var t="",n=[];e:for(var r=0;r<e.length;++r){for(var i=0;i<n.length;++i)if(n[i][0].length==e[r].length){n[i].push(e[r]);continue e}n.push([e[r]])}function o(e){if(1==e.length)return t+="return str === "+JSON.stringify(e[0])+";";t+="switch(str){";for(var n=0;n<e.length;++n)t+="case "+JSON.stringify(e[n])+":";t+="return true}return false;"}if(n.length>3){for(n.sort((function(e,t){return t.length-e.length})),t+="switch(str.length){",r=0;r<n.length;++r){var a=n[r];t+="case "+a[0].length+":",o(a)}t+="}"}else o(e);return new Function("str",t)}var Ie,Re=Pe("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),Ae=Pe("class enum extends super const export import"),Me=Pe("implements interface let package private protected public static yield"),De=Pe("eval arguments"),Ne=Pe("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"),Le=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,ze="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ--ℝℤΩℨK--ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA--zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Be=new RegExp("["+ze+"]"),Fe=new RegExp("["+ze+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍--_]"),We=/[\n\r\u2028\u2029]/,He=/\r\n|[\n\r\u2028\u2029]/g,Ve=e.isIdentifierStart=function(e){return e<65?36===e:e<91||(e<97?95===e:e<123||e>=170&&Be.test(String.fromCharCode(e)))},Ue=e.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||e>=170&&Fe.test(String.fromCharCode(e))))};function qe(){this.line=g,this.column=s-v}function Ge(){g=1,s=v=0,h=!0,Xe()}function Ke(e,n){u=s,t.locations&&(f=new qe),d=e,Xe(),p=n,h=e.beforeExpr}function $e(){var e,r=t.onComment&&t.locations&&new qe,i=s,o=n.indexOf("*/",s+=2);if(-1===o&&S(s-2,"Unterminated comment"),s=o+2,t.locations)for(He.lastIndex=i;(e=He.exec(n))&&e.index<s;)++g,v=e.index+e[0].length;t.onComment&&t.onComment(!0,n.slice(i+2,o),i,s,r,t.locations&&new qe)}function Ze(){for(var e=s,i=t.onComment&&t.locations&&new qe,o=n.charCodeAt(s+=2);s<r&&10!==o&&13!==o&&8232!==o&&8233!==o;)++s,o=n.charCodeAt(s);t.onComment&&t.onComment(!1,n.slice(e+2,s),e,s,i,t.locations&&new qe)}function Xe(){for(;s<r;){var e=n.charCodeAt(s);if(32===e)++s;else if(13===e)++s,10===(i=n.charCodeAt(s))&&++s,t.locations&&(++g,v=s);else if(10===e||8232===e||8233===e)++s,t.locations&&(++g,v=s);else if(e>8&&e<14)++s;else if(47===e){var i;if(42===(i=n.charCodeAt(s+1)))$e();else{if(47!==i)break;Ze()}}else if(160===e)++s;else{if(!(e>=5760&&Le.test(String.fromCharCode(e))))break;++s}}}function Qe(e){switch(e){case 46:return function(){var e=n.charCodeAt(s+1);return e>=48&&e<=57?nt(!0):(++s,Ke(de))}();case 40:return++s,Ke(se);case 41:return++s,Ke(ce);case 59:return++s,Ke(le);case 44:return++s,Ke(ue);case 91:return++s,Ke(re);case 93:return++s,Ke(ie);case 123:return++s,Ke(oe);case 125:return++s,Ke(ae);case 58:return++s,Ke(fe);case 63:return++s,Ke(pe);case 48:var i=n.charCodeAt(s+1);if(120===i||88===i)return function(){s+=2;var e=tt(16);return null==e&&S(c+2,"Expected hexadecimal number"),Ve(n.charCodeAt(s))&&S(s,"Identifier directly after number"),Ke(C,e)}();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return nt(!1);case 34:case 39:return function(e){s++;for(var i="";;){s>=r&&S(c,"Unterminated string constant");var o=n.charCodeAt(s);if(o===e)return++s,Ke(T,i);if(92===o){o=n.charCodeAt(++s);var a=/^[0-7]+/.exec(n.slice(s,s+3));for(a&&(a=a[0]);a&&parseInt(a,8)>255;)a=a.slice(0,-1);if("0"===a&&(a=null),++s,a)x&&S(s-2,"Octal literal in strict mode"),i+=String.fromCharCode(parseInt(a,8)),s+=a.length-1;else switch(o){case 110:i+="\n";break;case 114:i+="\r";break;case 120:i+=String.fromCharCode(rt(2));break;case 117:i+=String.fromCharCode(rt(4));break;case 85:i+=String.fromCharCode(rt(8));break;case 116:i+="\t";break;case 98:i+="\b";break;case 118:i+="\v";break;case 102:i+="\f";break;case 48:i+="\0";break;case 13:10===n.charCodeAt(s)&&++s;case 10:t.locations&&(v=s,++g);break;default:i+=String.fromCharCode(o)}}else 13!==o&&10!==o&&8232!==o&&8233!==o||S(c,"Unterminated string constant"),i+=String.fromCharCode(o),++s}}(e);case 47:return function(){var e=n.charCodeAt(s+1);return h?(++s,et()):61===e?Je(ve,2):Je(he,1)}();case 37:case 42:return 61===n.charCodeAt(s+1)?Je(ve,2):Je(Te,1);case 124:case 38:return function(e){var t=n.charCodeAt(s+1);return t===e?Je(124===e?be:we,2):61===t?Je(ve,2):Je(124===e?_e:Oe,1)}(e);case 94:return 61===n.charCodeAt(s+1)?Je(ve,2):Je(xe,1);case 43:case 45:return function(e){var t=n.charCodeAt(s+1);return t===e?45==t&&62==n.charCodeAt(s+2)&&We.test(n.slice(y,s))?(s+=3,Ze(),Xe(),Ye()):Je(me,2):61===t?Je(ve,2):Je(ke,1)}(e);case 60:case 62:return function(e){var t=n.charCodeAt(s+1),r=1;return t===e?(r=62===e&&62===n.charCodeAt(s+2)?3:2,61===n.charCodeAt(s+r)?Je(ve,r+1):Je(Ce,r)):33==t&&60==e&&45==n.charCodeAt(s+2)&&45==n.charCodeAt(s+3)?(s+=4,Ze(),Xe(),Ye()):(61===t&&(r=61===n.charCodeAt(s+2)?3:2),Je(Ee,r))}(e);case 61:case 33:return function(e){return 61===n.charCodeAt(s+1)?Je(Se,61===n.charCodeAt(s+2)?3:2):Je(61===e?ge:ye,1)}(e);case 126:return Je(ye,1)}return!1}function Ye(e){if(e?s=c+1:c=s,t.locations&&(l=new qe),e)return et();if(s>=r)return Ke(P);var i=n.charCodeAt(s);if(Ve(i)||92===i)return ot();var o=Qe(i);if(!1===o){var a=String.fromCharCode(i);if("\\"===a||Be.test(a))return ot();S(s,"Unexpected character '"+a+"'")}return o}function Je(e,t){var r=n.slice(s,s+t);s+=t,Ke(e,r)}function et(){for(var e,t,i=s;;){s>=r&&S(i,"Unterminated regular expression");var o=n.charAt(s);if(We.test(o)&&S(i,"Unterminated regular expression"),e)e=!1;else{if("["===o)t=!0;else if("]"===o&&t)t=!1;else if("/"===o&&!t)break;e="\\"===o}++s}var a=n.slice(i,s);++s;var c=it();c&&!/^[gmsiy]*$/.test(c)&&S(i,"Invalid regexp flag");try{var u=new RegExp(a,c)}catch(e){e instanceof SyntaxError&&S(i,e.message),S(e)}return Ke(k,u)}function tt(e,t){for(var r=s,i=0,o=0,a=null==t?1/0:t;o<a;++o){var c,u=n.charCodeAt(s);if((c=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;++s,i=i*e+c}return s===r||null!=t&&s-r!==t?null:i}function nt(e){var t=s,r=!1,i=48===n.charCodeAt(s);e||null!==tt(10)||S(t,"Invalid number"),46===n.charCodeAt(s)&&(++s,tt(10),r=!0);var o=n.charCodeAt(s);69!==o&&101!==o||(43!==(o=n.charCodeAt(++s))&&45!==o||++s,null===tt(10)&&S(t,"Invalid number"),r=!0),Ve(n.charCodeAt(s))&&S(s,"Identifier directly after number");var a,c=n.slice(t,s);return r?a=parseFloat(c):i&&1!==c.length?/[89]/.test(c)||x?S(t,"Invalid number"):a=parseInt(c,8):a=parseInt(c,10),Ke(C,a)}function rt(e){var t=tt(16,e);return null===t&&S(c,"Bad character escape sequence"),t}function it(){Ie=!1;for(var e,t=!0,r=s;;){var i=n.charCodeAt(s);if(Ue(i))Ie&&(e+=n.charAt(s)),++s;else{if(92!==i)break;Ie||(e=n.slice(r,s)),Ie=!0,117!=n.charCodeAt(++s)&&S(s,"Expecting Unicode escape sequence \\uXXXX"),++s;var o=rt(4),a=String.fromCharCode(o);a||S(s-1,"Invalid Unicode escape"),(t?Ve(o):Ue(o))||S(s-4,"Invalid Unicode escape"),e+=a}t=!1}return Ie?e:n.slice(r,s)}function ot(){var e=it(),t=j;return!Ie&&Ne(e)&&(t=ne[e]),Ke(t,e)}function at(){m=c,y=u,b=f,Ye()}function st(e){if(x=e,s=c,t.locations)for(;s<v;)v=n.lastIndexOf("\n",v-2)+1,--g;Xe(),Ye()}function ct(){this.type=null,this.start=c,this.end=null}function ut(){this.start=l,this.end=null,null!==i&&(this.source=i)}function lt(){var e=new ct;return t.locations&&(e.loc=new ut),t.directSourceFile&&(e.sourceFile=t.directSourceFile),t.ranges&&(e.range=[c,0]),e}function ft(e){var n=new ct;return n.start=e.start,t.locations&&(n.loc=new ut,n.loc.start=e.loc.start),t.ranges&&(n.range=[e.range[0],0]),n}function dt(e,n){return e.type=n,e.end=y,t.locations&&(e.loc.end=b),t.ranges&&(e.range[1]=y),e}function pt(e){return t.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"use strict"===e.expression.value}function ht(e){if(d===e)return at(),!0}function gt(){return!t.strictSemicolons&&(d===P||d===ae||We.test(n.slice(y,c)))}function vt(){ht(le)||gt()||yt()}function mt(e){d===e?at():yt()}function yt(){S(c,"Unexpected token")}function bt(e){"Identifier"!==e.type&&"MemberExpression"!==e.type&&S(e.start,"Assigning to rvalue"),x&&"Identifier"===e.type&&De(e.name)&&S(e.start,"Assigning to "+e.name+" in strict mode")}var wt={kind:"loop"},_t={kind:"switch"};function xt(){(d===he||d===ve&&"/="==p)&&Ye(!0);var e=d,r=lt();switch(e){case I:case M:at();var i=e===I;ht(le)||gt()?r.label=null:d!==j?yt():(r.label=Nt(),vt());for(var o=0;o<_.length;++o){var a=_[o];if(null==r.label||a.name===r.label.name){if(null!=a.kind&&(i||"loop"===a.kind))break;if(r.label&&i)break}}return o===_.length&&S(r.start,"Unsyntactic "+e.keyword),dt(r,i?"BreakStatement":"ContinueStatement");case D:return at(),vt(),dt(r,"DebuggerStatement");case L:return at(),_.push(wt),r.body=xt(),_.pop(),mt($),r.test=Ot(),vt(),dt(r,"DoWhileStatement");case F:if(at(),_.push(wt),mt(se),d===le)return Et(r,null);if(d===K){var s=lt();return at(),kt(s,!0),dt(s,"VariableDeclaration"),1===s.declarations.length&&ht(te)?Ct(r,s):Et(r,s)}return s=Tt(!1,!0),ht(te)?(bt(s),Ct(r,s)):Et(r,s);case W:return at(),Mt(r,!0);case H:return at(),r.test=Ot(),r.consequent=xt(),r.alternate=ht(z)?xt():null,dt(r,"IfStatement");case V:return w||t.allowReturnOutsideFunction||S(c,"'return' outside of function"),at(),ht(le)||gt()?r.argument=null:(r.argument=Tt(),vt()),dt(r,"ReturnStatement");case U:at(),r.discriminant=Ot(),r.cases=[],mt(oe),_.push(_t);for(var u,l;d!=ae;)if(d===R||d===N){var f=d===R;u&&dt(u,"SwitchCase"),r.cases.push(u=lt()),u.consequent=[],at(),f?u.test=Tt():(l&&S(m,"Multiple default clauses"),l=!0,u.test=null),mt(fe)}else u||yt(),u.consequent.push(xt());return u&&dt(u,"SwitchCase"),at(),_.pop(),dt(r,"SwitchStatement");case q:return at(),We.test(n.slice(y,c))&&S(y,"Illegal newline after throw"),r.argument=Tt(),vt(),dt(r,"ThrowStatement");case G:if(at(),r.block=St(),r.handler=null,d===A){var h=lt();at(),mt(se),h.param=Nt(),x&&De(h.param.name)&&S(h.param.start,"Binding "+h.param.name+" in strict mode"),mt(ce),h.guard=null,h.body=St(),r.handler=dt(h,"CatchClause")}return r.guardedHandlers=E,r.finalizer=ht(B)?St():null,r.handler||r.finalizer||S(r.start,"Missing catch or finally clause"),dt(r,"TryStatement");case K:return at(),kt(r),vt(),dt(r,"VariableDeclaration");case $:return at(),r.test=Ot(),_.push(wt),r.body=xt(),_.pop(),dt(r,"WhileStatement");case Z:return x&&S(c,"'with' in strict mode"),at(),r.object=Ot(),r.body=xt(),dt(r,"WithStatement");case oe:return St();case le:return at(),dt(r,"EmptyStatement");default:var g=p,v=Tt();if(e===j&&"Identifier"===v.type&&ht(fe)){for(o=0;o<_.length;++o)_[o].name===g&&S(v.start,"Label '"+g+"' is already declared");var b=d.isLoop?"loop":d===U?"switch":null;return _.push({name:g,kind:b}),r.body=xt(),_.pop(),r.label=v,dt(r,"LabeledStatement")}return r.expression=v,vt(),dt(r,"ExpressionStatement")}}function Ot(){mt(se);var e=Tt();return mt(ce),e}function St(e){var t,n=lt(),r=!0,i=!1;for(n.body=[],mt(oe);!ht(ae);){var o=xt();n.body.push(o),r&&e&&pt(o)&&(t=i,st(i=!0)),r=!1}return i&&!t&&st(!1),dt(n,"BlockStatement")}function Et(e,t){return e.init=t,mt(le),e.test=d===le?null:Tt(),mt(le),e.update=d===ce?null:Tt(),mt(ce),e.body=xt(),_.pop(),dt(e,"ForStatement")}function Ct(e,t){return e.left=t,e.right=Tt(),mt(ce),e.body=xt(),_.pop(),dt(e,"ForInStatement")}function kt(e,t){for(e.declarations=[],e.kind="var";;){var n=lt();if(n.id=Nt(),x&&De(n.id.name)&&S(n.id.start,"Binding "+n.id.name+" in strict mode"),n.init=ht(ge)?Tt(!0,t):null,e.declarations.push(dt(n,"VariableDeclarator")),!ht(ue))break}return e}function Tt(e,t){var n=jt(t);if(!e&&d===ue){var r=ft(n);for(r.expressions=[n];ht(ue);)r.expressions.push(jt(t));return dt(r,"SequenceExpression")}return n}function jt(e){var t=function(e){var t=function(e){return function e(t,n,r){var i=d.binop;if(null!=i&&(!r||d!==te)&&i>n){var o=ft(t);o.left=t,o.operator=p;var a=d;at(),o.right=e(Pt(),i,r);var s=dt(o,a===be||a===we?"LogicalExpression":"BinaryExpression");return e(s,n,r)}return t}(Pt(),-1,e)}(e);if(ht(pe)){var n=ft(t);return n.test=t,n.consequent=Tt(!0),mt(fe),n.alternate=Tt(!0,e),dt(n,"ConditionalExpression")}return t}(e);if(d.isAssign){var n=ft(t);return n.operator=p,n.left=t,at(),n.right=jt(e),bt(t),dt(n,"AssignmentExpression")}return t}function Pt(){if(d.prefix){var e=lt(),t=d.isUpdate;return e.operator=p,e.prefix=!0,h=!0,at(),e.argument=Pt(),t?bt(e.argument):x&&"delete"===e.operator&&"Identifier"===e.argument.type&&S(e.start,"Deleting local variable in strict mode"),dt(e,t?"UpdateExpression":"UnaryExpression")}for(var n=It(Rt());d.postfix&&!gt();)(e=ft(n)).operator=p,e.prefix=!1,e.argument=n,bt(n),at(),n=dt(e,"UpdateExpression");return n}function It(e,t){var n;return ht(de)?((n=ft(e)).object=e,n.property=Nt(!0),n.computed=!1,It(dt(n,"MemberExpression"),t)):ht(re)?((n=ft(e)).object=e,n.property=Tt(),n.computed=!0,mt(ie),It(dt(n,"MemberExpression"),t)):!t&&ht(se)?((n=ft(e)).callee=e,n.arguments=Dt(ce,!1),It(dt(n,"CallExpression"),t)):e}function Rt(){switch(d){case Q:var e=lt();return at(),dt(e,"ThisExpression");case j:return Nt();case C:case T:case k:return(e=lt()).value=p,e.raw=n.slice(c,u),at(),dt(e,"Literal");case Y:case J:case ee:return(e=lt()).value=d.atomValue,e.raw=d.keyword,at(),dt(e,"Literal");case se:var r=l,i=c;at();var o=Tt();return o.start=i,o.end=u,t.locations&&(o.loc.start=r,o.loc.end=f),t.ranges&&(o.range=[i,u]),mt(ce),o;case re:return e=lt(),at(),e.elements=Dt(ie,!0,!0),dt(e,"ArrayExpression");case oe:return function(){var e=lt(),n=!0,r=!1;for(e.properties=[],at();!ht(ae);){if(n)n=!1;else if(mt(ue),t.allowTrailingCommas&&ht(ae))break;var i,o={key:At()},a=!1;if(ht(fe)?(o.value=Tt(!0),i=o.kind="init"):t.ecmaVersion>=5&&"Identifier"===o.key.type&&("get"===o.key.name||"set"===o.key.name)?(a=r=!0,i=o.kind=o.key.name,o.key=At(),d!==se&&yt(),o.value=Mt(lt(),!1)):yt(),"Identifier"===o.key.type&&(x||r))for(var s=0;s<e.properties.length;++s){var c=e.properties[s];if(c.key.name===o.key.name){var u=i==c.kind||a&&"init"===c.kind||"init"===i&&("get"===c.kind||"set"===c.kind);u&&!x&&"init"===i&&"init"===c.kind&&(u=!1),u&&S(o.key.start,"Redefinition of property")}}e.properties.push(o)}return dt(e,"ObjectExpression")}();case W:return e=lt(),at(),Mt(e,!1);case X:return function(){var e=lt();return at(),e.callee=It(Rt(),!0),ht(se)?e.arguments=Dt(ce,!1):e.arguments=E,dt(e,"NewExpression")}();default:yt()}}function At(){return d===C||d===T?Rt():Nt(!0)}function Mt(e,t){d===j?e.id=Nt():t?yt():e.id=null,e.params=[];var n=!0;for(mt(se);!ht(ce);)n?n=!1:mt(ue),e.params.push(Nt());var r=w,i=_;if(w=!0,_=[],e.body=St(!0),w=r,_=i,x||e.body.body.length&&pt(e.body.body[0]))for(var o=e.id?-1:0;o<e.params.length;++o){var a=o<0?e.id:e.params[o];if((Me(a.name)||De(a.name))&&S(a.start,"Defining '"+a.name+"' in strict mode"),o>=0)for(var s=0;s<o;++s)a.name===e.params[s].name&&S(a.start,"Argument name clash in strict mode")}return dt(e,t?"FunctionDeclaration":"FunctionExpression")}function Dt(e,n,r){for(var i=[],o=!0;!ht(e);){if(o)o=!1;else if(mt(ue),n&&t.allowTrailingCommas&&ht(e))break;r&&d===ue?i.push(null):i.push(Tt(!0))}return i}function Nt(e){var r=lt();return e&&"everywhere"==t.forbidReserved&&(e=!1),d===j?(!e&&(t.forbidReserved&&(3===t.ecmaVersion?Re:Ae)(p)||x&&Me(p))&&-1==n.slice(c,u).indexOf("\\")&&S(c,"The keyword '"+p+"' is reserved"),r.name=p):e&&d.keyword?r.name=d.keyword:yt(),h=!1,at(),dt(r,"Identifier")}},"object"==typeof e&&"object"==typeof t?f(e):(r=[e],(o="function"==typeof(i=f)?i.apply(e,r):i)===s||(t.exports=o)),h.version||(h=null));function g(e,t){return(p.acorn||h).parse(e,t)}var v={"+":"__add","-":"__subtract","*":"__multiply","/":"__divide","%":"__modulo","==":"__equals","!=":"__equals"},m={"-":"__negate","+":"__self"},b=l.each(["add","subtract","multiply","divide","modulo","equals","negate"],(function(e){this["__"+e]="#"+e}),{__self:function(){return this}});function _(e,t,n){var r=v[t];if(e&&e[r]){var i=e[r](n);return"!="===t?!i:i}switch(t){case"+":return e+n;case"-":return e-n;case"*":return e*n;case"/":return e/n;case"%":return e%n;case"==":return e==n;case"!=":return e!=n}}function x(e,t){var n=m[e];if(t&&t[n])return t[n]();switch(e){case"+":return+t;case"-":return-t}}function O(e,t){if(!e)return"";var n=[];function r(e){for(var t=0,r=n.length;t<r;t++){var i=n[t];if(i[0]>=e)break;e+=i[1]}return e}function i(t){return e.substring(r(t.range[0]),r(t.range[1]))}function o(t,i){for(var o=r(t.range[0]),a=r(t.range[1]),s=0,c=n.length-1;c>=0;c--)if(o>n[c][0]){s=c+1;break}n.splice(s,0,[o,i.length-a+o]),e=e.substring(0,o)+i+e.substring(a)}function s(t,n){switch(t.type){case"UnaryExpression":if(t.operator in m&&"Literal"!==t.argument.type){var a=i(t.argument);o(t,'$__("'+t.operator+'", '+a+")")}break;case"BinaryExpression":if(t.operator in v&&"Literal"!==t.left.type){var s=i(t.left),c=i(t.right),u=function(t,n){return e.substring(r(t.range[1]),r(n.range[0]))}(t.left,t.right),l=t.operator;o(t,"__$__("+s+","+u.replace(new RegExp("\\"+l),'"'+l+'"')+", "+c+")")}break;case"UpdateExpression":case"AssignmentExpression":var f=n&&n.type;if(!("ForStatement"===f||"BinaryExpression"===f&&/^[=!<>]/.test(n.operator)||"MemberExpression"===f&&n.computed))if("UpdateExpression"===t.type){var d=(a=i(t.argument))+" = "+(p="__$__("+a+', "'+t.operator[0]+'", 1)');t.prefix?d="("+d+")":"AssignmentExpression"!==f&&"VariableDeclarator"!==f&&"BinaryExpression"!==f||(i(n.left||n.id)===a&&(d=p),d=a+"; "+d),o(t,d)}else if(/^.=$/.test(t.operator)&&"Literal"!==t.left.type){s=i(t.left),c=i(t.right);var p=s+" = __$__("+s+', "'+t.operator[0]+'", '+c+")";o(t,/^\(.*\)$/.test(i(t))?"("+p+")":p)}}}var l,f=(t=t||{}).url||"",d=t.sourceMaps,p=t.paperFeatures||{},h=t.source||e,y=t.offset||0,b=de.agent,w=b.versionNumber,_=!1,x=/\r\n|\n|\r/gm;if(d&&(b.chrome&&w>=30||b.webkit&&w>=537.76||b.firefox&&w>=23||b.node)){if(b.node)y-=2;else if(c&&f&&!c.location.href.indexOf(f)){var O=u.getElementsByTagName("html")[0].innerHTML;y=O.substr(0,O.indexOf(e)+1).match(x).length+1}var S=["AA"+function(e){var t="";for(e=(Math.abs(e)<<1)+(e<0?1:0);e||!t;){var n=31&e;(e>>=5)&&(n|=32),t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[n]}return t}((_=y>0&&!(b.chrome&&w>=36||b.safari&&w>=600||b.firefox&&w>=40||b.node))?0:y)+"A"];S.length=(e.match(x)||[]).length+1+(_?y:0),l={version:3,file:f,names:[],mappings:S.join(";AACA"),sourceRoot:"",sources:[f],sourcesContent:[h]}}return!1===p.operatorOverloading&&!1===p.moduleExports||function e(t,n,r){if(t){for(var a in t)if("range"!==a&&"loc"!==a){var c=t[a];if(Array.isArray(c))for(var u=0,l=c.length;u<l;u++)e(c[u],t,r);else c&&"object"==typeof c&&e(c,t,r)}!1!==r.operatorOverloading&&s(t,n),!1!==r.moduleExports&&function(e){switch(e.type){case"ExportDefaultDeclaration":o({range:[e.start,e.declaration.start]},"module.exports = ");break;case"ExportNamedDeclaration":var t=e.declaration,n=e.specifiers;if(t){var r=t.declarations;r&&(r.forEach((function(e){o(e,"module.exports."+i(e))})),o({range:[e.start,t.start+t.kind.length]},""))}else if(n){var a=n.map((function(e){var t=i(e);return"module.exports."+t+" = "+t+"; "})).join("");a&&o(e,a)}}}(t)}}(g(e,{ranges:!0,preserveParens:!0,sourceType:"module"}),null,p),l&&(_&&(e=new Array(y+1).join("\n")+e),/^(inline|both)$/.test(d)&&(e+="\n//# sourceMappingURL=data:application/json;base64,"+a.btoa(unescape(encodeURIComponent(JSON.stringify(l))))),e+="\n//# sourceURL="+(f||"paperscript")),{url:f,source:h,code:e,map:l}}function S(e,t,n){de=t;var r,i=t.getView(),o=/\btool\.\w+|\s+on(?:Key|Mouse)(?:Up|Down|Move|Drag)\b/.test(e)&&!/\bnew\s+Tool\b/.test(e)?new oe:null,a=o?o._events:[],s=["onFrame","onResize"].concat(a),c=[],f=[],d="object"==typeof e?e:O(e,n);function p(t,n){for(var r in t)!n&&/^_/.test(r)||!new RegExp("([\\b\\s\\W]|^)"+r.replace(/\$/g,"\\$")+"\\b").test(e)||(c.push(r),f.push(t[r]))}e=d.code,p({__$__:_,$__:x,paper:t,tool:o},!0),p(t),e="var module = { exports: {} }; "+e,(m=l.each(s,(function(t){new RegExp("\\s+"+t+"\\b").test(e)&&(c.push(t),this.push("module.exports."+t+" = "+t+";"))}),[]).join("\n"))&&(e+="\n"+m),e+="\nreturn module.exports;";var h=de.agent;if(u&&(h.chrome||h.firefox&&h.versionNumber<40)){var g=u.createElement("script"),v=u.head||u.getElementsByTagName("head")[0];h.firefox&&(e="\n"+e),g.appendChild(u.createTextNode("document.__paperscript__ = function("+c+") {"+e+"\n}")),v.appendChild(g),r=u.__paperscript__,delete u.__paperscript__,v.removeChild(g)}else r=Function(c,e);var m,b=(m=r&&r.apply(t,f))||{};return l.each(a,(function(e){var t=b[e];t&&(o[e]=t)})),i&&(b.onResize&&i.setOnResize(b.onResize),i.emit("resize",{size:i.size,delta:new y}),b.onFrame&&i.setOnFrame(b.onFrame),i.requestUpdate()),m}function E(e){if(/^text\/(?:x-|)paperscript$/.test(e.type)&&"true"!==d.getAttribute(e,"ignore")){var t=d.getAttribute(e,"canvas"),n=u.getElementById(t),r=e.src||e.getAttribute("data-src"),i=d.hasAttribute(e,"async");if(!n)throw new Error('Unable to find canvas with id "'+t+'"');var o=d.get(n.getAttribute("data-paper-scope"))||(new d).setup(n);return n.setAttribute("data-paper-scope",o._id),r?se({url:r,async:i,mimeType:"text/plain",onLoad:function(e){S(e,o,r)}}):S(e.innerHTML,o,e.baseURI),e.setAttribute("data-paper-ignore","true"),o}}function C(){l.each(u&&u.getElementsByTagName("script"),E)}return y.inject(b),w.inject(b),G.inject(b),c&&("complete"===u.readyState?setTimeout(C):Q.add(c,{load:C})),{compile:O,execute:S,load:function(e){return e?E(e):C()},parse:g,calculateBinary:_,calculateUnary:x}}.call(this);var de=new(d.inject(l.exports,{Base:l,Numerical:v,Key:ne,DomEvent:Q,DomElement:X,document:u,window:c,Symbol:A,PlacedSymbol:R}));return de.agent.node&&n(607)(de),(o="function"==typeof(i=de)?i.call(t,n,t,e):i)===s||(e.exports=o),de}).call(this,"object"==typeof self?self:null)},function(e,t,n){"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(235),a=n(98),s=n(171),c=n(99),u=n(307),l=n(308),f=n(116),d=n(614),p=n(146),h=n(40),g=n(616),v=h.List,m=h.Record,y=h.Repeat,b=h.Map,w=h.OrderedMap,_=m({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),x=p("draft_tree_data_support")?c:s,O=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=i.prototype;return s.getEntityMap=function(){return u},s.getBlockMap=function(){return this.get("blockMap")},s.getSelectionBefore=function(){return this.get("selectionBefore")},s.getSelectionAfter=function(){return this.get("selectionAfter")},s.getBlockForKey=function(e){return this.getBlockMap().get(e)},s.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},s.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},s.getBlockAfter=function(e){return this.getBlockMap().skipUntil((function(t,n){return n===e})).skip(1).first()},s.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil((function(t,n){return n===e})).skip(1).first()},s.getBlocksAsArray=function(){return this.getBlockMap().toArray()},s.getFirstBlock=function(){return this.getBlockMap().first()},s.getLastBlock=function(){return this.getBlockMap().last()},s.getPlainText=function(e){return this.getBlockMap().map((function(e){return e?e.getText():""})).join(e||"\n")},s.getLastCreatedEntityKey=function(){return u.__getLastCreatedEntityKey()},s.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},s.createEntity=function(e,t,n){return u.__create(e,t,n),this},s.mergeEntityData=function(e,t){return u.__mergeData(e,t),this},s.replaceEntityData=function(e,t){return u.__replaceData(e,t),this},s.addEntity=function(e){return u.__add(e),this},s.getEntity=function(e){return u.__get(e)},s.getAllEntities=function(){return u.__getAll()},s.loadWithEntities=function(e){return u.__loadWithEntities(e)},i.createFromBlockArray=function(e,t){var n=Array.isArray(e)?e:e.contentBlocks,r=o.createFromArray(n),a=r.isEmpty()?new l:l.createEmpty(r.first().getKey());return new i({blockMap:r,entityMap:t||u,selectionBefore:a,selectionAfter:a})},i.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=e.split(t),r=n.map((function(e){return e=g(e),new x({key:f(),text:e,type:"unstyled",characterList:v(y(a.EMPTY,e.length))})}));return i.createFromBlockArray(r)},i.fromJS=function(e){return new i(r({},e,{blockMap:w(e.blockMap).map(i.createContentBlockFromJS),selectionBefore:new l(e.selectionBefore),selectionAfter:new l(e.selectionAfter)}))},i.createContentBlockFromJS=function(e){var t=e.characterList;return new x(r({},e,{data:b(e.data),characterList:null!=t?v((Array.isArray(t)?t:d(t)).map((function(e){return a.fromJS(e)}))):void 0}))},i}(_);e.exports=O},function(e,t,n){"use strict";var r=n(309),i=n(42),o="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",a="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",s=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ--ℝℤΩℨK--ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA--zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+o+a+"]"),c=new RegExp("["+o+a+"]");function u(e){var t=s.exec(e);return null==t?null:t[0]}function l(e){var t=u(e);return null==t?r.NEUTRAL:c.exec(t)?r.RTL:r.LTR}function f(e,t){if(t=t||r.NEUTRAL,!e.length)return t;var n=l(e);return n===r.NEUTRAL?t:n}function d(e,t){return t||(t=r.getGlobalDir()),r.isStrong(t)||i(!1),f(e,t)}var p={firstStrongChar:u,firstStrongCharDir:l,resolveBlockDir:f,getDirection:d,isDirectionLTR:function(e,t){return d(e,t)===r.LTR},isDirectionRTL:function(e,t){return d(e,t)===r.RTL}};e.exports=p},function(e,t,n){"use strict";var r=n(0),i=n(172),o=(0,n(40).Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:r.createElement("ul",{className:i("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:r.createElement("ol",{className:i("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:r.createElement("pre",{className:i("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});e.exports=o},function(e,t,n){"use strict";var r=n(626).notEmptyKey;function i(e,t){return r(t)&&"MUTABLE"===e.__get(t).getMutability()?t:null}e.exports=function(e,t){var n;if(t.isCollapsed()){var r=t.getAnchorKey(),o=t.getAnchorOffset();return o>0?(n=e.getBlockForKey(r).getEntityAt(o-1))!==e.getBlockForKey(r).getEntityAt(o)?null:i(e.getEntityMap(),n):null}var a=t.getStartKey(),s=t.getStartOffset(),c=e.getBlockForKey(a);return n=s===c.getLength()?null:c.getEntityAt(s),i(e.getEntityMap(),n)}},function(e,t,n){"use strict";var r=n(978);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";function r(e,t){return!!t&&(e===t.documentElement||e===t.body)}var i={getTop:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollTop=n.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=t:e.scrollLeft=t}};e.exports=i},function(e,t,n){"use strict";n(443);e.exports=function(e,t){var n=e.getSelection(),r=e.getCurrentContent(),i=n.getStartKey(),o=n.getStartOffset(),a=i,s=0;if(t>o){var c=r.getKeyBefore(i);if(null==c)a=i;else a=c,s=r.getBlockForKey(c).getText().length}else s=o-t;return n.merge({focusKey:a,focusOffset:s,isBackward:!0})}},function(e,t,n){"use strict";var r=n(635);e.exports=r},function(e,t,n){"use strict";var r=n(87),i=n(1006),o=r.isPlatform("Mac OS X"),a={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return o&&e.altKey},usesMacOSHeuristics:function(){return o},hasCommandModifier:function(e){return o?!!e.metaKey&&!e.altKey:a.isCtrlKeyCommand(e)},isSoftNewlineEvent:i};e.exports=a},function(e,t,n){var r=n(29),i=n(550),o=n(413);e.exports=function(e){return o(i(e,void 0,r),e+"")}},function(e,t,n){"use strict";n.r(t);var r=n(292);n.d(t,"borders",(function(){return r.h})),n.d(t,"border",(function(){return r.a})),n.d(t,"borderTop",(function(){return r.g})),n.d(t,"borderRight",(function(){return r.f})),n.d(t,"borderBottom",(function(){return r.b})),n.d(t,"borderLeft",(function(){return r.d})),n.d(t,"borderColor",(function(){return r.c})),n.d(t,"borderRadius",(function(){return r.e}));var i=n(208);n.d(t,"breakpoints",(function(){return i.a}));var o=n(69);n.d(t,"compose",(function(){return o.a}));var a=n(291);n.d(t,"styleFunctionSx",(function(){return a.b})),n.d(t,"css",(function(){return a.a}));var s=n(580);n.d(t,"display",(function(){return s.a}));var c=n(293);n.d(t,"flexbox",(function(){return c.d})),n.d(t,"flexBasis",(function(){return c.f})),n.d(t,"flexDirection",(function(){return c.g})),n.d(t,"flexWrap",(function(){return c.j})),n.d(t,"justifyContent",(function(){return c.k})),n.d(t,"alignItems",(function(){return c.b})),n.d(t,"alignContent",(function(){return c.a})),n.d(t,"order",(function(){return c.n})),n.d(t,"flex",(function(){return c.e})),n.d(t,"flexGrow",(function(){return c.h})),n.d(t,"flexShrink",(function(){return c.i})),n.d(t,"alignSelf",(function(){return c.c})),n.d(t,"justifyItems",(function(){return c.l})),n.d(t,"justifySelf",(function(){return c.m}));var u=n(294);n.d(t,"grid",(function(){return u.a})),n.d(t,"gridGap",(function(){return u.h})),n.d(t,"gridColumnGap",(function(){return u.g})),n.d(t,"gridRowGap",(function(){return u.j})),n.d(t,"gridColumn",(function(){return u.f})),n.d(t,"gridRow",(function(){return u.i})),n.d(t,"gridAutoFlow",(function(){return u.d})),n.d(t,"gridAutoColumns",(function(){return u.c})),n.d(t,"gridAutoRows",(function(){return u.e})),n.d(t,"gridTemplateColumns",(function(){return u.l})),n.d(t,"gridTemplateRows",(function(){return u.m})),n.d(t,"gridTemplateAreas",(function(){return u.k})),n.d(t,"gridArea",(function(){return u.b}));var l=n(296);n.d(t,"palette",(function(){return l.c})),n.d(t,"color",(function(){return l.b})),n.d(t,"bgcolor",(function(){return l.a}));var f=n(295);n.d(t,"positions",(function(){return f.b})),n.d(t,"position",(function(){return f.d})),n.d(t,"zIndex",(function(){return f.g})),n.d(t,"top",(function(){return f.f})),n.d(t,"right",(function(){return f.e})),n.d(t,"bottom",(function(){return f.a})),n.d(t,"left",(function(){return f.c}));var d=n(581);n.d(t,"shadows",(function(){return d.a}));var p=n(297);n.d(t,"sizing",(function(){return p.b})),n.d(t,"width",(function(){return p.j})),n.d(t,"maxWidth",(function(){return p.e})),n.d(t,"minWidth",(function(){return p.g})),n.d(t,"height",(function(){return p.c})),n.d(t,"maxHeight",(function(){return p.d})),n.d(t,"minHeight",(function(){return p.f})),n.d(t,"sizeWidth",(function(){return p.i})),n.d(t,"sizeHeight",(function(){return p.h})),n.d(t,"boxSizing",(function(){return p.a}));var h=n(318);n.d(t,"spacing",(function(){return h.b})),n.d(t,"createUnarySpacing",(function(){return h.a}));var g=n(22);n.d(t,"style",(function(){return g.a}));var v=n(298);n.d(t,"typography",(function(){return v.a})),n.d(t,"fontFamily",(function(){return v.b})),n.d(t,"fontSize",(function(){return v.c})),n.d(t,"fontStyle",(function(){return v.d})),n.d(t,"fontWeight",(function(){return v.e})),n.d(t,"letterSpacing",(function(){return v.f})),n.d(t,"lineHeight",(function(){return v.g})),n.d(t,"textAlign",(function(){return v.h}))},function(e,t){e.exports={}},function(e,t,n){var r=n(422),i=n(200),o=n(227),a=n(68),s=n(168);e.exports=function(e,t,n,c){if(!a(e))return e;for(var u=-1,l=(t=i(t,e)).length,f=l-1,d=e;null!=d&&++u<l;){var p=s(t[u]),h=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(u!=f){var g=d[p];void 0===(h=c?c(g,p,d):void 0)&&(h=a(g)?g:o(t[u+1])?[]:{})}r(d,p,h),d=d[p]}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicDropTargetPosition=void 0,t.MosaicDropTargetPosition={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"}},function(e,t,n){"use strict";n.r(t),n.d(t,"common",(function(){return r.a})),n.d(t,"red",(function(){return i.a})),n.d(t,"pink",(function(){return o.a})),n.d(t,"purple",(function(){return a})),n.d(t,"deepPurple",(function(){return s})),n.d(t,"indigo",(function(){return c.a})),n.d(t,"blue",(function(){return u.a})),n.d(t,"lightBlue",(function(){return l})),n.d(t,"cyan",(function(){return f})),n.d(t,"teal",(function(){return d})),n.d(t,"green",(function(){return p.a})),n.d(t,"lightGreen",(function(){return h})),n.d(t,"lime",(function(){return g})),n.d(t,"yellow",(function(){return v})),n.d(t,"amber",(function(){return m})),n.d(t,"orange",(function(){return y.a})),n.d(t,"deepOrange",(function(){return b})),n.d(t,"brown",(function(){return w})),n.d(t,"grey",(function(){return _.a})),n.d(t,"blueGrey",(function(){return x}));var r=n(183),i=n(213),o=n(212),a={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},s={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},c=n(211),u=n(215),l={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},f={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},d={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},p=n(216),h={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},g={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},v={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},m={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},y=n(214),b={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},w={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},_=n(210),x={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return f}));var r=n(1),i=n(4),o=n(0),a=(n(67),n(2),n(3));function s(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}var c=n(5),u=n(11),l=o.forwardRef((function(e,t){var n=e.children,c=e.classes,l=e.className,f=e.exclusive,d=void 0!==f&&f,p=e.onChange,h=e.orientation,g=void 0===h?"horizontal":h,v=e.size,m=void 0===v?"medium":v,y=e.value,b=Object(i.a)(e,["children","classes","className","exclusive","onChange","orientation","size","value"]),w=function(e,t){if(p){var n,r=y&&y.indexOf(t);y&&r>=0?(n=y.slice()).splice(r,1):n=y?y.concat(t):[t],p(e,n)}},_=function(e,t){p&&p(e,y===t?null:t)};return o.createElement("div",Object(r.a)({role:"group",className:Object(a.a)(c.root,l,"vertical"===g&&c.vertical),ref:t},b),o.Children.map(n,(function(e){return o.isValidElement(e)?o.cloneElement(e,{className:Object(a.a)(c.grouped,c["grouped".concat(Object(u.a)(g))],e.props.className),onChange:d?_:w,selected:void 0===e.props.selected?s(e.props.value,y):e.props.selected,size:e.props.size||m}):null})))})),f=Object(c.a)((function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},vertical:{flexDirection:"column"},grouped:{},groupedHorizontal:{"&:not(:first-child)":{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedVertical:{"&:not(:first-child)":{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},"&:not(:last-child)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}}),{name:"MuiToggleButtonGroup"})(l)},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d}));var r=n(4),i=n(1),o=n(0),a=(n(2),n(3)),s=n(24),c=n(5),u=n(190),l=n(11),f=o.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,f=e.disabled,d=void 0!==f&&f,p=e.disableFocusRipple,h=void 0!==p&&p,g=e.onChange,v=e.onClick,m=e.selected,y=e.size,b=void 0===y?"medium":y,w=e.value,_=Object(r.a)(e,["children","classes","className","disabled","disableFocusRipple","onChange","onClick","selected","size","value"]);return o.createElement(u.a,Object(i.a)({className:Object(a.a)(s.root,c,d&&s.disabled,m&&s.selected,"medium"!==b&&s["size".concat(Object(l.a)(b))]),disabled:d,focusRipple:!h,ref:t,onClick:function(e){v&&(v(e,w),e.isDefaultPrevented())||g&&g(e,w)},onChange:g,value:w,"aria-pressed":m},_),o.createElement("span",{className:s.label},n))})),d=Object(c.a)((function(e){return{root:Object(i.a)({},e.typography.button,{boxSizing:"border-box",borderRadius:e.shape.borderRadius,padding:11,border:"1px solid ".concat(Object(s.a)(e.palette.action.active,.12)),color:Object(s.a)(e.palette.action.active,.38),"&$selected":{color:e.palette.action.active,backgroundColor:Object(s.a)(e.palette.action.active,.12),"&:hover":{backgroundColor:Object(s.a)(e.palette.action.active,.15)},"& + &":{borderLeft:0,marginLeft:0}},"&$disabled":{color:Object(s.a)(e.palette.action.disabled,.12)},"&:hover":{textDecoration:"none",backgroundColor:Object(s.a)(e.palette.text.primary,.05),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}}}),disabled:{},selected:{},label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},sizeSmall:{padding:7,fontSize:e.typography.pxToRem(13)},sizeLarge:{padding:15,fontSize:e.typography.pxToRem(15)}}}),{name:"MuiToggleButton"})(f)},function(e,t,n){e.exports=self.fetch||(self.fetch=n(553).default||n(553))},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(67),n(2),n(33)),s=n(47),c=n(1124),u=n(338),l=n(31);function f(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function d(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function p(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function h(e,t,n,r,i,o){for(var a=!1,s=i(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return;a=!0}var c=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&p(s,o)&&!c)return void s.focus();s=i(e,s,n)}}var g="undefined"==typeof window?o.useEffect:o.useLayoutEffect,v=o.forwardRef((function(e,t){var n=e.actions,v=e.autoFocus,m=void 0!==v&&v,y=e.autoFocusItem,b=void 0!==y&&y,w=e.children,_=e.className,x=e.disabledItemsFocusable,O=void 0!==x&&x,S=e.disableListWrap,E=void 0!==S&&S,C=e.onKeyDown,k=e.variant,T=void 0===k?"selectedMenu":k,j=Object(i.a)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),P=o.useRef(null),I=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});g((function(){m&&P.current.focus()}),[m]),o.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!P.current.style.width;if(e.clientHeight<P.current.clientHeight&&n){var r="".concat(Object(u.a)(!0),"px");P.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,P.current.style.width="calc(100% + ".concat(r,")")}return P.current}}}),[]);var R=o.useCallback((function(e){P.current=a.findDOMNode(e)}),[]),A=Object(l.a)(R,t),M=-1;o.Children.forEach(w,(function(e,t){o.isValidElement(e)&&(e.props.disabled||("selectedMenu"===T&&e.props.selected||-1===M)&&(M=t))}));var D=o.Children.map(w,(function(e,t){if(t===M){var n={};return b&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===T&&(n.tabIndex=0),o.cloneElement(e,n)}return e}));return o.createElement(c.a,Object(r.a)({role:"menu",ref:A,className:_,onKeyDown:function(e){var t=P.current,n=e.key,r=Object(s.a)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),h(t,r,E,O,f);else if("ArrowUp"===n)e.preventDefault(),h(t,r,E,O,d);else if("Home"===n)e.preventDefault(),h(t,null,E,O,f);else if("End"===n)e.preventDefault(),h(t,null,E,O,d);else if(1===n.length){var i=I.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);var c=r&&!i.repeating&&p(r,i);i.previousKeyMatched&&(c||h(t,r,!1,O,f,i))?e.preventDefault():i.previousKeyMatched=!1}C&&C(e)},tabIndex:m?0:-1},j),D)}));t.a=v},function(e,t,n){"use strict";var r=n(0),i=n(33),o=(n(2),n(47)),a=n(31),s=n(39);function c(e){return e.substring(2).toLowerCase()}t.a=function(e){var t=e.children,n=e.disableReactTree,u=void 0!==n&&n,l=e.mouseEvent,f=void 0===l?"onClick":l,d=e.onClickAway,p=e.touchEvent,h=void 0===p?"onTouchEnd":p,g=r.useRef(!1),v=r.useRef(null),m=r.useRef(!1),y=r.useRef(!1);r.useEffect((function(){return setTimeout((function(){m.current=!0}),0),function(){m.current=!1}}),[]);var b=r.useCallback((function(e){v.current=i.findDOMNode(e)}),[]),w=Object(a.a)(t.ref,b),_=Object(s.a)((function(e){var t=y.current;if(y.current=!1,m.current&&v.current&&!function(e){return document.documentElement.clientWidth<e.clientX||document.documentElement.clientHeight<e.clientY}(e))if(g.current)g.current=!1;else{var n;if(e.composedPath)n=e.composedPath().indexOf(v.current)>-1;else n=!Object(o.a)(v.current).documentElement.contains(e.target)||v.current.contains(e.target);n||!u&&t||d(e)}})),x=function(e){return function(n){y.current=!0;var r=t.props[e];r&&r(n)}},O={ref:w};return!1!==h&&(O[h]=x(h)),r.useEffect((function(){if(!1!==h){var e=c(h),t=Object(o.a)(v.current),n=function(){g.current=!0};return t.addEventListener(e,_),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,_),t.removeEventListener("touchmove",n)}}}),[_,h]),!1!==f&&(O[f]=x(f)),r.useEffect((function(){if(!1!==f){var e=c(f),t=Object(o.a)(v.current);return t.addEventListener(e,_),function(){t.removeEventListener(e,_)}}}),[_,f]),r.createElement(r.Fragment,null,r.cloneElement(t,O))}},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(184),c=n(5),u=n(11),l=n(89),f=n(125),d=o.forwardRef((function(e,t){var n=e.children,c=e.classes,d=e.className,p=e.color,h=void 0===p?"primary":p,g=e.component,v=void 0===g?"div":g,m=e.disabled,y=void 0!==m&&m,b=e.error,w=void 0!==b&&b,_=e.fullWidth,x=void 0!==_&&_,O=e.focused,S=e.hiddenLabel,E=void 0!==S&&S,C=e.margin,k=void 0===C?"none":C,T=e.required,j=void 0!==T&&T,P=e.size,I=e.variant,R=void 0===I?"standard":I,A=Object(i.a)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),M=o.useState((function(){var e=!1;return n&&o.Children.forEach(n,(function(t){if(Object(l.a)(t,["Input","Select"])){var n=Object(l.a)(t,["Select"])?t.props.input:t;n&&Object(s.a)(n.props)&&(e=!0)}})),e})),D=M[0],N=M[1],L=o.useState((function(){var e=!1;return n&&o.Children.forEach(n,(function(t){Object(l.a)(t,["Input","Select"])&&Object(s.b)(t.props,!0)&&(e=!0)})),e})),z=L[0],B=L[1],F=o.useState(!1),W=F[0],H=F[1],V=void 0!==O?O:W;y&&V&&H(!1);var U=o.useCallback((function(){B(!0)}),[]),q={adornedStart:D,setAdornedStart:N,color:h,disabled:y,error:w,filled:z,focused:V,fullWidth:x,hiddenLabel:E,margin:("small"===P?"dense":void 0)||k,onBlur:function(){H(!1)},onEmpty:o.useCallback((function(){B(!1)}),[]),onFilled:U,onFocus:function(){H(!0)},registerEffect:void 0,required:j,variant:R};return o.createElement(f.a.Provider,{value:q},o.createElement(v,Object(r.a)({className:Object(a.a)(c.root,d,"none"!==k&&c["margin".concat(Object(u.a)(k))],x&&c.fullWidth),ref:t},A),n))}));t.a=Object(c.a)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(d)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(33)),s=n(73),c=n(3),u=n(47),l=n(149),f=n(82),d=n(5),p=n(255),h=n(476),g=n(140);function v(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function m(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function y(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function b(e){return"function"==typeof e?e():e}var w=o.forwardRef((function(e,t){var n=e.action,d=e.anchorEl,w=e.anchorOrigin,_=void 0===w?{vertical:"top",horizontal:"left"}:w,x=e.anchorPosition,O=e.anchorReference,S=void 0===O?"anchorEl":O,E=e.children,C=e.classes,k=e.className,T=e.container,j=e.elevation,P=void 0===j?8:j,I=e.getContentAnchorEl,R=e.marginThreshold,A=void 0===R?16:R,M=e.onEnter,D=e.onEntered,N=e.onEntering,L=e.onExit,z=e.onExited,B=e.onExiting,F=e.open,W=e.PaperProps,H=void 0===W?{}:W,V=e.transformOrigin,U=void 0===V?{vertical:"top",horizontal:"left"}:V,q=e.TransitionComponent,G=void 0===q?h.a:q,K=e.transitionDuration,$=void 0===K?"auto":K,Z=e.TransitionProps,X=void 0===Z?{}:Z,Q=Object(i.a)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),Y=o.useRef(),J=o.useCallback((function(e){if("anchorPosition"===S)return x;var t=b(d),n=(t&&1===t.nodeType?t:Object(u.a)(Y.current).body).getBoundingClientRect(),r=0===e?_.vertical:"center";return{top:n.top+v(n,r),left:n.left+m(n,_.horizontal)}}),[d,_.horizontal,_.vertical,x,S]),ee=o.useCallback((function(e){var t=0;if(I&&"anchorEl"===S){var n=I(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[_.vertical,S,I]),te=o.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:v(e,U.vertical)+t,horizontal:m(e,U.horizontal)}}),[U.horizontal,U.vertical]),ne=o.useCallback((function(e){var t=ee(e),n={width:e.offsetWidth,height:e.offsetHeight},r=te(n,t);if("none"===S)return{top:null,left:null,transformOrigin:y(r)};var i=J(t),o=i.top-r.vertical,a=i.left-r.horizontal,s=o+n.height,c=a+n.width,u=Object(l.a)(b(d)),f=u.innerHeight-A,p=u.innerWidth-A;if(o<A){var h=o-A;o-=h,r.vertical+=h}else if(s>f){var g=s-f;o-=g,r.vertical+=g}if(a<A){var v=a-A;a-=v,r.horizontal+=v}else if(c>p){var m=c-p;a-=m,r.horizontal+=m}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:y(r)}}),[d,S,J,ee,te,A]),re=o.useCallback((function(){var e=Y.current;if(e){var t=ne(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[ne]),ie=o.useCallback((function(e){Y.current=a.findDOMNode(e)}),[]);o.useEffect((function(){F&&re()})),o.useImperativeHandle(n,(function(){return F?{updatePosition:function(){re()}}:null}),[F,re]),o.useEffect((function(){if(F){var e=Object(s.a)((function(){re()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[F,re]);var oe=$;"auto"!==$||G.muiSupportAuto||(oe=void 0);var ae=T||(d?Object(u.a)(b(d)).body:void 0);return o.createElement(p.a,Object(r.a)({container:ae,open:F,ref:t,BackdropProps:{invisible:!0},className:Object(c.a)(C.root,k)},Q),o.createElement(G,Object(r.a)({appear:!0,in:F,onEnter:M,onEntered:D,onExit:L,onExited:z,onExiting:B,timeout:oe},X,{onEntering:Object(f.a)((function(e,t){N&&N(e,t),re()}),X.onEntering)}),o.createElement(g.a,Object(r.a)({elevation:P,ref:ie},H,{className:Object(c.a)(C.paper,H.className)}),E)))}));t.a=Object(d.a)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(w)},function(e,t,n){var r=n(427);function i(e,t,n){var o=r(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return o.placeholder=i.placeholder,o}i.placeholder={},e.exports=i},function(e,t,n){var r=n(1077),i=n(585);e.exports=function(e,t,n){return null==e?e:r(e,t,i(n))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(365)),i=a(n(1116)),o=n(117);function a(e){return e&&e.__esModule?e:{default:e}}var s={backends:[{backend:r.default,transition:o.MouseTransition},{backend:i.default,options:{enableMouseEvents:!0},preview:!0,transition:o.TouchTransition}]};t.default=s},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r.default})),n.d(t,"HTML5DragTransition",(function(){return r.HTML5DragTransition})),n.d(t,"TouchTransition",(function(){return r.TouchTransition})),n.d(t,"MouseTransition",(function(){return r.MouseTransition})),n.d(t,"createTransition",(function(){return r.createTransition})),n.d(t,"Preview",(function(){return g}));var r=n(117),i=n(0),o=n.n(i),a=n(2),s=n.n(a),c=n(654),u=o.a.createContext(),l=function(e){var t=Object(c.a)((function(e){return{currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging(),itemType:e.getItemType(),item:e.getItem()}}));if(!t.isDragging||null===t.currentOffset)return null;var n,r,i,a={itemType:t.itemType,item:t.item,style:(n=t.currentOffset,r="translate(".concat(n.x,"px, ").concat(n.y,"px)"),{pointerEvents:"none",position:"fixed",top:0,left:0,transform:r,WebkitTransform:r})};return i=e.children&&"function"==typeof e.children?e.children(a):e.children?e.children:e.generator(a),o.a.createElement(u.Provider,{value:a},i)};l.propTypes={generator:s.a.func,children:s.a.oneOfType([s.a.node,s.a.func])};var f=l;function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e){var t=d(Object(i.useState)(!1),2),n=t[0],a=t[1];return Object(i.useEffect)((function(){var e={backendChanged:function(e){a(e.previewEnabled())}};return r.PreviewManager.register(e),function(){r.PreviewManager.unregister(e)}})),n?o.a.createElement(f,e):null};h.Context=u,h.propTypes=f.propTypes;var g=h},function(e,t,n){var r=n(278),i=n(535),o=Object.prototype.hasOwnProperty,a=i((function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])}));e.exports=a},function(e,t,n){"use strict";(function(e){var r=n(344),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.a.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();t.a=s}).call(this,n(426)(e))},function(e,t){e.exports=function(e){return null===e}},function(e,t,n){
/*! @license DOMPurify 2.3.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.4/LICENSE */
e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor,o=Object.freeze,a=Object.seal,s=Object.create,c="undefined"!=typeof Reflect&&Reflect,u=c.apply,l=c.construct;u||(u=function(e,t,n){return e.apply(t,n)}),o||(o=function(e){return e}),a||(a=function(e){return e}),l||(l=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var f,d=x(Array.prototype.forEach),p=x(Array.prototype.pop),h=x(Array.prototype.push),g=x(String.prototype.toLowerCase),v=x(String.prototype.match),m=x(String.prototype.replace),y=x(String.prototype.indexOf),b=x(String.prototype.trim),w=x(RegExp.prototype.test),_=(f=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return l(f,t)});function x(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(e,t,r)}}function O(e,r){t&&t(e,null);for(var i=r.length;i--;){var o=r[i];if("string"==typeof o){var a=g(o);a!==o&&(n(r)||(r[i]=a),o=a)}e[o]=!0}return e}function S(t){var n=s(null),r=void 0;for(r in t)u(e,t,[r])&&(n[r]=t[r]);return n}function E(e,t){for(;null!==e;){var n=i(e,t);if(n){if(n.get)return x(n.get);if("function"==typeof n.value)return x(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}var C=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),j=o(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),I=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=o(["#text"]),A=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),D=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),N=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),L=a(/\{\{[\s\S]*|[\s\S]*\}\}/gm),z=a(/<%[\s\S]*|[\s\S]*%>/gm),B=a(/^data-[\-\w.\u00B7-\uFFFF]/),F=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=a(/^(?:\w+script|data):/i),V=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function q(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var G=function(){return"undefined"==typeof window?null:window},K=function(e,t){if("object"!==(void 0===e?"undefined":U(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G(),n=function(t){return e(t)};if(n.version="2.3.4",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,i=t.document,a=t.DocumentFragment,s=t.HTMLTemplateElement,c=t.Node,u=t.Element,l=t.NodeFilter,f=t.NamedNodeMap,x=void 0===f?t.NamedNodeMap||t.MozNamedAttrMap:f,$=t.HTMLFormElement,Z=t.DOMParser,X=t.trustedTypes,Q=u.prototype,Y=E(Q,"cloneNode"),J=E(Q,"nextSibling"),ee=E(Q,"childNodes"),te=E(Q,"parentNode");if("function"==typeof s){var ne=i.createElement("template");ne.content&&ne.content.ownerDocument&&(i=ne.content.ownerDocument)}var re=K(X,r),ie=re&&Ne?re.createHTML(""):"",oe=i,ae=oe.implementation,se=oe.createNodeIterator,ce=oe.createDocumentFragment,ue=oe.getElementsByTagName,le=r.importNode,fe={};try{fe=S(i).documentMode?i.documentMode:{}}catch(e){}var de={};n.isSupported="function"==typeof te&&ae&&void 0!==ae.createHTMLDocument&&9!==fe;var pe=L,he=z,ge=B,ve=F,me=H,ye=V,be=W,we=null,_e=O({},[].concat(q(C),q(k),q(T),q(P),q(R))),xe=null,Oe=O({},[].concat(q(A),q(M),q(D),q(N))),Se=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}})),Ee=null,Ce=null,ke=!0,Te=!0,je=!1,Pe=!1,Ie=!1,Re=!1,Ae=!1,Me=!1,De=!1,Ne=!1,Le=!0,ze=!0,Be=!1,Fe={},We=null,He=O({},["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"]),Ve=null,Ue=O({},["audio","video","img","source","image","track"]),qe=null,Ge=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml",Xe=Ze,Qe=!1,Ye=void 0,Je=["application/xhtml+xml","text/html"],et="text/html",tt=void 0,nt=null,rt=i.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},ot=function(e){nt&&nt===e||(e&&"object"===(void 0===e?"undefined":U(e))||(e={}),e=S(e),we="ALLOWED_TAGS"in e?O({},e.ALLOWED_TAGS):_e,xe="ALLOWED_ATTR"in e?O({},e.ALLOWED_ATTR):Oe,qe="ADD_URI_SAFE_ATTR"in e?O(S(Ge),e.ADD_URI_SAFE_ATTR):Ge,Ve="ADD_DATA_URI_TAGS"in e?O(S(Ue),e.ADD_DATA_URI_TAGS):Ue,We="FORBID_CONTENTS"in e?O({},e.FORBID_CONTENTS):He,Ee="FORBID_TAGS"in e?O({},e.FORBID_TAGS):{},Ce="FORBID_ATTR"in e?O({},e.FORBID_ATTR):{},Fe="USE_PROFILES"in e&&e.USE_PROFILES,ke=!1!==e.ALLOW_ARIA_ATTR,Te=!1!==e.ALLOW_DATA_ATTR,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=e.SAFE_FOR_TEMPLATES||!1,Ie=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,De=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_TRUSTED_TYPE||!1,Ae=e.FORCE_BODY||!1,Le=!1!==e.SANITIZE_DOM,ze=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Xe=e.NAMESPACE||Ze,e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ye=Ye=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Ye?function(e){return e}:g,Pe&&(Te=!1),De&&(Me=!0),Fe&&(we=O({},[].concat(q(R))),xe=[],!0===Fe.html&&(O(we,C),O(xe,A)),!0===Fe.svg&&(O(we,k),O(xe,M),O(xe,N)),!0===Fe.svgFilters&&(O(we,T),O(xe,M),O(xe,N)),!0===Fe.mathMl&&(O(we,P),O(xe,D),O(xe,N))),e.ADD_TAGS&&(we===_e&&(we=S(we)),O(we,e.ADD_TAGS)),e.ADD_ATTR&&(xe===Oe&&(xe=S(xe)),O(xe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&O(qe,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(We===He&&(We=S(We)),O(We,e.FORBID_CONTENTS)),ze&&(we["#text"]=!0),Ie&&O(we,["html","head","body"]),we.table&&(O(we,["tbody"]),delete Ee.tbody),o&&o(e),nt=e)},at=O({},["mi","mo","mn","ms","mtext"]),st=O({},["foreignobject","desc","title","annotation-xml"]),ct=O({},k);O(ct,T),O(ct,j);var ut=O({},P);O(ut,I);var lt=function(e){var t=te(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===$e)return t.namespaceURI===Ze?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(ct[n]);if(e.namespaceURI===Ke)return t.namespaceURI===Ze?"math"===n:t.namespaceURI===$e?"math"===n&&st[r]:Boolean(ut[n]);if(e.namespaceURI===Ze){if(t.namespaceURI===$e&&!st[r])return!1;if(t.namespaceURI===Ke&&!at[r])return!1;var i=O({},["title","style","font","a","script"]);return!ut[n]&&(i[n]||!ct[n])}return!1},ft=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},dt=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!xe[e])if(Me||De)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){var t=void 0,n=void 0;if(Ae)e="<remove></remove>"+e;else{var r=v(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===Ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=re?re.createHTML(e):e;if(Xe===Ze)try{t=(new Z).parseFromString(o,Ye)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Qe?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),Xe===Ze?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:a},ht=function(e){return se.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},gt=function(e){return e instanceof $&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof x)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},vt=function(e){return"object"===(void 0===c?"undefined":U(c))?e instanceof c:e&&"object"===(void 0===e?"undefined":U(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},mt=function(e,t,r){de[e]&&d(de[e],(function(e){e.call(n,t,r,nt)}))},yt=function(e){var t=void 0;if(mt("beforeSanitizeElements",e,null),gt(e))return ft(e),!0;if(v(e.nodeName,/[\u0080-\uFFFF]/))return ft(e),!0;var r=tt(e.nodeName);if(mt("uponSanitizeElement",e,{tagName:r,allowedTags:we}),!vt(e.firstElementChild)&&(!vt(e.content)||!vt(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return ft(e),!0;if("select"===r&&w(/<template/i,e.innerHTML))return ft(e),!0;if(!we[r]||Ee[r]){if(ze&&!We[r]){var i=te(e)||e.parentNode,o=ee(e)||e.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(Y(o[a],!0),J(e))}if(!Ee[r]&&wt(r)){if(Se.tagNameCheck instanceof RegExp&&w(Se.tagNameCheck,r))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(r))return!1}return ft(e),!0}return e instanceof u&&!lt(e)?(ft(e),!0):"noscript"!==r&&"noembed"!==r||!w(/<\/no(script|embed)/i,e.innerHTML)?(Pe&&3===e.nodeType&&(t=e.textContent,t=m(t,pe," "),t=m(t,he," "),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),mt("afterSanitizeElements",e,null),!1):(ft(e),!0)},bt=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in i||n in rt))return!1;if(Te&&!Ce[t]&&w(ge,t));else if(ke&&w(ve,t));else if(!xe[t]||Ce[t]){if(!(wt(e)&&(Se.tagNameCheck instanceof RegExp&&w(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&w(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&w(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if(qe[t]);else if(w(be,m(n,ye,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Ve[e])if(je&&!w(me,m(n,ye,"")));else if(n)return!1;return!0},wt=function(e){return e.indexOf("-")>0},_t=function(e){var t=void 0,r=void 0,i=void 0,o=void 0;mt("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe};for(o=a.length;o--;){var c=t=a[o],u=c.name,l=c.namespaceURI;if(r=b(t.value),i=tt(u),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,mt("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(dt(u,e),s.keepAttr))if(w(/\/>/i,r))dt(u,e);else{Pe&&(r=m(r,pe," "),r=m(r,he," "));var f=tt(e.nodeName);if(bt(f,i,r))try{l?e.setAttributeNS(l,u,r):e.setAttribute(u,r),p(n.removed)}catch(e){}}}mt("afterSanitizeAttributes",e,null)}},xt=function e(t){var n=void 0,r=ht(t);for(mt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)mt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof a&&e(n.content),_t(n));mt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,i){var o=void 0,s=void 0,u=void 0,l=void 0,f=void 0;if((Qe=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!vt(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!n.isSupported){if("object"===U(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(vt(e))return t.toStaticHTML(e.outerHTML)}return e}if(Re||ot(i),n.removed=[],"string"==typeof e&&(Be=!1),Be);else if(e instanceof c)1===(s=(o=pt("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?o=s:o.appendChild(s);else{if(!Me&&!Pe&&!Ie&&-1===e.indexOf("<"))return re&&Ne?re.createHTML(e):e;if(!(o=pt(e)))return Me?null:ie}o&&Ae&&ft(o.firstChild);for(var d=ht(Be?e:o);u=d.nextNode();)3===u.nodeType&&u===l||yt(u)||(u.content instanceof a&&xt(u.content),_t(u),l=u);if(l=null,Be)return e;if(Me){if(De)for(f=ce.call(o.ownerDocument);o.firstChild;)f.appendChild(o.firstChild);else f=o;return xe.shadowroot&&(f=le.call(r,f,!0)),f}var p=Ie?o.outerHTML:o.innerHTML;return Pe&&(p=m(p,pe," "),p=m(p,he," ")),re&&Ne?re.createHTML(p):p},n.setConfig=function(e){ot(e),Re=!0},n.clearConfig=function(){nt=null,Re=!1},n.isValidAttribute=function(e,t,n){nt||ot({});var r=tt(e),i=tt(t);return bt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(de[e]=de[e]||[],h(de[e],t))},n.removeHook=function(e){de[e]&&p(de[e])},n.removeHooks=function(e){de[e]&&(de[e]=[])},n.removeAllHooks=function(){de={}},n}()}()},function(e,t,n){var r=n(1081),i=n(1082);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){"use strict";(function(e){function r(e){o.length||(i(),!0),o[o.length]=e}n.d(t,"a",(function(){return r}));var i,o=[],a=0;function s(){for(;a<o.length;){var e=a;if(a+=1,o[e].call(),a>1024){for(var t=0,n=o.length-a;t<n;t++)o[t]=o[t+a];o.length-=a,a=0}}o.length=0,a=0,!1}var c,u,l,f=void 0!==e?e:self,d=f.MutationObserver||f.WebKitMutationObserver;function p(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}"function"==typeof d?(c=1,u=new d(s),l=document.createTextNode(""),u.observe(l,{characterData:!0}),i=function(){c=-c,l.data=c}):i=p(s),r.requestFlush=i,r.makeRequestCallFromTimer=p}).call(this,n(91))},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M10 17l5-5-5-5v10z"}),"ArrowRightSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M14 7l-5 5 5 5V7z"}),"ArrowLeftSharp");t.default=a},function(e,t,n){var r=n(416),i=n(203),o=n(204),a=n(288),s=o((function(e,t){return a(e)?r(e,i(t,1,a,!0)):[]}));e.exports=s},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){var r=n(203),i=n(1107),o=n(204),a=n(1111),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},function(e,t,n){var r=n(409),i=n(204),o=n(1112),a=n(288),s=i((function(e){return o(r(e,a))}));e.exports=s},function(e,t,n){"use strict";function r(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(1),i=n(41),o=n(4),a=n(0),s=(n(2),n(372)),c=n(36),u=n(55),l=n(31);function f(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var d={entering:{opacity:1,transform:f(1)},entered:{opacity:1,transform:"none"}},p=a.forwardRef((function(e,t){var n=e.children,p=e.disableStrictModeCompat,h=void 0!==p&&p,g=e.in,v=e.onEnter,m=e.onEntered,y=e.onEntering,b=e.onExit,w=e.onExited,_=e.onExiting,x=e.style,O=e.timeout,S=void 0===O?"auto":O,E=e.TransitionComponent,C=void 0===E?s.a:E,k=Object(o.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),T=a.useRef(),j=a.useRef(),P=Object(c.a)(),I=P.unstable_strictMode&&!h,R=a.useRef(null),A=Object(l.a)(n.ref,t),M=Object(l.a)(I?R:void 0,A),D=function(e){return function(t,n){if(e){var r=I?[R.current,t]:[t,n],o=Object(i.a)(r,2),a=o[0],s=o[1];void 0===s?e(a):e(a,s)}}},N=D(y),L=D((function(e,t){Object(u.b)(e);var n,r=Object(u.a)({style:x,timeout:S},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===S?(n=P.transitions.getAutoHeightDuration(e.clientHeight),j.current=n):n=i,e.style.transition=[P.transitions.create("opacity",{duration:n,delay:o}),P.transitions.create("transform",{duration:.666*n,delay:o})].join(","),v&&v(e,t)})),z=D(m),B=D(_),F=D((function(e){var t,n=Object(u.a)({style:x,timeout:S},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===S?(t=P.transitions.getAutoHeightDuration(e.clientHeight),j.current=t):t=r,e.style.transition=[P.transitions.create("opacity",{duration:t,delay:i}),P.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=f(.75),b&&b(e)})),W=D(w);return a.useEffect((function(){return function(){clearTimeout(T.current)}}),[]),a.createElement(C,Object(r.a)({appear:!0,in:g,nodeRef:I?R:void 0,onEnter:L,onEntered:z,onEntering:N,onExit:F,onExited:W,onExiting:B,addEndListener:function(e,t){var n=I?e:t;"auto"===S&&(T.current=setTimeout(n,j.current||0))},timeout:"auto"===S?null:S},k),(function(e,t){return a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,transform:f(.75),visibility:"exited"!==e||g?void 0:"hidden"},d[e],x,n.props.style),ref:M},t))}))}));p.muiSupportAuto=!0,t.a=p},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return g}));var r=n(126),i=n(6),o=n(148),a=n(246);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l={content:null,position:null};function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l,o="cw-".concat(Object(r.a)());return{id:o,payload:c(c(c({},n),t),{},{id:o,windowId:e}),type:i.a.ADD_COMPANION_WINDOW,windowId:e}}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l;return function(r,i){var a=i(),s=t.position,c="left"===s&&Object(o.getCompanionWindowIdsForPosition)(a,{position:s,windowId:e})[0];r(c?p(e,c,t):f(e,t,n))}}function p(e,t,n){return{id:t,payload:n,type:i.a.UPDATE_COMPANION_WINDOW,windowId:e}}function h(e,t){return{id:t,type:i.a.REMOVE_COMPANION_WINDOW,windowId:e}}function g(e,t,n){return function(r,o){var s=o(),c=Object(a.c)(s,{companionWindowId:t},!1),l=Object(a.c)(s,{companionWindowId:t},!0),f=Object(a.e)(s,{id:t,windowId:e}),d=-1!==c.indexOf(n)||-1===l.indexOf(n)&&-1===f.indexOf(n);return r({id:t,payload:u({},n,{expanded:d}),type:i.a.TOGGLE_TOC_NODE,windowId:e})}}},function(e,t,n){var r=n(164),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(91))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(776),i=n(777),o=n(167),a=n(56);e.exports=function(e,t){return function(n,s){var c=a(n)?r:i,u=t?t():{};return c(n,e,o(s,2),u)}}},function(e,t,n){var r=n(778),i=n(165);e.exports=function(e,t){return e&&r(e,t,i)}},function(e,t,n){var r=n(780),i=n(279),o=n(56),a=n(280),s=n(227),c=n(396),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),f=!n&&!l&&a(e),d=!n&&!l&&!f&&c(e),p=n||l||f||d,h=p?r(e.length,String):[],g=h.length;for(var v in e)!t&&!u.call(e,v)||p&&("length"==v||f&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,g))||h.push(v);return h}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(404),i=n(813),o=n(405);e.exports=function(e,t,n,a,s,c){var u=1&n,l=e.length,f=t.length;if(l!=f&&!(u&&f>l))return!1;var d=c.get(e),p=c.get(t);if(d&&p)return d==t&&p==e;var h=-1,g=!0,v=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++h<l;){var m=e[h],y=t[h];if(a)var b=u?a(y,m,h,t,e,c):a(m,y,h,e,t,c);if(void 0!==b){if(b)continue;g=!1;break}if(v){if(!i(t,(function(e,t){if(!o(v,t)&&(m===e||s(m,e,n,a,c)))return v.push(t)}))){g=!1;break}}else if(m!==y&&!s(m,y,n,a,c)){g=!1;break}}return c.delete(e),c.delete(t),g}},function(e,t,n){var r=n(78).Uint8Array;e.exports=r},function(e,t,n){var r=n(542),i=n(408),o=n(165);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(407),i=n(56);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(164)(n(78),"Set");e.exports=r},function(e,t,n){var r=n(164)(n(78),"WeakMap");e.exports=r},function(e,t,n){var r=n(68);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(199);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){var r=n(821),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(412),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),c=Array(s);++a<s;)c[a]=o[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=o[a];return u[t]=n(c),r(e,this,u)}}},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){"use strict";n.r(t),t.default=function(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],a=[],s={},c=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return o},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.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(e,t,n){o.push(t=t.toLowerCase()),a.push([t,n]),s[t]=s[t]?s[t]+","+n:n})),n(c())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(126),i=n(6);function o(e){return{id:"error-".concat(Object(r.a)()),message:e,type:i.a.ADD_ERROR}}function a(e){return{id:e,type:i.a.REMOVE_ERROR}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"a",(function(){return h})),n.d(t,"l",(function(){return g})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return m})),n.d(t,"g",(function(){return y})),n.d(t,"f",(function(){return b})),n.d(t,"k",(function(){return w})),n.d(t,"h",(function(){return _})),n.d(t,"i",(function(){return x})),n.d(t,"j",(function(){return O})),n.d(t,"c",(function(){return S}));var r=n(126),i=n(6),o=n(46),a=["companionWindows","manifest"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function p(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{pan:t,type:i.a.FOCUS_WINDOW,windowId:e}}function h(e){var t=e.companionWindows,n=e.manifest,s=d(e,a);return function(e,a){var u=Object(o.a)(a()),f=u.config,d=u.workspace.windowIds,p=(void 0===d?[]:d).length,h=s.id||"window-".concat(Object(r.a)()),g="cw-".concat(Object(r.a)()),v=[{content:"thumbnailNavigation",default:!0,id:g,position:s.thumbnailNavigationPosition||f.thumbnailNavigation.defaultPosition,windowId:h}].concat(l((t||[]).map((function(e,t){return c(c({},e),{},{id:"cw-".concat(Object(r.a)())})}))));(s.sideBarPanel||f.window.defaultSideBarPanel||f.window.sideBarPanel)&&v.unshift({content:s.sideBarPanel||s.defaultSearchQuery&&"search"||f.window.defaultSideBarPanel||f.window.sideBarPanel,default:!0,id:"cw-".concat(Object(r.a)()),position:"left",windowId:h});var m={canvasId:void 0,collectionIndex:0,companionAreaOpen:!0,companionWindowIds:v.map((function(e){return e.id})),draggingEnabled:!0,highlightAllAnnotations:f.window.highlightAllAnnotations||!1,id:h,manifestId:null,maximized:!1,rangeId:null,rotation:null,selectedAnnotations:{},sideBarOpen:void 0!==f.window.sideBarOpenByDefault?f.window.sideBarOpenByDefault||!!s.defaultSearchQuery:f.window.sideBarOpen||!!s.defaultSearchQuery,sideBarPanel:s.sideBarPanel||f.window.defaultSideBarPanel||f.window.sideBarPanel,thumbnailNavigationId:g};e({companionWindows:v,elasticLayout:c(c({},f.window.elastic||{height:400,width:480}),{},{x:50*Math.floor(p/10)+30*p%300+200,y:200+50*p%300}),manifest:n,type:i.a.ADD_WINDOW,window:c(c({},m),s)})}}function g(e,t){return{id:e,payload:t,type:i.a.UPDATE_WINDOW}}function v(e,t){return{type:i.a.MAXIMIZE_WINDOW,windowId:e}}function m(e){return{type:i.a.MINIMIZE_WINDOW,windowId:e}}function y(e,t){return{id:e,payload:{companionAreaOpen:t},type:i.a.UPDATE_WINDOW}}function b(e){return{type:i.a.REMOVE_WINDOW,windowId:e}}function w(e){return{type:i.a.TOGGLE_WINDOW_SIDE_BAR,windowId:e}}function _(e,t){return function(n,r){n({id:r().windows[e].thumbnailNavigationId,payload:{position:t},type:i.a.UPDATE_COMPANION_WINDOW})}}function x(e,t){return{type:i.a.SET_WINDOW_VIEW_TYPE,viewType:t,windowId:e}}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return{collectionPath:t,manifestId:e,type:i.a.SHOW_COLLECTION_DIALOG,windowId:n}}function S(e){return{type:i.a.HIDE_COLLECTION_DIALOG,windowId:e}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return f}));var r=n(6);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return{manifestId:e,properties:t,type:r.a.REQUEST_MANIFEST}}function c(e,t){return{manifestId:e,manifestJson:t,type:r.a.RECEIVE_MANIFEST}}function u(e,t){return{error:t,manifestId:e,type:r.a.RECEIVE_MANIFEST_FAILURE}}function l(e,t){return s(e,o(o({},t),{},{isFetching:!0}))}function f(e){return{manifestId:e,type:r.a.REMOVE_MANIFEST}}},function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"e",(function(){return u}));var r=n(6);function i(e,t,n){return{imageResource:t,infoId:e,type:r.a.REQUEST_INFO_RESPONSE,windowId:n}}function o(e,t,n,i){return{infoId:e,infoJson:t,ok:n,tokenServiceId:i,type:r.a.RECEIVE_INFO_RESPONSE}}function a(e,t,n,i,o){return{infoId:e,infoJson:t,ok:n,tokenServiceId:i,type:r.a.RECEIVE_DEGRADED_INFO_RESPONSE,windowId:o}}function s(e,t,n){return{error:t,infoId:e,tokenServiceId:n,type:r.a.RECEIVE_INFO_RESPONSE_FAILURE}}function c(e){var t=e.imageId,n=e.imageResource,r=e.windowId,o=n&&n.getServices()[0];return i(t||o.id,o,r)}function u(e){return{infoId:e,type:r.a.REMOVE_INFO_RESPONSE}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return f}));var r=n(6),i=n(45);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(s,c){var u=c(),l=n;l||(l=(Object(i.getCanvasGrouping)(u,{canvasId:t,windowId:e})||[]).map((function(e){return e.id})));s(a(a({},o),{},{canvasId:t,type:r.a.SET_CANVAS,visibleCanvases:l,windowId:e}))}}function u(e){return function(t,n){var r=n(),o=Object(i.getNextCanvasGrouping)(r,{windowId:e}),a=(o||[]).map((function(e){return e.id}));o&&t(c(e,a[0],a))}}function l(e){return function(t,n){var r=n(),o=Object(i.getPreviousCanvasGrouping)(r,{windowId:e}),a=(o||[]).map((function(e){return e.id}));o&&t(c(e,a[0],a))}}function f(e,t){return{payload:t,type:r.a.UPDATE_VIEWPORT,windowId:e}}},function(e,t,n){"use strict";n.d(t,"g",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return l})),n.d(t,"e",(function(){return f}));var r=n(6);function i(e){return{config:e,type:r.a.UPDATE_WORKSPACE}}function o(e){return{isFullscreenEnabled:e,type:r.a.SET_WORKSPACE_FULLSCREEN}}function a(e){return{showZoomControls:e,type:r.a.TOGGLE_ZOOM_CONTROLS}}function s(e){return{layout:e,type:r.a.UPDATE_WORKSPACE_MOSAIC_LAYOUT}}function c(e){return{isWorkspaceAddVisible:e,type:r.a.SET_WORKSPACE_ADD_VISIBILITY}}function u(e){return{payload:{position:{x:e.x,y:e.y}},type:r.a.SET_WORKSPACE_VIEWPORT_POSITION}}function l(e){var t=e.width;return{payload:{position:{height:e.height,width:t}},type:r.a.SET_WORKSPACE_VIEWPORT_POSITION}}function f(){return{type:r.a.TOGGLE_DRAGGING}}},function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"b",(function(){return f}));var r=n(6);function i(e,t){return{canvasId:t,type:r.a.REQUEST_CANVAS_ANNOTATIONS,windowId:e}}function o(e,t){return{annotationId:t,targetId:e,type:r.a.REQUEST_ANNOTATION}}function a(e,t,n){return{annotationId:t,annotationJson:n,targetId:e,type:r.a.RECEIVE_ANNOTATION}}function s(e,t,n){return{annotationId:t,error:n,targetId:e,type:r.a.RECEIVE_ANNOTATION_FAILURE}}function c(e,t){return{annotationId:t,type:r.a.SELECT_ANNOTATION,windowId:e}}function u(e,t){return{annotationId:t,type:r.a.DESELECT_ANNOTATION,windowId:e}}function l(e){return{type:r.a.TOGGLE_ANNOTATION_DISPLAY,windowId:e}}function f(e,t){return{annotationIds:t,type:r.a.HOVER_ANNOTATION,windowId:e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"e",(function(){return d}));var r=n(6);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return{id:t,profile:n,type:r.a.ADD_AUTHENTICATION_REQUEST,windowId:e}}function s(e,t,n){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e,tokenServiceId:t,type:r.a.RESOLVE_AUTHENTICATION_REQUEST},n)}function c(e,t){return{authId:t,serviceId:e,type:r.a.REQUEST_ACCESS_TOKEN}}function u(e,t,n){return{authId:e,json:n,serviceId:t,type:r.a.RECEIVE_ACCESS_TOKEN}}function l(e,t,n){return{authId:e,error:n,serviceId:t,type:r.a.RECEIVE_ACCESS_TOKEN_FAILURE}}function f(e,t,n){return n.accessToken?u(e,t,n):l(e,t,n)}function d(e){return{id:e.authServiceId,tokenServiceId:e.tokenServiceId,type:r.a.RESET_AUTHENTICATION_STATE}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(6);function i(e,t){return{payload:t,type:r.a.UPDATE_ELASTIC_WINDOW_LAYOUT,windowId:e}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"f",(function(){return u}));var r=n(6);function i(e,t,n,i){return{companionWindowId:t,query:i,searchId:n,type:r.a.REQUEST_SEARCH,windowId:e}}function o(e,t,n,i){return{companionWindowId:t,searchId:n,searchJson:i,type:r.a.RECEIVE_SEARCH,windowId:e}}function a(e,t,n,i){return{companionWindowId:t,error:i,searchId:n,type:r.a.RECEIVE_SEARCH_FAILURE,windowId:e}}function s(e,t){return{companionWindowId:t,type:r.a.REMOVE_SEARCH,windowId:e}}function c(e,t,n,r){return i(e,t,n,r)}function u(e,t,n){return{annotationIds:n,companionWindowId:t,type:r.a.SET_CONTENT_SEARCH_CURRENT_ANNOTATIONS,windowId:e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(6);function i(e,t,n){return{canvasId:t,payload:n,type:r.a.UPDATE_LAYERS,windowId:e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(6);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return{manifestId:e,manifestJson:t,payload:n,type:r.a.ADD_RESOURCE}}function o(e){return{manifestId:e,type:r.a.REMOVE_RESOURCE}}},function(e,t,n){"use strict";n.d(t,"g",(function(){return d})),n.d(t,"j",(function(){return g})),n.d(t,"h",(function(){return v})),n.d(t,"i",(function(){return m})),n.d(t,"b",(function(){return y})),n.d(t,"m",(function(){return w})),n.d(t,"e",(function(){return x})),n.d(t,"n",(function(){return O})),n.d(t,"l",(function(){return S})),n.d(t,"f",(function(){return E})),n.d(t,"k",(function(){return C})),n.d(t,"c",(function(){return k})),n.d(t,"d",(function(){return T})),n.d(t,"a",(function(){return P}));var r=n(10),i=n(35),o=n(29),a=n.n(o),s=n(368),c=n(45),u=n(38),l=n(90),f=n(46),d=Object(r.createSelector)([function(e,t){return t.windowId},function(e){return Object(f.a)(e).searches}],(function(e,t){return e&&t?t[e]:{}})),p=Object(r.createSelector)([d,function(e,t){return t.companionWindowId}],(function(e,t){if(e&&t)return e[t]})),h=Object(r.createSelector)([p],(function(e){return e?Object.values(e.data):[]})),g=Object(r.createSelector)([p],(function(e){return e&&e.query})),v=Object(r.createSelector)([h],(function(e){return e.some((function(e){return e.isFetching}))})),m=Object(r.createSelector)([p],(function(e){var t,n;if(e&&e.data){var r=Object.values(e.data).find((function(e){return!e.isFetching&&e.json&&e.json.within}));return null==r||null===(t=r.json)||void 0===t||null===(n=t.within)||void 0===n?void 0:n.total}})),y=Object(r.createSelector)([p],(function(e){if(e&&e.data){var t=Object.values(e.data).find((function(t){return!t.isFetching&&t.json&&t.json.next&&!e.data[t.json.next]}));return t&&t.json&&t.json.next}})),b=Object(r.createSelector)([h],(function(e){return a()(e.map((function(e){return e&&e.json&&!e.isFetching&&e.json.hits?e.json.hits:[]})))})),w=Object(r.createSelector)([b,c.getCanvases,function(e,t){var n=t.companionWindowId,r=t.windowId;return function(t){return k(e,{annotationUri:t,companionWindowId:n,windowId:r})}}],(function(e,t,n){if(!t||0===t.length)return[];if(!e||0===e.length)return[];var r=t.map((function(e){return e.id}));return[].concat(e).sort((function(e,t){var i=n(e.annotations[0]),o=n(t.annotations[0]);return r.indexOf(i.targetId)-r.indexOf(o.targetId)}))})),_=function(e){var t=e.map((function(e){if(e&&e.json&&!e.isFetching&&e.json.resources){var t=new s.a(e.json);return{id:t.id,resources:t.resources}}})).filter(Boolean);return{id:(t.find((function(e){return e.id}))||{}).id,resources:a()(t.map((function(e){return e.resources})))}},x=Object(r.createSelector)([h],(function(e){return e&&_(e)}));function O(e,t){if(!e||!e.resources||0===e.length)return[];if(!t||0===t.length)return[];var n=t.map((function(e){return e.id}));return[].concat(e.resources).sort((function(e,t){return n.indexOf(e.targetId)-n.indexOf(t.targetId)}))}var S=Object(r.createSelector)([x,c.getCanvases],(function(e,t){return O(e,t)})),E=Object(r.createSelector)([d],(function(e){return e?Object.values(e).map((function(e){return Object.values(e.data)})).map((function(e){return _(e)})).filter((function(e){return e.resources.length>0})):[]})),C=Object(r.createSelector)([u.e,p],(function(e,t){return t&&t.selectedContentSearchAnnotationIds||[]})),k=Object(r.createSelector)([x,function(e,t){return t.annotationUri}],(function(e,t){return e.resources.find((function(e){return e.id===t}))})),T=Object(r.createSelector)([k,l.f],(function(e,t){return e&&e.resource&&e.resource.label?i.b.parse(e.resource.label,t).getValues():[]})),j=Object(r.createSelector)([E,function(e,t){return t.annotationId}],(function(e,t){return a()(e.map((function(e){return e.resources}))).find((function(e){return e.id===t}))})),P=Object(r.createSelector)([j,function(e,t){var n=t.windowId;return function(t){return Object(c.getCanvas)(e,{canvasId:t,windowId:n})}}],(function(e,t){var n=e&&e.targetId;return n&&t(n)}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return v})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return y})),n.d(t,"d",(function(){return b}));var r=n(10),i=n(35),o=n(29),a=n.n(o),s=n(48),c=n(46),u=n(88),l=n(45);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){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(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=Object(r.createSelector)([u.a],(function(e){var t=e.auth,n=(t=void 0===t?{}:t).serviceProfiles;return void 0===n?[]:n})),m=function(e){return Object(c.a)(e).accessTokens||{}},y=function(e){return Object(c.a)(e).auth||{}},b=Object(r.createSelector)([l.getVisibleCanvases,l.selectInfoResponses,v,y,function(e,t){return t.iiifResources}],(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=o;if(!c&&e&&(c=a()(e.map((function(e){return new s.a(e).iiifImageResources.map((function(e){var n=e.getServices()[0],r=t[n.id];return r&&r.json?h(h({},r.json),{},{options:{}}):n}))})))),!c)return[];if(0===c.length)return[];var u=c.map((function(e){var t,o,a=i.d.getServices(e),s=f(n);try{var c=function(){var e,n=o.value,i=f(a.filter((function(e){return n.profile===e.getProfile()})));try{for(i.s();!(e=i.n()).done;){var s=e.value;if(t=s,!r[s.id]||r[s.id].isFetching||r[s.id].ok)return{v:s}}}catch(e){i.e(e)}finally{i.f()}};for(s.s();!(o=s.n()).done;){var u=c();if("object"==typeof u)return u.v}}catch(e){s.e(e)}finally{s.f()}return t}));return Object.values(u.reduce((function(e,t){return t&&!e[t.id]&&(e[t.id]=t),e}),{}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(10),i=n(207),o=n(45),a=n(321),s=n(76),c=Object(r.createSelector)(o.getVisibleCanvases,a.c,s.e,(function(e,t,n){return new i.a(e,t,n)}))},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp");t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=f(n(61)),o=f(n(112)),a=f(n(169)),s=f(n(144)),c=f(n(289)),u=f(n(113)),l=f(n(30));f(n(2));function f(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}var p=function(e){var t,n;function f(t){var n;return(n=e.call(this,t)||this).confirm=n.confirm.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=f).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var d=f.prototype;return d.confirm=function(){var e=this.props,t=e.handleClose;(0,e.switchToSingleCanvasView)(),t()},d.render=function(){var e=this.props,t=e.handleClose,n=e.open;return r.default.createElement(o.default,{"aria-labelledby":"single-canvas-dialog-title",fullWidth:!0,maxWidth:"sm",onClose:t,onEscapeKeyDown:t,open:n},r.default.createElement(u.default,{id:"single-canvas-dialog-title",disableTypography:!0},r.default.createElement(l.default,{variant:"h2"},"Switch view type to single view?")),r.default.createElement(s.default,null,r.default.createElement(c.default,{variant:"body1",color:"inherit"},"Annotations can only be edited in single canvas view type. Switch view type to single view now?")),r.default.createElement(a.default,null,r.default.createElement(i.default,{onClick:t},"Cancel"),r.default.createElement(i.default,{color:"primary",onClick:this.confirm,variant:"contained"},"Switch to single view")))},f}(r.Component);p.propTypes={},p.defaultProps={open:!1};var h=p;t.default=h},function(e,t,n){"use strict";var r=n(4),i=n(1),o=n(0),a=(n(2),n(3)),s=n(5),c=n(24),u=n(190),l=n(11),f=o.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,f=e.color,d=void 0===f?"default":f,p=e.component,h=void 0===p?"button":p,g=e.disabled,v=void 0!==g&&g,m=e.disableElevation,y=void 0!==m&&m,b=e.disableFocusRipple,w=void 0!==b&&b,_=e.endIcon,x=e.focusVisibleClassName,O=e.fullWidth,S=void 0!==O&&O,E=e.size,C=void 0===E?"medium":E,k=e.startIcon,T=e.type,j=void 0===T?"button":T,P=e.variant,I=void 0===P?"text":P,R=Object(r.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),A=k&&o.createElement("span",{className:Object(a.a)(s.startIcon,s["iconSize".concat(Object(l.a)(C))])},k),M=_&&o.createElement("span",{className:Object(a.a)(s.endIcon,s["iconSize".concat(Object(l.a)(C))])},_);return o.createElement(u.a,Object(i.a)({className:Object(a.a)(s.root,s[I],c,"inherit"===d?s.colorInherit:"default"!==d&&s["".concat(I).concat(Object(l.a)(d))],"medium"!==C&&[s["".concat(I,"Size").concat(Object(l.a)(C))],s["size".concat(Object(l.a)(C))]],y&&s.disableElevation,v&&s.disabled,S&&s.fullWidth),component:h,disabled:v,focusRipple:!w,focusVisibleClassName:Object(a.a)(s.focusVisible,x),ref:t,type:j},R),o.createElement("span",{className:s.label},A,n,M))}));t.a=Object(s.a)((function(e){return{root:Object(i.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(c.a)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(c.a)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(c.a)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(f)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(27),a=n(0),s=(n(2),n(3)),c=n(5),u=n(11),l=n(255),f=n(759),d=n(758),p=n(49),h=n(140),g={enter:p.b.enteringScreen,exit:p.b.leavingScreen},v=a.forwardRef((function(e,t){var n=e.BackdropProps,o=e.children,c=e.classes,p=e.className,v=e.disableBackdropClick,m=void 0!==v&&v,y=e.disableEscapeKeyDown,b=void 0!==y&&y,w=e.fullScreen,_=void 0!==w&&w,x=e.fullWidth,O=void 0!==x&&x,S=e.maxWidth,E=void 0===S?"sm":S,C=e.onBackdropClick,k=e.onClose,T=e.onEnter,j=e.onEntered,P=e.onEntering,I=e.onEscapeKeyDown,R=e.onExit,A=e.onExited,M=e.onExiting,D=e.open,N=e.PaperComponent,L=void 0===N?h.a:N,z=e.PaperProps,B=void 0===z?{}:z,F=e.scroll,W=void 0===F?"paper":F,H=e.TransitionComponent,V=void 0===H?d.a:H,U=e.transitionDuration,q=void 0===U?g:U,G=e.TransitionProps,K=e["aria-describedby"],$=e["aria-labelledby"],Z=Object(i.a)(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"]),X=a.useRef();return a.createElement(l.a,Object(r.a)({className:Object(s.a)(c.root,p),BackdropComponent:f.a,BackdropProps:Object(r.a)({transitionDuration:q},n),closeAfterTransition:!0},m?{disableBackdropClick:m}:{},{disableEscapeKeyDown:b,onEscapeKeyDown:I,onClose:k,open:D,ref:t},Z),a.createElement(V,Object(r.a)({appear:!0,in:D,timeout:q,onEnter:T,onEntering:P,onEntered:j,onExit:R,onExiting:M,onExited:A,role:"none presentation"},G),a.createElement("div",{className:Object(s.a)(c.container,c["scroll".concat(Object(u.a)(W))]),onMouseUp:function(e){e.target===e.currentTarget&&e.target===X.current&&(X.current=null,C&&C(e),!m&&k&&k(e,"backdropClick"))},onMouseDown:function(e){X.current=e.target}},a.createElement(L,Object(r.a)({elevation:24,role:"dialog","aria-describedby":K,"aria-labelledby":$},B,{className:Object(s.a)(c.paper,c["paperScroll".concat(Object(u.a)(W))],c["paperWidth".concat(Object(u.a)(String(E)))],B.className,_&&c.paperFullScreen,O&&c.paperFullWidth)}),o))))}));t.a=Object(c.a)((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":Object(o.a)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":Object(o.a)({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":Object(o.a)({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":Object(o.a)({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":Object(o.a)({},e.breakpoints.down(e.breakpoints.values.xl+64),{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%"}}}}),{name:"MuiDialog"})(v)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=o.forwardRef((function(e,t){var n=e.disableSpacing,s=void 0!==n&&n,c=e.classes,u=e.className,l=Object(i.a)(e,["disableSpacing","classes","className"]);return o.createElement("div",Object(r.a)({className:Object(a.a)(c.root,u,!s&&c.spacing),ref:t},l))}));t.a=Object(s.a)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(c)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=o.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.dividers,u=void 0!==c&&c,l=Object(i.a)(e,["classes","className","dividers"]);return o.createElement("div",Object(r.a)({className:Object(a.a)(n.root,s,u&&n.dividers),ref:t},l))}));t.a=Object(s.a)((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)}}}),{name:"MuiDialogContent"})(c)},function(e,t,n){"use strict";var r=n(1),i=n(0),o=(n(2),n(5)),a=n(96),s=i.forwardRef((function(e,t){return i.createElement(a.a,Object(r.a)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))}));t.a=Object(o.a)({root:{marginBottom:12}},{name:"MuiDialogContentText"})(s)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(96),u=o.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,l=e.disableTypography,f=void 0!==l&&l,d=Object(i.a)(e,["children","classes","className","disableTypography"]);return o.createElement("div",Object(r.a)({className:Object(a.a)(s.root,u),ref:t},d),f?n:o.createElement(c.a,{component:"h2",variant:"h6"},n))}));t.a=Object(s.a)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(u)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(104),u=o.forwardRef((function(e,t){var n=e.classes,s=e.className,u=Object(i.a)(e,["classes","className"]),l=o.useContext(c.a);return o.createElement("div",Object(r.a)({className:Object(a.a)(n.root,s,"flex-start"===l.alignItems&&n.alignItemsFlexStart),ref:t},u))}));t.a=Object(s.a)((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(u)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(96),u=n(104),l=o.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,f=e.disableTypography,d=void 0!==f&&f,p=e.inset,h=void 0!==p&&p,g=e.primary,v=e.primaryTypographyProps,m=e.secondary,y=e.secondaryTypographyProps,b=Object(i.a)(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),w=o.useContext(u.a).dense,_=null!=g?g:n;null==_||_.type===c.a||d||(_=o.createElement(c.a,Object(r.a)({variant:w?"body2":"body1",className:s.primary,component:"span",display:"block"},v),_));var x=m;return null==x||x.type===c.a||d||(x=o.createElement(c.a,Object(r.a)({variant:"body2",className:s.secondary,color:"textSecondary",display:"block"},y),x)),o.createElement("div",Object(r.a)({className:Object(a.a)(s.root,l,w&&s.dense,h&&s.inset,_&&x&&s.multiline),ref:t},b),_,x)}));t.a=Object(s.a)({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(l)},function(e,t,n){"use strict";var r=n(4),i=n(27),o=n(1),a=n(0),s=(n(2),n(3)),c=n(5),u=n(1125),l=a.forwardRef((function(e,t){var n,i=e.classes,c=e.className,l=e.component,f=void 0===l?"li":l,d=e.disableGutters,p=void 0!==d&&d,h=e.ListItemClasses,g=e.role,v=void 0===g?"menuitem":g,m=e.selected,y=e.tabIndex,b=Object(r.a)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==y?y:-1),a.createElement(u.a,Object(o.a)({button:!0,role:v,tabIndex:n,component:f,selected:m,disableGutters:p,classes:Object(o.a)({dense:i.dense},h),className:Object(s.a)(i.root,c,m&&i.selected,!p&&i.gutters),ref:t},b))}));t.a=Object(c.a)((function(e){return{root:Object(o.a)({},e.typography.body1,Object(i.a)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Object(o.a)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(l)},function(e,t,n){"use strict";var r=n(22),i=n(69),o=Object(r.a)({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),a=Object(r.a)({prop:"display"}),s=Object(r.a)({prop:"overflow"}),c=Object(r.a)({prop:"textOverflow"}),u=Object(r.a)({prop:"visibility"}),l=Object(r.a)({prop:"whiteSpace"});t.a=Object(i.a)(o,a,s,c,u,l)},function(e,t,n){"use strict";var r=n(22),i=Object(r.a)({prop:"boxShadow",themeKey:"shadows"});t.a=i},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(24),u=o.forwardRef((function(e,t){var n=e.absolute,s=void 0!==n&&n,c=e.classes,u=e.className,l=e.component,f=void 0===l?"hr":l,d=e.flexItem,p=void 0!==d&&d,h=e.light,g=void 0!==h&&h,v=e.orientation,m=void 0===v?"horizontal":v,y=e.role,b=void 0===y?"hr"!==f?"separator":void 0:y,w=e.variant,_=void 0===w?"fullWidth":w,x=Object(i.a)(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return o.createElement(f,Object(r.a)({className:Object(a.a)(c.root,u,"fullWidth"!==_&&c[_],s&&c.absolute,p&&c.flexItem,g&&c.light,"vertical"===m&&c.vertical),role:b,ref:t},x))}));t.a=Object(s.a)((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:Object(c.a)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(u)},function(e,t,n){"use strict";var r=n(4),i=n(1),o=n(0),a=(n(2),n(3)),s=n(5),c=[0,1,2,3,4,5,6,7,8,9,10],u=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}var f=o.forwardRef((function(e,t){var n=e.alignContent,s=void 0===n?"stretch":n,c=e.alignItems,u=void 0===c?"stretch":c,l=e.classes,f=e.className,d=e.component,p=void 0===d?"div":d,h=e.container,g=void 0!==h&&h,v=e.direction,m=void 0===v?"row":v,y=e.item,b=void 0!==y&&y,w=e.justify,_=e.justifyContent,x=void 0===_?"flex-start":_,O=e.lg,S=void 0!==O&&O,E=e.md,C=void 0!==E&&E,k=e.sm,T=void 0!==k&&k,j=e.spacing,P=void 0===j?0:j,I=e.wrap,R=void 0===I?"wrap":I,A=e.xl,M=void 0!==A&&A,D=e.xs,N=void 0!==D&&D,L=e.zeroMinWidth,z=void 0!==L&&L,B=Object(r.a)(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","justifyContent","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),F=Object(a.a)(l.root,f,g&&[l.container,0!==P&&l["spacing-xs-".concat(String(P))]],b&&l.item,z&&l.zeroMinWidth,"row"!==m&&l["direction-xs-".concat(String(m))],"wrap"!==R&&l["wrap-xs-".concat(String(R))],"stretch"!==u&&l["align-items-xs-".concat(String(u))],"stretch"!==s&&l["align-content-xs-".concat(String(s))],"flex-start"!==(w||x)&&l["justify-content-xs-".concat(String(w||x))],!1!==N&&l["grid-xs-".concat(String(N))],!1!==T&&l["grid-sm-".concat(String(T))],!1!==C&&l["grid-md-".concat(String(C))],!1!==S&&l["grid-lg-".concat(String(S))],!1!==M&&l["grid-xl-".concat(String(M))]);return o.createElement(p,Object(i.a)({className:F,ref:t},B))})),d=Object(s.a)((function(e){return Object(i.a)({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"}},function(e,t){var n={};return c.forEach((function(r){var i=e.spacing(r);0!==i&&(n["spacing-".concat(t,"-").concat(r)]={margin:"-".concat(l(i,2)),width:"calc(100% + ".concat(l(i),")"),"& > $item":{padding:l(i,2)}})})),n}(e,"xs"),e.breakpoints.keys.reduce((function(t,n){return function(e,t,n){var r={};u.forEach((function(e){var t="grid-".concat(n,"-").concat(e);if(!0!==e)if("auto"!==e){var i="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:i,flexGrow:0,maxWidth:i}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===n?Object(i.a)(e,r):e[t.breakpoints.up(n)]=r}(t,e,n),t}),{}))}),{name:"MuiGrid"})(f);t.a=d},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((r=n(0))&&r.__esModule?r:{default:r}).default.createContext();t.default=i},function(e,t,n){var r=n(202);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(395),i=n(166);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},function(e,t,n){var r=n(233),i=n(165);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(407),i=n(420),o=n(408),a=n(543),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},function(e,t,n){"use strict";(e.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n]);if(r)return r}}},function(e,t,n){"use strict";var r=e.exports={};r.isIE=function(e){return(-1!==(t=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/"))&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}while(n[0]);return e>4?e:void 0}());var t},r.isLegacyOpera=function(){return!!window.opera}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(202),i=n(593),o=i?function(e,t){return i.set(e,t),e}:r;e.exports=o},function(e,t,n){var r=n(545),i=r&&new r;e.exports=i},function(e,t,n){var r=n(595),i=n(596),o=n(919),a=n(304),s=n(597),c=n(602),u=n(926),l=n(432),f=n(78);e.exports=function e(t,n,d,p,h,g,v,m,y,b){var w=128&n,_=1&n,x=2&n,O=24&n,S=512&n,E=x?void 0:a(t);return function C(){for(var k=arguments.length,T=Array(k),j=k;j--;)T[j]=arguments[j];if(O)var P=c(C),I=o(T,P);if(p&&(T=r(T,p,h,O)),g&&(T=i(T,g,v,O)),k-=I,O&&k<b){var R=l(T,P);return s(t,n,e,C.placeholder,d,T,R,m,y,b-k)}var A=_?d:this,M=x?A[t]:t;return k=T.length,m?T=u(T,m):S&&k>1&&T.reverse(),w&&y<k&&(T.length=y),this&&this!==f&&this instanceof C&&(M=E||a(M)),M.apply(A,T)}}},function(e,t){var n=Math.max;e.exports=function(e,t,r,i){for(var o=-1,a=e.length,s=r.length,c=-1,u=t.length,l=n(a-s,0),f=Array(u+l),d=!i;++c<u;)f[c]=t[c];for(;++o<s;)(d||o<a)&&(f[r[o]]=e[o]);for(;l--;)f[c++]=e[o++];return f}},function(e,t){var n=Math.max;e.exports=function(e,t,r,i){for(var o=-1,a=e.length,s=-1,c=r.length,u=-1,l=t.length,f=n(a-c,0),d=Array(f+l),p=!i;++o<f;)d[o]=e[o];for(var h=o;++u<l;)d[h+u]=t[u];for(;++s<c;)(p||o<a)&&(d[h+r[s]]=e[o++]);return d}},function(e,t,n){var r=n(598),i=n(600),o=n(601);e.exports=function(e,t,n,a,s,c,u,l,f,d){var p=8&t;t|=p?32:64,4&(t&=~(p?64:32))||(t&=-4);var h=[e,t,s,p?c:void 0,p?u:void 0,p?void 0:c,p?void 0:u,l,f,d],g=n.apply(void 0,h);return r(e)&&i(g,h),g.placeholder=a,o(g,e,t)}},function(e,t,n){var r=n(428),i=n(430),o=n(599),a=n(921);e.exports=function(e){var t=o(e),n=a[t];if("function"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var s=i(n);return!!s&&e===s[0]}},function(e,t,n){var r=n(920),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",n=r[t],o=i.call(r,t)?n.length:0;o--;){var a=n[o],s=a.func;if(null==s||s==e)return a.name}return t}},function(e,t,n){var r=n(592),i=n(551)(r);e.exports=i},function(e,t,n){var r=n(923),i=n(924),o=n(413),a=n(925);e.exports=function(e,t,n){var s=t+"";return o(e,i(s,a(r(s),n)))}},function(e,t){e.exports=function(e){return e.placeholder}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var a=e.props.bounds;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);var s=o(e);if("string"==typeof a){var c,u=s.ownerDocument,l=u.defaultView;if(!((c="parent"===a?s.parentNode:u.querySelector(a))instanceof l.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');var f=l.getComputedStyle(s),d=l.getComputedStyle(c);a={left:-s.offsetLeft+(0,r.int)(d.paddingLeft)+(0,r.int)(f.marginLeft),top:-s.offsetTop+(0,r.int)(d.paddingTop)+(0,r.int)(f.marginTop),right:(0,i.innerWidth)(c)-(0,i.outerWidth)(s)-s.offsetLeft+(0,r.int)(d.paddingRight)-(0,r.int)(f.marginRight),bottom:(0,i.innerHeight)(c)-(0,i.outerHeight)(s)-s.offsetTop+(0,r.int)(d.paddingBottom)-(0,r.int)(f.marginBottom)}}(0,r.isNum)(a.right)&&(t=Math.min(t,a.right));(0,r.isNum)(a.bottom)&&(n=Math.min(n,a.bottom));(0,r.isNum)(a.left)&&(t=Math.max(t,a.left));(0,r.isNum)(a.top)&&(n=Math.max(n,a.top));return[t,n]},t.snapToGrid=function(e,t,n){var r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]},t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.getControlPosition=function(e,t,n){var r="number"==typeof t?(0,i.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;var a=o(n),s=n.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,i.offsetXYFromParent)(r||e,s,n.props.scale)},t.createCoreData=function(e,t,n){var i=e.state,a=!(0,r.isNum)(i.lastX),s=o(e);return a?{node:s,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:s,deltaX:t-i.lastX,deltaY:n-i.lastY,lastX:i.lastX,lastY:i.lastY,x:t,y:n}},t.createDraggableData=function(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}};var r=n(305),i=n(434);function o(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){void 0}},function(e,t,n){"use strict";e.exports=n(936)},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapChildren=function e(t){if(t.children)return(0,i.default)(t.children.map((function(t){return e(t)})));return t};var r,i=(r=n(29))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";var r=n(99),i=n(116),o=n(40).OrderedMap;e.exports=function(e){return e.first()instanceof r?function(e){var t,n={};return o(e.withMutations((function(e){e.forEach((function(r,o){var a=r.getKey(),s=r.getNextSiblingKey(),c=r.getPrevSiblingKey(),u=r.getChildKeys(),l=r.getParentKey(),f=i();(n[a]=f,s)&&(e.get(s)?e.setIn([s,"prevSibling"],f):e.setIn([a,"nextSibling"],null));c&&(e.get(c)?e.setIn([c,"nextSibling"],f):e.setIn([a,"prevSibling"],null));if(l&&e.get(l)){var d=e.get(l).getChildKeys();e.setIn([l,"children"],d.set(d.indexOf(r.getKey()),f))}else e.setIn([a,"parent"],null),t&&(e.setIn([t.getKey(),"nextSibling"],f),e.setIn([a,"prevSibling"],n[t.getKey()])),t=e.get(a);u.forEach((function(t){e.get(t)?e.setIn([t,"parent"],f):e.setIn([a,"children"],r.getChildKeys().filter((function(e){return e!==t})))}))}))})).toArray().map((function(e){return[n[e.getKey()],e.set("key",n[e.getKey()])]})))}(e):function(e){return o(e.toArray().map((function(e){var t=i();return[t,e.set("key",t)]})))}(e)}},function(e,t,n){"use strict";var r=n(98),i=n(236),o=n(42);function a(e,t,n){var a=t.getCharacterList(),s=n>0?a.get(n-1):void 0,c=n<a.count()?a.get(n):void 0,u=s?s.getEntity():void 0,l=c?c.getEntity():void 0;if(l&&l===u&&"MUTABLE"!==e.__get(l).getMutability()){for(var f,d=function(e,t,n){var r;return i(e,(function(e,t){return e.getEntity()===t.getEntity()}),(function(e){return e.getEntity()===t}),(function(e,t){e<=n&&t>=n&&(r={start:e,end:t})})),"object"!=typeof r&&o(!1),r}(a,l,n),p=d.start,h=d.end;p<h;)f=a.get(p),a=a.set(p,r.applyEntity(f,null)),p++;return t.set("characterList",a)}return t}e.exports=function(e,t){var n=e.getBlockMap(),r=e.getEntityMap(),i={},o=t.getStartKey(),s=t.getStartOffset(),c=n.get(o),u=a(r,c,s);u!==c&&(i[o]=u);var l=t.getEndKey(),f=t.getEndOffset(),d=n.get(l);o===l&&(d=u);var p=a(r,d,f);return p!==d&&(i[l]=p),Object.keys(i).length?e.merge({blockMap:n.merge(i),selectionAfter:t}):e.set("selectionAfter",t)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=e;if(n===r.count())t.forEach((function(e){r=r.push(e)}));else if(0===n)t.reverse().forEach((function(e){r=r.unshift(e)}));else{var i=r.slice(0,n),o=r.slice(n);r=i.concat(t,o).toList()}return r}},function(e,t,n){"use strict";var r=n(40).Map;e.exports=function(e,t,n){var i=t.getStartKey(),o=t.getEndKey(),a=e.getBlockMap(),s=a.toSeq().skipUntil((function(e,t){return t===i})).takeUntil((function(e,t){return t===o})).concat(r([[o,a.get(o)]])).map(n);return e.merge({blockMap:a.merge(s),selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var r=n(99);e.exports=function(e,t){if(!(e instanceof r))return null;var n=e.getNextSiblingKey();if(n)return n;var i=e.getParentKey();if(!i)return null;for(var o=t.get(i);o&&!o.getNextSiblingKey();){var a=o.getParentKey();o=a?t.get(a):null}return o?o.getNextSiblingKey():null}},function(e,t,n){"use strict";e.exports=function(e){return Object.keys(e).map((function(t){return e[t]}))}},function(e,t,n){"use strict";var r=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getType=function(){return this.get("type")},i.getMutability=function(){return this.get("mutability")},i.getData=function(){return this.get("data")},r}((0,n(40).Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));e.exports=r},function(e,t,n){"use strict";var r=new RegExp("\r","g");e.exports=function(e){return e.replace(r,"")}},function(e,t,n){"use strict";e.exports={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}}},function(e,t,n){"use strict";var r=n(173);e.exports=function e(t){if(r(t)){var n=t,i=n.getAttribute("data-offset-key");if(i)return i;for(var o=0;o<n.childNodes.length;o++){var a=e(n.childNodes[o]);if(a)return a}}return null}},function(e,t,n){"use strict";e.exports=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}},function(e,t,n){"use strict";var r=n(621),i=n(51),o=n(622),a=n(623);e.exports=function(e){if(e._blockSelectEvents||e._latestEditorState!==e.props.editorState){if(e._blockSelectEvents){var t=e.props.editorState.getSelection();r.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(t.toJS())})}}else{var n=e.props.editorState,s=a(n,o(e)),c=s.selectionState;c!==n.getSelection()&&(n=s.needsRecovery?i.forceSelection(n,c):i.acceptSelection(n,c),e.update(n))}}},function(e,t,n){"use strict";e.exports={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}}},function(e,t,n){"use strict";var r=n(42),i=n(237);e.exports=function(e){var t=e.editorContainer;return t||r(!1),i(t.firstChild)||r(!1),t.firstChild}},function(e,t,n){"use strict";var r=n(624);e.exports=function(e,t){var n=t.ownerDocument.defaultView.getSelection(),i=n.anchorNode,o=n.anchorOffset,a=n.focusNode,s=n.focusOffset;return 0===n.rangeCount||null==i||null==a?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:r(e,t,i,o,a,s)}},function(e,t,n){"use strict";var r=n(310),i=n(618),o=n(625),a=n(42),s=n(173),c=n(86);function u(e,t,n){var o=t,u=r(o);(null!=u||e&&(e===o||e.firstChild===o)||a(!1),e===o)&&(o=o.firstChild,s(o)||a(!1),"true"!==(o=o).getAttribute("data-contents")&&a(!1),n>0&&(n=o.childNodes.length));if(0===n){var f=null;if(null!=u)f=u;else{var d=function(e){for(;e.firstChild&&(s(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||i(e.firstChild));)e=e.firstChild;return e}(o);f=c(i(d))}return{key:f,offset:0}}var p=o.childNodes[n-1],h=null,g=null;if(i(p)){var v=function(e){for(;e.lastChild&&(s(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||i(e.lastChild));)e=e.lastChild;return e}(p);h=c(i(v)),g=l(v)}else h=c(u),g=l(p);return{key:h,offset:g}}function l(e){var t=e.textContent;return"\n"===t?0:t.length}e.exports=function(e,t,n,i,a,s){var l=n.nodeType===Node.TEXT_NODE,f=a.nodeType===Node.TEXT_NODE;if(l&&f)return{selectionState:o(e,c(r(n)),i,c(r(a)),s),needsRecovery:!1};var d=null,p=null,h=!0;return l?(d={key:c(r(n)),offset:i},p=u(t,a,s)):f?(p={key:c(r(a)),offset:s},d=u(t,n,i)):(d=u(t,n,i),p=u(t,a,s),n===a&&i===s&&(h=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:o(e,d.key,d.offset,p.key,p.offset),needsRecovery:h}}},function(e,t,n){"use strict";var r=n(133),i=n(86);e.exports=function(e,t,n,o,a){var s=i(e.getSelection());if(!t||!o)return s;var c=r.decode(t),u=c.blockKey,l=e.getBlockTree(u),f=l&&l.getIn([c.decoratorKey,"leaves",c.leafKey]),d=r.decode(o),p=d.blockKey,h=e.getBlockTree(p),g=h&&h.getIn([d.decoratorKey,"leaves",d.leafKey]);if(!f||!g)return s;var v=f.get("start"),m=g.get("start"),y=f?v+n:null,b=g?m+a:null;if(s.getAnchorKey()===u&&s.getAnchorOffset()===y&&s.getFocusKey()===p&&s.getFocusOffset()===b)return s;var w=!1;if(u===p){var _=f.get("end"),x=g.get("end");w=m===v&&x===_?a<n:m<v}else{w=e.getCurrentContent().getBlockMap().keySeq().skipUntil((function(e){return e===u||e===p})).first()===p}return s.merge({anchorKey:u,anchorOffset:y,focusKey:p,focusOffset:b,isBackward:w})}},function(e,t,n){"use strict";e.exports={notEmptyKey:function(e){return null!=e&&""!=e}}},function(e,t,n){"use strict";var r=n(131);function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(976),s=n(0),c=n(42),u=n(628),l=n(977).setDraftEditorSelection,f=function(e){var t,n;function f(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return o(i(t=e.call.apply(e,[this].concat(r))||this),"leaf",void 0),t}n=e,(t=f).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var d=f.prototype;return d._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,n=t.block,r=t.start,i=t.text,o=n.getKey(),a=r+i.length;if(e.hasEdgeWithin(o,r,a)){var s=this.leaf;s||c(!1);var f,d=s.firstChild;d||c(!1),d.nodeType===Node.TEXT_NODE?f=d:u(d)?f=s:(f=d.firstChild)||c(!1),l(e,f,o,r,a)}}},d.shouldComponentUpdate=function(e){var t=this.leaf;return t||c(!1),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},d.componentDidUpdate=function(){this._setSelection()},d.componentDidMount=function(){this._setSelection()},d.render=function(){var e=this,t=this.props.block,n=this.props.text;n.endsWith("\n")&&this.props.isLast&&(n+="\n");var i=this.props,o=i.customStyleMap,c=i.customStyleFn,u=i.offsetKey,l=i.styleSet,f=l.reduce((function(e,t){var n={},i=o[t];return void 0!==i&&e.textDecoration!==i.textDecoration&&(n.textDecoration=[e.textDecoration,i.textDecoration].join(" ").trim()),r(e,i,n)}),{});if(c){var d=c(l,t);f=r(f,d)}return s.createElement("span",{"data-offset-key":u,ref:function(t){return e.leaf=t},style:f},s.createElement(a,null,n))},f}(s.Component);e.exports=f},function(e,t,n){"use strict";var r=n(173);e.exports=function(e){return!(!e||!e.ownerDocument)&&(r(e)&&"BR"===e.nodeName)}},function(e,t,n){"use strict";e.exports={initODS:function(){},handleExtensionCausedError:function(){}}},function(e,t,n){"use strict";e.exports=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}},function(e,t,n){"use strict";var r=n(983);e.exports=function(e){var t=r(e);return{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}}},function(e,t,n){"use strict";function r(){var e;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function i(){var e;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function o(){return{width:window.innerWidth||r(),height:window.innerHeight||i()}}o.withoutScrollbars=function(){return{width:r(),height:i()}},e.exports=o},function(e,t,n){"use strict";var r=n(131);function i(){return(i=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(627),c=n(133),u=n(0),l=n(441),f=n(313),d=n(437),p=n(309),h=n(172),g=n(631),v=n(314),m=n(632),y=n(42),b=n(237),w=n(86),_=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},x=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return a(o(t=e.call.apply(e,[this].concat(r))||this),"_node",void 0),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var x=r.prototype;return x.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||_(e.selection,e.block.getKey())&&e.forceSelection},x.componentDidMount=function(){if(!this.props.preventScroll){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this._node;if(null!=n){var r,i=f.getScrollParent(n),o=v(i);if(i===window){var a=g(n);(r=a.y+a.height-m().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{b(n)||y(!1),(r=n.offsetHeight+n.offsetTop-(i.offsetTop+i.offsetHeight+o.y))>0&&l.setTop(i,l.getTop(i)+r+10)}}}}},x._renderChildren=function(){var e=this,t=this.props.block,n=t.getKey(),r=t.getText(),o=this.props.tree.size-1,a=_(this.props.selection,n);return this.props.tree.map((function(l,f){var h=l.get("leaves");if(0===h.size)return null;var g=h.size-1,v=h.map((function(i,l){var d=c.encode(n,f,l),p=i.get("start"),h=i.get("end");return u.createElement(s,{key:d,offsetKey:d,block:t,start:p,selection:a?e.props.selection:null,forceSelection:e.props.forceSelection,text:r.slice(p,h),styleSet:t.getInlineStyleAt(p),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:f===o&&l===g})})).toArray(),m=l.get("decoratorKey");if(null==m)return v;if(!e.props.decorator)return v;var y=w(e.props.decorator),b=y.getComponentForKey(m);if(!b)return v;var _=y.getPropsForKey(m),x=c.encode(n,f,0),O=h.first().get("start"),S=h.last().get("end"),E=r.slice(O,S),C=t.getEntityAt(l.get("start")),k=p.getHTMLDirIfDifferent(d.getDirection(E),e.props.direction),T={contentState:e.props.contentState,decoratedText:E,dir:k,start:O,end:S,blockKey:n,entityKey:C,offsetKey:x};return u.createElement(b,i({},_,T,{key:x}),v)})).toArray()},x.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,i=h({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return u.createElement("div",{"data-offset-key":r,className:i,ref:function(t){return e._node=t}},this._renderChildren())},r}(u.Component);e.exports=x},function(e,t,n){"use strict";var r=n(989),i=n(990),o=n(635),a=new RegExp("\r\n","g"),s={"text/rtf":1,"text/html":1};function c(e){if("file"==e.kind)return e.getAsFile()}var u=function(){function e(e){this.data=e,this.types=e.types?i(e.types):[]}var t=e.prototype;return t.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some((function(e){return s[e]}))},t.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(a,"\n"):null},t.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},t.isLink=function(){return this.types.some((function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")}))},t.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},t.isImage=function(){var e=this.types.some((function(e){return-1!=e.indexOf("application/x-moz-file")}));if(e)return!0;for(var t=this.getFiles(),n=0;n<t.length;n++){var i=t[n].type;if(!r.isImage(i))return!1}return!0},t.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},t.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(c).filter(o.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},t.hasFiles=function(){return this.getFiles().length>0},e}();e.exports=u},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";(function(t){var r=n(42),i=/\.textClipping$/,o={"text/plain":!0,"text/html":!0,"text/rtf":!0};e.exports=function(e,n){var a=0,s=[];e.forEach((function(c){!function(e,n){if(!t.FileReader||e.type&&!(e.type in o))return void n("");if(""===e.type){var a="";return i.test(e.name)&&(a=e.name.replace(i,"")),void n(a)}var s=new FileReader;s.onload=function(){var e=s.result;"string"!=typeof e&&r(!1),n(e)},s.onerror=function(){n("")},s.readAsText(e)}(c,(function(t){a++,t&&s.push(t.slice(0,5e3)),a==e.length&&n(s.join("\r"))}))}))}}).call(this,n(91))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(306);e.exports=function(e){var t=e.getSelection();return t.isCollapsed()?null:r(e.getCurrentContent(),t)}},function(e,t,n){"use strict";var r=n(51),i=n(174),o=n(442),a=n(238);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),a=t.getAnchorOffset(),s=n.getBlockForKey(r).getText()[a-1];return o(e,s?i.getUTF16Length(s,0):1)}),"backward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"backspace-character":"remove-range")}},function(e,t,n){"use strict";var r=n(87),i=n(42);var o=r.isBrowser("Chrome")?function(e){for(var t=e.cloneRange(),n=[],r=e.endContainer;null!=r;r=r.parentNode){var o=r===e.commonAncestorContainer;o?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0);var a,s=Array.from(t.getClientRects());if(n.push(s),o)return n.reverse(),(a=[]).concat.apply(a,n);t.setEndBefore(r)}i(!1)}:function(e){return Array.from(e.getClientRects())};e.exports=o},function(e,t,n){"use strict";var r="\\s|(?![_])"+n(1011).getPunctuation(),i=new RegExp("^(?:"+r+")*(?:[']|(?!"+r+").)*(?:(?!"+r+").)"),o=new RegExp("(?:(?!"+r+").)(?:[']|(?!"+r+").)*(?:"+r+")*$");function a(e,t){var n=t?o.exec(e):i.exec(e);return n?n[0]:e}var s={getBackward:function(e){return a(e,!0)},getForward:function(e){return a(e,!1)}};e.exports=s},function(e,t,n){"use strict";n(443);e.exports=function(e,t){var n,r=e.getSelection(),i=r.getStartKey(),o=r.getStartOffset(),a=e.getCurrentContent(),s=i;return t>a.getBlockForKey(i).getText().length-o?(s=a.getKeyAfter(i),n=0):n=o+t,r.merge({focusKey:s,focusOffset:n})}},function(e,t,n){"use strict";var r;function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(98),s=n(171),c=n(99),u=n(438),l=n(307),f=n(1021),d=n(172),p=n(116),h=n(644),g=n(146),v=n(40),m=v.List,y=v.Map,b=v.OrderedSet,w=n(1022),_=n(628),x=n(237),O=n(1023),S=g("draft_tree_data_support"),E=new RegExp("\r","g"),C=new RegExp("\n","g"),k=new RegExp("^\n","g"),T=new RegExp("&nbsp;","g"),j=new RegExp("&#13;?","g"),P=new RegExp("&#8203;?","g"),I=["bold","bolder","500","600","700","800","900"],R=["light","lighter","normal","100","200","300","400"],A=["className","href","rel","target","title"],M=["alt","className","height","src","width"],D=(o(r={},d("public/DraftStyleDefault/depth0"),0),o(r,d("public/DraftStyleDefault/depth1"),1),o(r,d("public/DraftStyleDefault/depth2"),2),o(r,d("public/DraftStyleDefault/depth3"),3),o(r,d("public/DraftStyleDefault/depth4"),4),r),N=y({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),L=function(e){var t={};return e.mapKeys((function(e,n){var r=[n.element];void 0!==n.aliasedElements&&r.push.apply(r,n.aliasedElements),r.forEach((function(n){void 0===t[n]?t[n]=e:"string"==typeof t[n]?t[n]=[t[n],e]:t[n].push(e)}))})),y(t)},z=function(e){if(x(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null},B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(D).some((function(n){e.classList.contains(n)&&(t=D[n])})),t},F=function(e){if(!w(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{new f(t.href);return!0}catch(e){return!1}},W=function(e){if(!O(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},H=function(e,t){if(!x(e))return t;var n=e,r=n.style.fontWeight,i=n.style.fontStyle,o=n.style.textDecoration;return t.withMutations((function(e){I.indexOf(r)>=0?e.add("BOLD"):R.indexOf(r)>=0&&e.remove("BOLD"),"italic"===i?e.add("ITALIC"):"normal"===i&&e.remove("ITALIC"),"underline"===o&&e.add("UNDERLINE"),"line-through"===o&&e.add("STRIKETHROUGH"),"none"===o&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))}))},V=function(e){return"ul"===e||"ol"===e},U=function(){function e(e,t){o(this,"characterList",m()),o(this,"currentBlockType","unstyled"),o(this,"currentDepth",0),o(this,"currentEntity",null),o(this,"currentText",""),o(this,"wrapper",null),o(this,"blockConfigs",[]),o(this,"contentBlocks",[]),o(this,"entityMap",l),o(this,"blockTypeMap",void 0),o(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=m(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=l,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],b())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(S?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key||p(),n=i({key:t,type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:m(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=m(),this.currentBlockType="unstyled",this.currentText="",n},t._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=i.nodeName.toLowerCase();if("body"===o||V(o)){this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var a=this.currentDepth,s=this.wrapper;V(o)&&(this.wrapper=o,V(s)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),t)),this.currentDepth=a,this.wrapper=s}else{var c=this.blockTypeMap.get(o);if(void 0===c)if("#text"!==o)if("br"!==o)if(W(i))this._addImgNode(i,t);else if(F(i))this._addAnchorNode(i,n,t);else{var u=t;N.has(o)&&(u=u.add(N.get(o))),u=H(i,u);var l=z(i);null!=l&&(u=u.add(l)),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),u))}else this._addBreakNode(i,t);else this._addTextNode(i,t);else{this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var f=this.currentDepth,d=this.wrapper;if(this.wrapper="pre"===o?"pre":this.wrapper,"string"!=typeof c&&(c=this.disambiguate(o,this.wrapper)||c[0]||"unstyled"),!S&&x(i)&&("unordered-list-item"===c||"ordered-list-item"===c)){var h=i;this.currentDepth=B(h,this.currentDepth)}var g=p(),v=this._toBlockConfigs(Array.from(i.childNodes),t);this._trimCurrentText(),n.push(this._makeBlockConfig({key:g,childConfigs:v,type:c})),this.currentDepth=f,this.wrapper=d}}}return n},t._appendText=function(e,t){var n;this.currentText+=e;var r=a.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(r))},t._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry((function(e){return null!==e.getEntity()}));(t=void 0!==r?Math.min(t,r[0]):t)>(n=void 0!==(r=this.characterList.reverse().findEntry((function(e){return null!==e.getEntity()})))?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=m()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},t._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(k,"")).replace(C," ")),this._appendText(n,t)},t._addBreakNode=function(e,t){_(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){if(O(e)){var n=e,r={};M.forEach((function(e){var t=n.getAttribute(e);t&&(r[e]=t)})),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),g("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},t._addAnchorNode=function(e,t,n){if(w(e)){var r=e,i={};A.forEach((function(e){var t=r.getAttribute(e);t&&(i[e]=t)})),i.url=new f(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",i||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},t._toContentBlocks=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.length-1,r=0;r<=n;r++){var o=e[r];o.parent=t,o.prevSibling=r>0?e[r-1].key:null,o.nextSibling=r<n?e[r+1].key:null,o.children=m(o.childConfigs.map((function(e){return e.key}))),this.contentBlocks.push(new c(i({},o))),this._toContentBlocks(o.childConfigs,o.key)}},t._hoistContainersInBlockConfigs=function(e){var t=this;return m(e).flatMap((function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)}))},t._toFlatContentBlocks=function(e){var t=this;this._hoistContainersInBlockConfigs(e).forEach((function(e){var n=t._extractTextFromBlockConfigs(e.childConfigs),r=n.text,o=n.characterList;t.contentBlocks.push(new s(i({},e,{text:e.text+r,characterList:e.characterList.concat(o)})))}))},t._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=m(),i=0;i<=t;i++){var o=e[i];n+=o.text,r=r.concat(o.characterList),""!==n&&"unstyled"!==o.type&&(n+="\n",r=r.push(r.last()));var a=this._extractTextFromBlockConfigs(o.childConfigs);n+=a.text,r=r.concat(a.characterList)}return{text:n,characterList:r}},e}();e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,r=t(e=e.trim().replace(E,"").replace(T," ").replace(j,"").replace(P,""));if(!r)return null;var i=L(n),o=function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null};return new U(i,o).addDOMNode(r).getContentBlocks()}},function(e,t,n){"use strict";var r=n(87),i=n(42),o=r.isBrowser("IE <= 9");e.exports=function(e){var t,n=null;return!o&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||i(!1),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}},function(e,t,n){"use strict";var r=n(85),i=n(51),o=n(1024),a=n(86),s={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some((function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()}))},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return s.toggleInlineStyle(e,"BOLD");case"italic":return s.toggleInlineStyle(e,"ITALIC");case"underline":return s.toggleInlineStyle(e,"UNDERLINE");case"code":return s.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return s.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return s.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=r.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),n=i.push(e,t,"insert-characters");return i.forceSelection(n,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockBefore(r);if(o&&"atomic"===o.getType()){var a=n.getBlockMap().delete(o.getKey()),c=n.merge({blockMap:a,selectionAfter:t});if(c!==n)return i.push(e,c,"remove-range")}var u=s.tryToRemoveBlockStyle(e);return u?i.push(e,u,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),o=t.getStartKey(),a=n.getBlockForKey(o).getLength();if(t.getStartOffset()<a)return null;var s=n.getBlockAfter(o);if(!s||"atomic"!==s.getType())return null;var c=t.merge({focusKey:s.getKey(),focusOffset:s.getLength()}),u=r.removeRange(n,c,"forward");return u!==n?i.push(e,u,"remove-range"):null},onTab:function(e,t,n){var r=t.getSelection(),a=r.getAnchorKey();if(a!==r.getFocusKey())return t;var s=t.getCurrentContent(),c=s.getBlockForKey(a),u=c.getType();if("unordered-list-item"!==u&&"ordered-list-item"!==u)return t;e.preventDefault();var l=c.getDepth();if(!e.shiftKey&&l===n)return t;var f=o(s,r,e.shiftKey?-1:1,n);return i.push(t,f,"adjust-depth")},toggleBlockType:function(e,t){var n=e.getSelection(),o=n.getStartKey(),s=n.getEndKey(),c=e.getCurrentContent(),u=n;if(o!==s&&0===n.getEndOffset()){var l=a(c.getBlockBefore(s));s=l.getKey(),u=u.merge({anchorKey:o,anchorOffset:n.getStartOffset(),focusKey:s,focusOffset:l.getLength(),isBackward:!1})}if(c.getBlockMap().skipWhile((function(e,t){return t!==o})).reverse().skipWhile((function(e,t){return t!==s})).some((function(e){return"atomic"===e.getType()})))return e;var f=c.getBlockForKey(o).getType()===t?"unstyled":t;return i.push(e,r.setBlockType(c,u,f),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?s.toggleBlockType(e,"code-block"):s.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(e,t){var n=e.getSelection(),o=e.getCurrentInlineStyle();if(n.isCollapsed())return i.setInlineStyleOverride(e,o.has(t)?o.remove(t):o.add(t));var a,s=e.getCurrentContent();return a=o.has(t)?r.removeInlineStyle(s,n,t):r.applyInlineStyle(s,n,t),i.push(e,a,"change-inline-style")},toggleLink:function(e,t,n){var o=r.applyEntity(e.getCurrentContent(),t,n);return i.push(e,o,"apply-entity")},tryToRemoveBlockStyle:function(e){var t=e.getSelection(),n=t.getAnchorOffset();if(t.isCollapsed()&&0===n){var i=t.getAnchorKey(),o=e.getCurrentContent(),a=o.getBlockForKey(i).getType(),s=o.getBlockBefore(i);if("code-block"===a&&s&&"code-block"===s.getType()&&0!==s.getLength())return null;if("unstyled"!==a)return r.setBlockType(o,t,"unstyled")}return null}};e.exports=s},function(e,t,n){"use strict";var r=n(444),i=n(312),o=n(87),a=o.isPlatform("Mac OS X"),s=a&&o.isBrowser("Firefox < 29"),c=r.hasCommandModifier,u=r.isCtrlKeyCommand;function l(e){return a&&e.altKey||u(e)}e.exports=function(e){switch(e.keyCode){case 66:return c(e)?"bold":null;case 68:return u(e)?"delete":null;case 72:return u(e)?"backspace":null;case 73:return c(e)?"italic":null;case 74:return c(e)?"code":null;case 75:return a&&u(e)?"secondary-cut":null;case 77:case 79:return u(e)?"split-block":null;case 84:return a&&u(e)?"transpose-characters":null;case 85:return c(e)?"underline":null;case 87:return a&&u(e)?"backspace-word":null;case 89:return u(e)?a?"secondary-paste":"redo":null;case 90:return function(e){return c(e)?e.shiftKey?"redo":"undo":null}(e)||null;case i.RETURN:return"split-block";case i.DELETE:return function(e){return!a&&e.shiftKey?null:l(e)?"delete-word":"delete"}(e);case i.BACKSPACE:return function(e){return c(e)&&a?"backspace-to-start-of-line":l(e)?"backspace-word":"backspace"}(e);case i.LEFT:return s&&c(e)?"move-selection-to-start-of-block":null;case i.RIGHT:return s&&c(e)?"move-selection-to-end-of-block":null;default:return null}}},function(e,t,n){"use strict";var r={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};e.exports=r},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(0,r(n(1046)).default)();t.default=i},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var r=n(1068),i=n(1070);e.exports=function(e,t,n){return r(i,e,t,n)}},function(e,t,n){var r=n(301);e.exports=function(e){return r(e,4)}},function(e,t,n){var r=n(448);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},function(e,t){!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=window.document,t=[],n=null,r=null;o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o._setupCrossOriginUpdater=function(){return n||(n=function(e,n){r=e&&n?l(e,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach((function(e){e._checkForIntersections()}))}),n},o._resetCrossOriginUpdater=function(){n=null,r=null},o.prototype.observe=function(e){if(!this._observationTargets.some((function(t){return t.element==e}))){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},o.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e})),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},o.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter((function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]}))},o.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map((function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}}));return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},o.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var r=this._checkForIntersections,i=null,o=null;if(this.POLL_INTERVAL?i=n.setInterval(r,this.POLL_INTERVAL):(a(n,"resize",r,!0),a(t,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(o=new n.MutationObserver(r)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push((function(){var e=t.defaultView;e&&(i&&e.clearInterval(i),s(e,"resize",r,!0)),s(t,"scroll",r,!0),o&&o.disconnect()})),t!=(this.root&&this.root.ownerDocument||e)){var c=p(t);c&&this._monitorIntersections(c.ownerDocument)}}},o.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var r=this.root&&this.root.ownerDocument||e;if(!this._observationTargets.some((function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=r;){var i=p(n);if((n=i&&i.ownerDocument)==t)return!0}return!1}))){var i=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),i(),t!=r){var o=p(t);o&&this._unmonitorIntersections(o.ownerDocument)}}}},o.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t<e.length;t++)e[t]()},o.prototype._checkForIntersections=function(){if(this.root||!n||r){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(r){var o=r.element,a=c(o),s=this._rootContainsTarget(o),u=r.entry,l=e&&s&&this._computeTargetAndRootIntersection(o,a,t),f=r.entry=new i({time:window.performance&&performance.now&&performance.now(),target:o,boundingClientRect:a,rootBounds:n&&!this.root?null:t,intersectionRect:l});u?e&&s?this._hasCrossedThreshold(u,f)&&this._queuedEntries.push(f):u&&u.isIntersecting&&this._queuedEntries.push(f):this._queuedEntries.push(f)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},o.prototype._computeTargetAndRootIntersection=function(t,i,o){if("none"!=window.getComputedStyle(t).display){for(var a,s,u,f,p,h,g,v,m=i,y=d(t),b=!1;!b&&y;){var w=null,_=1==y.nodeType?window.getComputedStyle(y):{};if("none"==_.display)return null;if(y==this.root||9==y.nodeType)if(b=!0,y==this.root||y==e)n&&!this.root?!r||0==r.width&&0==r.height?(y=null,w=null,m=null):w=r:w=o;else{var x=d(y),O=x&&c(x),S=x&&this._computeTargetAndRootIntersection(x,O,o);O&&S?(y=x,w=l(O,S)):(y=null,m=null)}else{var E=y.ownerDocument;y!=E.body&&y!=E.documentElement&&"visible"!=_.overflow&&(w=c(y))}if(w&&(a=w,s=m,u=void 0,f=void 0,p=void 0,h=void 0,g=void 0,v=void 0,u=Math.max(a.top,s.top),f=Math.min(a.bottom,s.bottom),p=Math.max(a.left,s.left),h=Math.min(a.right,s.right),v=f-u,m=(g=h-p)>=0&&v>=0&&{top:u,bottom:f,left:p,right:h,width:g,height:v}||null),!m)break;y=y&&d(y)}return m}},o.prototype._getRootRect=function(){var t;if(this.root)t=c(this.root);else{var n=e.documentElement,r=e.body;t={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map((function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100})),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var i=0;i<this.thresholds.length;i++){var o=this.thresholds[i];if(o==n||o==r||o<n!=o<r)return!0}},o.prototype._rootIsInDom=function(){return!this.root||f(e,this.root)},o.prototype._rootContainsTarget=function(t){return f(this.root||e,t)&&(!this.root||this.root.ownerDocument==t.ownerDocument)},o.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},o.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=o,window.IntersectionObserverEntry=i}function i(e){this.time=e.time,this.target=e.target,this.rootBounds=u(e.rootBounds),this.boundingClientRect=u(e.boundingClientRect),this.intersectionRect=u(e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,r=this.intersectionRect,i=r.width*r.height;this.intersectionRatio=n?Number((i/n).toFixed(4)):this.isIntersecting?1:0}function o(e,t){var n,r,i,o=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(o.root&&1!=o.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout((function(){n(),i=null}),r))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(o.rootMargin),this.thresholds=this._initThresholds(o.threshold),this.root=o.root||null,this.rootMargin=this._rootMarginValues.map((function(e){return e.value+e.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function a(e,t,n,r){"function"==typeof e.addEventListener?e.addEventListener(t,n,r||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function s(e,t,n,r){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,r||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function c(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function u(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function l(e,t){var n=t.top-e.top,r=t.left-e.left;return{top:n,left:r,height:t.height,width:t.width,bottom:n+t.height,right:r+t.width}}function f(e,t){for(var n=t;n;){if(n==e)return!0;n=d(n)}return!1}function d(t){var n=t.parentNode;return 9==t.nodeType&&t!=e?p(t):n&&11==n.nodeType&&n.host?n.host:n&&n.assignedSlot?n.assignedSlot.parentNode:n}function p(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(e){return null}}}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),i=n(154),o=n(356);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e){var t=Object(i.a)().getMonitor(),n=a(Object(o.a)(t,e),2),s=n[0],c=n[1];return Object(r.useEffect)((function(){return t.subscribeToOffsetChange(c)})),Object(r.useEffect)((function(){return t.subscribeToStateChange(c)})),s}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var r=n(0),i=n(182);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=0,c=Object(r.memo)((function(e){var t=e.children,n=o(function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;o[u]||(o[u]=Object(i.b)(e,t,n,r));return o[u]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(a(e,["children"])),2),c=n[0],f=n[1];return r.useEffect((function(){return f&&s++,function(){f&&(0===--s&&(l()[u]=null))}}),[]),r.createElement(i.a.Provider,{value:c},t)}));c.displayName="DndProvider";var u=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function l(){return void 0!==e?e:window}}).call(this,n(91))},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BoundingBox=void 0;var i=n(1102);!function(e){function t(e,t,n){var r=e.top,o=e.right,a=e.bottom,s=e.left;return"column"===n?(100-r-a)*t/100+r:"row"===n?(100-o-s)*t/100+s:i.assertNever(n)}e.empty=function(){return{top:0,right:0,bottom:0,left:0}},e.split=function(e,n,o){var a=t(e,n,o);return"column"===o?{first:r(r({},e),{bottom:100-a}),second:r(r({},e),{top:a})}:"row"===o?{first:r(r({},e),{right:100-a}),second:r(r({},e),{left:a})}:i.assertNever(o)},e.getAbsoluteSplitPercentage=t,e.getRelativeSplitPercentage=function(e,t,n){var r=e.top,o=e.right,a=e.bottom,s=e.left;return"column"===n?(t-r)/(100-r-a)*100:"row"===n?(t-s)/(100-o-s)*100:i.assertNever(n)},e.asStyles=function(e){return{top:e.top+"%",right:e.right+"%",bottom:e.bottom+"%",left:e.left+"%"}}}(t.BoundingBox||(t.BoundingBox={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicZeroState=void 0;var a=o(n(23)),s=o(n(229)),c=o(n(0)),u=n(100),l=n(175),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.replace=function(){return Promise.resolve(t.props.createNode()).then((function(e){return t.context.mosaicActions.replaceWith([],e)})).catch(s.default)},t}return i(t,e),t.prototype.render=function(){return c.default.createElement("div",{className:a.default("mosaic-zero-state",l.OptionalBlueprint.getClasses("NON_IDEAL_STATE"))},c.default.createElement("div",{className:l.OptionalBlueprint.getClasses("NON_IDEAL_STATE_VISUAL")},c.default.createElement(l.OptionalBlueprint.Icon,{iconSize:120,icon:"applications"})),c.default.createElement("h4",{className:l.OptionalBlueprint.getClasses("HEADING")},"No Windows Present"),c.default.createElement("div",null,this.props.createNode&&c.default.createElement("button",{className:a.default(l.OptionalBlueprint.getClasses("BUTTON"),l.OptionalBlueprint.getIconClass("ADD")),onClick:this.replace},"Add New Window")))},t.contextType=u.MosaicContext,t}(c.default.PureComponent);t.MosaicZeroState=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicDropTarget=void 0;var a=o(n(23)),s=o(n(0)),c=n(176),u=n(100),l=n(317),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.position,n=e.isOver,r=e.connectDropTarget,i=e.draggedMosaicId;return r(s.default.createElement("div",{className:a.default("drop-target",t,{"drop-target-hover":n&&i===this.context.mosaicId})}))},t.contextType=u.MosaicContext,t}(s.default.PureComponent);t.MosaicDropTarget=c.DropTarget(l.MosaicDragType.WINDOW,{drop:function(e,t,n){return n.context.mosaicId===(t.getItem()||{}).mosaicId?{path:e.path,position:e.position}:{}}},(function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),draggedMosaicId:(t.getItem()||{}).mosaicId}}))(f)},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CONTROLS_WITHOUT_CREATION=t.DEFAULT_CONTROLS_WITH_CREATION=void 0;var i=r(n(0)),o=n(662),a=n(663),s=n(664),c=n(665);t.DEFAULT_CONTROLS_WITH_CREATION=i.default.Children.toArray([i.default.createElement(s.ReplaceButton,null),i.default.createElement(c.SplitButton,null),i.default.createElement(o.ExpandButton,null),i.default.createElement(a.RemoveButton,null)]),t.DEFAULT_CONTROLS_WITHOUT_CREATION=i.default.Children.toArray([i.default.createElement(o.ExpandButton,null),i.default.createElement(a.RemoveButton,null)])},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandButton=void 0;var a=o(n(23)),s=o(n(0)),c=n(100),u=n(175),l=n(241),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this;return s.default.createElement(c.MosaicContext.Consumer,null,(function(t){var n=t.mosaicActions;return l.createDefaultToolbarButton("Expand",a.default("expand-button",u.OptionalBlueprint.getIconClass("MAXIMIZE")),e.createExpand(n))}))},t.prototype.createExpand=function(e){var t=this;return function(){e.expand(t.context.mosaicWindowActions.getPath()),t.props.onClick&&t.props.onClick()}},t.contextType=c.MosaicWindowContext,t}(s.default.PureComponent);t.ExpandButton=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveButton=void 0;var a=o(n(23)),s=o(n(0)),c=n(100),u=n(175),l=n(241),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this;return s.default.createElement(c.MosaicContext.Consumer,null,(function(t){var n=t.mosaicActions;return l.createDefaultToolbarButton("Close Window",a.default("close-button",u.OptionalBlueprint.getIconClass("CROSS")),e.createRemove(n))}))},t.prototype.createRemove=function(e){var t=this;return function(){e.remove(t.context.mosaicWindowActions.getPath()),t.props.onClick&&t.props.onClick()}},t.contextType=c.MosaicWindowContext,t}(s.default.PureComponent);t.RemoveButton=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaceButton=void 0;var a=o(n(23)),s=o(n(229)),c=o(n(0)),u=n(100),l=n(175),f=n(241),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.replace=function(){t.context.mosaicWindowActions.replaceWithNew().then((function(){t.props.onClick&&t.props.onClick()})).catch(s.default)},t}return i(t,e),t.prototype.render=function(){return f.createDefaultToolbarButton("Replace Window",a.default("replace-button",l.OptionalBlueprint.getIconClass("EXCHANGE")),this.replace)},t.contextType=u.MosaicWindowContext,t}(c.default.PureComponent);t.ReplaceButton=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButton=void 0;var a=o(n(23)),s=o(n(229)),c=o(n(0)),u=n(100),l=n(175),f=n(241),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.split=function(){t.context.mosaicWindowActions.split().then((function(){t.props.onClick&&t.props.onClick()})).catch(s.default)},t}return i(t,e),t.prototype.render=function(){return f.createDefaultToolbarButton("Split Window",a.default("split-button",l.OptionalBlueprint.getIconClass("ADD_COLUMN_RIGHT")),this.split)},t.contextType=u.MosaicWindowContext,t}(c.default.PureComponent);t.SplitButton=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Separator=void 0;var a=o(n(0)),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){return a.default.createElement("div",{className:"separator"})},t}(a.default.PureComponent);t.Separator=s},function(e,t,n){"use strict";n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return P})),n.d(t,"b",(function(){return I})),n.d(t,"a",(function(){return R})),n.d(t,"e",(function(){return A})),n.d(t,"f",(function(){return M}));var r=n(10),i=n(256),o=n.n(i),a=n(29),s=n.n(a),c=n(368),u=n(139),l=n.n(u),f=n(126);function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d(this,e),this.resource=t}var t,n,r;return t=e,(n=[{key:"isOnlyTag",value:function(){return 1===this.motivations.length&&"tagging"===this.motivations[0]}},{key:"id",get:function(){return this._id=this._id||this.resource.id||Object(f.a)(),this._id}},{key:"targetId",get:function(){var e=this.target[0];switch(typeof e){case"string":return e.replace(/#?xywh=(.*)$/,"");case"object":return e.source&&e.source.id||e.source||e.id;default:return null}}},{key:"motivations",get:function(){return s()(l()(new Array(this.resource.motivation)))}},{key:"body",get:function(){return s()(l()(new Array(this.resource.body)))}},{key:"resources",get:function(){return this.body}},{key:"tags",get:function(){return this.isOnlyTag()?this.body.map((function(e){return e.value})):this.body.filter((function(e){return"tagging"===e.purpose})).map((function(e){return e.value}))}},{key:"target",get:function(){return s()(l()(new Array(this.resource.target)))}},{key:"chars",get:function(){return this.isOnlyTag()?null:this.body.filter((function(e){return"tagging"!==e.purpose})).map((function(e){return e.value})).join(" ")}},{key:"selector",get:function(){var e=this.target[0];switch(typeof e){case"string":return e;case"object":return s()(l()(new Array(e.selector)));default:return null}}},{key:"svgSelector",get:function(){var e=this.selector;switch(typeof e){case"string":return null;case"object":return e.find((function(e){return e.type&&"SvgSelector"===e.type}));default:return null}}},{key:"fragmentSelector",get:function(){var e,t,n=this.selector;switch(typeof n){case"string":e=n.match(/xywh=(.*)$/);break;case"object":e=(t=n.find((function(e){return e.type&&"FragmentSelector"===e.type})))&&t.value.match(/xywh=(.*)$/);break;default:return null}return e&&e[1].split(",").map((function(e){return parseInt(e,10)}))}}])&&p(t.prototype,n),r&&p(t,r),e}();function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var v=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.json=t,this.target=n}var t,n,r;return t=e,(n=[{key:"id",get:function(){return this.json.id}},{key:"present",value:function(){return this.items&&this.items.length>0}},{key:"items",get:function(){var e=this;return this._items=this._items||(e.json&&e.json.items?s()([e.json.items]).map((function(e){return new h(e)})):[]),this._items}},{key:"resources",get:function(){return this.items}}])&&g(t.prototype,n),r&&g(t,r),e}();function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"determineAnnotation",value:function(e,t){return e?"AnnotationPage"===e.type?new v(e,t):new c.a(e,t):null}}],(n=null)&&m(t.prototype,n),r&&m(t,r),e}(),b=n(46),w=n(45),_=n(88),x=n(38),O=["canvasId"];function S(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var E=function(e){return Object(b.a)(e).annotations},C=Object(r.createSelector)([_.a,function(e,t){return t.motivations}],(function(e,t){return t||e.annotations.filteredMotivations})),k=Object(r.createSelector)([w.getCanvas,E],(function(e,t){return t&&e&&t[e.id]?s()(Object.values(t[e.id])):[]})),T=Object(r.createSelector)([k],(function(e){return o()(Object.values(e).map((function(e){return e&&y.determineAnnotation(e.json)})),(function(e){return e&&e.present()}))})),j=Object(r.createSelector)([function(e,t){var n=t.canvasId,r=S(t,O);return n?[n]:Object(w.getVisibleCanvasIds)(e,r)},E],(function(e,t){return t&&0!==e.length?s()(e.map((function(e){return t[e]&&Object.values(t[e])}))):[]})),P=Object(r.createSelector)([j],(function(e){return o()(Object.values(e).map((function(e){return e&&y.determineAnnotation(e.json)})),(function(e){return e&&e.present()}))})),I=Object(r.createSelector)([T,C],(function(e,t){return o()(s()(e.map((function(e){return e.resources}))),(function(e){return e.motivations.some((function(e){return t.includes(e)}))}))})),R=Object(r.createSelector)([P,C],(function(e,t){return o()(s()(e.map((function(e){return e.resources}))),(function(e){return e.motivations.some((function(e){return t.includes(e)}))}))})),A=Object(r.createSelector)([x.e],(function(e){return e.selectedAnnotationId})),M=Object(r.createSelector)([P,A],(function(e,t){return e.map((function(e){return{id:e["@id"]||e.id,resources:e.resources.filter((function(e){return t===e.id}))}})).filter((function(e){return e.resources.length>0}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),i=n(17),o=n(362),a=n(94),s=n(152),c=n(154),u=n(361),l=n(360);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function p(e){var t=Object(r.useRef)(e);t.current=e,Object(i.a)(null!=e.accept,"accept must be defined");var n,p=d((n=Object(c.a)(),[Object(r.useMemo)((function(){return new l.a(n)}),[n]),Object(r.useMemo)((function(){return new u.a(n.getBackend())}),[n])]),2),h=p[0],g=p[1];!function(e,t,n){var i=Object(c.a)(),o=Object(r.useMemo)((function(){return{canDrop:function(){var n=e.current.canDrop;return!n||n(t.getItem(),t)},hover:function(){var n=e.current.hover;n&&n(t.getItem(),t)},drop:function(){var n=e.current.drop;if(n)return n(t.getItem(),t)}}}),[t]);Object(a.a)((function(){var r=f(Object(s.b)(e.current.accept,o,i),2),a=r[0],c=r[1];return t.receiveHandlerId(a),n.receiveHandlerId(a),c}),[t,n])}(t,h,g);var v=Object(o.a)(h,t.current.collect||function(){return{}},(function(){return g.reconnect()})),m=Object(r.useMemo)((function(){return g.hooks.dropTarget()}),[g]);return Object(a.a)((function(){g.dropTargetOptions=e.options||null,g.reconnect()}),[e.options]),[v,m]}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(15))&&r.__esModule?r:{default:r};function o(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,c,"next",e)}function c(e){o(a,r,i,s,c,"throw",e)}s(void 0)}))}}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(){function e(e,t){this.canvasId=e,this.endpointUrl=t}var t,n,r,o=e.prototype;return o.create=function(){var e=a(i.default.mark((function e(t){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",fetch(this.endpointUrl,{body:JSON.stringify({annotation:{canvas:this.canvasId,data:JSON.stringify(t),uuid:t.id}}),headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return n.all()})).catch((function(){return n.all()})));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),o.update=function(){var e=a(i.default.mark((function e(t){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",fetch(this.endpointUrl+"/"+encodeURIComponent(t.id),{body:JSON.stringify({annotation:{data:JSON.stringify(t),uuid:t.id}}),headers:{Accept:"application/json","Content-Type":"application/json"},method:"PATCH"}).then((function(e){return n.all()})).catch((function(){return n.all()})));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),o.delete=function(){var e=a(i.default.mark((function e(t){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",fetch(this.endpointUrl+"/"+encodeURIComponent(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"DELETE"}).then((function(e){return n.all()})).catch((function(){return n.all()})));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),o.get=function(){var e=a(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(this.endpointUrl+"/"+encodeURIComponent(t),{headers:{Accept:"application/json","Content-Type":"application/json"}});case 2:return e.abrupt("return",e.sent.json());case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),o.all=function(){var e=a(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(this.annotationPageId);case 2:return e.abrupt("return",e.sent.json());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t=e,(n=[{key:"annotationPageId",get:function(){return this.endpointUrl+"/pages?uri="+this.canvasId}}])&&s(t.prototype,n),r&&s(t,r),e}();t.default=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(15))&&r.__esModule?r:{default:r};function o(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,c,"next",e)}function c(e){o(a,r,i,s,c,"throw",e)}s(void 0)}))}}var s=function(){function e(e){this.annotationPageId=e}var t=e.prototype;return t.create=function(){var e=a(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={id:this.annotationPageId,items:[],type:"AnnotationPage"},e.next=3,this.all();case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0=n;case 6:return(r=e.t0).items.push(t),localStorage.setItem(this.annotationPageId,JSON.stringify(r)),e.abrupt("return",r);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.update=function(){var e=a(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.all();case 2:if(!(n=e.sent)){e.next=8;break}return r=n.items.findIndex((function(e){return e.id===t.id})),n.items.splice(r,1,t),localStorage.setItem(this.annotationPageId,JSON.stringify(n)),e.abrupt("return",n);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.delete=function(){var e=a(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.all();case 2:return(n=e.sent)&&(n.items=n.items.filter((function(e){return e.id!==t}))),localStorage.setItem(this.annotationPageId,JSON.stringify(n)),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.get=function(){var e=a(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.all();case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n.items.find((function(e){return e.id===t})));case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.all=function(){var e=a(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",JSON.parse(localStorage.getItem(this.annotationPageId)));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),e}();t.default=s,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"miradorAnnotationPlugin",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"externalStorageAnnotationPlugin",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"canvasAnnotationsPlugin",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"annotationCreationCompanionWindow",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"windowSideBarButtonsPlugin",{enumerable:!0,get:function(){return s.default}}),t.default=void 0;var r=c(n(766)),i=c(n(855)),o=c(n(856)),a=c(n(860)),s=c(n(1044));function c(e){return e&&e.__esModule?e:{default:e}}var u=[r.default,i.default,o.default,a.default,s.default];t.default=u},function(e,t,n){var r=n(203),i=n(204),o=n(414),a=n(288),s=i((function(e){return o(r(e,1,a,!0))}));e.exports=s},function(e,t,n){!function(e,t){"use strict";function n(e){return"string"==typeof e||"number"==typeof e}var r=function(){function e(){this._cache={}}var t=e.prototype;return t.set=function(e,t){this._cache[e]=t},t.get=function(e){return this._cache[e]},t.remove=function(e){delete this._cache[e]},t.clear=function(){this._cache={}},t.isValidCacheKey=function(e){return n(e)},e}(),i=r,o=function(){return!0};function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(e,r){if(r)throw new Error('[re-reselect] "options" as second argument is not supported anymore. Please provide an option object as single argument.');var a="function"==typeof e?{keySelector:e}:Object.assign({},e),s=0,c=n.pop(),u=Array.isArray(n[0])?n[0]:[].concat(n);n.push((function(){return s++,c.apply(void 0,arguments)}));var l=a.cacheObject||new i,f=a.selectorCreator||t.createSelector,d=l.isValidCacheKey||o;a.keySelectorCreator&&(a.keySelector=a.keySelectorCreator({keySelector:a.keySelector,inputSelectors:u,resultFunc:c}));var p=function(){var e=a.keySelector.apply(a,arguments);if(d(e)){var t=l.get(e);return void 0===t&&(t=f.apply(void 0,n),l.set(e,t)),t.apply(void 0,arguments)}console.warn('[re-reselect] Invalid cache key "'+e+'" has been returned by keySelector function.')};return p.getMatchingSelector=function(){var e=a.keySelector.apply(a,arguments);return l.get(e)},p.removeMatchingSelector=function(){var e=a.keySelector.apply(a,arguments);l.remove(e)},p.clearCache=function(){l.clear()},p.resultFunc=c,p.dependencies=u,p.cache=l,p.recomputations=function(){return s},p.resetRecomputations=function(){return s=0},p.keySelector=a.keySelector,p}}function s(e){if(void 0===e)throw new Error('Missing the required property "cacheSize".');if(!Number.isInteger(e)||e<=0)throw new Error('The "cacheSize" property must be a positive integer value.')}var c=function(){function e(e){var t=(void 0===e?{}:e).cacheSize;s(t),this._cache={},this._cacheOrdering=[],this._cacheSize=t}var t=e.prototype;return t.set=function(e,t){if(this._cache[e]=t,this._cacheOrdering.push(e),this._cacheOrdering.length>this._cacheSize){var n=this._cacheOrdering[0];this.remove(n)}},t.get=function(e){return this._cache[e]},t.remove=function(e){var t=this._cacheOrdering.indexOf(e);t>-1&&this._cacheOrdering.splice(t,1),delete this._cache[e]},t.clear=function(){this._cache={},this._cacheOrdering=[]},t.isValidCacheKey=function(e){return n(e)},e}(),u=function(){function e(e){var t=(void 0===e?{}:e).cacheSize;s(t),this._cache={},this._cacheOrdering=[],this._cacheSize=t}var t=e.prototype;return t.set=function(e,t){if(this._cache[e]=t,this._registerCacheHit(e),this._cacheOrdering.length>this._cacheSize){var n=this._cacheOrdering[0];this.remove(n)}},t.get=function(e){return this._registerCacheHit(e),this._cache[e]},t.remove=function(e){this._deleteCacheHit(e),delete this._cache[e]},t.clear=function(){this._cache={},this._cacheOrdering=[]},t._registerCacheHit=function(e){this._deleteCacheHit(e),this._cacheOrdering.push(e)},t._deleteCacheHit=function(e){var t=this._cacheOrdering.indexOf(e);t>-1&&this._cacheOrdering.splice(t,1)},t.isValidCacheKey=function(e){return n(e)},e}(),l=function(){function e(){this._cache=new Map}var t=e.prototype;return t.set=function(e,t){this._cache.set(e,t)},t.get=function(e){return this._cache.get(e)},t.remove=function(e){this._cache.delete(e)},t.clear=function(){this._cache.clear()},e}(),f=function(){function e(e){var t=(void 0===e?{}:e).cacheSize;s(t),this._cache=new Map,this._cacheSize=t}var t=e.prototype;return t.set=function(e,t){if(this._cache.set(e,t),this._cache.size>this._cacheSize){var n=this._cache.keys().next().value;this.remove(n)}},t.get=function(e){return this._cache.get(e)},t.remove=function(e){this._cache.delete(e)},t.clear=function(){this._cache.clear()},e}(),d=function(){function e(e){var t=(void 0===e?{}:e).cacheSize;s(t),this._cache=new Map,this._cacheSize=t}var t=e.prototype;return t.set=function(e,t){if(this._cache.set(e,t),this._cache.size>this._cacheSize){var n=this._cache.keys().next().value;this.remove(n)}},t.get=function(e){var t=this._cache.get(e);return this._cache.has(e)&&(this.remove(e),this._cache.set(e,t)),t},t.remove=function(e){this._cache.delete(e)},t.clear=function(){this._cache.clear()},e}();e.FifoMapCache=f,e.FifoObjectCache=c,e.FlatMapCache=l,e.FlatObjectCache=r,e.LruMapCache=d,e.LruObjectCache=u,e.createCachedSelector=a,e.createStructuredCachedSelector=function(e){return t.createStructuredSelector(e,a)},e.default=a,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(10))},function(e,t,n){"use strict";(function(e){
/**!
* @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 n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var i=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function o(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:c(s(e))}function u(e){return e&&e.referenceNode?e.referenceNode:e}var l=n&&!(!window.MSInputMethodContext||!document.documentMode),f=n&&/MSIE 10/.test(navigator.userAgent);function d(e){return 11===e?l:10===e?f:l||f}function p(e){if(!e)return document.documentElement;for(var t=d(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function h(e){return null!==e.parentNode?h(e.parentNode):e}function g(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,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,c=o.commonAncestorContainer;if(e!==c&&t!==c||r.contains(i))return"BODY"===(s=(a=c).nodeName)||"HTML"!==s&&p(a.firstElementChild)!==a?p(c):c;var u=h(e);return u.host?g(u.host,t):g(e,h(t).host)}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=v(t,"top"),i=v(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function y(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function b(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],d(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function w(e){var t=e.body,n=e.documentElement,r=d(10)&&getComputedStyle(n);return{height:b("Height",t,n,r),width:b("Width",t,n,r)}}var _=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),O=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function E(e){return S({},e,{right:e.left+e.width,bottom:e.top+e.height})}function C(e){var t={};try{if(d(10)){t=e.getBoundingClientRect();var n=v(e,"top"),r=v(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?w(e.ownerDocument):{},s=o.width||e.clientWidth||i.width,c=o.height||e.clientHeight||i.height,u=e.offsetWidth-s,l=e.offsetHeight-c;if(u||l){var f=a(e);u-=y(f,"x"),l-=y(f,"y"),i.width-=u,i.height-=l}return E(i)}function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=d(10),i="HTML"===t.nodeName,o=C(e),s=C(t),u=c(e),l=a(t),f=parseFloat(l.borderTopWidth),p=parseFloat(l.borderLeftWidth);n&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var h=E({top:o.top-s.top-f,left:o.left-s.left-p,width:o.width,height:o.height});if(h.marginTop=0,h.marginLeft=0,!r&&i){var g=parseFloat(l.marginTop),v=parseFloat(l.marginLeft);h.top-=f-g,h.bottom-=f-g,h.left-=p-v,h.right-=p-v,h.marginTop=g,h.marginLeft=v}return(r&&!n?t.contains(u):t===u&&"BODY"!==u.nodeName)&&(h=m(h,t)),h}function T(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=k(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:v(n),s=t?0:v(n,"left"),c={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return E(c)}function j(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&j(n)}function P(e){if(!e||!e.parentElement||d())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function I(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?P(e):g(e,u(t));if("viewport"===r)o=T(a,i);else{var l=void 0;"scrollParent"===r?"BODY"===(l=c(s(t))).nodeName&&(l=e.ownerDocument.documentElement):l="window"===r?e.ownerDocument.documentElement:r;var f=k(l,a,i);if("HTML"!==l.nodeName||j(a))o=f;else{var d=w(e.ownerDocument),p=d.height,h=d.width;o.top+=f.top-f.marginTop,o.bottom=p+f.top,o.left+=f.left-f.marginLeft,o.right=h+f.left}}var v="number"==typeof(n=n||0);return o.left+=v?n:n.left||0,o.top+=v?n:n.top||0,o.right-=v?n:n.right||0,o.bottom-=v?n:n.bottom||0,o}function R(e){return e.width*e.height}function A(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=I(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},c=Object.keys(s).map((function(e){return S({key:e},s[e],{area:R(s[e])})})).sort((function(e,t){return t.area-e.area})),u=c.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),l=u.length>0?u[0].key:c[0].key,f=e.split("-")[1];return l+(f?"-"+f:"")}function M(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?P(t):g(t,u(n));return k(n,i,r)}function D(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function N(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function L(e,t,n){n=n.split("-")[0];var r=D(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",c=o?"height":"width",u=o?"width":"height";return i[a]=t[a]+t[c]/2-r[c]/2,i[s]=n===s?t[s]-r[u]:t[N(s)],i}function z(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function B(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=z(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t.offsets.popper=E(t.offsets.popper),t.offsets.reference=E(t.offsets.reference),t=n(t,e))})),t}function F(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=M(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=A(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=L(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=B(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function H(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function V(){return this.state.isDestroyed=!0,W(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[H("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function U(e){var t=e.ownerDocument;return t?t.defaultView:window}function q(e,t,n,r){n.updateBound=r,U(e).addEventListener("resize",n.updateBound,{passive:!0});var i=c(e);return function e(t,n,r,i){var o="BODY"===t.nodeName,a=o?t.ownerDocument.defaultView:t;a.addEventListener(n,r,{passive:!0}),o||e(c(a.parentNode),n,r,i),i.push(a)}(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function G(){this.state.eventsEnabled||(this.state=q(this.reference,this.options,this.state,this.scheduleUpdate))}function K(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,U(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function $(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Z(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&$(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var X=n&&/Firefox/i.test(navigator.userAgent);function Q(e,t,n){var r=z(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var Y=["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"],J=Y.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=J.indexOf(e),r=J.slice(n+1).concat(J.slice(0,n));return t?r.reverse():r}var te="flip",ne="clockwise",re="counterclockwise";function ie(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(z(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return(u=u.map((function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return E(s)[t]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){$(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var oe={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",u=s?"width":"height",l={start:O({},c,o[c]),end:O({},c,o[c]+o[u]-a[u])};e.offsets.popper=S({},a,l[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],c=void 0;return c=$(+n)?[+n,0]:ie(n,o,a,s),"left"===s?(o.top+=c[0],o.left-=c[1]):"right"===s?(o.top+=c[0],o.left+=c[1]):"top"===s?(o.left+=c[0],o.top-=c[1]):"bottom"===s&&(o.left+=c[0],o.top+=c[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||p(e.instance.popper);e.instance.reference===n&&(n=p(n));var r=H("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var c=I(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=c;var u=t.priority,l=e.offsets.popper,f={primary:function(e){var n=l[e];return l[e]<c[e]&&!t.escapeWithReference&&(n=Math.max(l[e],c[e])),O({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=l[n];return l[e]>c[e]&&!t.escapeWithReference&&(r=Math.min(l[n],c[e]-("right"===e?l.width:l.height))),O({},n,r)}};return u.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";l=S({},l,f[t](e))})),e.offsets.popper=l,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",c=a?"left":"top",u=a?"width":"height";return n[s]<o(r[c])&&(e.offsets.popper[c]=o(r[c])-n[u]),n[c]>o(r[s])&&(e.offsets.popper[c]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Q(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,s=o.popper,c=o.reference,u=-1!==["left","right"].indexOf(i),l=u?"height":"width",f=u?"Top":"Left",d=f.toLowerCase(),p=u?"left":"top",h=u?"bottom":"right",g=D(r)[l];c[h]-g<s[d]&&(e.offsets.popper[d]-=s[d]-(c[h]-g)),c[d]+g>s[h]&&(e.offsets.popper[d]+=c[d]+g-s[h]),e.offsets.popper=E(e.offsets.popper);var v=c[d]+c[l]/2-g/2,m=a(e.instance.popper),y=parseFloat(m["margin"+f]),b=parseFloat(m["border"+f+"Width"]),w=v-e.offsets.popper[d]-y-b;return w=Math.max(Math.min(s[l]-g,w),0),e.arrowElement=r,e.offsets.arrow=(O(n={},d,Math.round(w)),O(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=I(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=N(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case te:a=[r,i];break;case ne:a=ee(r);break;case re:a=ee(r,!0);break;default:a=t.behavior}return a.forEach((function(s,c){if(r!==s||a.length===c+1)return e;r=e.placement.split("-")[0],i=N(r);var u=e.offsets.popper,l=e.offsets.reference,f=Math.floor,d="left"===r&&f(u.right)>f(l.left)||"right"===r&&f(u.left)<f(l.right)||"top"===r&&f(u.bottom)>f(l.top)||"bottom"===r&&f(u.top)<f(l.bottom),p=f(u.left)<f(n.left),h=f(u.right)>f(n.right),g=f(u.top)<f(n.top),v=f(u.bottom)>f(n.bottom),m="left"===r&&p||"right"===r&&h||"top"===r&&g||"bottom"===r&&v,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===o&&p||y&&"end"===o&&h||!y&&"start"===o&&g||!y&&"end"===o&&v),w=!!t.flipVariationsByContent&&(y&&"start"===o&&h||y&&"end"===o&&p||!y&&"start"===o&&v||!y&&"end"===o&&g),_=b||w;(d||m||_)&&(e.flipped=!0,(d||m)&&(r=a[c+1]),_&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=S({},e.offsets.popper,L(e.instance.popper,e.offsets.reference,e.placement)),e=B(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=N(t),e.offsets.popper=E(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=z(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=z(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=p(e.instance.popper),c=C(s),u={position:i.position},l=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},c=o(i.width),u=o(r.width),l=-1!==["left","right"].indexOf(e.placement),f=-1!==e.placement.indexOf("-"),d=t?l||f||c%2==u%2?o:a:s,p=t?o:s;return{left:d(c%2==1&&u%2==1&&!f&&t?r.left-1:r.left),top:p(r.top),bottom:p(r.bottom),right:d(r.right)}}(e,window.devicePixelRatio<2||!X),f="bottom"===n?"top":"bottom",d="right"===r?"left":"right",h=H("transform"),g=void 0,v=void 0;if(v="bottom"===f?"HTML"===s.nodeName?-s.clientHeight+l.bottom:-c.height+l.bottom:l.top,g="right"===d?"HTML"===s.nodeName?-s.clientWidth+l.right:-c.width+l.right:l.left,a&&h)u[h]="translate3d("+g+"px, "+v+"px, 0)",u[f]=0,u[d]=0,u.willChange="transform";else{var m="bottom"===f?-1:1,y="right"===d?-1:1;u[f]=v*m,u[d]=g*y,u.willChange=f+", "+d}var b={"x-placement":e.placement};return e.attributes=S({},b,e.attributes),e.styles=S({},u,e.styles),e.arrowStyles=S({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return Z(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&Z(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=M(i,t,e,n.positionFixed),a=A(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),Z(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},ae=function(){function e(t,n){var r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=i(this.update.bind(this)),this.options=S({},e.Defaults,a),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(S({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){r.options.modifiers[t]=S({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return S({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&o(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return x(e,[{key:"update",value:function(){return F.call(this)}},{key:"destroy",value:function(){return V.call(this)}},{key:"enableEventListeners",value:function(){return G.call(this)}},{key:"disableEventListeners",value:function(){return K.call(this)}}]),e}();ae.Utils=("undefined"!=typeof window?window:e).PopperUtils,ae.placements=Y,ae.Defaults=oe,t.a=ae}).call(this,n(91))},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(67),n(2),n(3)),s=n(5),c=n(457),u=n(454),l=n(33),f=n(64),d=n(36),p={vertical:"top",horizontal:"right"},h={vertical:"top",horizontal:"left"},g=o.forwardRef((function(e,t){var n=e.autoFocus,s=void 0===n||n,g=e.children,v=e.classes,m=e.disableAutoFocusItem,y=void 0!==m&&m,b=e.MenuListProps,w=void 0===b?{}:b,_=e.onClose,x=e.onEntering,O=e.open,S=e.PaperProps,E=void 0===S?{}:S,C=e.PopoverClasses,k=e.transitionDuration,T=void 0===k?"auto":k,j=e.TransitionProps,P=(j=void 0===j?{}:j).onEntering,I=Object(i.a)(j,["onEntering"]),R=e.variant,A=void 0===R?"selectedMenu":R,M=Object(i.a)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),D=Object(d.a)(),N=s&&!y&&O,L=o.useRef(null),z=o.useRef(null),B=-1;o.Children.map(g,(function(e,t){o.isValidElement(e)&&(e.props.disabled||("menu"!==A&&e.props.selected||-1===B)&&(B=t))}));var F=o.Children.map(g,(function(e,t){return t===B?o.cloneElement(e,{ref:function(t){z.current=l.findDOMNode(t),Object(f.a)(e.ref,t)}}):e}));return o.createElement(c.a,Object(r.a)({getContentAnchorEl:function(){return z.current},classes:C,onClose:_,TransitionProps:Object(r.a)({onEntering:function(e,t){L.current&&L.current.adjustStyleForScrollbar(e,D),x&&x(e,t),P&&P(e,t)}},I),anchorOrigin:"rtl"===D.direction?p:h,transformOrigin:"rtl"===D.direction?p:h,PaperProps:Object(r.a)({},E,{classes:Object(r.a)({},E.classes,{root:v.paper})}),open:O,ref:t,transitionDuration:T},M),o.createElement(u.a,Object(r.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),_&&_(e,"tabKeyDown"))},actions:L,autoFocus:s&&(-1===B||y),autoFocusItem:N,variant:A},w,{className:Object(a.a)(v.list,w.className)}),F))}));t.a=Object(s.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(g)},function(e,t,n){"use strict";n.d(t,"b",(function(){return d}));var r=n(1),i=n(4),o=n(0),a=(n(2),n(342)),s=n(5),c=n(102),u=n(81),l=n(341),f=n(761),d=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},p=o.createElement(f.a,null),h=o.forwardRef((function(e,t){var n=e.children,s=e.classes,f=e.IconComponent,d=void 0===f?l.a:f,h=e.input,g=void 0===h?p:h,v=e.inputProps,m=(e.variant,Object(i.a)(e,["children","classes","IconComponent","input","inputProps","variant"])),y=Object(u.a)(),b=Object(c.a)({props:e,muiFormControl:y,states:["variant"]});return o.cloneElement(g,Object(r.a)({inputComponent:a.a,inputProps:Object(r.a)({children:n,classes:s,IconComponent:d,variant:b.variant,type:void 0},v,g?g.props.inputProps:{}),ref:t},m))}));h.muiName="Select",t.a=Object(s.a)(d,{name:"MuiNativeSelect"})(h)},function(e,t,n){"use strict";t.a=function(){return!1}},function(e,t,n){"use strict";(function(e){var r=n(54),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.a.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(426)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(0),a=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){var t=e.fill,n=void 0===t?"currentColor":t,r=e.width,o=void 0===r?24:r,s=e.height,c=void 0===s?24:s,u=e.style,l=void 0===u?{}:u,f=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:o,height:c},l)},f),a.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(0),a=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){var t=e.fill,n=void 0===t?"currentColor":t,r=e.width,o=void 0===r?24:r,s=e.height,c=void 0===s?24:s,u=e.style,l=void 0===u?{}:u,f=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:o,height:c},l)},f),a.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(932),i=r.default,o=r.DraggableCore;e.exports=i,e.exports.default=i,e.exports.DraggableCore=o},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M19 19H5V5h7V3H3v18h18v-9h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNewSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-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-2zm6 4c1.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"}),"DragIndicatorSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"}),"VerticalAlignBottomSharp");t.default=a},function(e,t,n){var r=n(167),i=n(414);e.exports=function(e,t){return e&&e.length?i(e,r(t,2)):[]}},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M7.11 8.53L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47zM6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47zm1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93z"}),"RotateLeft");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"}),"RotateRight");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"}),"SwapHoriz");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"}),"Brightness5");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M21 3H3v18h18V3zM6 7h5v1.5H6V7zm13 12H5L19 5v14zm-4.5-3v2H16v-2h2v-1.5h-2v-2h-1.5v2h-2V16h2z"}),"ExposureSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z"}),"Gradient");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87.93H13v-.93zM13 7h5.24c.25.31.48.65.68 1H13V7zm0 3h6.74c.08.33.15.66.19 1H13v-1zm0 9.93V19h2.87c-.87.48-1.84.8-2.87.93zM18.24 17H13v-1h5.92c-.2.35-.43.69-.68 1zm1.5-3H13v-1h6.93c-.04.34-.11.67-.19 1z"}),"Tonality");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"}),"InvertColors");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"ReplaySharp");t.default=a},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(80),o=r(n(648)),a=(0,i.withThemeCreator)({defaultTheme:o.default});t.default=a},function(e,t,n){"use strict";var r=n(7).compose;t.__esModule=!0,t.composeWithDevTools="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?r:r.apply(null,arguments)},t.devToolsEnhancer="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}}},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"}),"ReorderSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"}),"ArrowForwardSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpwardSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z"}),"KeyboardArrowUpSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"}),"VerticalAlignTopSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M17.66 8L12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8zM6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14H6z"}),"OpacitySharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}),"ChevronLeftSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightSharp");t.default=a},function(e,t,n){"use strict";(function(e){var r=n(0),i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=void 0;u="undefined"!=typeof window?window:"undefined"!=typeof self?self:e;var l=null,f=null,d=u.clearTimeout,p=u.setTimeout,h=u.cancelAnimationFrame||u.mozCancelAnimationFrame||u.webkitCancelAnimationFrame,g=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame;function v(e){var t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,c="undefined"!=typeof document&&document.attachEvent;if(!c){a=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},o=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;a(this),this.__resizeRAF__&&l(this.__resizeRAF__),this.__resizeRAF__=f((function(){o(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))}};var d=!1,p="";r="animationstart";var h="Webkit Moz O ms".split(" "),g="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),v=document.createElement("fakeelement");if(void 0!==v.style.animationName&&(d=!0),!1===d)for(var m=0;m<h.length;m++)if(void 0!==v.style[h[m]+"AnimationName"]){p="-"+h[m].toLowerCase()+"-",r=g[m],d=!0;break}t="@"+p+"keyframes "+(n="resizeanim")+" { from { opacity: 0; } to { opacity: 0; } } ",i=p+"animation: 1ms "+n+"; "}return{addResizeListener:function(o,l){if(c)o.attachEvent("onresize",l);else{if(!o.__resizeTriggers__){var f=o.ownerDocument,d=u.getComputedStyle(o);d&&"static"===d.position&&(o.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){var r=(t||"")+".resize-triggers { "+(i||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > 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%; }',o=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),o.appendChild(a)}}(f),o.__resizeLast__={},o.__resizeListeners__=[],(o.__resizeTriggers__=f.createElement("div")).className="resize-triggers";var p=f.createElement("div");p.className="expand-trigger",p.appendChild(f.createElement("div"));var h=f.createElement("div");h.className="contract-trigger",o.__resizeTriggers__.appendChild(p),o.__resizeTriggers__.appendChild(h),o.appendChild(o.__resizeTriggers__),a(o),o.addEventListener("scroll",s,!0),r&&(o.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&a(o)},o.__resizeTriggers__.addEventListener(r,o.__resizeTriggers__.__animationListener__))}o.__resizeListeners__.push(l)}},removeResizeListener:function(e,t){if(c)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==h||null==g?(l=d,f=function(e){return p(e,20)}):(l=function(e){var t=c(e,2),n=t[0],r=t[1];h(n),d(r)},f=function(e){var t=g((function(){d(n),e()})),n=p((function(){h(t),e()}),20);return[t,n]});var m=function(e){function t(){var e,n,r;i(this,t);for(var o=arguments.length,a=Array(o),c=0;c<o;c++)a[c]=arguments[c];return n=r=s(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.state={height:r.props.defaultHeight||0,width:r.props.defaultWidth||0},r._onResize=function(){var e=r.props,t=e.disableHeight,n=e.disableWidth,i=e.onResize;if(r._parentNode){var o=r._parentNode.offsetHeight||0,a=r._parentNode.offsetWidth||0,s=window.getComputedStyle(r._parentNode)||{},c=parseInt(s.paddingLeft,10)||0,u=parseInt(s.paddingRight,10)||0,l=parseInt(s.paddingTop,10)||0,f=parseInt(s.paddingBottom,10)||0,d=o-l-f,p=a-c-u;(!t&&r.state.height!==d||!n&&r.state.width!==p)&&(r.setState({height:o-l-f,width:a-c-u}),i({height:o,width:a}))}},r._setRef=function(e){r._autoSizer=e},s(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;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._detectElementResize=v(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,i=e.disableHeight,o=e.disableWidth,s=e.style,c=this.state,u=c.height,l=c.width,f={overflow:"visible"},d={},p=!1;return i||(0===u&&(p=!0),f.height=0,d.height=u),o||(0===l&&(p=!0),f.width=0,d.width=l),Object(r.createElement)("div",{className:n,ref:this._setRef,style:a({},f,s)},!p&&t(d))}}]),t}(r.PureComponent);m.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}},t.a=m}).call(this,n(91))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),o=c(i),a=c(n(2)),s=c(n(1083));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.fullScreenElement=null,n.detectFullScreen=n.detectFullScreen.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){s.default.addEventListener("fullscreenchange",this.detectFullScreen)}},{key:"componentWillUnmount",value:function(){s.default.removeEventListener("fullscreenchange",this.detectFullScreen)}},{key:"componentDidUpdate",value:function(){this.handleProps(this.props)}},{key:"handleProps",value:function(e){var t=s.default.fullscreenElement===this.node;t&&!e.enabled?this.leaveFullScreen():!t&&e.enabled&&this.enterFullScreen()}},{key:"detectFullScreen",value:function(){s.default.fullscreenElement===this.node?(this.fullScreenElement=s.default.fullscreenElement,this.props.onChange(!0)):!s.default.fullscreenElement&&this.fullScreenElement&&(this.fullScreenElement=null,this.props.onChange(!1))}},{key:"enterFullScreen",value:function(){s.default.fullscreenEnabled&&s.default.requestFullscreen(this.node)}},{key:"leaveFullScreen",value:function(){s.default.fullscreenEnabled&&s.default.exitFullscreen()}},{key:"render",value:function(){var e=this,t=["fullscreen"];return this.props.enabled&&t.push("fullscreen-enabled"),o.default.createElement("div",{className:t.join(" "),ref:function(t){return e.node=t},style:this.props.enabled?{height:"100%",width:"100%"}:void 0},this.props.children)}}]),t}(i.Component);u.propTypes={children:a.default.node.isRequired,enabled:a.default.bool.isRequired,onChange:a.default.func},u.defaultProps={enabled:!1,onChange:function(){}},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1118),i=r.default||r;t.default=function(e){var t=void 0===e?{}:e,n=t.enabled,r=void 0===n||n,o=t.opt,a=void 0===o?"out":o;return{onProcessStyle:function(e,t,n){if("font-face"===t.type)return e;if(!r)return"boolean"==typeof e.flip&&delete e.flip,e;var o="out"===a;return"boolean"==typeof n.options.flip&&(o=n.options.flip),"boolean"==typeof e.flip&&(o=e.flip,delete e.flip),o?i("function"==typeof t.toJSON?t.toJSON():e):e}}}},function(e){e.exports=JSON.parse('{"translation":{"aboutThisItem":"عن هذا العنصر","addedFromUrl":"(تمت إضافته من الرابط)","addManifestUrl":"موقع المصدر","addManifestUrlHelp":"الرابط لمصدر IIIF ","addResource":"اضف مصدر","annotationCanvasLabel_1/1":"العنصر: [{{الملصق}}]","annotationCanvasLabel_1/2":"يسار: [{{الملصق }}]","annotationCanvasLabel_2/2":"يمين: [{{الملصق}}]","annotations":"ملاحظات","attribution":"إسناد","attributionTitle":"حقوق","authenticationFailed":"التوثيق لم ينجح","authenticationRequired":"يجب توثيق الحساب لمنح الدخول الكامل","backToResults":"الرجوع الى النتائج","book":"كتاب","bottom":"أسفل","cancel":"الغاء","canvasIndex":"فهرس","changeTheme":"قم بتغيير الموضوع","clearSearch":"امسح","closeAddResourceForm":"إغلاق الإستمارة","closeAddResourceMenu":"إغلاق قائمة المصادر","closeCompanionWindow":"إغلاق اللوحة","closeWindow":"إغلاق النافذة","collapseSection":"تصغير جزء {{section}}","collapseSidePanel":"تصغير الشريط الجانبي","itemList":"قائمة العناصر","continue":"استمر","copy":"نسخ","currentItem":"العنصر الحالي","currentItem_1/1":"العنصر الحالي","currentItem_1/2":"يسار","currentItem_2/2":"يمين","dark":"موضوع داكن","dismiss":"تجاهل","highlightAllAnnotations":"تحديد الكل","downloadExport":"تصدير مساحة العمل","downloadExportWorkspace":"تصدير مساحة العمل","elastic":"مرن","elasticDescription":"حرك النوافذ و غير حجمها بحرية في مساحة عمل غير محدودة. يمكن أن تتداخل النوافذ أيضاً .","emptyResourceList":"قائمة المصادر الخاصة بك فارغة.","errorDialogConfirm":"حسناً","errorDialogTitle":"لقد حدث خطأ","exitFullScreen":"خروج من الشاشة الكاملة","expandSection":"توسيع الجزء {{section}}","expandSidePanel":"توسيع الشريط الجانبي","fetchManifest":"أضف","fullScreen":"شاشة كاملة","gallery":"المعرض","hideZoomControls":"إخفاء ضوابط التكبير","iiif_homepage":"عن هذه المصدر","iiif_manifest":"IIIF قائمة ","iiif_renderings":"تنسيقات بديلة","iiif_seeAlso":"أنظر أيضا","import":"استورد ","importWorkspace":"استيراد مساحة العمل","importWorkspaceHint":"قم بلصق تركيبة Mirador 3 ليتم استيراده","item":"العنصر: {{label}}","language":"اللغة","layer_hide":"إخفاء الطبقة","layer_move":"تحريك الطبقة","layer_opacity":"تعتيم الطبقة","layer_show":"إظهار الطبقة","layer_moveToTop":"حرك الطبقة إلى الأعلى","layers":"طبقات","light":"موضوع فاتح","links":"الروابط","listAllOpenWindows":"انتقل بسرعة للنافذة","login":"تسجيل الدخول","logout":"تسجيل الخروج","manifestError":"لا يمكن إضافة المصدر:","maximizeWindow":"تكبير النافذة إلى الحد الاكبر","minimizeWindow":"تصغير النافذة إلى الحد الأدنى","mirador":"Mirador","miradorResources":"مصادر Mirador ","miradorViewer":"مشاهد Mirador","more":"أكثر...","moreResults":"نتائج إضافية","mosaic":"فسيفساء","mosaicDescription":"حرك وغيٌر حجم النوافذ المتعلقة ببعضها البعض داخل الإطار المرئي.","moveCompanionWindowToBottom":"انتقل للأسفل","moveCompanionWindowToRight":"انتقل لليمين","nextCanvas":"العنصر التالي","numItems":"{{number}} عناصر","off":"ايقاف","openCompanionWindow_annotations":"ملاحظات","openCompanionWindow_attribution":"حقوق","openCompanionWindow_canvas":"فهرس","openCompanionWindow_info":"معلومات","openCompanionWindow_layers":"طبقات","openCompanionWindow_search":"بحث","openInCompanionWindow":"افتح في صفحة جديدة","openWindows":"النوافذ الحالية المفتوحة","pagination":"{{current}} من {{total}}","position":"مركز","previewWindowTitle":"عنوان","previousCanvas":"العنصر السابق","related":"ذات صلة","resource":"مصدر","retry":"أعد المحاولة ","right":"حق","rights":"ترخيص","searchInputLabel":"مصطلحات البحث","searchNextResult":"النتيجة التالية","searchNoResults":"لم يتم العثور على نتائج","searchPreviousResult":"النتيجة السابقة","searchSubmitAria":"ابحث","searchTitle":"بحث","selectWorkspaceMenu":"اختر نوع مساحة العمل","showingNumAnnotations":"تظهر {{number}} ملاحظات","showZoomControls":"اظهر عناصر التحكم بالتكبير و التصغير","sidebarPanelsNavigation":"تصفح لوح الشريط الجانبي","single":"مفرد","startHere":"إبدأ هنا","suggestSearch":"ابحث في هذا المستند عن \\"{{ query }}\\"","tableOfContentsList":"جدول المحتويات","theme":"موضوع","thumbnailList":"قائمة الصور المصغرة","thumbnailNavigation":"الصور المصغرة","thumbnails":"الصور المصغرة","toggleWindowSideBar":"تبديل الشريط الجانبي","tryAgain":"حاول مرة أخرى","untitled":"[بدون عنوان]","view":"شاهد","welcome":"مرحباً بكم في Mirador","window":"النافذة: {{label}}","windowMenu":"عرض النوافذ و الصور المصغرة","windowNavigation":"تصفح النافذة","windowPluginButtons":"خيارات","windowPluginMenu":"خيارات النافذة","workspace":"مساحة العمل","workspaceFullScreen":"شاشة كاملة","workspaceMenu":"اعدادات مساحة العمل","workspaceOptions":"خيارات مساحة العمل ","workspaceSelectionTitle":"اختر نوع مساحة العمل","zoomIn":"تكبير الصورة","zoomOut":"تصغير الصورة","zoomReset":"الرجوع لحجم الصورة الأساسي"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"Über Mirador","aboutThisItem":"Über dieses Element","addedFromUrl":"(Via URL hinzugefügt)","addManifestUrl":"Ort der Ressource","addManifestUrlHelp":"Die URL einer IIIF-Ressource","addResource":"Ressource hinzufügen","annotationCanvasLabel_1/1":"Objekt: [{{label}}]","annotationCanvasLabel_1/2":"Links: [{{label}}]","annotationCanvasLabel_2/2":"Rechts: [{{label}}]","annotations":"Annotationen","attribution":"Zuschreibung","attributionTitle":"Rechte","authenticationFailed":"Authentifizierung fehlgeschlagen","authenticationRequired":"Für vollen Zugriff ist eine Authentifizierung nötig.","backToResults":"Zurück zur Trefferansicht","book":"Buch","bottom":"Unten","cancel":"Abbrechen","canvasIndex":"Index","changeTheme":"Farbschema ändern","clearSearch":"zurücksetzen","closeAddResourceForm":"Formular schließen","closeAddResourceMenu":"Ressourcenliste schließen","closeCompanionWindow":"Hilfsfenster schließen","closeWindow":"Fenster schließen","collapseSection":"Bereich \\"{{section}}\\" zuklappen","collapseSidePanel":"Seitenleiste zuklappen","itemList":"Kompaktliste","continue":"Fortfahren","copy":"Kopieren","currentItem":"Aktuelles Objekt","currentItem_1/1":"Aktuelles Objekt","currentItem_1/2":"Links","currentItem_2/2":"Rechts","dark":"Dunkel","digitizedView":"Digitalisat-Ansicht","dismiss":"Verwerfen","highlightAllAnnotations":"Alle hervorheben","displayNoAnnotations":"Keine hervorheben","downloadExport":"Arbeitsfläche exportieren","downloadExportWorkspace":"Arbeitsfläche exportieren","elastic":"Elastisch","elasticDescription":"Fenster können frei und unbegrenzt innerhalb der Arbeitsfläche bewegt werden und sich überlappen","emptyResourceList":"Ihre Ressourcenliste ist leer","error":"Fehler","errorDialogConfirm":"OK","errorDialogTitle":"Es ist ein Fehler aufgetreten","exitFullScreen":"Vollbildmodus verlassen","expandSection":"Bereich \\"{{section}}\\" aufklappen","expandSidePanel":"Seitenleiste aufklappen","exportCopied":"Die Konfiguration der Arbeitsfläche wurde in die Zwischenablage kopiert.","fetchManifest":"Hinzufügen","fullScreen":"Vollbild","gallery":"Galerie","hideZoomControls":"Zoomsteuerung verbergen","iiif_homepage":"Über diese Ressource","iiif_manifest":"IIIF-Manifest","iiif_renderings":"Alternative Formate","iiif_seeAlso":"Siehe auch","import":"Importieren","importWorkspace":"Arbeitsfläche importieren","importWorkspaceHint":"Fügen Sie eine Mirador-3-Konfiguration ein, die importiert werden soll.","item":"Objekt: {{label}}","jsError":"Technische Details","jsStack":"{{ stack }}","language":"Sprache","layer_hide":"Ebene verbergen","layer_move":"Ebene verschieben","layer_opacity":"Ebenendeckkraft","layer_show":"Ebene anzeigen","layer_moveToTop":"Ebene ganz nach vorn bringen","layers":"Ebenen","light":"Hell","links":"Links","listAllOpenWindows":"Zu Fenster springen","login":"Anmelden","logout":"Abmelden","manifestError":"Die Ressource konnte nicht hinzugefügt werden:","maximizeWindow":"Fenster maximieren","minimizeWindow":"Fenster minimieren","mirador":"Mirador","miradorResources":"Mirador-Ressourcen","miradorViewer":"Mirador","more":"mehr...","moreResults":"Mehr Treffer","mosaic":"Mosaik","mosaicDescription":"Fenster können innerhalb der Arbeitsfläche in Relation zueinander verschoben und ihrer Größe verändert werden.","moveCompanionWindowToBottom":"Unten anordnen","moveCompanionWindowToRight":"Rechts anordnen","nextCanvas":"Nächstes Objekt","numItems":"{{number}} Elemente","off":"Keine","openCompanionWindow_annotations":"Annotationen","openCompanionWindow_attribution":"Rechte","openCompanionWindow_canvas":"Index","openCompanionWindow_info":"Informationen","openCompanionWindow_layers":"Ebenen","openCompanionWindow_search":"Suche","openInCompanionWindow":"In Hilfsfenster öffnen","openWindows":"Aktuell offene Fenster","pagination":"{{current}} von {{total}}","position":"Position","previewWindowTitle":"{{title}}","previousCanvas":"Vorheriges Objekt","related":"Verwandtes","resource":"Ressource","retry":"Erneut versuchen","right":"Rechts","rights":"Lizenz","scroll":"Kontinuierlich","searchInputLabel":"Suchbegriffe","searchNextResult":"Nächster Treffer","searchNoResults":"Keine Treffer","searchPreviousResult":"Vorheriger Treffer","searchResultsRemaining":"{{numLeft}} weitere","searchSubmitAria":"Suchen","searchTitle":"Suche","selectWorkspaceMenu":"Wählen Sie einen Arbeitsflächentyp","showingNumAnnotations":"{{number}} Annotationen werden angezeigt","showZoomControls":"Zoomsteuerung anzeigen","sidebarPanelsNavigation":"Hilfsfensternavigation","single":"Einzeln","startHere":"Hier starten","suggestSearch":"Dieses Dokument durchsuchen nach \\"{{ query }}\\"","tableOfContentsList":"Inhaltsverzeichnis","theme":"Farbschema","thumbnailList":"Miniaturansicht","thumbnailNavigation":"Miniaturansicht","thumbnails":"Miniaturansicht","toggleWindowSideBar":"Seitenleiste umschalten","tryAgain":"Wiederholen","untitled":"[Unbenannt]","view":"Ansicht","welcome":"Willkommen bei Mirador","window":"Fenster: {{label}}","windowMenu":"Fenstermenü und Miniaturansicht","windowNavigation":"Fensternavigation","windowPluginButtons":"Optionen","windowPluginMenu":"Fensteroptionen","workspace":"Arbeitsfläche","workspaceNavigation":"Arbeitsflächensteuerung","workspaceFullScreen":"Vollbild","workspaceMenu":"Arbeitsflächenmenü","workspaceOptions":"Arbeitsflächenoptionen","workspaceSelectionTitle":"Bitte wählen Sie einen Arbeitsflächentyp","zoomIn":"Vergrößern","zoomOut":"Verkleinern","zoomReset":"Ansicht zurücksetzen"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"About Project Mirador","aboutThisItem":"About this item","addedFromUrl":"(Added from URL)","addManifestUrl":"Resource location","addManifestUrlHelp":"The URL of a IIIF resource","addResource":"Add resource","annotationCanvasLabel_1/1":"Item: [{{label}}]","annotationCanvasLabel_1/2":"Left: [{{label}}]","annotationCanvasLabel_2/2":"Right: [{{label}}]","annotations":"Annotations","attribution":"Attribution","attributionTitle":"Rights","authenticationFailed":"Authentication failed.","authenticationRequired":"Authentication required for full access","backToResults":"Back to results","book":"Book","bottom":"Bottom","cancel":"Cancel","canvasIndex":"Index","changeTheme":"Change theme","clearSearch":"clear","close":"Close","closeAddResourceForm":"Close form","closeAddResourceMenu":"Close resource list","closeCompanionWindow":"Close panel","closeWindow":"Close window","collapseSection":"Collapse \\"{{section}}\\" section","collapseSidePanel":"Collapse sidebar","collection":"Collection","itemList":"Item list","continue":"Continue","copy":"Copy","currentItem":"Current item","currentItem_1/1":"Current item","currentItem_1/2":"Left","currentItem_2/2":"Right","dark":"Dark theme","digitizedView":"Digitized view","dismiss":"Dismiss","highlightAllAnnotations":"Highlight all","displayNoAnnotations":"Highlight none","downloadExport":"Export workspace","downloadExportWorkspace":"Export workspace","elastic":"Elastic","elasticDescription":"Move and size windows freely in an unlimited workspace. Windows can overlap.","emptyResourceList":"Your resource list is empty","error":"Error","errorDialogConfirm":"OK","errorDialogTitle":"An error occurred","exitFullScreen":"Exit full screen","expandSection":"Expand \\"{{section}}\\" section","expandSidePanel":"Expand sidebar","exportCopied":"The workspace configuration was copied to your clipboard","fetchManifest":"Add","fullScreen":"Full Screen","gallery":"Gallery","hideZoomControls":"Hide zoom controls","iiif_homepage":"About this resource","iiif_manifest":"IIIF manifest","iiif_renderings":"Alternate formats","iiif_seeAlso":"See also","import":"Import","importWorkspace":"Import workspace","importWorkspaceHint":"Paste a Mirador 3 configuration to be imported","item":"Item: {{label}}","jsError":"Technical details","jsStack":"{{ stack }}","language":"Language","layer_hide":"Hide layer","layer_move":"Move layer","layer_opacity":"Layer opacity","layer_show":"Show layer","layer_moveToTop":"Move layer to top","layers":"Layers","light":"Light theme","links":"Links","listAllOpenWindows":"Jump to window","login":"Log in","logout":"Log out","manifestError":"The resource cannot be added:","maximizeWindow":"Maximize window","minimizeWindow":"Minimize window","mirador":"Mirador","miradorResources":"Mirador resources","miradorViewer":"Mirador viewer","more":"more...","moreResults":"More results","mosaic":"Mosaic","mosaicDescription":"Move and size windows in relation to each other, within the visible frame.","moveCompanionWindowToBottom":"Move to bottom","moveCompanionWindowToRight":"Move to right","nextCanvas":"Next item","noItemSelected":"No item selected","numItems":"{{number}} item","numItems_plural":"{{number}} items","off":"Off","openCompanionWindow_annotations":"Annotations","openCompanionWindow_attribution":"Rights","openCompanionWindow_canvas":"Index","openCompanionWindow_info":"Information","openCompanionWindow_layers":"Layers","openCompanionWindow_search":"Search","openInCompanionWindow":"Open in separate panel","openWindows":"Current open windows","pagination":"{{current}} of {{total}}","position":"Position","previewWindowTitle":"{{title}}","previousCanvas":"Previous item","related":"Related","resource":"Resource","retry":"Retry","right":"Right","rights":"License","scroll":"Scroll","searchInputLabel":"search terms","searchNextResult":"Next result","searchNoResults":"No results found","searchPreviousResult":"Previous result","searchResultsRemaining":"{{numLeft}} remaining","searchSubmitAria":"Submit search","searchTitle":"Search","selectWorkspaceMenu":"Select workspace type","showingNumAnnotations":"Showing {{number}} annotation","showingNumAnnotations_plural":"Showing {{number}} annotations","showCollection":"Show collection","showZoomControls":"Show zoom controls","sidebarPanelsNavigation":"Sidebar panels navigation","single":"Single","startHere":"Start Here","suggestSearch":"Search this document for \\"{{ query }}\\"","tableOfContentsList":"Table of contents","theme":"Theme","thumbnailList":"Thumbnail list","thumbnailNavigation":"Thumbnails","thumbnails":"Thumbnails","toggleWindowSideBar":"Toggle sidebar","totalCollections":"{{count}} collection","totalCollections_plural":"{{count}} collections","totalManifests":"{{count}} manifest","totalManifests_plural":"{{count}} manifests","tryAgain":"Try again","untitled":"[Untitled]","view":"View","viewWorkspaceConfiguration":"View workspace configuration","welcome":"Welcome to Mirador","window":"Window: {{label}}","windowMenu":"Window views & thumbnail display","windowNavigation":"Window navigation","windowPluginButtons":"Options","windowPluginMenu":"Window options","workspace":"Workspace","workspaceNavigation":"Workspace navigation","workspaceFullScreen":"Full screen","workspaceMenu":"Workspace settings","workspaceOptions":"Workspace options","workspaceSelectionTitle":"Select a workspace type","zoomIn":"Zoom in","zoomOut":"Zoom out","zoomReset":"Reset zoom"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"A propos du projet Mirador","aboutThisItem":"Informations","addedFromUrl":"(Ajouté depuis une URL)","addManifestUrl":"Emplacement de la ressource","addManifestUrlHelp":"Coller ici l\'URL de la ressource IIIF","addResource":"Ajouter une ressource","annotationCanvasLabel_1/1":"Item : [{{label}}]","annotationCanvasLabel_1/2":"Gauche : [{{label}}]","annotationCanvasLabel_2/2":"Droite : [{{label}}]","annotations":"Annotations","attribution":"Attribution","attributionTitle":"Droits","authenticationFailed":"L\'authentification a échoué.","authenticationRequired":"Authentification requise pour un accès complet","backToResults":"Retour aux résultats","book":"Livre","bottom":"Bas","cancel":"Annuler","canvasIndex":"Index","changeTheme":"Changer le thème","clearSearch":"effacer","closeAddResourceForm":"Fermer le panneau","closeAddResourceMenu":"Fermer la liste des ressources","closeCompanionWindow":"Fermer le panneau","closeWindow":"Fermer cette fenêtre","collapseSection":"Replier la section \\"{{section}}\\"","collapseSidePanel":"Replier le panneau","itemList":"Liste compacte","continue":"Continuer","copy":"Copier","currentItem":"Image courante","currentItem_1/1":"Image courante","currentItem_1/2":"Gauche","currentItem_2/2":"Droite","dark":"Thème sombre","digitizedView":"Vue de l\'objet numérique","dismiss":"Rejeter","highlightAllAnnotations":"Afficher tout","displayNoAnnotations":"Masquer tout","downloadExport":"Exporter l\'espace de travail","downloadExportWorkspace":"Exporter l\'espace de travail","elastic":"Elastique","elasticDescription":"Déplacer et redimensionner librement les fenêtres dans un espace de travail non limité par l\'écran. Les fenêtres peuvent être superposées.","emptyResourceList":"Votre liste de ressource est vide","error":"Erreur","errorDialogConfirm":"OK","errorDialogTitle":"Une erreur est survenue","exitFullScreen":"Quitter le plein écran","expandSection":"Déplier la section \\"{{section}}\\"","expandSidePanel":"Déplier le panneau","exportCopied":"La configuration de l\'espace de travail a été copiée dans votre presse-papier","fetchManifest":"Ajouter","fullScreen":"Plein écran","gallery":"Galerie","hideZoomControls":"Désactiver les commandes de zoom","iiif_homepage":"A propos de cette ressource","iiif_manifest":"Manifeste IIIF","iiif_renderings":"Formats alternatifs","iiif_seeAlso":"Voir aussi","import":"Importer","importWorkspace":"Importer un espace de travail","importWorkspaceHint":"Insérer une configuration Mirador 3 à importer","item":"Item : {{label}}","jsError":"Détails techniques","jsStack":"{{ stack }}","language":"Langue","layer_hide":"Masquer le calque","layer_move":"Déplacer le calque","layer_opacity":"Opacité du calque","layer_show":"Afficher le calque","layer_moveToTop":"Déplacer le calque en haut","layers":"Calques","light":"Thème clair","links":"Liens","listAllOpenWindows":"Lister les fenêtres","login":"Se connecter","logout":"Se déconnecter","manifestError":"Cette ressource ne peut pas être ajoutée :","maximizeWindow":"Agrandir cette fenêtre","minimizeWindow":"Réduire cette fenêtre","mirador":"Mirador","miradorResources":"Ressources Mirador","miradorViewer":"Visualiseur Mirador","more":"plus...","moreResults":"Plus de résultats","mosaic":"Mosaïque","mosaicDescription":"Déplacer et redimensionner les fenêtres les unes par rapport aux autres dans l\'espace disponible sur l\'écran","moveCompanionWindowToBottom":"Déplacer en bas","moveCompanionWindowToRight":"Déplacer à droite","nextCanvas":"Suivant","noItemSelected":"Aucun élément sélectionné","numItems":"{{number}} image","numItems_plural":"{{number}} images","off":"aucun","openCompanionWindow_annotations":"Annotations","openCompanionWindow_attribution":"Droits","openCompanionWindow_canvas":"Index","openCompanionWindow_info":"Informations","openCompanionWindow_layers":"Calques","openCompanionWindow_search":"Rechercher","openInCompanionWindow":"Ouvrir dans un panneau séparé","openWindows":"Fenêtres ouvertes","pagination":"{{current}} sur {{total}}","position":"Position","previewWindowTitle":"{{title}}","previousCanvas":"Précédent","related":"En relation","resource":"Ressource","retry":"Réessayer","right":"Droite","rights":"Licence","scroll":"Défilement horizontal","searchInputLabel":"Chercher un mot","searchNextResult":"Résultat suivant","searchNoResults":"Aucun résultat trouvé","searchPreviousResult":"Résultat précédent","searchSubmitAria":"Lancer la recherche","searchTitle":"Rechercher","selectWorkspaceMenu":"Changer de type d\'espace de travail","showingNumAnnotations":"{{number}} annotation affichée","showingNumAnnotations_plural":"{{number}} annotations affichées","showCollection":"Voir la collection","showZoomControls":"Activer les commandes de zoom","sidebarPanelsNavigation":"Navigation dans les panneaux latéraux","single":"Simple","startHere":"Commencer ici","suggestSearch":"Rechercher \\"{{ query }}\\" dans ce document","tableOfContentsList":"Sommaire","theme":"Thème","thumbnailList":"Liste des vignettes","thumbnailNavigation":"Vignettes","thumbnails":"Afficher les vignettes","toggleWindowSideBar":"Afficher le menu latéral","totalCollections":"{{count}} collection","totalCollections_plural":"{{count}} collections","totalManifests":"{{count}} manifeste","totalManifests_plural":"{{count}} manifestes","tryAgain":"Essayer à nouveau","untitled":"[Sans titre]","view":"Voir les images en mode","welcome":"Bienvenue dans Mirador","window":"Fenêtre : {{label}}","windowMenu":"Options de fenêtre","windowNavigation":"Navigation dans les fenêtres","windowPluginButtons":"Options","windowPluginMenu":"Autres options et outils","workspace":"Espace de travail","workspaceNavigation":"Menu de l\'espace de travail","workspaceFullScreen":"Plein écran","workspaceMenu":"Réglages de l\'espace de travail","workspaceOptions":"Options de l\'espace de travail","workspaceSelectionTitle":"Sélectionner un type d\'espace de travail","zoomIn":"Zoom avant","zoomOut":"Zoom arrière","zoomReset":"Réinitialiser le zoom"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"Informazioni su Mirador","aboutThisItem":"Informazioni sull\'oggetto","addManifestUrl":"URL della risorsa","addManifestUrlHelp":"L\'URL di una risorsa IIIF","addResource":"Aggiungi una risorsa","addedFromUrl":"(Aggiunto dall\'URL)","annotationCanvasLabel_1/1":"Oggetto: [{{label}}]","annotationCanvasLabel_1/2":"Sinistra: [{{label}}]","annotationCanvasLabel_2/2":"Destra: [{{label}}]","annotations":"Annotazioni","attribution":"Attribuzione","attributionTitle":"Diritti","authenticationFailed":"Autenticazione fallita.","authenticationRequired":"Autenticazione richiesta per l\'accesso completo","backToResults":"Torna ai risultati","book":"Libro","bottom":"Fondo","cancel":"Cancella","canvasIndex":"Indice","changeTheme":"Cambia tema","clearSearch":"pulisci","close":"Chiudi","closeAddResourceForm":"Chiudi il modulo","closeAddResourceMenu":"Chiudi la lista di risorse","closeCompanionWindow":"Chiudi il pannello","closeWindow":"Chiudi finestra","collapseSection":"Collassa la sezione \\"{{section}}\\"","collapseSidePanel":"Collassa la barra laterale","collection":"Collezione","continue":"Continua","copy":"Copia","currentItem":"Oggetto corrente","currentItem_1/1":"Oggetto corrente","currentItem_1/2":"Sinistra","currentItem_2/2":"Destra","dark":"Tema scuro","digitizedView":"Digitized view","dismiss":"Dismiss","displayNoAnnotations":"Nascondi evidenziazione","downloadExport":"Esporta il workspace","downloadExportWorkspace":"Esporta il workspace","elastic":"Elastico","elasticDescription":"Muovi e ridimensiona le finestre liberamente in un workspace illimitato. Le finestre possono sovrapporsi.","emptyResourceList":"La tua lista di risorse è vuota.","error":"Errore","errorDialogConfirm":"OK","errorDialogTitle":"Si è verificato un errore.","exitFullScreen":"Esci da schermo intero","expandSection":"Espandi la sezione \\"{{section}}\\"","expandSidePanel":"Espandi la barra laterale","exportCopied":"La configurazione del workspace è stata copiata nella tua clipboard","fetchManifest":"Aggiungi","fullScreen":"Schermo intero","gallery":"Galleria","hideZoomControls":"Nascondi i controlli di zoom","highlightAllAnnotations":"Evidenzia tutto","iiif_homepage":"Informazioni su questa risorsa","iiif_manifest":"IIIF manifest","iiif_renderings":"Formati alternativi","iiif_seeAlso":"Vedi anche","import":"Importa","importWorkspace":"Importa workspace","importWorkspaceHint":"Incolla una configurazione di Mirador 3 da importare","item":"Oggetto: {{label}}","itemList":"Lista compatta","jsError":"Dettagli tecnici","jsStack":"{{ stack }}","language":"Lingua","layer_hide":"Nascondi livello","layer_move":"Sposta livello","layer_moveToTop":"Sposta il livello in alto","layer_opacity":"Opacità del livello","layer_show":"Visualizza livello","layers":"Livelli","light":"Tema chiaro","links":"Link","listAllOpenWindows":"Vai alla finestra","login":"Entra","logout":"Esci","manifestError":"La risorsa non può essere aggiunta:","maximizeWindow":"Massimizza la finestra","minimizeWindow":"Minimizza la finestra","mirador":"Mirador","miradorResources":"Risorse Mirador","miradorViewer":"Visualizzatore Mirador","more":"ancora...","moreResults":"Più risultati","mosaic":"Mosaico","mosaicDescription":"Muovi e ridimensiona le finestre, tenendole all\'interno dell\'area visibile","moveCompanionWindowToBottom":"Sposta in fondo","moveCompanionWindowToRight":"Sposta a destra","nextCanvas":"Prossimo oggetto","noItemSelected":"Nessun oggetto selezionato","numItems":"{{number}} oggetti","numItems_plural":"{{number}} oggetti","off":"Off","openCompanionWindow_annotations":"Annotazioni","openCompanionWindow_attribution":"Diritti","openCompanionWindow_canvas":"Indice","openCompanionWindow_info":"Informazioni","openCompanionWindow_layers":"Livelli","openCompanionWindow_search":"Cerca","openInCompanionWindow":"Apri in un pannello separato","openWindows":"Finestre aperte in questo momento","pagination":"{{current}} di {{total}}","position":"Posizione","previewWindowTitle":"{{title}}","previousCanvas":"Previous item","related":"Contenuti collegati","resource":"Risorsa","retry":"Riprova","right":"Right","rights":"Licenza","scroll":"Scorri","searchInputLabel":"termini di ricerca","searchNextResult":"Prossimo risultato","searchNoResults":"Nessun risultato","searchPreviousResult":"Risultato precedente","searchResultsRemaining":"{{numLeft}} rimanenti","searchSubmitAria":"Cerca","searchTitle":"Cerca","selectWorkspaceMenu":"Selezione il tipo di workspace","showCollection":"Visualizza la collezione","showZoomControls":"Mostra i controlli di zoom","showingNumAnnotations":"Sto mostrando {{number}} annotazioni","showingNumAnnotations_plural":"Visualizzando {{number}} annotazioni","sidebarPanelsNavigation":"Navigazione dei pannelli della barra laterale","single":"Singolo","startHere":"Inizia qui","suggestSearch":"Cerca in questo documento: \\"{{ query }}\\"","tableOfContentsList":"Sommario","theme":"Tema","thumbnailList":"Lista thumbnail","thumbnailNavigation":"Thumbnails","thumbnails":"Thumbnails","toggleWindowSideBar":"Apri/Chiudi la barra","totalCollections":"{{count}} collezione","totalCollections_plural":"{{count}} collezioni","totalManifests":"{{count}} manifest","totalManifests_plural":"{{count}} manifests","tryAgain":"Riprova","untitled":"[senza titolo]","view":"Visualizza","viewWorkspaceConfiguration":"Visualizza la configurazione del workspace","welcome":"Benvenuto in Mirador","window":"Finestra: {{label}}","windowMenu":"Visualizzazioni finestra e display thumbnail","windowNavigation":"Navigazione finestra","windowPluginButtons":"Opzioni","windowPluginMenu":"Opzioni finestra","workspace":"Workspace","workspaceFullScreen":"Schermo intero","workspaceMenu":"Configurazioni Workspace","workspaceNavigation":"Navigazione del workspace","workspaceOptions":"Opzioni Workspace","workspaceSelectionTitle":"Seleziona il tipo di workspace","zoomIn":"Zoom in","zoomOut":"Zoom out","zoomReset":"Reset zoom"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"Project Miradorについて","aboutThisItem":"この資料について","addedFromUrl":"(URLで追加)","addManifestUrl":"資料のURL","addManifestUrlHelp":"IIIF資料のURL","addResource":"資料の追加","annotationCanvasLabel_1/1":"アイテム: [{{label}}]","annotationCanvasLabel_1/2":"左: [{{label}}]","annotationCanvasLabel_2/2":"右: [{{label}}]","annotations":"アノテーション","attribution":"帰属","attributionTitle":"権利","authenticationFailed":"認証失敗","authenticationRequired":"フルアクセスには認証が必要","backToResults":"結果に戻る","book":"見開き","bottom":"下部","cancel":"キャンセル","canvasIndex":"インデックス","changeTheme":"テーマの変更","clearSearch":"クリア","close":"閉じる","closeAddResourceForm":"フォームを閉じる","closeAddResourceMenu":"資料一覧を閉じる","closeCompanionWindow":"パネルを閉じる","closeWindow":"ウインドウを閉じる","collapseSection":"{{section}} セクションを畳む","collapseSidePanel":"サイドバーを畳む","collection":"コレクション","itemList":"アイテム一覧","continue":"続ける","copy":"コピー","currentItem":"現在のアイテム","currentItem_1/1":"現在のアイテム","currentItem_1/2":"左","currentItem_2/2":"右","dark":"ダークなテーマ","digitizedView":"デジタルビュー","dismiss":"片付け","highlightAllAnnotations":"すべてを表示","displayNoAnnotations":"アノテーションを非表示","downloadExport":"ワークスペースをエクスポート","downloadExportWorkspace":"ワークスペースをエクスポート","elastic":"伸縮","elasticDescription":"自由なウインドウの伸縮","emptyResourceList":"資料の一覧が空です","error":"エラー","errorDialogConfirm":"OK","errorDialogTitle":"エラー発生","exitFullScreen":"全画面を解除","expandSection":"セクション {{section}}を拡大","expandSidePanel":"サイドバーを拡大","exportCopied":"ワークスペースの設定がクリップボードにコピーされました。","fetchManifest":"追加","fullScreen":"全画面","gallery":"ギャラリー","hideZoomControls":"zoom制御を隠す","iiif_homepage":"IIIFホームページ","iiif_manifest":"IIIF マニフェスト","iiif_renderings":"別の形式","iiif_seeAlso":"参照","import":"取り込み","importWorkspace":"ワークスペースの取り込み","importWorkspaceHint":"Mirador3の設定を貼り付け","item":"アイテム: {{label}}","jsError":"技術的な詳細","jsStack":"{{ stack }}","language":"言語","layer_hide":"レイヤーを隠す","layer_move":"レイヤーを動かす","layer_opacity":"レイヤーの透過度","layer_show":"レイヤーを表示","layer_moveToTop":"レイヤーをトップへ","layers":"レイヤー","light":"明るいテーマ","links":"リンク","listAllOpenWindows":"ウインドウにジャンプ","login":"ログイン","logout":"ログアウト","manifestError":"資料追加に失敗:","maximizeWindow":"ウインドウを最大化","minimizeWindow":"ウインドウを最小化","mirador":"Mirador","miradorResources":"Mirador資料","miradorViewer":"Miradorビューワ","more":"さらに...","moreResults":"さらに結果を","mosaic":"モザイク","mosaicDescription":"モザイク表示","moveCompanionWindowToBottom":"下部に移動","moveCompanionWindowToRight":"右に移動","nextCanvas":"次のアイテム","noItemSelected":"アイテムが未選択","numItems":"{{number}} アイテム","off":"オフ","openCompanionWindow_annotations":"アノテーション","openCompanionWindow_attribution":"権利","openCompanionWindow_canvas":"インデックス","openCompanionWindow_info":"情報","openCompanionWindow_layers":"レイヤー","openCompanionWindow_search":"検索","openInCompanionWindow":"別のパネルで開く","openWindows":"現在開いているウインドウ","pagination":"{{current}} of {{total}}","position":"位置","previewWindowTitle":"{{title}}","previousCanvas":"前のアイテム","related":"関連","resource":"資料","retry":"リトライ","right":"右側","rights":"利用条件","scroll":"スクロール","searchInputLabel":"検索語","searchNextResult":"次の結果","searchNoResults":"ヒットせず","searchPreviousResult":"前の結果","searchSubmitAria":"検索","searchTitle":"検索","selectWorkspaceMenu":"ワークスペースタイプの選択","showingNumAnnotations":"アノテーション {{number}} を表示","showCollection":"コレクションを表示","showZoomControls":"ズーム操作を表示","sidebarPanelsNavigation":"サイドバーパネルの操作","single":"単一","startHere":"ここから始める","suggestSearch":"この文書を \\"{{ query }}\\" で検索","tableOfContentsList":"目次","theme":"テーマ","thumbnailList":"サムネイル一覧","thumbnailNavigation":"サムネイル","thumbnails":"サムネイル表示","toggleWindowSideBar":"サイドバー切り替え","totalCollections":"{{count}} コレクション","totalManifests":"{{count}} マニフェスト","tryAgain":"もう一度試す","untitled":"[タイトル無し]","view":"表示の仕方","welcome":"Miradorにようこそ","window":"{{label}} ウインドウ","windowMenu":"ウインドウメニュー","windowNavigation":"ウィンドウ操作","windowPluginButtons":"オプション","windowPluginMenu":"ウインドウオプション","workspace":"ワークスペース","workspaceNavigation":"ワークスペースナビ","workspaceFullScreen":"全画面","workspaceMenu":"ワークスペースの設定","workspaceOptions":"ワークスペースのオプション","workspaceSelectionTitle":"ワークスペースのタイプを選択","zoomIn":"ズームイン","zoomOut":"ズームアウト","zoomReset":"ズームを戻す"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"Mirador 프로젝트에 대하여","aboutThisItem":"해당 아이템에 대하여","addedFromUrl":"(URL에서 추가됨)","addManifestUrl":"리소스의 위치","addManifestUrlHelp":"IIIF 리소스의 URL","addResource":"리소스 추가","annotationCanvasLabel_1/1":"아이템: [{{label}}]","annotationCanvasLabel_1/2":"왼쪽: [{{label}}]","annotationCanvasLabel_2/2":"오른쪽: [{{label}}]","annotations":"주석","attribution":"귀속","attributionTitle":"권리","authenticationFailed":"인증 실패.","authenticationRequired":"모든 정보에 접근하기 위해선 인증이 필요합니다.","backToResults":"결과로 돌아가기","book":"책","bottom":"아래","cancel":"취소","canvasIndex":"인덱스","changeTheme":"테마 변경","clearSearch":"지우기","close":"닫기","closeAddResourceForm":"폼 닫기","closeAddResourceMenu":"리소스 목록 닫기","closeCompanionWindow":"패널 닫기","closeWindow":"윈도우 닫기","collapseSection":"\\"{{section}}\\" 섹션 접기","collapseSidePanel":"사이드바 접기","collection":"컬렉션","itemList":"아이템 목록","continue":"계속하기","copy":"복사","currentItem":"현재 아이템","currentItem_1/1":"현재 아이템","currentItem_1/2":"왼쪽","currentItem_2/2":"오른쪽","dark":"다크 모드","digitizedView":"디지털 뷰","dismiss":"무시하기","highlightAllAnnotations":"모두 하이라이트하기","displayNoAnnotations":"하이라이트 해제","downloadExport":"작업공간 내보내기","downloadExportWorkspace":"작업공간 내보내기","elastic":"신축성","elasticDescription":"무한한 작업공간에서 윈도우를 자유롭게 움직이고 조절해보세요. 윈도우는 서로 겹칠 수 있습니다.","emptyResourceList":"리소스 목록이 비어있습니다","error":"오류","errorDialogConfirm":"허락","errorDialogTitle":"오류 발생","exitFullScreen":"전체화면에서 나가기","expandSection":"\\"{{section}}\\" 섹션 확장","expandSidePanel":"사이드바 확장","exportCopied":"작업공간 환경설정을 클립보드에 복사했습니다","fetchManifest":"추가하기","fullScreen":"전체화면","gallery":"갤러리","hideZoomControls":"확대/축소 기능 숨기기","iiif_homepage":"해당 리소스에 대하여","iiif_manifest":"IIIF 매니페스트","iiif_renderings":"대체 포맷","iiif_seeAlso":"참고","import":"가져오기","importWorkspace":"작업공간 가져오기","importWorkspaceHint":"Mirador 3 환경설정 가져와 붙여넣기","item":"아이템: {{label}}","jsError":"기술적인 세부사항","jsStack":"{{ stack }}","language":"언어","layer_hide":"레이어 숨기기","layer_move":"레이어 움직이기","layer_opacity":"레이어 불투명도","layer_show":"레이어 보이기","layer_moveToTop":"레이어를 위로 옮기기","layers":"레이어","light":"라이트 모드","links":"링크","listAllOpenWindows":"윈도우로 이동하기","login":"로그인","logout":"로그아웃","manifestError":"리소스를 추가할 수 없습니다:","maximizeWindow":"윈도우 크기 최대화","minimizeWindow":"윈도우 크기 최소화","mirador":"Mirador","miradorResources":"Mirador 리소스","miradorViewer":"Mirador 뷰어","more":"더 보기...","moreResults":"결과 더 보기","mosaic":"모자이크","mosaicDescription":"프레임 내에서 윈도우를 이동하고 크기를 조정합니다.","moveCompanionWindowToBottom":"아래로 옮기기","moveCompanionWindowToRight":"오른쪽으로 옮기기","nextCanvas":"다음 아이템","noItemSelected":"아이템이 선택되지 않았습니다","numItems":"{{number}}개의 아이템","numItems_plural":"{{number}}개의 아이템","off":"끄기","openCompanionWindow_annotations":"주석","openCompanionWindow_attribution":"권리","openCompanionWindow_canvas":"인덱스","openCompanionWindow_info":"정보","openCompanionWindow_layers":"레이어","openCompanionWindow_search":"검색","openInCompanionWindow":"별도의 패널에서 열기","openWindows":"현재 열려있는 윈도우","pagination":"{{current}} of {{total}}","position":"배치","previewWindowTitle":"{{title}}","previousCanvas":"이전 아이템","related":"관련","resource":"리소스","retry":"재시도","right":"오른쪽","rights":"라이선스","scroll":"스크롤","searchInputLabel":"용어 찾기","searchNextResult":"다음 결과","searchNoResults":"해당 결과 없음","searchPreviousResult":"이전 결과","searchResultsRemaining":"{{numLeft}}개 남음","searchSubmitAria":"검색하기","searchTitle":"검색","selectWorkspaceMenu":"작업공간 유형 선택","showingNumAnnotations":"{{number}}개의 주석 나타내기","showingNumAnnotations_plural":"{{number}}개의 주석 나타내기","showCollection":"컬렉션 보이기","showZoomControls":"확대/축소 기능 보이기","sidebarPanelsNavigation":"사이드바 패널 탐색","single":"한 개","startHere":"시작하기","suggestSearch":"이 문서를 \\"{{ query }}\\"로 검색하기","tableOfContentsList":"목차","theme":"테마","thumbnailList":"썸네일 목록","thumbnailNavigation":"썸네일","thumbnails":"썸네일","toggleWindowSideBar":"사이드바 전환","totalCollections":"{{count}}개의 컬렉션","totalCollections_plural":"{{count}}개의 컬렉션","totalManifests":"{{count}}개의 매니페스트","totalManifests_plural":"{{count}}개의 매니페스트","tryAgain":"다시 시도하세요","untitled":"[타이틀 없음]","view":"뷰","viewWorkspaceConfiguration":"작업공간 환경설정 ㅂ괴","welcome":"Mirador에 오신 것을 환영합니다","window":"윈도우: {{label}}","windowMenu":"윈도우 뷰 & 썸네일 표시","windowNavigation":"윈도우 탐색","windowPluginButtons":"옵션","windowPluginMenu":"윈도우 옵션","workspace":"작업공간","workspaceNavigation":"작업공간 탐색","workspaceFullScreen":"전체화면","workspaceMenu":"작업공간 설정","workspaceOptions":"작업공간 옵션","workspaceSelectionTitle":"작업공간 유형을 선택하세요","zoomIn":"확대","zoomOut":"축소","zoomReset":"줌 재설정"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"Apie Project Mirador","aboutThisItem":"Apie šį įrašą","addedFromUrl":"(Pridėta naudojant URL)","addManifestUrl":"Šaltinio adresas","addManifestUrlHelp":"Nuoroda į IIIF šaltinį","addResource":"Pridėti šaltinį","annotationCanvasLabel_1/1":"Įrašas: [{{label}}]","annotationCanvasLabel_1/2":"Kairė: [{{label}}]","annotationCanvasLabel_2/2":"Dešinė: [{{label}}]","annotations":"Anotacijos","attribution":"Priskyrimas","attributionTitle":"Teisės","authenticationFailed":"Autentifikavimo klaida.","authenticationRequired":"Pilnai prieigai būtina autentifikacija","backToResults":"Grįžti į rezultatus","book":"Knyga","bottom":"Apačia","cancel":"Atšaukti","canvasIndex":"Indeksas","changeTheme":"Keisti temą","clearSearch":"valyti","closeAddResourceForm":"Uždaryti paraišką","closeAddResourceMenu":"Uždaryti šaltinių sąrašą","closeCompanionWindow":"Uždaryti panelę","closeWindow":"Uždaryti langą","collapseSection":"Suskleisti \\"{{section}}\\" sekciją","collapseSidePanel":"Suskleisti šoninę juostą","itemList":"Įrašų sąrašas","continue":"Tęsti","copy":"Kopijuoti","currentItem":"Dabartinis įrašas","currentItem_1/1":"Dabartinis įrašas","currentItem_1/2":"Kairė","currentItem_2/2":"Dešinė","dark":"Tamsi tema","digitizedView":"Skaitmenintas vaizdas","dismiss":"Atmesti","highlightAllAnnotations":"Paryškinti viską","displayNoAnnotations":"Slėpti viską","downloadExport":"Išsaugoti darbalaukį","downloadExportWorkspace":"Išsaugoti darbalaukį","elastic":"Lankstus","elasticDescription":"Langų dydis ir vieta gali būti laisvai valdomi. Langai gali persidengti.","emptyResourceList":"Jūsų šaltinių sąrašas yra tuščias","error":"Klaida","errorDialogConfirm":"Gerai","errorDialogTitle":"Įvyko klaida","exitFullScreen":"Išjungti pilno ekrano režimą","expandSection":"Išplėsti \\"{{section}}\\" sekciją","expandSidePanel":"Išplėsti šoninę juostą","exportCopied":"Darbalaukio nustatymai nukopijuoti","fetchManifest":"Pridėti","fullScreen":"Pilnas ekranas","gallery":"Galerija","hideZoomControls":"Slėpti priartinimo valdymą","iiif_homepage":"Apie šį šaltinį","iiif_manifest":"IIIF manifestas","iiif_renderings":"Kiti formatai","iiif_seeAlso":"Susiję","import":"Įkelti","importWorkspace":"Įkelti darbalaukį","importWorkspaceHint":"Įterpkite Mirador 3 nustatymus įkėlimui","item":"Įrašas: {{label}}","jsError":"Techninė informacija","jsStack":"{{ stack }}","language":"Kalba","layer_hide":"Slėpti sluoksnį","layer_move":"Perkelti sluoksnį","layer_opacity":"Sluoksnio nepermatomumas","layer_show":"Rodyti sluoksnį","layer_moveToTop":"Perkelti sluoksnį į viršų","layers":"Sluoksniai","light":"Šviesi tema","links":"Nuorodos","listAllOpenWindows":"Rodyti aktyvius langus","login":"Prisijungti","logout":"Atsijungti","manifestError":"Šaltinis negali būti pridėtas:","maximizeWindow":"Išdidinti langą","minimizeWindow":"Sumažinti langą","mirador":"Mirador","miradorResources":"Mirador šaltiniai","miradorViewer":"Mirador žiūryklė","more":"daugiau...","moreResults":"Daugiau rezultatų","mosaic":"Mosaic","mosaicDescription":"Langų dydžio ir pozicijos keitimai apribojami ekrano erdvėje.","moveCompanionWindowToBottom":"Perkelti į apačią","moveCompanionWindowToRight":"Perkelti į dešinę","nextCanvas":"Kitas įrašas","numItems":"{{number}} įrašas (-ai)","off":"Išjungti","openCompanionWindow_annotations":"Anotacijos","openCompanionWindow_attribution":"Teisės","openCompanionWindow_canvas":"Indeksas","openCompanionWindow_info":"Informacija","openCompanionWindow_layers":"Sluoksniai","openCompanionWindow_search":"Paieška","openInCompanionWindow":"Atidaryti kaip naują panelę","openWindows":"Aktyvųs langai","pagination":"{{current}} iš {{total}}","position":"Pozicija","previewWindowTitle":"{{title}}","previousCanvas":"Buvęs įrašas","related":"Susiję","resource":"Šaltinis","retry":"Pabandyti iš naujo","right":"Dešinė","rights":"Teisės","scroll":"Paslinkti","searchInputLabel":"paieškos terminas","searchNextResult":"Kitas rezultatas","searchNoResults":"Nėra rezultatų","searchPreviousResult":"Buvęs rezultatas","searchSubmitAria":"Pateikti paieškos užklausą","searchTitle":"Ieškoti","selectWorkspaceMenu":"Pasirinkti darbalaukio tipą","showingNumAnnotations":"Rodoma {{number}} anotacija (-os)","showCollection":"Rodyti kolekciją","showZoomControls":"Rodyti priartinimo valdymą","sidebarPanelsNavigation":"Šoninės juostos valdymas","single":"Atskiras","startHere":"Pradėkite čia","suggestSearch":"Ieškoti \\"{{ query }}\\" visame documente","tableOfContentsList":"Turinys","theme":"Tema","thumbnailList":"Miniatiūrų sąrašas","thumbnailNavigation":"Miniatiūros","thumbnails":"Miniatiūros","toggleWindowSideBar":"Perjungti šoninę juostą","totalCollections":"{{count}} kolekcija (-os)","totalManifests":"{{count}} šaltinis (-iai)","tryAgain":"Bandykite dar kartą","untitled":"[Be pavadinimo]","view":"Žiūrėti","welcome":"Sveiki atvykę į Mirador","window":"Langas: {{label}}","windowMenu":"Langų & miniatiūrų atvaizdavimas","windowNavigation":"Langų valdymas","windowPluginButtons":"Pasirinkimai","windowPluginMenu":"Langų pasirinkimai","workspace":"Darbalaukis","workspaceNavigation":"Darbalaukio valdymas","workspaceFullScreen":"Pilnas ekranas","workspaceMenu":"Darbalaukio nustatymai","workspaceOptions":"Darbalaukio pasirinkimai","workspaceSelectionTitle":"Pasirinkite darbalaukio tipą","zoomIn":"Priartinti","zoomOut":"Atitolinti","zoomReset":"Atstatyti priartinimą"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"Om Projekt Mirador","aboutThisItem":"Om dette objektet","addedFromUrl":"(Lagt til fra URL)","addManifestUrl":"Nettadresse til samling eller manifest","addManifestUrlHelp":"URL til en IIIF-ressurs","addResource":"Legg til ressurs","annotationCanvasLabel_1/1":"Objekt: [{{label}}]","annotationCanvasLabel_1/2":"Venstre: [{{label}}]","annotationCanvasLabel_2/2":"Høyre: [{{label}}]","annotations":"Annoteringer","attribution":"Tilskrivelse","attributionTitle":"Rettigheter","authenticationFailed":"Autentiseringen feilet.","authenticationRequired":"Autentisering kreves for full tilgang","backToResults":"Tilbake til resultat","book":"Bok","bottom":"Nederst","cancel":"Avbryt","canvasIndex":"Index","changeTheme":"Skift tema","clearSearch":"Fjern søket","close":"Lukk","closeAddResourceForm":"Lukk skjemaet","closeAddResourceMenu":"Lukk ressurslisten","closeCompanionWindow":"Lukk panelet","closeWindow":"Lukk vinduet","collapseSection":"Lukk seksjonen \\"{{section}}\\"","collapseSidePanel":"Lukk sidemenyen","collection":"Samling","itemList":"Objektliste","continue":"Fortsett","copy":"Kopiere","currentItem":"Valgt objekt","currentItem_1/1":"Valgt objekt","currentItem_1/2":"Venstre","currentItem_2/2":"Høyre","dark":"Mørkt tema","digitizedView":"Digitalisert visning","dismiss":"Lukk","highlightAllAnnotations":"Markér alle","displayNoAnnotations":"Avmarkér alle","downloadExport":"Eksportér arbeidsområde","downloadExportWorkspace":"Eksportér arbeidsområde","elastic":"Elastisk","elasticDescription":"Flytt og endre størrelsen på vinduet fritt i et ubegrenset arbeidsområde. Vindu kan overlappe.","emptyResourceList":"Din resursliste er tom","error":"Error","errorDialogConfirm":"OK","errorDialogTitle":"Et problem oppstod","exitFullScreen":"Forlat fullskjermsvisning","expandSection":"Ekspandér seksjonen \\"{{section}}\\"","expandSidePanel":"Ekspandér sidemenyen","exportCopied":"Konfiguration av arbeidsområdet ble kopiert til din utklippstavle","fetchManifest":"Legg til","fullScreen":"Fullskjermsvisning","gallery":"Galleri","hideZoomControls":"Skjul zoomkontroll","iiif_homepage":"Om denne ressursen","iiif_manifest":"IIIF manifest","iiif_renderings":"Alternativt format","iiif_seeAlso":"Se også","import":"Importér","importWorkspace":"Importér arbeidsområde","importWorkspaceHint":"Lim inn en Mirador 3 konfigurasjon for import","item":"Objekt: {{label}}","jsError":"Tekniske detaljer","jsStack":"{{ stack }}","language":"Språk","layer_hide":"Skjul lag","layer_move":"Flytt lag","layer_opacity":"Lag-gjennomsiktighet","layer_show":"Vis lag","layer_moveToTop":"Flytt laget øverst","layers":"Lag","light":"Lyst tema","links":"Lenker","listAllOpenWindows":"Gå til vindu","login":"Logg inn","logout":"Logg ut","manifestError":"Ressursen kan ikke legges til:","maximizeWindow":"Maksimér vinduet","minimizeWindow":"Minimér vinduet","mirador":"Mirador","miradorResources":"Miradorressurser","miradorViewer":"Mirador bildeviser","more":"mer...","moreResults":"Flere resultat","mosaic":"Mosaik","mosaicDescription":"Flytt og endre størrelse på vinduet i relasjon til hverandre, innenfor den synlige rammen.","moveCompanionWindowToBottom":"Flytt til bunnen","moveCompanionWindowToRight":"Flytt til høyre","nextCanvas":"Neste objekt","noItemSelected":"Ingen valgte objekt","numItems":"{{number}} objekt","numItems_plural":"{{number}} objekter","off":"Av","openCompanionWindow_annotations":"Annoteringer","openCompanionWindow_attribution":"Rettigheter","openCompanionWindow_canvas":"Indeks","openCompanionWindow_info":"Informasjon","openCompanionWindow_layers":"Lag","openCompanionWindow_search":"Søk","openInCompanionWindow":"Åpne i eget panel","openWindows":"Åpne vindu","pagination":"{{current}} av {{total}}","position":"Posisjon","previewWindowTitle":"{{title}}","previousCanvas":"Forrige objekt","related":"Relatert","resource":"Ressurs","retry":"Forsøk igjen","right":"Til høyre","rights":"Lisens","scroll":"Bla","searchInputLabel":"Søkeord","searchNextResult":"Neste resultat","searchNoResults":"Ingen treff","searchPreviousResult":"Forrige resultat","searchResultsRemaining":"{{numLeft}} igjen","searchSubmitAria":"Søk","searchTitle":"Søk","selectWorkspaceMenu":"Velg arbeidsområde-type","showingNumAnnotations":"Vis {{number}} annotasjon","showingNumAnnotations_plural":"Vis {{number}} annotasjoner","showCollection":"Vis samling","showZoomControls":"Vis zoomkontroll","sidebarPanelsNavigation":"Sidemeny-panel navigering","single":"En og en","startHere":"Start her","suggestSearch":"Søk etter \\"{{ query }}\\" i dette dokument","tableOfContentsList":"Innholdsfortegnelse","theme":"Tema","thumbnailList":"Miniatyrliste","thumbnailNavigation":"Miniatyrer","thumbnails":"Miniatyrer","toggleWindowSideBar":"Vis/skjul sidemenyen","totalCollections":"{{count}} samling","totalCollections_plural":"{{count}} samlinger","totalManifests":"{{count}} manifest","totalManifests_plural":"{{count}} manifester","tryAgain":"Forsøk igjen","untitled":"[uten tittel]","view":"Visning","viewWorkspaceConfiguration":"Vis konfigurasjon av arbeidsområde.","welcome":"Velkommen til Mirador","window":"Vindu: {{label}}","windowMenu":"Vindusvisning & miniatyrvisning","windowNavigation":"Vindusnavigasjon","windowPluginButtons":"Innstillinger","windowPluginMenu":"Vindusinnstillinger","workspace":"Arbeidsområde","workspaceNavigation":"Navigasjon i arbeidsområdet","workspaceFullScreen":"Fullskjermsvisning","workspaceMenu":"Innstillinger for arbeidsområdet","workspaceOptions":"Flere valg for arbeidsområdet","workspaceSelectionTitle":"Velg arbeidsområde-type","zoomIn":"Zoom inn","zoomOut":"Zoom ut","zoomReset":"Tilbakestill zoom"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutThisItem":"Over dit item","addedFromUrl":"(Toegevoegd via URL)","addManifestUrl":"Locatie bron","addManifestUrlHelp":"De URL van een IIIF-resource","addResource":"Voeg bron toe","annotationCanvasLabel_1/1":"Item: [{{label}}]","annotationCanvasLabel_1/2":"Links: [{{label}}]","annotationCanvasLabel_2/2":"Rechts: [{{label}}]","annotations":"Annotaties","attribution":"Naamsvermelding","attributionTitle":"Rechten","authenticationFailed":"Authenticatie gefaald.","authenticationRequired":"Authenticatie is vereist voor volledige toegang","backToResults":"Terug naar resultaten","book":"Boek","bottom":"Onderaan","cancel":"Annuleer","canvasIndex":"Index","changeTheme":"Wijzig thema","clearSearch":"clear","closeAddResourceForm":"Sluit formulier","closeAddResourceMenu":"Sluit lijst met bronnen","closeCompanionWindow":"Sluit paneel","closeWindow":"Sluit venster","collapseSection":"Klap \\"{{section}}\\" sectie in","collapseSidePanel":"Klap zijbalk in","itemList":"Compacte lijst","continue":"Ga verder","copy":"Kopieer","currentItem":"Huidig item","currentItem_1/1":"Huidig item","currentItem_1/2":"Links","currentItem_2/2":"Rechts","dark":"Donker thema","dismiss":"Dismiss","highlightAllAnnotations":"Markeer alles","downloadExport":"Exporteer workspace","downloadExportWorkspace":"Exporteer workspace","elastic":"Elastisch","elasticDescription":"Verplaats en rangschik vensters vrij in een onbeperkte workspace. Vensters kunnen elkaar overlappen.","emptyResourceList":"Je lijst met bronnen is leeg","errorDialogConfirm":"OK","errorDialogTitle":"Er is een fout opgetreden","exitFullScreen":"Verlaat volledig scherm","expandSection":"Klap \\"{{section}}\\" sectie uit","expandSidePanel":"Klap zijbalk uit","fetchManifest":"Voeg toe","fullScreen":"Volledig scherm","gallery":"Gallerij","hideZoomControls":"Verberg zoomknoppen","iiif_homepage":"Over deze bron","iiif_manifest":"IIIF-manifest","iiif_renderings":"Alternatieve formaten","iiif_seeAlso":"Zie ook","import":"Importeer","importWorkspace":"Importeer workspace","importWorkspaceHint":"Plak een Mirador 3 configuratie die geïmporteerd moet worden","item":"Item: {{label}}","language":"Taal","light":"Licht thema","links":"Links","listAllOpenWindows":"Ga naar venster","login":"Log in","manifestError":"De bron kan niet worden toegevoegd:","maximizeWindow":"Maximaliseer venster","minimizeWindow":"Minimaliseer venster","mirador":"Mirador","miradorResources":"Mirador resources","miradorViewer":"Mirador viewer","more":"meer...","moreResults":"Meer resultaten","mosaic":"Mozaïek","mosaicDescription":"Verplaats en rangschik vensters in verhouding tot elkaar binnen het zichtbare kader.","moveCompanionWindowToBottom":"Verplaats naar beneden","moveCompanionWindowToRight":"Verplaats naar rechts","nextCanvas":"Volgend item","numItems":"{{number}} item","numItems_plural":"{{number}} items","off":"Uit","openCompanionWindow_annotations":"Annotaties","openCompanionWindow_attribution":"Rechten","openCompanionWindow_canvas":"Index","openCompanionWindow_info":"Informatie","openCompanionWindow_search":"Zoeken","openInCompanionWindow":"Open in een apart paneel","openWindows":"Geopende vensters","pagination":"{{current}} van {{total}}","position":"Positie","previewWindowTitle":"{{title}}","previousCanvas":"Vorig item","related":"Verwant","resource":"Bron","retry":"Probeer opnieuw","right":"Rechts","rights":"Licentie","searchInputLabel":"zoek termen","searchNextResult":"Volgend resultaat","searchNoResults":"Geen resultaten gevonden","searchPreviousResult":"Vorig resultaat","searchSubmitAria":"Zoeken","searchTitle":"Zoek","selectWorkspaceMenu":"Selecteer workspacetype","showingNumAnnotations":"{{number}} annotatie weergegeven","showingNumAnnotations_plural":"{{number}} annotaties weergegeven","showZoomControls":"Toon zoomknoppen","sidebarPanelsNavigation":"Zijbalk panelen navigatie","single":"Enkel","startHere":"Begin Hier","suggestSearch":"Zoek in dit document naar \\"{{ query }}\\"","theme":"Thema","thumbnailList":"Lijst thumbnails","thumbnailNavigation":"Thumbnails","thumbnails":"Thumbnails","toggleWindowSideBar":"Toon zijbalk","totalCollections":"{{count}} collectie","totalCollections_plural":"{{count}} collecties","totalManifests":"{{count}} manifest","totalManifests_plural":"{{count}} manifests","tryAgain":"Probeer opnieuw","untitled":"[Zonder titel]","view":"Weergave","welcome":"Welkom in Mirador","window":"Venster: {{label}}","windowMenu":"Vensters- en miniatuurweergave","windowNavigation":"Navigatie venster","windowPluginButtons":"Opties","windowPluginMenu":"Vensteropties","workspace":"Workspace","workspaceFullScreen":"Volledig scherm","workspaceMenu":"Workspace instellingen","workspaceOptions":"Workspace opties","workspaceSelectionTitle":"Selecteer een workspace type","zoomIn":"Zoom in","zoomOut":"Zoom out","zoomReset":"Reset zoom"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"O Projekcie Mirador","aboutThisItem":"O bieżącej pozycji","addedFromUrl":"(Dodano z URL)","addManifestUrl":"Lokalizacja zasobów","addManifestUrlHelp":"URL zasobów IIIF","addResource":"Dodaj zasoby","annotationCanvasLabel_1/1":"Pozycja: [{{label}}]","annotationCanvasLabel_1/2":"Lewo: [{{label}}]","annotationCanvasLabel_2/2":"Prawo: [{{label}}]","annotations":"Adnotacje","attribution":"Atrybucja","attributionTitle":"Prawa","authenticationFailed":"Uwierzytelnianie nie powiodło się.","authenticationRequired":"Do pełnego dostępu wymagane jest uwierzytelnienie","backToResults":"Powrót do wyników","book":"Książka","bottom":"Dół","cancel":"Anuluj","canvasIndex":"Indeks","changeTheme":"Zmień motyw","clearSearch":"wyczyść","close":"Zamknij","closeAddResourceForm":"Zamknij formularz","closeAddResourceMenu":"Zamknij listę zasobów","closeCompanionWindow":"Zamknij panel","closeWindow":"Zamknij okno","collapseSection":"Zwiń sekcję \\"{{section}}\\"","collapseSidePanel":"Zwiń panel boczny","collection":"Zbiór","itemList":"Lista pozycji","continue":"Kontynuuj","copy":"Kopiuj","currentItem":"Bieżąca pozycja","currentItem_1/1":"Bieżąca pozycja","currentItem_1/2":"Lewo","currentItem_2/2":"Prawo","dark":"Ciemny motyw","digitizedView":"Widok zdigitalizowany","dismiss":"Odrzuć","highlightAllAnnotations":"Podświetl wszystko","displayNoAnnotations":"Nie podświetlaj","downloadExport":"Eksportuj obszar roboczy","downloadExportWorkspace":"Eksportuj obszar roboczy","elastic":"Elastyczny","elasticDescription":"Swobodnie przesuwaj i dopasowuj okna w nieograniczonej przestrzeni roboczej. Okna mogą zachodzić na siebie.","emptyResourceList":"Twoja lista zasobów jest pusta","error":"Błąd","errorDialogConfirm":"OK","errorDialogTitle":"Wystąpił błąd","exitFullScreen":"Wyłącz tryb pełnoekranowy","expandSection":"Rozwiń sekcję \\"{{section}}\\"","expandSidePanel":"Rozwiń panel boczny","exportCopied":"Konfiguracja obszaru roboczego została skopiowana do schowka","fetchManifest":"Dodaj","fullScreen":"Pełny ekran","gallery":"Galeria","hideZoomControls":"Ukryj kontrolki powiększenia","iiif_homepage":"O tym zasobie","iiif_manifest":"Manifest IIIF","iiif_renderings":"Alternatywne formaty","iiif_seeAlso":"Zobacz też","import":"Importuj","importWorkspace":"Importuj obszar roboczy","importWorkspaceHint":"Wklej konfigurację Mirador 3 do zaimportowania","item":"Pozycja: {{label}}","jsError":"Szczegóły techniczne","jsStack":"{{ stack }}","language":"Język","layer_hide":"Ukryj warstwę","layer_move":"Przenieś warstwę","layer_opacity":"Krycie warstwy","layer_show":"Pokaż warstwę","layer_moveToTop":"Przenieś warstwę na górę","layers":"Warstwy","light":"Jasny motyw","links":"Linki","listAllOpenWindows":"Przejdź do okna","login":"Zaloguj","logout":"Wyloguj","manifestError":"Następujące zasoby nie mogą być dodane:","maximizeWindow":"Maksymalizuj okno","minimizeWindow":"Minimalizuj okno","mirador":"Mirador","miradorResources":"Zasoby Mirador","miradorViewer":"Przeglądarka Mirador","more":"więcej...","moreResults":"Więcej wyników","mosaic":"Mozaika","mosaicDescription":"Przesuwaj i zmieniaj rozmiary okien względem siebie, w widocznej ramce.","moveCompanionWindowToBottom":"Przesuń na dół","moveCompanionWindowToRight":"Przesuń w prawo","nextCanvas":"Następna pozycja","noItemSelected":"Nie wybrano pozycji","numItems":"{{number}} pozycja","numItems_plural":"{{number}} pozycje","off":"Wyłącz","openCompanionWindow_annotations":"Adnotacje","openCompanionWindow_attribution":"Prawa","openCompanionWindow_canvas":"Indeks","openCompanionWindow_info":"Informacje","openCompanionWindow_layers":"Warstwy","openCompanionWindow_search":"Szukaj","openInCompanionWindow":"Otwórz w oddzielnym panelu","openWindows":"Aktualnie otwarte okna","pagination":"{{current}} of {{total}}","position":"Pozycja","previewWindowTitle":"{{title}}","previousCanvas":"Poprzednia pozycja","related":"Powiązane","resource":"Zasoby","retry":"Spróbuj ponownie","right":"Prawo","rights":"Licencja","scroll":"Przewiń","searchInputLabel":"szukane słowa","searchNextResult":"Następny wynik","searchNoResults":"Nie znaleziono wyników","searchPreviousResult":"Poprzedni wynik","searchResultsRemaining":"Pozostało {{numLeft}}","searchSubmitAria":"Wyszukaj","searchTitle":"Wyszukaj","selectWorkspaceMenu":"Wybierz typ obszaru roboczego","showingNumAnnotations":"Wyświetlanie {{number}} adnotacji","showingNumAnnotations_plural":"Wyświetlanie {{number}} adnotacji","showCollection":"Pokaż zbiór","showZoomControls":"Pokaż kontrolki powiększenia","sidebarPanelsNavigation":"Nawigacja pasków panelu bocznego","single":"Pojedynczy","startHere":"Zacznij tutaj","suggestSearch":"Przeszukaj ten dokument pod kątem \\"{{ query }}\\"","tableOfContentsList":"Spis treści","theme":"Motyw","thumbnailList":"Lista miniatur","thumbnailNavigation":"Miniatury","thumbnails":"Miniatury","toggleWindowSideBar":"Przełącz panel boczny","totalCollections":"{{count}} zbiór","totalCollections_plural":"{{count}} zbiorów","totalManifests":"{{count}} manifest","totalManifests_plural":"{{count}} manifestów","tryAgain":"Spróbuj ponownie","untitled":"[Bez nazwy]","view":"Widok","viewWorkspaceConfiguration":"Wyświetl konfigurację obszaru roboczego","welcome":"Witaj w Miradorze","window":"Okno: {{label}}","windowMenu":"Widoki okien i wyświetlanie miniatur","windowNavigation":"Nawigacja okna","windowPluginButtons":"Opcje","windowPluginMenu":"Opcje okna","workspace":"Obszar roboczy","workspaceNavigation":"Nawigacja obszaru roboczego","workspaceFullScreen":"Pełny ekran","workspaceMenu":"Ustawienia obszaru roboczego","workspaceOptions":"Opcje obszaru roboczego","workspaceSelectionTitle":"Wybierz typ obszaru roboczego","zoomIn":"Przybliż","zoomOut":"Oddal","zoomReset":"Zresetuj powiększenie"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutThisItem":"Sobre esse item","addedFromUrl":"(Adicionado por URL)","addManifestUrl":"Localização do manifesto","addManifestUrlHelp":"URL do manifesto IIIF","addResource":"Adicionar conteúdo","annotationCanvasLabel_1/1":"Item: [{{label}}]","annotationCanvasLabel_1/2":"Esquerda: [{{label}}]","annotationCanvasLabel_2/2":"Direita: [{{label}}]","annotations":"Anotações","attribution":"Atribuições","attributionTitle":"Direitos","authenticationFailed":"Falha na autenticação.","authenticationRequired":"Autenticação necessária para acesso completo","backToResults":"Voltar aos resultados","book":"Livro","bottom":"Embaixo","cancel":"Cancelar","canvasIndex":"Índice","changeTheme":"Mudar tema","clearSearch":"limpar","closeAddResourceForm":"Fechar formulário","closeAddResourceMenu":"Fechar lista de conteúdo","closeCompanionWindow":"Fechar painel","closeWindow":"Fechar janela","collapseSection":"Suprimir seção \\"{{section}}\\"","collapseSidePanel":"Suprimir barra lateral","itemList":"Lista compacta","continue":"Continuar","copy":"Copiar","currentItem":"Item atual","currentItem_1/1":"Item atual","currentItem_1/2":"Esquerda","currentItem_2/2":"Direita","dark":"Tema escuro","dismiss":"Cancelar","highlightAllAnnotations":"Exibir todas","downloadExport":"Exportar área de trabalho","downloadExportWorkspace":"Exportar área de trabalho","elastic":"Elástico","elasticDescription":"Mova e redimensione janelas livremente numa área de trabalho ilimitada. Janelas podem se sobrepor.","emptyResourceList":"Sua lista de conteúdos está vazia","errorDialogConfirm":"OK","errorDialogTitle":"Um erro ocorreu","exitFullScreen":"Sair do modo tela cheia","expandSection":"Expandir seção \\"{{section}}\\"","expandSidePanel":"Expandir barra lateral","fetchManifest":"Adicionar","fullScreen":"Tela cheia","gallery":"Galeria","hideZoomControls":"Ocultar controles de zoom","iiif_homepage":"Sobre esse conteúdo","iiif_manifest":"Manifesto IIIF","iiif_renderings":"Outros formatos","iiif_seeAlso":"Veja também","import":"Importar","importWorkspace":"Importar área de trabalho","importWorkspaceHint":"Cole uma configuração do Mirador 3 para importar","item":"Item: {{label}}","language":"Idioma","light":"Tema claro","links":"Links","listAllOpenWindows":"Pular para janela","login":"Login","manifestError":"O conteúdo não pode ser adicionado:","maximizeWindow":"Maximizar janela","minimizeWindow":"Minimizar janela","mirador":"Mirador","miradorResources":"conteúdo Mirador","miradorViewer":"visualizador Mirador","more":"mais...","moreResults":"Mais resultados","mosaic":"Mosáico","mosaicDescription":"Mova e redimensione janelas em relação entre si, dentro de uma área visível (grid).","moveCompanionWindowToBottom":"Mover para baixo","moveCompanionWindowToRight":"Mover para direita","nextCanvas":"Próximo item","numItems":"{{number}} itens","off":"Desativado","openCompanionWindow_annotations":"Anotações","openCompanionWindow_attribution":"Direitos","openCompanionWindow_canvas":"Índice","openCompanionWindow_info":"Informações","openCompanionWindow_search":"Busca","openInCompanionWindow":"Abrir em janela separada","openWindows":"Janelas abertas","pagination":"{{current}} de {{total}}","position":"Posição","previewWindowTitle":"{{title}}","previousCanvas":"Item anterior","related":"Relacionado","resource":"Conteúdo","retry":"Tentar novamente","right":"Direita","rights":"Licenças","searchInputLabel":"termos de busca","searchNextResult":"Próximo resultado","searchNoResults":"Nenhum resultado encontrado","searchPreviousResult":"Resultado anterior","searchSubmitAria":"Realizar busca","searchTitle":"Busca","selectWorkspaceMenu":"Selecione um tipo de área de trabalho","showingNumAnnotations":"Mostrando {{number}} anotações","showZoomControls":"Mostrar controles de zoom","sidebarPanelsNavigation":"Navegação por paineis na barra lateral","single":"Individual","startHere":"Comece aqui","suggestSearch":"Procurar neste documento por \\"{{ query }}\\"","theme":"Tema","thumbnailList":"Lista de thumbnails","thumbnailNavigation":"Thumbnails","thumbnails":"Thumbnails","toggleWindowSideBar":"Ver barra lateral","tryAgain":"Tente novamente","untitled":"[Sem título]","view":"Visualizações","welcome":"Bem-vindo ao Mirador","window":"Janela: {{label}}","windowMenu":"Opções de visualização de janelas e thumbnails","windowNavigation":"Navegação de janelas","windowPluginButtons":"Opções","windowPluginMenu":"Opções de janela","workspace":"Área de trabalho","workspaceFullScreen":"Tela cheia","workspaceMenu":"Configurações de área de trabalho","workspaceOptions":"Opções de área de trabalho","workspaceSelectionTitle":"Selecionar tipo de área de trabalho","zoomIn":"Mais zoom","zoomOut":"Menos zoom","zoomReset":"Zerar zoom"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"О пројекту Mirador","aboutThisItem":"Опис","addedFromUrl":"(Додато са URL)","addManifestUrl":"Локација ресурса","addManifestUrlHelp":"URL IIIF ресурса","addResource":"Додајте ресурс","annotationCanvasLabel_1/1":"Страница: [{{label}}]","annotationCanvasLabel_1/2":"Лева: [{{label}}]","annotationCanvasLabel_2/2":"Десна: [{{label}}]","annotations":"Анотације","attribution":"Приступ","attributionTitle":"Права","authenticationFailed":"Неуспела аутентификација.","authenticationRequired":"За потпуни приступ неопходна је аутентификација","backToResults":"Повратак на резултате","book":"Књига","bottom":"На дну","cancel":"Одустаните","canvasIndex":"Индекс","changeTheme":"Промените тему","clearSearch":"обришите","close":"Затворите","closeAddResourceForm":"Затворите","closeAddResourceMenu":"Затворите листу ресурса","closeCompanionWindow":"Затворите панел","closeWindow":"Затворите приказ","collapseSection":"Сакријте \\"{{section}}\\" секцију","collapseSidePanel":"Сакријте","collection":"Колекција","itemList":"Листа страница","continue":"Наставите","copy":"Копирајте","currentItem":"Тренутна страница","currentItem_1/1":"Тренутна страница","currentItem_1/2":"Лева","currentItem_2/2":"Десна","dark":"Тамна тема","digitizedView":"Приказ дигиталног објекта","dismiss":"Откажите","highlightAllAnnotations":"Приказ свих","displayNoAnnotations":"Без приказа","downloadExport":"Извезите радно окружење","downloadExportWorkspace":"Извезите радно окружење","elastic":"Еластични","elasticDescription":"Слободно померајте и одредите величину приказа у неограниченом радном простору. Прикази могу бити већи од радног простора.","emptyResourceList":"Ваша листа ресурса је празна","error":"Грешка","errorDialogConfirm":"OK","errorDialogTitle":"Дошло је до грешке","exitFullScreen":"Изађите из приказа преко целог екрана","expandSection":"Проширите \\"{{section}}\\" секцију","expandSidePanel":"Прикажите","exportCopied":"Конфигурација радног окружења је копирана у привремену меморију","fetchManifest":"Додајте","fullScreen":"Приказ у пуном екрану","gallery":"Галерија","hideZoomControls":"Сакријте контроле зума","iiif_homepage":"О ресурсу","iiif_manifest":"IIIF manifest","iiif_renderings":"Додатни формати","iiif_seeAlso":"Погледајте и","import":"Увезите","importWorkspace":"Увезите радно окружење","importWorkspaceHint":"Убаците конфигурацију Mirador 3 како би могли да је увезете","item":"Страница: {{label}}","jsError":"Технички детаљи","jsStack":"{{ stack }}","language":"Језик приказа","layer_hide":"Сакријте слој","layer_move":"Померите слој","layer_opacity":"Видљивост слоја","layer_show":"Приказ слоја","layer_moveToTop":"Померите слој на врх","layers":"Слојеви","light":"Светла тема","links":"Линкови","listAllOpenWindows":"Идите на приказ","login":"Улогујте се","logout":"Излогујте се","manifestError":"Ресурс се не може додати","maximizeWindow":"Максималан приказ","minimizeWindow":"Минималан приказ","mirador":"Mirador","miradorResources":"Mirador ресурси","miradorViewer":"Mirador прегледач","more":"још...","moreResults":"Још резултата","mosaic":"Мозаик","mosaicDescription":"Померајте и одредите величину приказа који су у међусобној релацији, унутар видљивог оквира.","moveCompanionWindowToBottom":"Пребаците на дно","moveCompanionWindowToRight":"Померите у десну страну","nextCanvas":"Следећа","noItemSelected":"Нема изабраних објеката","numItems":"{{number}} страница/це","off":"Искључене","openCompanionWindow_annotations":"Анотације","openCompanionWindow_attribution":"Права","openCompanionWindow_canvas":"Индекс","openCompanionWindow_info":"Информације","openCompanionWindow_layers":"Слојеви","openCompanionWindow_search":"Претрага","openInCompanionWindow":"Отворите у засебном панелу","openWindows":"Тренутно отворени прикази","pagination":"{{current}} од {{total}}","position":"Позиција","previewWindowTitle":"{{title}}","previousCanvas":"Претходна","related":"Релације","resource":"Ресурс","retry":"Покушајте поново","right":"Десно","rights":"Лиценца","scroll":"Померајте","searchInputLabel":"претражите појам","searchNextResult":"Следећи резултат","searchNoResults":"Тражени појам није пронађен","searchPreviousResult":"Претходни резултат","searchSubmitAria":"Претражите","searchTitle":"Претрага","selectWorkspaceMenu":"Изаберите тип радног окружења","showingNumAnnotations":"Приказ {{number}} анотација/је","showCollection":"Прикажи колекцију","showZoomControls":"Приказ контрола зума","sidebarPanelsNavigation":"Навигација сајдбар панела","single":"Појединачно","startHere":"Започните","suggestSearch":"Пронађите појам \\"{{ query }}\\" у овом документу","tableOfContentsList":"Садржај","theme":"Тема","thumbnailList":"Листа сличица","thumbnailNavigation":"Сличице","thumbnails":"Сличице","toggleWindowSideBar":"Сајдбар","totalCollections":"{{count}} колекција/е","totalManifests":"{{count}} објек(а)та","tryAgain":"Покушајте поново","untitled":"[Без наслова]","view":"Преглед","welcome":"Добродошли у прегледач Mirador","window":"Приказ: {{label}}","windowMenu":"Изглед прегледа и позиција сличица","windowNavigation":"Навигација приказа","windowPluginButtons":"Опције","windowPluginMenu":"Опције приказа","workspace":"Радни простор","workspaceFullScreen":"Приказ преко целог екрана","workspaceMenu":"Уређивање радног простора","workspaceOptions":"Опције радног окружења","workspaceSelectionTitle":"Изаберите тип радног окружења","zoomIn":"Увећајте","zoomOut":"Умањите","zoomReset":"Ресет зума"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"Om Projekt Mirador","aboutThisItem":"Om det här objektet","addedFromUrl":"(Tillagd från URL)","addManifestUrl":"Webbadress till samling eller manifest","addManifestUrlHelp":"URL till en IIIF-resurs","addResource":"Lägg till resurs","annotationCanvasLabel_1/1":"Objekt: [{{label}}]","annotationCanvasLabel_1/2":"Vänster: [{{label}}]","annotationCanvasLabel_2/2":"Höger: [{{label}}]","annotations":"Noteringar","attribution":"Tillskrivning","attributionTitle":"Rättigheter","authenticationFailed":"Autentisering misslyckades.","authenticationRequired":"Autentisering krävs för full åtkomst","backToResults":"Tillbaka till resultat","book":"Bok","bottom":"Nederkant","cancel":"Avbryt","canvasIndex":"Index","changeTheme":"Ändra tema","clearSearch":"Ta bort sökning","close":"Stäng","closeAddResourceForm":"Stäng formulär","closeAddResourceMenu":"Stäng resurslista","closeCompanionWindow":"Stäng panel","closeWindow":"Stäng fönster","collapseSection":"Stäng sektionen \\"{{section}}\\"","collapseSidePanel":"Stäng sidofält","collection":"Samling","itemList":"Objektlista","continue":"Fortsätt","copy":"Kopiera","currentItem":"Aktuellt objekt","currentItem_1/1":"Aktuellt objekt","currentItem_1/2":"Vänster","currentItem_2/2":"Höger","dark":"Mörkt tema","digitizedView":"Digitaliserad vy","dismiss":"Stäng","highlightAllAnnotations":"Markera alla","displayNoAnnotations":"Avmarkera alla","downloadExport":"Exportera arbetsyta","downloadExportWorkspace":"Exportera arbetsyta","elastic":"Elastisk","elasticDescription":"Flytta och ändra storlek på fönster fritt i en obegränsad arbetsyta. Fönster kan överlappa.","emptyResourceList":"Din resurslista är tom","error":"Error","errorDialogConfirm":"OK","errorDialogTitle":"Ett problem uppstod","exitFullScreen":"Lämna helskärmsläge","expandSection":"Expandera sektionen \\"{{section}}\\"","expandSidePanel":"Expandera sidofält","exportCopied":"Konfiguration av arbetsytan har kopierats till dina urklipp","fetchManifest":"Lägg till","fullScreen":"Helskärmsläge","gallery":"Galleri","hideZoomControls":"Dölj zoomkontroller","iiif_homepage":"Om den här resursen","iiif_manifest":"IIIF manifest","iiif_renderings":"Alternativa format","iiif_seeAlso":"Se även","import":"Importera","importWorkspace":"Importera arbetsyta","importWorkspaceHint":"Klistra in en Mirador 3 konfiguration att importera","item":"Objekt: {{label}}","jsError":"Tekniska detaljer","jsStack":"{{ stack }}","language":"Språk","layer_hide":"Dölj lager","layer_move":"Flytta lager","layer_opacity":"Lageropacitet","layer_show":"Visa lager","layer_moveToTop":"Flytta lager till toppen","layers":"Lager","light":"Ljust tema","links":"Länkar","listAllOpenWindows":"Gå till fönster","login":"Logga in","logout":"Logga ut","manifestError":"Resursen kan inte läggas till:","maximizeWindow":"Maximera fönster","minimizeWindow":"Minimera fönster","mirador":"Mirador","miradorResources":"Miradorresurser","miradorViewer":"Mirador bildvisare","more":"mer...","moreResults":"Fler resultat","mosaic":"Mosaik","mosaicDescription":"Flytta och ändra storlek på fönster i relation till varandra, innanför den synliga ramen.","moveCompanionWindowToBottom":"Flytta till botten","moveCompanionWindowToRight":"Flytta till höger","nextCanvas":"Nästa objekt","noItemSelected":"Inga valda objekt","numItems":"{{number}} objekt","off":"Av","openCompanionWindow_annotations":"Noteringar","openCompanionWindow_attribution":"Rättigheter","openCompanionWindow_canvas":"Index","openCompanionWindow_info":"Information","openCompanionWindow_layers":"Lager","openCompanionWindow_search":"Sök","openInCompanionWindow":"Öppna i separat panel","openWindows":"Öppna fönster","pagination":"{{current}} av {{total}}","position":"Position","previewWindowTitle":"{{title}}","previousCanvas":"Föregående objekt","related":"Relaterat","resource":"Resurs","retry":"Försök igen","right":"Till höger","rights":"Licens","scroll":"Scrolla","searchInputLabel":"Sökord","searchNextResult":"Nästa resultat","searchNoResults":"Inga resultat hittades","searchPreviousResult":"Föregående resultat","searchResultsRemaining":"{{numLeft}} kvar","searchSubmitAria":"Sök","searchTitle":"Sök","selectWorkspaceMenu":"Välj typ av arbetsyta","showingNumAnnotations":"Visar {{number}} noteringar","showCollection":"Visa samling","showZoomControls":"Visa zoomkontroller","sidebarPanelsNavigation":"Sidofältspaneler navigering","single":"En och en","startHere":"Börja här","suggestSearch":"Sök i detta dokument efter \\"{{ query }}\\"","tableOfContentsList":"Innehållsförteckning","theme":"Tema","thumbnailList":"Miniatyrlista","thumbnailNavigation":"Miniatyrer","thumbnails":"Miniatyrer","toggleWindowSideBar":"Visa/dölj sidofält","totalCollections":"{{count}} samlingar","totalManifests":"{{count}} manifest","tryAgain":"Försök igen","untitled":"[namnlös]","view":"Vy","welcome":"Välkommen till Mirador","window":"Fönster: {{label}}","windowMenu":"Fönstervyer & miniatyrdisplay","windowNavigation":"Fönsternavigation","windowPluginButtons":"Inställningar","windowPluginMenu":"Fönsterinställningar","workspace":"Arbetsyta","workspaceNavigation":"Navigera i arbetsyta","workspaceFullScreen":"Helskärmsläge","workspaceMenu":"Inställningar för arbetsyta","workspaceOptions":"Fler val för arbetsyta","workspaceSelectionTitle":"Välj typ av arbetsyta","zoomIn":"Zooma in","zoomOut":"Zooma ut","zoomReset":"Återställ zoom"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutMirador":"Về dự án Mirador","aboutThisItem":"Về khoản mục này","addedFromUrl":"(Được thêm từ URL)","addManifestUrl":"Vị trí tài nguyên","addManifestUrlHelp":"URL của tài nguyên IIIF","addResource":"Bổ sung tài nguyên","annotationCanvasLabel_1/1":"Khoản mục: [{{label}}]","annotationCanvasLabel_1/2":"Trái: [{{label}}]","annotationCanvasLabel_2/2":"Phải: [{{label}}]","annotations":"Chú giải","attribution":"Quyền hạn","attributionTitle":"Quyền","authenticationFailed":"Xác thực thất bại.","authenticationRequired":"Xác thực được yêu cầu cho truy nhập đầy đủ","backToResults":"Trở lại kết quả","book":"Sách","bottom":"Đáy","cancel":"Huỷ bỏ","canvasIndex":"Chỉ mục","changeTheme":"Đổi chủ đề","clearSearch":"xoá","close":"Đóng","closeAddResourceForm":"Đóng mẫu","closeAddResourceMenu":"Đóng danh sách tài nguyên","closeCompanionWindow":"Đóng panel","closeWindow":"Đóng cửa sổ","collapseSection":"Co sập {{section}} mục","collapseSidePanel":"Co sập thanh bên","collection":"Tuyển tập","itemList":"Danh sách khoản mục","continue":"Tiếp tục","copy":"Sao","currentItem":"Khoản mục hiện thời","currentItem_1/1":"Khoản mục hiện thời","currentItem_1/2":"Trái","currentItem_2/2":"Phải","dark":"Chủ đề tối","digitizedView":"Cái nhìn số hoá","dismiss":"Bác bỏ","highlightAllAnnotations":"Làm nổi bật tất","displayNoAnnotations":"Không làm nổi bật","downloadExport":"Vùng xuất khẩu","downloadExportWorkspace":"Vùng xuất khẩu","elastic":"Co giãn","elasticDescription":"Di chuyển và định cỡ cửa sổ tự do trong vùng vô giới hạn. Cửa sổ có thể chèn lấp.","emptyResourceList":"Danh sách tài nguyên của bạn là trống","error":"Lỗi","errorDialogConfirm":"OK","errorDialogTitle":"Lỗi đã xuất hiện","exitFullScreen":"Ra khỏi toàn màn hình","expandSection":"Mở rộng {{section}} mục","expandSidePanel":"Mở rộng thanh bên","exportCopied":"Cấu hình vùng làm việc được sao vào bảng đệm của bạn","fetchManifest":"Thêm","fullScreen":"Toàn màn hình","gallery":"Phòng tranh","hideZoomControls":"Ẩn điều khiển thu phóng","iiif_homepage":"Về tài nguyên này","iiif_manifest":"Bản kê IIIF","iiif_renderings":"Dạng thức luân phiên","iiif_seeAlso":"Cũng xem","import":"Nhập khẩu","importWorkspace":"Vùng nhập khẩu","importWorkspaceHint":"Dán cấu hình Mirador 3 để được nhập khẩu","item":"Khoản mục: {{label}}","jsError":"Chi tiết kĩ thuật","jsStack":"{{ stack }}","language":"Ngôn ngữ","layer_hide":"Giấu tầng","layer_move":"Chuyển tầng","layer_opacity":"Làm mờ tầng","layer_show":"Hiện tầng","layer_moveToTop":"Chuyển tầng lên đỉnh","layers":"Tầng","light":"Chủ đề sáng","links":"Móc nối","listAllOpenWindows":"Nhảy tới cửa sổ","login":"Đăng nhập","logout":"Đăng xuất","manifestError":"Tài nguyên không thể được bổ sung:","maximizeWindow":"Cực đại cửa sổ","minimizeWindow":"Cực tiểu cửa sổ","mirador":"Mirador","miradorResources":"Tài nguyên Mirador","miradorViewer":"Bộ xem Mirador","more":"thêm...","moreResults":"Thêm kết quả","mosaic":"Mosaic","mosaicDescription":"Di chuyển và định cỡ cửa sổ trong quan hệ lẫn nhau, bên trong khung thấy được.","moveCompanionWindowToBottom":"Chuyển tới đáy","moveCompanionWindowToRight":"Chuyển sang phải","nextCanvas":"Khoản mục tiếp","noItemSelected":"Không khoản mục nào được chọn","numItems":"{{number}} khoản mục","off":"Off","openCompanionWindow_annotations":"Chú giải","openCompanionWindow_attribution":"Quyền","openCompanionWindow_canvas":"Chỉ mục","openCompanionWindow_info":"Thông tin","openCompanionWindow_layers":"Tầng","openCompanionWindow_search":"Tìm","openInCompanionWindow":"Mở trong ngăn tách rời","openWindows":"Cửa sổ mở hiện thời","pagination":"{{current}} trong {{total}}","position":"Vị trí","previewWindowTitle":"{{title}}","previousCanvas":"Khoản mục trước","related":"Có liên quan","resource":"Tài nguyên","retry":"Thử lại","right":"Quyền","rights":"Cấp phép","scroll":"Cuộn","searchInputLabel":"Từ tìm kiếm","searchNextResult":"Kết quả tiếp","searchNoResults":"Không tìm được kết quả nào","searchPreviousResult":"Kết quả trước","searchSubmitAria":"Đệ trình việc tìm","searchTitle":"Tìm","selectWorkspaceMenu":"Chọn kiểu vùng làm việc","showingNumAnnotations":"Hiện {{number}} chú giải","showCollection":"Hiện bộ sưu tập","showZoomControls":"Hiện kiểm soát thu phóng","sidebarPanelsNavigation":"Dẫn lái ngăn thanh bên","single":"Chỉ một","startHere":"Bắt đầu ở đây","suggestSearch":"Tìm tài liệu này cho \\"{{ query }}\\"","tableOfContentsList":"Mục lục","theme":"Chủ đề","thumbnailList":"Danh sách ảnh thu nhỏ","thumbnailNavigation":"Ảnh thu nhỏ","thumbnails":"Ảnh thu nhỏ","toggleWindowSideBar":"chốt thanh bên","totalCollections":"{{count}} bộ sưu tập","totalManifests":"{{count}} bản kê","tryAgain":"Thử lại","untitled":"[Untitled]","view":"Xem","welcome":"Chào mừng bạn tới Mirador","window":"Cửa sổ: {{label}}","windowMenu":"Xem cửa sổ & hiển thị ảnh thu nhỏ","windowNavigation":"Dẫn lái cửa sổ","windowPluginButtons":"Tuỳ chọn","windowPluginMenu":"Tuỳ chọn cửa sổ","workspace":"Vùng làm việc","workspaceNavigation":"Dẫn lái vùng làm việc","workspaceFullScreen":"Toàn màn hình","workspaceMenu":"Thiết đặt vùng làm việc","workspaceOptions":"Tuỳ chọn vùng làm việc","workspaceSelectionTitle":"Chọn kiểu vùng làm việc","zoomIn":"Thu nhỏ","zoomOut":"Phóng to","zoomReset":"Đặt lại thu phóng"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutThisItem":"有关此物件","addedFromUrl":"(从URL添加)","addManifestUrl":"来源","addManifestUrlHelp":"IIIF资源的URL","addResource":"添加资源","annotationCanvasLabel_1/1":"物件: [{{label}}]","annotationCanvasLabel_1/2":"左方: [{{label}}]","annotationCanvasLabel_2/2":"右方: [{{label}}]","annotations":"注释","attribution":"着作权","attributionTitle":"着作权","book":"书籍","bottom":"下方","cancel":"取消","canvasIndex":"索引","changeTheme":"变更佈景主题","closeAddResourceForm":"关闭表格","closeAddResourceMenu":"关闭资源列表","closeCompanionWindow":"关闭附属视窗","closeWindow":"关闭视窗","collapseSection":"关闭{{section}}分页","collapseSidePanel":"关闭边栏","itemList":"标题列表","copy":"複製","currentItem":"目前物件","currentItem_1/1":"目前物件","currentItem_1/2":"左方","currentItem_2/2":"右方","dark":"黑色主题","dismiss":"关闭信息","highlightAllAnnotations":"显示所有注释","downloadExport":"滙出桌面排版","downloadExportWorkspace":"滙出桌面排版","elastic":"弹性","elasticDescription":"在桌面上自由摆放视窗","emptyResourceList":"资源列表没有物件","errorDialogConfirm":"确定","errorDialogTitle":"发生错误","exitFullScreen":"退出全萤幕","expandSection":"开启{{section}}分页","expandSidePanel":"开启边栏","fetchManifest":"添加","fullScreen":"全萤幕","gallery":"矩列","hideZoomControls":"隐藏缩放选项","iiif_homepage":"有关此资源","iiif_manifest":"IIIF","iiif_renderings":"其他格式","iiif_seeAlso":"另见","import":"滙入","importWorkspace":"滙入桌面排版","importWorkspaceHint":"在此贴上Mirador 3排版设定码","item":"物件: {{label}}","language":"语言","light":"白色主题","links":"连结","listAllOpenWindows":"切换至视窗","login":"登入","manifestError":"无法增添资源:","maximizeWindow":"视窗最大化","minimizeWindow":"视窗最小化","mirador":"Mirador","miradorResources":"Mirador资源","miradorViewer":"Mirador阅览器","mosaic":"马赛克","mosaicDescription":"在桌面上以格状方式排列视窗","moveCompanionWindowToBottom":"移至下方","moveCompanionWindowToRight":"移至右方","nextCanvas":"下一页","numItems":"{{number}} 项物件","off":"关闭","openCompanionWindow_annotations":"注释","openCompanionWindow_attribution":"着作权","openCompanionWindow_canvas":"目录","openCompanionWindow_info":"资讯","openInCompanionWindow":"移至新附属视窗","openWindows":"现有视窗","pagination":"{{current}} / {{total}}","position":"位置","previewWindowTitle":"{{title}}","previousCanvas":"上一页","related":"相关资讯","resource":"资源","right":"右方","rights":"版权","selectWorkspaceMenu":"选择桌面排版方式","showingNumAnnotations":"显示 {{number}} 项注释","showZoomControls":"显示缩放选项","sidebarPanelsNavigation":"切换边栏","single":"单项","startHere":"按此开始","theme":"佈景主题","thumbnailList":"缩图列表","thumbnailNavigation":"缩图","thumbnails":"显示缩图","toggleWindowSideBar":"切换边栏开关","tryAgain":"请重试","untitled":"[无标题]","view":"物件排列方式","welcome":"欢迎使用Mirador","window":"视窗: {{label}}","windowMenu":"视窗选项","windowNavigation":"切换视窗","windowPluginButtons":"选项","workspace":"桌面","workspaceFullScreen":"全萤幕","workspaceMenu":"桌面设定","workspaceOptions":"桌面选项","workspaceSelectionTitle":"选择桌面排版方式","zoomIn":"放大","zoomOut":"放小","zoomReset":"重设缩放"}}')},function(e){e.exports=JSON.parse('{"translation":{"aboutThisItem":"有關此物件","addedFromUrl":"(從URL添加)","addManifestUrl":"來源","addManifestUrlHelp":"IIIF資源的URL","addResource":"添加資源","annotationCanvasLabel_1/1":"物件: [{{label}}]","annotationCanvasLabel_1/2":"左方: [{{label}}]","annotationCanvasLabel_2/2":"右方: [{{label}}]","annotations":"注釋","attribution":"著作權","attributionTitle":"著作權","book":"書籍","bottom":"下方","cancel":"取消","canvasIndex":"索引","changeTheme":"變更佈景主題","closeAddResourceForm":"關閉表格","closeAddResourceMenu":"關閉資源列表","closeCompanionWindow":"關閉附屬視窗","closeWindow":"關閉視窗","collapseSection":"關閉{{section}}分頁","collapseSidePanel":"關閉邊欄","itemList":"標題列表","copy":"複製","currentItem":"目前物件","currentItem_1/1":"目前物件","currentItem_1/2":"左方","currentItem_2/2":"右方","dark":"黑色主題","dismiss":"關閉信息","highlightAllAnnotations":"顯示所有注釋","downloadExport":"滙出桌面排版","downloadExportWorkspace":"滙出桌面排版","elastic":"彈性","elasticDescription":"在桌面上自由擺放視窗","emptyResourceList":"資源列表沒有物件","errorDialogConfirm":"確定","errorDialogTitle":"發生錯誤","exitFullScreen":"退出全螢幕","expandSection":"開啟{{section}}分頁","expandSidePanel":"開啟邊欄","fetchManifest":"添加","fullScreen":"全螢幕","gallery":"矩列","hideZoomControls":"隱藏縮放選項","iiif_homepage":"有關此資源","iiif_manifest":"IIIF","iiif_renderings":"其他格式","iiif_seeAlso":"另見","import":"滙入","importWorkspace":"滙入桌面排版","importWorkspaceHint":"在此貼上Mirador 3排版設定碼","item":"物件: {{label}}","language":"語言","light":"白色主題","links":"連結","listAllOpenWindows":"切換至視窗","login":"登入","manifestError":"無法增添資源:","maximizeWindow":"視窗最大化","minimizeWindow":"視窗最小化","mirador":"Mirador","miradorResources":"Mirador資源","miradorViewer":"Mirador閱覽器","mosaic":"馬賽克","mosaicDescription":"在桌面上以格狀方式排列視窗","moveCompanionWindowToBottom":"移至下方","moveCompanionWindowToRight":"移至右方","nextCanvas":"下一頁","numItems":"{{number}} 項物件","off":"關閉","openCompanionWindow_annotations":"注釋","openCompanionWindow_attribution":"著作權","openCompanionWindow_canvas":"目錄","openCompanionWindow_info":"資訊","openInCompanionWindow":"移至新附屬視窗","openWindows":"現有視窗","pagination":"{{current}} / {{total}}","position":"位置","previewWindowTitle":"{{title}}","previousCanvas":"上一頁","related":"相關資訊","resource":"資源","right":"右方","rights":"版權","selectWorkspaceMenu":"選擇桌面排版方式","showingNumAnnotations":"顯示 {{number}} 項注釋","showZoomControls":"顯示縮放選項","sidebarPanelsNavigation":"切換邊欄","single":"單項","startHere":"按此開始","theme":"佈景主題","thumbnailList":"縮圖列表","thumbnailNavigation":"縮圖","thumbnails":"顯示縮圖","toggleWindowSideBar":"切換邊欄開關","tryAgain":"請重試","untitled":"[無標題]","view":"物件排列方式","welcome":"歡迎使用Mirador","window":"視窗: {{label}}","windowMenu":"視窗選項","windowNavigation":"切換視窗","windowPluginButtons":"插件","workspace":"桌面","workspaceFullScreen":"全螢幕","workspaceMenu":"桌面設定","workspaceOptions":"桌面選項","workspaceSelectionTitle":"選擇桌面排版方式","zoomIn":"放大","zoomOut":"放小","zoomReset":"重設縮放"}}')},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M19 18l2 1V1H7v2h12v15zM17 5H3v18l7-3 7 3V5z"}),"BookmarksSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z"}),"ExpandLessSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}),"CheckSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(1084).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExitSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}),"FullscreenSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M4.01 2L4 22h16V8l-6-6H4.01zM13 9V3.5L18.5 9H13z"}),"InsertDriveFileSharp");t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r};function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?d(e):t}function f(e){return(f=Object.getPrototypeOf||function(e){return e.__proto__})(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h={position:"absolute",left:0,top:0,right:0,bottom:0,overflow:"hidden",zIndex:-1,visibility:"hidden",pointerEvents:"none"},g={position:"absolute",left:0,top:0,transition:"0s"};function v(e,t){for(var n=e.parentNode;n;){if(n===t)return!0;n=n.parentNode}return!1}var m=function(e){function t(){var e,n,r;s(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return l(r,(n=r=l(this,(e=f(t)).call.apply(e,[this].concat(o))),p(d(d(r)),"_expandRef",null),p(d(d(r)),"_shrinkRef",null),p(d(d(r)),"_node",null),p(d(d(r)),"_lastWidth",void 0),p(d(d(r)),"_lastHeight",void 0),p(d(d(r)),"_lastRect",void 0),p(d(d(r)),"_hasResize",!1),p(d(d(r)),"_handleScroll",(function(e){(r.props.onPosition||r.props.onReflow||r.props.onResize)&&(r._globalScollTarget(e.target)||r._refScrollTarget(e.target)||r._ancestorScollTarget(e.target))&&r._reflow()})),p(d(d(r)),"_globalScollTarget",(function(e){return e instanceof Node&&(r.props.onPosition||r.props.onReflow)&&(e===document||e===document.documentElement||e===document.body)})),p(d(d(r)),"_refScrollTarget",(function(e){if(e instanceof HTMLElement&&(e===r._expandRef||e===r._shrinkRef)){var t=e.offsetWidth,n=e.offsetHeight;if(t!==r._lastWidth||n!==r._lastHeight)return r._lastWidth=t,r._lastHeight=n,r._reset(r._expandRef),r._reset(r._shrinkRef),!0}return!1})),p(d(d(r)),"_ancestorScollTarget",(function(e){return e instanceof Node&&(r.props.onPosition||r.props.onReflow)&&r._node&&v(r._node,e)})),p(d(d(r)),"_reflow",(function(){if(r._node&&r._node.parentNode instanceof Element){var e=r._node.parentNode.getBoundingClientRect(),t=!0,n=!0;r._lastRect&&(t=e.width!==r._lastRect.width||e.height!==r._lastRect.height,n=e.top!==r._lastRect.top||e.left!==r._lastRect.left),r._lastRect=e,t&&r.props.onResize&&r.props.onResize(e),n&&r.props.onPosition&&r.props.onPosition(e),(t||n)&&r.props.onReflow&&r.props.onReflow(e)}})),p(d(d(r)),"_handleRef",(function(e){r._node=e})),p(d(d(r)),"_handleExpandRef",(function(e){r._reset(e),r._expandRef=e})),p(d(d(r)),"_handleShrinkRef",(function(e){r._reset(e),r._shrinkRef=e})),n))}var n,r,o;return n=t,(r=[{key:"componentDidMount",value:function(){this._reflow(),window.addEventListener("scroll",this._handleScroll,!0),(this.props.onPosition||this.props.onReflow)&&(window.addEventListener("resize",this._reflow,!0),this._hasResize=!0)}},{key:"componentDidUpdate",value:function(){!this.props.onPosition&&!this.props.onReflow||this._hasResize?this.props.onPosition||this.props.onReflow||!this._hasResize||(window.removeEventListener("resize",this._reflow,!0),this._hasResize=!1):(window.addEventListener("resize",this._reflow,!0),this._hasResize=!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this._handleScroll,!0),this._hasResize&&window.removeEventListener("resize",this._reflow,!0)}},{key:"_reset",value:function(e){e&&(e.scrollLeft=1e5,e.scrollTop=1e5)}},{key:"render",value:function(){return this.props.onResize||this.props.onReflow?i.default.createElement("div",{style:h,ref:this._handleRef},i.default.createElement("div",{ref:this._handleExpandRef,style:h},i.default.createElement("div",{style:a({},g,{width:1e5,height:1e5})})),i.default.createElement("div",{ref:this._handleShrinkRef,style:h},i.default.createElement("div",{style:a({},g,{width:"200%",height:"200%"})}))):i.default.createElement("noscript",{ref:this._handleRef})}}])&&u(n.prototype,r),o&&u(n,o),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");c(e.prototype,t&&t.prototype),t&&c(e,t)}(t,e),t}(i.default.Component);p(m,"displayName","ResizeObserver");var y=m;t.default=y},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"}),"ViewColumn");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M21 3H3v18h18V3zm-2 16H5V5h14v14z"}),"CropDinSharp");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=s(n(0)),a=s(n(2));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onReceiveMessage=n.onReceiveMessage.bind(n),n.onLoad=n.onLoad.bind(n),n.sendMessage=n.sendMessage.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onReceiveMessage),this._frame&&this._frame.addEventListener("load",this.onLoad)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.onReceiveMessage,!1)}},{key:"componentWillReceiveProps",value:function(e){this.props.postMessageData!==e.postMessageData&&this.sendMessage(e.postMessageData)}},{key:"onReceiveMessage",value:function(e){var t=this.props.handleReceiveMessage;t&&t(e)}},{key:"onLoad",value:function(){var e=this.props.handleReady;e&&e(),this.sendMessage(this.props.postMessageData)}},{key:"sendMessage",value:function(e){this._frame.contentWindow.postMessage(e,this.props.targetOrigin)}},{key:"render",value:function(){var e=this,n=this.props.attributes;return o.default.createElement("iframe",r({ref:function(t){e._frame=t}},Object.assign({},t.defaultAttributes,n)))}}]),t}(o.default.Component);c.propTypes={attributes:a.default.shape({frameBorder:a.default.oneOfType([a.default.string,a.default.number]),height:a.default.oneOfType([a.default.string,a.default.number]),name:a.default.string,scrolling:a.default.string,sandbox:a.default.string,srcDoc:a.default.string,src:a.default.string.isRequired,width:a.default.oneOfType([a.default.string,a.default.number])}),handleReceiveMessage:a.default.func,handleReady:a.default.func,postMessageData:a.default.any,targetOrigin:a.default.string},c.defaultProps={targetOrigin:"*"},c.defaultAttributes={frameBorder:0},t.default=c},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.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");t.default=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(334),i=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,o=e.productionPrefix,a=void 0===o?"jss":o,s=e.seed,c=void 0===s?"":s,u=""===c?"":"".concat(c,"-"),l=0,f=function(){return l+=1};return function(e,t){var o=t.options.name;if(o&&0===o.indexOf("Mui")&&!t.options.link&&!n){if(-1!==i.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(u).concat(o,"-").concat(e.key);return t.options.theme[r.a]&&""===c?"".concat(s,"-").concat(f()):s}return"".concat(u).concat(a).concat(f())}}},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(24),u=n(190),l=n(11),f=o.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,c=e.children,f=e.classes,d=e.className,p=e.color,h=void 0===p?"default":p,g=e.disabled,v=void 0!==g&&g,m=e.disableFocusRipple,y=void 0!==m&&m,b=e.size,w=void 0===b?"medium":b,_=Object(i.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return o.createElement(u.a,Object(r.a)({className:Object(a.a)(f.root,d,"default"!==h&&f["color".concat(Object(l.a)(h))],v&&f.disabled,"small"===w&&f["size".concat(Object(l.a)(w))],{start:f.edgeStart,end:f.edgeEnd}[s]),centerRipple:!0,focusRipple:!y,disabled:v,ref:t},_),o.createElement("span",{className:f.label},c))}));t.a=Object(s.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(c.a)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(f)},function(e,t,n){"use strict";var r=n(1),i=n(41),o=n(4),a=n(0),s=(n(2),n(372)),c=n(49),u=n(36),l=n(55),f=n(31),d={entering:{opacity:1},entered:{opacity:1}},p={enter:c.b.enteringScreen,exit:c.b.leavingScreen},h=a.forwardRef((function(e,t){var n=e.children,c=e.disableStrictModeCompat,h=void 0!==c&&c,g=e.in,v=e.onEnter,m=e.onEntered,y=e.onEntering,b=e.onExit,w=e.onExited,_=e.onExiting,x=e.style,O=e.TransitionComponent,S=void 0===O?s.a:O,E=e.timeout,C=void 0===E?p:E,k=Object(o.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),T=Object(u.a)(),j=T.unstable_strictMode&&!h,P=a.useRef(null),I=Object(f.a)(n.ref,t),R=Object(f.a)(j?P:void 0,I),A=function(e){return function(t,n){if(e){var r=j?[P.current,t]:[t,n],o=Object(i.a)(r,2),a=o[0],s=o[1];void 0===s?e(a):e(a,s)}}},M=A(y),D=A((function(e,t){Object(l.b)(e);var n=Object(l.a)({style:x,timeout:C},{mode:"enter"});e.style.webkitTransition=T.transitions.create("opacity",n),e.style.transition=T.transitions.create("opacity",n),v&&v(e,t)})),N=A(m),L=A(_),z=A((function(e){var t=Object(l.a)({style:x,timeout:C},{mode:"exit"});e.style.webkitTransition=T.transitions.create("opacity",t),e.style.transition=T.transitions.create("opacity",t),b&&b(e)})),B=A(w);return a.createElement(S,Object(r.a)({appear:!0,in:g,nodeRef:j?P:void 0,onEnter:D,onEntered:N,onEntering:M,onExit:z,onExited:B,onExiting:L,timeout:C},k),(function(e,t){return a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,visibility:"exited"!==e||g?void 0:"hidden"},d[e],x,n.props.style),ref:R},t))}))}));t.a=h},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(758),u=o.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,l=e.invisible,f=void 0!==l&&l,d=e.open,p=e.transitionDuration,h=e.TransitionComponent,g=void 0===h?c.a:h,v=Object(i.a)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return o.createElement(g,Object(r.a)({in:d,timeout:p},v),o.createElement("div",{className:Object(a.a)(s.root,u,f&&s.invisible),"aria-hidden":!0,ref:t},n))}));t.a=Object(s.a)({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"}},{name:"MuiBackdrop"})(u)},function(e,t,n){"use strict";var r=n(4),i=n(1),o=n(247),a=n(0),s=(n(2),n(3)),c=n(102),u=n(125),l=n(5),f=n(11),d=n(31),p=n(1130),h=n(184),g="undefined"==typeof window?a.useEffect:a.useLayoutEffect,v=a.forwardRef((function(e,t){var n=e["aria-describedby"],l=e.autoComplete,v=e.autoFocus,m=e.classes,y=e.className,b=(e.color,e.defaultValue),w=e.disabled,_=e.endAdornment,x=(e.error,e.fullWidth),O=void 0!==x&&x,S=e.id,E=e.inputComponent,C=void 0===E?"input":E,k=e.inputProps,T=void 0===k?{}:k,j=e.inputRef,P=(e.margin,e.multiline),I=void 0!==P&&P,R=e.name,A=e.onBlur,M=e.onChange,D=e.onClick,N=e.onFocus,L=e.onKeyDown,z=e.onKeyUp,B=e.placeholder,F=e.readOnly,W=e.renderSuffix,H=e.rows,V=e.rowsMax,U=e.rowsMin,q=e.maxRows,G=e.minRows,K=e.startAdornment,$=e.type,Z=void 0===$?"text":$,X=e.value,Q=Object(r.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),Y=null!=T.value?T.value:X,J=a.useRef(null!=Y).current,ee=a.useRef(),te=a.useCallback((function(e){0}),[]),ne=Object(d.a)(T.ref,te),re=Object(d.a)(j,ne),ie=Object(d.a)(ee,re),oe=a.useState(!1),ae=oe[0],se=oe[1],ce=Object(u.b)();var ue=Object(c.a)({props:e,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});ue.focused=ce?ce.focused:ae,a.useEffect((function(){!ce&&w&&ae&&(se(!1),A&&A())}),[ce,w,ae,A]);var le=ce&&ce.onFilled,fe=ce&&ce.onEmpty,de=a.useCallback((function(e){Object(h.b)(e)?le&&le():fe&&fe()}),[le,fe]);g((function(){J&&de({value:Y})}),[Y,de,J]);a.useEffect((function(){de(ee.current)}),[]);var pe=C,he=Object(i.a)({},T,{ref:ie});"string"!=typeof pe?he=Object(i.a)({inputRef:ie,type:Z},he,{ref:null}):I?!H||q||G||V||U?(he=Object(i.a)({minRows:H||G,rowsMax:V,maxRows:q},he),pe=p.a):pe="textarea":he=Object(i.a)({type:Z},he);return a.useEffect((function(){ce&&ce.setAdornedStart(Boolean(K))}),[ce,K]),a.createElement("div",Object(i.a)({className:Object(s.a)(m.root,m["color".concat(Object(f.a)(ue.color||"primary"))],y,ue.disabled&&m.disabled,ue.error&&m.error,O&&m.fullWidth,ue.focused&&m.focused,ce&&m.formControl,I&&m.multiline,K&&m.adornedStart,_&&m.adornedEnd,"dense"===ue.margin&&m.marginDense),onClick:function(e){ee.current&&e.currentTarget===e.target&&ee.current.focus(),D&&D(e)},ref:t},Q),K,a.createElement(u.a.Provider,{value:null},a.createElement(pe,Object(i.a)({"aria-invalid":ue.error,"aria-describedby":n,autoComplete:l,autoFocus:v,defaultValue:b,disabled:ue.disabled,id:S,onAnimationStart:function(e){de("mui-auto-fill-cancel"===e.animationName?ee.current:{value:"x"})},name:R,placeholder:B,readOnly:F,required:ue.required,rows:H,value:Y,onKeyDown:L,onKeyUp:z},he,{className:Object(s.a)(m.input,T.className,ue.disabled&&m.disabled,I&&m.inputMultiline,ue.hiddenLabel&&m.inputHiddenLabel,K&&m.inputAdornedStart,_&&m.inputAdornedEnd,"search"===Z&&m.inputTypeSearch,"dense"===ue.margin&&m.inputMarginDense),onBlur:function(e){A&&A(e),T.onBlur&&T.onBlur(e),ce&&ce.onBlur?ce.onBlur(e):se(!1)},onChange:function(e){if(!J){var t=e.target||ee.current;if(null==t)throw new Error(Object(o.a)(1));de({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];T.onChange&&T.onChange.apply(T,[e].concat(r)),M&&M.apply(void 0,[e].concat(r))},onFocus:function(e){ue.disabled?e.stopPropagation():(N&&N(e),T.onFocus&&T.onFocus(e),ce&&ce.onFocus?ce.onFocus(e):se(!0))}}))),_,W?W(Object(i.a)({},ue,{startAdornment:K})):null)}));t.a=Object(l.a)((function(e){var t="light"===e.palette.type,n={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:Object(i.a)({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(v)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(760),c=n(5),u=o.forwardRef((function(e,t){var n=e.disableUnderline,c=e.classes,u=e.fullWidth,l=void 0!==u&&u,f=e.inputComponent,d=void 0===f?"input":f,p=e.multiline,h=void 0!==p&&p,g=e.type,v=void 0===g?"text":g,m=Object(i.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return o.createElement(s.a,Object(r.a)({classes:Object(r.a)({},c,{root:Object(a.a)(c.root,!n&&c.underline),underline:null}),fullWidth:l,inputComponent:d,multiline:h,ref:t,type:v},m))}));u.muiName="Input",t.a=Object(c.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(u)},function(e,t,n){"use strict";n.d(t,"a",(function(){return Ae}));var r=n(59),i=Date.now(),o="fnValues"+i,a="fnStyle"+ ++i,s=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var i=Object(r.d)(e,{},n);return i[a]=t,i},onProcessStyle:function(e,t){if(o in t||a in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[o]=n,e},onUpdate:function(e,t,n,r){var i=t,s=i[a];s&&(i.style=s(e)||{});var c=i[o];if(c)for(var u in c)i.prop(u,c[u](e),r)}}},c=n(1),u="@global",l=function(){function e(e,t,n){for(var i in this.type="global",this.at=u,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new r.a(Object(c.a)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),f=function(){function e(e,t,n){this.type="global",this.at=u,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr("@global ".length);this.rule=n.jss.createRule(r,t,Object(c.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),d=/\s*,\s*/g;function p(e,t){for(var n=e.split(d),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}var h=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===u)return new l(e,t,n);if("@"===e[0]&&"@global "===e.substr(0,"@global ".length))return new f(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[u]:null;if(i){for(var o in i)t.addRule(o,i[o],Object(c.a)({},n,{selector:p(o,e.selector)}));delete r[u]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,u.length)===u){var o=p(i.substr(u.length),e.selector);t.addRule(o,r[i],Object(c.a)({},n,{selector:o})),delete r[i]}}(e,t))}}},g=/\s*,\s*/g,v=/&/g,m=/\$([\w-]+)/g;var y=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(g),r=e.split(g),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var c=r[s];i&&(i+=", "),i+=-1!==c.indexOf("&")?c.replace(v,a):a+" "+c}return i}function n(e,t,n){if(n)return Object(c.a)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=Object(c.a)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,u=i,l=u.options.parent;for(var f in r){var d=-1!==f.indexOf("&"),p="@"===f[0];if(d||p){if(a=n(u,l,a),d){var h=t(f,u.selector);s||(s=e(l,o)),h=h.replace(m,s);var g=u.key+"-"+f;"replaceRule"in l?l.replaceRule(g,r[f],Object(c.a)({},a,{selector:h})):l.addRule(g,r[f],Object(c.a)({},a,{selector:h}))}else p&&l.addRule(f,{},a).addRule(u.key,r[f],{selector:u.selector});delete r[f]}}return r}}},b=/[A-Z]/g,w=/^ms-/,_={};function x(e){return"-"+e.toLowerCase()}var O=function(e){if(_.hasOwnProperty(e))return _[e];var t=e.replace(b,x);return _[e]=w.test(t)?"-"+t:t};function S(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:O(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(S):t.fallbacks=S(e.fallbacks)),t}var E=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=S(e[t]);return e}return S(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=O(t);return t===r?e:(n.prop(r,e),null)}}},C=r.f&&CSS?CSS.px:"px",k=r.f&&CSS?CSS.ms:"ms",T=r.f&&CSS?CSS.percent:"%";function j(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var P=j({"animation-delay":k,"animation-duration":k,"background-position":C,"background-position-x":C,"background-position-y":C,"background-size":C,border:C,"border-bottom":C,"border-bottom-left-radius":C,"border-bottom-right-radius":C,"border-bottom-width":C,"border-left":C,"border-left-width":C,"border-radius":C,"border-right":C,"border-right-width":C,"border-top":C,"border-top-left-radius":C,"border-top-right-radius":C,"border-top-width":C,"border-width":C,"border-block":C,"border-block-end":C,"border-block-end-width":C,"border-block-start":C,"border-block-start-width":C,"border-block-width":C,"border-inline":C,"border-inline-end":C,"border-inline-end-width":C,"border-inline-start":C,"border-inline-start-width":C,"border-inline-width":C,"border-start-start-radius":C,"border-start-end-radius":C,"border-end-start-radius":C,"border-end-end-radius":C,margin:C,"margin-bottom":C,"margin-left":C,"margin-right":C,"margin-top":C,"margin-block":C,"margin-block-end":C,"margin-block-start":C,"margin-inline":C,"margin-inline-end":C,"margin-inline-start":C,padding:C,"padding-bottom":C,"padding-left":C,"padding-right":C,"padding-top":C,"padding-block":C,"padding-block-end":C,"padding-block-start":C,"padding-inline":C,"padding-inline-end":C,"padding-inline-start":C,"mask-position-x":C,"mask-position-y":C,"mask-size":C,height:C,width:C,"min-height":C,"max-height":C,"min-width":C,"max-width":C,bottom:C,left:C,top:C,right:C,inset:C,"inset-block":C,"inset-block-end":C,"inset-block-start":C,"inset-inline":C,"inset-inline-end":C,"inset-inline-start":C,"box-shadow":C,"text-shadow":C,"column-gap":C,"column-rule":C,"column-rule-width":C,"column-width":C,"font-size":C,"font-size-delta":C,"letter-spacing":C,"text-decoration-thickness":C,"text-indent":C,"text-stroke":C,"text-stroke-width":C,"word-spacing":C,motion:C,"motion-offset":C,outline:C,"outline-offset":C,"outline-width":C,perspective:C,"perspective-origin-x":T,"perspective-origin-y":T,"transform-origin":T,"transform-origin-x":T,"transform-origin-y":T,"transform-origin-z":T,"transition-delay":k,"transition-duration":k,"vertical-align":C,"flex-basis":C,"shape-margin":C,size:C,gap:C,grid:C,"grid-gap":C,"row-gap":C,"grid-row-gap":C,"grid-column-gap":C,"grid-template-rows":C,"grid-template-columns":C,"grid-auto-rows":C,"grid-auto-columns":C,"box-shadow-x":C,"box-shadow-y":C,"box-shadow-blur":C,"box-shadow-spread":C,"font-line-height":C,"text-shadow-x":C,"text-shadow-y":C,"text-shadow-blur":C});function I(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=I(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=I(i,t[i],n);else for(var o in t)t[o]=I(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||P[e];return!a||0===t&&a===C?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}var R=function(e){void 0===e&&(e={});var t=j(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=I(r,e[r],t);return e},onChangeValue:function(e,n){return I(n,e,t)}}},A=n(186),M=n(50),D="",N="",L="",z="",B=A.a&&"ontouchstart"in document.documentElement;if(A.a){var F={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},W=document.createElement("p").style;for(var H in F)if(H+"Transform"in W){D=H,N=F[H];break}"Webkit"===D&&"msHyphens"in W&&(D="ms",N=F.ms,z="edge"),"Webkit"===D&&"-apple-trailing-word"in W&&(L="apple")}var V=D,U=N,q=L,G=z,K=B;var $={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===V?"-webkit-"+e:U+e)}},Z={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===V?U+"print-"+e:e)}},X=/[-\s]+(.)?/g;function Q(e,t){return t?t.toUpperCase():""}function Y(e){return e.replace(X,Q)}function J(e){return Y("-"+e)}var ee,te={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===V){if(Y("mask-image")in t)return e;if(V+J("mask-image")in t)return U+e}return e}},ne={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==q||K?e:U+e)}},re={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:U+e)}},ie={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:U+e)}},oe={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===V||"ms"===V&&"edge"!==G?U+e:e)}},ae={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===V||"ms"===V||"apple"===q?U+e:e)}},se={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===V?"WebkitColumn"+J(e)in t&&U+"column-"+e:"Moz"===V&&("page"+J(e)in t&&"page-"+e))}},ce={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===V)return e;var n=e.replace("-inline","");return V+J(n)in t&&U+n}},ue={supportedProperty:function(e,t){return Y(e)in t&&e}},le={supportedProperty:function(e,t){var n=J(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:V+n in t?U+e:"Webkit"!==V&&"Webkit"+n in t&&"-webkit-"+e}},fe={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===V?""+U+e:e)}},de={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===V?U+"scroll-chaining":e)}},pe={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},he={supportedProperty:function(e,t){var n=pe[e];return!!n&&(V+J(n)in t&&U+n)}},ge={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},ve=Object.keys(ge),me=function(e){return U+e},ye=[$,Z,te,ne,re,ie,oe,ae,se,ce,ue,le,fe,de,he,{supportedProperty:function(e,t,n){var r=n.multiple;if(ve.indexOf(e)>-1){var i=ge[e];if(!Array.isArray(i))return V+J(i)in t&&U+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(V+J(i[0])in t))return!1;return i.map(me)}return!1}}],be=ye.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),we=ye.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Object(M.a)(t.noPrefill)),e}),[]),_e={};if(A.a){ee=document.createElement("p");var xe=window.getComputedStyle(document.documentElement,"");for(var Oe in xe)isNaN(Oe)||(_e[xe[Oe]]=xe[Oe]);we.forEach((function(e){return delete _e[e]}))}function Se(e,t){if(void 0===t&&(t={}),!ee)return e;if(null!=_e[e])return _e[e];"transition"!==e&&"transform"!==e||(t[e]=e in ee.style);for(var n=0;n<be.length&&(_e[e]=be[n](e,ee.style,t),!_e[e]);n++);try{ee.style[e]=""}catch(e){return!1}return _e[e]}var Ee,Ce={},ke={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Te=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function je(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Se(t):", "+Se(n);return r||(t||n)}function Pe(e,t){var n=t;if(!Ee||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Ce[r])return Ce[r];try{Ee.style[e]=n}catch(e){return Ce[r]=!1,!1}if(ke[e])n=n.replace(Te,je);else if(""===Ee.style[e]&&("-ms-flex"===(n=U+n)&&(Ee.style[e]="-ms-flexbox"),Ee.style[e]=n,""===Ee.style[e]))return Ce[r]=!1,!1;return Ee.style[e]="",Ce[r]=n,Ce[r]}A.a&&(Ee=document.createElement("p"));var Ie=function(){function e(t){for(var n in t){var i=t[n];if("fallbacks"===n&&Array.isArray(i))t[n]=i.map(e);else{var o=!1,a=Se(n);a&&a!==n&&(o=!0);var s=!1,c=Pe(a,Object(r.g)(i));c&&c!==i&&(s=!0),(o||s)&&(o&&delete t[n],t[a||n]=c||i)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(n=t.at)[1]||"ms"===V?n:"@"+U+"keyframes"+n.substr(10)}var n},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Pe(t,Object(r.g)(e))||e}}};var Re=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}};function Ae(){return{plugins:[s(),h(),y(),E(),R(),"undefined"==typeof window?null:Ie(),Re()]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(4),i=n(1),o=n(0),a=n.n(o),s=n(59),c=n(1147),u={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},l=n(223),f=n(242),d=-1e9;function p(){return d+=1}n(70);var h=n(331);function g(e){var t="function"==typeof e;return{create:function(n,r){var o;try{o=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return o;var a=n.overrides[r],s=Object(i.a)({},o);return Object.keys(a).forEach((function(e){s[e]=Object(h.a)(s[e],a[e])})),s},options:{}}}var v={};function m(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Object(c.a)({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function y(e,t){var n=e.state,r=e.theme,o=e.stylesOptions,a=e.stylesCreator,l=e.name;if(!o.disableGeneration){var f=u.get(o.sheetsManager,a,r);f||(f={refs:0,staticSheet:null,dynamicStyles:null},u.set(o.sheetsManager,a,r,f));var d=Object(i.a)({},a.options,o,{theme:r,flip:"boolean"==typeof o.flip?o.flip:"rtl"===r.direction});d.generateId=d.serverGenerateClassName||d.generateClassName;var p=o.sheetsRegistry;if(0===f.refs){var h;o.sheetsCache&&(h=u.get(o.sheetsCache,a,r));var g=a.create(r,l);h||((h=o.jss.createStyleSheet(g,Object(i.a)({link:!1},d))).attach(),o.sheetsCache&&u.set(o.sheetsCache,a,r,h)),p&&p.add(h),f.staticSheet=h,f.dynamicStyles=Object(s.e)(g)}if(f.dynamicStyles){var v=o.jss.createStyleSheet(f.dynamicStyles,Object(i.a)({link:!0},d));v.update(t),v.attach(),n.dynamicSheet=v,n.classes=Object(c.a)({baseClasses:f.staticSheet.classes,newClasses:v.classes}),p&&p.add(v)}else n.classes=f.staticSheet.classes;f.refs+=1}}function b(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function w(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=u.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(u.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function _(e,t){var n,r=a.a.useRef([]),i=a.a.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),a.a.useEffect((function(){return function(){n&&n()}}),[i])}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,o=t.classNamePrefix,s=t.Component,c=t.defaultTheme,u=void 0===c?v:c,d=Object(r.a)(t,["name","classNamePrefix","Component","defaultTheme"]),h=g(e),x=n||o||"makeStyles";h.options={index:p(),name:n,meta:x,classNamePrefix:x};var O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(l.a)()||u,r=Object(i.a)({},a.a.useContext(f.a),d),o=a.a.useRef(),c=a.a.useRef();_((function(){var i={name:n,state:{},stylesCreator:h,stylesOptions:r,theme:t};return y(i,e),c.current=!1,o.current=i,function(){w(i)}}),[t,h]),a.a.useEffect((function(){c.current&&b(o.current,e),c.current=!0}));var p=m(o.current,e.classes,s);return p};return O}},,function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return E()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function f(){}function d(){}function p(){}var h={};s(h,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(S([])));v&&v!==t&&n.call(v,i)&&(h=v);var m=p.prototype=f.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var c=u(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return d.prototype=p,s(m,"constructor",p),s(p,"constructor",d),d.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),s(m,a,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=g(n(0)),i=(p(n(2)),g(n(26))),o=n(18),a=p(n(845)),s=p(n(569)),c=n(101),u=n(45),l=p(n(570)),f=p(n(852)),d=p(n(854));function p(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var y=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).state={annotationExportDialogOpen:!1,singleCanvasDialogOpen:!1},n.openCreateAnnotationCompanionWindow=n.openCreateAnnotationCompanionWindow.bind(m(n)),n.toggleCanvasExportDialog=n.toggleCanvasExportDialog.bind(m(n)),n.toggleSingleCanvasDialogOpen=n.toggleSingleCanvasDialogOpen.bind(m(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=i.prototype;return o.openCreateAnnotationCompanionWindow=function(e){(0,this.props.addCompanionWindow)("annotationCreation",{position:"right"})},o.toggleSingleCanvasDialogOpen=function(){var e=this.state.singleCanvasDialogOpen;this.setState({singleCanvasDialogOpen:!e})},o.toggleCanvasExportDialog=function(e){var t={annotationExportDialogOpen:!this.state.annotationExportDialogOpen};this.setState(t)},o.render=function(){var e=this.props,t=e.canvases,n=e.config,i=e.switchToSingleCanvasView,o=e.TargetComponent,u=e.targetProps,p=e.windowViewType,h=this.state,g=h.annotationExportDialogOpen,v=h.singleCanvasDialogOpen,m=n.annotation&&n.annotation.adapter("poke"),y=n.annotation&&m instanceof d.default&&n.annotation.exportLocalStorageAnnotations;return r.default.createElement("div",null,r.default.createElement(o,u),r.default.createElement(c.MiradorMenuButton,{"aria-label":"Create new annotation",onClick:"single"===p?this.openCreateAnnotationCompanionWindow:this.toggleSingleCanvasDialogOpen,size:"small"},r.default.createElement(a.default,null)),v&&r.default.createElement(l.default,{open:v,handleClose:this.toggleSingleCanvasDialogOpen,switchToSingleCanvasView:i}),y&&r.default.createElement(c.MiradorMenuButton,{"aria-label":"Export local annotations for visible items",onClick:this.toggleCanvasExportDialog,size:"small"},r.default.createElement(s.default,null)),y&&r.default.createElement(f.default,{canvases:t,config:n,handleClose:this.toggleCanvasExportDialog,open:g}))},i}(r.Component);y.propTypes={};var b={component:y,mapDispatchToProps:function(e,t){return{addCompanionWindow:function(n,r){return e(i.addCompanionWindow(t.targetProps.windowId,v({content:n},r)))},switchToSingleCanvasView:function(){return e(i.setWindowViewType(t.targetProps.windowId,"single"))}}},mapStateToProps:function(e,t){var n=t.targetProps.windowId;return{canvases:(0,u.getVisibleCanvases)(e,{windowId:n}),config:e.config,windowViewType:(0,o.getWindowViewType)(e,{windowId:n})}},mode:"wrap",target:"AnnotationSettings"};t.default=b},function(e,t,n){"use strict";
/** @license React v16.14.0
* 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 r=n(131),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,c=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,l=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,h=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function m(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function _(){}function x(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(m(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=w.prototype;var O=x.prototype=new _;O.constructor=x,r(O,w.prototype),O.isPureReactComponent=!0;var S={current:null},E=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)E.call(t,r)&&!C.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];i.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===i[r]&&(i[r]=c[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:S.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var j=/\/+/g,P=[];function I(e,t,n,r){if(P.length){var i=P.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function R(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function A(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case o:case a:c=!0}}if(c)return r(i,t,""===n?"."+M(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u<t.length;u++){var l=n+M(s=t[u],u);c+=e(s,l,r,i)}else if(null===t||"object"!=typeof t?l=null:l="function"==typeof(l=v&&t[v]||t["@@iterator"])?l:null,"function"==typeof l)for(t=l.call(t),u=0;!(s=t.next()).done;)c+=e(s=s.value,l=n+M(s,u++),r,i);else if("object"===s)throw r=""+t,Error(m(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return c}(e,"",t,n)}function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function N(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?L(e,r,n,(function(e){return e})):null!=e&&(T(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(j,"$&/")+"/")+n)),r.push(e))}function L(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(j,"$&/")+"/"),A(e,N,t=I(t,o,r,i)),R(t)}var z={current:null};function B(){var e=z.current;if(null===e)throw Error(m(321));return e}var F={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return L(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;A(e,D,t=I(null,null,t,n)),R(t)},count:function(e){return A(e,(function(){return null}),null)},toArray:function(e){var t=[];return L(e,t,null,(function(e){return e})),t},only:function(e){if(!T(e))throw Error(m(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=u,t.PureComponent=x,t.StrictMode=c,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,t.cloneElement=function(e,t,n){if(null==e)throw Error(m(267,e));var i=r({},e.props),a=e.key,s=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,c=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(l in t)E.call(t,l)&&!C.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==u?u[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){u=Array(l);for(var f=0;f<l;f++)u[f]=arguments[f+2];i.children=u}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:c}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:g,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return B().useCallback(e,t)},t.useContext=function(e,t){return B().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return B().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return B().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return B().useLayoutEffect(e,t)},t.useMemo=function(e,t){return B().useMemo(e,t)},t.useReducer=function(e,t,n){return B().useReducer(e,t,n)},t.useRef=function(e){return B().useRef(e)},t.useState=function(e){return B().useState(e)},t.version="16.14.0"},function(e,t,n){"use strict";var r=n(769);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array: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:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r=n(179),i=n(773),o=n(68),a=n(534),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,f=u.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:s).test(a(e))}},function(e,t,n){var r=n(197),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,i=n(774),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(78)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t){e.exports=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}},function(e,t,n){var r=n(395);e.exports=function(e,t,n,i){return r(e,(function(e,r,o){t(i,e,n(e),o)})),i}},function(e,t,n){var r=n(779)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===n(o[c],c,o))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(142),i=n(92);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(142),i=n(397),o=n(92),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(538)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(166);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},function(e,t,n){var r=n(787),i=n(819),o=n(547);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(400),i=n(403);e.exports=function(e,t,n,o){var a=n.length,s=a,c=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<s;){var l=(u=n[a])[0],f=e[l],d=u[1];if(c&&u[2]){if(void 0===f&&!(l in e))return!1}else{var p=new r;if(o)var h=o(f,d,l,e,t,p);if(!(void 0===h?i(d,f,3,o,p):h))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(284),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(284);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(284);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(284);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(283);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(283),i=n(401),o=n(402);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(799),i=n(283),o=n(401);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(800),i=n(801),o=n(802),a=n(803),s=n(804);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},function(e,t,n){var r=n(286);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(286),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(286),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(286);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(287);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(287);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(287);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(287);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t,n){var r=n(400),i=n(539),o=n(814),a=n(816),s=n(198),c=n(56),u=n(280),l=n(396),f="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,h,g){var v=c(e),m=c(t),y=v?"[object Array]":s(e),b=m?"[object Array]":s(t),w=(y="[object Arguments]"==y?f:y)==f,_=(b="[object Arguments]"==b?f:b)==f,x=y==b;if(x&&u(e)){if(!u(t))return!1;v=!0,w=!1}if(x&&!w)return g||(g=new r),v||l(e)?i(e,t,n,p,h,g):o(e,t,y,n,p,h,g);if(!(1&n)){var O=w&&d.call(e,"__wrapped__"),S=_&&d.call(t,"__wrapped__");if(O||S){var E=O?e.value():e,C=S?t.value():t;return g||(g=new r),h(E,C,n,p,g)}}return!!x&&(g||(g=new r),a(e,t,n,p,h,g))}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(197),i=n(540),o=n(285),a=n(539),s=n(815),c=n(406),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,f,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var h=1&r;if(p||(p=c),e.size!=t.size&&!h)return!1;var g=d.get(e);if(g)return g==t;r|=2,d.set(e,t);var v=a(p(e),p(t),r,u,f,d);return d.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(541),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var c=1&n,u=r(e),l=u.length;if(l!=r(t).length&&!c)return!1;for(var f=l;f--;){var d=u[f];if(!(c?d in t:i.call(t,d)))return!1}var p=s.get(e),h=s.get(t);if(p&&h)return p==t&&h==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=c;++f<l;){var m=e[d=u[f]],y=t[d];if(o)var b=c?o(y,m,d,t,e,s):o(m,y,d,e,t,s);if(!(void 0===b?m===y||a(m,y,n,o,s):b)){g=!1;break}v||(v="constructor"==d)}if(g&&!v){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(g=!1)}return s.delete(e),s.delete(t),g}},function(e,t,n){var r=n(164)(n(78),"DataView");e.exports=r},function(e,t,n){var r=n(164)(n(78),"Promise");e.exports=r},function(e,t,n){var r=n(546),i=n(165);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},function(e,t,n){var r=n(403),i=n(548),o=n(824),a=n(410),s=n(546),c=n(547),u=n(168);e.exports=function(e,t){return a(e)&&s(t)?c(u(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},function(e,t,n){var r=n(822);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(402);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},function(e,t,n){var r=n(197),i=n(143),o=n(56),a=n(201),s=r?r.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(825),i=n(826);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(200),i=n(279),o=n(56),a=n(227),s=n(397),c=n(168);e.exports=function(e,t,n){for(var u=-1,l=(t=r(t,e)).length,f=!1;++u<l;){var d=c(t[u]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++u!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(d,l)&&(o(e)||i(e))}},function(e,t,n){var r=n(828),i=n(829),o=n(410),a=n(168);e.exports=function(e){return o(e)?r(a(e)):i(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(199);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(197),i=n(279),o=n(56),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},function(e,t,n){var r=n(832),i=n(532),o=n(202),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){var r=n(834),i=n(835),o=n(836);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},function(e,t){e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(544),i=n(229),o=n(406),a=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=a},function(e,t,n){var r=n(395);e.exports=function(e,t){var n=[];return r(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}},function(e,t,n){"use strict";var r=n(840),i=n(841);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=b(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),f=["%","/","?",";","#"].concat(l),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(842);function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var b=e=u.join(s);if(b=b.trim(),!n&&1===e.split("#").length){var w=c.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=a.exec(b);if(_){var x=(_=_[0]).toLowerCase();this.protocol=x,b=b.substr(_.length)}if(n||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var O="//"===b.substr(0,2);!O||_&&v[_]||(b=b.substr(2),this.slashes=!0)}if(!v[_]&&(O||_&&!m[_])){for(var S,E,C=-1,k=0;k<d.length;k++){-1!==(T=b.indexOf(d[k]))&&(-1===C||T<C)&&(C=T)}-1!==(E=-1===C?b.lastIndexOf("@"):b.lastIndexOf("@",C))&&(S=b.slice(0,E),b=b.slice(E+1),this.auth=decodeURIComponent(S)),C=-1;for(k=0;k<f.length;k++){var T;-1!==(T=b.indexOf(f[k]))&&(-1===C||T<C)&&(C=T)}-1===C&&(C=b.length),this.host=b.slice(0,C),b=b.slice(C),this.parseHost(),this.hostname=this.hostname||"";var j="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!j)for(var P=this.hostname.split(/\./),I=(k=0,P.length);k<I;k++){var R=P[k];if(R&&!R.match(p)){for(var A="",M=0,D=R.length;M<D;M++)R.charCodeAt(M)>127?A+="x":A+=R[M];if(!A.match(p)){var N=P.slice(0,k),L=P.slice(k+1),z=R.match(h);z&&(N.push(z[1]),L.unshift(z[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var B=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+B,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[x])for(k=0,I=l.length;k<I;k++){var W=l[k];if(-1!==b.indexOf(W)){var H=encodeURIComponent(W);H===W&&(H=escape(W)),b=b.split(W).join(H)}}var V=b.indexOf("#");-1!==V&&(this.hash=b.substr(V),b=b.slice(0,V));var U=b.indexOf("?");if(-1!==U?(this.search=b.substr(U),this.query=b.substr(U+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,U)):t&&(this.search="",this.query={}),b&&(this.pathname=b),m[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){B=this.pathname||"";var q=this.search||"";this.path=B+q}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=y.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var l=c[u];"protocol"!==l&&(n[l]=e[l])}return m[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!m[e.protocol]){for(var f=Object.keys(e),d=0;d<f.length;d++){var p=f[d];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||v[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||"",y=n.search||"";n.path=g+y}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||b||n.host&&e.pathname,x=_,O=n.pathname&&n.pathname.split("/")||[],S=(h=e.pathname&&e.pathname.split("/")||[],n.protocol&&!m[n.protocol]);if(S&&(n.hostname="",n.port=null,n.host&&(""===O[0]?O[0]=n.host:O.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),_=_&&(""===h[0]||""===O[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,O=h;else if(h.length)O||(O=[]),O.pop(),O=O.concat(h),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(S)n.hostname=n.host=O.shift(),(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!O.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=O.slice(-1)[0],C=(n.host||e.host||O.length>1)&&("."===E||".."===E)||""===E,k=0,T=O.length;T>=0;T--)"."===(E=O[T])?O.splice(T,1):".."===E?(O.splice(T,1),k++):k&&(O.splice(T,1),k--);if(!_&&!x)for(;k--;k)O.unshift("..");!_||""===O[0]||O[0]&&"/"===O[0].charAt(0)||O.unshift(""),C&&"/"!==O.join("/").substr(-1)&&O.push("");var j,P=""===O[0]||O[0]&&"/"===O[0].charAt(0);S&&(n.hostname=n.host=P?"":O.length?O.shift():"",(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift()));return(_=_||n.host&&O.length)&&!P&&O.unshift(""),O.length?n.pathname=O.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,c=2147483647,u=/^xn--/,l=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,h=String.fromCharCode;function g(e){throw new RangeError(d[e])}function v(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function m(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+v((e=e.replace(f,".")).split("."),t).join(".")}function y(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function b(e){return v(e,(function(e){var t="";return e>65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=h(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function x(e){var t,n,r,i,o,a,s,u,l,f,d,h=[],v=e.length,m=0,y=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&g("not-basic"),h.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<v;){for(o=m,a=1,s=36;i>=v&&g("invalid-input"),((u=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||u>p((c-m)/a))&&g("overflow"),m+=u*a,!(u<(l=s<=w?1:s>=w+26?26:s-w));s+=36)a>p(c/(f=36-l))&&g("overflow"),a*=f;w=_(m-o,t=h.length+1,0==o),p(m/t)>c-y&&g("overflow"),y+=p(m/t),m%=t,h.splice(m++,0,y)}return b(h)}function O(e){var t,n,r,i,o,a,s,u,l,f,d,v,m,b,x,O=[];for(v=(e=y(e)).length,t=128,n=0,o=72,a=0;a<v;++a)(d=e[a])<128&&O.push(h(d));for(r=i=O.length,i&&O.push("-");r<v;){for(s=c,a=0;a<v;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>p((c-n)/(m=r+1))&&g("overflow"),n+=(s-t)*m,t=s,a=0;a<v;++a)if((d=e[a])<t&&++n>c&&g("overflow"),d==t){for(u=n,l=36;!(u<(f=l<=o?1:l>=o+26?26:l-o));l+=36)x=u-f,b=36-f,O.push(h(w(f+x%b,0))),u=p(x/b);O.push(h(w(u,0))),o=_(n,m,r==i),n=0,++r}++n,++t}return O.join("")}s={version:"1.4.1",ucs2:{decode:y,encode:b},decode:x,encode:O,toASCII:function(e){return m(e,(function(e){return l.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return m(e,(function(e){return u.test(e)?x(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(281)(e),n(91))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(843),t.encode=t.stringify=n(844)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var f,d,p,h,g=e[l].replace(s,"%20"),v=g.indexOf(n);v>=0?(f=g.substr(0,v),d=g.substr(v+1)):(f=g,d=""),p=decodeURIComponent(f),h=decodeURIComponent(d),r(a,p)?i(a[p])?a[p].push(h):a[p]=[a[p],h]:a[p]=h}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"}),"AddBox");t.default=a},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";e.exports=n(848)},function(e,t,n){"use strict";
/** @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 r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case f:case d:case a:case c:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case p:case m:case v:case u:return e;default:return t}}case o:return t}}}function O(e){return x(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=u,t.Element=i,t.ForwardRef=p,t.Fragment=a,t.Lazy=m,t.Memo=v,t.Portal=o,t.Profiler=c,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||x(e)===f},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===c},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===c||e===s||e===h||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||e.$$typeof===w||e.$$typeof===_||e.$$typeof===y)},t.typeOf=x},function(e,t,n){"use strict";
/** @license React v16.14.0
* 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 r=n(0),i=n(131),o=n(850);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(e,t,n,r,i,o,a,s,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var c=!1,u=null,l=!1,f=null,d={onError:function(e){c=!0,u=e}};function p(e,t,n,r,i,o,a,l,f){c=!1,u=null,s.apply(d,arguments)}var h=null,g=null,v=null;function m(e,t,n){var r=e.type||"unknown-event";e.currentTarget=v(n),function(e,t,n,r,i,o,s,d,h){if(p.apply(this,arguments),c){if(!c)throw Error(a(198));var g=u;c=!1,u=null,l||(l=!0,f=g)}}(r,t,void 0,e),e.currentTarget=null}var y=null,b={};function w(){if(y)for(var e in b){var t=b[e],n=y.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!x[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in x[n]=t,n=t.eventTypes){var i=void 0,o=n[r],s=t,c=r;if(O.hasOwnProperty(c))throw Error(a(99,c));O[c]=o;var u=o.phasedRegistrationNames;if(u){for(i in u)u.hasOwnProperty(i)&&_(u[i],s,c);i=!0}else o.registrationName?(_(o.registrationName,s,c),i=!0):i=!1;if(!i)throw Error(a(98,r,e))}}}}function _(e,t,n){if(S[e])throw Error(a(100,e));S[e]=t,E[e]=t.eventTypes[n].dependencies}var x=[],O={},S={},E={};function C(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var k=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),T=null,j=null,P=null;function I(e){if(e=g(e)){if("function"!=typeof T)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),T(e.stateNode,e.type,t))}}function R(e){j?P?P.push(e):P=[e]:j=e}function A(){if(j){var e=j,t=P;if(P=j=null,I(e),t)for(e=0;e<t.length;e++)I(t[e])}}function M(e,t){return e(t)}function D(e,t,n,r,i){return e(t,n,r,i)}function N(){}var L=M,z=!1,B=!1;function F(){null===j&&null===P||(N(),A())}function W(e,t,n){if(B)return e(t,n);B=!0;try{return L(e,t,n)}finally{B=!1,F()}}var H=/^[: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]*$/,V=Object.prototype.hasOwnProperty,U={},q={};function G(e,t,n,r,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var K={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){K[e]=new G(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];K[t]=new G(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){K[e]=new G(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){K[e]=new G(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){K[e]=new G(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){K[e]=new G(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){K[e]=new G(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){K[e]=new G(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){K[e]=new G(e,5,!1,e.toLowerCase(),null,!1)}));var $=/[\-:]([a-z])/g;function Z(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($,Z);K[t]=new G(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace($,Z);K[t]=new G(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace($,Z);K[t]=new G(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){K[e]=new G(e,1,!1,e.toLowerCase(),null,!1)})),K.xlinkHref=new G("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){K[e]=new G(e,1,!1,e.toLowerCase(),null,!0)}));var X=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Q(e,t,n,r){var i=K.hasOwnProperty(t)?K[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!V.call(q,e)||!V.call(U,e)&&(H.test(e)?q[e]=!0:(U[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}X.hasOwnProperty("ReactCurrentDispatcher")||(X.ReactCurrentDispatcher={current:null}),X.hasOwnProperty("ReactCurrentBatchConfig")||(X.ReactCurrentBatchConfig={suspense:null});var Y=/^(.*)[\\\/]/,J="function"==typeof Symbol&&Symbol.for,ee=J?Symbol.for("react.element"):60103,te=J?Symbol.for("react.portal"):60106,ne=J?Symbol.for("react.fragment"):60107,re=J?Symbol.for("react.strict_mode"):60108,ie=J?Symbol.for("react.profiler"):60114,oe=J?Symbol.for("react.provider"):60109,ae=J?Symbol.for("react.context"):60110,se=J?Symbol.for("react.concurrent_mode"):60111,ce=J?Symbol.for("react.forward_ref"):60112,ue=J?Symbol.for("react.suspense"):60113,le=J?Symbol.for("react.suspense_list"):60120,fe=J?Symbol.for("react.memo"):60115,de=J?Symbol.for("react.lazy"):60116,pe=J?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function ge(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ve(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case ie:return"Profiler";case re:return"StrictMode";case ue:return"Suspense";case le:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case oe:return"Context.Provider";case ce:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ve(e.type);case pe:return ve(e.render);case de:if(e=1===e._status?e._result:null)return ve(e)}return null}function me(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=ve(e.type);n=null,r&&(n=ve(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(Y,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function xe(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Oe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Se(e,t){null!=(t=t.checked)&&Q(e,"checked",t,!1)}function Ee(e,t){Se(e,t);var n=ye(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ke(e,t.type,n):t.hasOwnProperty("defaultValue")&&ke(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ce(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ke(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Te(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function je(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ye(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Pe(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function Re(e,t){var n=ye(t.value),r=ye(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Me="http://www.w3.org/1999/xhtml",De="http://www.w3.org/2000/svg";function Ne(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ne(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ze,Be=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==De||"innerHTML"in e)e.innerHTML=t;else{for((ze=ze||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ze.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function We(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var He={animationend:We("Animation","AnimationEnd"),animationiteration:We("Animation","AnimationIteration"),animationstart:We("Animation","AnimationStart"),transitionend:We("Transition","TransitionEnd")},Ve={},Ue={};function qe(e){if(Ve[e])return Ve[e];if(!He[e])return e;var t,n=He[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ue)return Ve[e]=n[t];return e}k&&(Ue=document.createElement("div").style,"AnimationEvent"in window||(delete He.animationend.animation,delete He.animationiteration.animation,delete He.animationstart.animation),"TransitionEvent"in window||delete He.transitionend.transition);var Ge=qe("animationend"),Ke=qe("animationiteration"),$e=qe("animationstart"),Ze=qe("transitionend"),Xe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Qe=new("function"==typeof WeakMap?WeakMap:Map);function Ye(e){var t=Qe.get(e);return void 0===t&&(t=new Map,Qe.set(e,t)),t}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if(Je(e)!==e)throw Error(a(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return tt(i),e;if(o===r)return tt(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function it(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var ot=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)m(e,t[r],n[r]);else t&&m(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function st(e){if(null!==e&&(ot=rt(ot,e)),e=ot,ot=null,e){if(it(e,at),ot)throw Error(a(95));if(l)throw e=f,l=!1,f=null,e}}function ct(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ut(e){if(!k)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var lt=[];function ft(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>lt.length&&lt.push(e)}function dt(e,t,n,r){if(lt.length){var i=lt.pop();return i.topLevelType=e,i.eventSystemFlags=r,i.nativeEvent=t,i.targetInst=n,i}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=kn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=ct(e.nativeEvent);r=e.topLevelType;var o=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,c=0;c<x.length;c++){var u=x[c];u&&(u=u.extractEvents(r,t,o,i,a))&&(s=rt(s,u))}st(s)}}function ht(e,t,n){if(!n.has(e)){switch(e){case"scroll":$t(t,"scroll",!0);break;case"focus":case"blur":$t(t,"focus",!0),$t(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ut(e)&&$t(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Xe.indexOf(e)&&Kt(e,t)}n.set(e,null)}}var gt,vt,mt,yt=!1,bt=[],wt=null,_t=null,xt=null,Ot=new Map,St=new Map,Et=[],Ct="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),kt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Tt(e,t,n,r,i){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:i,container:r}}function jt(e,t){switch(e){case"focus":case"blur":wt=null;break;case"dragenter":case"dragleave":_t=null;break;case"mouseover":case"mouseout":xt=null;break;case"pointerover":case"pointerout":Ot.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":St.delete(t.pointerId)}}function Pt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=Tt(t,n,r,i,o),null!==t&&(null!==(t=Tn(t))&&vt(t)),e):(e.eventSystemFlags|=r,e)}function It(e){var t=kn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void o.unstable_runWithPriority(e.priority,(function(){mt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Rt(e){if(null!==e.blockedOn)return!1;var t=Yt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Tn(t);return null!==n&&vt(n),e.blockedOn=t,!1}return!0}function At(e,t,n){Rt(e)&&n.delete(t)}function Mt(){for(yt=!1;0<bt.length;){var e=bt[0];if(null!==e.blockedOn){null!==(e=Tn(e.blockedOn))&&gt(e);break}var t=Yt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:bt.shift()}null!==wt&&Rt(wt)&&(wt=null),null!==_t&&Rt(_t)&&(_t=null),null!==xt&&Rt(xt)&&(xt=null),Ot.forEach(At),St.forEach(At)}function Dt(e,t){e.blockedOn===t&&(e.blockedOn=null,yt||(yt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Mt)))}function Nt(e){function t(t){return Dt(t,e)}if(0<bt.length){Dt(bt[0],e);for(var n=1;n<bt.length;n++){var r=bt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==wt&&Dt(wt,e),null!==_t&&Dt(_t,e),null!==xt&&Dt(xt,e),Ot.forEach(t),St.forEach(t),n=0;n<Et.length;n++)(r=Et[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Et.length&&null===(n=Et[0]).blockedOn;)It(n),null===n.blockedOn&&Et.shift()}var Lt={},zt=new Map,Bt=new Map,Ft=["abort","abort",Ge,"animationEnd",Ke,"animationIteration",$e,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ze,"transitionEnd","waiting","waiting"];function Wt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:t},Bt.set(r,t),zt.set(r,o),Lt[i]=o}}Wt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Wt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Wt(Ft,2);for(var Ht="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Vt=0;Vt<Ht.length;Vt++)Bt.set(Ht[Vt],0);var Ut=o.unstable_UserBlockingPriority,qt=o.unstable_runWithPriority,Gt=!0;function Kt(e,t){$t(t,e,!1)}function $t(e,t,n){var r=Bt.get(t);switch(void 0===r?2:r){case 0:r=Zt.bind(null,t,1,e);break;case 1:r=Xt.bind(null,t,1,e);break;default:r=Qt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Zt(e,t,n,r){z||N();var i=Qt,o=z;z=!0;try{D(i,e,t,n,r)}finally{(z=o)||F()}}function Xt(e,t,n,r){qt(Ut,Qt.bind(null,e,t,n,r))}function Qt(e,t,n,r){if(Gt)if(0<bt.length&&-1<Ct.indexOf(e))e=Tt(null,e,t,n,r),bt.push(e);else{var i=Yt(e,t,n,r);if(null===i)jt(e,r);else if(-1<Ct.indexOf(e))e=Tt(i,e,t,n,r),bt.push(e);else if(!function(e,t,n,r,i){switch(t){case"focus":return wt=Pt(wt,e,t,n,r,i),!0;case"dragenter":return _t=Pt(_t,e,t,n,r,i),!0;case"mouseover":return xt=Pt(xt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ot.set(o,Pt(Ot.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,St.set(o,Pt(St.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r)){jt(e,r),e=dt(e,r,null,t);try{W(pt,e)}finally{ft(e)}}}}function Yt(e,t,n,r){if(null!==(n=kn(n=ct(r)))){var i=Je(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=et(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}e=dt(e,r,n,t);try{W(pt,e)}finally{ft(e)}return null}var Jt={animationIterationCount:!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},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=tn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Jt).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var rn=i({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 on(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function an(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sn=Me;function cn(e,t){var n=Ye(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=E[t];for(var r=0;r<t.length;r++)ht(t[r],e,n)}function un(){}function ln(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function fn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dn(e,t){var n,r=fn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fn(r)}}function pn(){for(var e=window,t=ln();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=ln((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gn=null,vn=null;function mn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function yn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var bn="function"==typeof setTimeout?setTimeout:void 0,wn="function"==typeof clearTimeout?clearTimeout:void 0;function _n(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function xn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var On=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+On,En="__reactEventHandlers$"+On,Cn="__reactContainere$"+On;function kn(e){var t=e[Sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cn]||n[Sn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=xn(e);null!==e;){if(n=e[Sn])return n;e=xn(e)}return t}n=(e=n).parentNode}return null}function Tn(e){return!(e=e[Sn]||e[Cn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function jn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Pn(e){return e[En]||null}function In(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Rn(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function An(e,t,n){(t=Rn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Mn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=In(t);for(t=n.length;0<t--;)An(n[t],"captured",e);for(t=0;t<n.length;t++)An(n[t],"bubbled",e)}}function Dn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Rn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Nn(e){e&&e.dispatchConfig.registrationName&&Dn(e._targetInst,null,e)}function Ln(e){it(e,Mn)}var zn=null,Bn=null,Fn=null;function Wn(){if(Fn)return Fn;var e,t,n=Bn,r=n.length,i="value"in zn?zn.value:zn.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Fn=i.slice(e,1<t?1-t:void 0)}function Hn(){return!0}function Vn(){return!1}function Un(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Hn:Vn,this.isPropagationStopped=Vn,this}function qn(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Gn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Kn(e){e.eventPool=[],e.getPooled=qn,e.release=Gn}i(Un.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Hn)},persist:function(){this.isPersistent=Hn},isPersistent:Vn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Vn,this._dispatchInstances=this._dispatchListeners=null}}),Un.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Un.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,Kn(n),n},Kn(Un);var $n=Un.extend({data:null}),Zn=Un.extend({data:null}),Xn=[9,13,27,32],Qn=k&&"CompositionEvent"in window,Yn=null;k&&"documentMode"in document&&(Yn=document.documentMode);var Jn=k&&"TextEvent"in window&&!Yn,er=k&&(!Qn||Yn&&8<Yn&&11>=Yn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function ir(e,t){switch(e){case"keyup":return-1!==Xn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function or(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ar=!1;var sr={eventTypes:nr,extractEvents:function(e,t,n,r){var i;if(Qn)e:{switch(e){case"compositionstart":var o=nr.compositionStart;break e;case"compositionend":o=nr.compositionEnd;break e;case"compositionupdate":o=nr.compositionUpdate;break e}o=void 0}else ar?ir(e,n)&&(o=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=nr.compositionStart);return o?(er&&"ko"!==n.locale&&(ar||o!==nr.compositionStart?o===nr.compositionEnd&&ar&&(i=Wn()):(Bn="value"in(zn=r)?zn.value:zn.textContent,ar=!0)),o=$n.getPooled(o,t,n,r),i?o.data=i:null!==(i=or(n))&&(o.data=i),Ln(o),i=o):i=null,(e=Jn?function(e,t){switch(e){case"compositionend":return or(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(ar)return"compositionend"===e||!Qn&&ir(e,t)?(e=Wn(),Fn=Bn=zn=null,ar=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return er&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Zn.getPooled(nr.beforeInput,t,n,r)).data=e,Ln(t)):t=null,null===i?t:null===t?i:[i,t]}},cr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!cr[e.type]:"textarea"===t}var lr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function fr(e,t,n){return(e=Un.getPooled(lr.change,e,t,n)).type="change",R(n),Ln(e),e}var dr=null,pr=null;function hr(e){st(e)}function gr(e){if(_e(jn(e)))return e}function vr(e,t){if("change"===e)return t}var mr=!1;function yr(){dr&&(dr.detachEvent("onpropertychange",br),pr=dr=null)}function br(e){if("value"===e.propertyName&&gr(pr))if(e=fr(pr,e,ct(e)),z)st(e);else{z=!0;try{M(hr,e)}finally{z=!1,F()}}}function wr(e,t,n){"focus"===e?(yr(),pr=n,(dr=t).attachEvent("onpropertychange",br)):"blur"===e&&yr()}function _r(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return gr(pr)}function xr(e,t){if("click"===e)return gr(t)}function Or(e,t){if("input"===e||"change"===e)return gr(t)}k&&(mr=ut("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:lr,_isInputEventSupported:mr,extractEvents:function(e,t,n,r){var i=t?jn(t):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=vr;else if(ur(i))if(mr)a=Or;else{a=_r;var s=wr}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=xr);if(a&&(a=a(e,t)))return fr(a,n,r);s&&s(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&ke(i,"number",i.value)}},Er=Un.extend({view:null,detail:null}),Cr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cr[e])&&!!t[e]}function Tr(){return kr}var jr=0,Pr=0,Ir=!1,Rr=!1,Ar=Er.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Tr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=jr;return jr=e.screenX,Ir?"mousemove"===e.type?e.screenX-t:0:(Ir=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Pr;return Pr=e.screenY,Rr?"mousemove"===e.type?e.screenY-t:0:(Rr=!0,0)}}),Mr=Ar.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Dr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Nr={eventTypes:Dr,extractEvents:function(e,t,n,r,i){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&0==(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?kn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var s=Ar,c=Dr.mouseLeave,u=Dr.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Mr,c=Dr.pointerLeave,u=Dr.pointerEnter,l="pointer");if(e=null==a?o:jn(a),o=null==t?o:jn(t),(c=s.getPooled(c,a,n,r)).type=l+"leave",c.target=e,c.relatedTarget=o,(n=s.getPooled(u,t,n,r)).type=l+"enter",n.target=o,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(u=l,a=0,e=s=r;e;e=In(e))a++;for(e=0,t=u;t;t=In(t))e++;for(;0<a-e;)s=In(s),a--;for(;0<e-a;)u=In(u),e--;for(;a--;){if(s===u||s===u.alternate)break e;s=In(s),u=In(u)}s=null}else s=null;for(u=s,s=[];r&&r!==u&&(null===(a=r.alternate)||a!==u);)s.push(r),r=In(r);for(r=[];l&&l!==u&&(null===(a=l.alternate)||a!==u);)r.push(l),l=In(l);for(l=0;l<s.length;l++)Dn(s[l],"bubbled",c);for(l=r.length;0<l--;)Dn(r[l],"captured",n);return 0==(64&i)?[c]:[c,n]}};var Lr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},zr=Object.prototype.hasOwnProperty;function Br(e,t){if(Lr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!zr.call(t,n[r])||!Lr(e[n[r]],t[n[r]]))return!1;return!0}var Fr=k&&"documentMode"in document&&11>=document.documentMode,Wr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Hr=null,Vr=null,Ur=null,qr=!1;function Gr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qr||null==Hr||Hr!==ln(n)?null:("selectionStart"in(n=Hr)&&hn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Ur&&Br(Ur,n)?null:(Ur=n,(e=Un.getPooled(Wr.select,Vr,e,t)).type="select",e.target=Hr,Ln(e),e))}var Kr={eventTypes:Wr,extractEvents:function(e,t,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{i=Ye(i),o=E.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break e}i=!0}o=!i}if(o)return null;switch(i=t?jn(t):window,e){case"focus":(ur(i)||"true"===i.contentEditable)&&(Hr=i,Vr=t,Ur=null);break;case"blur":Ur=Vr=Hr=null;break;case"mousedown":qr=!0;break;case"contextmenu":case"mouseup":case"dragend":return qr=!1,Gr(n,r);case"selectionchange":if(Fr)break;case"keydown":case"keyup":return Gr(n,r)}return null}},$r=Un.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Zr=Un.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xr=Er.extend({relatedTarget:null});function Qr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Yr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ei=Er.extend({key:function(e){if(e.key){var t=Yr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Qr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Jr[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Tr,charCode:function(e){return"keypress"===e.type?Qr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Qr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ti=Ar.extend({dataTransfer:null}),ni=Er.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Tr}),ri=Un.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ii=Ar.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),oi={eventTypes:Lt,extractEvents:function(e,t,n,r){var i=zt.get(e);if(!i)return null;switch(e){case"keypress":if(0===Qr(n))return null;case"keydown":case"keyup":e=ei;break;case"blur":case"focus":e=Xr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Ar;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ti;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ni;break;case Ge:case Ke:case $e:e=$r;break;case Ze:e=ri;break;case"scroll":e=Er;break;case"wheel":e=ii;break;case"copy":case"cut":case"paste":e=Zr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Mr;break;default:e=Un}return Ln(t=e.getPooled(i,t,n,r)),t}};if(y)throw Error(a(101));y=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=Pn,g=Tn,v=jn,C({SimpleEventPlugin:oi,EnterLeaveEventPlugin:Nr,ChangeEventPlugin:Sr,SelectEventPlugin:Kr,BeforeInputEventPlugin:sr});var ai=[],si=-1;function ci(e){0>si||(e.current=ai[si],ai[si]=null,si--)}function ui(e,t){si++,ai[si]=e.current,e.current=t}var li={},fi={current:li},di={current:!1},pi=li;function hi(e,t){var n=e.type.contextTypes;if(!n)return li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function gi(e){return null!=(e=e.childContextTypes)}function vi(){ci(di),ci(fi)}function mi(e,t,n){if(fi.current!==li)throw Error(a(168));ui(fi,t),ui(di,n)}function yi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,ve(t)||"Unknown",o));return i({},n,{},r)}function bi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,pi=fi.current,ui(fi,e),ui(di,di.current),!0}function wi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=yi(e,t,pi),r.__reactInternalMemoizedMergedChildContext=e,ci(di),ci(fi),ui(fi,e)):ci(di),ui(di,n)}var _i=o.unstable_runWithPriority,xi=o.unstable_scheduleCallback,Oi=o.unstable_cancelCallback,Si=o.unstable_requestPaint,Ei=o.unstable_now,Ci=o.unstable_getCurrentPriorityLevel,ki=o.unstable_ImmediatePriority,Ti=o.unstable_UserBlockingPriority,ji=o.unstable_NormalPriority,Pi=o.unstable_LowPriority,Ii=o.unstable_IdlePriority,Ri={},Ai=o.unstable_shouldYield,Mi=void 0!==Si?Si:function(){},Di=null,Ni=null,Li=!1,zi=Ei(),Bi=1e4>zi?Ei:function(){return Ei()-zi};function Fi(){switch(Ci()){case ki:return 99;case Ti:return 98;case ji:return 97;case Pi:return 96;case Ii:return 95;default:throw Error(a(332))}}function Wi(e){switch(e){case 99:return ki;case 98:return Ti;case 97:return ji;case 96:return Pi;case 95:return Ii;default:throw Error(a(332))}}function Hi(e,t){return e=Wi(e),_i(e,t)}function Vi(e,t,n){return e=Wi(e),xi(e,t,n)}function Ui(e){return null===Di?(Di=[e],Ni=xi(ki,Gi)):Di.push(e),Ri}function qi(){if(null!==Ni){var e=Ni;Ni=null,Oi(e)}Gi()}function Gi(){if(!Li&&null!==Di){Li=!0;var e=0;try{var t=Di;Hi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Di=null}catch(t){throw null!==Di&&(Di=Di.slice(e+1)),xi(ki,qi),t}finally{Li=!1}}}function Ki(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function $i(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Zi={current:null},Xi=null,Qi=null,Yi=null;function Ji(){Yi=Qi=Xi=null}function eo(e){var t=Zi.current;ci(Zi),e.type._context._currentValue=t}function to(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function no(e,t){Xi=e,Yi=Qi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Pa=!0),e.firstContext=null)}function ro(e,t){if(Yi!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Yi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Qi){if(null===Xi)throw Error(a(308));Qi=t,Xi.dependencies={expirationTime:0,firstContext:t,responders:null}}else Qi=Qi.next=t;return e._currentValue}var io=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function so(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function co(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function uo(e,t){var n=e.alternate;null!==n&&ao(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function lo(e,t,n,r){var o=e.updateQueue;io=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var c=a.next;a.next=s.next,s.next=c}a=s,o.shared.pending=null,null!==(c=e.alternate)&&(null!==(c=c.updateQueue)&&(c.baseQueue=s))}if(null!==a){c=a.next;var u=o.baseState,l=0,f=null,d=null,p=null;if(null!==c)for(var h=c;;){if((s=h.expirationTime)<r){var g={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===p?(d=p=g,f=u):p=p.next=g,s>l&&(l=s)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),oc(s,h.suspenseConfig);e:{var v=e,m=h;switch(s=t,g=n,m.tag){case 1:if("function"==typeof(v=m.payload)){u=v.call(g,u,s);break e}u=v;break e;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null==(s="function"==typeof(v=m.payload)?v.call(g,u,s):v))break e;u=i({},u,s);break e;case 2:io=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=o.effects)?o.effects=[h]:s.push(h))}if(null===(h=h.next)||h===c){if(null===(s=o.shared.pending))break;h=a.next=s.next,s.next=c,o.baseQueue=a=s,o.shared.pending=null}}null===p?f=u:p.next=d,o.baseState=f,o.baseQueue=p,ac(l),e.expirationTime=l,e.memoizedState=u}}function fo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!=typeof r)throw Error(a(191,r));r.call(i)}}}var po=X.ReactCurrentBatchConfig,ho=(new r.Component).refs;function go(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var vo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Gs(),i=po.suspense;(i=so(r=Ks(r,e,i),i)).payload=t,null!=n&&(i.callback=n),co(e,i),$s(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Gs(),i=po.suspense;(i=so(r=Ks(r,e,i),i)).tag=1,i.payload=t,null!=n&&(i.callback=n),co(e,i),$s(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Gs(),r=po.suspense;(r=so(n=Ks(n,e,r),r)).tag=2,null!=t&&(r.callback=t),co(e,r),$s(e,n)}};function mo(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Br(n,r)||!Br(i,o))}function yo(e,t,n){var r=!1,i=li,o=t.contextType;return"object"==typeof o&&null!==o?o=ro(o):(i=gi(t)?pi:fi.current,o=(r=null!=(r=t.contextTypes))?hi(e,i):li),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=vo,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function bo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vo.enqueueReplaceState(t,t.state,null)}function wo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ho,oo(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=ro(o):(o=gi(t)?pi:fi.current,i.context=hi(e,o)),lo(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(go(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&vo.enqueueReplaceState(i,i.state,null),lo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var _o=Array.isArray;function xo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===ho&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Oo(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function So(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Cc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=jc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=xo(e,t,n),r.return=e,r):((r=kc(n.type,n.key,n.props,null,e.mode,r)).ref=xo(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Pc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Tc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=jc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=kc(t.type,t.key,t.props,null,e.mode,n)).ref=xo(e,null,t),n.return=e,n;case te:return(t=Pc(t,e.mode,n)).return=e,t}if(_o(t)||ge(t))return(t=Tc(t,e.mode,n,null)).return=e,t;Oo(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===i?n.type===ne?f(e,t,n.props.children,r,i):u(e,t,n,r):null;case te:return n.key===i?l(e,t,n,r):null}if(_o(n)||ge(n))return null!==i?null:f(e,t,n,r,null);Oo(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return c(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,i,r.key):u(t,e,r,i);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(_o(r)||ge(r))return f(t,e=e.get(n)||null,r,i,null);Oo(t,r)}return null}function g(i,a,s,c){for(var u=null,l=null,f=a,g=a=0,v=null;null!==f&&g<s.length;g++){f.index>g?(v=f,f=null):v=f.sibling;var m=p(i,f,s[g],c);if(null===m){null===f&&(f=v);break}e&&f&&null===m.alternate&&t(i,f),a=o(m,a,g),null===l?u=m:l.sibling=m,l=m,f=v}if(g===s.length)return n(i,f),u;if(null===f){for(;g<s.length;g++)null!==(f=d(i,s[g],c))&&(a=o(f,a,g),null===l?u=f:l.sibling=f,l=f);return u}for(f=r(i,f);g<s.length;g++)null!==(v=h(f,i,g,s[g],c))&&(e&&null!==v.alternate&&f.delete(null===v.key?g:v.key),a=o(v,a,g),null===l?u=v:l.sibling=v,l=v);return e&&f.forEach((function(e){return t(i,e)})),u}function v(i,s,c,u){var l=ge(c);if("function"!=typeof l)throw Error(a(150));if(null==(c=l.call(c)))throw Error(a(151));for(var f=l=null,g=s,v=s=0,m=null,y=c.next();null!==g&&!y.done;v++,y=c.next()){g.index>v?(m=g,g=null):m=g.sibling;var b=p(i,g,y.value,u);if(null===b){null===g&&(g=m);break}e&&g&&null===b.alternate&&t(i,g),s=o(b,s,v),null===f?l=b:f.sibling=b,f=b,g=m}if(y.done)return n(i,g),l;if(null===g){for(;!y.done;v++,y=c.next())null!==(y=d(i,y.value,u))&&(s=o(y,s,v),null===f?l=y:f.sibling=y,f=y);return l}for(g=r(i,g);!y.done;v++,y=c.next())null!==(y=h(g,i,v,y.value,u))&&(e&&null!==y.alternate&&g.delete(null===y.key?v:y.key),s=o(y,s,v),null===f?l=y:f.sibling=y,f=y);return e&&g.forEach((function(e){return t(i,e)})),l}return function(e,r,o,c){var u="object"==typeof o&&null!==o&&o.type===ne&&null===o.key;u&&(o=o.props.children);var l="object"==typeof o&&null!==o;if(l)switch(o.$$typeof){case ee:e:{for(l=o.key,u=r;null!==u;){if(u.key===l){switch(u.tag){case 7:if(o.type===ne){n(e,u.sibling),(r=i(u,o.props.children)).return=e,e=r;break e}break;default:if(u.elementType===o.type){n(e,u.sibling),(r=i(u,o.props)).ref=xo(e,u,o),r.return=e,e=r;break e}}n(e,u);break}t(e,u),u=u.sibling}o.type===ne?((r=Tc(o.props.children,e.mode,c,o.key)).return=e,e=r):((c=kc(o.type,o.key,o.props,null,e.mode,c)).ref=xo(e,r,o),c.return=e,e=c)}return s(e);case te:e:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Pc(o,e.mode,c)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=jc(o,e.mode,c)).return=e,e=r),s(e);if(_o(o))return g(e,r,o,c);if(ge(o))return v(e,r,o,c);if(l&&Oo(e,o),void 0===o&&!u)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Eo=So(!0),Co=So(!1),ko={},To={current:ko},jo={current:ko},Po={current:ko};function Io(e){if(e===ko)throw Error(a(174));return e}function Ro(e,t){switch(ui(Po,t),ui(jo,e),ui(To,ko),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Le(null,"");break;default:t=Le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ci(To),ui(To,t)}function Ao(){ci(To),ci(jo),ci(Po)}function Mo(e){Io(Po.current);var t=Io(To.current),n=Le(t,e.type);t!==n&&(ui(jo,e),ui(To,n))}function Do(e){jo.current===e&&(ci(To),ci(jo))}var No={current:0};function Lo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function zo(e,t){return{responder:e,props:t}}var Bo=X.ReactCurrentDispatcher,Fo=X.ReactCurrentBatchConfig,Wo=0,Ho=null,Vo=null,Uo=null,qo=!1;function Go(){throw Error(a(321))}function Ko(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Lr(e[n],t[n]))return!1;return!0}function $o(e,t,n,r,i,o){if(Wo=o,Ho=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Bo.current=null===e||null===e.memoizedState?ma:ya,e=n(r,i),t.expirationTime===Wo){o=0;do{if(t.expirationTime=0,!(25>o))throw Error(a(301));o+=1,Uo=Vo=null,t.updateQueue=null,Bo.current=ba,e=n(r,i)}while(t.expirationTime===Wo)}if(Bo.current=va,t=null!==Vo&&null!==Vo.next,Wo=0,Uo=Vo=Ho=null,qo=!1,t)throw Error(a(300));return e}function Zo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Uo?Ho.memoizedState=Uo=e:Uo=Uo.next=e,Uo}function Xo(){if(null===Vo){var e=Ho.alternate;e=null!==e?e.memoizedState:null}else e=Vo.next;var t=null===Uo?Ho.memoizedState:Uo.next;if(null!==t)Uo=t,Vo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Vo=e).memoizedState,baseState:Vo.baseState,baseQueue:Vo.baseQueue,queue:Vo.queue,next:null},null===Uo?Ho.memoizedState=Uo=e:Uo=Uo.next=e}return Uo}function Qo(e,t){return"function"==typeof t?t(e):t}function Yo(e){var t=Xo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Vo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var c=s=o=null,u=i;do{var l=u.expirationTime;if(l<Wo){var f={expirationTime:u.expirationTime,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===c?(s=c=f,o=r):c=c.next=f,l>Ho.expirationTime&&(Ho.expirationTime=l,ac(l))}else null!==c&&(c=c.next={expirationTime:1073741823,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),oc(l,u.suspenseConfig),r=u.eagerReducer===e?u.eagerState:e(r,u.action);u=u.next}while(null!==u&&u!==i);null===c?o=r:c.next=s,Lr(r,t.memoizedState)||(Pa=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Jo(e){var t=Xo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Lr(o,t.memoizedState)||(Pa=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ea(e){var t=Zo();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:e}).dispatch=ga.bind(null,Ho,e),[t.memoizedState,e]}function ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Ho.updateQueue)?(t={lastEffect:null},Ho.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function na(){return Xo().memoizedState}function ra(e,t,n,r){var i=Zo();Ho.effectTag|=e,i.memoizedState=ta(1|t,n,void 0,void 0===r?null:r)}function ia(e,t,n,r){var i=Xo();r=void 0===r?null:r;var o=void 0;if(null!==Vo){var a=Vo.memoizedState;if(o=a.destroy,null!==r&&Ko(r,a.deps))return void ta(t,n,o,r)}Ho.effectTag|=e,i.memoizedState=ta(1|t,n,o,r)}function oa(e,t){return ra(516,4,e,t)}function aa(e,t){return ia(516,4,e,t)}function sa(e,t){return ia(4,2,e,t)}function ca(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ua(e,t,n){return n=null!=n?n.concat([e]):null,ia(4,2,ca.bind(null,t,e),n)}function la(){}function fa(e,t){return Zo().memoizedState=[e,void 0===t?null:t],e}function da(e,t){var n=Xo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ko(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pa(e,t){var n=Xo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ko(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ha(e,t,n){var r=Fi();Hi(98>r?98:r,(function(){e(!0)})),Hi(97<r?97:r,(function(){var r=Fo.suspense;Fo.suspense=void 0===t?null:t;try{e(!1),n()}finally{Fo.suspense=r}}))}function ga(e,t,n){var r=Gs(),i=po.suspense;i={expirationTime:r=Ks(r,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),t.pending=i,o=e.alternate,e===Ho||null!==o&&o===Ho)qo=!0,i.expirationTime=Wo,Ho.expirationTime=Wo;else{if(0===e.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,Lr(s,a))return}catch(e){}$s(e,r)}}var va={readContext:ro,useCallback:Go,useContext:Go,useEffect:Go,useImperativeHandle:Go,useLayoutEffect:Go,useMemo:Go,useReducer:Go,useRef:Go,useState:Go,useDebugValue:Go,useResponder:Go,useDeferredValue:Go,useTransition:Go},ma={readContext:ro,useCallback:fa,useContext:ro,useEffect:oa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ra(4,2,ca.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ra(4,2,e,t)},useMemo:function(e,t){var n=Zo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Zo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ga.bind(null,Ho,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Zo().memoizedState=e},useState:ea,useDebugValue:la,useResponder:zo,useDeferredValue:function(e,t){var n=ea(e),r=n[0],i=n[1];return oa((function(){var n=Fo.suspense;Fo.suspense=void 0===t?null:t;try{i(e)}finally{Fo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(!1),n=t[0];return t=t[1],[fa(ha.bind(null,t,e),[t,e]),n]}},ya={readContext:ro,useCallback:da,useContext:ro,useEffect:aa,useImperativeHandle:ua,useLayoutEffect:sa,useMemo:pa,useReducer:Yo,useRef:na,useState:function(){return Yo(Qo)},useDebugValue:la,useResponder:zo,useDeferredValue:function(e,t){var n=Yo(Qo),r=n[0],i=n[1];return aa((function(){var n=Fo.suspense;Fo.suspense=void 0===t?null:t;try{i(e)}finally{Fo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Yo(Qo),n=t[0];return t=t[1],[da(ha.bind(null,t,e),[t,e]),n]}},ba={readContext:ro,useCallback:da,useContext:ro,useEffect:aa,useImperativeHandle:ua,useLayoutEffect:sa,useMemo:pa,useReducer:Jo,useRef:na,useState:function(){return Jo(Qo)},useDebugValue:la,useResponder:zo,useDeferredValue:function(e,t){var n=Jo(Qo),r=n[0],i=n[1];return aa((function(){var n=Fo.suspense;Fo.suspense=void 0===t?null:t;try{i(e)}finally{Fo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Jo(Qo),n=t[0];return t=t[1],[da(ha.bind(null,t,e),[t,e]),n]}},wa=null,_a=null,xa=!1;function Oa(e,t){var n=Sc(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ea(e){if(xa){var t=_a;if(t){var n=t;if(!Sa(e,t)){if(!(t=_n(n.nextSibling))||!Sa(e,t))return e.effectTag=-1025&e.effectTag|2,xa=!1,void(wa=e);Oa(wa,n)}wa=e,_a=_n(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,xa=!1,wa=e}}function Ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;wa=e}function ka(e){if(e!==wa)return!1;if(!xa)return Ca(e),xa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!yn(t,e.memoizedProps))for(t=_a;t;)Oa(e,t),t=_n(t.nextSibling);if(Ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){_a=_n(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}_a=null}}else _a=wa?_n(e.stateNode.nextSibling):null;return!0}function Ta(){_a=wa=null,xa=!1}var ja=X.ReactCurrentOwner,Pa=!1;function Ia(e,t,n,r){t.child=null===e?Co(t,null,n,r):Eo(t,e.child,n,r)}function Ra(e,t,n,r,i){n=n.render;var o=t.ref;return no(t,i),r=$o(e,t,n,r,o,i),null===e||Pa?(t.effectTag|=1,Ia(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),$a(e,t,i))}function Aa(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||Ec(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=kc(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ma(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Br)(i,r)&&e.ref===t.ref)?$a(e,t,o):(t.effectTag|=1,(e=Cc(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ma(e,t,n,r,i,o){return null!==e&&Br(e.memoizedProps,r)&&e.ref===t.ref&&(Pa=!1,i<o)?(t.expirationTime=e.expirationTime,$a(e,t,o)):Na(e,t,n,r,o)}function Da(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Na(e,t,n,r,i){var o=gi(n)?pi:fi.current;return o=hi(t,o),no(t,i),n=$o(e,t,n,r,o,i),null===e||Pa?(t.effectTag|=1,Ia(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),$a(e,t,i))}function La(e,t,n,r,i){if(gi(n)){var o=!0;bi(t)}else o=!1;if(no(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),yo(t,n,r),wo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=ro(u):u=hi(t,u=gi(n)?pi:fi.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==u)&&bo(t,a,r,u),io=!1;var d=t.memoizedState;a.state=d,lo(t,r,a,i),c=t.memoizedState,s!==r||d!==c||di.current||io?("function"==typeof l&&(go(t,n,l,r),c=t.memoizedState),(s=io||mo(t,n,s,r,d,c,u))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ao(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:$i(t.type,s),c=a.context,"object"==typeof(u=n.contextType)&&null!==u?u=ro(u):u=hi(t,u=gi(n)?pi:fi.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==u)&&bo(t,a,r,u),io=!1,c=t.memoizedState,a.state=c,lo(t,r,a,i),d=t.memoizedState,s!==r||c!==d||di.current||io?("function"==typeof l&&(go(t,n,l,r),d=t.memoizedState),(l=io||mo(t,n,s,r,c,d,u))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,u)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=u,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return za(e,t,n,r,o,i)}function za(e,t,n,r,i,o){Da(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&wi(t,n,!1),$a(e,t,o);r=t.stateNode,ja.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Eo(t,e.child,null,o),t.child=Eo(t,null,s,o)):Ia(e,t,s,o),t.memoizedState=r.state,i&&wi(t,n,!0),t.child}function Ba(e){var t=e.stateNode;t.pendingContext?mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&mi(0,t.context,!1),Ro(e,t.containerInfo)}var Fa,Wa,Ha,Va={dehydrated:null,retryTime:0};function Ua(e,t,n){var r,i=t.mode,o=t.pendingProps,a=No.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),ui(No,1&a),null===e){if(void 0!==o.fallback&&Ea(t),s){if(s=o.fallback,(o=Tc(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Tc(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=Va,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=Co(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=Cc(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=Cc(i,o)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=Va,t.child=n,i}return n=Eo(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=Tc(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Tc(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=Va,t.child=o,n}return t.memoizedState=null,t.child=Eo(t,e,o.children,n)}function qa(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),to(e.return,t)}function Ga(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Ka(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ia(e,t,r.children,n),0!=(2&(r=No.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&qa(e,n);else if(19===e.tag)qa(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ui(No,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Lo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ga(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Lo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ga(t,!0,n,null,o,t.lastEffect);break;case"together":Ga(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function $a(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&ac(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Cc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Za(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xa(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return gi(t.type)&&vi(),null;case 3:return Ao(),ci(di),ci(fi),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!ka(t)||(t.effectTag|=4),null;case 5:Do(t),n=Io(Po.current);var o=t.type;if(null!==e&&null!=t.stateNode)Wa(e,t,o,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Io(To.current),ka(t)){r=t.stateNode,o=t.type;var s=t.memoizedProps;switch(r[Sn]=t,r[En]=s,o){case"iframe":case"object":case"embed":Kt("load",r);break;case"video":case"audio":for(e=0;e<Xe.length;e++)Kt(Xe[e],r);break;case"source":Kt("error",r);break;case"img":case"image":case"link":Kt("error",r),Kt("load",r);break;case"form":Kt("reset",r),Kt("submit",r);break;case"details":Kt("toggle",r);break;case"input":Oe(r,s),Kt("invalid",r),cn(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Kt("invalid",r),cn(n,"onChange");break;case"textarea":Ie(r,s),Kt("invalid",r),cn(n,"onChange")}for(var c in on(o,s),e=null,s)if(s.hasOwnProperty(c)){var u=s[c];"children"===c?"string"==typeof u?r.textContent!==u&&(e=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(e=["children",""+u]):S.hasOwnProperty(c)&&null!=u&&cn(n,c)}switch(o){case"input":we(r),Ce(r,s,!0);break;case"textarea":we(r),Ae(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=un)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(c=9===n.nodeType?n:n.ownerDocument,e===sn&&(e=Ne(o)),e===sn?"script"===o?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(o,{is:r.is}):(e=c.createElement(o),"select"===o&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,o),e[Sn]=t,e[En]=r,Fa(e,t),t.stateNode=e,c=an(o,r),o){case"iframe":case"object":case"embed":Kt("load",e),u=r;break;case"video":case"audio":for(u=0;u<Xe.length;u++)Kt(Xe[u],e);u=r;break;case"source":Kt("error",e),u=r;break;case"img":case"image":case"link":Kt("error",e),Kt("load",e),u=r;break;case"form":Kt("reset",e),Kt("submit",e),u=r;break;case"details":Kt("toggle",e),u=r;break;case"input":Oe(e,r),u=xe(e,r),Kt("invalid",e),cn(n,"onChange");break;case"option":u=Te(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},u=i({},r,{value:void 0}),Kt("invalid",e),cn(n,"onChange");break;case"textarea":Ie(e,r),u=Pe(e,r),Kt("invalid",e),cn(n,"onChange");break;default:u=r}on(o,u);var l=u;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?nn(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&Be(e,f):"children"===s?"string"==typeof f?("textarea"!==o||""!==f)&&Fe(e,f):"number"==typeof f&&Fe(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?null!=f&&cn(n,s):null!=f&&Q(e,s,f,c))}switch(o){case"input":we(e),Ce(e,r,!1);break;case"textarea":we(e),Ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ye(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?je(e,!!r.multiple,n,!1):null!=r.defaultValue&&je(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof u.onClick&&(e.onclick=un)}mn(o,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ha(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Io(Po.current),Io(To.current),ka(t)?(n=t.stateNode,r=t.memoizedProps,n[Sn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=t,t.stateNode=n)}return null;case 13:return ci(No),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&ka(t):(r=null!==(o=e.memoizedState),n||null===o||null!==(o=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=o,o.nextEffect=s):(t.firstEffect=t.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&No.current)?ks===ws&&(ks=_s):(ks!==ws&&ks!==_s||(ks=xs),0!==Rs&&null!==Ss&&(Ac(Ss,Cs),Mc(Ss,Rs)))),(n||r)&&(t.effectTag|=4),null);case 4:return Ao(),null;case 10:return eo(t),null;case 17:return gi(t.type)&&vi(),null;case 19:if(ci(No),null===(r=t.memoizedState))return null;if(o=0!=(64&t.effectTag),null===(s=r.rendering)){if(o)Za(r,!1);else if(ks!==ws||null!==e&&0!=(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Lo(s))){for(t.effectTag|=64,Za(r,!1),null!==(o=e.updateQueue)&&(t.updateQueue=o,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(e=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=e.childExpirationTime,o.expirationTime=e.expirationTime,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,s=e.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return ui(No,1&No.current|2),t.child}s=s.sibling}}else{if(!o)if(null!==(e=Lo(s))){if(t.effectTag|=64,o=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Za(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Bi()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,o=!0,Za(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Bi()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Bi(),n.sibling=null,t=No.current,ui(No,o?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Qa(e){switch(e.tag){case 1:gi(e.type)&&vi();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Ao(),ci(di),ci(fi),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Do(e),null;case 13:return ci(No),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return ci(No),null;case 4:return Ao(),null;case 10:return eo(e),null;default:return null}}function Ya(e,t){return{value:e,source:t,stack:me(t)}}Fa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wa=function(e,t,n,r,o){var a=e.memoizedProps;if(a!==r){var s,c,u=t.stateNode;switch(Io(To.current),e=null,n){case"input":a=xe(u,a),r=xe(u,r),e=[];break;case"option":a=Te(u,a),r=Te(u,r),e=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":a=Pe(u,a),r=Pe(u,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(u.onclick=un)}for(s in on(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(c in u=a[s])u.hasOwnProperty(c)&&(n||(n={}),n[c]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var l=r[s];if(u=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==u&&(null!=l||null!=u))if("style"===s)if(u){for(c in u)!u.hasOwnProperty(c)||l&&l.hasOwnProperty(c)||(n||(n={}),n[c]="");for(c in l)l.hasOwnProperty(c)&&u[c]!==l[c]&&(n||(n={}),n[c]=l[c])}else n||(e||(e=[]),e.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,u=u?u.__html:void 0,null!=l&&u!==l&&(e=e||[]).push(s,l)):"children"===s?u===l||"string"!=typeof l&&"number"!=typeof l||(e=e||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(S.hasOwnProperty(s)?(null!=l&&cn(o,s),e||u===l||(e=[])):(e=e||[]).push(s,l))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},Ha=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var Ja="function"==typeof WeakSet?WeakSet:Set;function es(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=me(n)),null!==n&&ve(n.type),t=t.value,null!==e&&1===e.tag&&ve(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function ts(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){yc(e,t)}else t.current=null}function ns(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:$i(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function rs(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function is(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function os(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void is(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:$i(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&fo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}fo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&mn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Nt(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function as(e,t,n){switch("function"==typeof xc&&xc(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Hi(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(e){yc(i,e)}}e=e.next}while(e!==r)}))}break;case 1:ts(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){yc(e,t)}}(t,n);break;case 5:ts(t);break;case 4:ls(e,t,n)}}function ss(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ss(t)}function cs(e){return 5===e.tag||3===e.tag||4===e.tag}function us(e){e:{for(var t=e.return;null!==t;){if(cs(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Fe(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||cs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=un));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function ls(e,t,n){for(var r,i,o=t,s=!1;;){if(!s){s=o.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===o.tag||6===o.tag){e:for(var c=e,u=o,l=n,f=u;;)if(as(c,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===u)break e;for(;null===f.sibling;){if(null===f.return||f.return===u)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}i?(c=r,u=o.stateNode,8===c.nodeType?c.parentNode.removeChild(u):c.removeChild(u)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(as(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function fs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void rs(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[En]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Se(n,r),an(e,i),t=an(e,r),i=0;i<o.length;i+=2){var s=o[i],c=o[i+1];"style"===s?nn(n,c):"dangerouslySetInnerHTML"===s?Be(n,c):"children"===s?Fe(n,c):Q(n,s,c,t)}switch(e){case"input":Ee(n,r);break;case"textarea":Re(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?je(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?je(n,!!r.multiple,r.defaultValue,!0):je(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Nt(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Ms=Bi()),null!==n)e:for(e=n;;){if(5===e.tag)o=e.stateNode,r?"function"==typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,o.style.display=tn("display",i));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(o=e.child.sibling).return=e,e=o;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void ds(t);case 19:return void ds(t);case 17:return}throw Error(a(163))}function ds(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var r=wc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var ps="function"==typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=so(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ns||(Ns=!0,Ls=r),es(e,t)},n}function gs(e,t,n){(n=so(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return es(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===zs?zs=new Set([this]):zs.add(this),es(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var vs,ms=Math.ceil,ys=X.ReactCurrentDispatcher,bs=X.ReactCurrentOwner,ws=0,_s=3,xs=4,Os=0,Ss=null,Es=null,Cs=0,ks=ws,Ts=null,js=1073741823,Ps=1073741823,Is=null,Rs=0,As=!1,Ms=0,Ds=null,Ns=!1,Ls=null,zs=null,Bs=!1,Fs=null,Ws=90,Hs=null,Vs=0,Us=null,qs=0;function Gs(){return 0!=(48&Os)?1073741821-(Bi()/10|0):0!==qs?qs:qs=1073741821-(Bi()/10|0)}function Ks(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Fi();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Os))return Cs;if(null!==n)e=Ki(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Ki(e,150,100);break;case 97:case 96:e=Ki(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Ss&&e===Cs&&--e,e}function $s(e,t){if(50<Vs)throw Vs=0,Us=null,Error(a(185));if(null!==(e=Zs(e,t))){var n=Fi();1073741823===t?0!=(8&Os)&&0==(48&Os)?Js(e):(Qs(e),0===Os&&qi()):Qs(e),0==(4&Os)||98!==n&&99!==n||(null===Hs?Hs=new Map([[e,t]]):(void 0===(n=Hs.get(e))||n>t)&&Hs.set(e,t))}}function Zs(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(Ss===i&&(ac(t),ks===xs&&Ac(i,Cs)),Mc(i,t)),i}function Xs(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Rc(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Qs(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Ui(Js.bind(null,e));else{var t=Xs(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Gs();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==Ri&&Oi(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Ui(Js.bind(null,e)):Vi(r,Ys.bind(null,e),{timeout:10*(1073741821-t)-Bi()}),e.callbackNode=t}}}function Ys(e,t){if(qs=0,t)return Dc(e,t=Gs()),Qs(e),null;var n=Xs(e);if(0!==n){if(t=e.callbackNode,0!=(48&Os))throw Error(a(327));if(gc(),e===Ss&&n===Cs||nc(e,n),null!==Es){var r=Os;Os|=16;for(var i=ic();;)try{cc();break}catch(t){rc(e,t)}if(Ji(),Os=r,ys.current=i,1===ks)throw t=Ts,nc(e,n),Ac(e,n),Qs(e),t;if(null===Es)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=ks,Ss=null,r){case ws:case 1:throw Error(a(345));case 2:Dc(e,2<n?2:n);break;case _s:if(Ac(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fc(i)),1073741823===js&&10<(i=Ms+500-Bi())){if(As){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,nc(e,n);break}}if(0!==(o=Xs(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=bn(dc.bind(null,e),i);break}dc(e);break;case xs:if(Ac(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fc(i)),As&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,nc(e,n);break}if(0!==(i=Xs(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ps?r=10*(1073741821-Ps)-Bi():1073741823===js?r=0:(r=10*(1073741821-js)-5e3,0>(r=(i=Bi())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ms(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=bn(dc.bind(null,e),r);break}dc(e);break;case 5:if(1073741823!==js&&null!==Is){o=js;var s=Is;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Bi()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Ac(e,n),e.timeoutHandle=bn(dc.bind(null,e),r);break}}dc(e);break;default:throw Error(a(329))}if(Qs(e),e.callbackNode===t)return Ys.bind(null,e)}}return null}function Js(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Os))throw Error(a(327));if(gc(),e===Ss&&t===Cs||nc(e,t),null!==Es){var n=Os;Os|=16;for(var r=ic();;)try{sc();break}catch(t){rc(e,t)}if(Ji(),Os=n,ys.current=r,1===ks)throw n=Ts,nc(e,t),Ac(e,t),Qs(e),n;if(null!==Es)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Ss=null,dc(e),Qs(e)}return null}function ec(e,t){var n=Os;Os|=1;try{return e(t)}finally{0===(Os=n)&&qi()}}function tc(e,t){var n=Os;Os&=-2,Os|=8;try{return e(t)}finally{0===(Os=n)&&qi()}}function nc(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,wn(n)),null!==Es)for(n=Es.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&vi();break;case 3:Ao(),ci(di),ci(fi);break;case 5:Do(r);break;case 4:Ao();break;case 13:case 19:ci(No);break;case 10:eo(r)}n=n.return}Ss=e,Es=Cc(e.current,null),Cs=t,ks=ws,Ts=null,Ps=js=1073741823,Is=null,Rs=0,As=!1}function rc(e,t){for(;;){try{if(Ji(),Bo.current=va,qo)for(var n=Ho.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Wo=0,Uo=Vo=Ho=null,qo=!1,null===Es||null===Es.return)return ks=1,Ts=t,Es=null;e:{var i=e,o=Es.return,a=Es,s=t;if(t=Cs,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var c=s;if(0==(2&a.mode)){var u=a.alternate;u?(a.updateQueue=u.updateQueue,a.memoizedState=u.memoizedState,a.expirationTime=u.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&No.current),f=o;do{var d;if(d=13===f.tag){var p=f.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var h=f.memoizedProps;d=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(d){var g=f.updateQueue;if(null===g){var v=new Set;v.add(c),f.updateQueue=v}else g.add(c);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var m=so(1073741823,null);m.tag=2,co(a,m)}a.expirationTime=1073741823;break e}s=void 0,a=t;var y=i.pingCache;if(null===y?(y=i.pingCache=new ps,s=new Set,y.set(c,s)):void 0===(s=y.get(c))&&(s=new Set,y.set(c,s)),!s.has(a)){s.add(a);var b=bc.bind(null,i,c,a);c.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);s=Error((ve(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+me(a))}5!==ks&&(ks=2),s=Ya(s,a),f=o;do{switch(f.tag){case 3:c=s,f.effectTag|=4096,f.expirationTime=t,uo(f,hs(f,c,t));break e;case 1:c=s;var w=f.type,_=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===zs||!zs.has(_)))){f.effectTag|=4096,f.expirationTime=t,uo(f,gs(f,c,t));break e}}f=f.return}while(null!==f)}Es=lc(Es)}catch(e){t=e;continue}break}}function ic(){var e=ys.current;return ys.current=va,null===e?va:e}function oc(e,t){e<js&&2<e&&(js=e),null!==t&&e<Ps&&2<e&&(Ps=e,Is=t)}function ac(e){e>Rs&&(Rs=e)}function sc(){for(;null!==Es;)Es=uc(Es)}function cc(){for(;null!==Es&&!Ai();)Es=uc(Es)}function uc(e){var t=vs(e.alternate,e,Cs);return e.memoizedProps=e.pendingProps,null===t&&(t=lc(e)),bs.current=null,t}function lc(e){Es=e;do{var t=Es.alternate;if(e=Es.return,0==(2048&Es.effectTag)){if(t=Xa(t,Es,Cs),1===Cs||1!==Es.childExpirationTime){for(var n=0,r=Es.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}Es.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Es.firstEffect),null!==Es.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Es.firstEffect),e.lastEffect=Es.lastEffect),1<Es.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Es:e.firstEffect=Es,e.lastEffect=Es))}else{if(null!==(t=Qa(Es)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Es.sibling))return t;Es=e}while(null!==Es);return ks===ws&&(ks=5),null}function fc(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function dc(e){var t=Fi();return Hi(99,pc.bind(null,e,t)),null}function pc(e,t){do{gc()}while(null!==Fs);if(0!=(48&Os))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=fc(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Ss&&(Es=Ss=null,Cs=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Os;Os|=32,bs.current=null,gn=Gt;var s=pn();if(hn(s)){if("selectionStart"in s)var c={start:s.selectionStart,end:s.selectionEnd};else e:{var u=(c=(c=s.ownerDocument)&&c.defaultView||window).getSelection&&c.getSelection();if(u&&0!==u.rangeCount){c=u.anchorNode;var l=u.anchorOffset,f=u.focusNode;u=u.focusOffset;try{c.nodeType,f.nodeType}catch(e){c=null;break e}var d=0,p=-1,h=-1,g=0,v=0,m=s,y=null;t:for(;;){for(var b;m!==c||0!==l&&3!==m.nodeType||(p=d+l),m!==f||0!==u&&3!==m.nodeType||(h=d+u),3===m.nodeType&&(d+=m.nodeValue.length),null!==(b=m.firstChild);)y=m,m=b;for(;;){if(m===s)break t;if(y===c&&++g===l&&(p=d),y===f&&++v===u&&(h=d),null!==(b=m.nextSibling))break;y=(m=y).parentNode}m=b}c=-1===p||-1===h?null:{start:p,end:h}}else c=null}c=c||{start:0,end:0}}else c=null;vn={activeElementDetached:null,focusedElem:s,selectionRange:c},Gt=!1,Ds=i;do{try{hc()}catch(e){if(null===Ds)throw Error(a(330));yc(Ds,e),Ds=Ds.nextEffect}}while(null!==Ds);Ds=i;do{try{for(s=e,c=t;null!==Ds;){var w=Ds.effectTag;if(16&w&&Fe(Ds.stateNode,""),128&w){var _=Ds.alternate;if(null!==_){var x=_.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&w){case 2:us(Ds),Ds.effectTag&=-3;break;case 6:us(Ds),Ds.effectTag&=-3,fs(Ds.alternate,Ds);break;case 1024:Ds.effectTag&=-1025;break;case 1028:Ds.effectTag&=-1025,fs(Ds.alternate,Ds);break;case 4:fs(Ds.alternate,Ds);break;case 8:ls(s,l=Ds,c),ss(l)}Ds=Ds.nextEffect}}catch(e){if(null===Ds)throw Error(a(330));yc(Ds,e),Ds=Ds.nextEffect}}while(null!==Ds);if(x=vn,_=pn(),w=x.focusedElem,c=x.selectionRange,_!==w&&w&&w.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(w.ownerDocument.documentElement,w)){null!==c&&hn(w)&&(_=c.start,void 0===(x=c.end)&&(x=_),"selectionStart"in w?(w.selectionStart=_,w.selectionEnd=Math.min(x,w.value.length)):(x=(_=w.ownerDocument||document)&&_.defaultView||window).getSelection&&(x=x.getSelection(),l=w.textContent.length,s=Math.min(c.start,l),c=void 0===c.end?s:Math.min(c.end,l),!x.extend&&s>c&&(l=c,c=s,s=l),l=dn(w,s),f=dn(w,c),l&&f&&(1!==x.rangeCount||x.anchorNode!==l.node||x.anchorOffset!==l.offset||x.focusNode!==f.node||x.focusOffset!==f.offset)&&((_=_.createRange()).setStart(l.node,l.offset),x.removeAllRanges(),s>c?(x.addRange(_),x.extend(f.node,f.offset)):(_.setEnd(f.node,f.offset),x.addRange(_))))),_=[];for(x=w;x=x.parentNode;)1===x.nodeType&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<_.length;w++)(x=_[w]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Gt=!!gn,vn=gn=null,e.current=n,Ds=i;do{try{for(w=e;null!==Ds;){var O=Ds.effectTag;if(36&O&&os(w,Ds.alternate,Ds),128&O){_=void 0;var S=Ds.ref;if(null!==S){var E=Ds.stateNode;switch(Ds.tag){case 5:_=E;break;default:_=E}"function"==typeof S?S(_):S.current=_}}Ds=Ds.nextEffect}}catch(e){if(null===Ds)throw Error(a(330));yc(Ds,e),Ds=Ds.nextEffect}}while(null!==Ds);Ds=null,Mi(),Os=o}else e.current=n;if(Bs)Bs=!1,Fs=e,Ws=t;else for(Ds=i;null!==Ds;)t=Ds.nextEffect,Ds.nextEffect=null,Ds=t;if(0===(t=e.firstPendingTime)&&(zs=null),1073741823===t?e===Us?Vs++:(Vs=0,Us=e):Vs=0,"function"==typeof _c&&_c(n.stateNode,r),Qs(e),Ns)throw Ns=!1,e=Ls,Ls=null,e;return 0!=(8&Os)||qi(),null}function hc(){for(;null!==Ds;){var e=Ds.effectTag;0!=(256&e)&&ns(Ds.alternate,Ds),0==(512&e)||Bs||(Bs=!0,Vi(97,(function(){return gc(),null}))),Ds=Ds.nextEffect}}function gc(){if(90!==Ws){var e=97<Ws?97:Ws;return Ws=90,Hi(e,vc)}}function vc(){if(null===Fs)return!1;var e=Fs;if(Fs=null,0!=(48&Os))throw Error(a(331));var t=Os;for(Os|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:rs(5,n),is(5,n)}}catch(t){if(null===e)throw Error(a(330));yc(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Os=t,qi(),!0}function mc(e,t,n){co(e,t=hs(e,t=Ya(n,t),1073741823)),null!==(e=Zs(e,1073741823))&&Qs(e)}function yc(e,t){if(3===e.tag)mc(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){mc(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===zs||!zs.has(r))){co(n,e=gs(n,e=Ya(t,e),1073741823)),null!==(n=Zs(n,1073741823))&&Qs(n);break}}n=n.return}}function bc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Ss===e&&Cs===n?ks===xs||ks===_s&&1073741823===js&&Bi()-Ms<500?nc(e,Cs):As=!0:Rc(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Qs(e)))}function wc(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Ks(t=Gs(),e,null)),null!==(e=Zs(e,t))&&Qs(e)}vs=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||di.current)Pa=!0;else{if(r<n){switch(Pa=!1,t.tag){case 3:Ba(t),Ta();break;case 5:if(Mo(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:gi(t.type)&&bi(t);break;case 4:Ro(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,i=t.type._context,ui(Zi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Ua(e,t,n):(ui(No,1&No.current),null!==(t=$a(e,t,n))?t.sibling:null);ui(No,1&No.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Ka(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),ui(No,No.current),!r)return null}return $a(e,t,n)}Pa=!1}}else Pa=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=hi(t,fi.current),no(t,n),i=$o(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,gi(r)){var o=!0;bi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&go(t,r,s,e),i.updater=vo,t.stateNode=i,i._reactInternalFiber=t,wo(t,r,e,n),t=za(null,t,r,!0,o,n)}else t.tag=0,Ia(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,o=t.tag=function(e){if("function"==typeof e)return Ec(e)?1:0;if(null!=e){if((e=e.$$typeof)===ce)return 11;if(e===fe)return 14}return 2}(i),e=$i(i,e),o){case 0:t=Na(null,t,i,e,n);break e;case 1:t=La(null,t,i,e,n);break e;case 11:t=Ra(null,t,i,e,n);break e;case 14:t=Aa(null,t,i,$i(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Na(e,t,r,i=t.elementType===r?i:$i(r,i),n);case 1:return r=t.type,i=t.pendingProps,La(e,t,r,i=t.elementType===r?i:$i(r,i),n);case 3:if(Ba(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ao(e,t),lo(t,r,null,n),(r=t.memoizedState.element)===i)Ta(),t=$a(e,t,n);else{if((i=t.stateNode.hydrate)&&(_a=_n(t.stateNode.containerInfo.firstChild),wa=t,i=xa=!0),i)for(n=Co(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ia(e,t,r,n),Ta();t=t.child}return t;case 5:return Mo(t),null===e&&Ea(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,yn(r,i)?s=null:null!==o&&yn(r,o)&&(t.effectTag|=16),Da(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ia(e,t,s,n),t=t.child),t;case 6:return null===e&&Ea(t),null;case 13:return Ua(e,t,n);case 4:return Ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Eo(t,null,r,n):Ia(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ra(e,t,r,i=t.elementType===r?i:$i(r,i),n);case 7:return Ia(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ia(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var c=t.type._context;if(ui(Zi,c._currentValue),c._currentValue=o,null!==s)if(c=s.value,0===(o=Lr(c,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(c,o):1073741823))){if(s.children===i.children&&!di.current){t=$a(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var u=c.dependencies;if(null!==u){s=c.child;for(var l=u.firstContext;null!==l;){if(l.context===r&&0!=(l.observedBits&o)){1===c.tag&&((l=so(n,null)).tag=2,co(c,l)),c.expirationTime<n&&(c.expirationTime=n),null!==(l=c.alternate)&&l.expirationTime<n&&(l.expirationTime=n),to(c.return,n),u.expirationTime<n&&(u.expirationTime=n);break}l=l.next}}else s=10===c.tag&&c.type===t.type?null:c.child;if(null!==s)s.return=c;else for(s=c;null!==s;){if(s===t){s=null;break}if(null!==(c=s.sibling)){c.return=s.return,s=c;break}s=s.return}c=s}Ia(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,no(t,n),r=r(i=ro(i,o.unstable_observedBits)),t.effectTag|=1,Ia(e,t,r,n),t.child;case 14:return o=$i(i=t.type,t.pendingProps),Aa(e,t,i,o=$i(i.type,o),r,n);case 15:return Ma(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$i(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,gi(r)?(e=!0,bi(t)):e=!1,no(t,n),yo(t,r,i),wo(t,r,i,n),za(null,t,r,!0,e,n);case 19:return Ka(e,t,n)}throw Error(a(156,t.tag))};var _c=null,xc=null;function Oc(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.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Sc(e,t,n,r){return new Oc(e,t,n,r)}function Ec(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Cc(e,t){var n=e.alternate;return null===n?((n=Sc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function kc(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Ec(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ne:return Tc(n.children,i,o,t);case se:s=8,i|=7;break;case re:s=8,i|=1;break;case ie:return(e=Sc(12,n,t,8|i)).elementType=ie,e.type=ie,e.expirationTime=o,e;case ue:return(e=Sc(13,n,t,i)).type=ue,e.elementType=ue,e.expirationTime=o,e;case le:return(e=Sc(19,n,t,i)).elementType=le,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case oe:s=10;break e;case ae:s=9;break e;case ce:s=11;break e;case fe:s=14;break e;case de:s=16,r=null;break e;case pe:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Sc(s,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function Tc(e,t,n,r){return(e=Sc(7,e,r,t)).expirationTime=n,e}function jc(e,t,n){return(e=Sc(6,e,null,t)).expirationTime=n,e}function Pc(e,t,n){return(t=Sc(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ic(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Rc(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Ac(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Mc(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Dc(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Nc(e,t,n,r){var i=t.current,o=Gs(),s=po.suspense;o=Ks(o,i,s);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var c=n;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(gi(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(null!==c);throw Error(a(171))}if(1===n.tag){var u=n.type;if(gi(u)){n=yi(n,u,c);break e}}n=c}else n=li;return null===t.context?t.context=n:t.pendingContext=n,(t=so(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),co(i,t),$s(i,o),o}function Lc(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function zc(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Bc(e,t){zc(e,t),(e=e.alternate)&&zc(e,t)}function Fc(e,t,n){var r=new Ic(e,t,n=null!=n&&!0===n.hydrate),i=Sc(3,null,null,2===t?7:1===t?3:0);r.current=i,i.stateNode=r,oo(i),e[Cn]=r.current,n&&0!==t&&function(e,t){var n=Ye(t);Ct.forEach((function(e){ht(e,t,n)})),kt.forEach((function(e){ht(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Wc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Hc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=Lc(a);s.call(e)}}Nc(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Fc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"==typeof i){var c=i;i=function(){var e=Lc(a);c.call(e)}}tc((function(){Nc(t,a,e,i)}))}return Lc(a)}function Vc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Uc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Wc(t))throw Error(a(200));return Vc(e,t,null,n)}Fc.prototype.render=function(e){Nc(e,this._internalRoot,null,null)},Fc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Nc(null,e,null,(function(){t[Cn]=null}))},gt=function(e){if(13===e.tag){var t=Ki(Gs(),150,100);$s(e,t),Bc(e,t)}},vt=function(e){13===e.tag&&($s(e,3),Bc(e,3))},mt=function(e){if(13===e.tag){var t=Gs();$s(e,t=Ks(t,e,null)),Bc(e,t)}},T=function(e,t,n){switch(t){case"input":if(Ee(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Pn(r);if(!i)throw Error(a(90));_e(r),Ee(r,i)}}}break;case"textarea":Re(e,n);break;case"select":null!=(t=n.value)&&je(e,!!n.multiple,t,!1)}},M=ec,D=function(e,t,n,r,i){var o=Os;Os|=4;try{return Hi(98,e.bind(null,t,n,r,i))}finally{0===(Os=o)&&qi()}},N=function(){0==(49&Os)&&(function(){if(null!==Hs){var e=Hs;Hs=null,e.forEach((function(e,t){Dc(t,e),Qs(t)})),qi()}}(),gc())},L=function(e,t){var n=Os;Os|=2;try{return e(t)}finally{0===(Os=n)&&qi()}};var qc,Gc,Kc={Events:[Tn,jn,Pn,C,O,Ln,function(e){it(e,Nn)},R,A,Qt,st,gc,{current:!1}]};Gc=(qc={findFiberByHostInstance:kn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);_c=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},xc=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(i({},qc,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Gc?Gc(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Kc,t.createPortal=Uc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Os))throw Error(a(187));var n=Os;Os|=1;try{return Hi(99,e.bind(null,t))}finally{Os=n,qi()}},t.hydrate=function(e,t,n){if(!Wc(t))throw Error(a(200));return Hc(null,e,t,!0,n)},t.render=function(e,t,n){if(!Wc(t))throw Error(a(200));return Hc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Wc(e))throw Error(a(40));return!!e._reactRootContainer&&(tc((function(){Hc(null,null,e,!1,(function(){e._reactRootContainer=null,e[Cn]=null}))})),!0)},t.unstable_batchedUpdates=ec,t.unstable_createPortal=function(e,t){return Uc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Wc(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Hc(e,t,n,!1,r)},t.version="16.14.0"},function(e,t,n){"use strict";e.exports=n(851)},function(e,t,n){"use strict";
/** @license React v0.19.1
* scheduler.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 r,i,o,a,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,u=null,l=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(l,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(l,0))},i=function(e,t){u=setTimeout(e,t)},o=function(){clearTimeout(u)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,h=window.setTimeout,g=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var m=p.now();t.unstable_now=function(){return p.now()-m}}var y=!1,b=null,w=-1,_=5,x=0;a=function(){return t.unstable_now()>=x},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):_=0<e?Math.floor(1e3/e):5};var O=new MessageChannel,S=O.port2;O.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();x=e+_;try{b(!0,e)?S.postMessage(null):(y=!1,b=null)}catch(e){throw S.postMessage(null),e}}else y=!1},r=function(e){b=e,y||(y=!0,S.postMessage(null))},i=function(e,n){w=h((function(){e(t.unstable_now())}),n)},o=function(){g(w),w=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<T(i,t)))break e;e[r]=t,e[n]=i,n=r}}function C(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,c=e[s];if(void 0!==a&&0>T(a,n))void 0!==c&&0>T(c,a)?(e[r]=c,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==c&&0>T(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var j=[],P=[],I=1,R=null,A=3,M=!1,D=!1,N=!1;function L(e){for(var t=C(P);null!==t;){if(null===t.callback)k(P);else{if(!(t.startTime<=e))break;k(P),t.sortIndex=t.expirationTime,E(j,t)}t=C(P)}}function z(e){if(N=!1,L(e),!D)if(null!==C(j))D=!0,r(B);else{var t=C(P);null!==t&&i(z,t.startTime-e)}}function B(e,n){D=!1,N&&(N=!1,o()),M=!0;var r=A;try{for(L(n),R=C(j);null!==R&&(!(R.expirationTime>n)||e&&!a());){var s=R.callback;if(null!==s){R.callback=null,A=R.priorityLevel;var c=s(R.expirationTime<=n);n=t.unstable_now(),"function"==typeof c?R.callback=c:R===C(j)&&k(j),L(n)}else k(j);R=C(j)}if(null!==R)var u=!0;else{var l=C(P);null!==l&&i(z,l.startTime-n),u=!1}return u}finally{R=null,A=r,M=!1}}function F(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var W=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){D||M||(D=!0,r(B))},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_getFirstCallbackNode=function(){return C(j)},t.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=W,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var c=a.delay;c="number"==typeof c&&0<c?s+c:s,a="number"==typeof a.timeout?a.timeout:F(e)}else a=F(e),c=s;return e={id:I++,callback:n,priorityLevel:e,startTime:c,expirationTime:a=c+a,sortIndex:-1},c>s?(e.sortIndex=c,E(P,e),null===C(j)&&e===C(P)&&(N?o():N=!0,i(z,c-s))):(e.sortIndex=a,E(j,e),D||M||(D=!0,r(B))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();L(e);var n=C(j);return n!==R&&null!==R&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<R.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=m(n(15)),i=v(n(0)),o=m(n(112)),a=m(n(144)),s=m(n(113)),c=m(n(569)),u=m(n(114)),l=m(n(93)),f=m(n(132)),d=m(n(57)),p=m(n(30)),h=(v(n(2)),n(44));function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function m(e){return e&&e.__esModule?e:{default:e}}function y(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}var b=function(e){var t,n;function h(t){var n;return(n=e.call(this,t)||this).state={exportLinks:[]},n.closeDialog=n.closeDialog.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=h).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var g=h.prototype;return g.componentDidUpdate=function(e){var t=this,n=this.props,i=n.canvases,o=n.config,a=n.open;if((e||{}).open!==a&&a){var s=function(){var e,t=(e=r.default.mark((function e(t,n){var i,a,s,c,u,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.annotation.adapter(n.id),e.next=3,t;case 3:return a=e.sent,e.next=6,i.all();case 6:if(!(s=e.sent)){e.next=12;break}return c=n.__jsonld&&n.__jsonld.label||n.id,u=new Blob([JSON.stringify(s)],{type:"application/json"}),l=window.URL.createObjectURL(u),e.abrupt("return",[].concat(a,[{canvasId:n.id,id:s.id||s["@id"],label:c,url:l}]));case 12:return e.abrupt("return",a);case 13:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){y(o,r,i,a,s,"next",e)}function s(e){y(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}();i&&i.length>0&&i.reduce(s,[]).then((function(e){t.setState({exportLinks:e})}))}},g.closeDialog=function(){var e=this.props.handleClose;this.setState({exportLinks:[]}),e()},g.render=function(){var e=this.props,t=e.classes,n=e.handleClose,r=e.open,h=this.state.exportLinks;return i.default.createElement(o.default,{"aria-labelledby":"annotation-export-dialog-title",id:"annotation-export-dialog",onClose:n,onEscapeKeyDown:this.closeDialog,open:r},i.default.createElement(s.default,{id:"annotation-export-dialog-title",disableTypography:!0},i.default.createElement(p.default,{variant:"h2"},"Export Annotations")),i.default.createElement(a.default,null,void 0===h||0===h.length?i.default.createElement(p.default,{variant:"body1"},"No annotations stored yet."):i.default.createElement(f.default,null,h.map((function(e){return i.default.createElement(d.default,{button:!0,className:t.listitem,component:"a",key:e.canvasId,"aria-label":"Export annotations for "+e.label,href:e.url,download:e.id+".json"},i.default.createElement(u.default,null,i.default.createElement(c.default,null)),i.default.createElement(l.default,null,'Export annotations for "'+e.label+'"'))})))))},h}(i.Component);b.propTypes={},b.defaultProps={classes:{}};var w=(0,h.withStyles)((function(e){return{listitem:{"&:focus":{backgroundColor:e.palette.action.focus},"&:hover":{backgroundColor:e.palette.action.hover}}}}))(b);t.default=w},function(e,t,n){"use strict";
/** @license React v17.0.2
* 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 r=60103,i=60106,o=60107,a=60108,s=60114,c=60109,u=60110,l=60112,f=60113,d=60120,p=60115,h=60116,g=60121,v=60122,m=60117,y=60129,b=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),i=w("react.portal"),o=w("react.fragment"),a=w("react.strict_mode"),s=w("react.profiler"),c=w("react.provider"),u=w("react.context"),l=w("react.forward_ref"),f=w("react.suspense"),d=w("react.suspense_list"),p=w("react.memo"),h=w("react.lazy"),g=w("react.block"),v=w("react.server.block"),m=w("react.fundamental"),y=w("react.debug_trace_mode"),b=w("react.legacy_hidden")}function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case f:case d:return e;default:switch(e=e&&e.$$typeof){case u:case l:case h:case p:case c:return e;default:return t}}case i:return t}}}var x=c,O=r,S=l,E=o,C=h,k=p,T=i,j=s,P=a,I=f;t.ContextConsumer=u,t.ContextProvider=x,t.Element=O,t.ForwardRef=S,t.Fragment=E,t.Lazy=C,t.Memo=k,t.Portal=T,t.Profiler=j,t.StrictMode=P,t.Suspense=I,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===l},t.isFragment=function(e){return _(e)===o},t.isLazy=function(e){return _(e)===h},t.isMemo=function(e){return _(e)===p},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===a},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===y||e===a||e===f||e===d||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===c||e.$$typeof===u||e.$$typeof===l||e.$$typeof===m||e.$$typeof===g||e[0]===v)},t.typeOf=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(15))&&r.__esModule?r:{default:r};function o(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,c,"next",e)}function c(e){o(a,r,i,s,c,"throw",e)}s(void 0)}))}}var s=function(){function e(e){this.annotationPageId=e}var t=e.prototype;return t.create=function(){var e=a(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={id:this.annotationPageId,items:[],type:"AnnotationPage"},e.next=3,this.all();case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0=n;case 6:return(r=e.t0).items.push(t),localStorage.setItem(this.annotationPageId,JSON.stringify(r)),e.abrupt("return",r);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.update=function(){var e=a(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.all();case 2:if(!(n=e.sent)){e.next=8;break}return r=n.items.findIndex((function(e){return e.id===t.id})),n.items.splice(r,1,t),localStorage.setItem(this.annotationPageId,JSON.stringify(n)),e.abrupt("return",n);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.delete=function(){var e=a(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.all();case 2:return(n=e.sent)&&(n.items=n.items.filter((function(e){return e.id!==t}))),localStorage.setItem(this.annotationPageId,JSON.stringify(n)),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.get=function(){var e=a(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.all();case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n.items.find((function(e){return e.id===t})));case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.all=function(){var e=a(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",JSON.parse(localStorage.getItem(this.annotationPageId)));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(0)),i=(s(n(2)),u(n(26))),o=n(45),a=s(n(119));function s(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function u(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var f=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).retrieveAnnotations=n.retrieveAnnotations.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=i.prototype;return o.componentDidMount=function(){var e=this.props.canvases;this.retrieveAnnotations(e)},o.componentDidUpdate=function(e){var t=this.props.canvases,n=t.map((function(e){return e.id})),r=e.canvases.map((function(e){return e.id}));(0,a.default)(n,r)||this.retrieveAnnotations(t)},o.retrieveAnnotations=function(e){var t=this.props,n=t.config,r=t.receiveAnnotation;e.forEach((function(e){var t=n.annotation.adapter(e.id);t.all().then((function(n){n&&r(e.id,t.annotationPageId,n)}))}))},o.render=function(){var e=this.props,t=e.PluginComponents,n=e.TargetComponent,i=e.targetProps;return r.default.createElement(n,l({},i,{PluginComponents:t}))},i}(r.Component);f.propTypes={},f.defaultProps={canvases:[],PluginComponents:[]};var d={component:f,mapDispatchToProps:{receiveAnnotation:i.receiveAnnotation},mapStateToProps:function(e,t){var n=t.targetProps;return{canvases:(0,o.getVisibleCanvases)(e,{windowId:n.windowId}),config:e.config}},mode:"wrap",target:"Window"};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(0)),i=(l(n(2)),n(45)),o=d(n(26)),a=n(18),s=l(n(857)),c=l(n(584)),u=l(n(570));function l(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).state={singleCanvasDialogOpen:!1},n.toggleSingleCanvasDialogOpen=n.toggleSingleCanvasDialogOpen.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=i.prototype;return o.toggleSingleCanvasDialogOpen=function(){var e=this.state.singleCanvasDialogOpen;this.setState({singleCanvasDialogOpen:!e})},o.render=function(){var e=this.props,t=e.addCompanionWindow,n=e.annotationsOnCanvases,i=e.canvases,o=e.config,a=e.receiveAnnotation,l=e.switchToSingleCanvasView,f=e.TargetComponent,d=e.targetProps,h=e.windowViewType,g=this.state.singleCanvasDialogOpen,v=p({},d,{listContainerComponent:s.default});return r.default.createElement(c.default.Provider,{value:{addCompanionWindow:t,annotationsOnCanvases:n,canvases:i,config:o,receiveAnnotation:a,storageAdapter:o.annotation.adapter,toggleSingleCanvasDialogOpen:this.toggleSingleCanvasDialogOpen,windowId:d.windowId,windowViewType:h}},r.default.createElement(f,v),"single"!==h&&r.default.createElement(u.default,{handleClose:this.toggleSingleCanvasDialogOpen,open:g,switchToSingleCanvasView:l}))},i}(r.Component);h.propTypes={},h.defaultProps={annotationsOnCanvases:{},canvases:[]};var g={component:h,mapDispatchToProps:function(e,t){return{addCompanionWindow:function(n,r){return e(o.addCompanionWindow(t.targetProps.windowId,p({content:n},r)))},receiveAnnotation:function(t,n,r){return e(o.receiveAnnotation(t,n,r))},switchToSingleCanvasView:function(){return e(o.setWindowViewType(t.targetProps.windowId,"single"))}}},mapStateToProps:function(e,t){var n=t.targetProps.windowId,r=(0,i.getVisibleCanvases)(e,{windowId:n}),o={};return r.forEach((function(t){var n=e.annotations[t.id];n&&(o[t.id]=n)})),{annotationsOnCanvases:o,canvases:r,config:e.config,windowViewType:(0,a.getWindowViewType)(e,{windowId:n})}},mode:"wrap",target:"CanvasAnnotations"};t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(l(n(2)),l(n(858))),o=l(n(859)),a=l(n(452)),s=l(n(451)),c=l(n(29)),u=l(n(584));function l(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var p=function(e){var t,n;function u(t){var n;return(n=e.call(this,t)||this).state={isHovering:!1},n.handleMouseHover=n.handleMouseHover.bind(d(n)),n.handleDelete=n.handleDelete.bind(d(n)),n.handleEdit=n.handleEdit.bind(d(n)),n}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=u.prototype;return l.handleDelete=function(){var e=this.context,t=e.canvases,n=e.receiveAnnotation,r=e.storageAdapter,i=this.props.annotationid;t.forEach((function(e){var t=r(e.id);t.delete(i).then((function(r){n(e.id,t.annotationPageId,r)}))}))},l.handleEdit=function(){var e,t=this.context,n=t.addCompanionWindow,r=t.canvases,i=t.annotationsOnCanvases,o=this.props.annotationid;r.some((function(t){return i[t.id]&&Object.entries(i[t.id]).forEach((function(t,n){t[0];var r=t[1];r.json&&r.json.items&&(e=r.json.items.find((function(e){return e.id===o})))})),e})),n("annotationCreation",{annotationid:o,position:"right"})},l.handleMouseHover=function(){this.setState((function(e){return{isHovering:!e.isHovering}}))},l.editable=function(){var e=this.context,t=e.annotationsOnCanvases,n=e.canvases,r=this.props.annotationid,i=n.map((function(e){return t[e.id]?(0,c.default)(Object.entries(t[e.id]).map((function(e,t){e[0];var n=e[1];return n.json&&n.json.items?n.json.items.map((function(e){return e.id})):[]}))):[]}));return(0,c.default)(i).includes(r)},l.render=function(){var e=this.props.children,t=this.state.isHovering,n=this.context,c=n.windowViewType,u=n.toggleSingleCanvasDialogOpen;return r.default.createElement("div",{onMouseEnter:this.handleMouseHover,onMouseLeave:this.handleMouseHover},t&&this.editable()&&r.default.createElement("div",{style:{position:"relative",top:-20,zIndex:1e4}},r.default.createElement(s.default,{"aria-label":"annotation tools",size:"small",style:{position:"absolute",right:0}},r.default.createElement(a.default,{"aria-label":"Edit",onClick:"single"===c?this.handleEdit:u,value:"edit"},r.default.createElement(o.default,null)),r.default.createElement(a.default,{"aria-label":"Delete",onClick:this.handleDelete,value:"delete"},r.default.createElement(i.default,null)))),r.default.createElement("li",this.props,e))},u}(r.Component);p.propTypes={},p.contextType=u.default;var h=p;t.default=h},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"DeleteForever");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(26)),o=n(148),a=n(45);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}var c={companionWindowKey:"annotationCreation",component:((r=n(861))&&r.__esModule?r:{default:r}).default,mapDispatchToProps:function(e,t){var n=t.id,r=t.windowId;return{closeCompanionWindow:function(){return e(i.removeCompanionWindow(r,n))},receiveAnnotation:function(t,n,r){return e(i.receiveAnnotation(t,n,r))}}},mapStateToProps:function(e,t){var n,r=t.id,i=t.windowId,s=(0,o.getCompanionWindow)(e,{companionWindowId:r,windowId:i}).annotationid,c=(0,a.getVisibleCanvases)(e,{windowId:i});return c.forEach((function(t){var r=e.annotations[t.id];Object.values(r||{}).forEach((function(e,t){e.json&&e.json.items&&(n=e.json.items.find((function(e){return e.id===s})))}))})),{annotation:n,canvases:c,config:e.config}}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(M(n(2)),M(n(61))),o=M(n(30)),a=M(n(52)),s=M(n(115)),c=M(n(452)),u=M(n(451)),l=M(n(862)),f=M(n(863)),d=M(n(864)),p=M(n(865)),h=M(n(866)),g=M(n(867)),v=M(n(868)),m=M(n(869)),y=M(n(870)),b=M(n(871)),w=M(n(872)),_=M(n(231)),x=M(n(300)),O=M(n(57)),S=M(n(232)),E=M(n(132)),C=n(1113),k=n(108),T=n(28),j=M(n(62)),P=M(n(935)),I=M(n(944)),R=M(n(1042)),A=M(n(1043));function M(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function N(){return(N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var z=function(e){var t,n;function T(t){var n;n=e.call(this,t)||this;var r={};return t.annotation&&(Array.isArray(t.annotation.body)?(r.tags=[],t.annotation.body.forEach((function(e){"tagging"===e.purpose?r.tags.push(e.value):r.annoBody=e.value}))):r.annoBody=t.annotation.body.value,t.annotation.target.selector&&(Array.isArray(t.annotation.target.selector)?t.annotation.target.selector.forEach((function(e){"SvgSelector"===e.type?r.svg=e.value:"FragmentSelector"===e.type&&(r.xywh=e.value.replace("xywh=",""))})):r.svg=t.annotation.target.selector.value)),n.state=N({activeTool:"cursor",annoBody:"",closedMode:"closed",colorPopoverOpen:!1,currentColorType:!1,fillColor:null,lineWeightPopoverOpen:!1,popoverAnchorEl:null,popoverLineWeightAnchorEl:null,strokeColor:"#00BFFF",strokeWidth:1,svg:null,xywh:null},r),n.submitForm=n.submitForm.bind(L(n)),n.updateBody=n.updateBody.bind(L(n)),n.updateGeometry=n.updateGeometry.bind(L(n)),n.changeTool=n.changeTool.bind(L(n)),n.changeClosedMode=n.changeClosedMode.bind(L(n)),n.openChooseColor=n.openChooseColor.bind(L(n)),n.openChooseLineWeight=n.openChooseLineWeight.bind(L(n)),n.handleLineWeightSelect=n.handleLineWeightSelect.bind(L(n)),n.handleCloseLineWeight=n.handleCloseLineWeight.bind(L(n)),n.closeChooseColor=n.closeChooseColor.bind(L(n)),n.updateStrokeColor=n.updateStrokeColor.bind(L(n)),n}n=e,(t=T).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var M=T.prototype;return M.handleCloseLineWeight=function(e){this.setState({lineWeightPopoverOpen:!1,popoverLineWeightAnchorEl:null})},M.handleLineWeightSelect=function(e){this.setState({lineWeightPopoverOpen:!1,popoverLineWeightAnchorEl:null,strokeWidth:e.currentTarget.value})},M.openChooseColor=function(e){this.setState({colorPopoverOpen:!0,currentColorType:e.currentTarget.value,popoverAnchorEl:e.currentTarget})},M.openChooseLineWeight=function(e){this.setState({lineWeightPopoverOpen:!0,popoverLineWeightAnchorEl:e.currentTarget})},M.closeChooseColor=function(e){this.setState({colorPopoverOpen:!1,currentColorType:null,popoverAnchorEl:null})},M.updateStrokeColor=function(e){var t,n=this.state.currentColorType;this.setState(((t={})[n]=e.hex,t))},M.submitForm=function(e){e.preventDefault();var t=this.props,n=t.annotation,r=t.canvases,i=t.closeCompanionWindow,o=t.receiveAnnotation,a=t.config,s=this.state,c=s.annoBody,u=s.tags,l=s.xywh,f=s.svg;r.forEach((function(e){var t=a.annotation.adapter(e.id),r=new R.default({body:c,canvasId:e.id,id:n&&n.id||""+(0,k.v4)(),manifestId:e.options.resource.id,svg:f,tags:u,xywh:l}).toJson();n?t.update(r).then((function(n){o(e.id,t.annotationPageId,n)})):t.create(r).then((function(n){o(e.id,t.annotationPageId,n)}))})),this.setState({activeTool:null}),i()},M.changeTool=function(e,t){this.setState({activeTool:t})},M.changeClosedMode=function(e){this.setState({closedMode:e.currentTarget.value})},M.updateBody=function(e){this.setState({annoBody:e})},M.updateGeometry=function(e){var t=e.svg,n=e.xywh;this.setState({svg:t,xywh:n})},M.render=function(){var e=this,t=this.props,n=t.annotation,k=t.classes,T=t.closeCompanionWindow,R=t.id,M=t.windowId,D=this.state,N=D.activeTool,L=D.colorPopoverOpen,z=D.currentColorType,B=D.fillColor,F=D.popoverAnchorEl,W=D.strokeColor,H=D.popoverLineWeightAnchorEl,V=D.lineWeightPopoverOpen,U=D.strokeWidth,q=D.closedMode,G=D.annoBody,K=D.svg;return r.default.createElement(j.default,{title:n?"Edit annotation":"New annotation",windowId:M,id:R},r.default.createElement(P.default,{activeTool:N,fillColor:B,strokeColor:W,strokeWidth:U,closed:"closed"===q,svg:K,updateGeometry:this.updateGeometry,windowId:M}),r.default.createElement("form",{onSubmit:this.submitForm},r.default.createElement(s.default,{container:!0},r.default.createElement(s.default,{item:!0,xs:12},r.default.createElement(o.default,{variant:"overline"},"Target")),r.default.createElement(s.default,{item:!0,xs:12},r.default.createElement(a.default,{elevation:0,className:k.paper},r.default.createElement(u.default,{className:k.grouped,value:N,exclusive:!0,onChange:this.changeTool,"aria-label":"tool selection",size:"small"},r.default.createElement(c.default,{value:"cursor","aria-label":"select cursor"},r.default.createElement(A.default,null)),r.default.createElement(c.default,{value:"edit","aria-label":"select cursor"},r.default.createElement(w.default,null))),r.default.createElement(x.default,{flexItem:!0,orientation:"vertical",className:k.divider}),r.default.createElement(u.default,{className:k.grouped,value:N,exclusive:!0,onChange:this.changeTool,"aria-label":"tool selection",size:"small"},r.default.createElement(c.default,{value:"rectangle","aria-label":"add a rectangle"},r.default.createElement(l.default,null)),r.default.createElement(c.default,{value:"ellipse","aria-label":"add a circle"},r.default.createElement(f.default,null)),r.default.createElement(c.default,{value:"polygon","aria-label":"add a polygon"},r.default.createElement(d.default,null)),r.default.createElement(c.default,{value:"freehand","aria-label":"free hand polygon"},r.default.createElement(p.default,null)))))),r.default.createElement(s.default,{container:!0},r.default.createElement(s.default,{item:!0,xs:12},r.default.createElement(o.default,{variant:"overline"},"Style")),r.default.createElement(s.default,{item:!0,xs:12},r.default.createElement(u.default,{"aria-label":"style selection",size:"small"},r.default.createElement(c.default,{value:"strokeColor","aria-label":"select color",onClick:this.openChooseColor},r.default.createElement(m.default,{style:{fill:W}}),r.default.createElement(b.default,null)),r.default.createElement(c.default,{value:"strokeColor","aria-label":"select line weight",onClick:this.openChooseLineWeight},r.default.createElement(y.default,null),r.default.createElement(b.default,null)),r.default.createElement(c.default,{value:"fillColor","aria-label":"select color",onClick:this.openChooseColor},r.default.createElement(v.default,{style:{fill:B}}),r.default.createElement(b.default,null))),r.default.createElement(x.default,{flexItem:!0,orientation:"vertical",className:k.divider}),"freehand"===N?r.default.createElement(u.default,{size:"small",value:q,onChange:this.changeClosedMode},r.default.createElement(c.default,{value:"closed"},r.default.createElement(h.default,null)),r.default.createElement(c.default,{value:"open"},r.default.createElement(g.default,null))):null)),r.default.createElement(s.default,{container:!0},r.default.createElement(s.default,{item:!0,xs:12},r.default.createElement(o.default,{variant:"overline"},"Content")),r.default.createElement(s.default,{item:!0,xs:12},r.default.createElement(I.default,{annoHtml:G,updateAnnotationBody:this.updateBody}))),r.default.createElement(i.default,{onClick:T},"Cancel"),r.default.createElement(i.default,{variant:"contained",color:"primary",type:"submit"},"Save")),r.default.createElement(_.default,{open:V,anchorEl:H},r.default.createElement(a.default,null,r.default.createElement(S.default,{onClickAway:this.handleCloseLineWeight},r.default.createElement(E.default,null,[1,3,5,10,50].map((function(t,n){return r.default.createElement(O.default,{key:t,onClick:e.handleLineWeightSelect,value:t},t)})))))),r.default.createElement(_.default,{open:L,anchorEl:F,onClose:this.closeChooseColor},r.default.createElement(C.SketchPicker,{color:this.state[z]||{},onChangeComplete:this.updateStrokeColor})))},T}(r.Component);z.propTypes={},z.defaultProps={annotation:null,canvases:[],closeCompanionWindow:function(){}};var B=(0,T.withStyles)((function(e){return{divider:{margin:e.spacing(1,.5)},grouped:{"&:first-child":{borderRadius:e.shape.borderRadius},"&:not(:first-child)":{borderRadius:e.shape.borderRadius},border:"none",margin:e.spacing(.5)},paper:{display:"flex",flexWrap:"wrap"}}}))(z);t.default=B},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"}),"Timeline");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"}),"Gesture");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z"}),"ChangeHistory");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"}),"ShowChart");t.default=a},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(19)).default)(i.default.createElement(i.default.Fragment,null,i.default.createElement("path",{d:"M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z"}),i.default.createElement("path",{fillOpacity:".36",d:"M0 20h24v4H0z"})),"FormatColorFill");t.default=o},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(19)).default)(i.default.createElement(i.default.Fragment,null,i.default.createElement("path",{d:"M17.75 7L14 3.25l-10 10V17h3.75l10-10zm2.96-2.96c.39-.39.39-1.02 0-1.41L18.37.29a.9959.9959 0 0 0-1.41 0L15 2.25 18.75 6l1.96-1.96z"}),i.default.createElement("path",{fillOpacity:".36",d:"M0 20h24v4H0z"})),"BorderColor");t.default=o},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M3 17h18v-2H3v2zm0 3h18v-1H3v1zm0-7h18v-3H3v3zm0-9v4h18V4H3z"}),"LineWeight");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M23 7V1h-6v2H7V1H1v6h2v10H1v6h6v-2h10v2h6v-6h-2V7h2zM3 3h2v2H3V3zm2 18H3v-2h2v2zm12-2H7v-2H5V7h2V5h10v2h2v10h-2v2zm4 2h-2v-2h2v2zM19 5V3h2v2h-2zm-5.27 9h-3.49l-.73 2H7.89l3.4-9h1.4l3.41 9h-1.63l-.74-2zm-3.04-1.26h2.61L12 8.91l-1.31 3.83z"}),"FormatShapes");t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=s(n(343)),i=s(n(418)),o=s(n(419)),a=s(n(874));function s(e){return e&&e.__esModule?e:{default:e}}var c=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,a.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,o.default)(t)?(0,i.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=c},function(e,t,n){var r=n(143),i=n(167),o=n(586),a=n(56);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=a(n(418)),i=a(n(876)),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function a(e){return e&&e.__esModule?e:{default:e}}var s=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,i.default)(e.default)||{};return t.map((function(t){var i=e[t];return i&&(0,r.default)(i,(function(e,t){n[t]||(n[t]={}),n[t]=o({},n[t],i[t])})),t})),n};t.default=s},function(e,t,n){var r=n(301);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(233),i=n(423);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(68),i=n(282),o=n(879),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(78),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(281)(e))},function(e,t,n){var r=n(233),i=n(408);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){var r=n(233),i=n(588);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(425),i=n(885),o=n(886),a=n(887),s=n(888);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return o(e);case"[object Set]":return new c;case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(425);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(197),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},function(e,t,n){var r=n(425);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(303),i=n(420),o=n(282);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},function(e,t,n){var r=n(891),i=n(228),o=n(398),a=o&&o.isMap,s=a?i(a):r;e.exports=s},function(e,t,n){var r=n(198),i=n(92);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(893),i=n(228),o=n(398),a=o&&o.isSet,s=a?i(a):r;e.exports=s},function(e,t,n){var r=n(198),i=n(92);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,i=n(418),o=(r=i)&&r.__esModule?r:{default:r},a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var s={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var n=t[e];return n||{extend:e}}},c=t.autoprefix=function(e){var t={};return(0,o.default)(e,(function(e,n){var r={};(0,o.default)(e,(function(e,t){var n=s[t];n?r=a({},r,n(e)):r[t]=e})),t[n]=r})),t};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(0),a=(r=o)&&r.__esModule?r:{default:r};function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,o,u;s(this,r);for(var l=arguments.length,f=Array(l),d=0;d<l;d++)f[d]=arguments[d];return o=u=c(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(f))),u.state={hover:!1},u.handleMouseOver=function(){return u.setState({hover:!0})},u.handleMouseOut=function(){return u.setState({hover:!1})},u.render=function(){return a.default.createElement(t,{onMouseOver:u.handleMouseOver,onMouseOut:u.handleMouseOut},a.default.createElement(e,i({},u.props,u.state)))},c(u,o)}return u(r,n),r}(a.default.Component)};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(0),a=(r=o)&&r.__esModule?r:{default:r};function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,o,u;s(this,r);for(var l=arguments.length,f=Array(l),d=0;d<l;d++)f[d]=arguments[d];return o=u=c(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(f))),u.state={active:!1},u.handleMouseDown=function(){return u.setState({active:!0})},u.handleMouseUp=function(){return u.setState({active:!1})},u.render=function(){return a.default.createElement(t,{onMouseDown:u.handleMouseDown,onMouseUp:u.handleMouseUp},a.default.createElement(e,i({},u.props,u.state)))},c(u,o)}return u(r,n),r}(a.default.Component)};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],l=0;(c=new Error(t.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function c(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var f=this,d=Date.now()-a;function p(){a=Date.now(),n.apply(f,u)}function h(){i=void 0}o||(r&&!i&&p(),s(),void 0===r&&d>e?p():!0!==t&&(i=setTimeout(r?h:p,void 0===r?e-d:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),c.cancel=function(){s(),o=!0},c}e.debounce=function(e,n,r){return void 0===r?t(e,n,!1):t(e,r,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";var r=n(589).forEach,i=n(901),o=n(902),a=n(903),s=n(904),c=n(905),u=n(590),l=n(906),f=n(908),d=n(909),p=n(910);function h(e){return Array.isArray(e)||void 0!==e.length}function g(e){if(Array.isArray(e))return e;var t=[];return r(e,(function(e){t.push(e)})),t}function v(e){return e&&1===e.nodeType}function m(e,t,n){var r=e[t];return null==r&&void 0!==n?n:r}e.exports=function(e){var t;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var n=a(),y=s({idGenerator:n,stateHandler:f});t=y}var b=e.reporter;b||(b=c(!1===b));var w=m(e,"batchProcessor",l({reporter:b})),_={};_.callOnAdd=!!m(e,"callOnAdd",!0),_.debug=!!m(e,"debug",!1);var x,O=o(t),S=i({stateHandler:f}),E=m(e,"strategy","object"),C=m(e,"important",!1),k={reporter:b,batchProcessor:w,stateHandler:f,idHandler:t,important:C};if("scroll"===E&&(u.isLegacyOpera()?(b.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),E="object"):u.isIE(9)&&(b.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),E="object")),"scroll"===E)x=p(k);else{if("object"!==E)throw new Error("Invalid strategy name: "+E);x=d(k)}var T={};return{listenTo:function(e,n,i){function o(e){var t=O.get(e);r(t,(function(t){t(e)}))}function a(e,t,n){O.add(t,n),e&&n(t)}if(i||(i=n,n=e,e={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(v(n))n=[n];else{if(!h(n))return b.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=g(n)}var s=0,c=m(e,"callOnAdd",_.callOnAdd),u=m(e,"onReady",(function(){})),l=m(e,"debug",_.debug);r(n,(function(e){f.getState(e)||(f.initState(e),t.set(e));var d=t.get(e);if(l&&b.log("Attaching listener to element",d,e),!S.isDetectable(e))return l&&b.log(d,"Not detectable."),S.isBusy(e)?(l&&b.log(d,"System busy making it detectable"),a(c,e,i),T[d]=T[d]||[],void T[d].push((function(){++s===n.length&&u()}))):(l&&b.log(d,"Making detectable..."),S.markBusy(e,!0),x.makeDetectable({debug:l,important:C},e,(function(e){if(l&&b.log(d,"onElementDetectable"),f.getState(e)){S.markAsDetectable(e),S.markBusy(e,!1),x.addListener(e,o),a(c,e,i);var t=f.getState(e);if(t&&t.startSize){var p=e.offsetWidth,h=e.offsetHeight;t.startSize.width===p&&t.startSize.height===h||o(e)}T[d]&&r(T[d],(function(e){e()}))}else l&&b.log(d,"Element uninstalled before being detectable.");delete T[d],++s===n.length&&u()})));l&&b.log(d,"Already detecable, adding listener."),a(c,e,i),s++})),s===n.length&&u()},removeListener:O.removeListener,removeAllListeners:O.removeAllListeners,uninstall:function(e){if(!e)return b.error("At least one element is required.");if(v(e))e=[e];else{if(!h(e))return b.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=g(e)}r(e,(function(e){O.removeAllListeners(e),x.uninstall(e),f.cleanState(e)}))},initDocument:function(e){x.initDocument&&x.initDocument(e)}}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}}},function(e,t,n){"use strict";e.exports=function(e){var t={};function n(n){var r=e.get(n);return void 0===r?[]:t[r]||[]}return{get:n,add:function(n,r){var i=e.get(n);t[i]||(t[i]=[]),t[i].push(r)},removeListener:function(e,t){for(var r=n(e),i=0,o=r.length;i<o;++i)if(r[i]===t){r.splice(i,1);break}},removeAllListeners:function(e){var t=n(e);t&&(t.length=0)}}}},function(e,t,n){"use strict";e.exports=function(){var e=1;return{generate:function(){return e++}}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var r=n(e);if(!r)throw new Error("setId required the element to have a resize detection state.");var i=t.generate();return r.id=i,i}}}},function(e,t,n){"use strict";e.exports=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var r=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;n<arguments.length;n++)e(arguments[n])}};r(n,"log"),r(n,"warn"),r(n,"error")}return n}},function(e,t,n){"use strict";var r=n(907);function i(){var e={},t=0,n=0,r=0;return{add:function(i,o){o||(o=i,i=0),i>n?n=i:i<r&&(r=i),e[i]||(e[i]=[]),e[i].push(o),t++},process:function(){for(var t=r;t<=n;t++)for(var i=e[t],o=0;o<i.length;o++){(0,i[o])()}},size:function(){return t}}}e.exports=function(e){var t=(e=e||{}).reporter,n=r.getOption(e,"async",!0),o=r.getOption(e,"auto",!0);o&&!n&&(t&&t.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var a,s=i(),c=!1;function u(){for(c=!0;s.size();){var e=s;s=i(),e.process()}c=!1}function l(){var e;e=u,a=setTimeout(e,0)}return{add:function(e,t){!c&&o&&n&&0===s.size()&&l(),s.add(e,t)},force:function(e){c||(void 0===e&&(e=n),a&&(clearTimeout(a),a=null),e?l():u())}}}},function(e,t,n){"use strict";(e.exports={}).getOption=function(e,t,n){var r=e[t];if(null==r&&void 0!==n)return n;return r}},function(e,t,n){"use strict";function r(e){return e._erd}e.exports={initState:function(e){return e._erd={},r(e)},getState:r,cleanState:function(e){delete e._erd}}},function(e,t,n){"use strict";var r=n(590);e.exports=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,i=e.stateHandler.getState;if(!t)throw new Error("Missing required dependency: reporter.");function o(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function a(e){return i(e).object}return{makeDetectable:function(e,a,s){s||(s=a,a=e,e=null),(e=e||{}).debug,r.isIE(8)?s(a):function(a,s){var c=o(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),u=!1,l=window.getComputedStyle(a),f=a.offsetWidth,d=a.offsetHeight;function p(){function n(){if("static"===l.position){a.style.setProperty("position","relative",e.important?"important":"");var n=function(t,n,r,i){var o=r[i];"auto"!==o&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",n),n.style.setProperty(i,"0",e.important?"important":""))};n(t,a,l,"top"),n(t,a,l,"right"),n(t,a,l,"bottom"),n(t,a,l,"left")}}""!==l.position&&(n(),u=!0);var o=document.createElement("object");o.style.cssText=c,o.tabIndex=-1,o.type="text/html",o.setAttribute("aria-hidden","true"),o.onload=function(){u||n(),function e(t,n){if(!t.contentDocument){var r=i(t);return r.checkForObjectDocumentTimeoutId&&window.clearTimeout(r.checkForObjectDocumentTimeoutId),void(r.checkForObjectDocumentTimeoutId=setTimeout((function(){r.checkForObjectDocumentTimeoutId=0,e(t,n)}),100))}n(t.contentDocument)}(this,(function(e){s(a)}))},r.isIE()||(o.data="about:blank"),i(a)&&(a.appendChild(o),i(a).object=o,r.isIE()&&(o.data="about:blank"))}i(a).startSize={width:f,height:d},n?n.add(p):p()}(a,s)},addListener:function(e,t){function n(){t(e)}if(r.isIE(8))i(e).object={proxy:n},e.attachEvent("onresize",n);else{var o=a(e);if(!o)throw new Error("Element is not detectable by this strategy.");o.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(e){if(i(e)){var t=a(e);t&&(r.isIE(8)?e.detachEvent("onresize",t.proxy):e.removeChild(t),i(e).checkForObjectDocumentTimeoutId&&window.clearTimeout(i(e).checkForObjectDocumentTimeoutId),delete i(e).object)}}}}},function(e,t,n){"use strict";var r=n(589).forEach;e.exports=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,i=e.stateHandler.getState,o=(e.stateHandler.hasState,e.idHandler);if(!n)throw new Error("Missing required dependency: batchProcessor");if(!t)throw new Error("Missing required dependency: reporter.");var a=function(){var e=document.createElement("div");e.style.cssText=c(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var t=document.createElement("div");t.style.cssText=c(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,r=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:r}}();function s(e){!function(e,t,n){if(!e.getElementById(t)){var r=n+"_animation",i=n+"_animation_active",o="/* Created by the element-resize-detector library. */\n";o+="."+n+" > div::-webkit-scrollbar { "+c(["display: none"])+" }\n\n",o+="."+i+" { "+c(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+r,"animation-name: "+r])+" }\n",o+="@-webkit-keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(n,r){r=r||function(t){e.head.appendChild(t)};var i=e.createElement("style");i.innerHTML=n,i.id=t,r(i)}(o+="@keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(e,"erd_scroll_detection_scrollbar_style","erd_scroll_detection_container")}function c(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function u(e,n,r){if(e.addEventListener)e.addEventListener(n,r);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,r)}}function l(e,n,r){if(e.removeEventListener)e.removeEventListener(n,r);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,r)}}function f(e){return i(e).container.childNodes[0].childNodes[0].childNodes[0]}function d(e){return i(e).container.childNodes[0].childNodes[0].childNodes[1]}return s(window.document),{makeDetectable:function(e,s,l){function p(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(o.get(s),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var r=0;r<n.length;r++)t.log(n[r])}}function h(e){var t=i(e).container.childNodes[0],n=window.getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function g(){var e=window.getComputedStyle(s),t={};return t.position=e.position,t.width=s.offsetWidth,t.height=s.offsetHeight,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.widthCSS=e.width,t.heightCSS=e.height,t}function v(){if(p("storeStyle invoked."),i(s)){var e=g();i(s).style=e}else p("Aborting because element has been uninstalled")}function m(e,t,n){i(e).lastWidth=t,i(e).lastHeight=n}function y(){return 2*a.width+1}function b(){return 2*a.height+1}function w(e){return e+10+y()}function _(e){return e+10+b()}function x(e,t,n){var r=f(e),i=d(e),o=w(t),a=_(n),s=function(e){return 2*e+y()}(t),c=function(e){return 2*e+b()}(n);r.scrollLeft=o,r.scrollTop=a,i.scrollLeft=s,i.scrollTop=c}function O(){var e=i(s).container;if(!e){(e=document.createElement("div")).className="erd_scroll_detection_container",e.style.cssText=c(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),i(s).container=e,function(e){e.className+=" erd_scroll_detection_container_animation_active"}(e),s.appendChild(e);var t=function(){i(s).onRendered&&i(s).onRendered()};u(e,"animationstart",t),i(s).onAnimationStart=t}return e}function S(){if(p("Injecting elements"),i(s)){!function(){var n=i(s).style;if("static"===n.position){s.style.setProperty("position","relative",e.important?"important":"");var r=function(e,t,n,r){var i=n[r];"auto"!==i&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(i)&&(e.warn("An element that is positioned static has style."+r+"="+i+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+r+" will be set to 0. Element: ",t),t.style[r]=0)};r(t,s,n,"top"),r(t,s,n,"right"),r(t,s,n,"bottom"),r(t,s,n,"left")}}();var n=i(s).container;n||(n=O());var r,o,l,f,d=a.width,h=a.height,g=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),v=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(["left: "+(r=(r=-(1+d))?r+"px":"0"),"top: "+(o=(o=-(1+h))?o+"px":"0"),"right: "+(f=(f=-d)?f+"px":"0"),"bottom: "+(l=(l=-h)?l+"px":"0")])),m=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),y=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),b=c(["position: absolute","left: 0","top: 0"]),w=c(["position: absolute","width: 200%","height: 200%"]),_=document.createElement("div"),x=document.createElement("div"),S=document.createElement("div"),E=document.createElement("div"),C=document.createElement("div"),k=document.createElement("div");_.dir="ltr",_.style.cssText=g,_.className="erd_scroll_detection_container",x.className="erd_scroll_detection_container",x.style.cssText=v,S.style.cssText=m,E.style.cssText=b,C.style.cssText=y,k.style.cssText=w,S.appendChild(E),C.appendChild(k),x.appendChild(S),x.appendChild(C),_.appendChild(x),n.appendChild(_),u(S,"scroll",T),u(C,"scroll",j),i(s).onExpandScroll=T,i(s).onShrinkScroll=j}else p("Aborting because element has been uninstalled");function T(){var e=i(s);e&&e.onExpand?e.onExpand():p("Aborting expand scroll handler: element has been uninstalled")}function j(){var e=i(s);e&&e.onShrink?e.onShrink():p("Aborting shrink scroll handler: element has been uninstalled")}}function E(){function a(t,n,r){var i=function(e){return f(e).childNodes[0]}(t),o=w(n),a=_(r);i.style.setProperty("width",o+"px",e.important?"important":""),i.style.setProperty("height",a+"px",e.important?"important":"")}function c(r){var c=s.offsetWidth,l=s.offsetHeight,f=c!==i(s).lastWidth||l!==i(s).lastHeight;p("Storing current size",c,l),m(s,c,l),n.add(0,(function(){if(f)if(i(s))if(u()){if(e.debug){var n=s.offsetWidth,r=s.offsetHeight;n===c&&r===l||t.warn(o.get(s),"Scroll: Size changed before updating detector elements.")}a(s,c,l)}else p("Aborting because element container has not been initialized");else p("Aborting because element has been uninstalled")})),n.add(1,(function(){i(s)?u()?x(s,c,l):p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")})),f&&r&&n.add(2,(function(){i(s)?u()?r():p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")}))}function u(){return!!i(s).container}function l(){p("notifyListenersIfNeeded invoked");var e=i(s);return void 0===i(s).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?p("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?p("Not notifying: Size already notified"):(p("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void r(i(s).listeners,(function(e){e(s)})))}function g(){p("Scroll detected."),h(s)?p("Scroll event fired while unrendered. Ignoring..."):c(l)}if(p("registerListenersAndPositionElements invoked."),i(s)){i(s).onRendered=function(){if(p("startanimation triggered."),h(s))p("Ignoring since element is still unrendered...");else{p("Element rendered.");var e=f(s),t=d(s);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(p("Scrollbars out of sync. Updating detector elements..."),c(l))}},i(s).onExpand=g,i(s).onShrink=g;var v=i(s).style;a(s,v.width,v.height)}else p("Aborting because element has been uninstalled")}function C(){if(p("finalizeDomMutation invoked."),i(s)){var e=i(s).style;m(s,e.width,e.height),x(s,e.width,e.height)}else p("Aborting because element has been uninstalled")}function k(){l(s)}function T(){var e;p("Installing..."),i(s).listeners=[],e=g(),i(s).startSize={width:e.width,height:e.height},p("Element start size",i(s).startSize),n.add(0,v),n.add(1,S),n.add(2,E),n.add(3,C),n.add(4,k)}l||(l=s,s=e,e=null),e=e||{},p("Making detectable..."),!function(e){return!function(e){var t=e.getRootNode&&e.getRootNode().contains(e);return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)||t}(e)||null===window.getComputedStyle(e)}(s)?T():(p("Element is detached"),O(),p("Waiting until element is attached..."),i(s).onRendered=function(){p("Element is now attached"),T()})},addListener:function(e,t){if(!i(e).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");i(e).listeners.push(t)},uninstall:function(e){var t=i(e);t&&(t.onExpandScroll&&l(f(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&l(d(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&l(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))},initDocument:s}}},function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<o.length;c++){var u=o[c];if(!s(u))return!1;var l=e[u],f=t[u];if(!1===(i=n?n.call(r,l,f,u):void 0)||void 0===i&&l!==f)return!1}return!0}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(915);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(304),i=n(78);e.exports=function(e,t,n){var o=1&t,a=r(e);return function t(){var r=this&&this!==i&&this instanceof t?a:e;return r.apply(o?n:this,arguments)}}},function(e,t,n){var r=n(412),i=n(304),o=n(594),a=n(597),s=n(602),c=n(432),u=n(78);e.exports=function(e,t,n){var l=i(e);return function i(){for(var f=arguments.length,d=Array(f),p=f,h=s(i);p--;)d[p]=arguments[p];var g=f<3&&d[0]!==h&&d[f-1]!==h?[]:c(d,h);if((f-=g.length)<n)return a(e,t,o,i.placeholder,void 0,d,g,void 0,void 0,n-f);var v=this&&this!==u&&this instanceof i?l:e;return r(v,this,d)}}},function(e,t){e.exports=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}},function(e,t){e.exports={}},function(e,t,n){var r=n(428),i=n(431),o=n(429),a=n(56),s=n(92),c=n(922),u=Object.prototype.hasOwnProperty;function l(e){if(s(e)&&!a(e)&&!(e instanceof r)){if(e instanceof i)return e;if(u.call(e,"__wrapped__"))return c(e)}return new i(e)}l.prototype=o.prototype,l.prototype.constructor=l,e.exports=l},function(e,t,n){var r=n(428),i=n(431),o=n(302);e.exports=function(e){if(e instanceof r)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},function(e,t){var n=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var t=e.match(n);return t?t[1].split(r):[]}},function(e,t){var n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(n,"{\n/* [wrapped with "+t+"] */\n")}},function(e,t,n){var r=n(421),i=n(415),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return r(o,(function(n){var r="_."+n[0];t&n[1]&&!i(e,r)&&e.push(r)})),e.sort()}},function(e,t,n){var r=n(302),i=n(227),o=Math.min;e.exports=function(e,t){for(var n=e.length,a=o(t.length,n),s=r(e);a--;){var c=t[a];e[a]=i(c,n)?s[c]:void 0}return e}},function(e,t,n){var r=n(412),i=n(304),o=n(78);e.exports=function(e,t,n,a){var s=1&t,c=i(e);return function t(){for(var i=-1,u=arguments.length,l=-1,f=a.length,d=Array(f+u),p=this&&this!==o&&this instanceof t?c:e;++l<f;)d[l]=a[l];for(;u--;)d[l++]=arguments[++i];return r(p,s?n:this,d)}}},function(e,t,n){var r=n(595),i=n(596),o=n(432),a=Math.min;e.exports=function(e,t){var n=e[1],s=t[1],c=n|s,u=c<131,l=128==s&&8==n||128==s&&256==n&&e[7].length<=t[8]||384==s&&t[7].length<=t[8]&&8==n;if(!u&&!l)return e;1&s&&(e[2]=t[2],c|=1&n?0:4);var f=t[3];if(f){var d=e[3];e[3]=d?r(d,f,t[4]):f,e[4]=d?o(e[3],"__lodash_placeholder__"):t[4]}return(f=t[5])&&(d=e[5],e[5]=d?i(d,f,t[6]):f,e[6]=d?o(e[5],"__lodash_placeholder__"):t[6]),(f=t[7])&&(e[7]=f),128&s&&(e[8]=null==e[8]?t[8]:a(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}},function(e,t,n){var r=n(433);e.exports=function(e){return e?(e=r(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){var r=n(931),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return l.default}}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==h(e)&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=d(n(2)),o=d(n(33)),a=d(n(23)),s=n(434),c=n(603),u=n(305),l=d(n(934)),f=d(n(604));function d(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function v(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),e}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var i=k(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?C(e):t}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(n,e);var t=S(n);function n(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),T(C(r=t.call(this,e)),"onDragStart",(function(e,t){if((0,f.default)("Draggable: onDragStart: %j",t),!1===r.props.onStart(e,(0,c.createDraggableData)(C(r),t)))return!1;r.setState({dragging:!0,dragged:!0})})),T(C(r),"onDrag",(function(e,t){if(!r.state.dragging)return!1;(0,f.default)("Draggable: onDrag: %j",t);var n=(0,c.createDraggableData)(C(r),t),i={x:n.x,y:n.y};if(r.props.bounds){var o=i.x,a=i.y;i.x+=r.state.slackX,i.y+=r.state.slackY;var s=m((0,c.getBoundPosition)(C(r),i.x,i.y),2),u=s[0],l=s[1];i.x=u,i.y=l,i.slackX=r.state.slackX+(o-i.x),i.slackY=r.state.slackY+(a-i.y),n.x=i.x,n.y=i.y,n.deltaX=i.x-r.state.x,n.deltaY=i.y-r.state.y}if(!1===r.props.onDrag(e,n))return!1;r.setState(i)})),T(C(r),"onDragStop",(function(e,t){if(!r.state.dragging)return!1;if(!1===r.props.onStop(e,(0,c.createDraggableData)(C(r),t)))return!1;(0,f.default)("Draggable: onDragStop: %j",t);var n={dragging:!1,slackX:0,slackY:0};if(Boolean(r.props.position)){var i=r.props.position,o=i.x,a=i.y;n.x=o,n.y=a}r.setState(n)})),r.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:w({},e.position),slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),r}return x(n,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,f.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:w({},n)})}}]),x(n,[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){return this.props.nodeRef?this.props.nodeRef.current:o.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),i=t.defaultPosition,o=t.defaultClassName,u=t.defaultClassNameDragging,f=t.defaultClassNameDragged,d=t.position,p=t.positionOffset,h=(t.scale,v(t,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"])),m={},y=null,b=!Boolean(d)||this.state.dragging,_=d||i,x={x:(0,c.canDragX)(this)&&b?this.state.x:_.x,y:(0,c.canDragY)(this)&&b?this.state.y:_.y};this.state.isElementSVG?y=(0,s.createSVGTransform)(x,p):m=(0,s.createCSSTransform)(x,p);var O=(0,a.default)(n.props.className||"",o,(T(e={},u,this.state.dragging),T(e,f,this.state.dragged),e));return r.createElement(l.default,g({},h,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(n),{className:O,style:w(w({},n.props.style),m),transform:y}))}}]),n}(r.Component);t.default=j,T(j,"displayName","Draggable"),T(j,"propTypes",w(w({},l.default.propTypes),{},{axis:i.default.oneOf(["both","x","y","none"]),bounds:i.default.oneOfType([i.default.shape({left:i.default.number,right:i.default.number,top:i.default.number,bottom:i.default.number}),i.default.string,i.default.oneOf([!1])]),defaultClassName:i.default.string,defaultClassNameDragging:i.default.string,defaultClassNameDragged:i.default.string,defaultPosition:i.default.shape({x:i.default.number,y:i.default.number}),positionOffset:i.default.shape({x:i.default.oneOfType([i.default.number,i.default.string]),y:i.default.oneOfType([i.default.number,i.default.string])}),position:i.default.shape({x:i.default.number,y:i.default.number}),className:u.dontSetMe,style:u.dontSetMe,transform:u.dontSetMe})),T(j,"defaultProps",w(w({},l.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrefix=i,t.browserPrefixToKey=o,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0;var r=["Moz","Webkit","O","ms"];function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var n=0;n<r.length;n++)if(o(e,r[n])in t)return r[n];return""}function o(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}var a=i();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==d(e)&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=l(n(2)),o=l(n(33)),a=n(434),s=n(603),c=n(305),u=l(n(604));function l(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var i=_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?w(e):t}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O={start:"touchstart",move:"touchmove",stop:"touchend"},S={start:"mousedown",move:"mousemove",stop:"mouseup"},E=S,C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(l,e);var t,n,i,c=y(l);function l(){var e;g(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return x(w(e=c.call.apply(c,[this].concat(n))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),x(w(e),"mounted",!1),x(w(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,a.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,a.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var i=(0,a.getTouchIdentifier)(t);e.setState({touchIdentifier:i});var o=(0,s.getControlPosition)(t,i,w(e));if(null!=o){var c=o.x,l=o.y,f=(0,s.createCoreData)(w(e),c,l);(0,u.default)("DraggableCore: handleDragStart: %j",f),(0,u.default)("calling",e.props.onStart),!1!==e.props.onStart(t,f)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,a.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:c,lastY:l}),(0,a.addEvent)(r,E.move,e.handleDrag),(0,a.addEvent)(r,E.stop,e.handleDragStop))}}})),x(w(e),"handleDrag",(function(t){var n=(0,s.getControlPosition)(t,e.state.touchIdentifier,w(e));if(null!=n){var r=n.x,i=n.y;if(Array.isArray(e.props.grid)){var o=r-e.state.lastX,a=i-e.state.lastY,c=p((0,s.snapToGrid)(e.props.grid,o,a),2);if(o=c[0],a=c[1],!o&&!a)return;r=e.state.lastX+o,i=e.state.lastY+a}var l=(0,s.createCoreData)(w(e),r,i);if((0,u.default)("DraggableCore: handleDrag: %j",l),!1!==e.props.onDrag(t,l)&&!1!==e.mounted)e.setState({lastX:r,lastY:i});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(t){var f=document.createEvent("MouseEvents");f.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(f)}}})),x(w(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,s.getControlPosition)(t,e.state.touchIdentifier,w(e));if(null!=n){var r=n.x,i=n.y,o=(0,s.createCoreData)(w(e),r,i);if(!1===e.props.onStop(t,o)||!1===e.mounted)return!1;var c=e.findDOMNode();c&&e.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(c.ownerDocument),(0,u.default)("DraggableCore: handleDragStop: %j",o),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),c&&((0,u.default)("DraggableCore: Removing handlers"),(0,a.removeEvent)(c.ownerDocument,E.move,e.handleDrag),(0,a.removeEvent)(c.ownerDocument,E.stop,e.handleDragStop))}}})),x(w(e),"onMouseDown",(function(t){return E=S,e.handleDragStart(t)})),x(w(e),"onMouseUp",(function(t){return E=S,e.handleDragStop(t)})),x(w(e),"onTouchStart",(function(t){return E=O,e.handleDragStart(t)})),x(w(e),"onTouchEnd",(function(t){return E=O,e.handleDragStop(t)})),e}return t=l,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,a.addEvent)(e,O.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,a.removeEvent)(t,S.move,this.handleDrag),(0,a.removeEvent)(t,O.move,this.handleDrag),(0,a.removeEvent)(t,S.stop,this.handleDragStop),(0,a.removeEvent)(t,O.stop,this.handleDragStop),(0,a.removeEvent)(e,O.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){return this.props.nodeRef?this.props.nodeRef.current:o.default.findDOMNode(this)}},{key:"render",value:function(){return r.cloneElement(r.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&v(t.prototype,n),i&&v(t,i),l}(r.Component);t.default=C,x(C,"displayName","DraggableCore"),x(C,"propTypes",{allowAnyClick:i.default.bool,disabled:i.default.bool,enableUserSelectHack:i.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:i.default.arrayOf(i.default.number),handle:i.default.string,cancel:i.default.string,nodeRef:i.default.object,onStart:i.default.func,onDrag:i.default.func,onStop:i.default.func,onMouseDown:i.default.func,scale:i.default.number,className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),x(C,"defaultProps",{allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=d(n(33)),o=(d(n(2)),n(245)),a=n(605),s=n(938),c=n(435),u=d(n(29)),l=d(n(943)),f=n(608);function d(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}var h=function(e){var t,n;function d(t){var n;return(n=e.call(this,t)||this).addPath=n.addPath.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=d).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var p=d.prototype;return p.componentDidMount=function(){var e=this.props.windowId;this.OSDReference=o.OSDReferences.get(e)},p.addPath=function(e){var t=this.props,n=t.closed,r=t.strokeWidth,i=t.updateGeometry,o=e.bounds,a=o.x,s=o.y,c=o.width,l=o.height;e.closed=n,e.strokeWidth=r,e.data.state=null;var d=(0,u.default)(e.project.layers.map((function(e){return(0,u.default)((0,f.mapChildren)(e)).map((function(e){return e.exportSVG({asString:!0})}))})));d.unshift("<svg xmlns='http://www.w3.org/2000/svg'>"),d.push("</svg>"),i({svg:d.join(""),xywh:[Math.floor(a),Math.floor(s),Math.floor(c),Math.floor(l)].join(",")})},p.paperThing=function(){var e=this,t=this.props,n=t.activeTool,i=t.fillColor,o=t.strokeColor,d=t.strokeWidth,p=t.svg;if(!n||"cursor"===n)return null;var h=this.OSDReference.viewport.getZoom(!0),g=this.OSDReference.world.getItemAt(0),v=g.viewportToImageCoordinates(this.OSDReference.viewport.getCenter(!0)),m=this.OSDReference.viewport.getFlip(),y={center:new c.Point(v.x,v.y),rotation:this.OSDReference.viewport.getRotation(),scaling:new c.Point(m?-1:1,1),zoom:g.viewportToImageZoom(h)},b=s.RectangleTool;switch(n){case"rectangle":b=s.RectangleTool;break;case"ellipse":b=s.EllipseTool;break;case"polygon":b=s.PolygonTool;break;case"freehand":b=s.FreeformPathTool;break;case"edit":b=l.default}return r.default.createElement("div",{className:"foo",style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"}},r.default.createElement(a.PaperContainer,{canvasProps:{style:{height:"100%",width:"100%"}},viewProps:y},(0,a.renderWithPaperScope)((function(t){var n=(0,u.default)(t.project.layers.map((function(e){return(0,u.default)((0,f.mapChildren)(e)).map((function(e){return e}))})));return p&&0===n.length&&t.project.importSVG(p),t.settings.handleSize=10,t.settings.hitTolerance=10,r.default.createElement(b,{onPathAdd:e.addPath,pathProps:{fillColor:i,strokeColor:o,strokeWidth:d/t.view.zoom},paper:t})}))))},p.render=function(){var e=this.props.windowId;return this.OSDReference=o.OSDReferences.get(e).current,i.default.createPortal(this.paperThing(),this.OSDReference.element)},d}(r.Component);h.propTypes={},h.defaultProps={activeTool:null,closed:!0,fillColor:null,strokeColor:"#00BFFF",strokeWidth:1,svg:null};var g=h;t.default=g},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r,i,o=n(0),a=(r=o)&&"object"==typeof r&&"default"in r?r.default:r,s=n(937);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?y(e):t}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b(this,n)}}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O={Tool:"Tool",Layer:"Layer",Group:"Group",Path:"Path",Line:"Line",Rectangle:"Rectangle",Circle:"Circle",PointText:"PointText"},S=h({PaperScope:"PaperScope"},O),E=(f(i={},S.PaperScope,(function(e,t){return new t.PaperScope})),f(i,S.Tool,(function(e,t){return new t.Tool(e)})),f(i,S.Layer,(function(e,t){return new t.Layer(e)})),f(i,S.Group,(function(e,t){return new t.Group(e)})),f(i,S.Path,(function(e,t){return new t.Path(e)})),f(i,S.Line,(function(e,t){return new t.Path.Line(e)})),f(i,S.Rectangle,(function(e,t){return new t.Path.Rectangle(e)})),f(i,S.Circle,(function(e,t){return new t.Path.Circle(e)})),f(i,S.PointText,(function(e,t,n){return new t.PointText(h(h({},e),{},{content:n}))})),i),C=Object.entries(O).reduce((function(e,t){var n=_(t,2),r=n[0],i=n[1];return h(h({},e),{},f({},r,o.forwardRef((function(e,t){return o.createElement(i,d({ref:t},e))}))))}),{}),k=C.Tool,T=C.Layer,j=C.Group,P=C.Path,I=C.Line,R=C.Rectangle,A=C.Circle,M=C.PointText,D=a.createContext();function N(e,t){return e===t}function L(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N,n=null,r=null;return function(){return L(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}!function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r]}(z);var B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function F(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/(null==t&&n.path)}},n.exports),n.exports}var W=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;function U(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var q=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=U(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))H.call(n,a)&&(i[a]=n[a]);if(W){r=W(n);for(var s=0;s<r.length;s++)V.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},G=F((function(e,t){var n,r,i,o,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,c=null,u=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(u,0),e}},l=Date.now();t.unstable_now=function(){return Date.now()-l},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(u,0))},r=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},o=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,p=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var g=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var v=d.now();t.unstable_now=function(){return d.now()-v}}var m=!1,y=null,b=-1,w=5,_=0;o=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,O=x.port2;x.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();_=e+w;try{y(!0,e)?O.postMessage(null):(m=!1,y=null)}catch(e){throw O.postMessage(null),e}}else m=!1},n=function(e){y=e,m||(m=!0,O.postMessage(null))},r=function(e,n){b=p((function(){e(t.unstable_now())}),n)},i=function(){h(b),b=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<k(i,t)))break e;e[r]=t,e[n]=i,n=r}}function E(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,c=e[s];if(void 0!==a&&0>k(a,n))void 0!==c&&0>k(c,a)?(e[r]=c,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==c&&0>k(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],j=[],P=1,I=null,R=3,A=!1,M=!1,D=!1;function N(e){for(var t=E(j);null!==t;){if(null===t.callback)C(j);else{if(!(t.startTime<=e))break;C(j),t.sortIndex=t.expirationTime,S(T,t)}t=E(j)}}function L(e){if(D=!1,N(e),!M)if(null!==E(T))M=!0,n(z);else{var t=E(j);null!==t&&r(L,t.startTime-e)}}function z(e,n){M=!1,D&&(D=!1,i()),A=!0;var a=R;try{for(N(n),I=E(T);null!==I&&(!(I.expirationTime>n)||e&&!o());){var s=I.callback;if(null!==s){I.callback=null,R=I.priorityLevel;var c=s(I.expirationTime<=n);n=t.unstable_now(),"function"==typeof c?I.callback=c:I===E(T)&&C(T),N(n)}else C(T);I=E(T)}if(null!==I)var u=!0;else{var l=E(j);null!==l&&r(L,l.startTime-n),u=!1}return u}finally{I=null,R=a,A=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){M||A||(M=!0,n(z))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return E(T)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,o,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var c=a.delay;c="number"==typeof c&&0<c?s+c:s,a="number"==typeof a.timeout?a.timeout:B(e)}else a=B(e),c=s;return e={id:P++,callback:o,priorityLevel:e,startTime:c,expirationTime:a=c+a,sortIndex:-1},c>s?(e.sortIndex=c,S(j,e),null===E(T)&&e===E(j)&&(D?i():D=!0,r(L,c-s))):(e.sortIndex=a,S(T,e),M||A||(M=!0,n(z))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();N(e);var n=E(T);return n!==I&&null!==I&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<I.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}})),K=(G.unstable_now,G.unstable_forceFrameRate,G.unstable_IdlePriority,G.unstable_ImmediatePriority,G.unstable_LowPriority,G.unstable_NormalPriority,G.unstable_Profiling,G.unstable_UserBlockingPriority,G.unstable_cancelCallback,G.unstable_continueExecution,G.unstable_getCurrentPriorityLevel,G.unstable_getFirstCallbackNode,G.unstable_next,G.unstable_pauseExecution,G.unstable_requestPaint,G.unstable_runWithPriority,G.unstable_scheduleCallback,G.unstable_shouldYield,G.unstable_wrapCallback,F((function(e,t){}))),$=(K.unstable_now,K.unstable_forceFrameRate,K.unstable_IdlePriority,K.unstable_ImmediatePriority,K.unstable_LowPriority,K.unstable_NormalPriority,K.unstable_Profiling,K.unstable_UserBlockingPriority,K.unstable_cancelCallback,K.unstable_continueExecution,K.unstable_getCurrentPriorityLevel,K.unstable_getFirstCallbackNode,K.unstable_next,K.unstable_pauseExecution,K.unstable_requestPaint,K.unstable_runWithPriority,K.unstable_scheduleCallback,K.unstable_shouldYield,K.unstable_wrapCallback,F((function(e){e.exports=G}))),Z=F((function(e){
/** @license React v0.25.1
* react-reconciler.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.
*/
e.exports=function t(n){var r=q,i=a,o=$;function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;c.hasOwnProperty("ReactCurrentDispatcher")||(c.ReactCurrentDispatcher={current:null}),c.hasOwnProperty("ReactCurrentBatchConfig")||(c.ReactCurrentBatchConfig={suspense:null});var u="function"==typeof Symbol&&Symbol.for,l=u?Symbol.for("react.element"):60103,f=u?Symbol.for("react.portal"):60106,d=u?Symbol.for("react.fragment"):60107,p=u?Symbol.for("react.strict_mode"):60108,h=u?Symbol.for("react.profiler"):60114,g=u?Symbol.for("react.provider"):60109,v=u?Symbol.for("react.context"):60110,m=u?Symbol.for("react.concurrent_mode"):60111,y=u?Symbol.for("react.forward_ref"):60112,b=u?Symbol.for("react.suspense"):60113,w=u?Symbol.for("react.suspense_list"):60120,_=u?Symbol.for("react.memo"):60115,x=u?Symbol.for("react.lazy"):60116,O=u?Symbol.for("react.block"):60121,S="function"==typeof Symbol&&Symbol.iterator;function E(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=S&&e[S]||e["@@iterator"])?e:null}function C(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case d:return"Fragment";case f:return"Portal";case h:return"Profiler";case p:return"StrictMode";case b:return"Suspense";case w:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case v:return"Context.Consumer";case g:return"Context.Provider";case y:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case _:return C(e.type);case O:return C(e.render);case x:if(e=1===e._status?e._result:null)return C(e)}return null}function k(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function T(e){if(k(e)!==e)throw Error(s(188))}function j(e){var t=e.alternate;if(!t){if(null===(t=k(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return T(i),e;if(o===r)return T(i),t;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,c=i.child;c;){if(c===n){a=!0,n=i,r=o;break}if(c===r){a=!0,r=i,n=o;break}c=c.sibling}if(!a){for(c=o.child;c;){if(c===n){a=!0,n=o,r=i;break}if(c===r){a=!0,r=o,n=i;break}c=c.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}function P(e){if(!(e=j(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var I=n.getPublicInstance,R=n.getRootHostContext,A=n.getChildHostContext,M=n.prepareForCommit,D=n.resetAfterCommit,N=n.createInstance,L=n.appendInitialChild,z=n.finalizeInitialChildren,B=n.prepareUpdate,F=n.shouldSetTextContent,W=n.shouldDeprioritizeSubtree,H=n.createTextInstance,V=n.setTimeout,U=n.clearTimeout,G=n.noTimeout,K=n.isPrimaryRenderer,Z=n.supportsMutation,X=n.supportsPersistence,Q=n.supportsHydration,Y=n.appendChild,J=n.appendChildToContainer,ee=n.commitTextUpdate,te=n.commitMount,ne=n.commitUpdate,re=n.insertBefore,ie=n.insertInContainerBefore,oe=n.removeChild,ae=n.removeChildFromContainer,se=n.resetTextContent,ce=n.hideInstance,ue=n.hideTextInstance,le=n.unhideInstance,fe=n.unhideTextInstance,de=n.cloneInstance,pe=n.createContainerChildSet,he=n.appendChildToContainerChildSet,ge=n.finalizeContainerChildren,ve=n.replaceContainerChildren,me=n.cloneHiddenInstance,ye=n.cloneHiddenTextInstance,be=n.canHydrateInstance,we=n.canHydrateTextInstance,_e=n.isSuspenseInstancePending,xe=n.isSuspenseInstanceFallback,Oe=n.getNextHydratableSibling,Se=n.getFirstHydratableChild,Ee=n.hydrateInstance,Ce=n.hydrateTextInstance,ke=n.getNextHydratableInstanceAfterSuspenseInstance,Te=n.commitHydratedContainer,je=n.commitHydratedSuspenseInstance,Pe=/^(.*)[\\\/]/;function Ie(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=C(e.type);n=null,r&&(n=C(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(Pe,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}var Re=[],Ae=-1;function Me(e){0>Ae||(e.current=Re[Ae],Re[Ae]=null,Ae--)}function De(e,t){Ae++,Re[Ae]=e.current,e.current=t}var Ne={},Le={current:Ne},ze={current:!1},Be=Ne;function Fe(e,t){var n=e.type.contextTypes;if(!n)return Ne;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function We(e){return null!=e.childContextTypes}function He(){Me(ze),Me(Le)}function Ve(e,t,n){if(Le.current!==Ne)throw Error(s(168));De(Le,t),De(ze,n)}function Ue(e,t,n){var i=e.stateNode;if(e=t.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var o in i=i.getChildContext())if(!(o in e))throw Error(s(108,C(t)||"Unknown",o));return r({},n,{},i)}function qe(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ne,Be=Le.current,De(Le,e),De(ze,ze.current),!0}function Ge(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=Ue(e,t,Be),r.__reactInternalMemoizedMergedChildContext=e,Me(ze),Me(Le),De(Le,e)):Me(ze),De(ze,n)}var Ke=o.unstable_runWithPriority,$e=o.unstable_scheduleCallback,Ze=o.unstable_cancelCallback,Xe=o.unstable_requestPaint,Qe=o.unstable_now,Ye=o.unstable_getCurrentPriorityLevel,Je=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,it={},ot=o.unstable_shouldYield,at=void 0!==Xe?Xe:function(){},st=null,ct=null,ut=!1,lt=Qe(),ft=1e4>lt?Qe:function(){return Qe()-lt};function dt(){switch(Ye()){case Je:return 99;case et:return 98;case tt:return 97;case nt:return 96;case rt:return 95;default:throw Error(s(332))}}function pt(e){switch(e){case 99:return Je;case 98:return et;case 97:return tt;case 96:return nt;case 95:return rt;default:throw Error(s(332))}}function ht(e,t){return e=pt(e),Ke(e,t)}function gt(e,t,n){return e=pt(e),$e(e,t,n)}function vt(e){return null===st?(st=[e],ct=$e(Je,yt)):st.push(e),it}function mt(){if(null!==ct){var e=ct;ct=null,Ze(e)}yt()}function yt(){if(!ut&&null!==st){ut=!0;var e=0;try{var t=st;ht(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),st=null}catch(t){throw null!==st&&(st=st.slice(e+1)),$e(Je,mt),t}finally{ut=!1}}}function bt(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}var wt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},_t=Object.prototype.hasOwnProperty;function xt(e,t){if(wt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!_t.call(t,n[r])||!wt(e[n[r]],t[n[r]]))return!1;return!0}function Ot(e,t){if(e&&e.defaultProps)for(var n in t=r({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var St={current:null},Et=null,Ct=null,kt=null;function Tt(){kt=Ct=Et=null}function jt(e,t){e=e.type._context,K?(De(St,e._currentValue),e._currentValue=t):(De(St,e._currentValue2),e._currentValue2=t)}function Pt(e){var t=St.current;Me(St),e=e.type._context,K?e._currentValue=t:e._currentValue2=t}function It(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function Rt(e,t){Et=e,kt=Ct=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(ar=!0),e.firstContext=null)}function At(e,t){if(kt!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(kt=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ct){if(null===Et)throw Error(s(308));Ct=t,Et.dependencies={expirationTime:0,firstContext:t,responders:null}}else Ct=Ct.next=t;return K?e._currentValue:e._currentValue2}var Mt=!1;function Dt(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function Nt(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function Lt(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function zt(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function Bt(e,t){var n=e.alternate;null!==n&&Nt(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function Ft(e,t,n,i){var o=e.updateQueue;Mt=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var c=a.next;a.next=s.next,s.next=c}a=s,o.shared.pending=null,null!==(c=e.alternate)&&null!==(c=c.updateQueue)&&(c.baseQueue=s)}if(null!==a){c=a.next;var u=o.baseState,l=0,f=null,d=null,p=null;if(null!==c)for(var h=c;;){if((s=h.expirationTime)<i){var g={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===p?(d=p=g,f=u):p=p.next=g,s>l&&(l=s)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),Fi(s,h.suspenseConfig);e:{var v=e,m=h;switch(s=t,g=n,m.tag){case 1:if("function"==typeof(v=m.payload)){u=v.call(g,u,s);break e}u=v;break e;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null==(s="function"==typeof(v=m.payload)?v.call(g,u,s):v))break e;u=r({},u,s);break e;case 2:Mt=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=o.effects)?o.effects=[h]:s.push(h))}if(null===(h=h.next)||h===c){if(null===(s=o.shared.pending))break;h=a.next=s.next,s.next=c,o.baseQueue=a=s,o.shared.pending=null}}null===p?f=u:p.next=d,o.baseState=f,o.baseQueue=p,Wi(l),e.expirationTime=l,e.memoizedState=u}}function Wt(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!=typeof r)throw Error(s(191,r));r.call(i)}}}var Ht=c.ReactCurrentBatchConfig,Vt=(new i.Component).refs;function Ut(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:r({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var qt={isMounted:function(e){return!!(e=e._reactInternalFiber)&&k(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=ki(),i=Ht.suspense;(i=Lt(r=Ti(r,e,i),i)).payload=t,null!=n&&(i.callback=n),zt(e,i),ji(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=ki(),i=Ht.suspense;(i=Lt(r=Ti(r,e,i),i)).tag=1,i.payload=t,null!=n&&(i.callback=n),zt(e,i),ji(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=ki(),r=Ht.suspense;(r=Lt(n=Ti(n,e,r),r)).tag=2,null!=t&&(r.callback=t),zt(e,r),ji(e,n)}};function Gt(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&xt(n,r)&&xt(i,o))}function Kt(e,t,n){var r=!1,i=Ne,o=t.contextType;return"object"==typeof o&&null!==o?o=At(o):(i=We(t)?Be:Le.current,o=(r=null!=(r=t.contextTypes))?Fe(e,i):Ne),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=qt,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function $t(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qt.enqueueReplaceState(t,t.state,null)}function Zt(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Vt,Dt(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=At(o):(o=We(t)?Be:Le.current,i.context=Fe(e,o)),Ft(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Ut(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&qt.enqueueReplaceState(i,i.state,null),Ft(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var Xt=Array.isArray;function Qt(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===Vt&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function Yt(e,t){if("textarea"!==e.type)throw Error(s(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Jt(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=co(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function a(t){return e&&null===t.alternate&&(t.effectTag=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=fo(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Qt(e,t,n),r.return=e,r):((r=uo(n.type,n.key,n.props,null,e.mode,r)).ref=Qt(e,t,n),r.return=e,r)}function p(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=po(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,o){return null===t||7!==t.tag?((t=lo(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function g(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=fo(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case l:return(n=uo(t.type,t.key,t.props,null,e.mode,n)).ref=Qt(e,null,t),n.return=e,n;case f:return(t=po(t,e.mode,n)).return=e,t}if(Xt(t)||E(t))return(t=lo(t,e.mode,n,null)).return=e,t;Yt(e,t)}return null}function v(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case l:return n.key===i?n.type===d?h(e,t,n.props.children,r,i):u(e,t,n,r):null;case f:return n.key===i?p(e,t,n,r):null}if(Xt(n)||E(n))return null!==i?null:h(e,t,n,r,null);Yt(e,n)}return null}function m(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return c(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case l:return e=e.get(null===r.key?n:r.key)||null,r.type===d?h(t,e,r.props.children,i,r.key):u(t,e,r,i);case f:return p(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Xt(r)||E(r))return h(t,e=e.get(n)||null,r,i,null);Yt(t,r)}return null}function y(i,a,s,c){for(var u=null,l=null,f=a,d=a=0,p=null;null!==f&&d<s.length;d++){f.index>d?(p=f,f=null):p=f.sibling;var h=v(i,f,s[d],c);if(null===h){null===f&&(f=p);break}e&&f&&null===h.alternate&&t(i,f),a=o(h,a,d),null===l?u=h:l.sibling=h,l=h,f=p}if(d===s.length)return n(i,f),u;if(null===f){for(;d<s.length;d++)null!==(f=g(i,s[d],c))&&(a=o(f,a,d),null===l?u=f:l.sibling=f,l=f);return u}for(f=r(i,f);d<s.length;d++)null!==(p=m(f,i,d,s[d],c))&&(e&&null!==p.alternate&&f.delete(null===p.key?d:p.key),a=o(p,a,d),null===l?u=p:l.sibling=p,l=p);return e&&f.forEach((function(e){return t(i,e)})),u}function b(i,a,c,u){var l=E(c);if("function"!=typeof l)throw Error(s(150));if(null==(c=l.call(c)))throw Error(s(151));for(var f=l=null,d=a,p=a=0,h=null,y=c.next();null!==d&&!y.done;p++,y=c.next()){d.index>p?(h=d,d=null):h=d.sibling;var b=v(i,d,y.value,u);if(null===b){null===d&&(d=h);break}e&&d&&null===b.alternate&&t(i,d),a=o(b,a,p),null===f?l=b:f.sibling=b,f=b,d=h}if(y.done)return n(i,d),l;if(null===d){for(;!y.done;p++,y=c.next())null!==(y=g(i,y.value,u))&&(a=o(y,a,p),null===f?l=y:f.sibling=y,f=y);return l}for(d=r(i,d);!y.done;p++,y=c.next())null!==(y=m(d,i,p,y.value,u))&&(e&&null!==y.alternate&&d.delete(null===y.key?p:y.key),a=o(y,a,p),null===f?l=y:f.sibling=y,f=y);return e&&d.forEach((function(e){return t(i,e)})),l}return function(e,r,o,c){var u="object"==typeof o&&null!==o&&o.type===d&&null===o.key;u&&(o=o.props.children);var p="object"==typeof o&&null!==o;if(p)switch(o.$$typeof){case l:e:{for(p=o.key,u=r;null!==u;){if(u.key===p){switch(u.tag){case 7:if(o.type===d){n(e,u.sibling),(r=i(u,o.props.children)).return=e,e=r;break e}break;default:if(u.elementType===o.type){n(e,u.sibling),(r=i(u,o.props)).ref=Qt(e,u,o),r.return=e,e=r;break e}}n(e,u);break}t(e,u),u=u.sibling}o.type===d?((r=lo(o.props.children,e.mode,c,o.key)).return=e,e=r):((c=uo(o.type,o.key,o.props,null,e.mode,c)).ref=Qt(e,r,o),c.return=e,e=c)}return a(e);case f:e:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=po(o,e.mode,c)).return=e,e=r}return a(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=fo(o,e.mode,c)).return=e,e=r),a(e);if(Xt(o))return y(e,r,o,c);if(E(o))return b(e,r,o,c);if(p&&Yt(e,o),void 0===o&&!u)switch(e.tag){case 1:case 0:throw e=e.type,Error(s(152,e.displayName||e.name||"Component"))}return n(e,r)}}var en=Jt(!0),tn=Jt(!1),nn={},rn={current:nn},on={current:nn},an={current:nn};function sn(e){if(e===nn)throw Error(s(174));return e}function cn(e,t){De(an,t),De(on,e),De(rn,nn),e=R(t),Me(rn),De(rn,e)}function un(){Me(rn),Me(on),Me(an)}function ln(e){var t=sn(an.current),n=sn(rn.current);n!==(t=A(n,e.type,t))&&(De(on,e),De(rn,t))}function fn(e){on.current===e&&(Me(rn),Me(on))}var dn={current:0};function pn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||_e(n)||xe(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function hn(e,t){return{responder:e,props:t}}var gn=c.ReactCurrentDispatcher,vn=c.ReactCurrentBatchConfig,mn=0,yn=null,bn=null,wn=null,_n=!1;function xn(){throw Error(s(321))}function On(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wt(e[n],t[n]))return!1;return!0}function Sn(e,t,n,r,i,o){if(mn=o,yn=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,gn.current=null===e||null===e.memoizedState?Kn:$n,e=n(r,i),t.expirationTime===mn){o=0;do{if(t.expirationTime=0,!(25>o))throw Error(s(301));o+=1,wn=bn=null,t.updateQueue=null,gn.current=Zn,e=n(r,i)}while(t.expirationTime===mn)}if(gn.current=Gn,t=null!==bn&&null!==bn.next,mn=0,wn=bn=yn=null,_n=!1,t)throw Error(s(300));return e}function En(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===wn?yn.memoizedState=wn=e:wn=wn.next=e,wn}function Cn(){if(null===bn){var e=yn.alternate;e=null!==e?e.memoizedState:null}else e=bn.next;var t=null===wn?yn.memoizedState:wn.next;if(null!==t)wn=t,bn=e;else{if(null===e)throw Error(s(310));e={memoizedState:(bn=e).memoizedState,baseState:bn.baseState,baseQueue:bn.baseQueue,queue:bn.queue,next:null},null===wn?yn.memoizedState=wn=e:wn=wn.next=e}return wn}function kn(e,t){return"function"==typeof t?t(e):t}function Tn(e){var t=Cn(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=bn,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var c=a=o=null,u=i;do{var l=u.expirationTime;if(l<mn){var f={expirationTime:u.expirationTime,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===c?(a=c=f,o=r):c=c.next=f,l>yn.expirationTime&&(yn.expirationTime=l,Wi(l))}else null!==c&&(c=c.next={expirationTime:1073741823,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),Fi(l,u.suspenseConfig),r=u.eagerReducer===e?u.eagerState:e(r,u.action);u=u.next}while(null!==u&&u!==i);null===c?o=r:c.next=a,wt(r,t.memoizedState)||(ar=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function jn(e){var t=Cn(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);wt(o,t.memoizedState)||(ar=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Pn(e){var t=En();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:kn,lastRenderedState:e}).dispatch=qn.bind(null,yn,e),[t.memoizedState,e]}function In(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=yn.updateQueue)?(t={lastEffect:null},yn.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Rn(){return Cn().memoizedState}function An(e,t,n,r){var i=En();yn.effectTag|=e,i.memoizedState=In(1|t,n,void 0,void 0===r?null:r)}function Mn(e,t,n,r){var i=Cn();r=void 0===r?null:r;var o=void 0;if(null!==bn){var a=bn.memoizedState;if(o=a.destroy,null!==r&&On(r,a.deps))return void In(t,n,o,r)}yn.effectTag|=e,i.memoizedState=In(1|t,n,o,r)}function Dn(e,t){return An(516,4,e,t)}function Nn(e,t){return Mn(516,4,e,t)}function Ln(e,t){return Mn(4,2,e,t)}function zn(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Bn(e,t,n){return n=null!=n?n.concat([e]):null,Mn(4,2,zn.bind(null,t,e),n)}function Fn(){}function Wn(e,t){return En().memoizedState=[e,void 0===t?null:t],e}function Hn(e,t){var n=Cn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&On(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Vn(e,t){var n=Cn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&On(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Un(e,t,n){var r=dt();ht(98>r?98:r,(function(){e(!0)})),ht(97<r?97:r,(function(){var r=vn.suspense;vn.suspense=void 0===t?null:t;try{e(!1),n()}finally{vn.suspense=r}}))}function qn(e,t,n){var r=ki(),i=Ht.suspense;i={expirationTime:r=Ti(r,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),t.pending=i,o=e.alternate,e===yn||null!==o&&o===yn)_n=!0,i.expirationTime=mn,yn.expirationTime=mn;else{if(0===e.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,wt(s,a))return}catch(e){}ji(e,r)}}var Gn={readContext:At,useCallback:xn,useContext:xn,useEffect:xn,useImperativeHandle:xn,useLayoutEffect:xn,useMemo:xn,useReducer:xn,useRef:xn,useState:xn,useDebugValue:xn,useResponder:xn,useDeferredValue:xn,useTransition:xn},Kn={readContext:At,useCallback:Wn,useContext:At,useEffect:Dn,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,An(4,2,zn.bind(null,t,e),n)},useLayoutEffect:function(e,t){return An(4,2,e,t)},useMemo:function(e,t){var n=En();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=En();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=qn.bind(null,yn,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},En().memoizedState=e},useState:Pn,useDebugValue:Fn,useResponder:hn,useDeferredValue:function(e,t){var n=Pn(e),r=n[0],i=n[1];return Dn((function(){var n=vn.suspense;vn.suspense=void 0===t?null:t;try{i(e)}finally{vn.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Pn(!1),n=t[0];return t=t[1],[Wn(Un.bind(null,t,e),[t,e]),n]}},$n={readContext:At,useCallback:Hn,useContext:At,useEffect:Nn,useImperativeHandle:Bn,useLayoutEffect:Ln,useMemo:Vn,useReducer:Tn,useRef:Rn,useState:function(){return Tn(kn)},useDebugValue:Fn,useResponder:hn,useDeferredValue:function(e,t){var n=Tn(kn),r=n[0],i=n[1];return Nn((function(){var n=vn.suspense;vn.suspense=void 0===t?null:t;try{i(e)}finally{vn.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Tn(kn),n=t[0];return t=t[1],[Hn(Un.bind(null,t,e),[t,e]),n]}},Zn={readContext:At,useCallback:Hn,useContext:At,useEffect:Nn,useImperativeHandle:Bn,useLayoutEffect:Ln,useMemo:Vn,useReducer:jn,useRef:Rn,useState:function(){return jn(kn)},useDebugValue:Fn,useResponder:hn,useDeferredValue:function(e,t){var n=jn(kn),r=n[0],i=n[1];return Nn((function(){var n=vn.suspense;vn.suspense=void 0===t?null:t;try{i(e)}finally{vn.suspense=n}}),[e,t]),r},useTransition:function(e){var t=jn(kn),n=t[0];return t=t[1],[Hn(Un.bind(null,t,e),[t,e]),n]}},Xn=null,Qn=null,Yn=!1;function Jn(e,t){var n=ao(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function er(e,t){switch(e.tag){case 5:return null!==(t=be(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=we(t,e.pendingProps))&&(e.stateNode=t,!0);case 13:default:return!1}}function tr(e){if(Yn){var t=Qn;if(t){var n=t;if(!er(e,t)){if(!(t=Oe(n))||!er(e,t))return e.effectTag=-1025&e.effectTag|2,Yn=!1,void(Xn=e);Jn(Xn,n)}Xn=e,Qn=Se(t)}else e.effectTag=-1025&e.effectTag|2,Yn=!1,Xn=e}}function nr(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Xn=e}function rr(e){if(!Q||e!==Xn)return!1;if(!Yn)return nr(e),Yn=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!F(t,e.memoizedProps))for(t=Qn;t;)Jn(e,t),t=Oe(t);if(nr(e),13===e.tag){if(!Q)throw Error(s(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));Qn=ke(e)}else Qn=Xn?Oe(e.stateNode):null;return!0}function ir(){Q&&(Qn=Xn=null,Yn=!1)}var or=c.ReactCurrentOwner,ar=!1;function sr(e,t,n,r){t.child=null===e?tn(t,null,n,r):en(t,e.child,n,r)}function cr(e,t,n,r,i){n=n.render;var o=t.ref;return Rt(t,i),r=Sn(e,t,n,r,o,i),null===e||ar?(t.effectTag|=1,sr(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Er(e,t,i))}function ur(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||so(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=uo(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,lr(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:xt)(i,r)&&e.ref===t.ref)?Er(e,t,o):(t.effectTag|=1,(e=co(a,r)).ref=t.ref,e.return=t,t.child=e)}function lr(e,t,n,r,i,o){return null!==e&&xt(e.memoizedProps,r)&&e.ref===t.ref&&(ar=!1,i<o)?(t.expirationTime=e.expirationTime,Er(e,t,o)):dr(e,t,n,r,o)}function fr(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function dr(e,t,n,r,i){var o=We(n)?Be:Le.current;return o=Fe(t,o),Rt(t,i),n=Sn(e,t,n,r,o,i),null===e||ar?(t.effectTag|=1,sr(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Er(e,t,i))}function pr(e,t,n,r,i){if(We(n)){var o=!0;qe(t)}else o=!1;if(Rt(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Kt(t,n,r),Zt(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,u=n.contextType;u="object"==typeof u&&null!==u?At(u):Fe(t,u=We(n)?Be:Le.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==u)&&$t(t,a,r,u),Mt=!1;var d=t.memoizedState;a.state=d,Ft(t,r,a,i),c=t.memoizedState,s!==r||d!==c||ze.current||Mt?("function"==typeof l&&(Ut(t,n,l,r),c=t.memoizedState),(s=Mt||Gt(t,n,s,r,d,c,u))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,Nt(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Ot(t.type,s),c=a.context,u="object"==typeof(u=n.contextType)&&null!==u?At(u):Fe(t,u=We(n)?Be:Le.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==u)&&$t(t,a,r,u),Mt=!1,c=t.memoizedState,a.state=c,Ft(t,r,a,i),d=t.memoizedState,s!==r||c!==d||ze.current||Mt?("function"==typeof l&&(Ut(t,n,l,r),d=t.memoizedState),(l=Mt||Gt(t,n,s,r,c,d,u))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,u)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=u,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return hr(e,t,n,r,o,i)}function hr(e,t,n,r,i,o){fr(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&Ge(t,n,!1),Er(e,t,o);r=t.stateNode,or.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=en(t,e.child,null,o),t.child=en(t,null,s,o)):sr(e,t,s,o),t.memoizedState=r.state,i&&Ge(t,n,!0),t.child}function gr(e){var t=e.stateNode;t.pendingContext?Ve(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ve(0,t.context,!1),cn(e,t.containerInfo)}var vr,mr,yr,br,wr={dehydrated:null,retryTime:0};function _r(e,t,n){var r,i=t.mode,o=t.pendingProps,a=dn.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),De(dn,1&a),null===e){if(void 0!==o.fallback&&tr(t),s){if(s=o.fallback,(o=lo(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=lo(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=wr,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=tn(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=co(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=co(i,o)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=wr,t.child=n,i}return n=en(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=lo(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=lo(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=wr,t.child=o,n}return t.memoizedState=null,t.child=en(t,e,o.children,n)}function xr(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),It(e.return,t)}function Or(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Sr(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(sr(e,t,r.children,n),0!=(2&(r=dn.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&xr(e,n);else if(19===e.tag)xr(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(dn,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===pn(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Or(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===pn(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Or(t,!0,n,null,o,t.lastEffect);break;case"together":Or(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Er(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&Wi(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=co(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=co(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Cr(e){e.effectTag|=4}if(Z)vr=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)L(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},mr=function(){},yr=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var o=t.stateNode,a=sn(rn.current);n=B(o,n,e,r,i,a),(t.updateQueue=n)&&Cr(t)}},br=function(e,t,n,r){n!==r&&Cr(t)};else if(X){vr=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=me(o,i.type,i.memoizedProps,i)),L(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=ye(o,i.memoizedProps,i)),L(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.effectTag)&&(o=null!==i.memoizedState)){var a=i.child;if(null!==a&&(null!==a.child&&(a.child.return=a,vr(e,a,!0,o)),null!==(o=a.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var kr=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=me(o,i.type,i.memoizedProps,i)),he(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=ye(o,i.memoizedProps,i)),he(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.effectTag)&&(o=null!==i.memoizedState)){var a=i.child;if(null!==a&&(null!==a.child&&(a.child.return=a,kr(e,a,!0,o)),null!==(o=a.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};mr=function(e){var t=e.stateNode;if(null!==e.firstEffect){var n=t.containerInfo,r=pe(n);kr(r,e,!1,!1),t.pendingChildren=r,Cr(e),ge(n,r)}},yr=function(e,t,n,r,i){var o=e.stateNode,a=e.memoizedProps;if((e=null===t.firstEffect)&&a===r)t.stateNode=o;else{var s=t.stateNode,c=sn(rn.current),u=null;a!==r&&(u=B(s,n,a,r,i,c)),e&&null===u?t.stateNode=o:(o=de(o,u,n,a,r,t,e,s),z(o,n,r,i,c)&&Cr(t),t.stateNode=o,e?Cr(t):vr(o,t,!1,!1))}},br=function(e,t,n,r){n!==r?(e=sn(an.current),n=sn(rn.current),t.stateNode=H(r,e,n,t),Cr(t)):t.stateNode=e.stateNode}}else mr=function(){},yr=function(){},br=function(){};function Tr(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function jr(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return We(t.type)&&He(),null;case 3:return un(),Me(ze),Me(Le),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(null===e||null===e.child)&&rr(t)&&Cr(t),mr(t),null;case 5:fn(t);var i=sn(an.current);if(n=t.type,null!==e&&null!=t.stateNode)yr(e,t,n,r,i),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(s(166));return null}if(e=sn(rn.current),rr(t)){if(!Q)throw Error(s(175));e=Ee(t.stateNode,t.type,t.memoizedProps,i,e,t),t.updateQueue=e,null!==e&&Cr(t)}else{var o=N(n,r,i,e,t);vr(o,t,!1,!1),t.stateNode=o,z(o,n,r,i,e)&&Cr(t)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)br(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(e=sn(an.current),i=sn(rn.current),rr(t)){if(!Q)throw Error(s(176));Ce(t.stateNode,t.memoizedProps,t)&&Cr(t)}else t.stateNode=H(r,e,i,t)}return null;case 13:return Me(dn),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(r=null!==r,i=!1,null===e?void 0!==t.memoizedProps.fallback&&rr(t):(i=null!==(n=e.memoizedState),r||null===n||null!==(n=e.child.sibling)&&(null!==(o=t.firstEffect)?(t.firstEffect=n,n.nextEffect=o):(t.firstEffect=t.lastEffect=n,n.nextEffect=null),n.effectTag=8)),r&&!i&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&dn.current)?ci===ti&&(ci=ni):(ci!==ti&&ci!==ni||(ci=ri),0!==pi&&null!==oi&&(vo(oi,si),mo(oi,pi)))),X&&r&&(t.effectTag|=4),Z&&(r||i)&&(t.effectTag|=4),null);case 4:return un(),mr(t),null;case 10:return Pt(t),null;case 17:return We(t.type)&&He(),null;case 19:if(Me(dn),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(o=r.rendering)){if(i)Tr(r,!1);else if(ci!==ti||null!==e&&0!=(64&e.effectTag))for(e=t.child;null!==e;){if(null!==(o=pn(e))){for(t.effectTag|=64,Tr(r,!1),null!==(e=o.updateQueue)&&(t.updateQueue=e,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,e=n,r=t.child;null!==r;)n=e,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(o=i.alternate)?(i.childExpirationTime=0,i.expirationTime=n,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=o.childExpirationTime,i.expirationTime=o.expirationTime,i.child=o.child,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,n=o.dependencies,i.dependencies=null===n?null:{expirationTime:n.expirationTime,firstContext:n.firstContext,responders:n.responders}),r=r.sibling;return De(dn,1&dn.current|2),t.child}e=e.sibling}}else{if(!i)if(null!==(e=pn(o))){if(t.effectTag|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.effectTag|=4),Tr(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*ft()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Tr(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=ft()+500),e=r.tail,r.rendering=e,r.tail=e.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=ft(),e.sibling=null,t=dn.current,De(dn,i?1&t|2:1&t),e):null}throw Error(s(156,t.tag))}function Pr(e){switch(e.tag){case 1:We(e.type)&&He();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(un(),Me(ze),Me(Le),0!=(64&(t=e.effectTag)))throw Error(s(285));return e.effectTag=-4097&t|64,e;case 5:return fn(e),null;case 13:return Me(dn),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return Me(dn),null;case 4:return un(),null;case 10:return Pt(e),null;default:return null}}function Ir(e,t){return{value:e,source:t,stack:Ie(t)}}var Rr="function"==typeof WeakSet?WeakSet:Set;function Ar(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=Ie(n)),null!==n&&C(n.type),t=t.value,null!==e&&1===e.tag&&C(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function Mr(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ji(e,t)}else t.current=null}function Dr(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ot(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(s(163))}function Nr(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function Lr(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function zr(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void Lr(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Ot(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&Wt(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=I(n.child.stateNode);break;case 1:e=n.child.stateNode}Wt(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&te(e,n.type,n.memoizedProps,n));case 6:case 4:case 12:return;case 13:return void(Q&&null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&je(n)))));case 19:case 17:case 20:case 21:return}throw Error(s(163))}function Br(e,t,n){switch("function"==typeof io&&io(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;ht(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(e){Ji(i,e)}}e=e.next}while(e!==r)}))}break;case 1:Mr(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Ji(e,t)}}(t,n);break;case 5:Mr(t);break;case 4:Z?Ur(e,t,n):X&&function(e){if(X){e=e.stateNode.containerInfo;var t=pe(e);ve(e,t)}}(t)}}function Fr(e,t,n){for(var r=t;;)if(Br(e,r,n),null===r.child||Z&&4===r.tag){if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}else r.child.return=r,r=r.child}function Wr(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&Wr(t)}function Hr(e){return 5===e.tag||3===e.tag||4===e.tag}function Vr(e){if(Z){e:{for(var t=e.return;null!==t;){if(Hr(t)){var n=t;break e}t=t.return}throw Error(s(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(s(161))}16&n.effectTag&&(se(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Hr(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?ie(r,t,n):J(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?re(r,t,n):Y(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}}function Ur(e,t,n){for(var r,i,o=t,a=!1;;){if(!a){a=o.return;e:for(;;){if(null===a)throw Error(s(160));switch(r=a.stateNode,a.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}a=a.return}a=!0}if(5===o.tag||6===o.tag)Fr(e,o,n),i?ae(r,o.stateNode):oe(r,o.stateNode);else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(Br(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(a=!1)}o.sibling.return=o.return,o=o.sibling}}function qr(e,t){if(Z){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Nr(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&ne(n,o,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(s(162));return n=t.memoizedProps,void ee(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(Q&&(t=t.stateNode,t.hydrate&&(t.hydrate=!1,Te(t.containerInfo))));case 12:return;case 13:return Gr(t),void Kr(t);case 19:return void Kr(t);case 17:return}throw Error(s(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Nr(3,t);case 12:return;case 13:return Gr(t),void Kr(t);case 19:return void Kr(t);case 3:Q&&(n=t.stateNode).hydrate&&(n.hydrate=!1,Te(n.containerInfo))}e:if(X){switch(t.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:t=t.stateNode,ve(t.containerInfo,t.pendingChildren);break e}throw Error(s(163))}}function Gr(e){var t=e;if(null===e.memoizedState)var n=!1;else n=!0,t=e.child,gi=ft();if(Z&&null!==t)e:if(e=t,Z)for(t=e;;){if(5===t.tag){var r=t.stateNode;n?ce(r):le(t.stateNode,t.memoizedProps)}else if(6===t.tag)r=t.stateNode,n?ue(r):fe(r,t.memoizedProps);else{if(13===t.tag&&null!==t.memoizedState&&null===t.memoizedState.dehydrated){(r=t.child.sibling).return=t,t=r;continue}if(null!==t.child){t.child.return=t,t=t.child;continue}}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}}function Kr(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Rr),t.forEach((function(t){var r=to.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var $r="function"==typeof WeakMap?WeakMap:Map;function Zr(e,t,n){(n=Lt(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){mi||(mi=!0,yi=r),Ar(e,t)},n}function Xr(e,t,n){(n=Lt(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return Ar(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===bi?bi=new Set([this]):bi.add(this),Ar(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Qr,Yr=Math.ceil,Jr=c.ReactCurrentDispatcher,ei=c.ReactCurrentOwner,ti=0,ni=3,ri=4,ii=0,oi=null,ai=null,si=0,ci=ti,ui=null,li=1073741823,fi=1073741823,di=null,pi=0,hi=!1,gi=0,vi=null,mi=!1,yi=null,bi=null,wi=!1,_i=null,xi=90,Oi=null,Si=0,Ei=null,Ci=0;function ki(){return 0!=(48&ii)?1073741821-(ft()/10|0):0!==Ci?Ci:Ci=1073741821-(ft()/10|0)}function Ti(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=dt();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&ii))return si;if(null!==n)e=bt(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=bt(e,150,100);break;case 97:case 96:e=bt(e,5e3,250);break;case 95:e=2;break;default:throw Error(s(326))}return null!==oi&&e===si&&--e,e}function ji(e,t){if(50<Si)throw Si=0,Ei=null,Error(s(185));if(null!==(e=Pi(e,t))){var n=dt();1073741823===t?0!=(8&ii)&&0==(48&ii)?Mi(e):(Ri(e),0===ii&&mt()):Ri(e),0==(4&ii)||98!==n&&99!==n||(null===Oi?Oi=new Map([[e,t]]):(void 0===(n=Oi.get(e))||n>t)&&Oi.set(e,t))}}function Pi(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(oi===i&&(Wi(t),ci===ri&&vo(i,si)),mo(i,t)),i}function Ii(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!go(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Ri(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=vt(Mi.bind(null,e));else{var t=Ii(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=ki();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==it&&Ze(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?vt(Mi.bind(null,e)):gt(r,Ai.bind(null,e),{timeout:10*(1073741821-t)-ft()}),e.callbackNode=t}}}function Ai(e,t){if(Ci=0,t)return yo(e,t=ki()),Ri(e),null;var n=Ii(e);if(0!==n){if(t=e.callbackNode,0!=(48&ii))throw Error(s(327));if(Xi(),e===oi&&n===si||Li(e,n),null!==ai){var r=ii;ii|=16;for(var i=Bi();;)try{Vi();break}catch(t){zi(e,t)}if(Tt(),ii=r,Jr.current=i,1===ci)throw t=ui,Li(e,n),vo(e,n),Ri(e),t;if(null===ai)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=ci,oi=null,r){case ti:case 1:throw Error(s(345));case 2:yo(e,2<n?2:n);break;case ni:if(vo(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Gi(i)),1073741823===li&&10<(i=gi+500-ft())){if(hi){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,Li(e,n);break}}if(0!==(o=Ii(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=V(Ki.bind(null,e),i);break}Ki(e);break;case ri:if(vo(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Gi(i)),hi&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,Li(e,n);break}if(0!==(i=Ii(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==fi?r=10*(1073741821-fi)-ft():1073741823===li?r=0:(r=10*(1073741821-li)-5e3,0>(r=(i=ft())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Yr(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=V(Ki.bind(null,e),r);break}Ki(e);break;case 5:if(1073741823!==li&&null!==di){o=li;var a=di;if(0>=(r=0|a.busyMinDurationMs)?r=0:(i=0|a.busyDelayMs,r=(o=ft()-(10*(1073741821-o)-(0|a.timeoutMs||5e3)))<=i?0:i+r-o),10<r){vo(e,n),e.timeoutHandle=V(Ki.bind(null,e),r);break}}Ki(e);break;default:throw Error(s(329))}if(Ri(e),e.callbackNode===t)return Ai.bind(null,e)}}return null}function Mi(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&ii))throw Error(s(327));if(Xi(),e===oi&&t===si||Li(e,t),null!==ai){var n=ii;ii|=16;for(var r=Bi();;)try{Hi();break}catch(t){zi(e,t)}if(Tt(),ii=n,Jr.current=r,1===ci)throw n=ui,Li(e,t),vo(e,t),Ri(e),n;if(null!==ai)throw Error(s(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,oi=null,Ki(e),Ri(e)}return null}function Di(e,t){var n=ii;ii|=1;try{return e(t)}finally{0===(ii=n)&&mt()}}function Ni(e,t){if(0!=(48&ii))throw Error(s(187));var n=ii;ii|=1;try{return ht(99,e.bind(null,t))}finally{ii=n,mt()}}function Li(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(n!==G&&(e.timeoutHandle=G,U(n)),null!==ai)for(n=ai.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&He();break;case 3:un(),Me(ze),Me(Le);break;case 5:fn(r);break;case 4:un();break;case 13:case 19:Me(dn);break;case 10:Pt(r)}n=n.return}oi=e,ai=co(e.current,null),si=t,ci=ti,ui=null,fi=li=1073741823,di=null,pi=0,hi=!1}function zi(e,t){for(;;){try{if(Tt(),gn.current=Gn,_n)for(var n=yn.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(mn=0,wn=bn=yn=null,_n=!1,null===ai||null===ai.return)return ci=1,ui=t,ai=null;e:{var i=e,o=ai.return,a=ai,s=t;if(t=si,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var c=s;if(0==(2&a.mode)){var u=a.alternate;u?(a.updateQueue=u.updateQueue,a.memoizedState=u.memoizedState,a.expirationTime=u.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&dn.current),f=o;do{var d;if(d=13===f.tag){var p=f.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var h=f.memoizedProps;d=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(d){var g=f.updateQueue;if(null===g){var v=new Set;v.add(c),f.updateQueue=v}else g.add(c);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var m=Lt(1073741823,null);m.tag=2,zt(a,m)}a.expirationTime=1073741823;break e}s=void 0,a=t;var y=i.pingCache;if(null===y?(y=i.pingCache=new $r,s=new Set,y.set(c,s)):void 0===(s=y.get(c))&&(s=new Set,y.set(c,s)),!s.has(a)){s.add(a);var b=eo.bind(null,i,c,a);c.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);s=Error((C(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+Ie(a))}5!==ci&&(ci=2),s=Ir(s,a),f=o;do{switch(f.tag){case 3:c=s,f.effectTag|=4096,f.expirationTime=t,Bt(f,Zr(f,c,t));break e;case 1:c=s;var w=f.type,_=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===bi||!bi.has(_)))){f.effectTag|=4096,f.expirationTime=t,Bt(f,Xr(f,c,t));break e}}f=f.return}while(null!==f)}ai=qi(ai)}catch(e){t=e;continue}break}}function Bi(){var e=Jr.current;return Jr.current=Gn,null===e?Gn:e}function Fi(e,t){e<li&&2<e&&(li=e),null!==t&&e<fi&&2<e&&(fi=e,di=t)}function Wi(e){e>pi&&(pi=e)}function Hi(){for(;null!==ai;)ai=Ui(ai)}function Vi(){for(;null!==ai&&!ot();)ai=Ui(ai)}function Ui(e){var t=Qr(e.alternate,e,si);return e.memoizedProps=e.pendingProps,null===t&&(t=qi(e)),ei.current=null,t}function qi(e){ai=e;do{var t=ai.alternate;if(e=ai.return,0==(2048&ai.effectTag)){if(t=jr(t,ai,si),1===si||1!==ai.childExpirationTime){for(var n=0,r=ai.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}ai.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=ai.firstEffect),null!==ai.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=ai.firstEffect),e.lastEffect=ai.lastEffect),1<ai.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=ai:e.firstEffect=ai,e.lastEffect=ai))}else{if(null!==(t=Pr(ai)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=ai.sibling))return t;ai=e}while(null!==ai);return ci===ti&&(ci=5),null}function Gi(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function Ki(e){var t=dt();return ht(99,$i.bind(null,e,t)),null}function $i(e,t){do{Xi()}while(null!==_i);if(0!=(48&ii))throw Error(s(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(s(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=Gi(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===oi&&(ai=oi=null,si=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=ii;ii|=32,ei.current=null,M(e.containerInfo),vi=i;do{try{Zi()}catch(e){if(null===vi)throw Error(s(330));Ji(vi,e),vi=vi.nextEffect}}while(null!==vi);vi=i;do{try{for(var a=e,c=t;null!==vi;){var u=vi.effectTag;if(16&u&&Z&&se(vi.stateNode),128&u){var l=vi.alternate;if(null!==l){var f=l.ref;null!==f&&("function"==typeof f?f(null):f.current=null)}}switch(1038&u){case 2:Vr(vi),vi.effectTag&=-3;break;case 6:Vr(vi),vi.effectTag&=-3,qr(vi.alternate,vi);break;case 1024:vi.effectTag&=-1025;break;case 1028:vi.effectTag&=-1025,qr(vi.alternate,vi);break;case 4:qr(vi.alternate,vi);break;case 8:var d=a,p=vi,h=c;Z?Ur(d,p,h):Fr(d,p,h),Wr(p)}vi=vi.nextEffect}}catch(e){if(null===vi)throw Error(s(330));Ji(vi,e),vi=vi.nextEffect}}while(null!==vi);D(e.containerInfo),e.current=n,vi=i;do{try{for(u=e;null!==vi;){var g=vi.effectTag;if(36&g&&zr(u,vi.alternate,vi),128&g){l=void 0;var v=vi.ref;if(null!==v){var m=vi.stateNode;switch(vi.tag){case 5:l=I(m);break;default:l=m}"function"==typeof v?v(l):v.current=l}}vi=vi.nextEffect}}catch(e){if(null===vi)throw Error(s(330));Ji(vi,e),vi=vi.nextEffect}}while(null!==vi);vi=null,at(),ii=o}else e.current=n;if(wi)wi=!1,_i=e,xi=t;else for(vi=i;null!==vi;)t=vi.nextEffect,vi.nextEffect=null,vi=t;if(0===(t=e.firstPendingTime)&&(bi=null),1073741823===t?e===Ei?Si++:(Si=0,Ei=e):Si=0,"function"==typeof ro&&ro(n.stateNode,r),Ri(e),mi)throw mi=!1,e=yi,yi=null,e;return 0!=(8&ii)||mt(),null}function Zi(){for(;null!==vi;){var e=vi.effectTag;0!=(256&e)&&Dr(vi.alternate,vi),0==(512&e)||wi||(wi=!0,gt(97,(function(){return Xi(),null}))),vi=vi.nextEffect}}function Xi(){if(90!==xi){var e=97<xi?97:xi;return xi=90,ht(e,Qi)}}function Qi(){if(null===_i)return!1;var e=_i;if(_i=null,0!=(48&ii))throw Error(s(331));var t=ii;for(ii|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:Nr(5,n),Lr(5,n)}}catch(t){if(null===e)throw Error(s(330));Ji(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return ii=t,mt(),!0}function Yi(e,t,n){zt(e,t=Zr(e,t=Ir(n,t),1073741823)),null!==(e=Pi(e,1073741823))&&Ri(e)}function Ji(e,t){if(3===e.tag)Yi(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Yi(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===bi||!bi.has(r))){zt(n,e=Xr(n,e=Ir(t,e),1073741823)),null!==(n=Pi(n,1073741823))&&Ri(n);break}}n=n.return}}function eo(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),oi===e&&si===n?ci===ri||ci===ni&&1073741823===li&&ft()-gi<500?Li(e,si):hi=!0:go(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Ri(e)))}function to(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=Ti(t=ki(),e,null)),null!==(e=Pi(e,t))&&Ri(e)}Qr=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||ze.current)ar=!0;else{if(r<n){switch(ar=!1,t.tag){case 3:gr(t),ir();break;case 5:if(ln(t),4&t.mode&&1!==n&&W(t.type,i))return t.expirationTime=t.childExpirationTime=1,null;break;case 1:We(t.type)&&qe(t);break;case 4:cn(t,t.stateNode.containerInfo);break;case 10:jt(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?_r(e,t,n):(De(dn,1&dn.current),null!==(t=Er(e,t,n))?t.sibling:null);De(dn,1&dn.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Sr(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),De(dn,dn.current),!r)return null}return Er(e,t,n)}ar=!1}}else ar=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=Fe(t,Le.current),Rt(t,n),i=Sn(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,We(r)){var o=!0;qe(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Dt(t);var a=r.getDerivedStateFromProps;"function"==typeof a&&Ut(t,r,a,e),i.updater=qt,t.stateNode=i,i._reactInternalFiber=t,Zt(t,r,e,n),t=hr(null,t,r,!0,o,n)}else t.tag=0,sr(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,o=t.tag=function(e){if("function"==typeof e)return so(e)?1:0;if(null!=e){if((e=e.$$typeof)===y)return 11;if(e===_)return 14}return 2}(i),e=Ot(i,e),o){case 0:t=dr(null,t,i,e,n);break e;case 1:t=pr(null,t,i,e,n);break e;case 11:t=cr(null,t,i,e,n);break e;case 14:t=ur(null,t,i,Ot(i.type,e),r,n);break e}throw Error(s(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,dr(e,t,r,i=t.elementType===r?i:Ot(r,i),n);case 1:return r=t.type,i=t.pendingProps,pr(e,t,r,i=t.elementType===r?i:Ot(r,i),n);case 3:if(gr(t),r=t.updateQueue,null===e||null===r)throw Error(s(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,Nt(e,t),Ft(t,r,null,n),(r=t.memoizedState.element)===i)ir(),t=Er(e,t,n);else{if((i=t.stateNode.hydrate)&&(Q?(Qn=Se(t.stateNode.containerInfo),Xn=t,i=Yn=!0):i=!1),i)for(n=tn(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else sr(e,t,r,n),ir();t=t.child}return t;case 5:return ln(t),null===e&&tr(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,F(r,i)?a=null:null!==o&&F(r,o)&&(t.effectTag|=16),fr(e,t),4&t.mode&&1!==n&&W(r,i)?(t.expirationTime=t.childExpirationTime=1,t=null):(sr(e,t,a,n),t=t.child),t;case 6:return null===e&&tr(t),null;case 13:return _r(e,t,n);case 4:return cn(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=en(t,null,r,n):sr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,cr(e,t,r,i=t.elementType===r?i:Ot(r,i),n);case 7:return sr(e,t,t.pendingProps,n),t.child;case 8:case 12:return sr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,jt(t,o=i.value),null!==a){var c=a.value;if(0==(o=wt(c,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(c,o):1073741823))){if(a.children===i.children&&!ze.current){t=Er(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var u=c.dependencies;if(null!==u){a=c.child;for(var l=u.firstContext;null!==l;){if(l.context===r&&0!=(l.observedBits&o)){1===c.tag&&((l=Lt(n,null)).tag=2,zt(c,l)),c.expirationTime<n&&(c.expirationTime=n),null!==(l=c.alternate)&&l.expirationTime<n&&(l.expirationTime=n),It(c.return,n),u.expirationTime<n&&(u.expirationTime=n);break}l=l.next}}else a=10===c.tag&&c.type===t.type?null:c.child;if(null!==a)a.return=c;else for(a=c;null!==a;){if(a===t){a=null;break}if(null!==(c=a.sibling)){c.return=a.return,a=c;break}a=a.return}c=a}}sr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,Rt(t,n),r=r(i=At(i,o.unstable_observedBits)),t.effectTag|=1,sr(e,t,r,n),t.child;case 14:return o=Ot(i=t.type,t.pendingProps),ur(e,t,i,o=Ot(i.type,o),r,n);case 15:return lr(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ot(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,We(r)?(e=!0,qe(t)):e=!1,Rt(t,n),Kt(t,r,i),Zt(t,r,i,n),hr(null,t,r,!0,e,n);case 19:return Sr(e,t,n)}throw Error(s(156,t.tag))};var no={current:!1},ro=null,io=null;function oo(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.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function ao(e,t,n,r){return new oo(e,t,n,r)}function so(e){return!(!(e=e.prototype)||!e.isReactComponent)}function co(e,t){var n=e.alternate;return null===n?((n=ao(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function uo(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)so(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case d:return lo(n.children,i,o,t);case m:a=8,i|=7;break;case p:a=8,i|=1;break;case h:return(e=ao(12,n,t,8|i)).elementType=h,e.type=h,e.expirationTime=o,e;case b:return(e=ao(13,n,t,i)).type=b,e.elementType=b,e.expirationTime=o,e;case w:return(e=ao(19,n,t,i)).elementType=w,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case g:a=10;break e;case v:a=9;break e;case y:a=11;break e;case _:a=14;break e;case x:a=16,r=null;break e;case O:a=22;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=ao(a,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function lo(e,t,n,r){return(e=ao(7,e,r,t)).expirationTime=n,e}function fo(e,t,n){return(e=ao(6,e,null,t)).expirationTime=n,e}function po(e,t,n){return(t=ao(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ho(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=G,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function go(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function vo(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function mo(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function yo(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}var bo=null;function wo(e){var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(s(188));throw Error(s(268,Object.keys(e)))}return null===(e=P(t))?null:e.stateNode}function _o(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function xo(e,t){_o(e,t),(e=e.alternate)&&_o(e,t)}var Oo=c.IsSomeRendererActing,So="function"==typeof o.unstable_flushAllWithoutAsserting,Eo=o.unstable_flushAllWithoutAsserting||function(){for(var e=!1;Xi();)e=!0;return e};function Co(t){try{Eo(),function(t){if(null===bo)try{var n=("require"+Math.random()).slice(0,7);bo=(e&&e[n])("timers").setImmediate}catch(e){bo=function(e){var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}bo(t)}((function(){Eo()?Co(t):t()}))}catch(e){t(e)}}var ko=0,To=!1,jo={__proto__:null,createContainer:function(e,t,n){return e=new ho(e,t,n),t=ao(3,null,null,2===t?7:1===t?3:0),e.current=t,t.stateNode=e,Dt(t),e},updateContainer:function(e,t,n,r){var i=t.current,o=ki(),a=Ht.suspense;o=Ti(o,i,a);e:if(n){t:{if(k(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(s(170));var c=n;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(We(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(null!==c);throw Error(s(171))}if(1===n.tag){var u=n.type;if(We(u)){n=Ue(n,u,c);break e}}n=c}else n=Ne;return null===t.context?t.context=n:t.pendingContext=n,(t=Lt(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),zt(i,t),ji(i,o),o},batchedEventUpdates:function(e,t){var n=ii;ii|=2;try{return e(t)}finally{0===(ii=n)&&mt()}},batchedUpdates:Di,unbatchedUpdates:function(e,t){var n=ii;ii&=-2,ii|=8;try{return e(t)}finally{0===(ii=n)&&mt()}},deferredUpdates:function(e){return ht(97,e)},syncUpdates:function(e,t,n,r){return ht(99,e.bind(null,t,n,r))},discreteUpdates:function(e,t,n,r,i){var o=ii;ii|=4;try{return ht(98,e.bind(null,t,n,r,i))}finally{0===(ii=o)&&mt()}},flushDiscreteUpdates:function(){0==(49&ii)&&(function(){if(null!==Oi){var e=Oi;Oi=null,e.forEach((function(e,t){yo(t,e),Ri(t)})),mt()}}(),Xi())},flushControlled:function(e){var t=ii;ii|=1;try{ht(99,e)}finally{0===(ii=t)&&mt()}},flushSync:Ni,flushPassiveEffects:Xi,IsThisRendererActing:no,getPublicRootInstance:function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:return I(e.child.stateNode);default:return e.child.stateNode}},attemptSynchronousHydration:function(e){switch(e.tag){case 3:var t=e.stateNode;t.hydrate&&function(e,t){yo(e,t),Ri(e),0==(48&ii)&&mt()}(t,t.firstPendingTime);break;case 13:Ni((function(){return ji(e,1073741823)})),t=bt(ki(),150,100),xo(e,t)}},attemptUserBlockingHydration:function(e){if(13===e.tag){var t=bt(ki(),150,100);ji(e,t),xo(e,t)}},attemptContinuousHydration:function(e){13===e.tag&&(ji(e,3),xo(e,3))},attemptHydrationAtCurrentPriority:function(e){if(13===e.tag){var t=ki();ji(e,t=Ti(t,e,null)),xo(e,t)}},findHostInstance:wo,findHostInstanceWithWarning:function(e){return wo(e)},findHostInstanceWithNoPortals:function(e){return null===(e=function(e){if(!(e=j(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}(e))?null:20===e.tag?e.stateNode.instance:e.stateNode},shouldSuspend:function(){return!1},injectIntoDevTools:function(e){var t=e.findFiberByHostInstance;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);ro=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},io=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}return!0}(r({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=P(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))},act:function(e){function t(){ko--,Oo.current=n,no.current=r}!1===To&&(To=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),ko++;var n=Oo.current,r=no.current;Oo.current=!0,no.current=!0;try{var i=Di(e)}catch(e){throw t(),e}if(null!==i&&"object"==typeof i&&"function"==typeof i.then)return{then:function(e,r){i.then((function(){1<ko||!0===So&&!0===n?(t(),e()):Co((function(n){t(),n?r(n):e()}))}),(function(e){t(),r(e)}))}};try{1!==ko||!1!==So&&!1!==n||Eo(),t()}catch(e){throw t(),e}return{then:function(e){e()}}}},Po=jo&&jo.default||jo;e.exports=Po.default||Po;var Io=e.exports;return e.exports=t,Io}}));function X(e,t,n,r,i){}X.resetWarningCache=function(){};var Q=0,Y={__interactionsRef:null,__subscriberRef:null,unstable_clear:function(e){return e()},unstable_getCurrent:function(){return null},unstable_getThreadID:function(){return++Q},unstable_subscribe:function(){},unstable_trace:function(e,t,n){return n()},unstable_unsubscribe:function(){},unstable_wrap:function(e){return e}},J=F((function(e,t){})),ee=(J.__interactionsRef,J.__subscriberRef,J.unstable_clear,J.unstable_getCurrent,J.unstable_getThreadID,J.unstable_subscribe,J.unstable_trace,J.unstable_unsubscribe,J.unstable_wrap,F((function(e){e.exports=Y})),F((function(e){})),F((function(e){e.exports=Z}))),te=function(e,t){return e===t||e!=e&&t!=t},ne=function(e,t){for(var n=e.length;n--;)if(te(e[n][0],t))return n;return-1},re=Array.prototype.splice;
/** @license React v0.19.1
* scheduler-tracing.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.
*/function ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ie.prototype.clear=function(){this.__data__=[],this.size=0},ie.prototype.delete=function(e){var t=this.__data__,n=ne(t,e);return!(n<0||(n==t.length-1?t.pop():re.call(t,n,1),--this.size,0))},ie.prototype.get=function(e){var t=this.__data__,n=ne(t,e);return n<0?void 0:t[n][1]},ie.prototype.has=function(e){return ne(this.__data__,e)>-1},ie.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var oe,ae=ie,se="object"==typeof B&&B&&B.Object===Object&&B,ce="object"==typeof self&&self&&self.Object===Object&&self,ue=se||ce||Function("return this")(),le=ue.Symbol,fe=Object.prototype,de=fe.hasOwnProperty,pe=fe.toString,he=le?le.toStringTag:void 0,ge=Object.prototype.toString,ve=le?le.toStringTag:void 0,me=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ve&&ve in Object(e)?function(e){var t=de.call(e,he),n=e[he];try{e[he]=void 0;var r=!0}catch(e){}var i=pe.call(e);return r&&(t?e[he]=n:delete e[he]),i}(e):function(e){return ge.call(e)}(e)},ye=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},be=function(e){if(!ye(e))return!1;var t=me(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},we=ue["__core-js_shared__"],_e=(oe=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+oe:"",xe=Function.prototype.toString,Oe=function(e){if(null!=e){try{return xe.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Se=/^\[object .+?Constructor\]$/,Ee=Function.prototype,Ce=Object.prototype,ke=Ee.toString,Te=Ce.hasOwnProperty,je=RegExp("^"+ke.call(Te).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pe=function(e){return!(!ye(e)||function(e){return!!_e&&_e in e}(e))&&(be(e)?je:Se).test(Oe(e))},Ie=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(n)?n:void 0},Re=Ie(ue,"Map"),Ae=Ie(Object,"create"),Me=Object.prototype.hasOwnProperty,De=Object.prototype.hasOwnProperty;function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ne.prototype.clear=function(){this.__data__=Ae?Ae(null):{},this.size=0},Ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ne.prototype.get=function(e){var t=this.__data__;if(Ae){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Me.call(t,e)?t[e]:void 0},Ne.prototype.has=function(e){var t=this.__data__;return Ae?void 0!==t[e]:De.call(t,e)},Ne.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ae&&void 0===t?"__lodash_hash_undefined__":t,this};var Le=Ne,ze=function(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map};function Be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Be.prototype.clear=function(){this.size=0,this.__data__={hash:new Le,map:new(Re||ae),string:new Le}},Be.prototype.delete=function(e){var t=ze(this,e).delete(e);return this.size-=t?1:0,t},Be.prototype.get=function(e){return ze(this,e).get(e)},Be.prototype.has=function(e){return ze(this,e).has(e)},Be.prototype.set=function(e,t){var n=ze(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Fe=Be;function We(e){var t=this.__data__=new ae(e);this.size=t.size}We.prototype.clear=function(){this.__data__=new ae,this.size=0},We.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},We.prototype.get=function(e){return this.__data__.get(e)},We.prototype.has=function(e){return this.__data__.has(e)},We.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ae){var r=n.__data__;if(!Re||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fe(r)}return n.set(e,t),this.size=n.size,this};var He=We;function Ve(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Fe;++t<n;)this.add(e[t])}Ve.prototype.add=Ve.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ve.prototype.has=function(e){return this.__data__.has(e)};var Ue=Ve,qe=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Ge=function(e,t){return e.has(t)},Ke=function(e,t,n,r,i,o){var a=1&n,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var l=-1,f=!0,d=2&n?new Ue:void 0;for(o.set(e,t),o.set(t,e);++l<s;){var p=e[l],h=t[l];if(r)var g=a?r(h,p,l,t,e,o):r(p,h,l,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(d){if(!qe(t,(function(e,t){if(!Ge(d,t)&&(p===e||i(p,e,n,r,o)))return d.push(t)}))){f=!1;break}}else if(p!==h&&!i(p,h,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f},$e=ue.Uint8Array,Ze=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Xe=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Qe=le?le.prototype:void 0,Ye=Qe?Qe.valueOf:void 0,Je=Array.isArray,et=Object.prototype.propertyIsEnumerable,tt=Object.getOwnPropertySymbols,nt=tt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(tt(e),(function(t){return et.call(e,t)})))}:function(){return[]},rt=function(e){return null!=e&&"object"==typeof e},it=function(e){return rt(e)&&"[object Arguments]"==me(e)},ot=Object.prototype,at=ot.hasOwnProperty,st=ot.propertyIsEnumerable,ct=it(function(){return arguments}())?it:function(e){return rt(e)&&at.call(e,"callee")&&!st.call(e,"callee")},ut=function(){return!1},lt=F((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n?ue.Buffer:void 0,o=(i?i.isBuffer:void 0)||ut;e.exports=o})),ft=/^(?:0|[1-9]\d*)$/,dt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ft.test(e))&&e>-1&&e%1==0&&e<t},pt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ht={};ht["[object Float32Array]"]=ht["[object Float64Array]"]=ht["[object Int8Array]"]=ht["[object Int16Array]"]=ht["[object Int32Array]"]=ht["[object Uint8Array]"]=ht["[object Uint8ClampedArray]"]=ht["[object Uint16Array]"]=ht["[object Uint32Array]"]=!0,ht["[object Arguments]"]=ht["[object Array]"]=ht["[object ArrayBuffer]"]=ht["[object Boolean]"]=ht["[object DataView]"]=ht["[object Date]"]=ht["[object Error]"]=ht["[object Function]"]=ht["[object Map]"]=ht["[object Number]"]=ht["[object Object]"]=ht["[object RegExp]"]=ht["[object Set]"]=ht["[object String]"]=ht["[object WeakMap]"]=!1;var gt=F((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n&&se.process,o=function(){try{return r&&r.require&&r.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o})),vt=gt&&gt.isTypedArray,mt=vt?function(e){return function(t){return e(t)}}(vt):function(e){return rt(e)&&pt(e.length)&&!!ht[me(e)]},yt=Object.prototype.hasOwnProperty,bt=function(e,t){var n=Je(e),r=!n&&ct(e),i=!n&&!r&&lt(e),o=!n&&!r&&!i&&mt(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)!t&&!yt.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||dt(u,c))||s.push(u);return s},wt=Object.prototype,_t=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),xt=Object.prototype.hasOwnProperty,Ot=function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||wt)}(e))return _t(e);var t=[];for(var n in Object(e))xt.call(e,n)&&"constructor"!=n&&t.push(n);return t},St=function(e){return function(e){return null!=e&&pt(e.length)&&!be(e)}(e)?bt(e):Ot(e)},Et=function(e){return function(e,t,n){var r=t(e);return Je(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,St,nt)},Ct=Object.prototype.hasOwnProperty,kt=Ie(ue,"DataView"),Tt=Ie(ue,"Promise"),jt=Ie(ue,"Set"),Pt=Ie(ue,"WeakMap"),It=Oe(kt),Rt=Oe(Re),At=Oe(Tt),Mt=Oe(jt),Dt=Oe(Pt),Nt=me;(kt&&"[object DataView]"!=Nt(new kt(new ArrayBuffer(1)))||Re&&"[object Map]"!=Nt(new Re)||Tt&&"[object Promise]"!=Nt(Tt.resolve())||jt&&"[object Set]"!=Nt(new jt)||Pt&&"[object WeakMap]"!=Nt(new Pt))&&(Nt=function(e){var t=me(e),n="[object Object]"==t?e.constructor:void 0,r=n?Oe(n):"";if(r)switch(r){case It:return"[object DataView]";case Rt:return"[object Map]";case At:return"[object Promise]";case Mt:return"[object Set]";case Dt:return"[object WeakMap]"}return t});var Lt=Nt,zt=Object.prototype.hasOwnProperty,Bt=function(e,t,n,r,i,o){var a=Je(e),s=Je(t),c=a?"[object Array]":Lt(e),u=s?"[object Array]":Lt(t),l="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),d=c==u;if(d&&lt(e)){if(!lt(t))return!1;a=!0,l=!1}if(d&&!l)return o||(o=new He),a||mt(e)?Ke(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return te(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Ze;case"[object Set]":var c=1&r;if(s||(s=Xe),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var l=Ke(s(e),s(t),r,i,o,a);return a.delete(e),l;case"[object Symbol]":if(Ye)return Ye.call(e)==Ye.call(t)}return!1}(e,t,c,n,r,i,o);if(!(1&n)){var p=l&&zt.call(e,"__wrapped__"),h=f&&zt.call(t,"__wrapped__");if(p||h){var g=p?e.value():e,v=h?t.value():t;return o||(o=new He),i(g,v,n,r,o)}}return!!d&&(o||(o=new He),function(e,t,n,r,i,o){var a=1&n,s=Et(e),c=s.length;if(c!=Et(t).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in t:Ct.call(t,l)))return!1}var f=o.get(e);if(f&&o.get(t))return f==t;var d=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<c;){var h=e[l=s[u]],g=t[l];if(r)var v=a?r(g,h,l,t,e,o):r(h,g,l,e,t,o);if(!(void 0===v?h===g||i(h,g,n,r,o):v)){d=!1;break}p||(p="constructor"==l)}if(d&&!p){var m=e.constructor,y=t.constructor;m==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y||(d=!1)}return o.delete(e),o.delete(t),d}(e,t,n,r,i,o))},Ft=function(e,t){return function e(t,n,r,i,o){return t===n||(null==t||null==n||!rt(t)&&!rt(n)?t!=t&&n!=n:Bt(t,n,r,i,e,o))}(e,t)};function Wt(e,t){Object.entries(t).forEach((function(t){var n=_(t,2),r=n[0],i=n[1];if("children"!==r){var o=e[r];o?o.push(i):e[r]=[i]}}))}function Ht(e){return function(t,n,r){var i,o=n.children,a=n.pathData,s=m(n,["children","pathData"]),c=e[t];return c&&(i=c(s,r,o),a&&(i.pathData=a)),i}}var Vt=Ht(E),Ut={getRootHostContext:function(e){return e},getChildHostContext:function(e,t,n){return{}},getPublicInstance:function(e){return e},createInstance:Vt,appendInitialChild:function(e,t){e instanceof s.Group&&t instanceof s.Item?e.addChild(t):e instanceof s.TextItem&&"string"==typeof t&&Object.assign(e,{content:t})},finalizeInitialChildren:function(e,t,n){return!0},commitMount:function(e,t,n,r){},prepareUpdate:function(e,t,n,r,i,o){return function(e,t){var n=[],r={};return Wt(r,e),Wt(r,t),Object.entries(r).forEach((function(e){var r=_(e,2),i=r[0],o=r[1];if(1===o.length)if(i in t){var a=_(o,1)[0];n.push(i,a)}else n.push(i,null);else if(2===o.length){var s=_(o,2),c=s[0],u=s[1];Ft(c,u)||n.push(i,u)}})),n.length?n:null}(n,r)},shouldSetTextContent:function(e,t){return"string"==typeof t.children},shouldDeprioritizeSubtree:function(e,t){return!1},createTextInstance:function(e,t,n,r){return e},scheduleDeferredCallback:"undefined"!=typeof window?window.requestIdleCallback:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};setTimeout(e,t.timeout)},prepareForCommit:function(){},resetAfterCommit:function(){},now:Date.now,supportsMutation:!0,commitUpdate:function(e,t,n,r,i,o){!function(e,t){for(var n=1;n<t.length;n+=2){var r=t[n-1],i=t[n];"center"===r?e.position=i:"from"===r?e.firstSegment.point=i:"to"===r?e.lastSegment.point=i:r in e?e[r]=i:console.log("instance does not have property ".concat(r),e)}}(e,t)},commitTextUpdate:function(e,t,n){},resetTextContent:function(e){},appendChild:function(e,t){e instanceof s.Group&&t instanceof s.Item&&e.addChild(t)},appendChildToContainer:function(e,t){if(t instanceof s.Item){var n=e.project.layers,r=n.$$default,i=n.$$metadata;t instanceof s.Layer?t.insertBelow(i):t.addTo(r)}else t instanceof s.Tool&&t.activate()},insertBefore:function(e,t,n){},insertInContainerBefore:function(e,t,n){var r=e.project.layers,i=r.$$default,o=r.$$metadata;t instanceof s.Layer&&n instanceof s.Layer?t.insertBelow(n):t instanceof s.Layer?t.insertBelow(o):t instanceof s.Item&&n instanceof s.Layer?t.addTo(i):t instanceof s.Item&&n instanceof s.Item&&t.insertBelow(n)},removeChild:function(e,t){t.remove()},removeChildFromContainer:function(e,t){t instanceof Object&&t.remove()}},qt=function(){function e(){c(this,e),this.defaultHostConfig=Ut,this.defaultTypes=E,this.reconciler=void 0,this.createInstance=void 0;var t=this.getInstanceFactory(),n=this.getHostConfig();this.defaultTypes!==t&&Ut===n?(this.createInstance=Ht(t),n=h(h({},n),{},{createInstance:this.createInstance})):this.createInstance=Vt,this.reconciler=ee(n)}return l(e,[{key:"getInstanceFactory",value:function(){return this.defaultTypes}},{key:"getHostConfig",value:function(){return this.defaultHostConfig}}]),e}();function Gt(e,t){return"function"==typeof t?t(e):t||{}}var Kt,$t,Zt,Xt=function(){return function(e,t,n){return h(h({},Gt(n,t)),Gt(n,e))}},Qt=function(e){var t,n;return n=t=function(t){g(r,o.Component);var n=w(r);function r(e){var t;c(this,r),(t=n.call(this,e)).mergeContainerProps=z(Xt()),t.mergeViewProps=z(Xt()),t.mergeCanvasProps=z(Xt()),t.renderer=void 0;var i=e.renderer,o=void 0===i?qt:i;return t.renderer=new o,t.state={paper:t.renderer.createInstance(S.PaperScope,{},s),mergeProps:e.mergeProps||function(n){return t.setState((function(t){return n(t,e)}))}},t}return l(r,[{key:"render",value:function(){var t=this.props,n=t.innerRef,r=t.children,i=t.viewProps,a=t.canvasProps,s=m(t,["innerRef","children","viewProps","canvasProps"]),c=this.state,u=c.viewProps,l=c.canvasProps,f=m(c,["viewProps","canvasProps"]);return o.createElement(e,d({},this.mergeContainerProps(f,s,f.paper),{viewProps:this.mergeViewProps(u,i,f.paper),canvasProps:this.mergeCanvasProps(l,a,f.paper),ref:n,renderer:this.renderer}),o.createElement(D.Provider,{value:f},r))}}]),r}(),t.defaultProps={renderer:qt,children:null},n}((Zt=$t=function(e){g(n,o.Component);var t=w(n);function n(e){var r;c(this,n),(r=t.call(this,e)).mountNode=void 0,r.canvas=void 0,r.update=function(){var e=r.props,t=e.paper,n=e.viewProps,i=e.renderer,o=e.children;Object.assign(t.view,n),i.reconciler.updateContainer(o,r.mountNode,y(r))};var i=r.props,a=i.renderer,s=i.paper;return r.mountNode=a.reconciler.createContainer(s),r.canvas=o.createRef(),r}return l(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.paper,n=e.onMount;if(this.canvas.current){t.setup(this.canvas.current);var r=this.newLayer({name:"$$default"});this.newLayer({name:"$$metadata"}),r.activate(),this.update()}n&&n(t)}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.props.renderer.reconciler.updateContainer(null,this.mountNode,this)}},{key:"newLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.props,n=t.paper,r=t.renderer;return n.project.addLayer(r.createInstance(S.Layer,e,n))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.canvasProps;return o.createElement("canvas",d({},n,{className:t,ref:this.canvas}))}}]),n}(),$t.defaultProps={onMount:function(){}},Kt=Zt))||Kt,Yt=o.forwardRef((function(e,t){return o.createElement(Qt,d({},e,{innerRef:t}))}));t.CONSTANTS=S,t.Circle=A,t.Group=j,t.Layer=T,t.Line=I,t.PaperContainer=Yt,t.PaperRenderer=qt,t.PaperScope=function(e){return function(t){return a.createElement(D.Consumer,null,(function(n){return a.createElement(e,d({},t,n))}))}},t.Path=P,t.PointText=M,t.Rectangle=R,t.Tool=k,t.components=C,t.default={render:function(){}},t.getProps=Gt,t.renderWithPaperScope=function(e){return a.createElement(D.Consumer,null,(function(t){var n=t.paper;return e(n)}))}}).call(this,n(91))},function(e,t,n){var r,i;
/*!
* Paper.js v0.12.15 - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
* http://juerglehni.com/ & https://puckey.studio/
*
* Distributed under the MIT license. See LICENSE file for details.
*
* All rights reserved.
*
* Date: Wed Mar 17 10:49:48 2021 +0100
*
***
*
* Straps.js - Class inheritance library with support for bean-style accessors
*
* Copyright (c) 2006 - 2020 Jürg Lehni
* http://juerglehni.com/
*
* Distributed under the MIT license.
*
***
*
* Acorn.js
* https://marijnhaverbeke.nl/acorn/
*
* Acorn is a tiny, fast JavaScript parser written in JavaScript,
* created by Marijn Haverbeke and released under an MIT license.
*
*/(function(o,a){var s=(o=o||n(606)).window,c=o.document,u=new function(){var e=/^(statics|enumerable|beans|preserve)$/,t=[],n=t.slice,r=Object.create,i=Object.getOwnPropertyDescriptor,o=Object.defineProperty,s=t.forEach||function(e,t){for(var n=0,r=this.length;n<r;n++)e.call(t,this[n],n,this)},c=function(e,t){for(var n in this)this.hasOwnProperty(n)&&e.call(t,this[n],n,this)},u=Object.assign||function(e){for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e},l=function(e,t,n){if(e){var r=i(e,"length");(r&&"number"==typeof r.value?s:c).call(e,t,n=n||e)}return n};function f(t,n,r,a,s){var c={};function u(e,u){"string"==typeof(u=u||(u=i(n,e))&&(u.get?u:u.value))&&"#"===u[0]&&(u=t[u.substring(1)]||u);var l,f="function"==typeof u,p=u,h=s||f&&!u.base?u&&u.get?e in t:t[e]:null;s&&h||(f&&h&&(u.base=h),f&&!1!==a&&(l=e.match(/^([gs]et|is)(([A-Z])(.*))$/))&&(c[l[3].toLowerCase()+l[4]]=l[2]),p&&!f&&p.get&&"function"==typeof p.get&&d.isPlainObject(p)||(p={value:p,writable:!0}),(i(t,e)||{configurable:!0}).configurable&&(p.configurable=!0,p.enumerable=null!=r?r:!l),o(t,e,p))}if(n){for(var l in n)n.hasOwnProperty(l)&&!e.test(l)&&u(l);for(var l in c){var f=c[l],p=t["set"+f],h=t["get"+f]||p&&t["is"+f];!h||!0!==a&&0!==h.length||u(l,{get:h,set:p})}}return t}function d(){for(var e=0,t=arguments.length;e<t;e++){var n=arguments[e];n&&u(this,n)}return this}return f(d,{inject:function(e){if(e){var t=!0===e.statics?e:e.statics,n=e.beans,r=e.preserve;t!==e&&f(this.prototype,e,e.enumerable,n,r),f(this,t,null,n,r)}for(var i=1,o=arguments.length;i<o;i++)this.inject(arguments[i]);return this},extend:function(){for(var e,t,n,i=this,a=0,s=arguments.length;a<s&&(!e||!t);a++)n=arguments[a],e=e||n.initialize,t=t||n.prototype;return t=(e=e||function(){i.apply(this,arguments)}).prototype=t||r(this.prototype),o(t,"constructor",{value:e,writable:!0,configurable:!0}),f(e,this),arguments.length&&this.inject.apply(e,arguments),e.base=i,e}}).inject({enumerable:!1,initialize:d,set:d,inject:function(){for(var e=0,t=arguments.length;e<t;e++){var n=arguments[e];n&&f(this,n,n.enumerable,n.beans,n.preserve)}return this},extend:function(){var e=r(this);return e.inject.apply(e,arguments)},each:function(e,t){return l(this,e,t)},clone:function(){return new this.constructor(this)},statics:{set:u,each:l,create:r,define:o,describe:i,clone:function(e){return u(new e.constructor,e)},isPlainObject:function(e){var t=null!=e&&e.constructor;return t&&(t===Object||t===d||"Object"===t.name)},pick:function(e,t){return e!==a?e:t},slice:function(e,t,r){return n.call(e,t,r)}}})};e.exports=u,u.inject({enumerable:!1,toString:function(){return null!=this._id?(this._class||"Object")+(this._name?" '"+this._name+"'":" @"+this._id):"{ "+u.each(this,(function(e,t){if(!/^_/.test(t)){var n=typeof e;this.push(t+": "+("number"===n?h.instance.number(e):"string"===n?"'"+e+"'":e))}}),[]).join(", ")+" }"},getClassName:function(){return this._class||""},importJSON:function(e){return u.importJSON(e,this)},exportJSON:function(e){return u.exportJSON(this,e)},toJSON:function(){return u.serialize(this)},set:function(e,t){return e&&u.filter(this,e,t,this._prioritize),this}},{beans:!1,statics:{exports:{},extend:function e(){var t=e.base.apply(this,arguments),n=t.prototype._class;return n&&!u.exports[n]&&(u.exports[n]=t),t},equals:function(e,t){if(e===t)return!0;if(e&&e.equals)return e.equals(t);if(t&&t.equals)return t.equals(e);if(e&&t&&"object"==typeof e&&"object"==typeof t){if(Array.isArray(e)&&Array.isArray(t)){if((n=e.length)!==t.length)return!1;for(;n--;)if(!u.equals(e[n],t[n]))return!1}else{var n,r=Object.keys(e);if((n=r.length)!==Object.keys(t).length)return!1;for(;n--;){var i=r[n];if(!t.hasOwnProperty(i)||!u.equals(e[i],t[i]))return!1}}return!0}return!1},read:function(e,t,n,r){if(this===u){var i=this.peek(e,t);return e.__index++,i}var o=this.prototype,s=o._readIndex,c=t||s&&e.__index||0,l=e.length,f=e[c];if(r=r||l-c,f instanceof this||n&&n.readNull&&null==f&&r<=1)return s&&(e.__index=c+1),f&&n&&n.clone?f.clone():f;if(f=u.create(o),s&&(f.__read=!0),f=f.initialize.apply(f,c>0||c+r<l?u.slice(e,c,c+r):e)||f,s){e.__index=c+f.__read;var d=f.__filtered;d&&(e.__filtered=d,f.__filtered=a),f.__read=a}return f},peek:function(e,t){return e[e.__index=t||e.__index||0]},remain:function(e){return e.length-(e.__index||0)},readList:function(e,t,n,r){for(var i,o=[],a=t||0,s=r?a+r:e.length,c=a;c<s;c++)o.push(Array.isArray(i=e[c])?this.read(i,0,n):this.read(e,c,n,1));return o},readNamed:function(e,t,n,r,i){var o=this.getNamed(e,t),s=o!==a;if(s){var c=e.__filtered;if(!c){var l=this.getSource(e);(c=e.__filtered=u.create(l)).__unfiltered=l}c[t]=a}return this.read(s?[o]:e,n,r,i)},readSupported:function(e,t){var n=this.getSource(e),r=this,i=!1;return n&&Object.keys(n).forEach((function(n){if(n in t){var o=r.readNamed(e,n);o!==a&&(t[n]=o),i=!0}})),i},getSource:function(e){var t=e.__source;if(t===a){var n=1===e.length&&e[0];t=e.__source=n&&u.isPlainObject(n)?n:null}return t},getNamed:function(e,t){var n=this.getSource(e);if(n)return t?n[t]:e.__filtered||n},hasNamed:function(e,t){return!!this.getNamed(e,t)},filter:function(e,t,n,r){var i;function o(r){if(!(n&&r in n||i&&r in i)){var o=t[r];o!==a&&(e[r]=o)}}if(r){for(var s,c={},u=0,l=r.length;u<l;u++)(s=r[u])in t&&(o(s),c[s]=!0);i=c}return Object.keys(t.__unfiltered||t).forEach(o),e},isPlainValue:function(e,t){return u.isPlainObject(e)||Array.isArray(e)||t&&"string"==typeof e},serialize:function(e,t,n,r){t=t||{};var i,o=!r;if(o&&(t.formatter=new h(t.precision),r={length:0,definitions:{},references:{},add:function(e,t){var n="#"+e._id,r=this.references[n];if(!r){this.length++;var i=t.call(e),o=e._class;o&&i[0]!==o&&i.unshift(o),this.definitions[n]=i,r=this.references[n]=[n]}return r}}),e&&e._serialize){i=e._serialize(t,r);var a=e._class;!a||e._compactSerialize||!o&&n||i[0]===a||i.unshift(a)}else if(Array.isArray(e)){i=[];for(var s=0,c=e.length;s<c;s++)i[s]=u.serialize(e[s],t,n,r)}else if(u.isPlainObject(e)){i={};var l=Object.keys(e);for(s=0,c=l.length;s<c;s++){var f=l[s];i[f]=u.serialize(e[f],t,n,r)}}else i="number"==typeof e?t.formatter.number(e,t.precision):e;return o&&r.length>0?[["dictionary",r.definitions],i]:i},deserialize:function(e,t,n,r,i){var o=e,a=!n,s=a&&e&&e.length&&"dictionary"===e[0][0];if(n=n||{},Array.isArray(e)){var c=e[0],l="dictionary"===c;if(1==e.length&&/^#/.test(c))return n.dictionary[c];o=[];for(var f=(c=u.exports[c])?1:0,d=e.length;f<d;f++)o.push(u.deserialize(e[f],t,n,l,s));if(c){var p=o;o=t?t(c,p,a||i):new c(p)}}else if(u.isPlainObject(e))for(var h in o={},r&&(n.dictionary=o),e)o[h]=u.deserialize(e[h],t,n);return s?o[1]:o},exportJSON:function(e,t){var n=u.serialize(e,t);return t&&0==t.asString?n:JSON.stringify(n)},importJSON:function(e,t){return u.deserialize("string"==typeof e?JSON.parse(e):e,(function(e,n,r){var i=r&&t&&t.constructor===e,o=i?t:u.create(e.prototype);if(1===n.length&&o instanceof C&&(i||!(o instanceof T))){var a=n[0];u.isPlainObject(a)&&(a.insert=!1,i&&(n=n.concat([{insert:!0}])))}return(i?o.set:e).apply(o,n),i&&(t=null),o}))},push:function(e,t){var n=t.length;if(n<4096)e.push.apply(e,t);else{var r=e.length;e.length+=n;for(var i=0;i<n;i++)e[r+i]=t[i]}return e},splice:function(e,t,n,r){var i=t&&t.length,o=n===a;(n=o?e.length:n)>e.length&&(n=e.length);for(var s=0;s<i;s++)t[s]._index=n+s;if(o)return u.push(e,t),[];var c=[n,r];t&&u.push(c,t);for(var l=e.splice.apply(e,c),f=(s=0,l.length);s<f;s++)l[s]._index=a;for(s=n+i,f=e.length;s<f;s++)e[s]._index=s;return l},capitalize:function(e){return e.replace(/\b[a-z]/g,(function(e){return e.toUpperCase()}))},camelize:function(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))},hyphenate:function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}});var l={on:function(e,t){if("string"!=typeof e)u.each(e,(function(e,t){this.on(t,e)}),this);else{var n=this._eventTypes,r=n&&n[e],i=this._callbacks=this._callbacks||{};-1===(i=i[e]=i[e]||[]).indexOf(t)&&(i.push(t),r&&r.install&&1===i.length&&r.install.call(this,e))}return this},off:function(e,t){if("string"==typeof e){var n,r=this._eventTypes,i=r&&r[e],o=this._callbacks&&this._callbacks[e];return o&&(!t||-1!==(n=o.indexOf(t))&&1===o.length?(i&&i.uninstall&&i.uninstall.call(this,e),delete this._callbacks[e]):-1!==n&&o.splice(n,1)),this}u.each(e,(function(e,t){this.off(t,e)}),this)},once:function(e,t){return this.on(e,(function n(){t.apply(this,arguments),this.off(e,n)}))},emit:function(e,t){var n=this._callbacks&&this._callbacks[e];if(!n)return!1;var r=u.slice(arguments,1),i=t&&t.target&&!t.currentTarget;n=n.slice(),i&&(t.currentTarget=this);for(var o=0,a=n.length;o<a;o++)if(0==n[o].apply(this,r)){t&&t.stop&&t.stop();break}return i&&delete t.currentTarget,!0},responds:function(e){return!(!this._callbacks||!this._callbacks[e])},attach:"#on",detach:"#off",fire:"#emit",_installEvents:function(e){var t=this._eventTypes,n=this._callbacks,r=e?"install":"uninstall";if(t)for(var i in n)if(n[i].length>0){var o=t[i],a=o&&o[r];a&&a.call(this,i)}},statics:{inject:function e(t){var n=t._events;if(n){var r={};u.each(n,(function(e,n){var i="string"==typeof e,o=i?e:n,a=u.capitalize(o),s=o.substring(2).toLowerCase();r[s]=i?{}:e,o="_"+o,t["get"+a]=function(){return this[o]},t["set"+a]=function(e){var t=this[o];t&&this.off(s,t),e&&this.on(s,e),this[o]=e}})),t._eventTypes=r}return e.base.apply(this,arguments)}}},f=u.extend({_class:"PaperScope",initialize:function e(){le=this,this.settings=new u({applyMatrix:!0,insertItems:!0,handleSize:4,hitTolerance:0}),this.project=null,this.projects=[],this.tools=[],this._id=e._id++,e._scopes[this._id]=this;var t=e.prototype;if(!this.support){var n=ae.getContext(1,1)||{};t.support={nativeDash:"setLineDash"in n||"mozDash"in n,nativeBlendModes:se.nativeModes},ae.release(n)}if(!this.agent){var r=o.navigator.userAgent.toLowerCase(),i=(/(darwin|win|mac|linux|freebsd|sunos)/.exec(r)||[])[0],a="darwin"===i?"mac":i,s=t.agent=t.browser={platform:a};a&&(s[a]=!0),r.replace(/(opera|chrome|safari|webkit|firefox|msie|trident|atom|node|jsdom)\/?\s*([.\d]+)(?:.*version\/([.\d]+))?(?:.*rv\:v?([.\d]+))?/g,(function(e,t,n,r,i){if(!s.chrome){var o="opera"===t?r:/^(node|trident)$/.test(t)?i:n;s.version=o,s.versionNumber=parseFloat(o),t={trident:"msie",jsdom:"node"}[t]||t,s.name=t,s[t]=!0}})),s.chrome&&delete s.webkit,s.atom&&delete s.chrome}},version:"0.12.15",getView:function(){var e=this.project;return e&&e._view},getPaper:function(){return this},execute:function(e,t){},install:function(e){var t=this;for(var n in u.each(["project","view","tool"],(function(n){u.define(e,n,{configurable:!0,get:function(){return t[n]}})})),this)!/^_/.test(n)&&this[n]&&(e[n]=this[n])},setup:function(e){return le=this,this.project=new E(e),this},createCanvas:function(e,t){return ae.getCanvas(e,t)},activate:function(){le=this},clear:function(){for(var e=this.projects,t=this.tools,n=e.length-1;n>=0;n--)e[n].remove();for(n=t.length-1;n>=0;n--)t[n].remove()},remove:function(){this.clear(),delete f._scopes[this._id]},statics:new function(){function e(e){return e+="Attribute",function(t,n){return t[e](n)||t[e]("data-paper-"+n)}}return{_scopes:{},_id:0,get:function(e){return this._scopes[e]||null},getAttribute:e("get"),hasAttribute:e("has")}}}),d=u.extend(l,{initialize:function(e){this._scope=le,this._index=this._scope[this._list].push(this)-1,!e&&this._scope[this._reference]||this.activate()},activate:function(){if(!this._scope)return!1;var e=this._scope[this._reference];return e&&e!==this&&e.emit("deactivate"),this._scope[this._reference]=this,this.emit("activate",e),!0},isActive:function(){return this._scope[this._reference]===this},remove:function(){return null!=this._index&&(u.splice(this._scope[this._list],null,this._index,1),this._scope[this._reference]==this&&(this._scope[this._reference]=null),this._scope=null,!0)},getView:function(){return this._scope.getView()}}),p={findItemBoundsCollisions:function(e,t,n){function r(e){for(var t=new Array(e.length),n=0;n<e.length;n++){var r=e[n].getBounds();t[n]=[r.left,r.top,r.right,r.bottom]}return t}var i=r(e),o=t&&t!==e?r(t):i;return this.findBoundsCollisions(i,o,n||0)},findCurveBoundsCollisions:function(e,t,n,r){function i(e){for(var t=Math.min,n=Math.max,r=new Array(e.length),i=0;i<e.length;i++){var o=e[i];r[i]=[t(o[0],o[2],o[4],o[6]),t(o[1],o[3],o[5],o[7]),n(o[0],o[2],o[4],o[6]),n(o[1],o[3],o[5],o[7])]}return r}var o=i(e),a=t&&t!==e?i(t):o;if(r){for(var s=this.findBoundsCollisions(o,a,n||0,!1,!0),c=this.findBoundsCollisions(o,a,n||0,!0,!0),u=[],l=0,f=s.length;l<f;l++)u[l]={hor:s[l],ver:c[l]};return u}return this.findBoundsCollisions(o,a,n||0)},findBoundsCollisions:function(e,t,n,r,i){var o=!t||e===t,a=o?e:e.concat(t),s=e.length,c=a.length;function u(e,t,n){for(var r=0,i=e.length;r<i;){var o=i+r>>>1;a[e[o]][t]<n?r=o+1:i=o}return r-1}for(var l=r?1:0,f=l+2,d=r?0:1,p=d+2,h=new Array(c),g=0;g<c;g++)h[g]=g;h.sort((function(e,t){return a[e][l]-a[t][l]}));var v=[],m=new Array(s);for(g=0;g<c;g++){var y=h[g],b=a[y],w=o?y:y-s,_=y<s,x=o||!_,O=_?[]:null;if(v.length){var S=u(v,f,b[l]-n)+1;if(v.splice(0,S),o&&i){O=O.concat(v);for(var E=0;E<v.length;E++){m[T=v[E]].push(w)}}else{var C=b[p],k=b[d];for(E=0;E<v.length;E++){var T=v[E],j=a[T],P=T<s,I=o||T>=s;(i||(_&&I||x&&P)&&C>=j[d]-n&&k<=j[p]+n)&&(_&&I&&O.push(o?T:T-s),x&&P&&m[T].push(w))}}}if(_&&(e===t&&O.push(y),m[y]=O),v.length){var R=u(v,f,b[f]);v.splice(R+1,0,y)}else v.push(y)}for(g=0;g<m.length;g++){var A=m[g];A&&A.sort((function(e,t){return e-t}))}return m}},h=u.extend({initialize:function(e){this.precision=u.pick(e,5),this.multiplier=Math.pow(10,this.precision)},number:function(e){return this.precision<16?Math.round(e*this.multiplier)/this.multiplier:e},pair:function(e,t,n){return this.number(e)+(n||",")+this.number(t)},point:function(e,t){return this.number(e.x)+(t||",")+this.number(e.y)},size:function(e,t){return this.number(e.width)+(t||",")+this.number(e.height)},rectangle:function(e,t){return this.point(e,t)+(t||",")+this.size(e,t)}});h.instance=new h;var g=new function(){var e=[[.5773502691896257],[0,.7745966692414834],[.33998104358485626,.8611363115940526],[0,.5384693101056831,.906179845938664],[.2386191860831969,.6612093864662645,.932469514203152],[0,.4058451513773972,.7415311855993945,.9491079123427585],[.1834346424956498,.525532409916329,.7966664774136267,.9602898564975363],[0,.3242534234038089,.6133714327005904,.8360311073266358,.9681602395076261],[.14887433898163122,.4333953941292472,.6794095682990244,.8650633666889845,.9739065285171717],[0,.26954315595234496,.5190961292068118,.7301520055740494,.8870625997680953,.978228658146057],[.1252334085114689,.3678314989981802,.5873179542866175,.7699026741943047,.9041172563704749,.9815606342467192],[0,.2304583159551348,.44849275103644687,.6423493394403402,.8015780907333099,.9175983992229779,.9841830547185881],[.10805494870734367,.31911236892788974,.5152486363581541,.6872929048116855,.827201315069765,.9284348836635735,.9862838086968123],[0,.20119409399743451,.3941513470775634,.5709721726085388,.7244177313601701,.8482065834104272,.937273392400706,.9879925180204854],[.09501250983763744,.2816035507792589,.45801677765722737,.6178762444026438,.755404408355003,.8656312023878318,.9445750230732326,.9894009349916499]],t=[[1],[.8888888888888888,.5555555555555556],[.6521451548625461,.34785484513745385],[.5688888888888889,.47862867049936647,.23692688505618908],[.46791393457269104,.3607615730481386,.17132449237917036],[.4179591836734694,.3818300505051189,.27970539148927664,.1294849661688697],[.362683783378362,.31370664587788727,.22238103445337448,.10122853629037626],[.3302393550012598,.31234707704000286,.26061069640293544,.1806481606948574,.08127438836157441],[.29552422471475287,.26926671930999635,.21908636251598204,.1494513491505806,.06667134430868814],[.2729250867779006,.26280454451024665,.23319376459199048,.18629021092773426,.1255803694649046,.05566856711617366],[.24914704581340277,.2334925365383548,.20316742672306592,.16007832854334622,.10693932599531843,.04717533638651183],[.2325515532308739,.22628318026289723,.2078160475368885,.17814598076194574,.13887351021978725,.09212149983772845,.04048400476531588],[.2152638534631578,.2051984637212956,.18553839747793782,.15720316715819355,.12151857068790319,.08015808715976021,.03511946033175186],[.2025782419255613,.19843148532711158,.1861610000155622,.16626920581699392,.13957067792615432,.10715922046717194,.07036604748810812,.03075324199611727],[.1894506104550685,.18260341504492358,.16915651939500254,.14959598881657674,.12462897125553388,.09515851168249279,.062253523938647894,.027152459411754096]],n=Math.abs,r=Math.sqrt,i=Math.pow,o=Math.log2||function(e){return Math.log(e)*Math.LOG2E};function a(e,t,n){return e<t?t:e>n?n:e}function s(e,t,r){function i(e){var t=134217729*e,n=e-t+t;return[n,e-n]}var o=t*t-e*r,a=t*t+e*r;if(3*n(o)<a){var s=i(e),c=i(t),u=i(r),l=t*t,f=e*r;o=l-f+(c[0]*c[0]-l+2*c[0]*c[1]+c[1]*c[1]-(s[0]*u[0]-f+s[0]*u[1]+s[1]*u[0]+s[1]*u[1]))}return o}function c(){var e=Math.max.apply(Math,arguments);return e&&(e<1e-8||e>1e8)?i(2,-Math.round(o(e))):0}return{EPSILON:1e-12,MACHINE_EPSILON:112e-18,CURVETIME_EPSILON:1e-8,GEOMETRIC_EPSILON:1e-7,TRIGONOMETRIC_EPSILON:1e-8,KAPPA:4*(r(2)-1)/3,isZero:function(e){return e>=-1e-12&&e<=1e-12},isMachineZero:function(e){return e>=-112e-18&&e<=112e-18},clamp:a,integrate:function(n,r,i,o){for(var a=e[o-2],s=t[o-2],c=.5*(i-r),u=c+r,l=0,f=o+1>>1,d=1&o?s[l++]*n(u):0;l<f;){var p=c*a[l];d+=s[l++]*(n(u+p)+n(u-p))}return c*d},findRoot:function(e,t,r,i,o,s,c){for(var u=0;u<s;u++){var l=e(r),f=l/t(r),d=r-f;if(n(f)<c){r=d;break}l>0?(o=r,r=d<=i?.5*(i+o):d):(i=r,r=d>=o?.5*(i+o):d)}return a(r,i,o)},solveQuadratic:function(e,t,i,o,u,l){var f,d=1/0;if(n(e)<1e-12){if(n(t)<1e-12)return n(i)<1e-12?-1:0;f=-i/t}else{var p=s(e,t*=-.5,i);if(p&&n(p)<112e-18){var h=c(n(e),n(t),n(i));h&&(p=s(e*=h,t*=h,i*=h))}if(p>=-112e-18){var g=p<0?0:r(p),v=t+(t<0?-g:g);0===v?d=-(f=i/e):(f=v/e,d=i/v)}}var m=0,y=null==u,b=u-1e-12,w=l+1e-12;return isFinite(f)&&(y||f>b&&f<w)&&(o[m++]=y?f:a(f,u,l)),d!==f&&isFinite(d)&&(y||d>b&&d<w)&&(o[m++]=y?d:a(d,u,l)),m},solveCubic:function(e,t,o,s,u,l,f){var d,p,h,v,m,y=c(n(e),n(t),n(o),n(s));function b(n){var r=e*(d=n);v=(r+(p=r+t))*d+(h=p*d+o),m=h*d+s}if(y&&(e*=y,t*=y,o*=y,s*=y),n(e)<1e-12)e=t,p=o,h=s,d=1/0;else if(n(s)<1e-12)p=t,h=o,d=0;else{b(-t/e/3);var w=m/e,_=i(n(w),1/3),x=w<0?-1:1,O=-v/e,S=O>0?1.324717957244746*Math.max(_,r(O)):_,E=d-x*S;if(E!==d){do{b(E),E=0===v?d:d-m/v/(1+112e-18)}while(x*E>x*d);n(e)*d*d>n(s/d)&&(p=((h=-s/d)-o)/d)}}var C=g.solveQuadratic(e,p,h,u,l,f),k=null==l;return isFinite(d)&&(0===C||C>0&&d!==u[0]&&d!==u[1])&&(k||d>l-1e-12&&d<f+1e-12)&&(u[C++]=k?d:a(d,l,f)),C}}},v={_id:1,_pools:{},get:function(e){if(e){var t=this._pools[e];return t||(t=this._pools[e]={_id:1}),t._id++}return this._id++}},m=u.extend({_class:"Point",_readIndex:!0,initialize:function(e,t){var n=typeof e,r=this.__read,i=0;if("number"===n){var o="number"==typeof t;this._set(e,o?t:e),r&&(i=o?2:1)}else if("undefined"===n||null===e)this._set(0,0),r&&(i=null===e?1:0);else{var a="string"===n?e.split(/[\s,]+/)||[]:e;i=1,Array.isArray(a)?this._set(+a[0],+(a.length>1?a[1]:a[0])):"x"in a?this._set(a.x||0,a.y||0):"width"in a?this._set(a.width||0,a.height||0):"angle"in a?(this._set(a.length||0,0),this.setAngle(a.angle||0)):(this._set(0,0),i=0)}return r&&(this.__read=i),this},set:"#initialize",_set:function(e,t){return this.x=e,this.y=t,this},equals:function(e){return this===e||e&&(this.x===e.x&&this.y===e.y||Array.isArray(e)&&this.x===e[0]&&this.y===e[1])||!1},clone:function(){return new m(this.x,this.y)},toString:function(){var e=h.instance;return"{ x: "+e.number(this.x)+", y: "+e.number(this.y)+" }"},_serialize:function(e){var t=e.formatter;return[t.number(this.x),t.number(this.y)]},getLength:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},setLength:function(e){if(this.isZero()){var t=this._angle||0;this._set(Math.cos(t)*e,Math.sin(t)*e)}else{var n=e/this.getLength();g.isZero(n)&&this.getAngle(),this._set(this.x*n,this.y*n)}},getAngle:function(){return 180*this.getAngleInRadians.apply(this,arguments)/Math.PI},setAngle:function(e){this.setAngleInRadians.call(this,e*Math.PI/180)},getAngleInDegrees:"#getAngle",setAngleInDegrees:"#setAngle",getAngleInRadians:function(){if(arguments.length){var e=m.read(arguments),t=this.getLength()*e.getLength();if(g.isZero(t))return NaN;var n=this.dot(e)/t;return Math.acos(n<-1?-1:n>1?1:n)}return this.isZero()?this._angle||0:this._angle=Math.atan2(this.y,this.x)},setAngleInRadians:function(e){if(this._angle=e,!this.isZero()){var t=this.getLength();this._set(Math.cos(e)*t,Math.sin(e)*t)}},getQuadrant:function(){return this.x>=0?this.y>=0?1:4:this.y>=0?2:3}},{beans:!1,getDirectedAngle:function(){var e=m.read(arguments);return 180*Math.atan2(this.cross(e),this.dot(e))/Math.PI},getDistance:function(){var e=arguments,t=m.read(e),n=t.x-this.x,r=t.y-this.y,i=n*n+r*r,o=u.read(e);return o?i:Math.sqrt(i)},normalize:function(e){e===a&&(e=1);var t=this.getLength(),n=0!==t?e/t:0,r=new m(this.x*n,this.y*n);return n>=0&&(r._angle=this._angle),r},rotate:function(e,t){if(0===e)return this.clone();e=e*Math.PI/180;var n=t?this.subtract(t):this,r=Math.sin(e),i=Math.cos(e);return n=new m(n.x*i-n.y*r,n.x*r+n.y*i),t?n.add(t):n},transform:function(e){return e?e._transformPoint(this):this},add:function(){var e=m.read(arguments);return new m(this.x+e.x,this.y+e.y)},subtract:function(){var e=m.read(arguments);return new m(this.x-e.x,this.y-e.y)},multiply:function(){var e=m.read(arguments);return new m(this.x*e.x,this.y*e.y)},divide:function(){var e=m.read(arguments);return new m(this.x/e.x,this.y/e.y)},modulo:function(){var e=m.read(arguments);return new m(this.x%e.x,this.y%e.y)},negate:function(){return new m(-this.x,-this.y)},isInside:function(){return _.read(arguments).contains(this)},isClose:function(){var e=arguments,t=m.read(e),n=u.read(e);return this.getDistance(t)<=n},isCollinear:function(){var e=m.read(arguments);return m.isCollinear(this.x,this.y,e.x,e.y)},isColinear:"#isCollinear",isOrthogonal:function(){var e=m.read(arguments);return m.isOrthogonal(this.x,this.y,e.x,e.y)},isZero:function(){var e=g.isZero;return e(this.x)&&e(this.y)},isNaN:function(){return isNaN(this.x)||isNaN(this.y)},isInQuadrant:function(e){return this.x*(e>1&&e<4?-1:1)>=0&&this.y*(e>2?-1:1)>=0},dot:function(){var e=m.read(arguments);return this.x*e.x+this.y*e.y},cross:function(){var e=m.read(arguments);return this.x*e.y-this.y*e.x},project:function(){var e=m.read(arguments),t=e.isZero()?0:this.dot(e)/e.dot(e);return new m(e.x*t,e.y*t)},statics:{min:function(){var e=arguments,t=m.read(e),n=m.read(e);return new m(Math.min(t.x,n.x),Math.min(t.y,n.y))},max:function(){var e=arguments,t=m.read(e),n=m.read(e);return new m(Math.max(t.x,n.x),Math.max(t.y,n.y))},random:function(){return new m(Math.random(),Math.random())},isCollinear:function(e,t,n,r){return Math.abs(e*r-t*n)<=1e-8*Math.sqrt((e*e+t*t)*(n*n+r*r))},isOrthogonal:function(e,t,n,r){return Math.abs(e*n+t*r)<=1e-8*Math.sqrt((e*e+t*t)*(n*n+r*r))}}},u.each(["round","ceil","floor","abs"],(function(e){var t=Math[e];this[e]=function(){return new m(t(this.x),t(this.y))}}),{})),y=m.extend({initialize:function(e,t,n,r){this._x=e,this._y=t,this._owner=n,this._setter=r},_set:function(e,t,n){return this._x=e,this._y=t,n||this._owner[this._setter](this),this},getX:function(){return this._x},setX:function(e){this._x=e,this._owner[this._setter](this)},getY:function(){return this._y},setY:function(e){this._y=e,this._owner[this._setter](this)},isSelected:function(){return!!(this._owner._selection&this._getSelection())},setSelected:function(e){this._owner._changeSelection(this._getSelection(),e)},_getSelection:function(){return"setPosition"===this._setter?4:0}}),b=u.extend({_class:"Size",_readIndex:!0,initialize:function(e,t){var n=typeof e,r=this.__read,i=0;if("number"===n){var o="number"==typeof t;this._set(e,o?t:e),r&&(i=o?2:1)}else if("undefined"===n||null===e)this._set(0,0),r&&(i=null===e?1:0);else{var a="string"===n?e.split(/[\s,]+/)||[]:e;i=1,Array.isArray(a)?this._set(+a[0],+(a.length>1?a[1]:a[0])):"width"in a?this._set(a.width||0,a.height||0):"x"in a?this._set(a.x||0,a.y||0):(this._set(0,0),i=0)}return r&&(this.__read=i),this},set:"#initialize",_set:function(e,t){return this.width=e,this.height=t,this},equals:function(e){return e===this||e&&(this.width===e.width&&this.height===e.height||Array.isArray(e)&&this.width===e[0]&&this.height===e[1])||!1},clone:function(){return new b(this.width,this.height)},toString:function(){var e=h.instance;return"{ width: "+e.number(this.width)+", height: "+e.number(this.height)+" }"},_serialize:function(e){var t=e.formatter;return[t.number(this.width),t.number(this.height)]},add:function(){var e=b.read(arguments);return new b(this.width+e.width,this.height+e.height)},subtract:function(){var e=b.read(arguments);return new b(this.width-e.width,this.height-e.height)},multiply:function(){var e=b.read(arguments);return new b(this.width*e.width,this.height*e.height)},divide:function(){var e=b.read(arguments);return new b(this.width/e.width,this.height/e.height)},modulo:function(){var e=b.read(arguments);return new b(this.width%e.width,this.height%e.height)},negate:function(){return new b(-this.width,-this.height)},isZero:function(){var e=g.isZero;return e(this.width)&&e(this.height)},isNaN:function(){return isNaN(this.width)||isNaN(this.height)},statics:{min:function(e,t){return new b(Math.min(e.width,t.width),Math.min(e.height,t.height))},max:function(e,t){return new b(Math.max(e.width,t.width),Math.max(e.height,t.height))},random:function(){return new b(Math.random(),Math.random())}}},u.each(["round","ceil","floor","abs"],(function(e){var t=Math[e];this[e]=function(){return new b(t(this.width),t(this.height))}}),{})),w=b.extend({initialize:function(e,t,n,r){this._width=e,this._height=t,this._owner=n,this._setter=r},_set:function(e,t,n){return this._width=e,this._height=t,n||this._owner[this._setter](this),this},getWidth:function(){return this._width},setWidth:function(e){this._width=e,this._owner[this._setter](this)},getHeight:function(){return this._height},setHeight:function(e){this._height=e,this._owner[this._setter](this)}}),_=u.extend({_class:"Rectangle",_readIndex:!0,beans:!0,initialize:function(e,t,n,r){var i,o=arguments,s=typeof e;if("number"===s?(this._set(e,t,n,r),i=4):"undefined"===s||null===e?(this._set(0,0,0,0),i=null===e?1:0):1===o.length&&(Array.isArray(e)?(this._set.apply(this,e),i=1):e.x!==a||e.width!==a?(this._set(e.x||0,e.y||0,e.width||0,e.height||0),i=1):e.from===a&&e.to===a&&(this._set(0,0,0,0),u.readSupported(o,this)&&(i=1))),i===a){var c,l,f=m.readNamed(o,"from"),d=u.peek(o),p=f.x,h=f.y;if(d&&d.x!==a||u.hasNamed(o,"to")){var g=m.readNamed(o,"to");c=g.x-p,l=g.y-h,c<0&&(p=g.x,c=-c),l<0&&(h=g.y,l=-l)}else{var v=b.read(o);c=v.width,l=v.height}this._set(p,h,c,l),i=o.__index}var y=o.__filtered;return y&&(this.__filtered=y),this.__read&&(this.__read=i),this},set:"#initialize",_set:function(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this},clone:function(){return new _(this.x,this.y,this.width,this.height)},equals:function(e){var t=u.isPlainValue(e)?_.read(arguments):e;return t===this||t&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height||!1},toString:function(){var e=h.instance;return"{ x: "+e.number(this.x)+", y: "+e.number(this.y)+", width: "+e.number(this.width)+", height: "+e.number(this.height)+" }"},_serialize:function(e){var t=e.formatter;return[t.number(this.x),t.number(this.y),t.number(this.width),t.number(this.height)]},getPoint:function(e){return new(e?m:y)(this.x,this.y,this,"setPoint")},setPoint:function(){var e=m.read(arguments);this.x=e.x,this.y=e.y},getSize:function(e){return new(e?b:w)(this.width,this.height,this,"setSize")},_fw:1,_fh:1,setSize:function(){var e=b.read(arguments),t=this._sx,n=this._sy,r=e.width,i=e.height;t&&(this.x+=(this.width-r)*t),n&&(this.y+=(this.height-i)*n),this.width=r,this.height=i,this._fw=this._fh=1},getLeft:function(){return this.x},setLeft:function(e){if(!this._fw){var t=e-this.x;this.width-=.5===this._sx?2*t:t}this.x=e,this._sx=this._fw=0},getTop:function(){return this.y},setTop:function(e){if(!this._fh){var t=e-this.y;this.height-=.5===this._sy?2*t:t}this.y=e,this._sy=this._fh=0},getRight:function(){return this.x+this.width},setRight:function(e){if(!this._fw){var t=e-this.x;this.width=.5===this._sx?2*t:t}this.x=e-this.width,this._sx=1,this._fw=0},getBottom:function(){return this.y+this.height},setBottom:function(e){if(!this._fh){var t=e-this.y;this.height=.5===this._sy?2*t:t}this.y=e-this.height,this._sy=1,this._fh=0},getCenterX:function(){return this.x+this.width/2},setCenterX:function(e){this._fw||.5===this._sx?this.x=e-this.width/2:(this._sx&&(this.x+=2*(e-this.x)*this._sx),this.width=2*(e-this.x)),this._sx=.5,this._fw=0},getCenterY:function(){return this.y+this.height/2},setCenterY:function(e){this._fh||.5===this._sy?this.y=e-this.height/2:(this._sy&&(this.y+=2*(e-this.y)*this._sy),this.height=2*(e-this.y)),this._sy=.5,this._fh=0},getCenter:function(e){return new(e?m:y)(this.getCenterX(),this.getCenterY(),this,"setCenter")},setCenter:function(){var e=m.read(arguments);return this.setCenterX(e.x),this.setCenterY(e.y),this},getArea:function(){return this.width*this.height},isEmpty:function(){return 0===this.width||0===this.height},contains:function(e){return e&&e.width!==a||4===(Array.isArray(e)?e:arguments).length?this._containsRectangle(_.read(arguments)):this._containsPoint(m.read(arguments))},_containsPoint:function(e){var t=e.x,n=e.y;return t>=this.x&&n>=this.y&&t<=this.x+this.width&&n<=this.y+this.height},_containsRectangle:function(e){var t=e.x,n=e.y;return t>=this.x&&n>=this.y&&t+e.width<=this.x+this.width&&n+e.height<=this.y+this.height},intersects:function(){var e=_.read(arguments),t=u.read(arguments)||0;return e.x+e.width>this.x-t&&e.y+e.height>this.y-t&&e.x<this.x+this.width+t&&e.y<this.y+this.height+t},intersect:function(){var e=_.read(arguments),t=Math.max(this.x,e.x),n=Math.max(this.y,e.y),r=Math.min(this.x+this.width,e.x+e.width),i=Math.min(this.y+this.height,e.y+e.height);return new _(t,n,r-t,i-n)},unite:function(){var e=_.read(arguments),t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),r=Math.max(this.x+this.width,e.x+e.width),i=Math.max(this.y+this.height,e.y+e.height);return new _(t,n,r-t,i-n)},include:function(){var e=m.read(arguments),t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),r=Math.max(this.x+this.width,e.x),i=Math.max(this.y+this.height,e.y);return new _(t,n,r-t,i-n)},expand:function(){var e=b.read(arguments),t=e.width,n=e.height;return new _(this.x-t/2,this.y-n/2,this.width+t,this.height+n)},scale:function(e,t){return this.expand(this.width*e-this.width,this.height*(t===a?e:t)-this.height)}},u.each([["Top","Left"],["Top","Right"],["Bottom","Left"],["Bottom","Right"],["Left","Center"],["Top","Center"],["Right","Center"],["Bottom","Center"]],(function(e,t){var n=e.join(""),r=/^[RL]/.test(n);t>=4&&(e[1]+=r?"Y":"X");var i=e[r?0:1],o=e[r?1:0],a="get"+i,s="get"+o,c="set"+i,u="set"+o,l="set"+n;this["get"+n]=function(e){return new(e?m:y)(this[a](),this[s](),this,l)},this[l]=function(){var e=m.read(arguments);this[c](e.x),this[u](e.y)}}),{beans:!0})),x=_.extend({initialize:function(e,t,n,r,i,o){this._set(e,t,n,r,!0),this._owner=i,this._setter=o},_set:function(e,t,n,r,i){return this._x=e,this._y=t,this._width=n,this._height=r,i||this._owner[this._setter](this),this}},new function(){var e=_.prototype;return u.each(["x","y","width","height"],(function(e){var t=u.capitalize(e),n="_"+e;this["get"+t]=function(){return this[n]},this["set"+t]=function(e){this[n]=e,this._dontNotify||this._owner[this._setter](this)}}),u.each(["Point","Size","Center","Left","Top","Right","Bottom","CenterX","CenterY","TopLeft","TopRight","BottomLeft","BottomRight","LeftCenter","TopCenter","RightCenter","BottomCenter"],(function(t){var n="set"+t;this[n]=function(){this._dontNotify=!0,e[n].apply(this,arguments),this._dontNotify=!1,this._owner[this._setter](this)}}),{isSelected:function(){return!!(2&this._owner._selection)},setSelected:function(e){var t=this._owner;t._changeSelection&&t._changeSelection(2,e)}}))}),O=u.extend({_class:"Matrix",initialize:function e(t,n){var r=arguments,i=r.length,o=!0;if(i>=6?this._set.apply(this,r):1===i||2===i?t instanceof e?this._set(t._a,t._b,t._c,t._d,t._tx,t._ty,n):Array.isArray(t)?this._set.apply(this,n?t.concat([n]):t):o=!1:i?o=!1:this.reset(),!o)throw new Error("Unsupported matrix parameters");return this},set:"#initialize",_set:function(e,t,n,r,i,o,a){return this._a=e,this._b=t,this._c=n,this._d=r,this._tx=i,this._ty=o,a||this._changed(),this},_serialize:function(e,t){return u.serialize(this.getValues(),e,!0,t)},_changed:function(){var e=this._owner;e&&(e._applyMatrix?e.transform(null,!0):e._changed(25))},clone:function(){return new O(this._a,this._b,this._c,this._d,this._tx,this._ty)},equals:function(e){return e===this||e&&this._a===e._a&&this._b===e._b&&this._c===e._c&&this._d===e._d&&this._tx===e._tx&&this._ty===e._ty},toString:function(){var e=h.instance;return"[["+[e.number(this._a),e.number(this._c),e.number(this._tx)].join(", ")+"], ["+[e.number(this._b),e.number(this._d),e.number(this._ty)].join(", ")+"]]"},reset:function(e){return this._a=this._d=1,this._b=this._c=this._tx=this._ty=0,e||this._changed(),this},apply:function(e,t){var n=this._owner;return!!n&&(n.transform(null,u.pick(e,!0),t),this.isIdentity())},translate:function(){var e=m.read(arguments),t=e.x,n=e.y;return this._tx+=t*this._a+n*this._c,this._ty+=t*this._b+n*this._d,this._changed(),this},scale:function(){var e=arguments,t=m.read(e),n=m.read(e,0,{readNull:!0});return n&&this.translate(n),this._a*=t.x,this._b*=t.x,this._c*=t.y,this._d*=t.y,n&&this.translate(n.negate()),this._changed(),this},rotate:function(e){e*=Math.PI/180;var t=m.read(arguments,1),n=t.x,r=t.y,i=Math.cos(e),o=Math.sin(e),a=n-n*i+r*o,s=r-n*o-r*i,c=this._a,u=this._b,l=this._c,f=this._d;return this._a=i*c+o*l,this._b=i*u+o*f,this._c=-o*c+i*l,this._d=-o*u+i*f,this._tx+=a*c+s*l,this._ty+=a*u+s*f,this._changed(),this},shear:function(){var e=arguments,t=m.read(e),n=m.read(e,0,{readNull:!0});n&&this.translate(n);var r=this._a,i=this._b;return this._a+=t.y*this._c,this._b+=t.y*this._d,this._c+=t.x*r,this._d+=t.x*i,n&&this.translate(n.negate()),this._changed(),this},skew:function(){var e=arguments,t=m.read(e),n=m.read(e,0,{readNull:!0}),r=Math.PI/180,i=new m(Math.tan(t.x*r),Math.tan(t.y*r));return this.shear(i,n)},append:function(e,t){if(e){var n=this._a,r=this._b,i=this._c,o=this._d,a=e._a,s=e._c,c=e._b,u=e._d,l=e._tx,f=e._ty;this._a=a*n+c*i,this._c=s*n+u*i,this._b=a*r+c*o,this._d=s*r+u*o,this._tx+=l*n+f*i,this._ty+=l*r+f*o,t||this._changed()}return this},prepend:function(e,t){if(e){var n=this._a,r=this._b,i=this._c,o=this._d,a=this._tx,s=this._ty,c=e._a,u=e._c,l=e._b,f=e._d,d=e._tx,p=e._ty;this._a=c*n+u*r,this._c=c*i+u*o,this._b=l*n+f*r,this._d=l*i+f*o,this._tx=c*a+u*s+d,this._ty=l*a+f*s+p,t||this._changed()}return this},appended:function(e){return this.clone().append(e)},prepended:function(e){return this.clone().prepend(e)},invert:function(){var e=this._a,t=this._b,n=this._c,r=this._d,i=this._tx,o=this._ty,a=e*r-t*n,s=null;return a&&!isNaN(a)&&isFinite(i)&&isFinite(o)&&(this._a=r/a,this._b=-t/a,this._c=-n/a,this._d=e/a,this._tx=(n*o-r*i)/a,this._ty=(t*i-e*o)/a,s=this),s},inverted:function(){return this.clone().invert()},concatenate:"#append",preConcatenate:"#prepend",chain:"#appended",_shiftless:function(){return new O(this._a,this._b,this._c,this._d,0,0)},_orNullIfIdentity:function(){return this.isIdentity()?null:this},isIdentity:function(){return 1===this._a&&0===this._b&&0===this._c&&1===this._d&&0===this._tx&&0===this._ty},isInvertible:function(){var e=this._a*this._d-this._c*this._b;return e&&!isNaN(e)&&isFinite(this._tx)&&isFinite(this._ty)},isSingular:function(){return!this.isInvertible()},transform:function(e,t,n){return arguments.length<3?this._transformPoint(m.read(arguments)):this._transformCoordinates(e,t,n)},_transformPoint:function(e,t,n){var r=e.x,i=e.y;return t||(t=new m),t._set(r*this._a+i*this._c+this._tx,r*this._b+i*this._d+this._ty,n)},_transformCoordinates:function(e,t,n){for(var r=0,i=2*n;r<i;r+=2){var o=e[r],a=e[r+1];t[r]=o*this._a+a*this._c+this._tx,t[r+1]=o*this._b+a*this._d+this._ty}return t},_transformCorners:function(e){var t=e.x,n=e.y,r=t+e.width,i=n+e.height,o=[t,n,r,n,r,i,t,i];return this._transformCoordinates(o,o,4)},_transformBounds:function(e,t,n){for(var r=this._transformCorners(e),i=r.slice(0,2),o=i.slice(),a=2;a<8;a++){var s=r[a],c=1&a;s<i[c]?i[c]=s:s>o[c]&&(o[c]=s)}return t||(t=new _),t._set(i[0],i[1],o[0]-i[0],o[1]-i[1],n)},inverseTransform:function(){return this._inverseTransform(m.read(arguments))},_inverseTransform:function(e,t,n){var r=this._a,i=this._b,o=this._c,a=this._d,s=this._tx,c=this._ty,u=r*a-i*o,l=null;if(u&&!isNaN(u)&&isFinite(s)&&isFinite(c)){var f=e.x-this._tx,d=e.y-this._ty;t||(t=new m),l=t._set((f*a-d*o)/u,(d*r-f*i)/u,n)}return l},decompose:function(){var e,t,n,r=this._a,i=this._b,o=this._c,a=this._d,s=r*a-i*o,c=Math.sqrt,u=Math.atan2,l=180/Math.PI;if(0!==r||0!==i){var f=c(r*r+i*i);e=Math.acos(r/f)*(i>0?1:-1),t=[f,s/f],n=[u(r*o+i*a,f*f),0]}else if(0!==o||0!==a){var d=c(o*o+a*a);e=Math.asin(o/d)*(a>0?1:-1),t=[s/d,d],n=[0,u(r*o+i*a,d*d)]}else e=0,n=t=[0,0];return{translation:this.getTranslation(),rotation:e*l,scaling:new m(t),skewing:new m(n[0]*l,n[1]*l)}},getValues:function(){return[this._a,this._b,this._c,this._d,this._tx,this._ty]},getTranslation:function(){return new m(this._tx,this._ty)},getScaling:function(){return this.decompose().scaling},getRotation:function(){return this.decompose().rotation},applyToContext:function(e){this.isIdentity()||e.transform(this._a,this._b,this._c,this._d,this._tx,this._ty)}},u.each(["a","b","c","d","tx","ty"],(function(e){var t=u.capitalize(e),n="_"+e;this["get"+t]=function(){return this[n]},this["set"+t]=function(e){this[n]=e,this._changed()}}),{})),S=u.extend({_class:"Line",initialize:function(e,t,n,r,i){var o=!1;arguments.length>=4?(this._px=e,this._py=t,this._vx=n,this._vy=r,o=i):(this._px=e.x,this._py=e.y,this._vx=t.x,this._vy=t.y,o=n),o||(this._vx-=this._px,this._vy-=this._py)},getPoint:function(){return new m(this._px,this._py)},getVector:function(){return new m(this._vx,this._vy)},getLength:function(){return this.getVector().getLength()},intersect:function(e,t){return S.intersect(this._px,this._py,this._vx,this._vy,e._px,e._py,e._vx,e._vy,!0,t)},getSide:function(e,t){return S.getSide(this._px,this._py,this._vx,this._vy,e.x,e.y,!0,t)},getDistance:function(e){return Math.abs(this.getSignedDistance(e))},getSignedDistance:function(e){return S.getSignedDistance(this._px,this._py,this._vx,this._vy,e.x,e.y,!0)},isCollinear:function(e){return m.isCollinear(this._vx,this._vy,e._vx,e._vy)},isOrthogonal:function(e){return m.isOrthogonal(this._vx,this._vy,e._vx,e._vy)},statics:{intersect:function(e,t,n,r,i,o,a,s,c,u){c||(n-=e,r-=t,a-=i,s-=o);var l=n*s-r*a;if(!g.isMachineZero(l)){var f=e-i,d=t-o,p=(a*d-s*f)/l,h=(n*d-r*f)/l;if(u||-1e-12<p&&p<1+1e-12&&-1e-12<h&&h<1+1e-12)return u||(p=p<=0?0:p>=1?1:p),new m(e+p*n,t+p*r)}},getSide:function(e,t,n,r,i,o,a,s){a||(n-=e,r-=t);var c=i-e,u=c*r-(o-t)*n;return!s&&g.isMachineZero(u)&&(u=(c*n+c*n)/(n*n+r*r))>=0&&u<=1&&(u=0),u<0?-1:u>0?1:0},getSignedDistance:function(e,t,n,r,i,o,a){return a||(n-=e,r-=t),0===n?r>0?i-e:e-i:0===r?n<0?o-t:t-o:((i-e)*r-(o-t)*n)/(r>n?r*Math.sqrt(1+n*n/(r*r)):n*Math.sqrt(1+r*r/(n*n)))},getDistance:function(e,t,n,r,i,o,a){return Math.abs(S.getSignedDistance(e,t,n,r,i,o,a))}}}),E=d.extend({_class:"Project",_list:"projects",_reference:"project",_compactSerialize:!0,initialize:function(e){d.call(this,!0),this._children=[],this._namedChildren={},this._activeLayer=null,this._currentStyle=new $(null,null,this),this._view=Q.create(this,e||ae.getCanvas(1,1)),this._selectionItems={},this._selectionCount=0,this._updateVersion=0},_serialize:function(e,t){return u.serialize(this._children,e,!0,t)},_changed:function(e,t){if(1&e){var n=this._view;n&&(n._needsUpdate=!0,!n._requested&&n._autoUpdate&&n.requestUpdate())}var r=this._changes;if(r&&t){var i=this._changesById,o=t._id,a=i[o];a?a.flags|=e:r.push(i[o]={item:t,flags:e})}},clear:function(){for(var e=this._children,t=e.length-1;t>=0;t--)e[t].remove()},isEmpty:function(){return!this._children.length},remove:function e(){return!!e.base.call(this)&&(this._view&&this._view.remove(),!0)},getView:function(){return this._view},getCurrentStyle:function(){return this._currentStyle},setCurrentStyle:function(e){this._currentStyle.set(e)},getIndex:function(){return this._index},getOptions:function(){return this._scope.settings},getLayers:function(){return this._children},getActiveLayer:function(){return this._activeLayer||new T({project:this,insert:!0})},getSymbolDefinitions:function(){var e=[],t={};return this.getItems({class:I,match:function(n){var r=n._definition,i=r._id;return t[i]||(t[i]=!0,e.push(r)),!1}}),e},getSymbols:"getSymbolDefinitions",getSelectedItems:function(){var e=this._selectionItems,t=[];for(var n in e){var r=e[n],i=r._selection;1&i&&r.isInserted()?t.push(r):i||this._updateSelection(r)}return t},_updateSelection:function(e){var t=e._id,n=this._selectionItems;e._selection?n[t]!==e&&(this._selectionCount++,n[t]=e):n[t]===e&&(this._selectionCount--,delete n[t])},selectAll:function(){for(var e=this._children,t=0,n=e.length;t<n;t++)e[t].setFullySelected(!0)},deselectAll:function(){var e=this._selectionItems;for(var t in e)e[t].setFullySelected(!1)},addLayer:function(e){return this.insertLayer(a,e)},insertLayer:function(e,t){if(t instanceof T){t._remove(!1,!0),u.splice(this._children,[t],e,0),t._setProject(this,!0);var n=t._name;n&&t.setName(n),this._changes&&t._changed(5),this._activeLayer||(this._activeLayer=t)}else t=null;return t},_insertItem:function(e,t,n){return t=this.insertLayer(e,t)||(this._activeLayer||this._insertItem(a,new T(C.NO_INSERT),!0)).insertChild(e,t),n&&t.activate&&t.activate(),t},getItems:function(e){return C._getItems(this,e)},getItem:function(e){return C._getItems(this,e,null,null,!0)[0]||null},importJSON:function(e){this.activate();var t=this._activeLayer;return u.importJSON(e,t&&t.isEmpty()&&t)},removeOn:function(e){var t=this._removeSets;if(t){"mouseup"===e&&(t.mousedrag=null);var n=t[e];if(n){for(var r in n){var i=n[r];for(var o in t){var a=t[o];a&&a!=n&&delete a[i._id]}i.remove()}t[e]=null}}},draw:function(e,t,n){this._updateVersion++,e.save(),t.applyToContext(e);for(var r=this._children,i=new u({offset:new m(0,0),pixelRatio:n,viewMatrix:t.isIdentity()?null:t,matrices:[new O],updateMatrix:!0}),o=0,a=r.length;o<a;o++)r[o].draw(e,i);if(e.restore(),this._selectionCount>0){e.save(),e.strokeWidth=1;var s=this._selectionItems,c=this._scope.settings.handleSize,l=this._updateVersion;for(var f in s)s[f]._drawSelection(e,t,c,s,l);e.restore()}}}),C=u.extend(l,{statics:{extend:function e(t){return t._serializeFields&&(t._serializeFields=u.set({},this.prototype._serializeFields,t._serializeFields)),e.base.apply(this,arguments)},NO_INSERT:{insert:!1}},_class:"Item",_name:null,_applyMatrix:!0,_canApplyMatrix:!0,_canScaleStroke:!1,_pivot:null,_visible:!0,_blendMode:"normal",_opacity:1,_locked:!1,_guide:!1,_clipMask:!1,_selection:0,_selectBounds:!0,_selectChildren:!1,_serializeFields:{name:null,applyMatrix:null,matrix:new O,pivot:null,visible:!0,blendMode:"normal",opacity:1,locked:!1,guide:!1,clipMask:!1,selected:!1,data:{}},_prioritize:["applyMatrix"]},new function(){var e=["onMouseDown","onMouseUp","onMouseDrag","onClick","onDoubleClick","onMouseMove","onMouseEnter","onMouseLeave"];return u.each(e,(function(e){this._events[e]={install:function(e){this.getView()._countItemEvent(e,1)},uninstall:function(e){this.getView()._countItemEvent(e,-1)}}}),{_events:{onFrame:{install:function(){this.getView()._animateItem(this,!0)},uninstall:function(){this.getView()._animateItem(this,!1)}},onLoad:{},onError:{}},statics:{_itemHandlers:e}})},{initialize:function(){},_initialize:function(e,t){var n=e&&u.isPlainObject(e),r=n&&!0===e.internal,i=this._matrix=new O,o=n&&e.project||le.project,s=le.settings;return this._id=r?null:v.get(),this._parent=this._index=null,this._applyMatrix=this._canApplyMatrix&&s.applyMatrix,t&&i.translate(t),i._owner=this,this._style=new $(o._currentStyle,this,o),r||n&&0==e.insert||!s.insertItems&&(!n||!0!==e.insert)?this._setProject(o):(n&&e.parent||o)._insertItem(a,this,!0),n&&e!==C.NO_INSERT&&this.set(e,{internal:!0,insert:!0,project:!0,parent:!0}),n},_serialize:function(e,t){var n={},r=this;function i(i){for(var o in i){var a=r[o];u.equals(a,"leading"===o?1.2*i.fontSize:i[o])||(n[o]=u.serialize(a,e,"data"!==o,t))}}return i(this._serializeFields),this instanceof k||i(this._style._defaults),[this._class,n]},_changed:function(e){var t=this._symbol,n=this._parent||t,r=this._project;8&e&&(this._bounds=this._position=this._decomposed=a),16&e&&(this._globalMatrix=a),n&&72&e&&C._clearBoundsCache(n),2&e&&C._clearBoundsCache(this),r&&r._changed(e,this),t&&t._changed(e)},getId:function(){return this._id},getName:function(){return this._name},setName:function(e){if(this._name&&this._removeNamed(),e===+e+"")throw new Error("Names consisting only of numbers are not supported.");var t=this._getOwner();if(e&&t){var n=t._children,r=t._namedChildren;(r[e]=r[e]||[]).push(this),e in n||(n[e]=this)}this._name=e||a,this._changed(256)},getStyle:function(){return this._style},setStyle:function(e){this.getStyle().set(e)}},u.each(["locked","visible","blendMode","opacity","guide"],(function(e){var t=u.capitalize(e),n="_"+e,r={locked:256,visible:265};this["get"+t]=function(){return this[n]},this["set"+t]=function(t){t!=this[n]&&(this[n]=t,this._changed(r[e]||257))}}),{}),{beans:!0,getSelection:function(){return this._selection},setSelection:function(e){if(e!==this._selection){this._selection=e;var t=this._project;t&&(t._updateSelection(this),this._changed(257))}},_changeSelection:function(e,t){var n=this._selection;this.setSelection(t?n|e:n&~e)},isSelected:function(){if(this._selectChildren)for(var e=this._children,t=0,n=e.length;t<n;t++)if(e[t].isSelected())return!0;return!!(1&this._selection)},setSelected:function(e){if(this._selectChildren)for(var t=this._children,n=0,r=t.length;n<r;n++)t[n].setSelected(e);this._changeSelection(1,e)},isFullySelected:function(){var e=this._children,t=!!(1&this._selection);if(e&&t){for(var n=0,r=e.length;n<r;n++)if(!e[n].isFullySelected())return!1;return!0}return t},setFullySelected:function(e){var t=this._children;if(t)for(var n=0,r=t.length;n<r;n++)t[n].setFullySelected(e);this._changeSelection(1,e)},isClipMask:function(){return this._clipMask},setClipMask:function(e){this._clipMask!=(e=!!e)&&(this._clipMask=e,e&&(this.setFillColor(null),this.setStrokeColor(null)),this._changed(257),this._parent&&this._parent._changed(2048))},getData:function(){return this._data||(this._data={}),this._data},setData:function(e){this._data=e},getPosition:function(e){var t=e?m:y,n=this._position||(this._position=this._getPositionFromBounds());return new t(n.x,n.y,this,"setPosition")},setPosition:function(){this.translate(m.read(arguments).subtract(this.getPosition(!0)))},_getPositionFromBounds:function(e){return this._pivot?this._matrix._transformPoint(this._pivot):(e||this.getBounds()).getCenter(!0)},getPivot:function(){var e=this._pivot;return e?new y(e.x,e.y,this,"setPivot"):null},setPivot:function(){this._pivot=m.read(arguments,0,{clone:!0,readNull:!0}),this._position=a}},u.each({getStrokeBounds:{stroke:!0},getHandleBounds:{handle:!0},getInternalBounds:{internal:!0}},(function(e,t){this[t]=function(t){return this.getBounds(t,e)}}),{beans:!0,getBounds:function(e,t){var n=t||e instanceof O,r=u.set({},n?t:e,this._boundsOptions);r.stroke&&!this.getStrokeScaling()||(r.cacheItem=this);var i=this._getCachedBounds(n&&e,r).rect;return arguments.length?i:new x(i.x,i.y,i.width,i.height,this,"setBounds")},setBounds:function(){var e=_.read(arguments),t=this.getBounds(),n=this._matrix,r=new O,i=e.getCenter();r.translate(i),e.width==t.width&&e.height==t.height||(n.isInvertible()||(n.set(n._backup||(new O).translate(n.getTranslation())),t=this.getBounds()),r.scale(0!==t.width?e.width/t.width:0,0!==t.height?e.height/t.height:0)),i=t.getCenter(),r.translate(-i.x,-i.y),this.transform(r)},_getBounds:function(e,t){var n=this._children;return n&&n.length?(C._updateBoundsCache(this,t.cacheItem),C._getBounds(n,e,t)):new _},_getBoundsCacheKey:function(e,t){return[e.stroke?1:0,e.handle?1:0,t?1:0].join("")},_getCachedBounds:function(e,t,n){e=e&&e._orNullIfIdentity();var r=t.internal&&!n,i=t.cacheItem,o=r?null:this._matrix._orNullIfIdentity(),a=i&&(!e||e.equals(o))&&this._getBoundsCacheKey(t,r),s=this._bounds;if(C._updateBoundsCache(this._parent||this._symbol,i),a&&s&&a in s)return{rect:(d=s[a]).rect.clone(),nonscaling:d.nonscaling};var c=this._getBounds(e||o,t),u=c.rect||c,l=this._style,f=c.nonscaling||l.hasStroke()&&!l.getStrokeScaling();if(a){s||(this._bounds=s={});var d=s[a]={rect:u.clone(),nonscaling:f,internal:r}}return{rect:u,nonscaling:f}},_getStrokeMatrix:function(e,t){var n=this.getStrokeScaling()?null:t&&t.internal?this:this._parent||this._symbol&&this._symbol._item,r=n?n.getViewMatrix().invert():e;return r&&r._shiftless()},statics:{_updateBoundsCache:function(e,t){if(e&&t){var n=t._id,r=e._boundsCache=e._boundsCache||{ids:{},list:[]};r.ids[n]||(r.list.push(t),r.ids[n]=t)}},_clearBoundsCache:function(e){var t=e._boundsCache;if(t){e._bounds=e._position=e._boundsCache=a;for(var n=0,r=t.list,i=r.length;n<i;n++){var o=r[n];o!==e&&(o._bounds=o._position=a,o._boundsCache&&C._clearBoundsCache(o))}}},_getBounds:function(e,t,n){var r=1/0,i=-r,o=r,a=i,s=!1;n=n||{};for(var c=0,u=e.length;c<u;c++){var l=e[c];if(l._visible&&!l.isEmpty(!0)){var f=l._getCachedBounds(t&&t.appended(l._matrix),n,!0),d=f.rect;r=Math.min(d.x,r),o=Math.min(d.y,o),i=Math.max(d.x+d.width,i),a=Math.max(d.y+d.height,a),f.nonscaling&&(s=!0)}}return{rect:isFinite(r)?new _(r,o,i-r,a-o):new _,nonscaling:s}}}}),{beans:!0,_decompose:function(){return this._applyMatrix?null:this._decomposed||(this._decomposed=this._matrix.decompose())},getRotation:function(){var e=this._decompose();return e?e.rotation:0},setRotation:function(e){var t=this.getRotation();if(null!=t&&null!=e){var n=this._decomposed;this.rotate(e-t),n&&(n.rotation=e,this._decomposed=n)}},getScaling:function(){var e=this._decompose(),t=e&&e.scaling;return new y(t?t.x:1,t?t.y:1,this,"setScaling")},setScaling:function(){var e=this.getScaling(),t=m.read(arguments,0,{clone:!0,readNull:!0});if(e&&t&&!e.equals(t)){var n=this.getRotation(),r=this._decomposed,i=new O,o=g.isZero;if(o(e.x)||o(e.y))i.translate(r.translation),n&&i.rotate(n),i.scale(t.x,t.y),this._matrix.set(i);else{var a=this.getPosition(!0);i.translate(a),n&&i.rotate(n),i.scale(t.x/e.x,t.y/e.y),n&&i.rotate(-n),i.translate(a.negate()),this.transform(i)}r&&(r.scaling=t,this._decomposed=r)}},getMatrix:function(){return this._matrix},setMatrix:function(){var e=this._matrix;e.set.apply(e,arguments)},getGlobalMatrix:function(e){var t=this._globalMatrix;if(t)for(var n=this._parent,r=[];n;){if(!n._globalMatrix){t=null;for(var i=0,o=r.length;i<o;i++)r[i]._globalMatrix=null;break}r.push(n),n=n._parent}t||(t=this._globalMatrix=this._matrix.clone(),(n=this._parent)&&t.prepend(n.getGlobalMatrix(!0)));return e?t:t.clone()},getViewMatrix:function(){return this.getGlobalMatrix().prepend(this.getView()._matrix)},getApplyMatrix:function(){return this._applyMatrix},setApplyMatrix:function(e){(this._applyMatrix=this._canApplyMatrix&&!!e)&&this.transform(null,!0)},getTransformContent:"#getApplyMatrix",setTransformContent:"#setApplyMatrix"},{getProject:function(){return this._project},_setProject:function(e,t){if(this._project!==e){this._project&&this._installEvents(!1),this._project=e;for(var n=this._children,r=0,i=n&&n.length;r<i;r++)n[r]._setProject(e);t=!0}t&&this._installEvents(!0)},getView:function(){return this._project._view},_installEvents:function e(t){e.base.call(this,t);for(var n=this._children,r=0,i=n&&n.length;r<i;r++)n[r]._installEvents(t)},getLayer:function(){for(var e=this;e=e._parent;)if(e instanceof T)return e;return null},getParent:function(){return this._parent},setParent:function(e){return e.addChild(this)},_getOwner:"#getParent",getChildren:function(){return this._children},setChildren:function(e){this.removeChildren(),this.addChildren(e)},getFirstChild:function(){return this._children&&this._children[0]||null},getLastChild:function(){return this._children&&this._children[this._children.length-1]||null},getNextSibling:function(){var e=this._getOwner();return e&&e._children[this._index+1]||null},getPreviousSibling:function(){var e=this._getOwner();return e&&e._children[this._index-1]||null},getIndex:function(){return this._index},equals:function(e){return e===this||e&&this._class===e._class&&this._style.equals(e._style)&&this._matrix.equals(e._matrix)&&this._locked===e._locked&&this._visible===e._visible&&this._blendMode===e._blendMode&&this._opacity===e._opacity&&this._clipMask===e._clipMask&&this._guide===e._guide&&this._equals(e)||!1},_equals:function(e){return u.equals(this._children,e._children)},clone:function(e){var t=new this.constructor(C.NO_INSERT),n=this._children,r=u.pick(e?e.insert:a,e===a||!0===e),i=u.pick(e?e.deep:a,!0);n&&t.copyAttributes(this),n&&!i||t.copyContent(this),n||t.copyAttributes(this),r&&t.insertAbove(this);var o=this._name,s=this._parent;if(o&&s){n=s._children;for(var c=o,l=1;n[o];)o=c+" "+l++;o!==c&&t.setName(o)}return t},copyContent:function(e){for(var t=e._children,n=0,r=t&&t.length;n<r;n++)this.addChild(t[n].clone(!1),!0)},copyAttributes:function(e,t){this.setStyle(e._style);for(var n=["_locked","_visible","_blendMode","_opacity","_clipMask","_guide"],r=0,i=n.length;r<i;r++){var o=n[r];e.hasOwnProperty(o)&&(this[o]=e[o])}t||this._matrix.set(e._matrix,!0),this.setApplyMatrix(e._applyMatrix),this.setPivot(e._pivot),this.setSelection(e._selection);var a=e._data,s=e._name;this._data=a?u.clone(a):null,s&&this.setName(s)},rasterize:function(e,t){var n,r,i;u.isPlainObject(e)?(n=e.resolution,r=e.insert,i=e.raster):(n=e,r=t),i?i.matrix.reset(!0):i=new P(C.NO_INSERT);var o=this.getStrokeBounds(),s=(n||this.getView().getResolution())/72,c=o.getTopLeft().floor(),l=o.getBottomRight().ceil(),f=new b(l.subtract(c)),d=f.multiply(s);if(i.setSize(d,!0),!d.isZero()){var p=i.getContext(!0),h=(new O).scale(s).translate(c.negate());p.save(),h.applyToContext(p),this.draw(p,new u({matrices:[h]})),p.restore()}return i.transform((new O).translate(c.add(f.divide(2))).scale(1/s)),(r===a||r)&&i.insertAbove(this),i},contains:function(){var e=this._matrix;return e.isInvertible()&&!!this._contains(e._inverseTransform(m.read(arguments)))},_contains:function(e){var t=this._children;if(t){for(var n=t.length-1;n>=0;n--)if(t[n].contains(e))return!0;return!1}return e.isInside(this.getInternalBounds())},isInside:function(){return _.read(arguments).contains(this.getBounds())},_asPathItem:function(){return new B.Rectangle({rectangle:this.getInternalBounds(),matrix:this._matrix,insert:!1})},intersects:function(e,t){return e instanceof C&&this._asPathItem().getIntersections(e._asPathItem(),null,t,!0).length>0}},new function(){function e(){var e=arguments;return this._hitTest(m.read(e),A.getOptions(e))}function t(){var e=arguments,t=m.read(e),n=A.getOptions(e),r=[];return this._hitTest(t,new u({all:r},n)),r}function n(e,t,n,r){var i=this._children;if(i)for(var o=i.length-1;o>=0;o--){var a=i[o],s=a!==r&&a._hitTest(e,t,n);if(s&&!t.all)return s}return null}return E.inject({hitTest:e,hitTestAll:t,_hitTest:n}),{hitTest:e,hitTestAll:t,_hitTestChildren:n}},{_hitTest:function(e,t,n){if(this._locked||!this._visible||this._guide&&!t.guides||this.isEmpty())return null;var r=this._matrix,i=n?n.appended(r):this.getGlobalMatrix().prepend(this.getView()._matrix),o=Math.max(t.tolerance,1e-12),a=t._tolerancePadding=new b(B._getStrokePadding(o,r._shiftless().invert()));if(!(e=r._inverseTransform(e))||!this._children&&!this.getBounds({internal:!0,stroke:!0,handle:!0}).expand(a.multiply(2))._containsPoint(e))return null;var s,c,l=!(t.guides&&!this._guide||t.selected&&!this.isSelected()||t.type&&t.type!==u.hyphenate(this._class)||t.class&&!(this instanceof t.class)),f=t.match,d=this;function p(e){return e&&f&&!f(e)&&(e=null),e&&t.all&&t.all.push(e),e}function h(t,n){var r=n?s["get"+n]():d.getPosition();if(e.subtract(r).divide(a).length<=1)return new A(t,d,{name:n?u.hyphenate(n):t,point:r})}var g=t.position,v=t.center,m=t.bounds;if(l&&this._parent&&(g||v||m)){if((v||m)&&(s=this.getInternalBounds()),!(c=g&&h("position")||v&&h("center","Center"))&&m)for(var y=["TopLeft","TopRight","BottomLeft","BottomRight","LeftCenter","TopCenter","RightCenter","BottomCenter"],w=0;w<8&&!c;w++)c=h("bounds",y[w]);c=p(c)}return c||(c=this._hitTestChildren(e,t,i)||l&&p(this._hitTestSelf(e,t,i,this.getStrokeScaling()?null:i._shiftless().invert()))||null),c&&c.point&&(c.point=r.transform(c.point)),c},_hitTestSelf:function(e,t){if(t.fill&&this.hasFill()&&this._contains(e))return new A("fill",this)},matches:function(e,t){var n=typeof e;if("object"===n){for(var r in e)if(e.hasOwnProperty(r)&&!this.matches(r,e[r]))return!1;return!0}if("function"===n)return e(this);if("match"===e)return t(this);var i=/^(empty|editable)$/.test(e)?this["is"+u.capitalize(e)]():"type"===e?u.hyphenate(this._class):this[e];if("class"===e){if("function"==typeof t)return this instanceof t;i=this._class}if("function"==typeof t)return!!t(i);if(t){if(t.test)return t.test(i);if(u.isPlainObject(t))return function e(t,n){for(var r in t)if(t.hasOwnProperty(r)){var i=t[r],o=n[r];if(u.isPlainObject(i)&&u.isPlainObject(o)){if(!e(i,o))return!1}else if(!u.equals(i,o))return!1}return!0}(t,i)}return u.equals(i,t)},getItems:function(e){return C._getItems(this,e,this._matrix)},getItem:function(e){return C._getItems(this,e,this._matrix,null,!0)[0]||null},statics:{_getItems:function e(t,n,r,i,o){if(!i){var a="object"==typeof n&&n,s=a&&a.overlapping,c=a&&a.inside,l=(y=s||c)&&_.read([y]);i={items:[],recursive:a&&!1!==a.recursive,inside:!!c,overlapping:!!s,rect:l,path:s&&new B.Rectangle({rectangle:l,insert:!1})},a&&(n=u.filter({},n,{recursive:!0,inside:!0,overlapping:!0}))}var f=t._children,d=i.items;r=(l=i.rect)&&(r||new O);for(var p=0,h=f&&f.length;p<h;p++){var g=f[p],v=r&&r.appended(g._matrix),m=!0;if(l){var y=g.getBounds(v);if(!l.intersects(y))continue;l.contains(y)||i.overlapping&&(y.contains(l)||i.path.intersects(g,v))||(m=!1)}if(m&&g.matches(n)&&(d.push(g),o))break;if(!1!==i.recursive&&e(g,n,v,i,o),o&&d.length>0)break}return d}}},{importJSON:function(e){var t=u.importJSON(e,this);return t!==this?this.addChild(t):t},addChild:function(e){return this.insertChild(a,e)},insertChild:function(e,t){var n=t?this.insertChildren(e,[t]):null;return n&&n[0]},addChildren:function(e){return this.insertChildren(this._children.length,e)},insertChildren:function(e,t){var n=this._children;if(n&&t&&t.length>0){for(var r={},i=(t=u.slice(t)).length-1;i>=0;i--){var o=(l=t[i])&&l._id;!l||r[o]?t.splice(i,1):(l._remove(!1,!0),r[o]=!0)}u.splice(n,t,e,0);for(var a=this._project,s=a._changes,c=(i=0,t.length);i<c;i++){var l,f=(l=t[i])._name;l._parent=this,l._setProject(a,!0),f&&l.setName(f),s&&l._changed(5)}this._changed(11)}else t=null;return t},_insertItem:"#insertChild",_insertAt:function(e,t){var n=e&&e._getOwner(),r=e!==this&&n?this:null;return r&&(r._remove(!1,!0),n._insertItem(e._index+t,r)),r},insertAbove:function(e){return this._insertAt(e,1)},insertBelow:function(e){return this._insertAt(e,0)},sendToBack:function(){var e=this._getOwner();return e?e._insertItem(0,this):null},bringToFront:function(){var e=this._getOwner();return e?e._insertItem(a,this):null},appendTop:"#addChild",appendBottom:function(e){return this.insertChild(0,e)},moveAbove:"#insertAbove",moveBelow:"#insertBelow",addTo:function(e){return e._insertItem(a,this)},copyTo:function(e){return this.clone(!1).addTo(e)},reduce:function(e){var t=this._children;if(t&&1===t.length){var n=t[0].reduce(e);return this._parent?(n.insertAbove(this),this.remove()):n.remove(),n}return this},_removeNamed:function(){var e=this._getOwner();if(e){var t=e._children,n=e._namedChildren,r=this._name,i=n[r],o=i?i.indexOf(this):-1;-1!==o&&(t[r]==this&&delete t[r],i.splice(o,1),i.length?t[r]=i[0]:delete n[r])}},_remove:function(e,t){var n=this._getOwner(),r=this._project,i=this._index;return this._style&&this._style._dispose(),!!n&&(this._name&&this._removeNamed(),null!=i&&(r._activeLayer===this&&(r._activeLayer=this.getNextSibling()||this.getPreviousSibling()),u.splice(n._children,null,i,1)),this._installEvents(!1),e&&r._changes&&this._changed(5),t&&n._changed(11,this),this._parent=null,!0)},remove:function(){return this._remove(!0,!0)},replaceWith:function(e){var t=e&&e.insertBelow(this);return t&&this.remove(),t},removeChildren:function(e,t){if(!this._children)return null;e=e||0,t=u.pick(t,this._children.length);for(var n=u.splice(this._children,null,e,t-e),r=n.length-1;r>=0;r--)n[r]._remove(!0,!1);return n.length>0&&this._changed(11),n},clear:"#removeChildren",reverseChildren:function(){if(this._children){this._children.reverse();for(var e=0,t=this._children.length;e<t;e++)this._children[e]._index=e;this._changed(11)}},isEmpty:function(e){var t=this._children,n=t?t.length:0;if(e){for(var r=0;r<n;r++)if(!t[r].isEmpty(e))return!1;return!0}return!n},isEditable:function(){for(var e=this;e;){if(!e._visible||e._locked)return!1;e=e._parent}return!0},hasFill:function(){return this.getStyle().hasFill()},hasStroke:function(){return this.getStyle().hasStroke()},hasShadow:function(){return this.getStyle().hasShadow()},_getOrder:function(e){function t(e){var t=[];do{t.unshift(e)}while(e=e._parent);return t}for(var n=t(this),r=t(e),i=0,o=Math.min(n.length,r.length);i<o;i++)if(n[i]!=r[i])return n[i]._index<r[i]._index?1:-1;return 0},hasChildren:function(){return this._children&&this._children.length>0},isInserted:function(){return!!this._parent&&this._parent.isInserted()},isAbove:function(e){return-1===this._getOrder(e)},isBelow:function(e){return 1===this._getOrder(e)},isParent:function(e){return this._parent===e},isChild:function(e){return e&&e._parent===this},isDescendant:function(e){for(var t=this;t=t._parent;)if(t===e)return!0;return!1},isAncestor:function(e){return!!e&&e.isDescendant(this)},isSibling:function(e){return this._parent===e._parent},isGroupedWith:function(e){for(var t=this._parent;t;){if(t._parent&&/^(Group|Layer|CompoundPath)$/.test(t._class)&&e.isDescendant(t))return!0;t=t._parent}return!1}},u.each(["rotate","scale","shear","skew"],(function(e){var t="rotate"===e;this[e]=function(){var n=arguments,r=(t?u:m).read(n),i=m.read(n,0,{readNull:!0});return this.transform((new O)[e](r,i||this.getPosition(!0)))}}),{translate:function(){var e=new O;return this.transform(e.translate.apply(e,arguments))},transform:function(e,t,n){var r=this._matrix,i=e&&!e.isIdentity(),o=n&&this._canApplyMatrix||this._applyMatrix&&(i||!r.isIdentity()||t&&this._children);if(!i&&!o)return this;if(i){!e.isInvertible()&&r.isInvertible()&&(r._backup=r.getValues()),r.prepend(e,!0);var a=this._style,s=a.getFillColor(!0),c=a.getStrokeColor(!0);s&&s.transform(e),c&&c.transform(e)}if(o&&(o=this._transformContent(r,t,n))){var u=this._pivot;u&&r._transformPoint(u,u,!0),r.reset(!0),n&&this._canApplyMatrix&&(this._applyMatrix=!0)}var l=this._bounds,f=this._position;(i||o)&&this._changed(25);var d=i&&l&&e.decompose();if(d&&d.skewing.isZero()&&d.rotation%90==0){for(var p in l){var h=l[p];if(h.nonscaling)delete l[p];else if(o||!h.internal){var g=h.rect;e._transformBounds(g,g)}}this._bounds=l;var v=l[this._getBoundsCacheKey(this._boundsOptions||{})];v&&(this._position=this._getPositionFromBounds(v.rect))}else i&&f&&this._pivot&&(this._position=e._transformPoint(f,f));return this},_transformContent:function(e,t,n){var r=this._children;if(r){for(var i=0,o=r.length;i<o;i++)r[i].transform(e,t,n);return!0}},globalToLocal:function(){return this.getGlobalMatrix(!0)._inverseTransform(m.read(arguments))},localToGlobal:function(){return this.getGlobalMatrix(!0)._transformPoint(m.read(arguments))},parentToLocal:function(){return this._matrix._inverseTransform(m.read(arguments))},localToParent:function(){return this._matrix._transformPoint(m.read(arguments))},fitBounds:function(e,t){e=_.read(arguments);var n=this.getBounds(),r=n.height/n.width,i=e.height/e.width,o=(t?r>i:r<i)?e.width/n.width:e.height/n.height,a=new _(new m,new b(n.width*o,n.height*o));a.setCenter(e.getCenter()),this.setBounds(a)}}),{_setStyles:function(e,t,n){var r=this._style,i=this._matrix;if(r.hasFill()&&(e.fillStyle=r.getFillColor().toCanvasStyle(e,i)),r.hasStroke()){e.strokeStyle=r.getStrokeColor().toCanvasStyle(e,i),e.lineWidth=r.getStrokeWidth();var o=r.getStrokeJoin(),a=r.getStrokeCap(),s=r.getMiterLimit();if(o&&(e.lineJoin=o),a&&(e.lineCap=a),s&&(e.miterLimit=s),le.support.nativeDash){var c=r.getDashArray(),u=r.getDashOffset();c&&c.length&&("setLineDash"in e?(e.setLineDash(c),e.lineDashOffset=u):(e.mozDash=c,e.mozDashOffset=u))}}if(r.hasShadow()){var l=t.pixelRatio||1,f=n._shiftless().prepend((new O).scale(l,l)),d=f.transform(new m(r.getShadowBlur(),0)),p=f.transform(this.getShadowOffset());e.shadowColor=r.getShadowColor().toCanvasStyle(e),e.shadowBlur=d.getLength(),e.shadowOffsetX=p.x,e.shadowOffsetY=p.y}},draw:function(e,t,n){this._updateVersion=this._project._updateVersion;if(this._visible&&0!==this._opacity){var r=t.matrices,i=t.viewMatrix,o=this._matrix,a=r[r.length-1].appended(o);if(a.isInvertible()){i=i?i.appended(a):a,r.push(a),t.updateMatrix&&(this._globalMatrix=a);var s,c,u,l=this._blendMode,f=g.clamp(this._opacity,0,1),d="normal"===l,p=se.nativeModes[l],h=d&&1===f||t.dontStart||t.clip||(p||d&&f<1)&&this._canComposite(),v=t.pixelRatio||1;if(!h){var m=this.getStrokeBounds(i);if(!m.width||!m.height)return void r.pop();u=t.offset,c=t.offset=m.getTopLeft().floor(),s=e,e=ae.getContext(m.getSize().ceil().add(1).multiply(v)),1!==v&&e.scale(v,v)}e.save();var y=n?n.appended(o):this._canScaleStroke&&!this.getStrokeScaling(!0)&&i,b=!h&&t.clipItem,w=!y||b;if(h?(e.globalAlpha=f,p&&(e.globalCompositeOperation=l)):w&&e.translate(-c.x,-c.y),w&&(h?o:i).applyToContext(e),b&&t.clipItem.draw(e,t.extend({clip:!0})),y){e.setTransform(v,0,0,v,0,0);var _=t.offset;_&&e.translate(-_.x,-_.y)}this._draw(e,t,i,y),e.restore(),r.pop(),t.clip&&!t.dontFinish&&e.clip(this.getFillRule()),h||(se.process(l,e,s,f,c.subtract(u).multiply(v)),ae.release(e),t.offset=u)}}},_isUpdated:function(e){var t=this._parent;if(t instanceof F)return t._isUpdated(e);var n=this._updateVersion===e;return!n&&t&&t._visible&&t._isUpdated(e)&&(this._updateVersion=e,n=!0),n},_drawSelection:function(e,t,n,r,i){var o=this._selection,a=1&o,s=2&o||a&&this._selectBounds,c=4&o;if(this._drawSelected||(a=!1),(a||s||c)&&this._isUpdated(i)){var u,l=this.getSelectedColor(!0)||(u=this.getLayer())&&u.getSelectedColor(!0),f=t.appended(this.getGlobalMatrix(!0)),d=n/2;if(e.strokeStyle=e.fillStyle=l?l.toCanvasStyle(e):"#009dec",a&&this._drawSelected(e,f,r),c){var p=this.getPosition(!0),h=this._parent,g=h?h.localToGlobal(p):p,v=g.x,m=g.y;e.beginPath(),e.arc(v,m,d,0,2*Math.PI,!0),e.stroke();for(var y=[[0,-1],[1,0],[0,1],[-1,0]],b=d,w=n+1,_=0;_<4;_++){var x=y[_],O=x[0],S=x[1];e.moveTo(v+O*b,m+S*b),e.lineTo(v+O*w,m+S*w),e.stroke()}}if(s){var E=f._transformCorners(this.getInternalBounds());e.beginPath();for(_=0;_<8;_++)e[_?"lineTo":"moveTo"](E[_],E[++_]);e.closePath(),e.stroke();for(_=0;_<8;_++)e.fillRect(E[_]-d,E[++_]-d,n,n)}}},_canComposite:function(){return!1}},u.each(["down","drag","up","move"],(function(e){this["removeOn"+u.capitalize(e)]=function(){var t={};return t[e]=!0,this.removeOn(t)}}),{removeOn:function(e){for(var t in e)if(e[t]){var n="mouse"+t,r=this._project,i=r._removeSets=r._removeSets||{};i[n]=i[n]||{},i[n][this._id]=this}return this}}),{tween:function(e,t,n){n||(n=t,t=e,e=null,n||(n=t,t=null));var r=n&&n.easing,i=n&&n.start,o=null!=n&&("number"==typeof n?n:n.duration),a=new ie(this,e,t,o,r,i);return o&&this.on("frame",(function e(t){a._handleFrame(1e3*t.time),a.running||this.off("frame",e)})),a},tweenTo:function(e,t){return this.tween(null,e,t)},tweenFrom:function(e,t){return this.tween(e,null,t)}}),k=C.extend({_class:"Group",_selectBounds:!1,_selectChildren:!0,_serializeFields:{children:[]},initialize:function(e){this._children=[],this._namedChildren={},this._initialize(e)||this.addChildren(Array.isArray(e)?e:arguments)},_changed:function e(t){e.base.call(this,t),2050&t&&(this._clipItem=a)},_getClipItem:function(){var e=this._clipItem;if(e===a){e=null;for(var t=this._children,n=0,r=t.length;n<r;n++)if(t[n]._clipMask){e=t[n];break}this._clipItem=e}return e},isClipped:function(){return!!this._getClipItem()},setClipped:function(e){var t=this.getFirstChild();t&&t.setClipMask(e)},_getBounds:function e(t,n){var r=this._getClipItem();return r?r._getCachedBounds(r._matrix.prepended(t),u.set({},n,{stroke:!1})):e.base.call(this,t,n)},_hitTestChildren:function e(t,n,r){var i=this._getClipItem();return(!i||i.contains(t))&&e.base.call(this,t,n,r,i)},_draw:function(e,t){var n=t.clip,r=!n&&this._getClipItem();t=t.extend({clipItem:r,clip:!1}),n?(e.beginPath(),t.dontStart=t.dontFinish=!0):r&&r.draw(e,t.extend({clip:!0}));for(var i=this._children,o=0,a=i.length;o<a;o++){var s=i[o];s!==r&&s.draw(e,t)}}}),T=k.extend({_class:"Layer",initialize:function(){k.apply(this,arguments)},_getOwner:function(){return this._parent||null!=this._index&&this._project},isInserted:function e(){return this._parent?e.base.call(this):null!=this._index},activate:function(){this._project._activeLayer=this},_hitTestSelf:function(){}}),j=C.extend({_class:"Shape",_applyMatrix:!1,_canApplyMatrix:!1,_canScaleStroke:!0,_serializeFields:{type:null,size:null,radius:null},initialize:function(e,t){this._initialize(e,t)},_equals:function(e){return this._type===e._type&&this._size.equals(e._size)&&u.equals(this._radius,e._radius)},copyContent:function(e){this.setType(e._type),this.setSize(e._size),this.setRadius(e._radius)},getType:function(){return this._type},setType:function(e){this._type=e},getShape:"#getType",setShape:"#setType",getSize:function(){var e=this._size;return new w(e.width,e.height,this,"setSize")},setSize:function(){var e=b.read(arguments);if(this._size){if(!this._size.equals(e)){var t=this._type,n=e.width,r=e.height;"rectangle"===t?this._radius.set(b.min(this._radius,e.divide(2).abs())):"circle"===t?(n=r=(n+r)/2,this._radius=n/2):"ellipse"===t&&this._radius._set(n/2,r/2),this._size._set(n,r),this._changed(9)}}else this._size=e.clone()},getRadius:function(){var e=this._radius;return"circle"===this._type?e:new w(e.width,e.height,this,"setRadius")},setRadius:function(e){var t=this._type;if("circle"===t){if(e===this._radius)return;var n=2*e;this._radius=e,this._size._set(n,n)}else if(e=b.read(arguments),this._radius){if(this._radius.equals(e))return;if(this._radius.set(e),"rectangle"===t){n=b.max(this._size,e.multiply(2));this._size.set(n)}else"ellipse"===t&&this._size._set(2*e.width,2*e.height)}else this._radius=e.clone();this._changed(9)},isEmpty:function(){return!1},toPath:function(e){var t=new(B[u.capitalize(this._type)])({center:new m,size:this._size,radius:this._radius,insert:!1});return t.copyAttributes(this),le.settings.applyMatrix&&t.setApplyMatrix(!0),(e===a||e)&&t.insertAbove(this),t},toShape:"#clone",_asPathItem:function(){return this.toPath(!1)},_draw:function(e,t,n,r){var i=this._style,o=i.hasFill(),a=i.hasStroke(),s=t.dontFinish||t.clip,c=!r;if(o||a||s){var u=this._type,l=this._radius,f="circle"===u;if(t.dontStart||e.beginPath(),c&&f)e.arc(0,0,l,0,2*Math.PI,!0);else{var d=f?l:l.width,p=f?l:l.height,h=this._size,g=h.width,v=h.height;if(c&&"rectangle"===u&&0===d&&0===p)e.rect(-g/2,-v/2,g,v);else{var m=g/2,y=v/2,b=.44771525016920644,w=d*b,_=p*b,x=[-m,-y+p,-m,-y+_,-m+w,-y,-m+d,-y,m-d,-y,m-w,-y,m,-y+_,m,-y+p,m,y-p,m,y-_,m-w,y,m-d,y,-m+d,y,-m+w,y,-m,y-_,-m,y-p];r&&r.transform(x,x,32),e.moveTo(x[0],x[1]),e.bezierCurveTo(x[2],x[3],x[4],x[5],x[6],x[7]),m!==d&&e.lineTo(x[8],x[9]),e.bezierCurveTo(x[10],x[11],x[12],x[13],x[14],x[15]),y!==p&&e.lineTo(x[16],x[17]),e.bezierCurveTo(x[18],x[19],x[20],x[21],x[22],x[23]),m!==d&&e.lineTo(x[24],x[25]),e.bezierCurveTo(x[26],x[27],x[28],x[29],x[30],x[31])}}e.closePath()}s||!o&&!a||(this._setStyles(e,t,n),o&&(e.fill(i.getFillRule()),e.shadowColor="rgba(0,0,0,0)"),a&&e.stroke())},_canComposite:function(){return!(this.hasFill()&&this.hasStroke())},_getBounds:function(e,t){var n=new _(this._size).setCenter(0,0),r=this._style,i=t.stroke&&r.hasStroke()&&r.getStrokeWidth();return e&&(n=e._transformBounds(n)),i?n.expand(B._getStrokePadding(i,this._getStrokeMatrix(e,t))):n}},new function(){function e(e,t,n){var r=e._radius;if(!r.isZero())for(var i=e._size.divide(2),o=1;o<=4;o++){var a=new m(o>1&&o<4?-1:1,o>2?-1:1),s=a.multiply(i),c=s.subtract(a.multiply(r));if(new _(n?s.add(a.multiply(n)):s,c).contains(t))return{point:c,quadrant:o}}}function t(e,t,n,r){var i=e.divide(t);return(!r||i.isInQuadrant(r))&&i.subtract(i.normalize()).multiply(t).divide(n).length<=1}return{_contains:function t(n){if("rectangle"===this._type){var r=e(this,n);return r?n.subtract(r.point).divide(this._radius).getLength()<=1:t.base.call(this,n)}return n.divide(this.size).getLength()<=.5},_hitTestSelf:function n(r,i,o,a){var s=!1,c=this._style,u=i.stroke&&c.hasStroke(),l=i.fill&&c.hasFill();if(u||l){var f=this._type,d=this._radius,p=u?c.getStrokeWidth()/2:0,h=i._tolerancePadding.add(B._getStrokePadding(p,!c.getStrokeScaling()&&a));if("rectangle"===f){var g=h.multiply(2),v=e(this,r,g);if(v)s=t(r.subtract(v.point),d,h,v.quadrant);else{var m=new _(this._size).setCenter(0,0),y=m.expand(g),b=m.expand(g.negate());s=y._containsPoint(r)&&!b._containsPoint(r)}}else s=t(r,d,h)}return s?new A(u?"stroke":"fill",this):n.base.apply(this,arguments)}}},{statics:new function(){function e(e,t,n,r,i){var o=u.create(j.prototype);return o._type=e,o._size=n,o._radius=r,o._initialize(u.getNamed(i),t),o}return{Circle:function(){var t=arguments,n=m.readNamed(t,"center"),r=u.readNamed(t,"radius");return e("circle",n,new b(2*r),r,t)},Rectangle:function(){var t=arguments,n=_.readNamed(t,"rectangle"),r=b.min(b.readNamed(t,"radius"),n.getSize(!0).divide(2));return e("rectangle",n.getCenter(!0),n.getSize(!0),r,t)},Ellipse:function(){var t=arguments,n=j._readEllipse(t),r=n.radius;return e("ellipse",n.center,r.multiply(2),r,t)},_readEllipse:function(e){var t,n;if(u.hasNamed(e,"radius"))t=m.readNamed(e,"center"),n=b.readNamed(e,"radius");else{var r=_.readNamed(e,"rectangle");t=r.getCenter(!0),n=r.getSize(!0).divide(2)}return{center:t,radius:n}}}}}),P=C.extend({_class:"Raster",_applyMatrix:!1,_canApplyMatrix:!1,_boundsOptions:{stroke:!1,handle:!1},_serializeFields:{crossOrigin:null,source:null},_prioritize:["crossOrigin"],_smoothing:"low",beans:!0,initialize:function(e,t){if(!this._initialize(e,t!==a&&m.read(arguments))){var n,r=typeof e,i="string"===r?c.getElementById(e):"object"===r?e:null;if(i&&i!==C.NO_INSERT)if(i.getContext||null!=i.naturalHeight)n=i;else if(i){var o=b.read(arguments);o.isZero()||(n=ae.getCanvas(o))}n?this.setImage(n):this.setSource(e)}this._size||(this._size=new b,this._loaded=!1)},_equals:function(e){return this.getSource()===e.getSource()},copyContent:function(e){var t=e._image,n=e._canvas;if(t)this._setImage(t);else if(n){var r=ae.getCanvas(e._size);r.getContext("2d").drawImage(n,0,0),this._setImage(r)}this._crossOrigin=e._crossOrigin},getSize:function(){var e=this._size;return new w(e?e.width:0,e?e.height:0,this,"setSize")},setSize:function(e,t){var n=b.read(arguments);if(n.equals(this._size))t&&this.clear();else if(n.width>0&&n.height>0){var r=!t&&this.getElement();this._setImage(ae.getCanvas(n)),r&&this.getContext(!0).drawImage(r,0,0,n.width,n.height)}else this._canvas&&ae.release(this._canvas),this._size=n.clone()},getWidth:function(){return this._size?this._size.width:0},setWidth:function(e){this.setSize(e,this.getHeight())},getHeight:function(){return this._size?this._size.height:0},setHeight:function(e){this.setSize(this.getWidth(),e)},getLoaded:function(){return this._loaded},isEmpty:function(){var e=this._size;return!e||0===e.width&&0===e.height},getResolution:function(){var e=this._matrix,t=new m(0,0).transform(e),n=new m(1,0).transform(e).subtract(t),r=new m(0,1).transform(e).subtract(t);return new b(72/n.getLength(),72/r.getLength())},getPpi:"#getResolution",getImage:function(){return this._image},setImage:function(e){var t=this;function n(e){var n=t.getView(),r=e&&e.type||"load";n&&t.responds(r)&&(le=n._scope,t.emit(r,new J(e)))}this._setImage(e),this._loaded?setTimeout(n,0):e&&X.add(e,{load:function(r){t._setImage(e),n(r)},error:n})},_setImage:function(e){this._canvas&&ae.release(this._canvas),e&&e.getContext?(this._image=null,this._canvas=e,this._loaded=!0):(this._image=e,this._canvas=null,this._loaded=!!(e&&e.src&&e.complete)),this._size=new b(e?e.naturalWidth||e.width:0,e?e.naturalHeight||e.height:0),this._context=null,this._changed(1033)},getCanvas:function(){if(!this._canvas){var e=ae.getContext(this._size);try{this._image&&e.drawImage(this._image,0,0),this._canvas=e.canvas}catch(t){ae.release(e)}}return this._canvas},setCanvas:"#setImage",getContext:function(e){return this._context||(this._context=this.getCanvas().getContext("2d")),e&&(this._image=null,this._changed(1025)),this._context},setContext:function(e){this._context=e},getSource:function(){var e=this._image;return e&&e.src||this.toDataURL()},setSource:function(e){var t=new o.Image,n=this._crossOrigin;n&&(t.crossOrigin=n),e&&(t.src=e),this.setImage(t)},getCrossOrigin:function(){var e=this._image;return e&&e.crossOrigin||this._crossOrigin||""},setCrossOrigin:function(e){this._crossOrigin=e;var t=this._image;t&&(t.crossOrigin=e)},getSmoothing:function(){return this._smoothing},setSmoothing:function(e){this._smoothing="string"==typeof e?e:e?"low":"off",this._changed(257)},getElement:function(){return this._canvas||this._loaded&&this._image}},{beans:!1,getSubCanvas:function(){var e=_.read(arguments),t=ae.getContext(e.getSize());return t.drawImage(this.getCanvas(),e.x,e.y,e.width,e.height,0,0,e.width,e.height),t.canvas},getSubRaster:function(){var e=_.read(arguments),t=new P(C.NO_INSERT);return t._setImage(this.getSubCanvas(e)),t.translate(e.getCenter().subtract(this.getSize().divide(2))),t._matrix.prepend(this._matrix),t.insertAbove(this),t},toDataURL:function(){var e=this._image,t=e&&e.src;if(/^data:/.test(t))return t;var n=this.getCanvas();return n?n.toDataURL.apply(n,arguments):null},drawImage:function(e){var t=m.read(arguments,1);this.getContext(!0).drawImage(e,t.x,t.y)},getAverageColor:function(e){var t,n;if(e?e instanceof z?(n=e,t=e.getBounds()):"object"==typeof e&&("width"in e?t=new _(e):"x"in e&&(t=new _(e.x-.5,e.y-.5,1,1))):t=this.getBounds(),!t)return null;var r=Math.min(t.width,32),i=Math.min(t.height,32),o=P._sampleContext;o?o.clearRect(0,0,33,33):o=P._sampleContext=ae.getContext(new b(32)),o.save();var a=(new O).scale(r/t.width,i/t.height).translate(-t.x,-t.y);a.applyToContext(o),n&&n.draw(o,new u({clip:!0,matrices:[a]})),this._matrix.applyToContext(o);var s=this.getElement(),c=this._size;s&&o.drawImage(s,-c.width/2,-c.height/2),o.restore();for(var l=o.getImageData(.5,.5,Math.ceil(r),Math.ceil(i)).data,f=[0,0,0],d=0,p=0,h=l.length;p<h;p+=4){var g=l[p+3];d+=g,g/=255,f[0]+=l[p]*g,f[1]+=l[p+1]*g,f[2]+=l[p+2]*g}for(p=0;p<3;p++)f[p]/=d;return d?q.read(f):null},getPixel:function(){var e=m.read(arguments),t=this.getContext().getImageData(e.x,e.y,1,1).data;return new q("rgb",[t[0]/255,t[1]/255,t[2]/255],t[3]/255)},setPixel:function(){var e=arguments,t=m.read(e),n=q.read(e),r=n._convert("rgb"),i=n._alpha,o=this.getContext(!0),a=o.createImageData(1,1),s=a.data;s[0]=255*r[0],s[1]=255*r[1],s[2]=255*r[2],s[3]=null!=i?255*i:255,o.putImageData(a,t.x,t.y)},clear:function(){var e=this._size;this.getContext(!0).clearRect(0,0,e.width+1,e.height+1)},createImageData:function(){var e=b.read(arguments);return this.getContext().createImageData(e.width,e.height)},getImageData:function(){var e=_.read(arguments);return e.isEmpty()&&(e=new _(this._size)),this.getContext().getImageData(e.x,e.y,e.width,e.height)},setImageData:function(e){var t=m.read(arguments,1);this.getContext(!0).putImageData(e,t.x,t.y)},_getBounds:function(e,t){var n=new _(this._size).setCenter(0,0);return e?e._transformBounds(n):n},_hitTestSelf:function(e){if(this._contains(e)){var t=this;return new A("pixel",t,{offset:e.add(t._size.divide(2)).round(),color:{get:function(){return t.getPixel(this.offset)}}})}},_draw:function(e,t,n){var r=this.getElement();if(r&&r.width>0&&r.height>0){e.globalAlpha=g.clamp(this._opacity,0,1),this._setStyles(e,t,n);var i=this._smoothing,o="off"===i;Z.setPrefixed(e,o?"imageSmoothingEnabled":"imageSmoothingQuality",!o&&i),e.drawImage(r,-this._size.width/2,-this._size.height/2)}},_canComposite:function(){return!0}}),I=C.extend({_class:"SymbolItem",_applyMatrix:!1,_canApplyMatrix:!1,_boundsOptions:{stroke:!0},_serializeFields:{symbol:null},initialize:function(e,t){this._initialize(e,t!==a&&m.read(arguments,1))||this.setDefinition(e instanceof R?e:new R(e))},_equals:function(e){return this._definition===e._definition},copyContent:function(e){this.setDefinition(e._definition)},getDefinition:function(){return this._definition},setDefinition:function(e){this._definition=e,this._changed(9)},getSymbol:"#getDefinition",setSymbol:"#setDefinition",isEmpty:function(){return this._definition._item.isEmpty()},_getBounds:function(e,t){var n=this._definition._item;return n._getCachedBounds(n._matrix.prepended(e),t)},_hitTestSelf:function(e,t,n){var r=t.extend({all:!1}),i=this._definition._item._hitTest(e,r,n);return i&&(i.item=this),i},_draw:function(e,t){this._definition._item.draw(e,t)}}),R=u.extend({_class:"SymbolDefinition",initialize:function(e,t){this._id=v.get(),this.project=le.project,e&&this.setItem(e,t)},_serialize:function(e,t){return t.add(this,(function(){return u.serialize([this._class,this._item],e,!1,t)}))},_changed:function(e){8&e&&C._clearBoundsCache(this),1&e&&this.project._changed(e)},getItem:function(){return this._item},setItem:function(e,t){e._symbol&&(e=e.clone()),this._item&&(this._item._symbol=null),this._item=e,e.remove(),e.setSelected(!1),t||e.setPosition(new m),e._symbol=this,this._changed(9)},getDefinition:"#getItem",setDefinition:"#setItem",place:function(e){return new I(this,e)},clone:function(){return new R(this._item.clone(!1))},equals:function(e){return e===this||e&&this._item.equals(e._item)||!1}}),A=u.extend({_class:"HitResult",initialize:function(e,t,n){this.type=e,this.item=t,n&&this.inject(n)},statics:{getOptions:function(e){var t=e&&u.read(e);return new u({type:null,tolerance:le.settings.hitTolerance,fill:!t,stroke:!t,segments:!t,handles:!1,ends:!1,position:!1,center:!1,bounds:!1,guides:!1,selected:!1},t)}}}),M=u.extend({_class:"Segment",beans:!0,_selection:0,initialize:function(e,t,n,r,i,o){var s,c,u,l,f=arguments.length;f>0&&(null==e||"object"==typeof e?1===f&&e&&"point"in e?(s=e.point,c=e.handleIn,u=e.handleOut,l=e.selection):(s=e,c=t,u=n,l=r):(s=[e,t],c=n!==a?[n,r]:null,u=i!==a?[i,o]:null)),new D(s,this,"_point"),new D(c,this,"_handleIn"),new D(u,this,"_handleOut"),l&&this.setSelection(l)},_serialize:function(e,t){var n=this._point,r=this._selection,i=r||this.hasHandles()?[n,this._handleIn,this._handleOut]:n;return r&&i.push(r),u.serialize(i,e,!0,t)},_changed:function(e){var t=this._path;if(t){var n,r=t._curves,i=this._index;r&&(e&&e!==this._point&&e!==this._handleIn||!(n=i>0?r[i-1]:t._closed?r[r.length-1]:null)||n._changed(),e&&e!==this._point&&e!==this._handleOut||!(n=r[i])||n._changed()),t._changed(41)}},getPoint:function(){return this._point},setPoint:function(){this._point.set(m.read(arguments))},getHandleIn:function(){return this._handleIn},setHandleIn:function(){this._handleIn.set(m.read(arguments))},getHandleOut:function(){return this._handleOut},setHandleOut:function(){this._handleOut.set(m.read(arguments))},hasHandles:function(){return!this._handleIn.isZero()||!this._handleOut.isZero()},isSmooth:function(){var e=this._handleIn,t=this._handleOut;return!e.isZero()&&!t.isZero()&&e.isCollinear(t)},clearHandles:function(){this._handleIn._set(0,0),this._handleOut._set(0,0)},getSelection:function(){return this._selection},setSelection:function(e){var t=this._selection,n=this._path;this._selection=e=e||0,n&&e!==t&&(n._updateSelection(this,t,e),n._changed(257))},_changeSelection:function(e,t){var n=this._selection;this.setSelection(t?n|e:n&~e)},isSelected:function(){return!!(7&this._selection)},setSelected:function(e){this._changeSelection(7,e)},getIndex:function(){return this._index!==a?this._index:null},getPath:function(){return this._path||null},getCurve:function(){var e=this._path,t=this._index;return e?(t>0&&!e._closed&&t===e._segments.length-1&&t--,e.getCurves()[t]||null):null},getLocation:function(){var e=this.getCurve();return e?new L(e,this===e._segment1?0:1):null},getNext:function(){var e=this._path&&this._path._segments;return e&&(e[this._index+1]||this._path._closed&&e[0])||null},smooth:function(e,t,n){var r=e||{},i=r.type,o=r.factor,s=this.getPrevious(),c=this.getNext(),u=(s||this)._point,l=this._point,f=(c||this)._point,d=u.getDistance(l),p=l.getDistance(f);if(i&&"catmull-rom"!==i){if("geometric"!==i)throw new Error("Smoothing method '"+i+"' not supported.");if(s&&c){var h=u.subtract(f),g=o===a?.4:o,v=g*d/(d+p);t||this.setHandleIn(h.multiply(v)),n||this.setHandleOut(h.multiply(v-g))}}else{var y=o===a?.5:o,b=Math.pow(d,y),w=b*b,_=Math.pow(p,y),x=_*_;if(!t&&s){var O=2*x+3*_*b+w,S=3*_*(_+b);this.setHandleIn(0!==S?new m((x*u._x+O*l._x-w*f._x)/S-l._x,(x*u._y+O*l._y-w*f._y)/S-l._y):new m)}if(!n&&c){O=2*w+3*b*_+x,S=3*b*(b+_);this.setHandleOut(0!==S?new m((w*f._x+O*l._x-x*u._x)/S-l._x,(w*f._y+O*l._y-x*u._y)/S-l._y):new m)}}},getPrevious:function(){var e=this._path&&this._path._segments;return e&&(e[this._index-1]||this._path._closed&&e[e.length-1])||null},isFirst:function(){return!this._index},isLast:function(){var e=this._path;return e&&this._index===e._segments.length-1||!1},reverse:function(){var e=this._handleIn,t=this._handleOut,n=e.clone();e.set(t),t.set(n)},reversed:function(){return new M(this._point,this._handleOut,this._handleIn)},remove:function(){return!!this._path&&!!this._path.removeSegment(this._index)},clone:function(){return new M(this._point,this._handleIn,this._handleOut)},equals:function(e){return e===this||e&&this._class===e._class&&this._point.equals(e._point)&&this._handleIn.equals(e._handleIn)&&this._handleOut.equals(e._handleOut)||!1},toString:function(){var e=["point: "+this._point];return this._handleIn.isZero()||e.push("handleIn: "+this._handleIn),this._handleOut.isZero()||e.push("handleOut: "+this._handleOut),"{ "+e.join(", ")+" }"},transform:function(e){this._transformCoordinates(e,new Array(6),!0),this._changed()},interpolate:function(e,t,n){var r=1-n,i=n,o=e._point,a=t._point,s=e._handleIn,c=t._handleIn,u=t._handleOut,l=e._handleOut;this._point._set(r*o._x+i*a._x,r*o._y+i*a._y,!0),this._handleIn._set(r*s._x+i*c._x,r*s._y+i*c._y,!0),this._handleOut._set(r*l._x+i*u._x,r*l._y+i*u._y,!0),this._changed()},_transformCoordinates:function(e,t,n){var r=this._point,i=n&&this._handleIn.isZero()?null:this._handleIn,o=n&&this._handleOut.isZero()?null:this._handleOut,a=r._x,s=r._y,c=2;return t[0]=a,t[1]=s,i&&(t[c++]=i._x+a,t[c++]=i._y+s),o&&(t[c++]=o._x+a,t[c++]=o._y+s),e&&(e._transformCoordinates(t,t,c/2),a=t[0],s=t[1],n?(r._x=a,r._y=s,c=2,i&&(i._x=t[c++]-a,i._y=t[c++]-s),o&&(o._x=t[c++]-a,o._y=t[c++]-s)):(i||(t[c++]=a,t[c++]=s),o||(t[c++]=a,t[c++]=s))),t}}),D=m.extend({initialize:function(e,t,n){var r,i,o;if(e)if((r=e[0])!==a)i=e[1];else{var s=e;(r=s.x)===a&&(r=(s=m.read(arguments)).x),i=s.y,o=s.selected}else r=i=0;this._x=r,this._y=i,this._owner=t,t[n]=this,o&&this.setSelected(!0)},_set:function(e,t){return this._x=e,this._y=t,this._owner._changed(this),this},getX:function(){return this._x},setX:function(e){this._x=e,this._owner._changed(this)},getY:function(){return this._y},setY:function(e){this._y=e,this._owner._changed(this)},isZero:function(){var e=g.isZero;return e(this._x)&&e(this._y)},isSelected:function(){return!!(this._owner._selection&this._getSelection())},setSelected:function(e){this._owner._changeSelection(this._getSelection(),e)},_getSelection:function(){var e=this._owner;return this===e._point?1:this===e._handleIn?2:this===e._handleOut?4:0}}),N=u.extend({_class:"Curve",beans:!0,initialize:function(e,t,n,r,i,o,a,s){var c,u,l,f,d,p,h=arguments.length;3===h?(this._path=e,c=t,u=n):h?1===h?"segment1"in e?(c=new M(e.segment1),u=new M(e.segment2)):"point1"in e?(l=e.point1,d=e.handle1,p=e.handle2,f=e.point2):Array.isArray(e)&&(l=[e[0],e[1]],f=[e[6],e[7]],d=[e[2]-e[0],e[3]-e[1]],p=[e[4]-e[6],e[5]-e[7]]):2===h?(c=new M(e),u=new M(t)):4===h?(l=e,d=t,p=n,f=r):8===h&&(l=[e,t],f=[a,s],d=[n-e,r-t],p=[i-a,o-s]):(c=new M,u=new M),this._segment1=c||new M(l,null,d),this._segment2=u||new M(f,p,null)},_serialize:function(e,t){return u.serialize(this.hasHandles()?[this.getPoint1(),this.getHandle1(),this.getHandle2(),this.getPoint2()]:[this.getPoint1(),this.getPoint2()],e,!0,t)},_changed:function(){this._length=this._bounds=a},clone:function(){return new N(this._segment1,this._segment2)},toString:function(){var e=["point1: "+this._segment1._point];return this._segment1._handleOut.isZero()||e.push("handle1: "+this._segment1._handleOut),this._segment2._handleIn.isZero()||e.push("handle2: "+this._segment2._handleIn),e.push("point2: "+this._segment2._point),"{ "+e.join(", ")+" }"},classify:function(){return N.classify(this.getValues())},remove:function(){var e=!1;if(this._path){var t=this._segment2,n=t._handleOut;(e=t.remove())&&this._segment1._handleOut.set(n)}return e},getPoint1:function(){return this._segment1._point},setPoint1:function(){this._segment1._point.set(m.read(arguments))},getPoint2:function(){return this._segment2._point},setPoint2:function(){this._segment2._point.set(m.read(arguments))},getHandle1:function(){return this._segment1._handleOut},setHandle1:function(){this._segment1._handleOut.set(m.read(arguments))},getHandle2:function(){return this._segment2._handleIn},setHandle2:function(){this._segment2._handleIn.set(m.read(arguments))},getSegment1:function(){return this._segment1},getSegment2:function(){return this._segment2},getPath:function(){return this._path},getIndex:function(){return this._segment1._index},getNext:function(){var e=this._path&&this._path._curves;return e&&(e[this._segment1._index+1]||this._path._closed&&e[0])||null},getPrevious:function(){var e=this._path&&this._path._curves;return e&&(e[this._segment1._index-1]||this._path._closed&&e[e.length-1])||null},isFirst:function(){return!this._segment1._index},isLast:function(){var e=this._path;return e&&this._segment1._index===e._curves.length-1||!1},isSelected:function(){return this.getPoint1().isSelected()&&this.getHandle1().isSelected()&&this.getHandle2().isSelected()&&this.getPoint2().isSelected()},setSelected:function(e){this.getPoint1().setSelected(e),this.getHandle1().setSelected(e),this.getHandle2().setSelected(e),this.getPoint2().setSelected(e)},getValues:function(e){return N.getValues(this._segment1,this._segment2,e)},getPoints:function(){for(var e=this.getValues(),t=[],n=0;n<8;n+=2)t.push(new m(e[n],e[n+1]));return t}},{getLength:function(){return null==this._length&&(this._length=N.getLength(this.getValues(),0,1)),this._length},getArea:function(){return N.getArea(this.getValues())},getLine:function(){return new S(this._segment1._point,this._segment2._point)},getPart:function(e,t){return new N(N.getPart(this.getValues(),e,t))},getPartLength:function(e,t){return N.getLength(this.getValues(),e,t)},divideAt:function(e){return this.divideAtTime(e&&e.curve===this?e.time:this.getTimeAt(e))},divideAtTime:function(e,t){var n=null;if(e>=1e-8&&e<=1-1e-8){var r=N.subdivide(this.getValues(),e),i=r[0],o=r[1],a=t||this.hasHandles(),s=this._segment1,c=this._segment2,u=this._path;a&&(s._handleOut._set(i[2]-i[0],i[3]-i[1]),c._handleIn._set(o[4]-o[6],o[5]-o[7]));var l=i[6],f=i[7],d=new M(new m(l,f),a&&new m(i[4]-l,i[5]-f),a&&new m(o[2]-l,o[3]-f));u?(u.insert(s._index+1,d),n=this.getNext()):(this._segment2=d,this._changed(),n=new N(d,c))}return n},splitAt:function(e){var t=this._path;return t?t.splitAt(e):null},splitAtTime:function(e){return this.splitAt(this.getLocationAtTime(e))},divide:function(e,t){return this.divideAtTime(e===a?.5:t?e:this.getTimeAt(e))},split:function(e,t){return this.splitAtTime(e===a?.5:t?e:this.getTimeAt(e))},reversed:function(){return new N(this._segment2.reversed(),this._segment1.reversed())},clearHandles:function(){this._segment1._handleOut._set(0,0),this._segment2._handleIn._set(0,0)},statics:{getValues:function(e,t,n,r){var i=e._point,o=e._handleOut,a=t._handleIn,s=t._point,c=i.x,u=i.y,l=s.x,f=s.y,d=r?[c,u,c,u,l,f,l,f]:[c,u,c+o._x,u+o._y,l+a._x,f+a._y,l,f];return n&&n._transformCoordinates(d,d,4),d},subdivide:function(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],c=e[5],u=e[6],l=e[7];t===a&&(t=.5);var f=1-t,d=f*n+t*i,p=f*r+t*o,h=f*i+t*s,g=f*o+t*c,v=f*s+t*u,m=f*c+t*l,y=f*d+t*h,b=f*p+t*g,w=f*h+t*v,_=f*g+t*m,x=f*y+t*w,O=f*b+t*_;return[[n,r,d,p,y,b,x,O],[x,O,w,_,v,m,u,l]]},getMonoCurves:function(e,t){var n=[],r=t?0:1,i=e[r+0],o=e[r+2],a=e[r+4],s=e[r+6];if(i>=o==o>=a&&o>=a==a>=s||N.isStraight(e))n.push(e);else{var c=3*(o-a)-i+s,u=2*(i+a)-4*o,l=o-i,f=[],d=g.solveQuadratic(c,u,l,f,1e-8,1-1e-8);if(d){f.sort();var p=f[0],h=N.subdivide(e,p);n.push(h[0]),d>1&&(p=(f[1]-p)/(1-p),h=N.subdivide(h[1],p),n.push(h[0])),n.push(h[1])}else n.push(e)}return n},solveCubic:function(e,t,n,r,i,o){var a=e[t],s=e[t+2],c=e[t+4],u=e[t+6],l=0;if(!(a<n&&u<n&&s<n&&c<n||a>n&&u>n&&s>n&&c>n)){var f=3*(s-a),d=3*(c-s)-f,p=u-a-f-d;l=g.solveCubic(p,d,f,a-n,r,i,o)}return l},getTimeOf:function(e,t){var n=new m(e[0],e[1]),r=new m(e[6],e[7]);if(null===(t.isClose(n,1e-12)?0:t.isClose(r,1e-12)?1:null))for(var i=[t.x,t.y],o=[],a=0;a<2;a++)for(var s=N.solveCubic(e,a,i[a],o,0,1),c=0;c<s;c++){var u=o[c];if(t.isClose(N.getPoint(e,u),1e-7))return u}return t.isClose(n,1e-7)?0:t.isClose(r,1e-7)?1:null},getNearestTime:function(e,t){if(N.isStraight(e)){var n=e[0],r=e[1],i=e[6]-n,o=e[7]-r,a=i*i+o*o;if(0===a)return 0;var s=((t.x-n)*i+(t.y-r)*o)/a;return s<1e-12?0:s>.999999999999?1:N.getTimeOf(e,new m(n+s*i,r+s*o))}var c=1/0,u=0;function l(n){if(n>=0&&n<=1){var r=t.getDistance(N.getPoint(e,n),!0);if(r<c)return c=r,u=n,!0}}for(var f=0;f<=100;f++)l(f/100);for(var d=.005;d>1e-8;)l(u-d)||l(u+d)||(d/=2);return u},getPart:function(e,t,n){var r=t>n;if(r){var i=t;t=n,n=i}return t>0&&(e=N.subdivide(e,t)[1]),n<1&&(e=N.subdivide(e,(n-t)/(1-t))[0]),r?[e[6],e[7],e[4],e[5],e[2],e[3],e[0],e[1]]:e},isFlatEnough:function(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=3*i-2*n-c,f=3*o-2*r-u,d=3*a-2*c-n,p=3*s-2*u-r;return Math.max(l*l,d*d)+Math.max(f*f,p*p)<=16*t*t},getArea:function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7];return 3*((c-n)*(r+o)-(s-t)*(i+a)+i*(t-o)-r*(n-a)+c*(o+t/3)-s*(a+n/3))/20},getBounds:function(e){for(var t=e.slice(0,2),n=t.slice(),r=[0,0],i=0;i<2;i++)N._addBounds(e[i],e[i+2],e[i+4],e[i+6],i,0,t,n,r);return new _(t[0],t[1],n[0]-t[0],n[1]-t[1])},_addBounds:function(e,t,n,r,i,o,a,s,c){function u(e,t){var n=e-t,r=e+t;n<a[i]&&(a[i]=n),r>s[i]&&(s[i]=r)}o/=2;var l=a[i]+o,f=s[i]-o;if(e<l||t<l||n<l||r<l||e>f||t>f||n>f||r>f)if(t<e!=t<r&&n<e!=n<r)u(e,0),u(r,0);else{var d=3*(t-n)-e+r,p=2*(e+n)-4*t,h=t-e,v=g.solveQuadratic(d,p,h,c);u(r,0);for(var m=0;m<v;m++){var y=c[m],b=1-y;1e-8<=y&&y<=1-1e-8&&u(b*b*b*e+3*b*b*y*t+3*b*y*y*n+y*y*y*r,o)}}}}},u.each(["getBounds","getStrokeBounds","getHandleBounds"],(function(e){this[e]=function(){this._bounds||(this._bounds={});var t=this._bounds[e];return t||(t=this._bounds[e]=B[e]([this._segment1,this._segment2],!1,this._path)),t.clone()}}),{}),u.each({isStraight:function(e,t,n,r){if(t.isZero()&&n.isZero())return!0;var i=r.subtract(e);if(i.isZero())return!1;if(i.isCollinear(t)&&i.isCollinear(n)){var o=new S(e,r);if(o.getDistance(e.add(t))<1e-7&&o.getDistance(r.add(n))<1e-7){var a=i.dot(i),s=i.dot(t)/a,c=i.dot(n)/a;return s>=0&&s<=1&&c<=0&&c>=-1}}return!1},isLinear:function(e,t,n,r){var i=r.subtract(e).divide(3);return t.equals(i)&&n.negate().equals(i)}},(function(e,t){this[t]=function(t){var n=this._segment1,r=this._segment2;return e(n._point,n._handleOut,r._handleIn,r._point,t)},this.statics[t]=function(t,n){var r=t[0],i=t[1],o=t[6],a=t[7];return e(new m(r,i),new m(t[2]-r,t[3]-i),new m(t[4]-o,t[5]-a),new m(o,a),n)}}),{statics:{},hasHandles:function(){return!this._segment1._handleOut.isZero()||!this._segment2._handleIn.isZero()},hasLength:function(e){return(!this.getPoint1().equals(this.getPoint2())||this.hasHandles())&&this.getLength()>(e||0)},isCollinear:function(e){return e&&this.isStraight()&&e.isStraight()&&this.getLine().isCollinear(e.getLine())},isHorizontal:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).y)<1e-8},isVertical:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).x)<1e-8}}),{beans:!1,getLocationAt:function(e,t){return this.getLocationAtTime(t?e:this.getTimeAt(e))},getLocationAtTime:function(e){return null!=e&&e>=0&&e<=1?new L(this,e):null},getTimeAt:function(e,t){return N.getTimeAt(this.getValues(),e,t)},getParameterAt:"#getTimeAt",getTimesWithTangent:function(){var e=m.read(arguments);return e.isZero()?[]:N.getTimesWithTangent(this.getValues(),e)},getOffsetAtTime:function(e){return this.getPartLength(0,e)},getLocationOf:function(){return this.getLocationAtTime(this.getTimeOf(m.read(arguments)))},getOffsetOf:function(){var e=this.getLocationOf.apply(this,arguments);return e?e.getOffset():null},getTimeOf:function(){return N.getTimeOf(this.getValues(),m.read(arguments))},getParameterOf:"#getTimeOf",getNearestLocation:function(){var e=m.read(arguments),t=this.getValues(),n=N.getNearestTime(t,e),r=N.getPoint(t,n);return new L(this,n,r,null,e.getDistance(r))},getNearestPoint:function(){var e=this.getNearestLocation.apply(this,arguments);return e?e.getPoint():e}},new function(){var e=["getPoint","getTangent","getNormal","getWeightedTangent","getWeightedNormal","getCurvature"];return u.each(e,(function(e){this[e+"At"]=function(t,n){var r=this.getValues();return N[e](r,n?t:N.getTimeAt(r,t))},this[e+"AtTime"]=function(t){return N[e](this.getValues(),t)}}),{statics:{_evaluateMethods:e}})},new function(){function e(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],u=9*(r-o)+3*(s-t),l=6*(t+o)-12*r,f=3*(r-t),d=9*(i-a)+3*(c-n),p=6*(n+a)-12*i,h=3*(i-n);return function(e){var t=(u*e+l)*e+f,n=(d*e+p)*e+h;return Math.sqrt(t*t+n*n)}}function t(e,t){return Math.max(2,Math.min(16,Math.ceil(32*Math.abs(t-e))))}function n(e,t,n,r){if(null==t||t<0||t>1)return null;var i=e[0],o=e[1],a=e[2],s=e[3],c=e[4],u=e[5],l=e[6],f=e[7],d=g.isZero;d(a-i)&&d(s-o)&&(a=i,s=o),d(c-l)&&d(u-f)&&(c=l,u=f);var p,h,v=3*(a-i),y=3*(c-a)-v,b=l-i-v-y,w=3*(s-o),_=3*(u-s)-w,x=f-o-w-_;if(0===n)p=0===t?i:1===t?l:((b*t+y)*t+v)*t+i,h=0===t?o:1===t?f:((x*t+_)*t+w)*t+o;else{if(t<1e-8?(p=v,h=w):t>1-1e-8?(p=3*(l-c),h=3*(f-u)):(p=(3*b*t+2*y)*t+v,h=(3*x*t+2*_)*t+w),r){0===p&&0===h&&(t<1e-8||t>1-1e-8)&&(p=c-a,h=u-s);var O=Math.sqrt(p*p+h*h);O&&(p/=O,h/=O)}if(3===n){c=6*b*t+2*y,u=6*x*t+2*_;var S=Math.pow(p*p+h*h,1.5);p=0!==S?(p*u-h*c)/S:0,h=0}}return 2===n?new m(h,-p):new m(p,h)}return{statics:{classify:function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],c=e[6],u=e[7],l=r*(n-u)+i*(c-t)+t*u-n*c,f=3*(o*(i-n)+s*(t-r)+r*n-i*t),d=f-l,p=d-l+(t*(u-s)+n*(o-c)+c*s-u*o),h=Math.sqrt(p*p+d*d+f*f),v=0!==h?1/h:0,m=g.isZero;function y(e,t,n){var r=t!==a,i=r&&t>0&&t<1,o=r&&n>0&&n<1;return!r||(i||o)&&("loop"!==e||i&&o)||(e="arch",i=o=!1),{type:e,roots:i||o?i&&o?t<n?[t,n]:[n,t]:[i?t:n]:null}}if(d*=v,f*=v,m(p*=v))return m(d)?y(m(f)?"line":"quadratic"):y("serpentine",f/(3*d));var b=3*d*d-4*p*f;if(m(b))return y("cusp",d/(2*p));var w=b>0?Math.sqrt(b/3):Math.sqrt(-b),_=2*p;return y(b>0?"serpentine":"loop",(d+w)/_,(d-w)/_)},getLength:function(n,r,i,o){if(r===a&&(r=0),i===a&&(i=1),N.isStraight(n)){var s=n;i<1&&(s=N.subdivide(s,i)[0],r/=i),r>0&&(s=N.subdivide(s,r)[1]);var c=s[6]-s[0],u=s[7]-s[1];return Math.sqrt(c*c+u*u)}return g.integrate(o||e(n),r,i,t(r,i))},getTimeAt:function(n,r,i){if(i===a&&(i=r<0?1:0),0===r)return i;var o=Math.abs,s=r>0,c=s?i:0,u=s?1:i,l=e(n),f=N.getLength(n,c,u,l),d=o(r)-f;if(o(d)<1e-12)return s?u:c;if(d>1e-12)return null;var p=r/f,h=0;return g.findRoot((function(e){return h+=g.integrate(l,i,e,t(i,e)),i=e,h-r}),l,i+p,c,u,32,1e-12)},getPoint:function(e,t){return n(e,t,0,!1)},getTangent:function(e,t){return n(e,t,1,!0)},getWeightedTangent:function(e,t){return n(e,t,1,!1)},getNormal:function(e,t){return n(e,t,2,!0)},getWeightedNormal:function(e,t){return n(e,t,2,!1)},getCurvature:function(e,t){return n(e,t,3,!1).x},getPeaks:function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=3*r-t-3*o+e[6],c=3*t-6*r+3*o,u=-3*t+3*r,l=3*i-n-3*a+e[7],f=3*n-6*i+3*a,d=-3*n+3*i,p=[];return g.solveCubic(9*(s*s+l*l),9*(s*c+f*l),2*(c*c+f*f)+3*(u*s+d*l),u*c+f*d,p,1e-8,1-1e-8),p.sort()}}}},new function(){function e(e,t,n,r,i,o,a){var s=!a&&n.getPrevious()===i,c=!a&&n!==i&&n.getNext()===i;if(null!==r&&r>=(s?1e-8:0)&&r<=(c?1-1e-8:1)&&null!==o&&o>=(c?1e-8:0)&&o<=(s?1-1e-8:1)){var u=new L(n,r,null,a),l=new L(i,o,null,a);u._intersection=l,l._intersection=u,t&&!t(u)||L.insert(e,u,!0)}}function t(r,i,o,a,s,c,u,l,f,d,p,h,g){if(++f>=4096||++l>=40)return f;var v,m,y=i[0],b=i[1],w=i[6],_=i[7],x=S.getSignedDistance,O=x(y,b,w,_,i[2],i[3]),E=x(y,b,w,_,i[4],i[5]),C=O*E>0?3/4:4/9,k=C*Math.min(0,O,E),T=C*Math.max(0,O,E),j=x(y,b,w,_,r[0],r[1]),P=x(y,b,w,_,r[2],r[3]),I=x(y,b,w,_,r[4],r[5]),R=x(y,b,w,_,r[6],r[7]),A=function(e,t,n,r){var i,o=[0,e],a=[1/3,t],s=[2/3,n],c=[1,r],u=t-(2*e+r)/3,l=n-(e+2*r)/3;if(u*l<0)i=[[o,a,c],[o,s,c]];else{var f=u/l;i=[f>=2?[o,a,c]:f<=.5?[o,s,c]:[o,a,s,c],[o,c]]}return(u||l)<0?i.reverse():i}(j,P,I,R),M=A[0],D=A[1];if(0===O&&0===E&&0===j&&0===P&&0===I&&0===R||null==(v=n(M,D,k,T))||null==(m=n(M.reverse(),D.reverse(),k,T)))return f;var L=d+(p-d)*v,z=d+(p-d)*m;if(Math.max(g-h,z-L)<1e-9){var B=(L+z)/2,F=(h+g)/2;e(s,c,u?a:o,u?F:B,u?o:a,u?B:F)}else{r=N.getPart(r,v,m);var W=g-h;if(m-v>.8)if(z-L>W){B=(L+z)/2;f=t(i,(H=N.subdivide(r,.5))[0],a,o,s,c,!u,l,f,h,g,L,B),f=t(i,H[1],a,o,s,c,!u,l,f,h,g,B,z)}else{var H;F=(h+g)/2;f=t((H=N.subdivide(i,.5))[0],r,a,o,s,c,!u,l,f,h,F,L,z),f=t(H[1],r,a,o,s,c,!u,l,f,F,g,L,z)}else f=0===W||W>=1e-9?t(i,r,a,o,s,c,!u,l,f,h,g,L,z):t(r,i,o,a,s,c,u,l,f,L,z,h,g)}return f}function n(e,t,n,i){return e[0][1]<n?r(e,!0,n):t[0][1]>i?r(t,!1,i):e[0][0]}function r(e,t,n){for(var r=e[0][0],i=e[0][1],o=1,a=e.length;o<a;o++){var s=e[o][0],c=e[o][1];if(t?c>=n:c<=n)return c===n?s:r+(n-i)*(s-r)/(c-i);r=s,i=c}return null}function i(e,t,n,r,i){var o=g.isZero;if(o(r)&&o(i)){var a=N.getTimeOf(e,new m(t,n));return null===a?[]:[a]}for(var s=Math.atan2(-i,r),c=Math.sin(s),u=Math.cos(s),l=[],f=[],d=0;d<8;d+=2){var p=e[d]-t,h=e[d+1]-n;l.push(p*u-h*c,p*c+h*u)}return N.solveCubic(l,1,0,f,0,1),f}function o(t,n,r,o,a,s,c){for(var u=n[0],l=n[1],f=i(t,u,l,n[6]-u,n[7]-l),d=0,p=f.length;d<p;d++){var h=f[d],g=N.getPoint(t,h),v=N.getTimeOf(n,g);null!==v&&e(a,s,c?o:r,c?v:h,c?r:o,c?h:v)}}function a(t,n,r,i,o,a){var s=S.intersect(t[0],t[1],t[6],t[7],n[0],n[1],n[6],n[7]);s&&e(o,a,r,N.getTimeOf(t,s),i,N.getTimeOf(n,s))}function s(n,r,i,s,c,l){var f=Math.min,d=Math.max;if(d(n[0],n[2],n[4],n[6])+1e-12>f(r[0],r[2],r[4],r[6])&&f(n[0],n[2],n[4],n[6])-1e-12<d(r[0],r[2],r[4],r[6])&&d(n[1],n[3],n[5],n[7])+1e-12>f(r[1],r[3],r[5],r[7])&&f(n[1],n[3],n[5],n[7])-1e-12<d(r[1],r[3],r[5],r[7])){var p=u(n,r);if(p)for(var h=0;h<2;h++){var g=p[h];e(c,l,i,g[0],s,g[1],!0)}else{var v=N.isStraight(n),y=N.isStraight(r),b=v&&y,w=v&&!y,_=c.length;if((b?a:v||y?o:t)(w?r:n,w?n:r,w?s:i,w?i:s,c,l,w,0,0,0,1,0,1),!b||c.length===_)for(h=0;h<4;h++){var x=h>>1,O=1&h,S=6*x,E=6*O,C=new m(n[S],n[S+1]),k=new m(r[E],r[E+1]);C.isClose(k,1e-12)&&e(c,l,i,x,s,O)}}}return c}function c(t,n,r,i){var o=N.classify(t);if("loop"===o.type){var a=o.roots;e(r,i,n,a[0],n,a[1])}return r}function u(e,t){function n(e){var t=e[6]-e[0],n=e[7]-e[1];return t*t+n*n}var r=Math.abs,i=S.getDistance,o=N.isStraight(e),a=N.isStraight(t),s=o&&a,c=n(e)<n(t),u=c?t:e,l=c?e:t,f=u[0],d=u[1],p=u[6]-f,h=u[7]-d;if(i(f,d,p,h,l[0],l[1],!0)<1e-7&&i(f,d,p,h,l[6],l[7],!0)<1e-7)!s&&i(f,d,p,h,u[2],u[3],!0)<1e-7&&i(f,d,p,h,u[4],u[5],!0)<1e-7&&i(f,d,p,h,l[2],l[3],!0)<1e-7&&i(f,d,p,h,l[4],l[5],!0)<1e-7&&(o=a=s=!0);else if(s)return null;if(o^a)return null;for(var g=[e,t],v=[],y=0;y<4&&v.length<2;y++){var b=1&y,w=1^b,_=y>>1,x=N.getTimeOf(g[b],new m(g[w][_?6:0],g[w][_?7:1]));if(null!=x){var O=b?[_,x]:[x,_];(!v.length||r(O[0]-v[0][0])>1e-8&&r(O[1]-v[0][1])>1e-8)&&v.push(O)}if(y>2&&!v.length)break}if(2!==v.length)v=null;else if(!s){var E=N.getPart(e,v[0][0],v[1][0]),C=N.getPart(t,v[0][1],v[1][1]);(r(C[2]-E[2])>1e-7||r(C[3]-E[3])>1e-7||r(C[4]-E[4])>1e-7||r(C[5]-E[5])>1e-7)&&(v=null)}return v}return{getIntersections:function(e){var t=this.getValues(),n=e&&e!==this&&e.getValues();return n?s(t,n,this,e,[]):c(t,this,[])},statics:{getOverlaps:u,getIntersections:function(e,t,n,r,i,o){var a=!t;a&&(t=e);for(var u=e.length,l=t.length,f=new Array(u),d=a?f:new Array(l),h=[],g=0;g<u;g++)f[g]=e[g].getValues(r);if(!a)for(g=0;g<l;g++)d[g]=t[g].getValues(i);for(var v=p.findCurveBoundsCollisions(f,d,1e-7),m=0;m<u;m++){var y=e[m],b=f[m];a&&c(b,y,h,n);var w=v[m];if(w)for(var _=0;_<w.length;_++){if(o&&h.length)return h;var x=w[_];if(!a||x>m){var O=t[x];s(b,d[x],y,O,h,n)}}}return h},getCurveLineIntersections:i,getTimesWithTangent:function(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=t.normalize(),f=l.x,d=l.y,p=3*c-9*a+9*i-3*n,h=3*u-9*s+9*o-3*r,v=6*a-12*i+6*n,m=6*s-12*o+6*r,y=3*i-3*n,b=3*o-3*r,w=2*p*d-2*h*f,_=[];if(Math.abs(w)<g.CURVETIME_EPSILON){if(0!=(w=p*m-h*v)){var x=-(p*b-h*y)/w;x>=0&&x<=1&&_.push(x)}}else{var O=(v*v-4*p*y)*d*d+(-2*v*m+4*h*y+4*p*b)*f*d+(m*m-4*h*b)*f*f,S=v*d-m*f;if(O>=0&&0!=w){var E=Math.sqrt(O),C=-(S+E)/w,k=(-S+E)/w;C>=0&&C<=1&&_.push(C),k>=0&&k<=1&&_.push(k)}}return _}}}}),L=u.extend({_class:"CurveLocation",initialize:function(e,t,n,r,i){if(t>=.99999999){var o=e.getNext();o&&(t=0,e=o)}this._setCurve(e),this._time=t,this._point=n||e.getPointAtTime(t),this._overlap=r,this._distance=i,this._intersection=this._next=this._previous=null},_setPath:function(e){this._path=e,this._version=e?e._version:0},_setCurve:function(e){this._setPath(e._path),this._curve=e,this._segment=null,this._segment1=e._segment1,this._segment2=e._segment2},_setSegment:function(e){var t=e.getCurve();t?this._setCurve(t):(this._setPath(e._path),this._segment1=e,this._segment2=null),this._segment=e,this._time=e===this._segment1?0:1,this._point=e._point.clone()},getSegment:function(){var e=this._segment;if(!e){var t=this.getCurve(),n=this.getTime();0===n?e=t._segment1:1===n?e=t._segment2:null!=n&&(e=t.getPartLength(0,n)<t.getPartLength(n,1)?t._segment1:t._segment2),this._segment=e}return e},getCurve:function(){var e=this._path,t=this;function n(e){var n=e&&e.getCurve();if(n&&null!=(t._time=n.getTimeOf(t._point)))return t._setCurve(n),n}return e&&e._version!==this._version&&(this._time=this._offset=this._curveOffset=this._curve=null),this._curve||n(this._segment)||n(this._segment1)||n(this._segment2.getPrevious())},getPath:function(){var e=this.getCurve();return e&&e._path},getIndex:function(){var e=this.getCurve();return e&&e.getIndex()},getTime:function(){var e=this.getCurve(),t=this._time;return e&&null==t?this._time=e.getTimeOf(this._point):t},getParameter:"#getTime",getPoint:function(){return this._point},getOffset:function(){var e=this._offset;if(null==e){e=0;var t=this.getPath(),n=this.getIndex();if(t&&null!=n)for(var r=t.getCurves(),i=0;i<n;i++)e+=r[i].getLength();this._offset=e+=this.getCurveOffset()}return e},getCurveOffset:function(){var e=this._curveOffset;if(null==e){var t=this.getCurve(),n=this.getTime();this._curveOffset=e=null!=n&&t&&t.getPartLength(0,n)}return e},getIntersection:function(){return this._intersection},getDistance:function(){return this._distance},divide:function(){var e=this.getCurve(),t=e&&e.divideAtTime(this.getTime());return t&&this._setSegment(t._segment1),t},split:function(){var e=this.getCurve(),t=e._path,n=e&&e.splitAtTime(this.getTime());return n&&this._setSegment(t.getLastSegment()),n},equals:function(e,t){var n=this===e;if(!n&&e instanceof L){var r=this.getCurve(),i=e.getCurve(),o=r._path;if(o===i._path){var a=Math.abs,s=a(this.getOffset()-e.getOffset()),c=!t&&this._intersection,u=!t&&e._intersection;n=(s<1e-7||o&&a(o.getLength()-s)<1e-7)&&(!c&&!u||c&&u&&c.equals(u,!0))}}return n},toString:function(){var e=[],t=this.getPoint(),n=h.instance;t&&e.push("point: "+t);var r=this.getIndex();null!=r&&e.push("index: "+r);var i=this.getTime();return null!=i&&e.push("time: "+n.number(i)),null!=this._distance&&e.push("distance: "+n.number(this._distance)),"{ "+e.join(", ")+" }"},isTouching:function(){var e=this._intersection;if(e&&this.getTangent().isCollinear(e.getTangent())){var t=this.getCurve(),n=e.getCurve();return!(t.isStraight()&&n.isStraight()&&t.getLine().intersect(n.getLine()))}return!1},isCrossing:function(){var e=this._intersection;if(!e)return!1;var t=this.getTime(),n=e.getTime(),r=t>=1e-8&&t<=1-1e-8,i=n>=1e-8&&n<=1-1e-8;if(r&&i)return!this.isTouching();var o=this.getCurve(),a=o&&t<1e-8?o.getPrevious():o,s=e.getCurve(),c=s&&n<1e-8?s.getPrevious():s;if(t>1-1e-8&&(o=o.getNext()),n>1-1e-8&&(s=s.getNext()),!(a&&o&&c&&s))return!1;var u=[];function l(e,t){var n=e.getValues(),r=N.classify(n).roots||N.getPeaks(n),i=r.length,o=N.getLength(n,t&&i?r[i-1]:0,!t&&i?r[0]:1);u.push(i?o:o/32)}function f(e,t,n){return t<n?e>t&&e<n:e>t||e<n}r||(l(a,!0),l(o,!1)),i||(l(c,!0),l(s,!1));var d=this.getPoint(),p=Math.min.apply(Math,u),h=r?o.getTangentAtTime(t):o.getPointAt(p).subtract(d),g=r?h.negate():a.getPointAt(-p).subtract(d),v=i?s.getTangentAtTime(n):s.getPointAt(p).subtract(d),m=i?v.negate():c.getPointAt(-p).subtract(d),y=g.getAngle(),b=h.getAngle(),w=m.getAngle(),_=v.getAngle();return!!(r?f(y,w,_)^f(b,w,_)&&f(y,_,w)^f(b,_,w):f(w,y,b)^f(_,y,b)&&f(w,b,y)^f(_,b,y))},hasOverlap:function(){return!!this._overlap}},u.each(N._evaluateMethods,(function(e){var t=e+"At";this[e]=function(){var e=this.getCurve(),n=this.getTime();return null!=n&&e&&e[t](n,!0)}}),{preserve:!0}),new function(){function e(e,t,n){var r=e.length,i=0,o=r-1;function a(n,i){for(var o=n+i;o>=-1&&o<=r;o+=i){var a=e[(o%r+r)%r];if(!t.getPoint().isClose(a.getPoint(),1e-7))break;if(t.equals(a))return a}return null}for(;i<=o;){var s,c=i+o>>>1,u=e[c];if(n&&(s=t.equals(u)?u:a(c,-1)||a(c,1)))return t._overlap&&(s._overlap=s._intersection._overlap=!0),s;var l=t.getPath(),f=u.getPath();(l!==f?l._id-f._id:t.getIndex()+t.getTime()-(u.getIndex()+u.getTime()))<0?o=c-1:i=c+1}return e.splice(i,0,t),t}return{statics:{insert:e,expand:function(t){for(var n=t.slice(),r=t.length-1;r>=0;r--)e(n,t[r]._intersection,!1);return n}}}}),z=C.extend({_class:"PathItem",_selectBounds:!1,_canScaleStroke:!0,beans:!0,initialize:function(){},statics:{create:function(e){var t,n,r;if(u.isPlainObject(e)?(n=e.segments,t=e.pathData):Array.isArray(e)?n=e:"string"==typeof e&&(t=e),n){var i=n[0];r=i&&Array.isArray(i[0])}else t&&(r=(t.match(/m/gi)||[]).length>1||/z\s*\S+/i.test(t));return new(r?F:B)(e)}},_asPathItem:function(){return this},isClockwise:function(){return this.getArea()>=0},setClockwise:function(e){this.isClockwise()!=(e=!!e)&&this.reverse()},setPathData:function(e){var t,n,r,i=e&&e.match(/[mlhvcsqtaz][^mlhvcsqtaz]*/gi),o=!1,a=new m,s=new m;function c(e,n){var r=+t[e];return o&&(r+=a[n]),r}function u(e){return new m(c(e,"x"),c(e+1,"y"))}this.clear();for(var l=0,f=i&&i.length;l<f;l++){var d=i[l],p=d[0],h=p.toLowerCase(),g=(t=d.match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g))&&t.length;switch(o=p===h,"z"!==n||/[mz]/.test(h)||this.moveTo(a),h){case"m":case"l":for(var v="m"===h,y=0;y<g;y+=2)this[v?"moveTo":"lineTo"](a=u(y)),v&&(s=a,v=!1);r=a;break;case"h":case"v":var w="h"===h?"x":"y";a=a.clone();for(y=0;y<g;y++)a[w]=c(y,w),this.lineTo(a);r=a;break;case"c":for(y=0;y<g;y+=6)this.cubicCurveTo(u(y),r=u(y+2),a=u(y+4));break;case"s":for(y=0;y<g;y+=4)this.cubicCurveTo(/[cs]/.test(n)?a.multiply(2).subtract(r):a,r=u(y),a=u(y+2)),n=h;break;case"q":for(y=0;y<g;y+=4)this.quadraticCurveTo(r=u(y),a=u(y+2));break;case"t":for(y=0;y<g;y+=2)this.quadraticCurveTo(r=/[qt]/.test(n)?a.multiply(2).subtract(r):a,a=u(y)),n=h;break;case"a":for(y=0;y<g;y+=7)this.arcTo(a=u(y+5),new b(+t[y],+t[y+1]),+t[y+2],+t[y+4],+t[y+3]);break;case"z":this.closePath(1e-12),a=s}n=h}},_canComposite:function(){return!(this.hasFill()&&this.hasStroke())},_contains:function(e){var t=e.isInside(this.getBounds({internal:!0,handle:!0}))?this._getWinding(e):{};return t.onPath||!!("evenodd"===this.getFillRule()?1&t.windingL||1&t.windingR:t.winding)},getIntersections:function(e,t,n,r){var i=this===e||!e,o=this._matrix._orNullIfIdentity(),a=i?o:(n||e._matrix)._orNullIfIdentity();return i||this.getBounds(o).intersects(e.getBounds(a),1e-12)?N.getIntersections(this.getCurves(),!i&&e.getCurves(),t,o,a,r):[]},getCrossings:function(e){return this.getIntersections(e,(function(e){return e.isCrossing()}))},getNearestLocation:function(){for(var e=m.read(arguments),t=this.getCurves(),n=1/0,r=null,i=0,o=t.length;i<o;i++){var a=t[i].getNearestLocation(e);a._distance<n&&(n=a._distance,r=a)}return r},getNearestPoint:function(){var e=this.getNearestLocation.apply(this,arguments);return e?e.getPoint():e},interpolate:function(e,t,n){var r=!this._children,i=r?"_segments":"_children",o=e[i],a=t[i],s=this[i];if(!o||!a||o.length!==a.length)throw new Error("Invalid operands in interpolate() call: "+e+", "+t);var c=s.length,u=a.length;if(c<u)for(var l=r?M:B,f=c;f<u;f++)this.add(new l);else c>u&&this[r?"removeSegments":"removeChildren"](u,c);for(f=0;f<u;f++)s[f].interpolate(o[f],a[f],n);r&&(this.setClosed(e._closed),this._changed(9))},compare:function(e){var t=!1;if(e){var n=this._children||[this],r=e._children?e._children.slice():[e],i=n.length,o=r.length,a=[],s=0;t=!0;for(var c=p.findItemBoundsCollisions(n,r,g.GEOMETRIC_EPSILON),u=i-1;u>=0&&t;u--){var l=n[u];t=!1;var f=c[u];if(f)for(var d=f.length-1;d>=0&&!t;d--)l.compare(r[f[d]])&&(a[f[d]]||(a[f[d]]=!0,s++),t=!0)}t=t&&s===o}return t}}),B=z.extend({_class:"Path",_serializeFields:{segments:[],closed:!1},initialize:function(e){this._closed=!1,this._segments=[],this._version=0;var t=arguments,n=Array.isArray(e)?"object"==typeof e[0]?e:t:!e||e.size!==a||e.x===a&&e.point===a?null:t;n&&n.length>0?this.setSegments(n):(this._curves=a,this._segmentSelection=0,n||"string"!=typeof e||(this.setPathData(e),e=null)),this._initialize(!n&&e)},_equals:function(e){return this._closed===e._closed&&u.equals(this._segments,e._segments)},copyContent:function(e){this.setSegments(e._segments),this._closed=e._closed},_changed:function e(t){if(e.base.call(this,t),8&t){if(this._length=this._area=a,32&t)this._version++;else if(this._curves)for(var n=0,r=this._curves.length;n<r;n++)this._curves[n]._changed()}else 64&t&&(this._bounds=a)},getStyle:function(){var e=this._parent;return(e instanceof F?e:this)._style},getSegments:function(){return this._segments},setSegments:function(e){var t=this.isFullySelected(),n=e&&e.length;if(this._segments.length=0,this._segmentSelection=0,this._curves=a,n){var r=e[n-1];"boolean"==typeof r&&(this.setClosed(r),n--),this._add(M.readList(e,0,{},n))}t&&this.setFullySelected(!0)},getFirstSegment:function(){return this._segments[0]},getLastSegment:function(){return this._segments[this._segments.length-1]},getCurves:function(){var e=this._curves,t=this._segments;if(!e){var n=this._countCurves();e=this._curves=new Array(n);for(var r=0;r<n;r++)e[r]=new N(this,t[r],t[r+1]||t[0])}return e},getFirstCurve:function(){return this.getCurves()[0]},getLastCurve:function(){var e=this.getCurves();return e[e.length-1]},isClosed:function(){return this._closed},setClosed:function(e){if(this._closed!=(e=!!e)){if(this._closed=e,this._curves){var t=this._curves.length=this._countCurves();e&&(this._curves[t-1]=new N(this,this._segments[t-1],this._segments[0]))}this._changed(41)}}},{beans:!0,getPathData:function(e,t){var n,r,i,o,a,s,c,u,l=this._segments,f=l.length,d=new h(t),p=new Array(6),g=!0,v=[];function m(t,l){if(t._transformCoordinates(e,p),n=p[0],r=p[1],g)v.push("M"+d.pair(n,r)),g=!1;else if(a=p[2],s=p[3],a===n&&s===r&&c===i&&u===o){if(!l){var f=n-i,h=r-o;v.push(0===f?"v"+d.number(h):0===h?"h"+d.number(f):"l"+d.pair(f,h))}}else v.push("c"+d.pair(c-i,u-o)+" "+d.pair(a-i,s-o)+" "+d.pair(n-i,r-o));i=n,o=r,c=p[4],u=p[5]}if(!f)return"";for(var y=0;y<f;y++)m(l[y]);return this._closed&&f>0&&(m(l[0],!0),v.push("z")),v.join("")},isEmpty:function(){return!this._segments.length},_transformContent:function(e){for(var t=this._segments,n=new Array(6),r=0,i=t.length;r<i;r++)t[r]._transformCoordinates(e,n,!0);return!0},_add:function(e,t){for(var n=this._segments,r=this._curves,i=e.length,o=null==t,a=(t=o?n.length:t,0);a<i;a++){var s=e[a];s._path&&(s=e[a]=s.clone()),s._path=this,s._index=t+a,s._selection&&this._updateSelection(s,0,s._selection)}if(o)u.push(n,e);else{n.splice.apply(n,[t,0].concat(e));a=t+i;for(var c=n.length;a<c;a++)n[a]._index=a}if(r){var l=this._countCurves(),f=t>0&&t+i-1===l?t-1:t,d=f,p=Math.min(f+i,l);e._curves&&(r.splice.apply(r,[f,0].concat(e._curves)),d+=e._curves.length);for(a=d;a<p;a++)r.splice(a,0,new N(this,null,null));this._adjustCurves(f,p)}return this._changed(41),e},_adjustCurves:function(e,t){for(var n,r=this._segments,i=this._curves,o=e;o<t;o++)(n=i[o])._path=this,n._segment1=r[o],n._segment2=r[o+1]||r[0],n._changed();(n=i[this._closed&&!e?r.length-1:e-1])&&(n._segment2=r[e]||r[0],n._changed()),(n=i[t])&&(n._segment1=r[t],n._changed())},_countCurves:function(){var e=this._segments.length;return!this._closed&&e>0?e-1:e},add:function(e){var t=arguments;return t.length>1&&"number"!=typeof e?this._add(M.readList(t)):this._add([M.read(t)])[0]},insert:function(e,t){var n=arguments;return n.length>2&&"number"!=typeof t?this._add(M.readList(n,1),e):this._add([M.read(n,1)],e)[0]},addSegment:function(){return this._add([M.read(arguments)])[0]},insertSegment:function(e){return this._add([M.read(arguments,1)],e)[0]},addSegments:function(e){return this._add(M.readList(e))},insertSegments:function(e,t){return this._add(M.readList(t),e)},removeSegment:function(e){return this.removeSegments(e,e+1)[0]||null},removeSegments:function(e,t,n){e=e||0,t=u.pick(t,this._segments.length);var r=this._segments,i=this._curves,o=r.length,a=r.splice(e,t-e),s=a.length;if(!s)return a;for(var c=0;c<s;c++){var l=a[c];l._selection&&this._updateSelection(l,l._selection,0),l._index=l._path=null}c=e;for(var f=r.length;c<f;c++)r[c]._index=c;if(i){var d=e>0&&t===o+(this._closed?1:0)?e-1:e;for(c=(i=i.splice(d,s)).length-1;c>=0;c--)i[c]._path=null;n&&(a._curves=i.slice(1)),this._adjustCurves(d,d)}return this._changed(41),a},clear:"#removeSegments",hasHandles:function(){for(var e=this._segments,t=0,n=e.length;t<n;t++)if(e[t].hasHandles())return!0;return!1},clearHandles:function(){for(var e=this._segments,t=0,n=e.length;t<n;t++)e[t].clearHandles()},getLength:function(){if(null==this._length){for(var e=this.getCurves(),t=0,n=0,r=e.length;n<r;n++)t+=e[n].getLength();this._length=t}return this._length},getArea:function(){var e=this._area;if(null==e){var t=this._segments,n=this._closed;e=0;for(var r=0,i=t.length;r<i;r++){var o=r+1===i;e+=N.getArea(N.getValues(t[r],t[o?0:r+1],null,o&&!n))}this._area=e}return e},isFullySelected:function(){var e=this._segments.length;return this.isSelected()&&e>0&&this._segmentSelection===7*e},setFullySelected:function(e){e&&this._selectSegments(!0),this.setSelected(e)},setSelection:function e(t){1&t||this._selectSegments(!1),e.base.call(this,t)},_selectSegments:function(e){var t=this._segments,n=t.length,r=e?7:0;this._segmentSelection=r*n;for(var i=0;i<n;i++)t[i]._selection=r},_updateSelection:function(e,t,n){e._selection=n,(this._segmentSelection+=n-t)>0&&this.setSelected(!0)},divideAt:function(e){var t,n=this.getLocationAt(e);return n&&(t=n.getCurve().divideAt(n.getCurveOffset()))?t._segment1:null},splitAt:function(e){var t=this.getLocationAt(e),n=t&&t.index,r=t&&t.time;r>1-1e-8&&(n++,r=0);var i=this.getCurves();if(n>=0&&n<i.length){r>=1e-8&&i[n++].divideAtTime(r);var o,a=this.removeSegments(n,this._segments.length,!0);return this._closed?(this.setClosed(!1),o=this):((o=new B(C.NO_INSERT)).insertAbove(this),o.copyAttributes(this)),o._add(a,0),this.addSegment(a[0]),o}return null},split:function(e,t){var n,r=t===a?e:(n=this.getCurves()[e])&&n.getLocationAtTime(t);return null!=r?this.splitAt(r):null},join:function(e,t){var n=t||0;if(e&&e!==this){var r=e._segments,i=this.getLastSegment(),o=e.getLastSegment();if(!o)return this;i&&i._point.isClose(o._point,n)&&e.reverse();var a=e.getFirstSegment();if(i&&i._point.isClose(a._point,n))i.setHandleOut(a._handleOut),this._add(r.slice(1));else{var s=this.getFirstSegment();s&&s._point.isClose(a._point,n)&&e.reverse(),o=e.getLastSegment(),s&&s._point.isClose(o._point,n)?(s.setHandleIn(o._handleIn),this._add(r.slice(0,r.length-1),0)):this._add(r.slice())}e._closed&&this._add([r[0]]),e.remove()}var c=this.getFirstSegment(),u=this.getLastSegment();return c!==u&&c._point.isClose(u._point,n)&&(c.setHandleIn(u._handleIn),u.remove(),this.setClosed(!0)),this},reduce:function(e){for(var t=this.getCurves(),n=e&&e.simplify,r=n?1e-7:0,i=t.length-1;i>=0;i--){var o=t[i];!o.hasHandles()&&(!o.hasLength(r)||n&&o.isCollinear(o.getNext()))&&o.remove()}return this},reverse:function(){this._segments.reverse();for(var e=0,t=this._segments.length;e<t;e++){var n=this._segments[e],r=n._handleIn;n._handleIn=n._handleOut,n._handleOut=r,n._index=e}this._curves=null,this._changed(9)},flatten:function(e){for(var t=new W(this,e||.25,256,!0).parts,n=t.length,r=[],i=0;i<n;i++)r.push(new M(t[i].curve.slice(0,2)));!this._closed&&n>0&&r.push(new M(t[n-1].curve.slice(6))),this.setSegments(r)},simplify:function(e){var t=new H(this).fit(e||2.5);return t&&this.setSegments(t),!!t},smooth:function(e){var t=this,n=e||{},r=n.type||"asymmetric",i=this._segments,o=i.length,s=this._closed;function c(e,n){var r=e&&e.index;if(null!=r){var i=e.path;if(i&&i!==t)throw new Error(e._class+" "+r+" of "+i+" is not part of "+t);n&&e instanceof N&&r++}else r="number"==typeof e?e:n;return Math.min(r<0&&s?r%o:r<0?r+o:r,o-1)}var u=s&&n.from===a&&n.to===a,l=c(n.from,0),f=c(n.to,o-1);if(l>f)if(s)l-=o;else{var d=l;l=f,f=d}if(/^(?:asymmetric|continuous)$/.test(r)){var p="asymmetric"===r,h=Math.min,g=f-l+1,v=g-1,m=u?h(g,4):1,y=m,b=m,w=[];if(s||(y=h(1,l),b=h(1,o-f-1)),(v+=y+b)<=1)return;for(var _=0,x=l-y;_<=v;_++,x++)w[_]=i[(x<0?x+o:x)%o]._point;var O=w[0]._x+2*w[1]._x,S=w[0]._y+2*w[1]._y,E=2,C=v-1,k=[O],T=[S],j=[E],P=[],I=[];for(_=1;_<v;_++){var R=_<C,A=R?4:p?2:7,M=R?4:p?3:8,D=R?2:p?0:1,L=(R||p?1:2)/E;E=j[_]=A-L,O=k[_]=M*w[_]._x+D*w[_+1]._x-L*O,S=T[_]=M*w[_]._y+D*w[_+1]._y-L*S}P[C]=k[C]/j[C],I[C]=T[C]/j[C];for(_=v-2;_>=0;_--)P[_]=(k[_]-P[_+1])/j[_],I[_]=(T[_]-I[_+1])/j[_];P[v]=(3*w[v]._x-P[C])/2,I[v]=(3*w[v]._y-I[C])/2;_=y;var z=v-b;for(x=l;_<=z;_++,x++){var B=i[x<0?x+o:x],F=B._point,W=P[_]-F._x,H=I[_]-F._y;(u||_<z)&&B.setHandleOut(W,H),(u||_>y)&&B.setHandleIn(-W,-H)}}else for(_=l;_<=f;_++)i[_<0?_+o:_].smooth(n,!u&&_===l,!u&&_===f)},toShape:function(e){if(!this._closed)return null;var t,n,r,i,o,s,c,u=this._segments;function l(e,t){var n=u[e],r=n.getNext(),i=u[t],o=i.getNext();return n._handleOut.isZero()&&r._handleIn.isZero()&&i._handleOut.isZero()&&o._handleIn.isZero()&&r._point.subtract(n._point).isCollinear(o._point.subtract(i._point))}function f(e){var t=u[e],n=t.getNext(),r=t._handleOut,i=n._handleIn,o=.5522847498307936;if(r.isOrthogonal(i)){var a=t._point,s=n._point,c=new S(a,r,!0).intersect(new S(s,i,!0),!0);return c&&g.isZero(r.getLength()/c.subtract(a).getLength()-o)&&g.isZero(i.getLength()/c.subtract(s).getLength()-o)}return!1}function d(e,t){return u[e]._point.getDistance(u[t]._point)}if(!this.hasHandles()&&4===u.length&&l(0,2)&&l(1,3)&&(o=u[1],s=o.getPrevious(),c=o.getNext(),s._handleOut.isZero()&&o._handleIn.isZero()&&o._handleOut.isZero()&&c._handleIn.isZero()&&o._point.subtract(s._point).isOrthogonal(c._point.subtract(o._point)))?(t=j.Rectangle,n=new b(d(0,3),d(0,1)),i=u[1]._point.add(u[2]._point).divide(2)):8===u.length&&f(0)&&f(2)&&f(4)&&f(6)&&l(1,5)&&l(3,7)?(t=j.Rectangle,r=(n=new b(d(1,6),d(0,3))).subtract(new b(d(0,7),d(1,2))).divide(2),i=u[3]._point.add(u[4]._point).divide(2)):4===u.length&&f(0)&&f(1)&&f(2)&&f(3)&&(g.isZero(d(0,2)-d(1,3))?(t=j.Circle,r=d(0,2)/2):(t=j.Ellipse,r=new b(d(2,0)/2,d(3,1)/2)),i=u[1]._point),t){var p=this.getPosition(!0),h=new t({center:p,size:n,radius:r,insert:!1});return h.copyAttributes(this,!0),h._matrix.prepend(this._matrix),h.rotate(i.subtract(p).getAngle()+90),(e===a||e)&&h.insertAbove(this),h}return null},toPath:"#clone",compare:function e(t){if(!t||t instanceof F)return e.base.call(this,t);var n=this.getCurves(),r=t.getCurves(),i=n.length,o=r.length;if(!i||!o)return i==o;for(var a,s,c=n[0].getValues(),u=[],l=0,f=0,d=0;d<o;d++){var p=r[d].getValues();if(u.push(p),v=N.getOverlaps(c,p)){a=!d&&v[0][0]>0?o-1:d,s=v[0][1];break}}var h,g=Math.abs;for(p=u[a];c&&p;){var v;if(v=N.getOverlaps(c,p))if(g(v[0][0]-f)<1e-8){1===(f=v[1][0])&&(c=++l<i?n[l].getValues():null,f=0);var m=v[0][1];if(g(m-s)<1e-8){if(h||(h=[a,m]),1===(s=v[1][1])&&(++a>=o&&(a=0),p=u[a]||r[a].getValues(),s=0),!c)return h[0]===a&&h[1]===s;continue}}break}return!1},_hitTestSelf:function(e,t,n,r){var i,o,a,s,c,u,l=this,f=this.getStyle(),d=this._segments,p=d.length,h=this._closed,g=t._tolerancePadding,v=g,m=t.stroke&&f.hasStroke(),y=t.fill&&f.hasFill(),b=t.curves,w=m?f.getStrokeWidth()/2:y&&t.tolerance>0||b?0:null;function _(t,n){return e.subtract(t).divide(n).length<=1}function x(e,n,r){if(!t.selected||n.isSelected()){var i=e._point;if(n!==i&&(n=n.add(i)),_(n,v))return new A(r,l,{segment:e,point:n})}}function O(e,n){return(n||t.segments)&&x(e,e._point,"segment")||!n&&t.handles&&(x(e,e._handleIn,"handle-in")||x(e,e._handleOut,"handle-out"))}function S(e){s.add(e)}function E(t){var n,c=h||t._index>0&&t._index<p-1;return"round"===(c?i:o)?_(t._point,v):(s=new B({internal:!0,closed:!0}),c?t.isSmooth()||B._addBevelJoin(t,i,w,a,null,r,S,!0):"square"===o&&B._addSquareCap(t,o,w,null,r,S,!0),s.isEmpty()?void 0:s.contains(e)||(n=s.getNearestLocation(e))&&_(n.getPoint(),g))}if(null!==w&&(w>0?(i=f.getStrokeJoin(),o=f.getStrokeCap(),a=f.getMiterLimit(),v=v.add(B._getStrokePadding(w,r))):i=o="round"),!t.ends||t.segments||h){if(t.segments||t.handles)for(var C=0;C<p;C++)if(u=O(d[C]))return u}else if(u=O(d[0],!0)||O(d[p-1],!0))return u;if(null!==w){if(c=this.getNearestLocation(e)){var k=c.getTime();0===k||1===k&&p>1?E(c.getSegment())||(c=null):_(c.getPoint(),v)||(c=null)}if(!c&&"miter"===i&&p>1)for(C=0;C<p;C++){var T=d[C];if(e.getDistance(T._point)<=a*w&&E(T)){c=T.getLocation();break}}}return!c&&y&&this._contains(e)||c&&!m&&!b?new A("fill",this):c?new A(m?"stroke":"curve",this,{location:c,point:c.getPoint()}):null}},u.each(N._evaluateMethods,(function(e){this[e+"At"]=function(t){var n=this.getLocationAt(t);return n&&n[e]()}}),{beans:!1,getLocationOf:function(){for(var e=m.read(arguments),t=this.getCurves(),n=0,r=t.length;n<r;n++){var i=t[n].getLocationOf(e);if(i)return i}return null},getOffsetOf:function(){var e=this.getLocationOf.apply(this,arguments);return e?e.getOffset():null},getLocationAt:function(e){if("number"==typeof e){for(var t=this.getCurves(),n=0,r=0,i=t.length;r<i;r++){var o=n,a=t[r];if((n+=a.getLength())>e)return a.getLocationAt(e-o)}if(t.length>0&&e<=this.getLength())return new L(t[t.length-1],1)}else if(e&&e.getPath&&e.getPath()===this)return e;return null},getOffsetsWithTangent:function(){var e=m.read(arguments);if(e.isZero())return[];for(var t=[],n=0,r=this.getCurves(),i=0,o=r.length;i<o;i++){for(var a=r[i],s=a.getTimesWithTangent(e),c=0,u=s.length;c<u;c++){var l=n+a.getOffsetAtTime(s[c]);t.indexOf(l)<0&&t.push(l)}n+=a.length}return t}}),new function(){function e(e,t,n){var r,i,o,a,s,c,u,l,f=t._segments,d=f.length,p=new Array(6),h=!0;function g(t){if(n)t._transformCoordinates(n,p),r=p[0],i=p[1];else{var f=t._point;r=f._x,i=f._y}if(h)e.moveTo(r,i),h=!1;else{if(n)s=p[2],c=p[3];else{var d=t._handleIn;s=r+d._x,c=i+d._y}s===r&&c===i&&u===o&&l===a?e.lineTo(r,i):e.bezierCurveTo(u,l,s,c,r,i)}if(o=r,a=i,n)u=p[4],l=p[5];else{d=t._handleOut;u=o+d._x,l=a+d._y}}for(var v=0;v<d;v++)g(f[v]);t._closed&&d>0&&g(f[0])}return{_draw:function(t,n,r,i){var o=n.dontStart,a=n.dontFinish||n.clip,s=this.getStyle(),c=s.hasFill(),u=s.hasStroke(),l=s.getDashArray(),f=!le.support.nativeDash&&u&&l&&l.length;function d(e){return l[(e%f+f)%f]}if(o||t.beginPath(),(c||u&&!f||a)&&(e(t,this,i),this._closed&&t.closePath()),!a&&(c||u)&&(this._setStyles(t,n,r),c&&(t.fill(s.getFillRule()),t.shadowColor="rgba(0,0,0,0)"),u)){if(f){o||t.beginPath();for(var p,h=new W(this,.25,32,!1,i),g=h.length,v=-s.getDashOffset(),m=0;v>0;)v-=d(m--)+d(m--);for(;v<g;)p=v+d(m++),(v>0||p>0)&&h.drawPart(t,Math.max(v,0),Math.max(p,0)),v=p+d(m++)}t.stroke()}},_drawSelected:function(t,n){t.beginPath(),e(t,this,n),t.stroke(),function(e,t,n,r){if(!(r<=0))for(var i,o,a=r/2,s=r-2,c=a-1,u=new Array(6),l=0,f=t.length;l<f;l++){var d=t[l],p=d._selection;if(d._transformCoordinates(n,u),i=u[0],o=u[1],2&p&&g(2),4&p&&g(4),e.fillRect(i-a,o-a,r,r),s>0&&!(1&p)){var h=e.fillStyle;e.fillStyle="#ffffff",e.fillRect(i-c,o-c,s,s),e.fillStyle=h}}function g(t){var n=u[t],r=u[t+1];i==n&&o==r||(e.beginPath(),e.moveTo(i,o),e.lineTo(n,r),e.stroke(),e.beginPath(),e.arc(n,r,a,0,2*Math.PI,!0),e.fill())}}(t,this._segments,n,le.settings.handleSize)}}},new function(){function e(e){var t=e._segments;if(!t.length)throw new Error("Use a moveTo() command first");return t[t.length-1]}return{moveTo:function(){var e=this._segments;1===e.length&&this.removeSegment(0),e.length||this._add([new M(m.read(arguments))])},moveBy:function(){throw new Error("moveBy() is unsupported on Path items.")},lineTo:function(){this._add([new M(m.read(arguments))])},cubicCurveTo:function(){var t=arguments,n=m.read(t),r=m.read(t),i=m.read(t),o=e(this);o.setHandleOut(n.subtract(o._point)),this._add([new M(i,r.subtract(i))])},quadraticCurveTo:function(){var t=arguments,n=m.read(t),r=m.read(t),i=e(this)._point;this.cubicCurveTo(n.add(i.subtract(n).multiply(1/3)),n.add(r.subtract(n).multiply(1/3)),r)},curveTo:function(){var t=arguments,n=m.read(t),r=m.read(t),i=u.pick(u.read(t),.5),o=1-i,a=e(this)._point,s=n.subtract(a.multiply(o*o)).subtract(r.multiply(i*i)).divide(2*i*o);if(s.isNaN())throw new Error("Cannot put a curve through points with parameter = "+i);this.quadraticCurveTo(s,r)},arcTo:function(){var t,n,r,i,o=arguments,a=Math.abs,s=Math.sqrt,c=e(this),l=c._point,f=m.read(o),d=u.peek(o);if("boolean"==typeof(w=u.pick(d,!0)))var p=(x=l.add(f).divide(2)).add(x.subtract(l).rotate(w?-90:90));else if(u.remain(o)<=2)p=f,f=m.read(o);else if(!l.equals(f)){var h=b.read(o),v=g.isZero;if(v(h.width)||v(h.height))return this.lineTo(f);var y=u.read(o),w=!!u.read(o),_=!!u.read(o),x=l.add(f).divide(2),E=($=l.subtract(x).rotate(-y)).x,C=$.y,k=a(h.width),T=a(h.height),j=k*k,P=T*T,I=E*E,R=C*C,A=s(I/j+R/P);if(A>1&&(j=(k*=A)*k,P=(T*=A)*T),a(A=(j*P-j*R-P*I)/(j*R+P*I))<1e-12&&(A=0),A<0)throw new Error("Cannot create an arc with the given arguments");t=new m(k*C/T,-T*E/k).multiply((_===w?-1:1)*s(A)).rotate(y).add(x),n=(r=(i=(new O).translate(t).rotate(y).scale(k,T))._inverseTransform(l)).getDirectedAngle(i._inverseTransform(f)),!w&&n>0?n-=360:w&&n<0&&(n+=360)}if(p){var D=new S(l.add(p).divide(2),p.subtract(l).rotate(90),!0),N=new S(p.add(f).divide(2),f.subtract(p).rotate(90),!0),L=new S(l,f),z=L.getSide(p);if(!(t=D.intersect(N,!0))){if(!z)return this.lineTo(f);throw new Error("Cannot create an arc with the given arguments")}n=(r=l.subtract(t)).getDirectedAngle(f.subtract(t));var B=L.getSide(t,!0);0===B?n=z*a(n):z===B&&(n+=n<0?360:-360)}if(n){for(var F=1e-7,W=a(n),H=W>=360?4:Math.ceil((W-F)/90),V=n/H,U=V*Math.PI/360,q=4/3*Math.sin(U)/(1+Math.cos(U)),G=[],K=0;K<=H;K++){var $=f,Z=null;if(K<H&&(Z=r.rotate(90).multiply(q),i?($=i._transformPoint(r),Z=i._transformPoint(r.add(Z)).subtract($)):$=t.add(r)),K){var X=r.rotate(-90).multiply(q);i&&(X=i._transformPoint(r.add(X)).subtract($)),G.push(new M($,X,Z))}else c.setHandleOut(Z);r=r.rotate(V)}this._add(G)}},lineBy:function(){var t=m.read(arguments),n=e(this)._point;this.lineTo(n.add(t))},curveBy:function(){var t=arguments,n=m.read(t),r=m.read(t),i=u.read(t),o=e(this)._point;this.curveTo(o.add(n),o.add(r),i)},cubicCurveBy:function(){var t=arguments,n=m.read(t),r=m.read(t),i=m.read(t),o=e(this)._point;this.cubicCurveTo(o.add(n),o.add(r),o.add(i))},quadraticCurveBy:function(){var t=arguments,n=m.read(t),r=m.read(t),i=e(this)._point;this.quadraticCurveTo(i.add(n),i.add(r))},arcBy:function(){var t=arguments,n=e(this)._point,r=n.add(m.read(t)),i=u.pick(u.peek(t),!0);"boolean"==typeof i?this.arcTo(r,i):this.arcTo(r,n.add(m.read(t)))},closePath:function(e){this.setClosed(!0),this.join(this,e)}}},{_getBounds:function(e,t){var n=t.handle?"getHandleBounds":t.stroke?"getStrokeBounds":"getBounds";return B[n](this._segments,this._closed,this,e,t)},statics:{getBounds:function(e,t,n,r,i,o){var a=e[0];if(!a)return new _;var s=new Array(6),c=a._transformCoordinates(r,new Array(6)),u=c.slice(0,2),l=u.slice(),f=new Array(2);function d(e){e._transformCoordinates(r,s);for(var t=0;t<2;t++)N._addBounds(c[t],c[t+4],s[t+2],s[t],t,o?o[t]:0,u,l,f);var n=c;c=s,s=n}for(var p=1,h=e.length;p<h;p++)d(e[p]);return t&&d(a),new _(u[0],u[1],l[0]-u[0],l[1]-u[1])},getStrokeBounds:function(e,t,n,r,i){var o=n.getStyle(),a=o.hasStroke(),s=o.getStrokeWidth(),c=a&&n._getStrokeMatrix(r,i),u=a&&B._getStrokePadding(s,c),l=B.getBounds(e,t,n,r,i,u);if(!a)return l;var f=s/2,d=o.getStrokeJoin(),p=o.getStrokeCap(),h=o.getMiterLimit(),g=new _(new b(u));function v(e){l=l.include(e)}function m(e){l=l.unite(g.setCenter(e._point.transform(r)))}function y(e,t){"round"===t||e.isSmooth()?m(e):B._addBevelJoin(e,t,f,h,r,c,v)}function w(e,t){"round"===t?m(e):B._addSquareCap(e,t,f,r,c,v)}var x=e.length-(t?0:1);if(x>0){for(var O=1;O<x;O++)y(e[O],d);t?y(e[0],d):(w(e[0],p),w(e[e.length-1],p))}return l},_getStrokePadding:function(e,t){if(!t)return[e,e];var n=new m(e,0).transform(t),r=new m(0,e).transform(t),i=n.getAngleInRadians(),o=n.getLength(),a=r.getLength(),s=Math.sin(i),c=Math.cos(i),u=Math.tan(i),l=Math.atan2(a*u,o),f=Math.atan2(a,u*o);return[Math.abs(o*Math.cos(l)*c+a*Math.sin(l)*s),Math.abs(a*Math.sin(f)*c+o*Math.cos(f)*s)]},_addBevelJoin:function(e,t,n,r,i,o,a,s){var c=e.getCurve(),u=c.getPrevious(),l=c.getPoint1().transform(i),f=u.getNormalAtTime(1).multiply(n).transform(o),d=c.getNormalAtTime(0).multiply(n).transform(o),p=f.getDirectedAngle(d);if((p<0||p>=180)&&(f=f.negate(),d=d.negate()),s&&a(l),a(l.add(f)),"miter"===t){var h=new S(l.add(f),new m(-f.y,f.x),!0).intersect(new S(l.add(d),new m(-d.y,d.x),!0),!0);h&&l.getDistance(h)<=r*n&&a(h)}a(l.add(d))},_addSquareCap:function(e,t,n,r,i,o,a){var s=e._point.transform(r),c=e.getLocation(),u=c.getNormal().multiply(0===c.getTime()?n:-n).transform(i);"square"===t&&(a&&(o(s.subtract(u)),o(s.add(u))),s=s.add(u.rotate(-90))),o(s.add(u)),o(s.subtract(u))},getHandleBounds:function(e,t,n,r,i){var o,a,s=n.getStyle();if(i.stroke&&s.hasStroke()){var c=n._getStrokeMatrix(r,i),u=s.getStrokeWidth()/2,l=u;"miter"===s.getStrokeJoin()&&(l=u*s.getMiterLimit()),"square"===s.getStrokeCap()&&(l=Math.max(l,u*Math.SQRT2)),o=B._getStrokePadding(u,c),a=B._getStrokePadding(l,c)}for(var f=new Array(6),d=1/0,p=-d,h=d,g=p,v=0,m=e.length;v<m;v++){e[v]._transformCoordinates(r,f);for(var y=0;y<6;y+=2){var b=y?o:a,w=b?b[0]:0,x=b?b[1]:0,O=f[y],S=f[y+1],E=O-w,C=O+w,k=S-x,T=S+x;E<d&&(d=E),C>p&&(p=C),k<h&&(h=k),T>g&&(g=T)}}return new _(d,h,p-d,g-h)}}});B.inject({statics:new function(){var e=.5522847498307936,t=[new M([-1,0],[0,e],[0,-e]),new M([0,-1],[-e,0],[e,0]),new M([1,0],[0,-e],[0,e]),new M([0,1],[e,0],[-e,0])];function n(e,t,n){var r=u.getNamed(n),i=new B(r&&0==r.insert&&C.NO_INSERT);return i._add(e),i._closed=t,i.set(r,{insert:!0})}function r(e,r,i){for(var o=new Array(4),a=0;a<4;a++){var s=t[a];o[a]=new M(s._point.multiply(r).add(e),s._handleIn.multiply(r),s._handleOut.multiply(r))}return n(o,!0,i)}return{Line:function(){var e=arguments;return n([new M(m.readNamed(e,"from")),new M(m.readNamed(e,"to"))],!1,e)},Circle:function(){var e=arguments,t=m.readNamed(e,"center"),n=u.readNamed(e,"radius");return r(t,new b(n),e)},Rectangle:function(){var t,r=arguments,i=_.readNamed(r,"rectangle"),o=b.readNamed(r,"radius",0,{readNull:!0}),a=i.getBottomLeft(!0),s=i.getTopLeft(!0),c=i.getTopRight(!0),u=i.getBottomRight(!0);if(!o||o.isZero())t=[new M(a),new M(s),new M(c),new M(u)];else{var l=(o=b.min(o,i.getSize(!0).divide(2))).width,f=o.height,d=l*e,p=f*e;t=[new M(a.add(l,0),null,[-d,0]),new M(a.subtract(0,f),[0,p]),new M(s.add(0,f),null,[0,-p]),new M(s.add(l,0),[-d,0],null),new M(c.subtract(l,0),null,[d,0]),new M(c.add(0,f),[0,-p],null),new M(u.subtract(0,f),null,[0,p]),new M(u.subtract(l,0),[d,0])]}return n(t,!0,r)},RoundRectangle:"#Rectangle",Ellipse:function(){var e=arguments,t=j._readEllipse(e);return r(t.center,t.radius,e)},Oval:"#Ellipse",Arc:function(){var e=arguments,t=m.readNamed(e,"from"),n=m.readNamed(e,"through"),r=m.readNamed(e,"to"),i=u.getNamed(e),o=new B(i&&0==i.insert&&C.NO_INSERT);return o.moveTo(t),o.arcTo(n,r),o.set(i)},RegularPolygon:function(){for(var e=arguments,t=m.readNamed(e,"center"),r=u.readNamed(e,"sides"),i=u.readNamed(e,"radius"),o=360/r,a=r%3==0,s=new m(0,a?-i:i),c=a?-1:.5,l=new Array(r),f=0;f<r;f++)l[f]=new M(t.add(s.rotate((f+c)*o)));return n(l,!0,e)},Star:function(){for(var e=arguments,t=m.readNamed(e,"center"),r=2*u.readNamed(e,"points"),i=u.readNamed(e,"radius1"),o=u.readNamed(e,"radius2"),a=360/r,s=new m(0,-1),c=new Array(r),l=0;l<r;l++)c[l]=new M(t.add(s.rotate(a*l).multiply(l%2?o:i)));return n(c,!0,e)}}}});var F=z.extend({_class:"CompoundPath",_serializeFields:{children:[]},beans:!0,initialize:function(e){this._children=[],this._namedChildren={},this._initialize(e)||("string"==typeof e?this.setPathData(e):this.addChildren(Array.isArray(e)?e:arguments))},insertChildren:function e(t,n){var r=n,i=r[0];i&&"number"==typeof i[0]&&(r=[r]);for(var o=n.length-1;o>=0;o--){var a=r[o];r!==n||a instanceof B||(r=u.slice(r)),Array.isArray(a)?r[o]=new B({segments:a,insert:!1}):a instanceof F&&(r.splice.apply(r,[o,1].concat(a.removeChildren())),a.remove())}return e.base.call(this,t,r)},reduce:function e(t){for(var n=this._children,r=n.length-1;r>=0;r--){var i;(i=n[r].reduce(t)).isEmpty()&&i.remove()}return n.length?e.base.call(this):((i=new B(C.NO_INSERT)).copyAttributes(this),i.insertAbove(this),this.remove(),i)},isClosed:function(){for(var e=this._children,t=0,n=e.length;t<n;t++)if(!e[t]._closed)return!1;return!0},setClosed:function(e){for(var t=this._children,n=0,r=t.length;n<r;n++)t[n].setClosed(e)},getFirstSegment:function(){var e=this.getFirstChild();return e&&e.getFirstSegment()},getLastSegment:function(){var e=this.getLastChild();return e&&e.getLastSegment()},getCurves:function(){for(var e=this._children,t=[],n=0,r=e.length;n<r;n++)u.push(t,e[n].getCurves());return t},getFirstCurve:function(){var e=this.getFirstChild();return e&&e.getFirstCurve()},getLastCurve:function(){var e=this.getLastChild();return e&&e.getLastCurve()},getArea:function(){for(var e=this._children,t=0,n=0,r=e.length;n<r;n++)t+=e[n].getArea();return t},getLength:function(){for(var e=this._children,t=0,n=0,r=e.length;n<r;n++)t+=e[n].getLength();return t},getPathData:function(e,t){for(var n=this._children,r=[],i=0,o=n.length;i<o;i++){var a=n[i],s=a._matrix;r.push(a.getPathData(e&&!s.isIdentity()?e.appended(s):e,t))}return r.join("")},_hitTestChildren:function e(t,n,r){return e.base.call(this,t,n.class===B||"path"===n.type?n:u.set({},n,{fill:!1}),r)},_draw:function(e,t,n,r){var i=this._children;if(i.length){t=t.extend({dontStart:!0,dontFinish:!0}),e.beginPath();for(var o=0,a=i.length;o<a;o++)i[o].draw(e,t,r);if(!t.clip){this._setStyles(e,t,n);var s=this._style;s.hasFill()&&(e.fill(s.getFillRule()),e.shadowColor="rgba(0,0,0,0)"),s.hasStroke()&&e.stroke()}}},_drawSelected:function(e,t,n){for(var r=this._children,i=0,o=r.length;i<o;i++){var a=r[i],s=a._matrix;n[a._id]||a._drawSelected(e,s.isIdentity()?t:t.appended(s))}}},new function(){function e(e,t){var n=e._children;if(t&&!n.length)throw new Error("Use a moveTo() command first");return n[n.length-1]}return u.each(["lineTo","cubicCurveTo","quadraticCurveTo","curveTo","arcTo","lineBy","cubicCurveBy","quadraticCurveBy","curveBy","arcBy"],(function(t){this[t]=function(){var n=e(this,!0);n[t].apply(n,arguments)}}),{moveTo:function(){var t=e(this),n=t&&t.isEmpty()?t:new B(C.NO_INSERT);n!==t&&this.addChild(n),n.moveTo.apply(n,arguments)},moveBy:function(){var t=e(this,!0),n=t&&t.getLastSegment(),r=m.read(arguments);this.moveTo(n?r.add(n._point):r)},closePath:function(t){e(this,!0).closePath(t)}})},u.each(["reverse","flatten","simplify","smooth"],(function(e){this[e]=function(t){for(var n,r=this._children,i=0,o=r.length;i<o;i++)n=r[i][e](t)||n;return n}}),{}));z.inject(new function(){var e=Math.min,t=Math.max,n=Math.abs,r={unite:{1:!0,2:!0},intersect:{2:!0},subtract:{1:!0},exclude:{1:!0,"-1":!0}};function i(e){return e._children||[e]}function o(e,t){var n=e.clone(!1).reduce({simplify:!0}).transform(null,!0,!0);if(t){for(var r=i(n),o=0,a=r.length;o<a;o++){(e=r[o])._closed||e.isEmpty()||(e.closePath(1e-12),e.getFirstSegment().setHandleIn(0,0),e.getLastSegment().setHandleOut(0,0))}n=n.resolveCrossings().reorient("nonzero"===n.getFillRule(),!0)}return n}function s(e,t,n,r,i){var o=new F(C.NO_INSERT);return o.addChildren(e,!0),o=o.reduce({simplify:t}),i&&0==i.insert||o.insertAbove(r&&n.isSibling(r)&&n.getIndex()<r.getIndex()?r:n),o.copyAttributes(n,!0),o}function c(e){return e.hasOverlap()||e.isCrossing()}function l(e,t,n,a){if(a&&(0==a.trace||a.stroke)&&/^(subtract|intersect)$/.test(n))return f(e,t,n);var l=o(e,!0),d=t&&e!==t&&o(t,!0),h=r[n];h[n]=!0,d&&(h.subtract||h.exclude)^d.isClockwise()^l.isClockwise()&&d.reverse();var g,y=m(L.expand(l.getIntersections(d,c))),_=i(l),x=d&&i(d),O=[],S=[];function E(e){for(var t=0,n=e.length;t<n;t++){var r=e[t];u.push(O,r._segments),u.push(S,r.getCurves()),r._overlapsOnly=!0}}function C(e){for(var t=[],n=0,r=e&&e.length;n<r;n++)t.push(S[e[n]]);return t}if(y.length){E(_),x&&E(x);for(var k=new Array(S.length),T=0,j=S.length;T<j;T++)k[T]=S[T].getValues();var P=p.findCurveBoundsCollisions(k,k,0,!0),I={};for(T=0;T<S.length;T++){var R=S[T],A=R._path._id;(I[A]=I[A]||{})[R.getIndex()]={hor:C(P[T].hor),ver:C(P[T].ver)}}for(T=0,j=y.length;T<j;T++)b(y[T]._segment,l,d,I,h);for(T=0,j=O.length;T<j;T++){var M=O[T],D=M._intersection;M._winding||b(M,l,d,I,h),D&&D._overlap||(M._path._overlapsOnly=!1)}g=w(O,h)}else g=v(x?_.concat(x):_.slice(),(function(e){return!!h[e]}));return s(g,!0,e,t,a)}function f(e,t,n){var r=o(e),i=o(t),a=r.getIntersections(i,c),u="subtract"===n,l="divide"===n,f={},d=[];function p(e){if(!f[e._id]&&(l||i.contains(e.getPointAt(e.getLength()/2))^u))return d.unshift(e),f[e._id]=!0}for(var h=a.length-1;h>=0;h--){var g=a[h].split();g&&(p(g)&&g.getFirstSegment().setHandleIn(0,0),r.getLastSegment().setHandleOut(0,0))}return p(r),s(d,!1,e,t)}function d(e,t){for(var n=e;n;){if(n===t)return;n=n._previous}for(;e._next&&e._next!==t;)e=e._next;if(!e._next){for(;t._previous;)t=t._previous;e._next=t,t._previous=e}}function h(e){for(var t=e.length-1;t>=0;t--)e[t].clearHandles()}function v(e,t,r){var i=e&&e.length;if(i){var o=u.each(e,(function(e,t){this[e._id]={container:null,winding:e.isClockwise()?1:-1,index:t}}),{}),a=e.slice().sort((function(e,t){return n(t.getArea())-n(e.getArea())})),s=a[0],c=p.findItemBoundsCollisions(a,null,g.GEOMETRIC_EPSILON);null==r&&(r=s.isClockwise());for(var l=0;l<i;l++){var f=a[l],d=o[f._id],h=0,v=c[l];if(v)for(var m=null,y=v.length-1;y>=0;y--)if(v[y]<l){m=m||f.getInteriorPoint();var b=a[v[y]];if(b.contains(m)){var w=o[b._id];h=w.winding,d.winding+=h,d.container=w.exclude?w.container:b;break}}if(t(d.winding)===t(h))d.exclude=!0,e[d.index]=null;else{var _=d.container;f.setClockwise(_?!_.isClockwise():r)}}}return e}function m(e,t,n){var r,i,o,a=t&&[],s=!1,c=n||[],u=n&&{};function l(e){return e._path._id+"."+e._segment1._index}for(var f=(n&&n.length)-1;f>=0;f--){(p=n[f])._path&&(u[l(p)]=!0)}for(f=e.length-1;f>=0;f--){var p,g,v=e[f],m=v._time,y=m,b=t&&!t(v);if((p=v._curve)&&(p!==i?(s=!p.hasHandles()||u&&u[l(p)],r=[],o=null,i=p):o>=1e-8&&(m/=o)),b)r&&r.push(v);else{if(t&&a.unshift(v),o=y,m<1e-8)g=p._segment1;else if(m>1-1e-8)g=p._segment2;else{var w=p.divideAtTime(m,!0);s&&c.push(p,w),g=w._segment1;for(var _=r.length-1;_>=0;_--){var x=r[_];x._time=(x._time-m)/(1-m)}}v._setSegment(g);var O=g._intersection,S=v._intersection;if(O){d(O,S);for(var E=O;E;)d(E._intersection,O),E=E._next}else g._intersection=S}}return n||h(c),a||e}function y(r,i,o,a,s){var c,u,l=Array.isArray(i)?i:i[o?"hor":"ver"],f=o?1:0,d=1^f,p=[r.x,r.y],h=p[f],g=p[d],v=h-1e-9,m=h+1e-9,b=0,w=0,_=0,x=0,O=!1,S=!1,E=1,C=[];function k(n){var u=n[d+0],l=n[d+6];if(!(g<e(u,l)||g>t(u,l))){var p=n[f+0],b=n[f+2],w=n[f+4],S=n[f+6];if(u!==l){var k=g===u?0:g===l||v>t(p,b,w,S)||m<e(p,b,w,S)?1:N.solveCubic(n,d,g,C,0,1)>0?C[0]:1,T=0===k?p:1===k?S:N.getPoint(n,k)[o?"y":"x"],j=u>l?1:-1,P=c[d]>c[d+6]?1:-1,I=c[f+6];return g!==u?(T<v?_+=j:T>m?x+=j:O=!0,T>h-1e-6&&T<h+1e-6&&(E/=2)):(j!==P?p<v?_+=j:p>m&&(x+=j):p!=I&&(I<m&&T>m?(x+=j,O=!0):I>v&&T<v&&(_+=j,O=!0)),E/=4),c=n,!s&&T>v&&T<m&&0===N.getTangent(n,k)[o?"x":"y"]&&y(r,i,!o,a,!0)}(p<m&&S>v||S<m&&p>v)&&(O=!0)}}function T(n){var r=n[d+0],i=n[d+2],a=n[d+4],s=n[d+6];if(g<=t(r,i,a,s)&&g>=e(r,i,a,s))for(var c,u=n[f+0],l=n[f+2],p=n[f+4],h=n[f+6],y=v>t(u,l,p,h)||m<e(u,l,p,h)?[n]:N.getMonoCurves(n,o),b=0,w=y.length;b<w;b++)if(c=k(y[b]))return c}for(var j=0,P=l.length;j<P;j++){var I,R=l[j],A=R._path,M=R.getValues();if(!(j&&l[j-1]._path===A||(c=null,A._closed||(u=N.getValues(A.getLastCurve().getSegment2(),R.getSegment1(),null,!a))[d]!==u[d+6]&&(c=u),c))){c=M;for(var D=A.getLastCurve();D&&D!==R;){var L=D.getValues();if(L[d]!==L[d+6]){c=L;break}D=D.getPrevious()}}if(I=T(M))return I;if(j+1===P||l[j+1]._path!==A){if(u&&(I=T(u)))return I;!O||_||x||(_=x=A.isClockwise(a)^o?1:-1),b+=_,w+=x,_=x=0,O&&(S=!0,O=!1),u=null}}return b=n(b),w=n(w),{winding:t(b,w),windingL:b,windingR:w,quality:E,onPath:S}}function b(e,t,r,i,o){var a=[],s=e,c=0;do{if(b=e.getCurve()){var u=b.getLength();a.push({segment:e,curve:b,length:u}),c+=u}e=e.getNext()}while(e&&!e._intersection&&e!==s);for(var l=[.5,.25,.75],f={winding:0,quality:-1},d=0;d<l.length&&f.quality<.5;d++){u=c*l[d];for(var p=0,h=a.length;p<h;p++){var v=a[p],m=v.length;if(u<=m){var b,w=(b=v.curve)._path,_=w._parent,x=_ instanceof F?_:w,O=g.clamp(b.getTimeAt(u),.001,.999),S=b.getPointAtTime(O),E=n(b.getTangentAtTime(O).y)<Math.SQRT1_2,C=null;if(o.subtract&&r){var k=(x===t?r:t)._getWinding(S,E,!0);if(x===t&&k.winding||x===r&&!k.winding){if(k.quality<1)continue;C={winding:0,quality:1}}}(C=C||y(S,i[w._id][b.getIndex()],E,!0)).quality>f.quality&&(f=C);break}u-=m}}for(p=a.length-1;p>=0;p--)a[p].segment._winding=f}function w(e,t){var n,r=[];function i(e){var n;return!(!e||e._visited||t&&(!t[(n=e._winding||{}).winding]||t.unite&&2===n.winding&&n.windingL&&n.windingR))}function o(e){if(e)for(var t=0,r=n.length;t<r;t++)if(e===n[t])return!0;return!1}function a(e){for(var t=e._segments,n=0,r=t.length;n<r;n++)t[n]._visited=!0}function s(e,t){var r=e._intersection,a=r,s=[];function c(r,a){for(;r&&r!==a;){var c=r._segment,u=c&&c._path;if(u){var l=c.getNext()||u.getFirstSegment(),f=l._intersection;c!==e&&(o(c)||o(l)||l&&i(c)&&(i(l)||f&&i(f._segment)))&&s.push(c),t&&n.push(c)}r=r._next}}if(t&&(n=[e]),r){for(c(r);r&&r._previous;)r=r._previous;c(r,a)}return s}e.sort((function(e,t){var n=e._intersection,r=t._intersection,i=!(!n||!n._overlap),o=!(!r||!r._overlap),a=e._path,s=t._path;return i^o?i?1:-1:!n^!r?n?1:-1:a!==s?a._id-s._id:e._index-t._index}));for(var c=0,u=e.length;c<u;c++){var l,f,d,p=e[c],h=i(p),g=null,v=!1,m=!0,y=[];if(h&&p._path._overlapsOnly){var b=p._path,w=p._intersection._segment._path;b.compare(w)&&(b.getArea()&&r.push(b.clone(!1)),a(b),a(w),h=!1)}for(;h;){var _=!g,x=s(p,_),O=x.shift(),S=!(v=!_&&(o(p)||o(O)))&&O;if(_&&(g=new B(C.NO_INSERT),l=null),v){(p.isFirst()||p.isLast())&&(m=p._path._closed),p._visited=!0;break}if(S&&l&&(y.push(l),l=null),l||(S&&x.push(p),l={start:g._segments.length,crossings:x,visited:f=[],handleIn:d}),S&&(p=O),!i(p)){g.removeSegments(l.start);for(var E=0,k=f.length;E<k;E++)f[E]._visited=!1;f.length=0;do{(p=l&&l.crossings.shift())&&p._path||(p=null,(l=y.pop())&&(f=l.visited,d=l.handleIn))}while(l&&!i(p));if(!p)break}var T=p.getNext();g.add(new M(p._point,d,T&&p._handleOut)),p._visited=!0,f.push(p),p=T||p._path.getFirstSegment(),d=T&&T._handleIn}v&&(m&&(g.getFirstSegment().setHandleIn(d),g.setClosed(m)),0!==g.getArea()&&r.push(g))}return r}return{_getWinding:function(e,t,n){return y(e,this.getCurves(),t,n)},unite:function(e,t){return l(this,e,"unite",t)},intersect:function(e,t){return l(this,e,"intersect",t)},subtract:function(e,t){return l(this,e,"subtract",t)},exclude:function(e,t){return l(this,e,"exclude",t)},divide:function(e,t){return t&&(0==t.trace||t.stroke)?f(this,e,"divide"):s([this.subtract(e,t),this.intersect(e,t)],!0,this,e,t)},resolveCrossings:function(){var e=this._children,t=e||[this];function n(e,t){var n=e&&e._intersection;return n&&n._overlap&&n._path===t}var r=!1,i=!1,o=this.getIntersections(null,(function(e){return e.hasOverlap()&&(r=!0)||e.isCrossing()&&(i=!0)})),a=r&&i&&[];if(o=L.expand(o),r)for(var s=m(o,(function(e){return e.hasOverlap()}),a),c=s.length-1;c>=0;c--){var l=s[c],f=l._path,d=l._segment,p=d.getPrevious(),g=d.getNext();n(p,f)&&n(g,f)&&(d.remove(),p._handleOut._set(0,0),g._handleIn._set(0,0),p===d||p.getCurve().hasLength()||(g._handleIn.set(p._handleIn),p.remove()))}i&&(m(o,r&&function(e){var t=e.getCurve(),n=e.getSegment(),r=e._intersection,i=r._curve,o=r._segment;if(t&&i&&t._path&&i._path)return!0;n&&(n._intersection=null),o&&(o._intersection=null)},a),a&&h(a),t=w(u.each(t,(function(e){u.push(this,e._segments)}),[])));var v,y=t.length;return y>1&&e?(t!==e&&this.setChildren(t),v=this):1!==y||e||(t[0]!==this&&this.setSegments(t[0].removeSegments()),v=this),v||((v=new F(C.NO_INSERT)).addChildren(t),(v=v.reduce()).copyAttributes(this),this.replaceWith(v)),v},reorient:function(e,t){var n=this._children;return n&&n.length?this.setChildren(v(this.removeChildren(),(function(t){return!!(e?t:1&t)}),t)):t!==a&&this.setClockwise(t),this},getInteriorPoint:function(){var n=this.getBounds().getCenter(!0);if(!this.contains(n)){for(var r=this.getCurves(),i=n.y,o=[],a=[],s=0,c=r.length;s<c;s++){var u=r[s].getValues(),l=u[1],f=u[3],d=u[5],p=u[7];if(i>=e(l,f,d,p)&&i<=t(l,f,d,p))for(var h=N.getMonoCurves(u),g=0,v=h.length;g<v;g++){var m=h[g],y=m[1],b=m[7];if(y!==b&&(i>=y&&i<=b||i>=b&&i<=y)){var w=i===y?m[0]:i===b?m[6]:1===N.solveCubic(m,1,i,a,0,1)?N.getPoint(m,a[0]).x:(m[0]+m[6])/2;o.push(w)}}}o.length>1&&(o.sort((function(e,t){return e-t})),n.x=(o[0]+o[1])/2)}return n}}});var W=u.extend({_class:"PathFlattener",initialize:function(e,t,n,r,i){var o,a=[],s=[],c=0,u=1/(n||32),l=e._segments,f=l[0];function d(e,n){var o=N.getValues(e,n,i);a.push(o),function e(n,i,o,a){if(!(a-o>u)||r&&N.isStraight(n)||N.isFlatEnough(n,t||.25)){var l=n[6]-n[0],f=n[7]-n[1],d=Math.sqrt(l*l+f*f);d>0&&(c+=d,s.push({offset:c,curve:n,index:i,time:a}))}else{var p=N.subdivide(n,.5),h=(o+a)/2;e(p[0],i,o,h),e(p[1],i,h,a)}}(o,e._index,0,1)}for(var p=1,h=l.length;p<h;p++)d(f,o=l[p]),f=o;e._closed&&d(o||f,l[0]),this.curves=a,this.parts=s,this.length=c,this.index=0},_get:function(e){for(var t,n=this.parts,r=n.length,i=this.index;t=i,i&&!(n[--i].offset<e););for(;t<r;t++){var o=n[t];if(o.offset>=e){this.index=t;var a=n[t-1],s=a&&a.index===o.index?a.time:0,c=a?a.offset:0;return{index:o.index,time:s+(o.time-s)*(e-c)/(o.offset-c)}}}return{index:n[r-1].index,time:1}},drawPart:function(e,t,n){for(var r=this._get(t),i=this._get(n),o=r.index,a=i.index;o<=a;o++){var s=N.getPart(this.curves[o],o===r.index?r.time:0,o===i.index?i.time:1);o===r.index&&e.moveTo(s[0],s[1]),e.bezierCurveTo.apply(e,s.slice(2))}}},u.each(N._evaluateMethods,(function(e){this[e+"At"]=function(t){var n=this._get(t);return N[e](this.curves[n.index],n.time)}}),{})),H=u.extend({initialize:function(e){for(var t,n=this.points=[],r=e._segments,i=e._closed,o=0,a=r.length;o<a;o++){var s=r[o].point;t&&t.equals(s)||n.push(t=s.clone())}i&&(n.unshift(n[n.length-1]),n.push(n[1])),this.closed=i},fit:function(e){var t=this.points,n=t.length,r=null;return n>0&&(r=[new M(t[0])],n>1&&(this.fitCubic(r,e,0,n-1,t[1].subtract(t[0]),t[n-2].subtract(t[n-1])),this.closed&&(r.shift(),r.pop()))),r},fitCubic:function(e,t,n,r,i,o){var a=this.points;if(r-n!=1){for(var s,c=this.chordLengthParameterize(n,r),u=Math.max(t,t*t),l=!0,f=0;f<=4;f++){var d=this.generateBezier(n,r,c,i,o),p=this.findMaxError(n,r,d,c);if(p.error<t&&l)return void this.addCurve(e,d);if(s=p.index,p.error>=u)break;l=this.reparameterize(n,r,c,d),u=p.error}var h=a[s-1].subtract(a[s+1]);this.fitCubic(e,t,n,s,i,h),this.fitCubic(e,t,s,r,h.negate(),o)}else{var g=a[n],v=a[r],m=g.getDistance(v)/3;this.addCurve(e,[g,g.add(i.normalize(m)),v.add(o.normalize(m)),v])}},addCurve:function(e,t){e[e.length-1].setHandleOut(t[1].subtract(t[0])),e.push(new M(t[3],t[2].subtract(t[3])))},generateBezier:function(e,t,n,r,i){for(var o=Math.abs,a=this.points,s=a[e],c=a[t],u=[[0,0],[0,0]],l=[0,0],f=0,d=t-e+1;f<d;f++){var p=n[f],h=1-p,g=3*p*h,v=h*h*h,m=g*h,y=g*p,b=p*p*p,w=r.normalize(m),_=i.normalize(y),x=a[e+f].subtract(s.multiply(v+m)).subtract(c.multiply(y+b));u[0][0]+=w.dot(w),u[0][1]+=w.dot(_),u[1][0]=u[0][1],u[1][1]+=_.dot(_),l[0]+=w.dot(x),l[1]+=_.dot(x)}var O,S,E=u[0][0]*u[1][1]-u[1][0]*u[0][1];if(o(E)>1e-12){var C=u[0][0]*l[1]-u[1][0]*l[0];O=(l[0]*u[1][1]-l[1]*u[0][1])/E,S=C/E}else{var k=u[0][0]+u[0][1],T=u[1][0]+u[1][1];O=S=o(k)>1e-12?l[0]/k:o(T)>1e-12?l[1]/T:0}var j,P,I=c.getDistance(s),R=1e-12*I;if(O<R||S<R)O=S=I/3;else{var A=c.subtract(s);j=r.normalize(O),P=i.normalize(S),j.dot(A)-P.dot(A)>I*I&&(O=S=I/3,j=P=null)}return[s,s.add(j||r.normalize(O)),c.add(P||i.normalize(S)),c]},reparameterize:function(e,t,n,r){for(var i=e;i<=t;i++)n[i-e]=this.findRoot(r,this.points[i],n[i-e]);i=1;for(var o=n.length;i<o;i++)if(n[i]<=n[i-1])return!1;return!0},findRoot:function(e,t,n){for(var r=[],i=[],o=0;o<=2;o++)r[o]=e[o+1].subtract(e[o]).multiply(3);for(o=0;o<=1;o++)i[o]=r[o+1].subtract(r[o]).multiply(2);var a=this.evaluate(3,e,n),s=this.evaluate(2,r,n),c=this.evaluate(1,i,n),u=a.subtract(t),l=s.dot(s)+u.dot(c);return g.isMachineZero(l)?n:n-u.dot(s)/l},evaluate:function(e,t,n){for(var r=t.slice(),i=1;i<=e;i++)for(var o=0;o<=e-i;o++)r[o]=r[o].multiply(1-n).add(r[o+1].multiply(n));return r[0]},chordLengthParameterize:function(e,t){for(var n=[0],r=e+1;r<=t;r++)n[r-e]=n[r-e-1]+this.points[r].getDistance(this.points[r-1]);r=1;for(var i=t-e;r<=i;r++)n[r]/=n[i];return n},findMaxError:function(e,t,n,r){for(var i=Math.floor((t-e+1)/2),o=0,a=e+1;a<t;a++){var s=this.evaluate(3,n,r[a-e]).subtract(this.points[a]),c=s.x*s.x+s.y*s.y;c>=o&&(o=c,i=a)}return{error:o,index:i}}}),V=C.extend({_class:"TextItem",_applyMatrix:!1,_canApplyMatrix:!1,_serializeFields:{content:null},_boundsOptions:{stroke:!1,handle:!1},initialize:function(e){this._content="",this._lines=[];var t=e&&u.isPlainObject(e)&&e.x===a&&e.y===a;this._initialize(t&&e,!t&&m.read(arguments))},_equals:function(e){return this._content===e._content},copyContent:function(e){this.setContent(e._content)},getContent:function(){return this._content},setContent:function(e){this._content=""+e,this._lines=this._content.split(/\r\n|\n|\r/gm),this._changed(521)},isEmpty:function(){return!this._content},getCharacterStyle:"#getStyle",setCharacterStyle:"#setStyle",getParagraphStyle:"#getStyle",setParagraphStyle:"#setStyle"}),U=V.extend({_class:"PointText",initialize:function(){V.apply(this,arguments)},getPoint:function(){var e=this._matrix.getTranslation();return new y(e.x,e.y,this,"setPoint")},setPoint:function(){var e=m.read(arguments);this.translate(e.subtract(this._matrix.getTranslation()))},_draw:function(e,t,n){if(this._content){this._setStyles(e,t,n);var r=this._lines,i=this._style,o=i.hasFill(),a=i.hasStroke(),s=i.getLeading(),c=e.shadowColor;e.font=i.getFontStyle(),e.textAlign=i.getJustification();for(var u=0,l=r.length;u<l;u++){e.shadowColor=c;var f=r[u];o&&(e.fillText(f,0,0),e.shadowColor="rgba(0,0,0,0)"),a&&e.strokeText(f,0,0),e.translate(0,s)}}},_getBounds:function(e,t){var n=this._style,r=this._lines,i=r.length,o=n.getJustification(),a=n.getLeading(),s=this.getView().getTextWidth(n.getFontStyle(),r),c=0;"left"!==o&&(c-=s/("center"===o?2:1));var u=new _(c,i?-.75*a:0,s,i*a);return e?e._transformBounds(u,u):u}}),q=u.extend(new function(){var e,t={gray:["gray"],rgb:["red","green","blue"],hsb:["hue","saturation","brightness"],hsl:["hue","saturation","lightness"],gradient:["gradient","origin","destination","highlight"]},n={},r={transparent:[0,0,0,0]};function i(t){var n,i=t.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i)||t.match(/^#([\da-f])([\da-f])([\da-f])([\da-f])?$/i),o="rgb";if(i){var a=i[4]?4:3;n=new Array(a);for(var c=0;c<a;c++){var u=i[c+1];n[c]=parseInt(1==u.length?u+u:u,16)/255}}else if(i=t.match(/^(rgb|hsl)a?\((.*)\)$/)){o=i[1],n=i[2].trim().split(/[,\s]+/g);for(var l="hsl"===o,f=(c=0,Math.min(n.length,4));c<f;c++){var d=n[c];u=parseFloat(d);if(l)if(0===c){var p=d.match(/([a-z]*)$/)[1];u*={turn:360,rad:180/Math.PI,grad:.9}[p]||1}else c<3&&(u/=100);else c<3&&(u/=/%$/.test(d)?100:255);n[c]=u}}else{var h=r[t];if(!h)if(s){e||((e=ae.getContext(1,1)).globalCompositeOperation="copy"),e.fillStyle="rgba(0,0,0,0)",e.fillStyle=t,e.fillRect(0,0,1,1);var g=e.getImageData(0,0,1,1).data;h=r[t]=[g[0]/255,g[1]/255,g[2]/255]}else h=[0,0,0];n=h.slice()}return[o,n]}var o=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]],a={"rgb-hsb":function(e,t,n){var r=Math.max(e,t,n),i=r-Math.min(e,t,n);return[0===i?0:60*(r==e?(t-n)/i+(t<n?6:0):r==t?(n-e)/i+2:(e-t)/i+4),0===r?0:i/r,r]},"hsb-rgb":function(e,t,n){var r,i=(e=(e/60%6+6)%6)-(r=Math.floor(e)),a=[n,n*(1-t),n*(1-t*i),n*(1-t*(1-i))];return[a[(r=o[r])[0]],a[r[1]],a[r[2]]]},"rgb-hsl":function(e,t,n){var r=Math.max(e,t,n),i=Math.min(e,t,n),o=r-i,a=0===o,s=(r+i)/2;return[a?0:60*(r==e?(t-n)/o+(t<n?6:0):r==t?(n-e)/o+2:(e-t)/o+4),a?0:s<.5?o/(r+i):o/(2-r-i),s]},"hsl-rgb":function(e,t,n){if(0===t)return[n,n,n];for(var r=[(e=(e/360%1+1)%1)+1/3,e,e-1/3],i=n<.5?n*(1+t):n+t-n*t,o=2*n-i,a=[],s=0;s<3;s++){var c=r[s];c<0&&(c+=1),c>1&&(c-=1),a[s]=6*c<1?o+6*(i-o)*c:2*c<1?i:3*c<2?o+(i-o)*(2/3-c)*6:o}return a},"rgb-gray":function(e,t,n){return[.2989*e+.587*t+.114*n]},"gray-rgb":function(e){return[e,e,e]},"gray-hsb":function(e){return[0,0,e]},"gray-hsl":function(e){return[0,0,e]},"gradient-rgb":function(){return[]},"rgb-gradient":function(){return[]}};return u.each(t,(function(e,r){n[r]=[],u.each(e,(function(e,i){var o=u.capitalize(e),a=/^(hue|saturation)$/.test(e),s=n[r][i]="gradient"===r?"gradient"===e?function(e){var t=this._components[0];return t!==(e=G.read(Array.isArray(e)?e:arguments,0,{readNull:!0}))&&(t&&t._removeOwner(this),e&&e._addOwner(this)),e}:function(){return m.read(arguments,0,{readNull:"highlight"===e,clone:!0})}:function(e){return null==e||isNaN(e)?0:+e};this["get"+o]=function(){return this._type===r||a&&/^hs[bl]$/.test(this._type)?this._components[i]:this._convert(r)[i]},this["set"+o]=function(e){this._type===r||a&&/^hs[bl]$/.test(this._type)||(this._components=this._convert(r),this._properties=t[r],this._type=r),this._components[i]=s.call(this,e),this._changed()}}),this)}),{_class:"Color",_readIndex:!0,initialize:function e(r){var o,a,s,c,l=arguments,f=this.__read,d=0;Array.isArray(r)&&(r=(l=r)[0]);var p=null!=r&&typeof r;if("string"===p&&r in t&&(o=r,r=l[1],Array.isArray(r)?(a=r,s=l[2]):(f&&(d=1),l=u.slice(l,1),p=typeof r)),!a){if(c="number"===p?l:"object"===p&&null!=r.length?r:null){o||(o=c.length>=3?"rgb":"gray");var h=t[o].length;s=c[h],f&&(d+=c===arguments?h+(null!=s?1:0):1),c.length>h&&(c=u.slice(c,0,h))}else if("string"===p){var g=i(r);o=g[0],4===(a=g[1]).length&&(s=a[3],a.length--)}else if("object"===p)if(r.constructor===e){if(o=r._type,a=r._components.slice(),s=r._alpha,"gradient"===o)for(var v=1,m=a.length;v<m;v++){var y=a[v];y&&(a[v]=y.clone())}}else if(r.constructor===G)o="gradient",c=l;else{var b=t[o="hue"in r?"lightness"in r?"hsl":"hsb":"gradient"in r||"stops"in r||"radial"in r?"gradient":"gray"in r?"gray":"rgb"],w=n[o];this._components=a=[];for(v=0,m=b.length;v<m;v++){null==(_=r[b[v]])&&!v&&"gradient"===o&&"stops"in r&&(_={stops:r.stops,radial:r.radial}),null!=(_=w[v].call(this,_))&&(a[v]=_)}s=r.alpha}f&&o&&(d=1)}if(this._type=o||"rgb",!a){this._components=a=[];for(v=0,m=(w=n[this._type]).length;v<m;v++){var _;null!=(_=w[v].call(this,c&&c[v]))&&(a[v]=_)}}return this._components=a,this._properties=t[this._type],this._alpha=s,f&&(this.__read=d),this},set:"#initialize",_serialize:function(e,t){var n=this.getComponents();return u.serialize(/^(gray|rgb)$/.test(this._type)?n:[this._type].concat(n),e,!0,t)},_changed:function(){this._canvasStyle=null,this._owner&&(this._setter?this._owner[this._setter](this):this._owner._changed(129))},_convert:function(e){var t;return this._type===e?this._components.slice():(t=a[this._type+"-"+e])?t.apply(this,this._components):a["rgb-"+e].apply(this,a[this._type+"-rgb"].apply(this,this._components))},convert:function(e){return new q(e,this._convert(e),this._alpha)},getType:function(){return this._type},setType:function(e){this._components=this._convert(e),this._properties=t[e],this._type=e},getComponents:function(){var e=this._components.slice();return null!=this._alpha&&e.push(this._alpha),e},getAlpha:function(){return null!=this._alpha?this._alpha:1},setAlpha:function(e){this._alpha=null==e?null:Math.min(Math.max(e,0),1),this._changed()},hasAlpha:function(){return null!=this._alpha},equals:function(e){var t=u.isPlainValue(e,!0)?q.read(arguments):e;return t===this||t&&this._class===t._class&&this._type===t._type&&this.getAlpha()===t.getAlpha()&&u.equals(this._components,t._components)||!1},toString:function(){for(var e=this._properties,t=[],n="gradient"===this._type,r=h.instance,i=0,o=e.length;i<o;i++){var a=this._components[i];null!=a&&t.push(e[i]+": "+(n?a:r.number(a)))}return null!=this._alpha&&t.push("alpha: "+r.number(this._alpha)),"{ "+t.join(", ")+" }"},toCSS:function(e){var t=this._convert("rgb"),n=e||null==this._alpha?1:this._alpha;function r(e){return Math.round(255*(e<0?0:e>1?1:e))}return t=[r(t[0]),r(t[1]),r(t[2])],n<1&&t.push(n<0?0:n),e?"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+t[2]).toString(16).slice(1):(4==t.length?"rgba(":"rgb(")+t.join(",")+")"},toCanvasStyle:function(e,t){if(this._canvasStyle)return this._canvasStyle;if("gradient"!==this._type)return this._canvasStyle=this.toCSS();var n,r=this._components,i=r[0],o=i._stops,a=r[1],s=r[2],c=r[3],u=t&&t.inverted();if(u&&(a=u._transformPoint(a),s=u._transformPoint(s),c&&(c=u._transformPoint(c))),i._radial){var l=s.getDistance(a);if(c){var f=c.subtract(a);f.getLength()>l&&(c=a.add(f.normalize(l-.1)))}var d=c||a;n=e.createRadialGradient(d.x,d.y,0,a.x,a.y,l)}else n=e.createLinearGradient(a.x,a.y,s.x,s.y);for(var p=0,h=o.length;p<h;p++){var g=o[p],v=g._offset;n.addColorStop(null==v?p/(h-1):v,g._color.toCanvasStyle())}return this._canvasStyle=n},transform:function(e){if("gradient"===this._type){for(var t=this._components,n=1,r=t.length;n<r;n++){var i=t[n];e._transformPoint(i,i,!0)}this._changed()}},statics:{_types:t,random:function(){var e=Math.random;return new q(e(),e(),e())},_setOwner:function(e,t,n){return e&&(e._owner&&t&&e._owner!==t&&(e=e.clone()),!e._owner^!t&&(e._owner=t||null,e._setter=n||null)),e}}})},new function(){return u.each({add:function(e,t){return e+t},subtract:function(e,t){return e-t},multiply:function(e,t){return e*t},divide:function(e,t){return e/t}},(function(e,t){this[t]=function(t){t=q.read(arguments);for(var n=this._type,r=this._components,i=t._convert(n),o=0,a=r.length;o<a;o++)i[o]=e(r[o],i[o]);return new q(n,i,null!=this._alpha?e(this._alpha,t.getAlpha()):null)}}),{})}),G=u.extend({_class:"Gradient",initialize:function(e,t){this._id=v.get(),e&&u.isPlainObject(e)&&(this.set(e),e=t=null),null==this._stops&&this.setStops(e||["white","black"]),null==this._radial&&this.setRadial("string"==typeof t&&"radial"===t||t||!1)},_serialize:function(e,t){return t.add(this,(function(){return u.serialize([this._stops,this._radial],e,!0,t)}))},_changed:function(){for(var e=0,t=this._owners&&this._owners.length;e<t;e++)this._owners[e]._changed()},_addOwner:function(e){this._owners||(this._owners=[]),this._owners.push(e)},_removeOwner:function(e){var t=this._owners?this._owners.indexOf(e):-1;-1!=t&&(this._owners.splice(t,1),this._owners.length||(this._owners=a))},clone:function(){for(var e=[],t=0,n=this._stops.length;t<n;t++)e[t]=this._stops[t].clone();return new G(e,this._radial)},getStops:function(){return this._stops},setStops:function(e){if(e.length<2)throw new Error("Gradient stop list needs to contain at least two stops.");var t=this._stops;if(t)for(var n=0,r=t.length;n<r;n++)t[n]._owner=a;for(n=0,r=(t=this._stops=K.readList(e,0,{clone:!0})).length;n<r;n++)t[n]._owner=this;this._changed()},getRadial:function(){return this._radial},setRadial:function(e){this._radial=e,this._changed()},equals:function(e){if(e===this)return!0;if(e&&this._class===e._class){var t=this._stops,n=e._stops,r=t.length;if(r===n.length){for(var i=0;i<r;i++)if(!t[i].equals(n[i]))return!1;return!0}}return!1}}),K=u.extend({_class:"GradientStop",initialize:function(e,t){var n=e,r=t;"object"==typeof e&&t===a&&(Array.isArray(e)&&"number"!=typeof e[0]?(n=e[0],r=e[1]):("color"in e||"offset"in e||"rampPoint"in e)&&(n=e.color,r=e.offset||e.rampPoint||0)),this.setColor(n),this.setOffset(r)},clone:function(){return new K(this._color.clone(),this._offset)},_serialize:function(e,t){var n=this._color,r=this._offset;return u.serialize(null==r?[n]:[n,r],e,!0,t)},_changed:function(){this._owner&&this._owner._changed(129)},getOffset:function(){return this._offset},setOffset:function(e){this._offset=e,this._changed()},getRampPoint:"#getOffset",setRampPoint:"#setOffset",getColor:function(){return this._color},setColor:function(){q._setOwner(this._color,null),this._color=q._setOwner(q.read(arguments,0),this,"setColor"),this._changed()},equals:function(e){return e===this||e&&this._class===e._class&&this._color.equals(e._color)&&this._offset==e._offset||!1}}),$=u.extend(new function(){var e={fillColor:null,fillRule:"nonzero",strokeColor:null,strokeWidth:1,strokeCap:"butt",strokeJoin:"miter",strokeScaling:!0,miterLimit:10,dashOffset:0,dashArray:[],shadowColor:null,shadowBlur:0,shadowOffset:new m,selectedColor:null},t=u.set({},e,{fontFamily:"sans-serif",fontWeight:"normal",fontSize:12,leading:null,justification:"left"}),n=u.set({},t,{fillColor:new q}),r={strokeWidth:193,strokeCap:193,strokeJoin:193,strokeScaling:201,miterLimit:193,fontFamily:9,fontWeight:9,fontSize:9,font:9,leading:9,justification:9},i={beans:!0},o={_class:"Style",beans:!0,initialize:function(r,i,o){this._values={},this._owner=i,this._project=i&&i._project||o||le.project,this._defaults=!i||i instanceof k?t:i instanceof V?n:e,r&&this.set(r)}};return u.each(t,(function(e,t){var n=/Color$/.test(t),s="shadowOffset"===t,c=u.capitalize(t),l=r[t],f="set"+c,d="get"+c;o[f]=function(e){var r=this._owner,i=r&&r._children,o=i&&i.length>0&&!(r instanceof F);if(o)for(var a=0,s=i.length;a<s;a++)i[a]._style[f](e);if(("selectedColor"===t||!o)&&t in this._defaults){var c=this._values[t];c!==e&&(n&&(c&&(q._setOwner(c,null),c._canvasStyle=null),e&&e.constructor===q&&(e=q._setOwner(e,r,o&&f))),this._values[t]=e,r&&r._changed(l||129))}},o[d]=function(e){var r=this._owner,i=r&&r._children,o=i&&i.length>0&&!(r instanceof F);if(o&&!e)for(var c=0,l=i.length;c<l;c++){var p=i[c]._style[d]();if(c){if(!u.equals(h,p))return a}else h=p}else if(t in this._defaults){var h;if((h=this._values[t])===a)(h=this._defaults[t])&&h.clone&&(h=h.clone());else{var g=n?q:s?m:null;!g||h&&h.constructor===g||(this._values[t]=h=g.read([h],0,{readNull:!0,clone:!0}))}}return h&&n&&(h=q._setOwner(h,r,o&&f)),h},i[d]=function(e){return this._style[d](e)},i[f]=function(e){this._style[f](e)}})),u.each({Font:"FontFamily",WindingRule:"FillRule"},(function(e,t){var n="get"+t,r="set"+t;o[n]=i[n]="#get"+e,o[r]=i[r]="#set"+e})),C.inject(i),o},{set:function(e){var t=e instanceof $,n=t?e._values:e;if(n)for(var r in n)if(r in this._defaults){var i=n[r];this[r]=i&&t&&i.clone?i.clone():i}},equals:function(e){function t(e,t,n){var r=e._values,i=t._values,o=t._defaults;for(var s in r){var c=r[s],l=i[s];if(!(n&&s in i||u.equals(c,l===a?o[s]:l)))return!1}return!0}return e===this||e&&this._class===e._class&&t(this,e)&&t(e,this,!0)||!1},_dispose:function(){var e;(e=this.getFillColor())&&(e._canvasStyle=null),(e=this.getStrokeColor())&&(e._canvasStyle=null),(e=this.getShadowColor())&&(e._canvasStyle=null)},hasFill:function(){var e=this.getFillColor();return!!e&&e.alpha>0},hasStroke:function(){var e=this.getStrokeColor();return!!e&&e.alpha>0&&this.getStrokeWidth()>0},hasShadow:function(){var e=this.getShadowColor();return!!e&&e.alpha>0&&(this.getShadowBlur()>0||!this.getShadowOffset().isZero())},getView:function(){return this._project._view},getFontStyle:function(){var e=this.getFontSize();return this.getFontWeight()+" "+e+(/[a-z]/i.test(e+"")?" ":"px ")+this.getFontFamily()},getFont:"#getFontFamily",setFont:"#setFontFamily",getLeading:function e(){var t=e.base.call(this),n=this.getFontSize();return/pt|em|%|px/.test(n)&&(n=this.getView().getPixelSize(n)),null!=t?t:1.2*n}}),Z=new function(){function e(e,t,n,r){for(var i=["","webkit","moz","Moz","ms","o"],o=t[0].toUpperCase()+t.substring(1),a=0;a<6;a++){var s=i[a],c=s?s+o:t;if(c in e){if(!n)return e[c];e[c]=r;break}}}return{getStyles:function(e){var t=e&&9!==e.nodeType?e.ownerDocument:e,n=t&&t.defaultView;return n&&n.getComputedStyle(e,"")},getBounds:function(e,t){var n,r=e.ownerDocument,i=r.body,o=r.documentElement;try{n=e.getBoundingClientRect()}catch(e){n={left:0,top:0,width:0,height:0}}var a=n.left-(o.clientLeft||i.clientLeft||0),s=n.top-(o.clientTop||i.clientTop||0);if(!t){var c=r.defaultView;a+=c.pageXOffset||o.scrollLeft||i.scrollLeft,s+=c.pageYOffset||o.scrollTop||i.scrollTop}return new _(a,s,n.width,n.height)},getViewportBounds:function(e){var t=e.ownerDocument,n=t.defaultView,r=t.documentElement;return new _(0,0,n.innerWidth||r.clientWidth,n.innerHeight||r.clientHeight)},getOffset:function(e,t){return Z.getBounds(e,t).getPoint()},getSize:function(e){return Z.getBounds(e,!0).getSize()},isInvisible:function(e){return Z.getSize(e).equals(new b(0,0))},isInView:function(e){return!Z.isInvisible(e)&&Z.getViewportBounds(e).intersects(Z.getBounds(e,!0))},isInserted:function(e){return c.body.contains(e)},getPrefixed:function(t,n){return t&&e(t,n)},setPrefixed:function(t,n,r){if("object"==typeof n)for(var i in n)e(t,i,!0,n[i]);else e(t,n,!0,r)}}},X={add:function(e,t){if(e)for(var n in t)for(var r=t[n],i=n.split(/[\s,]+/g),o=0,a=i.length;o<a;o++){var s=i[o],u=e===c&&("touchstart"===s||"touchmove"===s)&&{passive:!1};e.addEventListener(s,r,u)}},remove:function(e,t){if(e)for(var n in t)for(var r=t[n],i=n.split(/[\s,]+/g),o=0,a=i.length;o<a;o++)e.removeEventListener(i[o],r,!1)},getPoint:function(e){var t=e.targetTouches?e.targetTouches.length?e.targetTouches[0]:e.changedTouches[0]:e;return new m(t.pageX||t.clientX+c.documentElement.scrollLeft,t.pageY||t.clientY+c.documentElement.scrollTop)},getTarget:function(e){return e.target||e.srcElement},getRelatedTarget:function(e){return e.relatedTarget||e.toElement},getOffset:function(e,t){return X.getPoint(e).subtract(Z.getOffset(t||X.getTarget(e)))}};X.requestAnimationFrame=new function(){var e,t=Z.getPrefixed(s,"requestAnimationFrame"),n=!1,r=[];function i(){var e=r;r=[];for(var o=0,a=e.length;o<a;o++)e[o]();(n=t&&r.length)&&t(i)}return function(o){r.push(o),t?n||(t(i),n=!0):e||(e=setInterval(i,1e3/60))}};var Q=u.extend(l,{_class:"View",initialize:function e(t,n){function r(e){return n[e]||parseInt(n.getAttribute(e),10)}function i(){var e=Z.getSize(n);return e.isNaN()||e.isZero()?new b(r("width"),r("height")):e}var o;if(s&&n){this._id=n.getAttribute("id"),null==this._id&&n.setAttribute("id",this._id="paper-view-"+e._id++),X.add(n,this._viewEvents);if(Z.setPrefixed(n.style,{userDrag:"none",userSelect:"none",touchCallout:"none",contentZooming:"none",tapHighlightColor:"rgba(0,0,0,0)"}),f.hasAttribute(n,"resize")){var a=this;X.add(s,this._windowEvents={resize:function(){a.setViewSize(i())}})}if(o=i(),f.hasAttribute(n,"stats")&&"undefined"!=typeof Stats){this._stats=new Stats;var u=this._stats.domElement,l=u.style,d=Z.getOffset(n);l.position="absolute",l.left=d.x+"px",l.top=d.y+"px",c.body.appendChild(u)}}else o=new b(n),n=null;this._project=t,this._scope=t._scope,this._element=n,this._pixelRatio||(this._pixelRatio=s&&s.devicePixelRatio||1),this._setElementSize(o.width,o.height),this._viewSize=o,e._views.push(this),e._viewsById[this._id]=this,(this._matrix=new O)._owner=this,e._focused||(e._focused=this),this._frameItems={},this._frameItemCount=0,this._itemEvents={native:{},virtual:{}},this._autoUpdate=!le.agent.node,this._needsUpdate=!1},remove:function(){if(!this._project)return!1;Q._focused===this&&(Q._focused=null),Q._views.splice(Q._views.indexOf(this),1),delete Q._viewsById[this._id];var e=this._project;return e._view===this&&(e._view=null),X.remove(this._element,this._viewEvents),X.remove(s,this._windowEvents),this._element=this._project=null,this.off("frame"),this._animate=!1,this._frameItems={},!0},_events:u.each(C._itemHandlers.concat(["onResize","onKeyDown","onKeyUp"]),(function(e){this[e]={}}),{onFrame:{install:function(){this.play()},uninstall:function(){this.pause()}}}),_animate:!1,_time:0,_count:0,getAutoUpdate:function(){return this._autoUpdate},setAutoUpdate:function(e){this._autoUpdate=e,e&&this.requestUpdate()},update:function(){},draw:function(){this.update()},requestUpdate:function(){if(!this._requested){var e=this;X.requestAnimationFrame((function(){if(e._requested=!1,e._animate){e.requestUpdate();var t=e._element;Z.getPrefixed(c,"hidden")&&"true"!==f.getAttribute(t,"keepalive")||!Z.isInView(t)||e._handleFrame()}e._autoUpdate&&e.update()})),this._requested=!0}},play:function(){this._animate=!0,this.requestUpdate()},pause:function(){this._animate=!1},_handleFrame:function(){le=this._scope;var e=Date.now()/1e3,t=this._last?e-this._last:0;this._last=e,this.emit("frame",new u({delta:t,time:this._time+=t,count:this._count++})),this._stats&&this._stats.update()},_animateItem:function(e,t){var n=this._frameItems;t?(n[e._id]={item:e,time:0,count:0},1==++this._frameItemCount&&this.on("frame",this._handleFrameItems)):(delete n[e._id],0==--this._frameItemCount&&this.off("frame",this._handleFrameItems))},_handleFrameItems:function(e){for(var t in this._frameItems){var n=this._frameItems[t];n.item.emit("frame",new u(e,{time:n.time+=e.delta,count:n.count++}))}},_changed:function(){this._project._changed(4097),this._bounds=this._decomposed=a},getElement:function(){return this._element},getPixelRatio:function(){return this._pixelRatio},getResolution:function(){return 72*this._pixelRatio},getViewSize:function(){var e=this._viewSize;return new w(e.width,e.height,this,"setViewSize")},setViewSize:function(){var e=b.read(arguments),t=e.subtract(this._viewSize);t.isZero()||(this._setElementSize(e.width,e.height),this._viewSize.set(e),this._changed(),this.emit("resize",{size:e,delta:t}),this._autoUpdate&&this.update())},_setElementSize:function(e,t){var n=this._element;n&&(n.width!==e&&(n.width=e),n.height!==t&&(n.height=t))},getBounds:function(){return this._bounds||(this._bounds=this._matrix.inverted()._transformBounds(new _(new m,this._viewSize))),this._bounds},getSize:function(){return this.getBounds().getSize()},isVisible:function(){return Z.isInView(this._element)},isInserted:function(){return Z.isInserted(this._element)},getPixelSize:function(e){var t,n=this._element;if(n){var r=n.parentNode,i=c.createElement("div");i.style.fontSize=e,r.appendChild(i),t=parseFloat(Z.getStyles(i).fontSize),r.removeChild(i)}else t=parseFloat(t);return t},getTextWidth:function(e,t){return 0}},u.each(["rotate","scale","shear","skew"],(function(e){var t="rotate"===e;this[e]=function(){var n=arguments,r=(t?u:m).read(n),i=m.read(n,0,{readNull:!0});return this.transform((new O)[e](r,i||this.getCenter(!0)))}}),{_decompose:function(){return this._decomposed||(this._decomposed=this._matrix.decompose())},translate:function(){var e=new O;return this.transform(e.translate.apply(e,arguments))},getCenter:function(){return this.getBounds().getCenter()},setCenter:function(){var e=m.read(arguments);this.translate(this.getCenter().subtract(e))},getZoom:function(){var e=this._decompose().scaling;return(e.x+e.y)/2},setZoom:function(e){this.transform((new O).scale(e/this.getZoom(),this.getCenter()))},getRotation:function(){return this._decompose().rotation},setRotation:function(e){var t=this.getRotation();null!=t&&null!=e&&this.rotate(e-t)},getScaling:function(){var e=this._decompose().scaling;return new y(e.x,e.y,this,"setScaling")},setScaling:function(){var e=this.getScaling(),t=m.read(arguments,0,{clone:!0,readNull:!0});e&&t&&this.scale(t.x/e.x,t.y/e.y)},getMatrix:function(){return this._matrix},setMatrix:function(){var e=this._matrix;e.set.apply(e,arguments)},transform:function(e){this._matrix.append(e)},scrollBy:function(){this.translate(m.read(arguments).negate())}}),{projectToView:function(){return this._matrix._transformPoint(m.read(arguments))},viewToProject:function(){return this._matrix._inverseTransform(m.read(arguments))},getEventPoint:function(e){return this.viewToProject(X.getOffset(e,this._element))}},{statics:{_views:[],_viewsById:{},_id:0,create:function(e,t){return c&&"string"==typeof t&&(t=c.getElementById(t)),new(s?Y:Q)(e,t)}}},new function(){if(s){var e,t,n,r,i,o=!1,a=!1,u=s.navigator;u.pointerEnabled||u.msPointerEnabled?(n="pointerdown MSPointerDown",r="pointermove MSPointerMove",i="pointerup pointercancel MSPointerUp MSPointerCancel"):(n="touchstart",r="touchmove",i="touchend touchcancel","ontouchstart"in s&&u.userAgent.match(/mobile|tablet|ip(ad|hone|od)|android|silk/i)||(n+=" mousedown",r+=" mousemove",i+=" mouseup"));var l={},f={mouseout:function(e){var t=Q._focused,n=X.getRelatedTarget(e);if(t&&(!n||"HTML"===n.nodeName)){var r=X.getOffset(e,t._element),i=r.x,o=Math.abs,a=o(i),s=a-(1<<25);r.x=o(s)<a?s*(i<0?-1:1):i,k(t,e,t.viewToProject(r))}},scroll:C};l[n]=function(e){var t=Q._focused=E(e);o||(o=!0,t._handleMouseEvent("mousedown",e))},f[r]=function(n){var r=Q._focused;if(!a){var i=E(n);i?r!==i&&(r&&k(r,n),e||(e=r),r=Q._focused=t=i):t&&t===r&&(e&&!e.isInserted()&&(e=null),r=Q._focused=e,e=null,C())}r&&k(r,n)},f[n]=function(){a=!0},f[i]=function(e){var t=Q._focused;t&&o&&t._handleMouseEvent("mouseup",e),a=o=!1},X.add(c,f),X.add(s,{load:C});var d,p,h,g,v,m,y,b,w=!1,_=!1,x={doubleclick:"click",mousedrag:"mousemove"},O=!1,S={mousedown:{mousedown:1,mousedrag:1,click:1,doubleclick:1},mouseup:{mouseup:1,mousedrag:1,click:1,doubleclick:1},mousemove:{mousedrag:1,mousemove:1,mouseenter:1,mouseleave:1}};return{_viewEvents:l,_handleMouseEvent:function(e,t,n){var r=this._itemEvents,i=r.native[e],a="mousemove"===e,s=this._scope.tool,c=this;function u(e){return r.virtual[e]||c.responds(e)||s&&s.responds(e)}a&&o&&u("mousedrag")&&(e="mousedrag"),n||(n=this.getEventPoint(t));var l=this.getBounds().contains(n),f=i&&l&&c._project.hitTest(n,{tolerance:0,fill:!0,stroke:!0}),x=f&&f.item||null,S=!1,E={};if(E[e.substr(5)]=!0,i&&x!==g&&(g&&T(g,null,"mouseleave",t,n),x&&T(x,null,"mouseenter",t,n),g=x),O^l&&(T(this,null,l?"mouseenter":"mouseleave",t,n),l?this:null,S=!0),!l&&!E.drag||n.equals(p)||(j(this,x,a?e:"mousemove",t,n,p),S=!0),O=l,E.down&&l||E.up&&d){if(j(this,x,e,t,n,d),E.down){if(b=x===m&&Date.now()-y<300,h=m=x,!_&&x){for(var C=x;C&&!C.responds("mousedrag");)C=C._parent;C&&(v=x)}d=n}else E.up&&(_||x!==h||(y=Date.now(),j(this,x,b?"doubleclick":"click",t,n,d),b=!1),h=v=null);O=!1,S=!0}p=n,S&&s&&(w=s._handleMouseEvent(e,t,n,E)||w),!1!==t.cancelable&&(w&&!E.move||E.down&&u("mouseup"))&&t.preventDefault()},_handleKeyEvent:function(e,t,n,r){var i,o=this._scope,a=o.tool;function s(a){a.responds(e)&&(le=o,a.emit(e,i=i||new ee(e,t,n,r)))}this.isVisible()&&(s(this),a&&a.responds(e)&&s(a))},_countItemEvent:function(e,t){var n=this._itemEvents,r=n.native,i=n.virtual;for(var o in S)r[o]=(r[o]||0)+(S[o][e]||0)*t;i[e]=(i[e]||0)+t},statics:{updateFocus:C,_resetState:function(){o=a=w=O=!1,e=t=d=p=h=g=v=m=y=b=null}}}}function E(e){var t=X.getTarget(e);return t.getAttribute&&Q._viewsById[t.getAttribute("id")]}function C(){var e=Q._focused;if(!e||!e.isVisible())for(var n=0,r=Q._views.length;n<r;n++)if((e=Q._views[n]).isVisible()){Q._focused=t=e;break}}function k(e,t,n){e._handleMouseEvent("mousemove",t,n)}function T(e,t,n,r,i,o,a){var s,c=!1;function u(e,n){if(e.responds(n)){if(s||(s=new ne(n,r,i,t||e,o?i.subtract(o):null)),e.emit(n,s)&&(w=!0,s.prevented&&(_=!0),s.stopped))return c=!0}else{var a=x[n];if(a)return u(e,a)}}for(;e&&e!==a&&!u(e,n);)e=e._parent;return c}function j(e,t,n,r,i,o){return e._project.removeOn(n),_=w=!1,v&&T(v,null,n,r,i,o)||t&&t!==v&&!t.isDescendant(v)&&T(t,null,"mousedrag"===n?"mousemove":n,r,i,o,v)||T(e,v||t||e,n,r,i,o)}}),Y=Q.extend({_class:"CanvasView",initialize:function(e,t){if(!(t instanceof s.HTMLCanvasElement)){var n=b.read(arguments,1);if(n.isZero())throw new Error("Cannot create CanvasView with the provided argument: "+u.slice(arguments,1));t=ae.getCanvas(n)}var r=this._context=t.getContext("2d");if(r.save(),this._pixelRatio=1,!/^off|false$/.test(f.getAttribute(t,"hidpi"))){var i=s.devicePixelRatio||1,o=Z.getPrefixed(r,"backingStorePixelRatio")||1;this._pixelRatio=i/o}Q.call(this,e,t),this._needsUpdate=!0},remove:function e(){return this._context.restore(),e.base.call(this)},_setElementSize:function e(t,n){var r=this._pixelRatio;if(e.base.call(this,t*r,n*r),1!==r){var i=this._element,o=this._context;if(!f.hasAttribute(i,"resize")){var a=i.style;a.width=t+"px",a.height=n+"px"}o.restore(),o.save(),o.scale(r,r)}},getContext:function(){return this._context},getPixelSize:function e(t){var n,r=le.agent;if(r&&r.firefox)n=e.base.call(this,t);else{var i=this._context,o=i.font;i.font=t+" serif",n=parseFloat(i.font),i.font=o}return n},getTextWidth:function(e,t){var n=this._context,r=n.font,i=0;n.font=e;for(var o=0,a=t.length;o<a;o++)i=Math.max(i,n.measureText(t[o]).width);return n.font=r,i},update:function(){if(!this._needsUpdate)return!1;var e=this._project,t=this._context,n=this._viewSize;return t.clearRect(0,0,n.width+1,n.height+1),e&&e.draw(t,this._matrix,this._pixelRatio),this._needsUpdate=!1,!0}}),J=u.extend({_class:"Event",initialize:function(e){this.event=e,this.type=e&&e.type},prevented:!1,stopped:!1,preventDefault:function(){this.prevented=!0,this.event.preventDefault()},stopPropagation:function(){this.stopped=!0,this.event.stopPropagation()},stop:function(){this.stopPropagation(),this.preventDefault()},getTimeStamp:function(){return this.event.timeStamp},getModifiers:function(){return te.modifiers}}),ee=J.extend({_class:"KeyEvent",initialize:function(e,t,n,r){this.type=e,this.event=t,this.key=n,this.character=r},toString:function(){return"{ type: '"+this.type+"', key: '"+this.key+"', character: '"+this.character+"', modifiers: "+this.getModifiers()+" }"}}),te=new function(){var e,t,n={"\t":"tab"," ":"space","\b":"backspace","":"delete",Spacebar:"space",Del:"delete",Win:"meta",Esc:"escape"},r={tab:"\t",space:" ",enter:"\r"},i={},o={},l=new u({shift:!1,control:!1,alt:!1,meta:!1,capsLock:!1,space:!1}).inject({option:{get:function(){return this.alt}},command:{get:function(){var e=le&&le.agent;return e&&e.mac?this.meta:this.control}}});function f(e){var t=e.key||e.keyIdentifier;return t=/^U\+/.test(t)?String.fromCharCode(parseInt(t.substr(2),16)):/^Arrow[A-Z]/.test(t)?t.substr(5):"Unidentified"===t||t===a?String.fromCharCode(e.keyCode):t,n[t]||(t.length>1?u.hyphenate(t):t.toLowerCase())}function d(t,n,r,a){var s,c=Q._focused;if(i[n]=t,t?o[n]=r:delete o[n],n.length>1&&(s=u.camelize(n))in l){l[s]=t;var f=le&&le.agent;if("meta"===s&&f&&f.mac)if(t)e={};else{for(var p in e)p in o&&d(!1,p,e[p],a);e=null}}else t&&e&&(e[n]=r);c&&c._handleKeyEvent(t?"keydown":"keyup",a,n,r)}return X.add(c,{keydown:function(e){var n=f(e),i=le&&le.agent;n.length>1||i&&i.chrome&&(e.altKey||i.mac&&e.metaKey||!i.mac&&e.ctrlKey)?d(!0,n,r[n]||(n.length>1?"":n),e):t=n},keypress:function(e){if(t){var n=f(e),r=e.charCode,i=r>=32?String.fromCharCode(r):n.length>1?"":n;n!==t&&(n=i.toLowerCase()),d(!0,n,i,e),t=null}},keyup:function(e){var t=f(e);t in o&&d(!1,t,o[t],e)}}),X.add(s,{blur:function(e){for(var t in o)d(!1,t,o[t],e)}}),{modifiers:l,isDown:function(e){return!!i[e]}}},ne=J.extend({_class:"MouseEvent",initialize:function(e,t,n,r,i){this.type=e,this.event=t,this.point=n,this.target=r,this.delta=i},toString:function(){return"{ type: '"+this.type+"', point: "+this.point+", target: "+this.target+(this.delta?", delta: "+this.delta:"")+", modifiers: "+this.getModifiers()+" }"}}),re=J.extend({_class:"ToolEvent",_item:null,initialize:function(e,t,n){this.tool=e,this.type=t,this.event=n},_choosePoint:function(e,t){return e||(t?t.clone():null)},getPoint:function(){return this._choosePoint(this._point,this.tool._point)},setPoint:function(e){this._point=e},getLastPoint:function(){return this._choosePoint(this._lastPoint,this.tool._lastPoint)},setLastPoint:function(e){this._lastPoint=e},getDownPoint:function(){return this._choosePoint(this._downPoint,this.tool._downPoint)},setDownPoint:function(e){this._downPoint=e},getMiddlePoint:function(){return!this._middlePoint&&this.tool._lastPoint?this.tool._point.add(this.tool._lastPoint).divide(2):this._middlePoint},setMiddlePoint:function(e){this._middlePoint=e},getDelta:function(){return!this._delta&&this.tool._lastPoint?this.tool._point.subtract(this.tool._lastPoint):this._delta},setDelta:function(e){this._delta=e},getCount:function(){return this.tool[/^mouse(down|up)$/.test(this.type)?"_downCount":"_moveCount"]},setCount:function(e){this.tool[/^mouse(down|up)$/.test(this.type)?"downCount":"count"]=e},getItem:function(){if(!this._item){var e=this.tool._scope.project.hitTest(this.getPoint());if(e){for(var t=e.item,n=t._parent;/^(Group|CompoundPath)$/.test(n._class);)t=n,n=n._parent;this._item=t}}return this._item},setItem:function(e){this._item=e},toString:function(){return"{ type: "+this.type+", point: "+this.getPoint()+", count: "+this.getCount()+", modifiers: "+this.getModifiers()+" }"}}),ie=(d.extend({_class:"Tool",_list:"tools",_reference:"tool",_events:["onMouseDown","onMouseUp","onMouseDrag","onMouseMove","onActivate","onDeactivate","onEditOptions","onKeyDown","onKeyUp"],initialize:function(e){d.call(this),this._moveCount=-1,this._downCount=-1,this.set(e)},getMinDistance:function(){return this._minDistance},setMinDistance:function(e){this._minDistance=e,null!=e&&null!=this._maxDistance&&e>this._maxDistance&&(this._maxDistance=e)},getMaxDistance:function(){return this._maxDistance},setMaxDistance:function(e){this._maxDistance=e,null!=this._minDistance&&null!=e&&e<this._minDistance&&(this._minDistance=e)},getFixedDistance:function(){return this._minDistance==this._maxDistance?this._minDistance:null},setFixedDistance:function(e){this._minDistance=this._maxDistance=e},_handleMouseEvent:function(e,t,n,r){le=this._scope,r.drag&&!this.responds(e)&&(e="mousemove");var i=r.move||r.drag,o=this.responds(e),a=this.minDistance,s=this.maxDistance,c=!1,u=this;function l(e,t){var o=n,a=i?u._point:u._downPoint||o;if(i){if(u._moveCount>=0&&o.equals(a))return!1;if(a&&(null!=e||null!=t)){var s=o.subtract(a),c=s.getLength();if(c<(e||0))return!1;t&&(o=a.add(s.normalize(Math.min(c,t))))}u._moveCount++}return u._point=o,u._lastPoint=a||o,r.down&&(u._moveCount=-1,u._downPoint=o,u._downCount++),!0}function f(){o&&(c=u.emit(e,new re(u,e,t))||c)}if(r.down)l(),f();else if(r.up)l(null,s),f();else if(o)for(;l(a,s);)f();return c}}),u.extend(l,{_class:"Tween",statics:{easings:new u({linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:2*(2-e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}})},initialize:function e(t,n,r,i,o,a){this.object=t;var s=typeof o,c="function"===s;this.type=c?s:"string"===s?o:"linear",this.easing=c?o:e.easings[this.type],this.duration=i,this.running=!1,this._then=null,this._startTime=null;var u=n||r;this._keys=u?Object.keys(u):[],this._parsedKeys=this._parseKeys(this._keys),this._from=u&&this._getState(n),this._to=u&&this._getState(r),!1!==a&&this.start()},then:function(e){return this._then=e,this},start:function(){return this._startTime=null,this.running=!0,this},stop:function(){return this.running=!1,this},update:function(e){if(this.running){e>=1&&(e=1,this.running=!1);for(var t=this.easing(e),n=this._keys,r=function(n){return"function"==typeof n?n(t,e):n},i=0,o=n&&n.length;i<o;i++){var a=n[i],s=r(this._from[a]),c=r(this._to[a]),l=s&&c&&s.__add&&c.__add?c.__subtract(s).__multiply(t).__add(s):(c-s)*t+s;this._setProperty(this._parsedKeys[a],l)}this.responds("update")&&this.emit("update",new u({progress:e,factor:t})),!this.running&&this._then&&this._then(this.object)}return this},_events:{onUpdate:{}},_handleFrame:function(e){var t=this._startTime,n=t?(e-t)/this.duration:0;t||(this._startTime=e),this.update(n)},_getState:function(e){for(var t=this._keys,n={},r=0,i=t.length;r<i;r++){var o,a=t[r],s=this._parsedKeys[a],c=this._getProperty(s);if(e){var u=this._resolveValue(c,e[a]);this._setProperty(s,u),o=(o=this._getProperty(s))&&o.clone?o.clone():o,this._setProperty(s,c)}else o=c&&c.clone?c.clone():c;n[a]=o}return n},_resolveValue:function(e,t){if(t){if(Array.isArray(t)&&2===t.length){var n=t[0];return n&&n.match&&n.match(/^[+\-\*\/]=/)?this._calculate(e,n[0],t[1]):t}if("string"==typeof t){var r=t.match(/^[+\-*/]=(.*)/);if(r){var i=JSON.parse(r[1].replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": '));return this._calculate(e,t[0],i)}}}return t},_calculate:function(e,t,n){return le.PaperScript.calculateBinary(e,t,n)},_parseKeys:function(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n],o=i.replace(/\.([^.]*)/g,"/$1").replace(/\[['"]?([^'"\]]*)['"]?\]/g,"/$1");t[i]=o.split("/")}return t},_getProperty:function(e,t){for(var n=this.object,r=0,i=e.length-(t||0);r<i&&n;r++)n=n[e[r]];return n},_setProperty:function(e,t){var n=this._getProperty(e,1);n&&(n[e[e.length-1]]=t)}})),oe=function(e){var t=new o.XMLHttpRequest;return t.open((e.method||"get").toUpperCase(),e.url,u.pick(e.async,!0)),e.mimeType&&t.overrideMimeType(e.mimeType),t.onload=function(){var n=t.status;0===n||200===n?e.onLoad&&e.onLoad.call(t,t.responseText):t.onerror()},t.onerror=function(){var n=t.status,r='Could not load "'+e.url+'" (Status: '+n+")";if(!e.onError)throw new Error(r);e.onError(r,n)},t.send(null)},ae=u.exports.CanvasProvider={canvases:[],getCanvas:function(e,t){if(!s)return null;var n,r=!0;"object"==typeof e&&(t=e.height,e=e.width),this.canvases.length?n=this.canvases.pop():(n=c.createElement("canvas"),r=!1);var i=n.getContext("2d");if(!i)throw new Error("Canvas "+n+" is unable to provide a 2D context.");return n.width===e&&n.height===t?r&&i.clearRect(0,0,e+1,t+1):(n.width=e,n.height=t),i.save(),n},getContext:function(e,t){var n=this.getCanvas(e,t);return n?n.getContext("2d"):null},release:function(e){var t=e&&e.canvas?e.canvas:e;t&&t.getContext&&(t.getContext("2d").restore(),this.canvases.push(t))}},se=new function(){var e,t,n,r,i,o,a,s,c,l,f,d=Math.min,p=Math.max,h=Math.abs;function g(e,t,n){return.2989*e+.587*t+.114*n}function v(e,t,n,r){var i=r-g(e,t,n),o=(r=g(c=e+i,l=t+i,f=n+i),d(c,l,f)),a=p(c,l,f);if(o<0){var s=r-o;c=r+(c-r)*r/s,l=r+(l-r)*r/s,f=r+(f-r)*r/s}if(a>255){var u=255-r,h=a-r;c=r+(c-r)*u/h,l=r+(l-r)*u/h,f=r+(f-r)*u/h}}function m(e,t,n){return p(e,t,n)-d(e,t,n)}function y(e,t,n,r){var i,o=[e,t,n],a=p(e,t,n),s=d(e,t,n);i=0===d(s=s===e?0:s===t?1:2,a=a===e?0:a===t?1:2)?1===p(s,a)?2:1:0,o[a]>o[s]?(o[i]=(o[i]-o[s])*r/(o[a]-o[s]),o[a]=r):o[i]=o[a]=0,o[s]=0,c=o[0],l=o[1],f=o[2]}var b={multiply:function(){c=i*e/255,l=o*t/255,f=a*n/255},screen:function(){c=i+e-i*e/255,l=o+t-o*t/255,f=a+n-a*n/255},overlay:function(){c=i<128?2*i*e/255:255-2*(255-i)*(255-e)/255,l=o<128?2*o*t/255:255-2*(255-o)*(255-t)/255,f=a<128?2*a*n/255:255-2*(255-a)*(255-n)/255},"soft-light":function(){var r=e*i/255;c=r+i*(255-(255-i)*(255-e)/255-r)/255,l=(r=t*o/255)+o*(255-(255-o)*(255-t)/255-r)/255,f=(r=n*a/255)+a*(255-(255-a)*(255-n)/255-r)/255},"hard-light":function(){c=e<128?2*e*i/255:255-2*(255-e)*(255-i)/255,l=t<128?2*t*o/255:255-2*(255-t)*(255-o)/255,f=n<128?2*n*a/255:255-2*(255-n)*(255-a)/255},"color-dodge":function(){c=0===i?0:255===e?255:d(255,255*i/(255-e)),l=0===o?0:255===t?255:d(255,255*o/(255-t)),f=0===a?0:255===n?255:d(255,255*a/(255-n))},"color-burn":function(){c=255===i?255:0===e?0:p(0,255-255*(255-i)/e),l=255===o?255:0===t?0:p(0,255-255*(255-o)/t),f=255===a?255:0===n?0:p(0,255-255*(255-a)/n)},darken:function(){c=i<e?i:e,l=o<t?o:t,f=a<n?a:n},lighten:function(){c=i>e?i:e,l=o>t?o:t,f=a>n?a:n},difference:function(){(c=i-e)<0&&(c=-c),(l=o-t)<0&&(l=-l),(f=a-n)<0&&(f=-f)},exclusion:function(){c=i+e*(255-i-i)/255,l=o+t*(255-o-o)/255,f=a+n*(255-a-a)/255},hue:function(){y(e,t,n,m(i,o,a)),v(c,l,f,g(i,o,a))},saturation:function(){y(i,o,a,m(e,t,n)),v(c,l,f,g(i,o,a))},luminosity:function(){v(i,o,a,g(e,t,n))},color:function(){v(e,t,n,g(i,o,a))},add:function(){c=d(i+e,255),l=d(o+t,255),f=d(a+n,255)},subtract:function(){c=p(i-e,0),l=p(o-t,0),f=p(a-n,0)},average:function(){c=(i+e)/2,l=(o+t)/2,f=(a+n)/2},negation:function(){c=255-h(255-e-i),l=255-h(255-t-o),f=255-h(255-n-a)}},w=this.nativeModes=u.each(["source-over","source-in","source-out","source-atop","destination-over","destination-in","destination-out","destination-atop","lighter","darker","copy","xor"],(function(e){this[e]=!0}),{}),_=ae.getContext(1,1);_&&(u.each(b,(function(e,t){var n="darken"===t,r=!1;_.save();try{_.fillStyle=n?"#300":"#a00",_.fillRect(0,0,1,1),_.globalCompositeOperation=t,_.globalCompositeOperation===t&&(_.fillStyle=n?"#a00":"#300",_.fillRect(0,0,1,1),r=_.getImageData(0,0,1,1).data[0]!==n?170:51)}catch(e){}_.restore(),w[t]=r})),ae.release(_)),this.process=function(u,d,p,h,g){var v=d.canvas,m="normal"===u;if(m||w[u])p.save(),p.setTransform(1,0,0,1,0,0),p.globalAlpha=h,m||(p.globalCompositeOperation=u),p.drawImage(v,g.x,g.y),p.restore();else{var y=b[u];if(!y)return;for(var _=p.getImageData(g.x,g.y,v.width,v.height),x=_.data,O=d.getImageData(0,0,v.width,v.height).data,S=0,E=x.length;S<E;S+=4){e=O[S],i=x[S],t=O[S+1],o=x[S+1],n=O[S+2],a=x[S+2],r=O[S+3],s=x[S+3],y();var C=r*h/255,k=1-C;x[S]=C*c+k*i,x[S+1]=C*l+k*o,x[S+2]=C*f+k*a,x[S+3]=r*h+k*s}p.putImageData(_,g.x,g.y)}}},ce=new function(){var e="http://www.w3.org/2000/svg",t="http://www.w3.org/2000/xmlns",n="http://www.w3.org/1999/xlink",r={href:n,xlink:t,xmlns:t+"/","xmlns:xlink":t+"/"};function i(e,t,n){for(var i in t){var o=t[i],a=r[i];"number"==typeof o&&n&&(o=n.number(o)),a?e.setAttributeNS(a,i,o):e.setAttribute(i,o)}return e}return{svg:e,xmlns:t,xlink:n,create:function(t,n,r){return i(c.createElementNS(e,t),n,r)},get:function(e,t){var n=r[t],i=n?e.getAttributeNS(n,t):e.getAttribute(t);return"null"===i?null:i},set:i}},ue=u.each({fillColor:["fill","color"],fillRule:["fill-rule","string"],strokeColor:["stroke","color"],strokeWidth:["stroke-width","number"],strokeCap:["stroke-linecap","string"],strokeJoin:["stroke-linejoin","string"],strokeScaling:["vector-effect","lookup",{true:"none",false:"non-scaling-stroke"},function(e,t){return!t&&(e instanceof z||e instanceof j||e instanceof V)}],miterLimit:["stroke-miterlimit","number"],dashArray:["stroke-dasharray","array"],dashOffset:["stroke-dashoffset","number"],fontFamily:["font-family","string"],fontWeight:["font-weight","string"],fontSize:["font-size","number"],justification:["text-anchor","lookup",{left:"start",center:"middle",right:"end"}],opacity:["opacity","number"],blendMode:["mix-blend-mode","style"]},(function(e,t){var n=u.capitalize(t),r=e[2];this[t]={type:e[1],property:t,attribute:e[0],toSVG:r,fromSVG:r&&u.each(r,(function(e,t){this[e]=t}),{}),exportFilter:e[3],get:"get"+n,set:"set"+n}}),{});new function(){var e;function t(t,n,r){var i,o=new u,a=t.getTranslation();n&&(t.isInvertible()?(i=(t=t._shiftless())._inverseTransform(a),a=null):i=new m,o[r?"cx":"x"]=i.x,o[r?"cy":"y"]=i.y);if(!t.isIdentity()){var s=t.decompose();if(s){var c=[],l=s.rotation,f=s.scaling,d=s.skewing;a&&!a.isZero()&&c.push("translate("+e.point(a)+")"),l&&c.push("rotate("+e.number(l)+")"),g.isZero(f.x-1)&&g.isZero(f.y-1)||c.push("scale("+e.point(f)+")"),d.x&&c.push("skewX("+e.number(d.x)+")"),d.y&&c.push("skewY("+e.number(d.y)+")"),o.transform=c.join(" ")}else o.transform="matrix("+t.getValues().join(",")+")"}return o}function n(n,r){for(var i=t(n._matrix),o=n._children,a=ce.create("g",i,e),s=0,c=o.length;s<c;s++){var u=o[s],f=d(u,r);if(f)if(u.isClipMask()){var p=ce.create("clipPath");p.appendChild(f),l(u,p,"clip"),ce.set(a,{"clip-path":"url(#"+p.id+")"})}else a.appendChild(f)}return a}function r(n){var r=n._type,i=n._radius,o=t(n._matrix,!0,"rectangle"!==r);if("rectangle"===r){r="rect";var a=n._size,s=a.width,c=a.height;o.x-=s/2,o.y-=c/2,o.width=s,o.height=c,i.isZero()&&(i=null)}return i&&("circle"===r?o.r=i:(o.rx=i.width,o.ry=i.height)),ce.create(r,o,e)}var i,a={Group:n,Layer:n,Raster:function(n,r){var i=t(n._matrix,!0),o=n.getSize(),a=n.getImage();return i.x-=o.width/2,i.y-=o.height/2,i.width=o.width,i.height=o.height,i.href=0==r.embedImages&&a&&a.src||n.toDataURL(),ce.create("image",i,e)},Path:function(n,i){var o=i.matchShapes;if(o){var a=n.toShape(!1);if(a)return r(a)}var s,c=n._segments,u=c.length,l=t(n._matrix);if(o&&u>=2&&!n.hasHandles())if(u>2){s=n._closed?"polygon":"polyline";for(var f=[],d=0;d<u;d++)f.push(e.point(c[d]._point));l.points=f.join(" ")}else{s="line";var p=c[0]._point,h=c[1]._point;l.set({x1:p.x,y1:p.y,x2:h.x,y2:h.y})}else s="path",l.d=n.getPathData(null,i.precision);return ce.create(s,l,e)},Shape:r,CompoundPath:function(n,r){var i=t(n._matrix),o=n.getPathData(null,r.precision);return o&&(i.d=o),ce.create("path",i,e)},SymbolItem:function(n,r){var i=t(n._matrix,!0),o=n._definition,a=c(o,"symbol"),s=o._item,u=s.getStrokeBounds();return a||((a=ce.create("symbol",{viewBox:e.rectangle(u)})).appendChild(d(s,r)),l(o,a,"symbol")),i.href="#"+a.id,i.x+=u.x,i.y+=u.y,i.width=u.width,i.height=u.height,i.overflow="visible",ce.create("use",i,e)},PointText:function(n){var r=ce.create("text",t(n._matrix,!0),e);return r.textContent=n._content,r}};function s(t,n,r){var i={},o=!r&&t.getParent(),a=[];return null!=t._name&&(i.id=t._name),u.each(ue,(function(n){var r=n.get,s=n.type,f=t[r]();if(n.exportFilter?n.exportFilter(t,f):!o||!u.equals(o[r](),f)){if("color"===s&&null!=f){var d=f.getAlpha();d<1&&(i[n.attribute+"-opacity"]=d)}"style"===s?a.push(n.attribute+": "+f):i[n.attribute]=null==f?"none":"color"===s?f.gradient?function(t){var n=c(t,"color");if(!n){var r,i=t.getGradient(),o=i._radial,a=t.getOrigin(),s=t.getDestination();if(o){r={cx:a.x,cy:a.y,r:a.getDistance(s)};var u=t.getHighlight();u&&(r.fx=u.x,r.fy=u.y)}else r={x1:a.x,y1:a.y,x2:s.x,y2:s.y};r.gradientUnits="userSpaceOnUse",n=ce.create((o?"radial":"linear")+"Gradient",r,e);for(var f=i._stops,d=0,p=f.length;d<p;d++){var h=f[d],g=h._color,v=g.getAlpha(),m=h._offset;r={offset:null==m?d/(p-1):m},g&&(r["stop-color"]=g.toCSS(!0)),v<1&&(r["stop-opacity"]=v),n.appendChild(ce.create("stop",r,e))}l(t,n,"color")}return"url(#"+n.id+")"}(f):f.toCSS(!0):"array"===s?f.join(","):"lookup"===s?n.toSVG[f]:f}})),a.length&&(i.style=a.join(";")),1===i.opacity&&delete i.opacity,t._visible||(i.visibility="hidden"),ce.set(n,i,e)}function c(e,t){return i||(i={ids:{},svgs:{}}),e&&i.svgs[t+"-"+(e._id||e.__id||(e.__id=v.get("svg")))]}function l(e,t,n){i||c();var r=i.ids[n]=(i.ids[n]||0)+1;t.id=n+"-"+r,i.svgs[n+"-"+(e._id||e.__id)]=t}function f(e,t){var n=e,r=null;if(i){for(var a in n="svg"===e.nodeName.toLowerCase()&&e,i.svgs)r||(n||(n=ce.create("svg")).appendChild(e),r=n.insertBefore(ce.create("defs"),n.firstChild)),r.appendChild(i.svgs[a]);i=null}return t.asString?(new o.XMLSerializer).serializeToString(n):n}function d(e,t,n){var r=a[e._class],i=r&&r(e,t);if(i){var o=t.onExport;o&&(i=o(e,i,t)||i);var c=JSON.stringify(e._data);c&&"{}"!==c&&"null"!==c&&i.setAttribute("data-paper-data",c)}return i&&s(e,i,n)}function p(t){return t||(t={}),e=new h(t.precision),t}C.inject({exportSVG:function(e){return f(d(this,e=p(e),!0),e)}}),E.inject({exportSVG:function(n){n=p(n);var r=this._children,i=this.getView(),o=u.pick(n.bounds,"view"),a=n.matrix||"view"===o&&i._matrix,s=a&&O.read([a]),c="view"===o?new _([0,0],i.getViewSize()):"content"===o?C._getBounds(r,s,{stroke:!0}).rect:_.read([o],0,{readNull:!0}),l={version:"1.1",xmlns:ce.svg,"xmlns:xlink":ce.xlink};c&&(l.width=c.width,l.height=c.height,(c.x||0===c.x||c.y||0===c.y)&&(l.viewBox=e.rectangle(c)));var h=ce.create("svg",l,e),g=h;s&&!s.isIdentity()&&(g=h.appendChild(ce.create("g",t(s),e)));for(var v=0,m=r.length;v<m;v++)g.appendChild(d(r[v],n,!0));return f(h,n)}})},new function(){var e,t={};function n(t,n,r,i,o,a){var s=ce.get(t,n)||a,c=null==s?i?null:r?"":0:r?s:parseFloat(s);return/%\s*$/.test(s)?c/100*(o?1:e[/x|^width/.test(n)?"width":"height"]):c}function r(e,t,r,i,o,a,s){return t=n(e,t||"x",!1,i,o,a),r=n(e,r||"y",!1,i,o,s),!i||null!=t&&null!=r?new m(t,r):null}function i(e,t,r,i,o){return t=n(e,t||"width",!1,i,o),r=n(e,r||"height",!1,i,o),!i||null!=t&&null!=r?new b(t,r):null}function l(e,t,n){return"none"===e?null:"number"===t?parseFloat(e):"array"===t?e?e.split(/[\s,]+/g).map(parseFloat):[]:"color"===t?S(e)||e:"lookup"===t?n[e]:e}function f(e,t,n,r){var i=e.childNodes,o="clippath"===t,a="defs"===t,s=new k,c=s._project,u=c._currentStyle,l=[];if(o||a||(s=x(s,e,r),c._currentStyle=s._style.clone()),r)for(var f=e.querySelectorAll("defs"),d=0,p=f.length;d<p;d++)T(f[d],n,!1);for(d=0,p=i.length;d<p;d++){var h,g=i[d];1!==g.nodeType||/^defs$/i.test(g.nodeName)||!(h=T(g,n,!1))||h instanceof R||l.push(h)}return s.addChildren(l),o&&(s=x(s.reduce(),e,r)),c._currentStyle=u,(o||a)&&(s.remove(),s=null),s}function d(e,t){for(var n=e.getAttribute("points").match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g),r=[],i=0,o=n.length;i<o;i+=2)r.push(new m(parseFloat(n[i]),parseFloat(n[i+1])));var a=new B(r);return"polygon"===t&&a.closePath(),a}function p(e,i){var o,a=(n(e,"href",!0)||"").substring(1),s="radialgradient"===i;if(a)(o=t[a].getGradient())._radial^s&&((o=o.clone())._radial=s);else{for(var c=e.childNodes,u=[],l=0,f=c.length;l<f;l++){var d=c[l];1===d.nodeType&&u.push(x(new K,d))}o=new G(u,s)}var p,h,g,v="userSpaceOnUse"!==n(e,"gradientUnits",!0);return s?(h=(p=r(e,"cx","cy",!1,v,"50%","50%")).add(n(e,"r",!1,!1,v,"50%"),0),g=r(e,"fx","fy",!0,v)):(p=r(e,"x1","y1",!1,v,"0%","0%"),h=r(e,"x2","y2",!1,v,"100%","0%")),x(new q(o,p,h,g),e)._scaleToBounds=v,null}var h={"#document":function(e,t,n,r){for(var i=e.childNodes,o=0,a=i.length;o<a;o++){var s=i[o];if(1===s.nodeType)return T(s,n,r)}},g:f,svg:f,clippath:f,polygon:d,polyline:d,path:function(e){return z.create(e.getAttribute("d"))},lineargradient:p,radialgradient:p,image:function(e){var t=new P(n(e,"href",!0));return t.on("load",(function(){var t=i(e);this.setSize(t);var n=r(e).add(t.divide(2));this._matrix.append((new O).translate(n))})),t},symbol:function(e,t,n,r){return new R(f(e,t,n,r),!0)},defs:f,use:function(e){var i=(n(e,"href",!0)||"").substring(1),o=t[i],a=r(e);return o?o instanceof R?o.place(a):o.clone().translate(a):null},circle:function(e){return new j.Circle(r(e,"cx","cy"),n(e,"r"))},ellipse:function(e){return new j.Ellipse({center:r(e,"cx","cy"),radius:i(e,"rx","ry")})},rect:function(e){return new j.Rectangle(new _(r(e),i(e)),i(e,"rx","ry"))},line:function(e){return new B.Line(r(e,"x1","y1"),r(e,"x2","y2"))},text:function(e){var t=new U(r(e).add(r(e,"dx","dy")));return t.setContent(e.textContent.trim()||""),t},switch:f};function g(e,t,n,r){if(e.transform){for(var i=(r.getAttribute(n)||"").split(/\)\s*/g),o=new O,a=0,s=i.length;a<s;a++){var c=i[a];if(!c)break;for(var u=c.split(/\(\s*/),l=u[0],f=u[1].split(/[\s,]+/g),d=0,p=f.length;d<p;d++)f[d]=parseFloat(f[d]);switch(l){case"matrix":o.append(new O(f[0],f[1],f[2],f[3],f[4],f[5]));break;case"rotate":o.rotate(f[0],f[1]||0,f[2]||0);break;case"translate":o.translate(f[0],f[1]||0);break;case"scale":o.scale(f);break;case"skewX":o.skew(f[0],0);break;case"skewY":o.skew(0,f[0])}}e.transform(o)}}function v(e,t,n){var r="fill-opacity"===n?"getFillColor":"getStrokeColor",i=e[r]&&e[r]();i&&i.setAlpha(parseFloat(t))}var y=u.set(u.each(ue,(function(e){this[e.attribute]=function(t,n){if(t[e.set]&&(t[e.set](l(n,e.type,e.fromSVG)),"color"===e.type)){var r=t[e.get]();if(r&&r._scaleToBounds){var i=t.getBounds();r.transform((new O).translate(i.getPoint()).scale(i.getSize()))}}}}),{}),{id:function(e,n){t[n]=e,e.setName&&e.setName(n)},"clip-path":function(e,t){var n=S(t);if(n){if((n=n.clone()).setClipMask(!0),!(e instanceof k))return new k(n,e);e.insertChild(0,n)}},gradientTransform:g,transform:g,"fill-opacity":v,"stroke-opacity":v,visibility:function(e,t){e.setVisible&&e.setVisible("visible"===t)},display:function(e,t){e.setVisible&&e.setVisible(null!==t)},"stop-color":function(e,t){e.setColor&&e.setColor(t)},"stop-opacity":function(e,t){e._color&&e._color.setAlpha(parseFloat(t))},offset:function(e,t){if(e.setOffset){var n=t.match(/(.*)%$/);e.setOffset(n?n[1]/100:parseFloat(t))}},viewBox:function(e,t,n,r,o){var a,s=new _(l(t,"array")),c=i(r,null,null,!0);if(e instanceof k){var u=c?c.divide(s.getSize()):1,f=(new O).scale(u).translate(s.getPoint().negate());a=e}else e instanceof R&&(c&&s.setSize(c),a=e._item);if(a){if("visible"!==w(r,"overflow",o)){var d=new j.Rectangle(s);d.setClipMask(!0),a.addChild(d)}f&&a.transform(f)}}});function w(e,t,n){var r=e.attributes[t],i=r&&r.value;if(!i&&e.style){var o=u.camelize(t);(i=e.style[o])||n.node[o]===n.parent[o]||(i=n.node[o])}return i?"none"===i?null:i:a}function x(e,t,n){var r=t.parentNode,i={node:Z.getStyles(t)||{},parent:!n&&!/^defs$/i.test(r.tagName)&&Z.getStyles(r)||{}};return u.each(y,(function(n,r){var o=w(t,r,i);e=o!==a&&n(e,o,r,t,i)||e})),e}function S(e){var n=e&&e.match(/\((?:["'#]*)([^"')]+)/),r=n&&n[1],i=r&&t[s?r.replace(s.location.href.split("#")[0]+"#",""):r];return i&&i._scaleToBounds&&((i=i.clone())._scaleToBounds=!0),i}function T(n,r,o){var a,s,l,f=n.nodeName.toLowerCase(),d="#document"!==f,p=c.body;o&&d&&(e=le.getView().getSize(),e=i(n,null,null,!0)||e,a=ce.create("svg",{style:"stroke-width: 1px; stroke-miterlimit: 10"}),s=n.parentNode,l=n.nextSibling,a.appendChild(n),p.appendChild(a));var g=le.settings,v=g.applyMatrix,m=g.insertItems;g.applyMatrix=!1,g.insertItems=!1;var y=h[f],b=y&&y(n,f,r,o)||null;if(g.insertItems=m,g.applyMatrix=v,b){!d||b instanceof k||(b=x(b,n,o));var w=r.onImport,_=d&&n.getAttribute("data-paper-data");w&&(b=w(n,b,r)||b),r.expandShapes&&b instanceof j&&(b.remove(),b=b.toPath()),_&&(b._data=JSON.parse(_))}return a&&(p.removeChild(a),s&&(l?s.insertBefore(n,l):s.appendChild(n))),o&&(t={},b&&u.pick(r.applyMatrix,v)&&b.matrix.apply(!0,!0)),b}function I(e,t,n){if(!e)return null;t="function"==typeof t?{onLoad:t}:t||{};var r=le,i=null;function s(s){try{var c="object"==typeof s?s:(new o.DOMParser).parseFromString(s.trim(),"image/svg+xml");if(!c.nodeName)throw c=null,new Error("Unsupported SVG source: "+e);le=r,i=T(c,t,!0),t&&!1===t.insert||n._insertItem(a,i);var l=t.onLoad;l&&l(i,s)}catch(e){u(e)}}function u(e,n){var r=t.onError;if(!r)throw new Error(e);r(e,n)}if("string"!=typeof e||/^[\s\S]*</.test(e)){if("undefined"!=typeof File&&e instanceof File){var l=new FileReader;return l.onload=function(){s(l.result)},l.onerror=function(){u(l.error)},l.readAsText(e)}s(e)}else{var f=c.getElementById(e);f?s(f):oe({url:e,async:!0,onLoad:s,onError:u})}return i}C.inject({importSVG:function(e,t){return I(e,t,this)}}),E.inject({importSVG:function(e,t){return this.activate(),I(e,t,this)}})};var le=new(f.inject(u.exports,{Base:u,Numerical:g,Key:te,DomEvent:X,DomElement:Z,document:c,window:s,Symbol:R,PlacedSymbol:I}));return le.agent.node&&n(607)(le),(i="function"==typeof(r=le)?r.call(t,n,t,e):r)===a||(e.exports=i),le}).call(this,"object"==typeof self?self:null)},function(e,t,n){"use strict";e.exports=n(939)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(940);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?g(e):t}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}var y,b,w,_=function(e){d(n,r.Component);var t=m(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).path=void 0,e}return n}();_.defaultProps={onKeyDown:function(){},onKeyUp:function(){},onMouseDown:function(){},onMouseDrag:function(){},onMouseUp:function(){},onPathInit:function(){},onPathAdd:function(){},onSegmentAdd:function(){},onSegmentRemove:function(){}};var x,O,S,E,C,k,T,j,P,I,R,A,M,D,N,L,z,B,F=i.Tool,W=(0,i.PaperScope)((w=b=function(e){d(n,_);var t=m(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onMouseDown=function(t){var n=e.props,r=n.pathProps,i=n.onMouseDown,o=n.onPathInit,a=n.paper;if(0===t.event.button){var s=new a.Path(r);e.path=s,o(s)}i(t)},e.onMouseDrag=function(t){var n=e.props.onMouseDrag;1===t.event.buttons&&e.path.add(t.point),n(t)},e.onMouseUp=function(t){var n=g(e).path,r=e.props,i=r.onMouseUp,o=r.onPathAdd;n&&(o(n),e.path=null),i(t)},e}return s(n,[{key:"render",value:function(){var e=this.props,t=(e.pathProps,e.onMouseDown,e.onMouseDrag,e.onMouseUp,e.onPathAdd,e.paper,e.innerRef),n=h(e,["pathProps","onMouseDown","onMouseDrag","onMouseUp","onPathAdd","paper","innerRef"]);return r.createElement(F,u({ref:t,minDistance:10,onMouseDown:this.onMouseDown,onMouseDrag:this.onMouseDrag,onMouseUp:this.onMouseUp},n))}}]),n}(),b.defaultProps=f(f({},_.defaultProps),{},{pathProps:{strokeColor:"black"}}),y=w))||y,H=r.forwardRef((function(e,t){return r.createElement(W,u({innerRef:t},e))})),V=i.Layer,U=i.Group,q=i.Line,G=function(e){for(var t=e.width,n=e.height,i=e.top,o=void 0===i?0:i,a=e.left,s=void 0===a?0:a,c=e.right,u=void 0===c?s+t:c,l=e.bottom,f=void 0===l?o+n:l,d=e.cellSize,p=void 0===d?50:d,h=e.strokeColor,g=void 0===h?"#D0D0D0":h,v=e.strokeWidth,m=void 0===v?1:v,y=e.innerRef,b=Math.ceil(s/p)*p,w=Math.ceil(o/p)*p,_=Math.ceil((u-s)/p),x=Math.ceil((f-o)/p),O=[],S=[],E=0;E<=_;E+=1){var C=b+E*p;O.push(r.createElement(q,{key:E,from:[C,o],to:[C,f],strokeColor:g,strokeWidth:m}))}for(var k=0;k<=x;k+=1){var T=w+k*p;S.push(r.createElement(q,{key:k,from:[s,T],to:[u,T],strokeColor:g,strokeWidth:m}))}return r.createElement(V,{ref:y},r.createElement(U,null,O),r.createElement(U,null,S))},K=r.forwardRef((function(e,t){return r.createElement(G,u({innerRef:t},e))})),$=i.Tool,Z=(0,i.PaperScope)((S=O=function(e){d(n,_);var t=m(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onMouseDown=function(t){var n=e.props,r=n.pathProps,i=n.onMouseDown,o=n.onPathInit,a=n.paper;if(0===t.event.button){var s=new a.Path(r);s.add(t.point),e.path=s,o(s)}i(t)},e.onMouseDrag=function(t){var n=g(e).path,r=e.props.onMouseDrag;1===t.event.buttons&&(n.removeSegment(1),n.addSegment(t.point),n.selected=!0),r(t)},e.onMouseUp=function(t){var n=g(e).path,r=e.props,i=r.onMouseUp,o=r.onPathAdd;n&&(n.selected=!1,o(n),e.path=null),i(t)},e}return s(n,[{key:"render",value:function(){var e=this.props,t=(e.pathProps,e.onMouseDown,e.onMouseDrag,e.onMouseUp,e.onPathAdd,e.innerRef),n=h(e,["pathProps","onMouseDown","onMouseDrag","onMouseUp","onPathAdd","innerRef"]);return r.createElement($,u({ref:t,onMouseDown:this.onMouseDown,onMouseDrag:this.onMouseDrag,onMouseUp:this.onMouseUp},n))}}]),n}(),O.defaultProps=f(f({},_.defaultProps),{},{pathProps:{strokeColor:"black"}}),x=S))||x,X=r.forwardRef((function(e,t){return r.createElement(Z,u({innerRef:t},e))})),Q=i.Tool,Y=(0,i.PaperScope)((k=C=function(e){d(n,_);var t=m(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onMouseDown=function(t){if(0===t.event.button){var n=g(e).path;n||(e.pathInit(),e.props.onPathInit(n)),null==e.selectedSegment?e.onSegmentAdd(t):e.onPathAdd()}e.props.onMouseDown(t)},e.points=void 0,e.selectedSegment=void 0,e}return s(n,[{key:"componentDidUpdate",value:function(){var e=this.path,t=this.points,n=this.props,r=n.pathProps,i=n.pathData;e?(this.setPathData(i),Object.assign(e,r)):t&&this.pathInit()}},{key:"pathInit",value:function(){var e=this.props,t=e.pathProps,n=e.pathData,r=new(0,e.paper.Path)(t);this.path=r,this.setPathData(n)}},{key:"setPathData",value:function(e){var t=this,n=this.path;this.removeBounds(),n.pathData=e,n.segments.forEach((function(e){return t.createBounds(e)}))}},{key:"onSegmentAdd",value:function(e){var t=this.path;t.add(e.point);var n=t.lastSegment;this.createBounds(n),this.props.onSegmentAdd(n,t)}},{key:"onPathAdd",value:function(){var e=this.selectedSegment,t=this.path,n=this.points,r=this.props,i=r.onSegmentRemove,o=r.onPathAdd,a=e.index,s=t.removeSegments(0,a);s.length&&i(s,t),t.closed=!0,t.selected=!1,o(t),this.path=null,this.selectedSegment=null,n&&n.remove()}},{key:"createBounds",value:function(e){var t=this,n=this.props.paper,r=n.Path,i=n.Group,o=n.project,a=this.path;this.points||(this.points=new i,o.layers.$$metadata.addChild(this.points));var s=new r.Circle({center:e.point,radius:7,fillColor:"white",opacity:0});s.on("mousedown",(function(){a.closed||a.lastSegment.point.equals(s.position)||!a.contains(s.position)||(t.selectedSegment=e)})),this.points.addChild(s)}},{key:"removeBounds",value:function(){this.points&&(this.points.remove(),this.points=null)}},{key:"render",value:function(){var e=this.props,t=(e.pathProps,e.onMouseDown,e.onPathAdd,e.onSegmentAdd,e.onSegmentRemove,e.paper,e.innerRef),n=h(e,["pathProps","onMouseDown","onPathAdd","onSegmentAdd","onSegmentRemove","paper","innerRef"]);return r.createElement(Q,u({ref:t,onMouseDown:this.onMouseDown},n))}}]),n}(),C.defaultProps=f(f({},_.defaultProps),{},{pathProps:{strokeColor:"black",selected:!0}}),E=k))||E,J=r.forwardRef((function(e,t){return r.createElement(Y,u({innerRef:t},e))})),ee=i.Tool,te=(0,i.PaperScope)((P=j=function(e){d(n,_);var t=m(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onMouseDown=function(t){var n=e.props,r=n.pathProps,i=n.onMouseDown,o=n.onPathInit,a=n.paper;if(0===t.event.button){var s=a.Path,c=a.Color,u=t.point,l=new s.Rectangle({point:u,size:[1,1],fillColor:r.selectedFillColor||new c(.9,.9,1,.75),selected:!0});e.path=l,e.start=u,o(l)}i(t)},e.onMouseDrag=function(t){var n=e.props.onMouseDrag;if(1===t.event.buttons){var r=g(e),i=r.path,o=r.start,a=i.bounds,s=t.point.subtract(o),c=Math.abs(s.x),u=Math.abs(s.y);s.x<0?(a.left=t.point.x,a.right=o.x):a.left=o.x,s.y>0?(a.top=o.y,a.bottom=t.point.y):a.top=t.point.y,c>0&&(a.width=c),u>0&&(a.height=u)}n(t)},e.onMouseUp=function(t){var n=g(e).path,r=e.props,i=r.pathProps,o=r.onMouseUp,a=r.onPathAdd;n&&(Object.assign(n,f({selected:!1},i)),a(n),e.path=null,e.start=null),o(t)},e.start=void 0,e}return s(n,[{key:"render",value:function(){var e=this.props,t=e.innerRef,n=h(e,["innerRef"]);return r.createElement(ee,u({},n,{ref:t,onMouseDown:this.onMouseDown,onMouseDrag:this.onMouseDrag,onMouseUp:this.onMouseUp}))}}]),n}(),j.defaultProps=f(f({},_.defaultProps),{},{pathProps:{fillColor:"white",strokeColor:"black"}}),T=P))||T,ne=r.forwardRef((function(e,t){return r.createElement(te,u({innerRef:t},e))})),re=i.Tool,ie=(0,i.PaperScope)((A=R=function(e){d(n,_);var t=m(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onMouseDown=function(t){var n=e.props,r=n.pathProps,i=n.onMouseDown,o=n.onPathInit,a=n.paper;if(0===t.event.button){var s=a.Path,c=a.Color,u=new s.Circle({center:t.point,radius:1,fillColor:r.selectedFillColor||new c(.9,.9,1,.75),selected:!0});e.path=u,o(u)}i(t)},e.onMouseDrag=function(t){var n=e.props.onMouseDrag;if(1===t.event.buttons){var r=g(e).path;r.scale(t.point.getDistance(r.position)/(r.bounds.width/2))}n(t)},e.onMouseUp=function(t){var n=g(e).path,r=e.props,i=r.pathProps,o=r.onMouseUp,a=r.onPathAdd;n&&(Object.assign(n,f({selected:!1},i)),a(n),e.path=null),o(t)},e}return s(n,[{key:"render",value:function(){var e=this.props,t=e.innerRef,n=h(e,["innerRef"]);return r.createElement(re,u({ref:t},n,{onMouseDown:this.onMouseDown,onMouseDrag:this.onMouseDrag,onMouseUp:this.onMouseUp}))}}]),n}(),R.defaultProps=f(f({},_.defaultProps),{},{pathProps:{fillColor:"white",strokeColor:"black"}}),I=A))||I,oe=r.forwardRef((function(e,t){return r.createElement(ie,u({innerRef:t},e))})),ae=i.Tool,se=(0,i.PaperScope)((N=D=function(e){d(n,_);var t=m(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onKeyUp=function(){var t=g(e),n=t.path,r=t.onPathAdd;n&&(n.segments.length>1?r():(n.remove(),e.path=null))},e.onMouseDown=function(t){var n=g(e).path;0===t.event.button&&t.modifiers.shift&&(n||(e.pathInit(),e.props.onPathInit(n)),e.onSegmentAdd(t)),e.props.onMouseDown(t)},e.onPathAdd=function(){var t=g(e).path,n=e.props.onPathAdd;t.selected=!1,n(t),e.path=null},e}return s(n,[{key:"pathInit",value:function(){var e=this.props,t=e.pathProps,n=e.pathData,r=new(0,e.paper.Path)(t);this.path=r,this.setPathData(n)}},{key:"setPathData",value:function(e){this.path.pathData=e}},{key:"onSegmentAdd",value:function(e){var t=this.path;t.add(e.point),this.props.onSegmentAdd(t.lastSegment,t)}},{key:"render",value:function(){var e=this.props,t=(e.pathProps,e.onKeyUp,e.onMouseDown,e.onPathAdd,e.onSegmentAdd,e.onSegmentRemove,e.paper,e.innerRef),n=h(e,["pathProps","onKeyUp","onMouseDown","onPathAdd","onSegmentAdd","onSegmentRemove","paper","innerRef"]);return r.createElement(ae,u({ref:t,onKeyUp:this.onKeyUp,onMouseDown:this.onMouseDown},n))}}]),n}(),D.defaultProps=f(f({},_.defaultProps),{},{pathProps:{strokeColor:"black",selected:!0}}),M=N))||M,ce=r.forwardRef((function(e,t){return r.createElement(se,u({innerRef:t},e))})),ue=i.PaperScope,le=i.getProps;function fe(e,t){return(10*e+10*t)/10}function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return function(t){return e.forEach((function(e){return e&&e(t)}))}}var pe,he,ge,ve=ue((B=z=function(e){d(n,r.Component);var t=m(n);function n(e){var r;return o(this,n),(r=t.call(this,e)).onWheel=function(e){var t=e.deltaY,n=r.props,i=n.onZoom;(0,n.mergeProps)((function(e,n){var r=e.viewProps.zoom;return t<0?(r=fe(r,.1),i&&i(r),{viewProps:f(f(f({},n.viewProps),e.viewProps),{},{zoom:r})}):t>0&&r>.1?(r=fe(r,-.1),i&&i(r),{viewProps:f(f(f({},n.viewProps),e.viewProps),{},{zoom:r})}):null}))},r.onKeyDown=function(e){var t=e.key,n=r.state.draggable;if("space"===t&&!n){var i=r.props,o=i.onPanEnabled;(0,i.mergeProps)((function(e,t){return f(f({},e),{},{canvasProps:f(f(f({},t.canvasProps),e.canvasProps),{},{"drag-state":"enabled"})})})),r.setState({draggable:!0}),o&&o()}},r.onKeyUp=function(e){if("space"===e.key){var t=r.props,n=t.onPanDisabled;(0,t.mergeProps)((function(e,t){return f(f({},e),{},{canvasProps:f(f(f({},t.canvasProps),e.canvasProps),{},{"drag-state":"disabled"})})})),r.setState({draggable:!1}),n&&n()}},r.onMouseDown=function(e){var t=e.point,n=r.state,i=n.draggable,o=n.dragStart;i&&!o&&((0,r.props.mergeProps)((function(e,t){return f(f({},e),{},{canvasProps:f(f(f({},t.canvasProps),e.canvasProps),{},{"drag-state":"dragging"})})})),r.setState({dragStart:t}))},r.onMouseUp=function(){var e=r.state,t=e.dragStart,n=e.draggable;t&&(n&&(0,r.props.mergeProps)((function(e,t){return f(f({},e),{},{canvasProps:f(f(f({},t.canvasProps),e.canvasProps),{},{"drag-state":"enabled"})})})),r.setState({dragStart:null}))},r.onMouseDrag=function(e){var t=e.point,n=r.props,i=n.mergeProps,o=n.paper,a=r.state,s=a.draggable,c=a.dragStart;i((function(e,n){return c?{viewProps:f(f(f({},n.viewProps),e.viewProps),{},{center:o.view.center.add(t.subtract(c).multiply(.5))})}:null})),s&&r.setState({dragStart:t})},r.state={draggable:!1,dragStart:null},r}return s(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.paper,r=t.zoomLevel,i=t.center;(0,t.mergeProps)((function(t,o){var a=le(n,o.canvasProps),s=a.onWheel,c=h(a,["onWheel"]),u=le(n,o.viewProps),l=u.onKeyDown,d=u.onKeyUp,p=u.onMouseDown,g=u.onMouseDrag,v=u.onMouseUp,m=h(u,["onKeyDown","onKeyUp","onMouseDown","onMouseDrag","onMouseUp"]);return{canvasProps:f(f({},c),{},{onWheel:de([s,e.onWheel]),"drag-state":"disabled"}),viewProps:f(f({},m),{},{onKeyDown:de([l,e.onKeyDown]),onKeyUp:de([d,e.onKeyUp]),onMouseDown:de([p,e.onMouseDown]),onMouseDrag:de([g,e.onMouseDrag]),onMouseUp:de([v,e.onMouseUp]),zoom:r,center:i})}}))}},{key:"render",value:function(){return this.props.children}}]),n}(),z.defaultProps={zoomLevel:1,onPanEnabled:function(){},onPanDisabled:function(){},onZoom:function(){}},L=B))||L,me=i.Tool,ye=(0,i.PaperScope)((ge=he=function(e){d(n,_);var t=m(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onMouseDown=function(t){var n=e.props,r=n.pathProps,i=n.onMouseDown,o=n.onPathInit,a=n.paper;if(0===t.event.button){var s=a.Path,c=a.Color,u=t.point,l=new s.Ellipse({point:u,size:[1,1],fillColor:r.selectedFillColor||new c(.9,.9,1,.75),selected:!0});e.path=l,e.start=u,o(e.path)}i(t)},e.onMouseDrag=function(t){var n=e.props.onMouseDrag;if(1===t.event.buttons){var r=g(e),i=r.path,o=r.start,a=i.bounds,s=t.point.subtract(o),c=Math.abs(s.x),u=Math.abs(s.y);s.x<0?(a.left=t.point.x,a.right=o.x):a.left=o.x,s.y>0?(a.top=o.y,a.bottom=t.point.y):a.top=t.point.y,c>0&&(a.width=c),u>0&&(a.height=u)}n(t)},e.onMouseUp=function(t){var n=g(e).path,r=e.props,i=r.pathProps,o=r.onMouseUp,a=r.onPathAdd;n&&(Object.assign(n,f({selected:!1},i)),a(n),e.path=null,e.start=null),o(t)},e.start=void 0,e}return s(n,[{key:"render",value:function(){var e=this.props,t=e.innerRef,n=h(e,["innerRef"]);return r.createElement(me,u({},n,{ref:t,onMouseDown:this.onMouseDown,onMouseDrag:this.onMouseDrag,onMouseUp:this.onMouseUp}))}}]),n}(),he.defaultProps=f(f({},_.defaultProps),{},{pathProps:{fillColor:"white",strokeColor:"black"}}),pe=ge))||pe,be=r.forwardRef((function(e,t){return r.createElement(ye,u({innerRef:t},e))}));t.CircleTool=oe,t.EllipseTool=be,t.FreeformPathTool=H,t.Grid=K,t.LineTool=X,t.PanAndZoom=ve,t.PathTool=_,t.PolygonTool=J,t.RectangleTool=ne,t.SegmentPathTool=ce},function(e,t,n){"use strict";e.exports=n(941)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r,i,o=n(0),a=(r=o)&&"object"==typeof r&&"default"in r?r.default:r,s=n(435);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?y(e):t}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b(this,n)}}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O={Tool:"Tool",Layer:"Layer",Group:"Group",Path:"Path",Line:"Line",Rectangle:"Rectangle",Circle:"Circle",PointText:"PointText"},S=h({PaperScope:"PaperScope"},O),E=(f(i={},S.PaperScope,(function(e,t){return new t.PaperScope})),f(i,S.Tool,(function(e,t){return new t.Tool(e)})),f(i,S.Layer,(function(e,t){return new t.Layer(e)})),f(i,S.Group,(function(e,t){return new t.Group(e)})),f(i,S.Path,(function(e,t){return new t.Path(e)})),f(i,S.Line,(function(e,t){return new t.Path.Line(e)})),f(i,S.Rectangle,(function(e,t){return new t.Path.Rectangle(e)})),f(i,S.Circle,(function(e,t){return new t.Path.Circle(e)})),f(i,S.PointText,(function(e,t,n){return new t.PointText(h(h({},e),{},{content:n}))})),i),C=Object.entries(O).reduce((function(e,t){var n=_(t,2),r=n[0],i=n[1];return h(h({},e),{},f({},r,o.forwardRef((function(e,t){return o.createElement(i,d({ref:t},e))}))))}),{}),k=C.Tool,T=C.Layer,j=C.Group,P=C.Path,I=C.Line,R=C.Rectangle,A=C.Circle,M=C.PointText,D=a.createContext();function N(e,t){return e===t}function L(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N,n=null,r=null;return function(){return L(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}!function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r]}(z);var B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function F(e,t){return e(t={exports:{}},t.exports),t.exports
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/}var W=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;function U(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var q=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=U(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))H.call(n,a)&&(i[a]=n[a]);if(W){r=W(n);for(var s=0;s<r.length;s++)V.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},G=F((function(e,t){var n,r,i,o,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,c=null,u=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(u,0),e}},l=Date.now();t.unstable_now=function(){return Date.now()-l},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(u,0))},r=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},o=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,p=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var g=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var v=d.now();t.unstable_now=function(){return d.now()-v}}var m=!1,y=null,b=-1,w=5,_=0;o=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,O=x.port2;x.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();_=e+w;try{y(!0,e)?O.postMessage(null):(m=!1,y=null)}catch(e){throw O.postMessage(null),e}}else m=!1},n=function(e){y=e,m||(m=!0,O.postMessage(null))},r=function(e,n){b=p((function(){e(t.unstable_now())}),n)},i=function(){h(b),b=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<k(i,t)))break e;e[r]=t,e[n]=i,n=r}}function E(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,c=e[s];if(void 0!==a&&0>k(a,n))void 0!==c&&0>k(c,a)?(e[r]=c,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==c&&0>k(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],j=[],P=1,I=null,R=3,A=!1,M=!1,D=!1;function N(e){for(var t=E(j);null!==t;){if(null===t.callback)C(j);else{if(!(t.startTime<=e))break;C(j),t.sortIndex=t.expirationTime,S(T,t)}t=E(j)}}function L(e){if(D=!1,N(e),!M)if(null!==E(T))M=!0,n(z);else{var t=E(j);null!==t&&r(L,t.startTime-e)}}function z(e,n){M=!1,D&&(D=!1,i()),A=!0;var a=R;try{for(N(n),I=E(T);null!==I&&(!(I.expirationTime>n)||e&&!o());){var s=I.callback;if(null!==s){I.callback=null,R=I.priorityLevel;var c=s(I.expirationTime<=n);n=t.unstable_now(),"function"==typeof c?I.callback=c:I===E(T)&&C(T),N(n)}else C(T);I=E(T)}if(null!==I)var u=!0;else{var l=E(j);null!==l&&r(L,l.startTime-n),u=!1}return u}finally{I=null,R=a,A=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){M||A||(M=!0,n(z))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return E(T)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,o,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var c=a.delay;c="number"==typeof c&&0<c?s+c:s,a="number"==typeof a.timeout?a.timeout:B(e)}else a=B(e),c=s;return e={id:P++,callback:o,priorityLevel:e,startTime:c,expirationTime:a=c+a,sortIndex:-1},c>s?(e.sortIndex=c,S(j,e),null===E(T)&&e===E(j)&&(D?i():D=!0,r(L,c-s))):(e.sortIndex=a,S(T,e),M||A||(M=!0,n(z))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();N(e);var n=E(T);return n!==I&&null!==I&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<I.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}})),K=(G.unstable_now,G.unstable_forceFrameRate,G.unstable_IdlePriority,G.unstable_ImmediatePriority,G.unstable_LowPriority,G.unstable_NormalPriority,G.unstable_Profiling,G.unstable_UserBlockingPriority,G.unstable_cancelCallback,G.unstable_continueExecution,G.unstable_getCurrentPriorityLevel,G.unstable_getFirstCallbackNode,G.unstable_next,G.unstable_pauseExecution,G.unstable_requestPaint,G.unstable_runWithPriority,G.unstable_scheduleCallback,G.unstable_shouldYield,G.unstable_wrapCallback,F((function(e,t){}))),$=(K.unstable_now,K.unstable_forceFrameRate,K.unstable_IdlePriority,K.unstable_ImmediatePriority,K.unstable_LowPriority,K.unstable_NormalPriority,K.unstable_Profiling,K.unstable_UserBlockingPriority,K.unstable_cancelCallback,K.unstable_continueExecution,K.unstable_getCurrentPriorityLevel,K.unstable_getFirstCallbackNode,K.unstable_next,K.unstable_pauseExecution,K.unstable_requestPaint,K.unstable_runWithPriority,K.unstable_scheduleCallback,K.unstable_shouldYield,K.unstable_wrapCallback,F((function(e){e.exports=G}))),Z=F((function(e){
/** @license React v0.25.1
* react-reconciler.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.
*/
e.exports=function t(n){var r=q,i=a,o=$;function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;c.hasOwnProperty("ReactCurrentDispatcher")||(c.ReactCurrentDispatcher={current:null}),c.hasOwnProperty("ReactCurrentBatchConfig")||(c.ReactCurrentBatchConfig={suspense:null});var u="function"==typeof Symbol&&Symbol.for,l=u?Symbol.for("react.element"):60103,f=u?Symbol.for("react.portal"):60106,d=u?Symbol.for("react.fragment"):60107,p=u?Symbol.for("react.strict_mode"):60108,h=u?Symbol.for("react.profiler"):60114,g=u?Symbol.for("react.provider"):60109,v=u?Symbol.for("react.context"):60110,m=u?Symbol.for("react.concurrent_mode"):60111,y=u?Symbol.for("react.forward_ref"):60112,b=u?Symbol.for("react.suspense"):60113,w=u?Symbol.for("react.suspense_list"):60120,_=u?Symbol.for("react.memo"):60115,x=u?Symbol.for("react.lazy"):60116,O=u?Symbol.for("react.block"):60121,S="function"==typeof Symbol&&Symbol.iterator;function E(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=S&&e[S]||e["@@iterator"])?e:null}function C(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case d:return"Fragment";case f:return"Portal";case h:return"Profiler";case p:return"StrictMode";case b:return"Suspense";case w:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case v:return"Context.Consumer";case g:return"Context.Provider";case y:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case _:return C(e.type);case O:return C(e.render);case x:if(e=1===e._status?e._result:null)return C(e)}return null}function k(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function T(e){if(k(e)!==e)throw Error(s(188))}function j(e){var t=e.alternate;if(!t){if(null===(t=k(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return T(i),e;if(o===r)return T(i),t;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,c=i.child;c;){if(c===n){a=!0,n=i,r=o;break}if(c===r){a=!0,r=i,n=o;break}c=c.sibling}if(!a){for(c=o.child;c;){if(c===n){a=!0,n=o,r=i;break}if(c===r){a=!0,r=o,n=i;break}c=c.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}function P(e){if(!(e=j(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var I=n.getPublicInstance,R=n.getRootHostContext,A=n.getChildHostContext,M=n.prepareForCommit,D=n.resetAfterCommit,N=n.createInstance,L=n.appendInitialChild,z=n.finalizeInitialChildren,B=n.prepareUpdate,F=n.shouldSetTextContent,W=n.shouldDeprioritizeSubtree,H=n.createTextInstance,V=n.setTimeout,U=n.clearTimeout,G=n.noTimeout,K=n.isPrimaryRenderer,Z=n.supportsMutation,X=n.supportsPersistence,Q=n.supportsHydration,Y=n.appendChild,J=n.appendChildToContainer,ee=n.commitTextUpdate,te=n.commitMount,ne=n.commitUpdate,re=n.insertBefore,ie=n.insertInContainerBefore,oe=n.removeChild,ae=n.removeChildFromContainer,se=n.resetTextContent,ce=n.hideInstance,ue=n.hideTextInstance,le=n.unhideInstance,fe=n.unhideTextInstance,de=n.cloneInstance,pe=n.createContainerChildSet,he=n.appendChildToContainerChildSet,ge=n.finalizeContainerChildren,ve=n.replaceContainerChildren,me=n.cloneHiddenInstance,ye=n.cloneHiddenTextInstance,be=n.canHydrateInstance,we=n.canHydrateTextInstance,_e=n.isSuspenseInstancePending,xe=n.isSuspenseInstanceFallback,Oe=n.getNextHydratableSibling,Se=n.getFirstHydratableChild,Ee=n.hydrateInstance,Ce=n.hydrateTextInstance,ke=n.getNextHydratableInstanceAfterSuspenseInstance,Te=n.commitHydratedContainer,je=n.commitHydratedSuspenseInstance,Pe=/^(.*)[\\\/]/;function Ie(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=C(e.type);n=null,r&&(n=C(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(Pe,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}var Re=[],Ae=-1;function Me(e){0>Ae||(e.current=Re[Ae],Re[Ae]=null,Ae--)}function De(e,t){Ae++,Re[Ae]=e.current,e.current=t}var Ne={},Le={current:Ne},ze={current:!1},Be=Ne;function Fe(e,t){var n=e.type.contextTypes;if(!n)return Ne;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function We(e){return null!=e.childContextTypes}function He(){Me(ze),Me(Le)}function Ve(e,t,n){if(Le.current!==Ne)throw Error(s(168));De(Le,t),De(ze,n)}function Ue(e,t,n){var i=e.stateNode;if(e=t.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var o in i=i.getChildContext())if(!(o in e))throw Error(s(108,C(t)||"Unknown",o));return r({},n,{},i)}function qe(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ne,Be=Le.current,De(Le,e),De(ze,ze.current),!0}function Ge(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=Ue(e,t,Be),r.__reactInternalMemoizedMergedChildContext=e,Me(ze),Me(Le),De(Le,e)):Me(ze),De(ze,n)}var Ke=o.unstable_runWithPriority,$e=o.unstable_scheduleCallback,Ze=o.unstable_cancelCallback,Xe=o.unstable_requestPaint,Qe=o.unstable_now,Ye=o.unstable_getCurrentPriorityLevel,Je=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,it={},ot=o.unstable_shouldYield,at=void 0!==Xe?Xe:function(){},st=null,ct=null,ut=!1,lt=Qe(),ft=1e4>lt?Qe:function(){return Qe()-lt};function dt(){switch(Ye()){case Je:return 99;case et:return 98;case tt:return 97;case nt:return 96;case rt:return 95;default:throw Error(s(332))}}function pt(e){switch(e){case 99:return Je;case 98:return et;case 97:return tt;case 96:return nt;case 95:return rt;default:throw Error(s(332))}}function ht(e,t){return e=pt(e),Ke(e,t)}function gt(e,t,n){return e=pt(e),$e(e,t,n)}function vt(e){return null===st?(st=[e],ct=$e(Je,yt)):st.push(e),it}function mt(){if(null!==ct){var e=ct;ct=null,Ze(e)}yt()}function yt(){if(!ut&&null!==st){ut=!0;var e=0;try{var t=st;ht(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),st=null}catch(t){throw null!==st&&(st=st.slice(e+1)),$e(Je,mt),t}finally{ut=!1}}}function bt(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}var wt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},_t=Object.prototype.hasOwnProperty;function xt(e,t){if(wt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!_t.call(t,n[r])||!wt(e[n[r]],t[n[r]]))return!1;return!0}function Ot(e,t){if(e&&e.defaultProps)for(var n in t=r({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var St={current:null},Et=null,Ct=null,kt=null;function Tt(){kt=Ct=Et=null}function jt(e,t){e=e.type._context,K?(De(St,e._currentValue),e._currentValue=t):(De(St,e._currentValue2),e._currentValue2=t)}function Pt(e){var t=St.current;Me(St),e=e.type._context,K?e._currentValue=t:e._currentValue2=t}function It(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function Rt(e,t){Et=e,kt=Ct=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(ar=!0),e.firstContext=null)}function At(e,t){if(kt!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(kt=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ct){if(null===Et)throw Error(s(308));Ct=t,Et.dependencies={expirationTime:0,firstContext:t,responders:null}}else Ct=Ct.next=t;return K?e._currentValue:e._currentValue2}var Mt=!1;function Dt(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function Nt(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function Lt(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function zt(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function Bt(e,t){var n=e.alternate;null!==n&&Nt(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function Ft(e,t,n,i){var o=e.updateQueue;Mt=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var c=a.next;a.next=s.next,s.next=c}a=s,o.shared.pending=null,null!==(c=e.alternate)&&null!==(c=c.updateQueue)&&(c.baseQueue=s)}if(null!==a){c=a.next;var u=o.baseState,l=0,f=null,d=null,p=null;if(null!==c)for(var h=c;;){if((s=h.expirationTime)<i){var g={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===p?(d=p=g,f=u):p=p.next=g,s>l&&(l=s)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),Fi(s,h.suspenseConfig);e:{var v=e,m=h;switch(s=t,g=n,m.tag){case 1:if("function"==typeof(v=m.payload)){u=v.call(g,u,s);break e}u=v;break e;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null==(s="function"==typeof(v=m.payload)?v.call(g,u,s):v))break e;u=r({},u,s);break e;case 2:Mt=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=o.effects)?o.effects=[h]:s.push(h))}if(null===(h=h.next)||h===c){if(null===(s=o.shared.pending))break;h=a.next=s.next,s.next=c,o.baseQueue=a=s,o.shared.pending=null}}null===p?f=u:p.next=d,o.baseState=f,o.baseQueue=p,Wi(l),e.expirationTime=l,e.memoizedState=u}}function Wt(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!=typeof r)throw Error(s(191,r));r.call(i)}}}var Ht=c.ReactCurrentBatchConfig,Vt=(new i.Component).refs;function Ut(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:r({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var qt={isMounted:function(e){return!!(e=e._reactInternalFiber)&&k(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=ki(),i=Ht.suspense;(i=Lt(r=Ti(r,e,i),i)).payload=t,null!=n&&(i.callback=n),zt(e,i),ji(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=ki(),i=Ht.suspense;(i=Lt(r=Ti(r,e,i),i)).tag=1,i.payload=t,null!=n&&(i.callback=n),zt(e,i),ji(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=ki(),r=Ht.suspense;(r=Lt(n=Ti(n,e,r),r)).tag=2,null!=t&&(r.callback=t),zt(e,r),ji(e,n)}};function Gt(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&xt(n,r)&&xt(i,o))}function Kt(e,t,n){var r=!1,i=Ne,o=t.contextType;return"object"==typeof o&&null!==o?o=At(o):(i=We(t)?Be:Le.current,o=(r=null!=(r=t.contextTypes))?Fe(e,i):Ne),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=qt,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function $t(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qt.enqueueReplaceState(t,t.state,null)}function Zt(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Vt,Dt(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=At(o):(o=We(t)?Be:Le.current,i.context=Fe(e,o)),Ft(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Ut(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&qt.enqueueReplaceState(i,i.state,null),Ft(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var Xt=Array.isArray;function Qt(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===Vt&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function Yt(e,t){if("textarea"!==e.type)throw Error(s(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Jt(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=co(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function a(t){return e&&null===t.alternate&&(t.effectTag=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=fo(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Qt(e,t,n),r.return=e,r):((r=uo(n.type,n.key,n.props,null,e.mode,r)).ref=Qt(e,t,n),r.return=e,r)}function p(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=po(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,o){return null===t||7!==t.tag?((t=lo(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function g(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=fo(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case l:return(n=uo(t.type,t.key,t.props,null,e.mode,n)).ref=Qt(e,null,t),n.return=e,n;case f:return(t=po(t,e.mode,n)).return=e,t}if(Xt(t)||E(t))return(t=lo(t,e.mode,n,null)).return=e,t;Yt(e,t)}return null}function v(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case l:return n.key===i?n.type===d?h(e,t,n.props.children,r,i):u(e,t,n,r):null;case f:return n.key===i?p(e,t,n,r):null}if(Xt(n)||E(n))return null!==i?null:h(e,t,n,r,null);Yt(e,n)}return null}function m(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return c(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case l:return e=e.get(null===r.key?n:r.key)||null,r.type===d?h(t,e,r.props.children,i,r.key):u(t,e,r,i);case f:return p(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Xt(r)||E(r))return h(t,e=e.get(n)||null,r,i,null);Yt(t,r)}return null}function y(i,a,s,c){for(var u=null,l=null,f=a,d=a=0,p=null;null!==f&&d<s.length;d++){f.index>d?(p=f,f=null):p=f.sibling;var h=v(i,f,s[d],c);if(null===h){null===f&&(f=p);break}e&&f&&null===h.alternate&&t(i,f),a=o(h,a,d),null===l?u=h:l.sibling=h,l=h,f=p}if(d===s.length)return n(i,f),u;if(null===f){for(;d<s.length;d++)null!==(f=g(i,s[d],c))&&(a=o(f,a,d),null===l?u=f:l.sibling=f,l=f);return u}for(f=r(i,f);d<s.length;d++)null!==(p=m(f,i,d,s[d],c))&&(e&&null!==p.alternate&&f.delete(null===p.key?d:p.key),a=o(p,a,d),null===l?u=p:l.sibling=p,l=p);return e&&f.forEach((function(e){return t(i,e)})),u}function b(i,a,c,u){var l=E(c);if("function"!=typeof l)throw Error(s(150));if(null==(c=l.call(c)))throw Error(s(151));for(var f=l=null,d=a,p=a=0,h=null,y=c.next();null!==d&&!y.done;p++,y=c.next()){d.index>p?(h=d,d=null):h=d.sibling;var b=v(i,d,y.value,u);if(null===b){null===d&&(d=h);break}e&&d&&null===b.alternate&&t(i,d),a=o(b,a,p),null===f?l=b:f.sibling=b,f=b,d=h}if(y.done)return n(i,d),l;if(null===d){for(;!y.done;p++,y=c.next())null!==(y=g(i,y.value,u))&&(a=o(y,a,p),null===f?l=y:f.sibling=y,f=y);return l}for(d=r(i,d);!y.done;p++,y=c.next())null!==(y=m(d,i,p,y.value,u))&&(e&&null!==y.alternate&&d.delete(null===y.key?p:y.key),a=o(y,a,p),null===f?l=y:f.sibling=y,f=y);return e&&d.forEach((function(e){return t(i,e)})),l}return function(e,r,o,c){var u="object"==typeof o&&null!==o&&o.type===d&&null===o.key;u&&(o=o.props.children);var p="object"==typeof o&&null!==o;if(p)switch(o.$$typeof){case l:e:{for(p=o.key,u=r;null!==u;){if(u.key===p){switch(u.tag){case 7:if(o.type===d){n(e,u.sibling),(r=i(u,o.props.children)).return=e,e=r;break e}break;default:if(u.elementType===o.type){n(e,u.sibling),(r=i(u,o.props)).ref=Qt(e,u,o),r.return=e,e=r;break e}}n(e,u);break}t(e,u),u=u.sibling}o.type===d?((r=lo(o.props.children,e.mode,c,o.key)).return=e,e=r):((c=uo(o.type,o.key,o.props,null,e.mode,c)).ref=Qt(e,r,o),c.return=e,e=c)}return a(e);case f:e:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=po(o,e.mode,c)).return=e,e=r}return a(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=fo(o,e.mode,c)).return=e,e=r),a(e);if(Xt(o))return y(e,r,o,c);if(E(o))return b(e,r,o,c);if(p&&Yt(e,o),void 0===o&&!u)switch(e.tag){case 1:case 0:throw e=e.type,Error(s(152,e.displayName||e.name||"Component"))}return n(e,r)}}var en=Jt(!0),tn=Jt(!1),nn={},rn={current:nn},on={current:nn},an={current:nn};function sn(e){if(e===nn)throw Error(s(174));return e}function cn(e,t){De(an,t),De(on,e),De(rn,nn),e=R(t),Me(rn),De(rn,e)}function un(){Me(rn),Me(on),Me(an)}function ln(e){var t=sn(an.current),n=sn(rn.current);n!==(t=A(n,e.type,t))&&(De(on,e),De(rn,t))}function fn(e){on.current===e&&(Me(rn),Me(on))}var dn={current:0};function pn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||_e(n)||xe(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function hn(e,t){return{responder:e,props:t}}var gn=c.ReactCurrentDispatcher,vn=c.ReactCurrentBatchConfig,mn=0,yn=null,bn=null,wn=null,_n=!1;function xn(){throw Error(s(321))}function On(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wt(e[n],t[n]))return!1;return!0}function Sn(e,t,n,r,i,o){if(mn=o,yn=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,gn.current=null===e||null===e.memoizedState?Kn:$n,e=n(r,i),t.expirationTime===mn){o=0;do{if(t.expirationTime=0,!(25>o))throw Error(s(301));o+=1,wn=bn=null,t.updateQueue=null,gn.current=Zn,e=n(r,i)}while(t.expirationTime===mn)}if(gn.current=Gn,t=null!==bn&&null!==bn.next,mn=0,wn=bn=yn=null,_n=!1,t)throw Error(s(300));return e}function En(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===wn?yn.memoizedState=wn=e:wn=wn.next=e,wn}function Cn(){if(null===bn){var e=yn.alternate;e=null!==e?e.memoizedState:null}else e=bn.next;var t=null===wn?yn.memoizedState:wn.next;if(null!==t)wn=t,bn=e;else{if(null===e)throw Error(s(310));e={memoizedState:(bn=e).memoizedState,baseState:bn.baseState,baseQueue:bn.baseQueue,queue:bn.queue,next:null},null===wn?yn.memoizedState=wn=e:wn=wn.next=e}return wn}function kn(e,t){return"function"==typeof t?t(e):t}function Tn(e){var t=Cn(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=bn,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var c=a=o=null,u=i;do{var l=u.expirationTime;if(l<mn){var f={expirationTime:u.expirationTime,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===c?(a=c=f,o=r):c=c.next=f,l>yn.expirationTime&&(yn.expirationTime=l,Wi(l))}else null!==c&&(c=c.next={expirationTime:1073741823,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),Fi(l,u.suspenseConfig),r=u.eagerReducer===e?u.eagerState:e(r,u.action);u=u.next}while(null!==u&&u!==i);null===c?o=r:c.next=a,wt(r,t.memoizedState)||(ar=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function jn(e){var t=Cn(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);wt(o,t.memoizedState)||(ar=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Pn(e){var t=En();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:kn,lastRenderedState:e}).dispatch=qn.bind(null,yn,e),[t.memoizedState,e]}function In(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=yn.updateQueue)?(t={lastEffect:null},yn.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Rn(){return Cn().memoizedState}function An(e,t,n,r){var i=En();yn.effectTag|=e,i.memoizedState=In(1|t,n,void 0,void 0===r?null:r)}function Mn(e,t,n,r){var i=Cn();r=void 0===r?null:r;var o=void 0;if(null!==bn){var a=bn.memoizedState;if(o=a.destroy,null!==r&&On(r,a.deps))return void In(t,n,o,r)}yn.effectTag|=e,i.memoizedState=In(1|t,n,o,r)}function Dn(e,t){return An(516,4,e,t)}function Nn(e,t){return Mn(516,4,e,t)}function Ln(e,t){return Mn(4,2,e,t)}function zn(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Bn(e,t,n){return n=null!=n?n.concat([e]):null,Mn(4,2,zn.bind(null,t,e),n)}function Fn(){}function Wn(e,t){return En().memoizedState=[e,void 0===t?null:t],e}function Hn(e,t){var n=Cn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&On(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Vn(e,t){var n=Cn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&On(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Un(e,t,n){var r=dt();ht(98>r?98:r,(function(){e(!0)})),ht(97<r?97:r,(function(){var r=vn.suspense;vn.suspense=void 0===t?null:t;try{e(!1),n()}finally{vn.suspense=r}}))}function qn(e,t,n){var r=ki(),i=Ht.suspense;i={expirationTime:r=Ti(r,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),t.pending=i,o=e.alternate,e===yn||null!==o&&o===yn)_n=!0,i.expirationTime=mn,yn.expirationTime=mn;else{if(0===e.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,wt(s,a))return}catch(e){}ji(e,r)}}var Gn={readContext:At,useCallback:xn,useContext:xn,useEffect:xn,useImperativeHandle:xn,useLayoutEffect:xn,useMemo:xn,useReducer:xn,useRef:xn,useState:xn,useDebugValue:xn,useResponder:xn,useDeferredValue:xn,useTransition:xn},Kn={readContext:At,useCallback:Wn,useContext:At,useEffect:Dn,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,An(4,2,zn.bind(null,t,e),n)},useLayoutEffect:function(e,t){return An(4,2,e,t)},useMemo:function(e,t){var n=En();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=En();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=qn.bind(null,yn,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},En().memoizedState=e},useState:Pn,useDebugValue:Fn,useResponder:hn,useDeferredValue:function(e,t){var n=Pn(e),r=n[0],i=n[1];return Dn((function(){var n=vn.suspense;vn.suspense=void 0===t?null:t;try{i(e)}finally{vn.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Pn(!1),n=t[0];return t=t[1],[Wn(Un.bind(null,t,e),[t,e]),n]}},$n={readContext:At,useCallback:Hn,useContext:At,useEffect:Nn,useImperativeHandle:Bn,useLayoutEffect:Ln,useMemo:Vn,useReducer:Tn,useRef:Rn,useState:function(){return Tn(kn)},useDebugValue:Fn,useResponder:hn,useDeferredValue:function(e,t){var n=Tn(kn),r=n[0],i=n[1];return Nn((function(){var n=vn.suspense;vn.suspense=void 0===t?null:t;try{i(e)}finally{vn.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Tn(kn),n=t[0];return t=t[1],[Hn(Un.bind(null,t,e),[t,e]),n]}},Zn={readContext:At,useCallback:Hn,useContext:At,useEffect:Nn,useImperativeHandle:Bn,useLayoutEffect:Ln,useMemo:Vn,useReducer:jn,useRef:Rn,useState:function(){return jn(kn)},useDebugValue:Fn,useResponder:hn,useDeferredValue:function(e,t){var n=jn(kn),r=n[0],i=n[1];return Nn((function(){var n=vn.suspense;vn.suspense=void 0===t?null:t;try{i(e)}finally{vn.suspense=n}}),[e,t]),r},useTransition:function(e){var t=jn(kn),n=t[0];return t=t[1],[Hn(Un.bind(null,t,e),[t,e]),n]}},Xn=null,Qn=null,Yn=!1;function Jn(e,t){var n=ao(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function er(e,t){switch(e.tag){case 5:return null!==(t=be(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=we(t,e.pendingProps))&&(e.stateNode=t,!0);case 13:default:return!1}}function tr(e){if(Yn){var t=Qn;if(t){var n=t;if(!er(e,t)){if(!(t=Oe(n))||!er(e,t))return e.effectTag=-1025&e.effectTag|2,Yn=!1,void(Xn=e);Jn(Xn,n)}Xn=e,Qn=Se(t)}else e.effectTag=-1025&e.effectTag|2,Yn=!1,Xn=e}}function nr(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Xn=e}function rr(e){if(!Q||e!==Xn)return!1;if(!Yn)return nr(e),Yn=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!F(t,e.memoizedProps))for(t=Qn;t;)Jn(e,t),t=Oe(t);if(nr(e),13===e.tag){if(!Q)throw Error(s(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));Qn=ke(e)}else Qn=Xn?Oe(e.stateNode):null;return!0}function ir(){Q&&(Qn=Xn=null,Yn=!1)}var or=c.ReactCurrentOwner,ar=!1;function sr(e,t,n,r){t.child=null===e?tn(t,null,n,r):en(t,e.child,n,r)}function cr(e,t,n,r,i){n=n.render;var o=t.ref;return Rt(t,i),r=Sn(e,t,n,r,o,i),null===e||ar?(t.effectTag|=1,sr(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Er(e,t,i))}function ur(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||so(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=uo(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,lr(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:xt)(i,r)&&e.ref===t.ref)?Er(e,t,o):(t.effectTag|=1,(e=co(a,r)).ref=t.ref,e.return=t,t.child=e)}function lr(e,t,n,r,i,o){return null!==e&&xt(e.memoizedProps,r)&&e.ref===t.ref&&(ar=!1,i<o)?(t.expirationTime=e.expirationTime,Er(e,t,o)):dr(e,t,n,r,o)}function fr(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function dr(e,t,n,r,i){var o=We(n)?Be:Le.current;return o=Fe(t,o),Rt(t,i),n=Sn(e,t,n,r,o,i),null===e||ar?(t.effectTag|=1,sr(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Er(e,t,i))}function pr(e,t,n,r,i){if(We(n)){var o=!0;qe(t)}else o=!1;if(Rt(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Kt(t,n,r),Zt(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,u=n.contextType;u="object"==typeof u&&null!==u?At(u):Fe(t,u=We(n)?Be:Le.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==u)&&$t(t,a,r,u),Mt=!1;var d=t.memoizedState;a.state=d,Ft(t,r,a,i),c=t.memoizedState,s!==r||d!==c||ze.current||Mt?("function"==typeof l&&(Ut(t,n,l,r),c=t.memoizedState),(s=Mt||Gt(t,n,s,r,d,c,u))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,Nt(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Ot(t.type,s),c=a.context,u="object"==typeof(u=n.contextType)&&null!==u?At(u):Fe(t,u=We(n)?Be:Le.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==u)&&$t(t,a,r,u),Mt=!1,c=t.memoizedState,a.state=c,Ft(t,r,a,i),d=t.memoizedState,s!==r||c!==d||ze.current||Mt?("function"==typeof l&&(Ut(t,n,l,r),d=t.memoizedState),(l=Mt||Gt(t,n,s,r,c,d,u))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,u)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=u,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return hr(e,t,n,r,o,i)}function hr(e,t,n,r,i,o){fr(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&Ge(t,n,!1),Er(e,t,o);r=t.stateNode,or.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=en(t,e.child,null,o),t.child=en(t,null,s,o)):sr(e,t,s,o),t.memoizedState=r.state,i&&Ge(t,n,!0),t.child}function gr(e){var t=e.stateNode;t.pendingContext?Ve(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ve(0,t.context,!1),cn(e,t.containerInfo)}var vr,mr,yr,br,wr={dehydrated:null,retryTime:0};function _r(e,t,n){var r,i=t.mode,o=t.pendingProps,a=dn.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),De(dn,1&a),null===e){if(void 0!==o.fallback&&tr(t),s){if(s=o.fallback,(o=lo(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=lo(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=wr,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=tn(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=co(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=co(i,o)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=wr,t.child=n,i}return n=en(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=lo(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=lo(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=wr,t.child=o,n}return t.memoizedState=null,t.child=en(t,e,o.children,n)}function xr(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),It(e.return,t)}function Or(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Sr(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(sr(e,t,r.children,n),0!=(2&(r=dn.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&xr(e,n);else if(19===e.tag)xr(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(dn,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===pn(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Or(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===pn(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Or(t,!0,n,null,o,t.lastEffect);break;case"together":Or(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Er(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&Wi(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=co(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=co(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Cr(e){e.effectTag|=4}if(Z)vr=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)L(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},mr=function(){},yr=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var o=t.stateNode,a=sn(rn.current);n=B(o,n,e,r,i,a),(t.updateQueue=n)&&Cr(t)}},br=function(e,t,n,r){n!==r&&Cr(t)};else if(X){vr=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=me(o,i.type,i.memoizedProps,i)),L(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=ye(o,i.memoizedProps,i)),L(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.effectTag)&&(o=null!==i.memoizedState)){var a=i.child;if(null!==a&&(null!==a.child&&(a.child.return=a,vr(e,a,!0,o)),null!==(o=a.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var kr=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=me(o,i.type,i.memoizedProps,i)),he(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=ye(o,i.memoizedProps,i)),he(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.effectTag)&&(o=null!==i.memoizedState)){var a=i.child;if(null!==a&&(null!==a.child&&(a.child.return=a,kr(e,a,!0,o)),null!==(o=a.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};mr=function(e){var t=e.stateNode;if(null!==e.firstEffect){var n=t.containerInfo,r=pe(n);kr(r,e,!1,!1),t.pendingChildren=r,Cr(e),ge(n,r)}},yr=function(e,t,n,r,i){var o=e.stateNode,a=e.memoizedProps;if((e=null===t.firstEffect)&&a===r)t.stateNode=o;else{var s=t.stateNode,c=sn(rn.current),u=null;a!==r&&(u=B(s,n,a,r,i,c)),e&&null===u?t.stateNode=o:(o=de(o,u,n,a,r,t,e,s),z(o,n,r,i,c)&&Cr(t),t.stateNode=o,e?Cr(t):vr(o,t,!1,!1))}},br=function(e,t,n,r){n!==r?(e=sn(an.current),n=sn(rn.current),t.stateNode=H(r,e,n,t),Cr(t)):t.stateNode=e.stateNode}}else mr=function(){},yr=function(){},br=function(){};function Tr(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function jr(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return We(t.type)&&He(),null;case 3:return un(),Me(ze),Me(Le),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(null===e||null===e.child)&&rr(t)&&Cr(t),mr(t),null;case 5:fn(t);var i=sn(an.current);if(n=t.type,null!==e&&null!=t.stateNode)yr(e,t,n,r,i),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(s(166));return null}if(e=sn(rn.current),rr(t)){if(!Q)throw Error(s(175));e=Ee(t.stateNode,t.type,t.memoizedProps,i,e,t),t.updateQueue=e,null!==e&&Cr(t)}else{var o=N(n,r,i,e,t);vr(o,t,!1,!1),t.stateNode=o,z(o,n,r,i,e)&&Cr(t)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)br(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(e=sn(an.current),i=sn(rn.current),rr(t)){if(!Q)throw Error(s(176));Ce(t.stateNode,t.memoizedProps,t)&&Cr(t)}else t.stateNode=H(r,e,i,t)}return null;case 13:return Me(dn),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(r=null!==r,i=!1,null===e?void 0!==t.memoizedProps.fallback&&rr(t):(i=null!==(n=e.memoizedState),r||null===n||null!==(n=e.child.sibling)&&(null!==(o=t.firstEffect)?(t.firstEffect=n,n.nextEffect=o):(t.firstEffect=t.lastEffect=n,n.nextEffect=null),n.effectTag=8)),r&&!i&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&dn.current)?ci===ti&&(ci=ni):(ci!==ti&&ci!==ni||(ci=ri),0!==pi&&null!==oi&&(vo(oi,si),mo(oi,pi)))),X&&r&&(t.effectTag|=4),Z&&(r||i)&&(t.effectTag|=4),null);case 4:return un(),mr(t),null;case 10:return Pt(t),null;case 17:return We(t.type)&&He(),null;case 19:if(Me(dn),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(o=r.rendering)){if(i)Tr(r,!1);else if(ci!==ti||null!==e&&0!=(64&e.effectTag))for(e=t.child;null!==e;){if(null!==(o=pn(e))){for(t.effectTag|=64,Tr(r,!1),null!==(e=o.updateQueue)&&(t.updateQueue=e,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,e=n,r=t.child;null!==r;)n=e,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(o=i.alternate)?(i.childExpirationTime=0,i.expirationTime=n,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=o.childExpirationTime,i.expirationTime=o.expirationTime,i.child=o.child,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,n=o.dependencies,i.dependencies=null===n?null:{expirationTime:n.expirationTime,firstContext:n.firstContext,responders:n.responders}),r=r.sibling;return De(dn,1&dn.current|2),t.child}e=e.sibling}}else{if(!i)if(null!==(e=pn(o))){if(t.effectTag|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.effectTag|=4),Tr(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*ft()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Tr(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=ft()+500),e=r.tail,r.rendering=e,r.tail=e.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=ft(),e.sibling=null,t=dn.current,De(dn,i?1&t|2:1&t),e):null}throw Error(s(156,t.tag))}function Pr(e){switch(e.tag){case 1:We(e.type)&&He();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(un(),Me(ze),Me(Le),0!=(64&(t=e.effectTag)))throw Error(s(285));return e.effectTag=-4097&t|64,e;case 5:return fn(e),null;case 13:return Me(dn),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return Me(dn),null;case 4:return un(),null;case 10:return Pt(e),null;default:return null}}function Ir(e,t){return{value:e,source:t,stack:Ie(t)}}var Rr="function"==typeof WeakSet?WeakSet:Set;function Ar(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=Ie(n)),null!==n&&C(n.type),t=t.value,null!==e&&1===e.tag&&C(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function Mr(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ji(e,t)}else t.current=null}function Dr(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ot(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(s(163))}function Nr(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function Lr(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function zr(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void Lr(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Ot(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&Wt(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=I(n.child.stateNode);break;case 1:e=n.child.stateNode}Wt(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&te(e,n.type,n.memoizedProps,n));case 6:case 4:case 12:return;case 13:return void(Q&&null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&je(n)))));case 19:case 17:case 20:case 21:return}throw Error(s(163))}function Br(e,t,n){switch("function"==typeof io&&io(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;ht(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(e){Ji(i,e)}}e=e.next}while(e!==r)}))}break;case 1:Mr(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Ji(e,t)}}(t,n);break;case 5:Mr(t);break;case 4:Z?Ur(e,t,n):X&&function(e){if(X){e=e.stateNode.containerInfo;var t=pe(e);ve(e,t)}}(t)}}function Fr(e,t,n){for(var r=t;;)if(Br(e,r,n),null===r.child||Z&&4===r.tag){if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}else r.child.return=r,r=r.child}function Wr(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&Wr(t)}function Hr(e){return 5===e.tag||3===e.tag||4===e.tag}function Vr(e){if(Z){e:{for(var t=e.return;null!==t;){if(Hr(t)){var n=t;break e}t=t.return}throw Error(s(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(s(161))}16&n.effectTag&&(se(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Hr(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?ie(r,t,n):J(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?re(r,t,n):Y(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}}function Ur(e,t,n){for(var r,i,o=t,a=!1;;){if(!a){a=o.return;e:for(;;){if(null===a)throw Error(s(160));switch(r=a.stateNode,a.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}a=a.return}a=!0}if(5===o.tag||6===o.tag)Fr(e,o,n),i?ae(r,o.stateNode):oe(r,o.stateNode);else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(Br(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(a=!1)}o.sibling.return=o.return,o=o.sibling}}function qr(e,t){if(Z){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Nr(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&ne(n,o,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(s(162));return n=t.memoizedProps,void ee(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(Q&&(t=t.stateNode,t.hydrate&&(t.hydrate=!1,Te(t.containerInfo))));case 12:return;case 13:return Gr(t),void Kr(t);case 19:return void Kr(t);case 17:return}throw Error(s(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Nr(3,t);case 12:return;case 13:return Gr(t),void Kr(t);case 19:return void Kr(t);case 3:Q&&(n=t.stateNode).hydrate&&(n.hydrate=!1,Te(n.containerInfo))}e:if(X){switch(t.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:t=t.stateNode,ve(t.containerInfo,t.pendingChildren);break e}throw Error(s(163))}}function Gr(e){var t=e;if(null===e.memoizedState)var n=!1;else n=!0,t=e.child,gi=ft();if(Z&&null!==t)e:if(e=t,Z)for(t=e;;){if(5===t.tag){var r=t.stateNode;n?ce(r):le(t.stateNode,t.memoizedProps)}else if(6===t.tag)r=t.stateNode,n?ue(r):fe(r,t.memoizedProps);else{if(13===t.tag&&null!==t.memoizedState&&null===t.memoizedState.dehydrated){(r=t.child.sibling).return=t,t=r;continue}if(null!==t.child){t.child.return=t,t=t.child;continue}}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}}function Kr(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Rr),t.forEach((function(t){var r=to.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var $r="function"==typeof WeakMap?WeakMap:Map;function Zr(e,t,n){(n=Lt(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){mi||(mi=!0,yi=r),Ar(e,t)},n}function Xr(e,t,n){(n=Lt(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return Ar(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===bi?bi=new Set([this]):bi.add(this),Ar(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Qr,Yr=Math.ceil,Jr=c.ReactCurrentDispatcher,ei=c.ReactCurrentOwner,ti=0,ni=3,ri=4,ii=0,oi=null,ai=null,si=0,ci=ti,ui=null,li=1073741823,fi=1073741823,di=null,pi=0,hi=!1,gi=0,vi=null,mi=!1,yi=null,bi=null,wi=!1,_i=null,xi=90,Oi=null,Si=0,Ei=null,Ci=0;function ki(){return 0!=(48&ii)?1073741821-(ft()/10|0):0!==Ci?Ci:Ci=1073741821-(ft()/10|0)}function Ti(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=dt();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&ii))return si;if(null!==n)e=bt(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=bt(e,150,100);break;case 97:case 96:e=bt(e,5e3,250);break;case 95:e=2;break;default:throw Error(s(326))}return null!==oi&&e===si&&--e,e}function ji(e,t){if(50<Si)throw Si=0,Ei=null,Error(s(185));if(null!==(e=Pi(e,t))){var n=dt();1073741823===t?0!=(8&ii)&&0==(48&ii)?Mi(e):(Ri(e),0===ii&&mt()):Ri(e),0==(4&ii)||98!==n&&99!==n||(null===Oi?Oi=new Map([[e,t]]):(void 0===(n=Oi.get(e))||n>t)&&Oi.set(e,t))}}function Pi(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(oi===i&&(Wi(t),ci===ri&&vo(i,si)),mo(i,t)),i}function Ii(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!go(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Ri(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=vt(Mi.bind(null,e));else{var t=Ii(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=ki();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==it&&Ze(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?vt(Mi.bind(null,e)):gt(r,Ai.bind(null,e),{timeout:10*(1073741821-t)-ft()}),e.callbackNode=t}}}function Ai(e,t){if(Ci=0,t)return yo(e,t=ki()),Ri(e),null;var n=Ii(e);if(0!==n){if(t=e.callbackNode,0!=(48&ii))throw Error(s(327));if(Xi(),e===oi&&n===si||Li(e,n),null!==ai){var r=ii;ii|=16;for(var i=Bi();;)try{Vi();break}catch(t){zi(e,t)}if(Tt(),ii=r,Jr.current=i,1===ci)throw t=ui,Li(e,n),vo(e,n),Ri(e),t;if(null===ai)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=ci,oi=null,r){case ti:case 1:throw Error(s(345));case 2:yo(e,2<n?2:n);break;case ni:if(vo(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Gi(i)),1073741823===li&&10<(i=gi+500-ft())){if(hi){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,Li(e,n);break}}if(0!==(o=Ii(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=V(Ki.bind(null,e),i);break}Ki(e);break;case ri:if(vo(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Gi(i)),hi&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,Li(e,n);break}if(0!==(i=Ii(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==fi?r=10*(1073741821-fi)-ft():1073741823===li?r=0:(r=10*(1073741821-li)-5e3,0>(r=(i=ft())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Yr(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=V(Ki.bind(null,e),r);break}Ki(e);break;case 5:if(1073741823!==li&&null!==di){o=li;var a=di;if(0>=(r=0|a.busyMinDurationMs)?r=0:(i=0|a.busyDelayMs,r=(o=ft()-(10*(1073741821-o)-(0|a.timeoutMs||5e3)))<=i?0:i+r-o),10<r){vo(e,n),e.timeoutHandle=V(Ki.bind(null,e),r);break}}Ki(e);break;default:throw Error(s(329))}if(Ri(e),e.callbackNode===t)return Ai.bind(null,e)}}return null}function Mi(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&ii))throw Error(s(327));if(Xi(),e===oi&&t===si||Li(e,t),null!==ai){var n=ii;ii|=16;for(var r=Bi();;)try{Hi();break}catch(t){zi(e,t)}if(Tt(),ii=n,Jr.current=r,1===ci)throw n=ui,Li(e,t),vo(e,t),Ri(e),n;if(null!==ai)throw Error(s(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,oi=null,Ki(e),Ri(e)}return null}function Di(e,t){var n=ii;ii|=1;try{return e(t)}finally{0===(ii=n)&&mt()}}function Ni(e,t){if(0!=(48&ii))throw Error(s(187));var n=ii;ii|=1;try{return ht(99,e.bind(null,t))}finally{ii=n,mt()}}function Li(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(n!==G&&(e.timeoutHandle=G,U(n)),null!==ai)for(n=ai.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&He();break;case 3:un(),Me(ze),Me(Le);break;case 5:fn(r);break;case 4:un();break;case 13:case 19:Me(dn);break;case 10:Pt(r)}n=n.return}oi=e,ai=co(e.current,null),si=t,ci=ti,ui=null,fi=li=1073741823,di=null,pi=0,hi=!1}function zi(e,t){for(;;){try{if(Tt(),gn.current=Gn,_n)for(var n=yn.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(mn=0,wn=bn=yn=null,_n=!1,null===ai||null===ai.return)return ci=1,ui=t,ai=null;e:{var i=e,o=ai.return,a=ai,s=t;if(t=si,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var c=s;if(0==(2&a.mode)){var u=a.alternate;u?(a.updateQueue=u.updateQueue,a.memoizedState=u.memoizedState,a.expirationTime=u.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&dn.current),f=o;do{var d;if(d=13===f.tag){var p=f.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var h=f.memoizedProps;d=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(d){var g=f.updateQueue;if(null===g){var v=new Set;v.add(c),f.updateQueue=v}else g.add(c);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var m=Lt(1073741823,null);m.tag=2,zt(a,m)}a.expirationTime=1073741823;break e}s=void 0,a=t;var y=i.pingCache;if(null===y?(y=i.pingCache=new $r,s=new Set,y.set(c,s)):void 0===(s=y.get(c))&&(s=new Set,y.set(c,s)),!s.has(a)){s.add(a);var b=eo.bind(null,i,c,a);c.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);s=Error((C(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+Ie(a))}5!==ci&&(ci=2),s=Ir(s,a),f=o;do{switch(f.tag){case 3:c=s,f.effectTag|=4096,f.expirationTime=t,Bt(f,Zr(f,c,t));break e;case 1:c=s;var w=f.type,_=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===bi||!bi.has(_)))){f.effectTag|=4096,f.expirationTime=t,Bt(f,Xr(f,c,t));break e}}f=f.return}while(null!==f)}ai=qi(ai)}catch(e){t=e;continue}break}}function Bi(){var e=Jr.current;return Jr.current=Gn,null===e?Gn:e}function Fi(e,t){e<li&&2<e&&(li=e),null!==t&&e<fi&&2<e&&(fi=e,di=t)}function Wi(e){e>pi&&(pi=e)}function Hi(){for(;null!==ai;)ai=Ui(ai)}function Vi(){for(;null!==ai&&!ot();)ai=Ui(ai)}function Ui(e){var t=Qr(e.alternate,e,si);return e.memoizedProps=e.pendingProps,null===t&&(t=qi(e)),ei.current=null,t}function qi(e){ai=e;do{var t=ai.alternate;if(e=ai.return,0==(2048&ai.effectTag)){if(t=jr(t,ai,si),1===si||1!==ai.childExpirationTime){for(var n=0,r=ai.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}ai.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=ai.firstEffect),null!==ai.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=ai.firstEffect),e.lastEffect=ai.lastEffect),1<ai.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=ai:e.firstEffect=ai,e.lastEffect=ai))}else{if(null!==(t=Pr(ai)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=ai.sibling))return t;ai=e}while(null!==ai);return ci===ti&&(ci=5),null}function Gi(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function Ki(e){var t=dt();return ht(99,$i.bind(null,e,t)),null}function $i(e,t){do{Xi()}while(null!==_i);if(0!=(48&ii))throw Error(s(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(s(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=Gi(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===oi&&(ai=oi=null,si=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=ii;ii|=32,ei.current=null,M(e.containerInfo),vi=i;do{try{Zi()}catch(e){if(null===vi)throw Error(s(330));Ji(vi,e),vi=vi.nextEffect}}while(null!==vi);vi=i;do{try{for(var a=e,c=t;null!==vi;){var u=vi.effectTag;if(16&u&&Z&&se(vi.stateNode),128&u){var l=vi.alternate;if(null!==l){var f=l.ref;null!==f&&("function"==typeof f?f(null):f.current=null)}}switch(1038&u){case 2:Vr(vi),vi.effectTag&=-3;break;case 6:Vr(vi),vi.effectTag&=-3,qr(vi.alternate,vi);break;case 1024:vi.effectTag&=-1025;break;case 1028:vi.effectTag&=-1025,qr(vi.alternate,vi);break;case 4:qr(vi.alternate,vi);break;case 8:var d=a,p=vi,h=c;Z?Ur(d,p,h):Fr(d,p,h),Wr(p)}vi=vi.nextEffect}}catch(e){if(null===vi)throw Error(s(330));Ji(vi,e),vi=vi.nextEffect}}while(null!==vi);D(e.containerInfo),e.current=n,vi=i;do{try{for(u=e;null!==vi;){var g=vi.effectTag;if(36&g&&zr(u,vi.alternate,vi),128&g){l=void 0;var v=vi.ref;if(null!==v){var m=vi.stateNode;switch(vi.tag){case 5:l=I(m);break;default:l=m}"function"==typeof v?v(l):v.current=l}}vi=vi.nextEffect}}catch(e){if(null===vi)throw Error(s(330));Ji(vi,e),vi=vi.nextEffect}}while(null!==vi);vi=null,at(),ii=o}else e.current=n;if(wi)wi=!1,_i=e,xi=t;else for(vi=i;null!==vi;)t=vi.nextEffect,vi.nextEffect=null,vi=t;if(0===(t=e.firstPendingTime)&&(bi=null),1073741823===t?e===Ei?Si++:(Si=0,Ei=e):Si=0,"function"==typeof ro&&ro(n.stateNode,r),Ri(e),mi)throw mi=!1,e=yi,yi=null,e;return 0!=(8&ii)||mt(),null}function Zi(){for(;null!==vi;){var e=vi.effectTag;0!=(256&e)&&Dr(vi.alternate,vi),0==(512&e)||wi||(wi=!0,gt(97,(function(){return Xi(),null}))),vi=vi.nextEffect}}function Xi(){if(90!==xi){var e=97<xi?97:xi;return xi=90,ht(e,Qi)}}function Qi(){if(null===_i)return!1;var e=_i;if(_i=null,0!=(48&ii))throw Error(s(331));var t=ii;for(ii|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:Nr(5,n),Lr(5,n)}}catch(t){if(null===e)throw Error(s(330));Ji(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return ii=t,mt(),!0}function Yi(e,t,n){zt(e,t=Zr(e,t=Ir(n,t),1073741823)),null!==(e=Pi(e,1073741823))&&Ri(e)}function Ji(e,t){if(3===e.tag)Yi(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Yi(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===bi||!bi.has(r))){zt(n,e=Xr(n,e=Ir(t,e),1073741823)),null!==(n=Pi(n,1073741823))&&Ri(n);break}}n=n.return}}function eo(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),oi===e&&si===n?ci===ri||ci===ni&&1073741823===li&&ft()-gi<500?Li(e,si):hi=!0:go(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Ri(e)))}function to(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=Ti(t=ki(),e,null)),null!==(e=Pi(e,t))&&Ri(e)}Qr=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||ze.current)ar=!0;else{if(r<n){switch(ar=!1,t.tag){case 3:gr(t),ir();break;case 5:if(ln(t),4&t.mode&&1!==n&&W(t.type,i))return t.expirationTime=t.childExpirationTime=1,null;break;case 1:We(t.type)&&qe(t);break;case 4:cn(t,t.stateNode.containerInfo);break;case 10:jt(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?_r(e,t,n):(De(dn,1&dn.current),null!==(t=Er(e,t,n))?t.sibling:null);De(dn,1&dn.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Sr(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),De(dn,dn.current),!r)return null}return Er(e,t,n)}ar=!1}}else ar=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=Fe(t,Le.current),Rt(t,n),i=Sn(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,We(r)){var o=!0;qe(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Dt(t);var a=r.getDerivedStateFromProps;"function"==typeof a&&Ut(t,r,a,e),i.updater=qt,t.stateNode=i,i._reactInternalFiber=t,Zt(t,r,e,n),t=hr(null,t,r,!0,o,n)}else t.tag=0,sr(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,o=t.tag=function(e){if("function"==typeof e)return so(e)?1:0;if(null!=e){if((e=e.$$typeof)===y)return 11;if(e===_)return 14}return 2}(i),e=Ot(i,e),o){case 0:t=dr(null,t,i,e,n);break e;case 1:t=pr(null,t,i,e,n);break e;case 11:t=cr(null,t,i,e,n);break e;case 14:t=ur(null,t,i,Ot(i.type,e),r,n);break e}throw Error(s(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,dr(e,t,r,i=t.elementType===r?i:Ot(r,i),n);case 1:return r=t.type,i=t.pendingProps,pr(e,t,r,i=t.elementType===r?i:Ot(r,i),n);case 3:if(gr(t),r=t.updateQueue,null===e||null===r)throw Error(s(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,Nt(e,t),Ft(t,r,null,n),(r=t.memoizedState.element)===i)ir(),t=Er(e,t,n);else{if((i=t.stateNode.hydrate)&&(Q?(Qn=Se(t.stateNode.containerInfo),Xn=t,i=Yn=!0):i=!1),i)for(n=tn(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else sr(e,t,r,n),ir();t=t.child}return t;case 5:return ln(t),null===e&&tr(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,F(r,i)?a=null:null!==o&&F(r,o)&&(t.effectTag|=16),fr(e,t),4&t.mode&&1!==n&&W(r,i)?(t.expirationTime=t.childExpirationTime=1,t=null):(sr(e,t,a,n),t=t.child),t;case 6:return null===e&&tr(t),null;case 13:return _r(e,t,n);case 4:return cn(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=en(t,null,r,n):sr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,cr(e,t,r,i=t.elementType===r?i:Ot(r,i),n);case 7:return sr(e,t,t.pendingProps,n),t.child;case 8:case 12:return sr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,jt(t,o=i.value),null!==a){var c=a.value;if(0==(o=wt(c,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(c,o):1073741823))){if(a.children===i.children&&!ze.current){t=Er(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var u=c.dependencies;if(null!==u){a=c.child;for(var l=u.firstContext;null!==l;){if(l.context===r&&0!=(l.observedBits&o)){1===c.tag&&((l=Lt(n,null)).tag=2,zt(c,l)),c.expirationTime<n&&(c.expirationTime=n),null!==(l=c.alternate)&&l.expirationTime<n&&(l.expirationTime=n),It(c.return,n),u.expirationTime<n&&(u.expirationTime=n);break}l=l.next}}else a=10===c.tag&&c.type===t.type?null:c.child;if(null!==a)a.return=c;else for(a=c;null!==a;){if(a===t){a=null;break}if(null!==(c=a.sibling)){c.return=a.return,a=c;break}a=a.return}c=a}}sr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,Rt(t,n),r=r(i=At(i,o.unstable_observedBits)),t.effectTag|=1,sr(e,t,r,n),t.child;case 14:return o=Ot(i=t.type,t.pendingProps),ur(e,t,i,o=Ot(i.type,o),r,n);case 15:return lr(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ot(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,We(r)?(e=!0,qe(t)):e=!1,Rt(t,n),Kt(t,r,i),Zt(t,r,i,n),hr(null,t,r,!0,e,n);case 19:return Sr(e,t,n)}throw Error(s(156,t.tag))};var no={current:!1},ro=null,io=null;function oo(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.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function ao(e,t,n,r){return new oo(e,t,n,r)}function so(e){return!(!(e=e.prototype)||!e.isReactComponent)}function co(e,t){var n=e.alternate;return null===n?((n=ao(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function uo(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)so(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case d:return lo(n.children,i,o,t);case m:a=8,i|=7;break;case p:a=8,i|=1;break;case h:return(e=ao(12,n,t,8|i)).elementType=h,e.type=h,e.expirationTime=o,e;case b:return(e=ao(13,n,t,i)).type=b,e.elementType=b,e.expirationTime=o,e;case w:return(e=ao(19,n,t,i)).elementType=w,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case g:a=10;break e;case v:a=9;break e;case y:a=11;break e;case _:a=14;break e;case x:a=16,r=null;break e;case O:a=22;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=ao(a,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function lo(e,t,n,r){return(e=ao(7,e,r,t)).expirationTime=n,e}function fo(e,t,n){return(e=ao(6,e,null,t)).expirationTime=n,e}function po(e,t,n){return(t=ao(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ho(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=G,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function go(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function vo(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function mo(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function yo(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}var bo=null;function wo(e){var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(s(188));throw Error(s(268,Object.keys(e)))}return null===(e=P(t))?null:e.stateNode}function _o(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function xo(e,t){_o(e,t),(e=e.alternate)&&_o(e,t)}var Oo=c.IsSomeRendererActing,So="function"==typeof o.unstable_flushAllWithoutAsserting,Eo=o.unstable_flushAllWithoutAsserting||function(){for(var e=!1;Xi();)e=!0;return e};function Co(t){try{Eo(),function(t){if(null===bo)try{var n=("require"+Math.random()).slice(0,7);bo=(e&&e[n])("timers").setImmediate}catch(e){bo=function(e){var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}bo(t)}((function(){Eo()?Co(t):t()}))}catch(e){t(e)}}var ko=0,To=!1,jo={__proto__:null,createContainer:function(e,t,n){return e=new ho(e,t,n),t=ao(3,null,null,2===t?7:1===t?3:0),e.current=t,t.stateNode=e,Dt(t),e},updateContainer:function(e,t,n,r){var i=t.current,o=ki(),a=Ht.suspense;o=Ti(o,i,a);e:if(n){t:{if(k(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(s(170));var c=n;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(We(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(null!==c);throw Error(s(171))}if(1===n.tag){var u=n.type;if(We(u)){n=Ue(n,u,c);break e}}n=c}else n=Ne;return null===t.context?t.context=n:t.pendingContext=n,(t=Lt(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),zt(i,t),ji(i,o),o},batchedEventUpdates:function(e,t){var n=ii;ii|=2;try{return e(t)}finally{0===(ii=n)&&mt()}},batchedUpdates:Di,unbatchedUpdates:function(e,t){var n=ii;ii&=-2,ii|=8;try{return e(t)}finally{0===(ii=n)&&mt()}},deferredUpdates:function(e){return ht(97,e)},syncUpdates:function(e,t,n,r){return ht(99,e.bind(null,t,n,r))},discreteUpdates:function(e,t,n,r,i){var o=ii;ii|=4;try{return ht(98,e.bind(null,t,n,r,i))}finally{0===(ii=o)&&mt()}},flushDiscreteUpdates:function(){0==(49&ii)&&(function(){if(null!==Oi){var e=Oi;Oi=null,e.forEach((function(e,t){yo(t,e),Ri(t)})),mt()}}(),Xi())},flushControlled:function(e){var t=ii;ii|=1;try{ht(99,e)}finally{0===(ii=t)&&mt()}},flushSync:Ni,flushPassiveEffects:Xi,IsThisRendererActing:no,getPublicRootInstance:function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:return I(e.child.stateNode);default:return e.child.stateNode}},attemptSynchronousHydration:function(e){switch(e.tag){case 3:var t=e.stateNode;t.hydrate&&function(e,t){yo(e,t),Ri(e),0==(48&ii)&&mt()}(t,t.firstPendingTime);break;case 13:Ni((function(){return ji(e,1073741823)})),t=bt(ki(),150,100),xo(e,t)}},attemptUserBlockingHydration:function(e){if(13===e.tag){var t=bt(ki(),150,100);ji(e,t),xo(e,t)}},attemptContinuousHydration:function(e){13===e.tag&&(ji(e,3),xo(e,3))},attemptHydrationAtCurrentPriority:function(e){if(13===e.tag){var t=ki();ji(e,t=Ti(t,e,null)),xo(e,t)}},findHostInstance:wo,findHostInstanceWithWarning:function(e){return wo(e)},findHostInstanceWithNoPortals:function(e){return null===(e=function(e){if(!(e=j(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}(e))?null:20===e.tag?e.stateNode.instance:e.stateNode},shouldSuspend:function(){return!1},injectIntoDevTools:function(e){var t=e.findFiberByHostInstance;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);ro=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},io=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}return!0}(r({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=P(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))},act:function(e){function t(){ko--,Oo.current=n,no.current=r}!1===To&&(To=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),ko++;var n=Oo.current,r=no.current;Oo.current=!0,no.current=!0;try{var i=Di(e)}catch(e){throw t(),e}if(null!==i&&"object"==typeof i&&"function"==typeof i.then)return{then:function(e,r){i.then((function(){1<ko||!0===So&&!0===n?(t(),e()):Co((function(n){t(),n?r(n):e()}))}),(function(e){t(),r(e)}))}};try{1!==ko||!1!==So&&!1!==n||Eo(),t()}catch(e){throw t(),e}return{then:function(e){e()}}}},Po=jo&&jo.default||jo;e.exports=Po.default||Po;var Io=e.exports;return e.exports=t,Io}}));function X(e,t,n,r,i){}X.resetWarningCache=function(){};var Q=0,Y={__interactionsRef:null,__subscriberRef:null,unstable_clear:function(e){return e()},unstable_getCurrent:function(){return null},unstable_getThreadID:function(){return++Q},unstable_subscribe:function(){},unstable_trace:function(e,t,n){return n()},unstable_unsubscribe:function(){},unstable_wrap:function(e){return e}},J=F((function(e,t){})),ee=(J.__interactionsRef,J.__subscriberRef,J.unstable_clear,J.unstable_getCurrent,J.unstable_getThreadID,J.unstable_subscribe,J.unstable_trace,J.unstable_unsubscribe,J.unstable_wrap,F((function(e){e.exports=Y})),F((function(e){})),F((function(e){e.exports=Z}))),te=function(e,t){return e===t||e!=e&&t!=t},ne=function(e,t){for(var n=e.length;n--;)if(te(e[n][0],t))return n;return-1},re=Array.prototype.splice;
/** @license React v0.19.1
* scheduler-tracing.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.
*/function ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ie.prototype.clear=function(){this.__data__=[],this.size=0},ie.prototype.delete=function(e){var t=this.__data__,n=ne(t,e);return!(n<0||(n==t.length-1?t.pop():re.call(t,n,1),--this.size,0))},ie.prototype.get=function(e){var t=this.__data__,n=ne(t,e);return n<0?void 0:t[n][1]},ie.prototype.has=function(e){return ne(this.__data__,e)>-1},ie.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var oe,ae=ie,se="object"==typeof B&&B&&B.Object===Object&&B,ce="object"==typeof self&&self&&self.Object===Object&&self,ue=se||ce||Function("return this")(),le=ue.Symbol,fe=Object.prototype,de=fe.hasOwnProperty,pe=fe.toString,he=le?le.toStringTag:void 0,ge=Object.prototype.toString,ve=le?le.toStringTag:void 0,me=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ve&&ve in Object(e)?function(e){var t=de.call(e,he),n=e[he];try{e[he]=void 0;var r=!0}catch(e){}var i=pe.call(e);return r&&(t?e[he]=n:delete e[he]),i}(e):function(e){return ge.call(e)}(e)},ye=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},be=function(e){if(!ye(e))return!1;var t=me(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},we=ue["__core-js_shared__"],_e=(oe=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+oe:"",xe=Function.prototype.toString,Oe=function(e){if(null!=e){try{return xe.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Se=/^\[object .+?Constructor\]$/,Ee=Function.prototype,Ce=Object.prototype,ke=Ee.toString,Te=Ce.hasOwnProperty,je=RegExp("^"+ke.call(Te).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pe=function(e){return!(!ye(e)||function(e){return!!_e&&_e in e}(e))&&(be(e)?je:Se).test(Oe(e))},Ie=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(n)?n:void 0},Re=Ie(ue,"Map"),Ae=Ie(Object,"create"),Me=Object.prototype.hasOwnProperty,De=Object.prototype.hasOwnProperty;function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ne.prototype.clear=function(){this.__data__=Ae?Ae(null):{},this.size=0},Ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ne.prototype.get=function(e){var t=this.__data__;if(Ae){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Me.call(t,e)?t[e]:void 0},Ne.prototype.has=function(e){var t=this.__data__;return Ae?void 0!==t[e]:De.call(t,e)},Ne.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ae&&void 0===t?"__lodash_hash_undefined__":t,this};var Le=Ne,ze=function(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map};function Be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Be.prototype.clear=function(){this.size=0,this.__data__={hash:new Le,map:new(Re||ae),string:new Le}},Be.prototype.delete=function(e){var t=ze(this,e).delete(e);return this.size-=t?1:0,t},Be.prototype.get=function(e){return ze(this,e).get(e)},Be.prototype.has=function(e){return ze(this,e).has(e)},Be.prototype.set=function(e,t){var n=ze(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Fe=Be;function We(e){var t=this.__data__=new ae(e);this.size=t.size}We.prototype.clear=function(){this.__data__=new ae,this.size=0},We.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},We.prototype.get=function(e){return this.__data__.get(e)},We.prototype.has=function(e){return this.__data__.has(e)},We.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ae){var r=n.__data__;if(!Re||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fe(r)}return n.set(e,t),this.size=n.size,this};var He=We;function Ve(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Fe;++t<n;)this.add(e[t])}Ve.prototype.add=Ve.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ve.prototype.has=function(e){return this.__data__.has(e)};var Ue=Ve,qe=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Ge=function(e,t){return e.has(t)},Ke=function(e,t,n,r,i,o){var a=1&n,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var l=-1,f=!0,d=2&n?new Ue:void 0;for(o.set(e,t),o.set(t,e);++l<s;){var p=e[l],h=t[l];if(r)var g=a?r(h,p,l,t,e,o):r(p,h,l,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(d){if(!qe(t,(function(e,t){if(!Ge(d,t)&&(p===e||i(p,e,n,r,o)))return d.push(t)}))){f=!1;break}}else if(p!==h&&!i(p,h,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f},$e=ue.Uint8Array,Ze=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Xe=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Qe=le?le.prototype:void 0,Ye=Qe?Qe.valueOf:void 0,Je=Array.isArray,et=Object.prototype.propertyIsEnumerable,tt=Object.getOwnPropertySymbols,nt=tt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(tt(e),(function(t){return et.call(e,t)})))}:function(){return[]},rt=function(e){return null!=e&&"object"==typeof e},it=function(e){return rt(e)&&"[object Arguments]"==me(e)},ot=Object.prototype,at=ot.hasOwnProperty,st=ot.propertyIsEnumerable,ct=it(function(){return arguments}())?it:function(e){return rt(e)&&at.call(e,"callee")&&!st.call(e,"callee")},ut=function(){return!1},lt=F((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n?ue.Buffer:void 0,o=(i?i.isBuffer:void 0)||ut;e.exports=o})),ft=/^(?:0|[1-9]\d*)$/,dt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ft.test(e))&&e>-1&&e%1==0&&e<t},pt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ht={};ht["[object Float32Array]"]=ht["[object Float64Array]"]=ht["[object Int8Array]"]=ht["[object Int16Array]"]=ht["[object Int32Array]"]=ht["[object Uint8Array]"]=ht["[object Uint8ClampedArray]"]=ht["[object Uint16Array]"]=ht["[object Uint32Array]"]=!0,ht["[object Arguments]"]=ht["[object Array]"]=ht["[object ArrayBuffer]"]=ht["[object Boolean]"]=ht["[object DataView]"]=ht["[object Date]"]=ht["[object Error]"]=ht["[object Function]"]=ht["[object Map]"]=ht["[object Number]"]=ht["[object Object]"]=ht["[object RegExp]"]=ht["[object Set]"]=ht["[object String]"]=ht["[object WeakMap]"]=!1;var gt=F((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n&&se.process,o=function(){try{return r&&r.require&&r.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o})),vt=gt&&gt.isTypedArray,mt=vt?function(e){return function(t){return e(t)}}(vt):function(e){return rt(e)&&pt(e.length)&&!!ht[me(e)]},yt=Object.prototype.hasOwnProperty,bt=function(e,t){var n=Je(e),r=!n&&ct(e),i=!n&&!r&&lt(e),o=!n&&!r&&!i&&mt(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)!t&&!yt.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||dt(u,c))||s.push(u);return s},wt=Object.prototype,_t=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),xt=Object.prototype.hasOwnProperty,Ot=function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||wt)}(e))return _t(e);var t=[];for(var n in Object(e))xt.call(e,n)&&"constructor"!=n&&t.push(n);return t},St=function(e){return function(e){return null!=e&&pt(e.length)&&!be(e)}(e)?bt(e):Ot(e)},Et=function(e){return function(e,t,n){var r=t(e);return Je(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,St,nt)},Ct=Object.prototype.hasOwnProperty,kt=Ie(ue,"DataView"),Tt=Ie(ue,"Promise"),jt=Ie(ue,"Set"),Pt=Ie(ue,"WeakMap"),It=Oe(kt),Rt=Oe(Re),At=Oe(Tt),Mt=Oe(jt),Dt=Oe(Pt),Nt=me;(kt&&"[object DataView]"!=Nt(new kt(new ArrayBuffer(1)))||Re&&"[object Map]"!=Nt(new Re)||Tt&&"[object Promise]"!=Nt(Tt.resolve())||jt&&"[object Set]"!=Nt(new jt)||Pt&&"[object WeakMap]"!=Nt(new Pt))&&(Nt=function(e){var t=me(e),n="[object Object]"==t?e.constructor:void 0,r=n?Oe(n):"";if(r)switch(r){case It:return"[object DataView]";case Rt:return"[object Map]";case At:return"[object Promise]";case Mt:return"[object Set]";case Dt:return"[object WeakMap]"}return t});var Lt=Nt,zt=Object.prototype.hasOwnProperty,Bt=function(e,t,n,r,i,o){var a=Je(e),s=Je(t),c=a?"[object Array]":Lt(e),u=s?"[object Array]":Lt(t),l="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),d=c==u;if(d&&lt(e)){if(!lt(t))return!1;a=!0,l=!1}if(d&&!l)return o||(o=new He),a||mt(e)?Ke(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return te(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Ze;case"[object Set]":var c=1&r;if(s||(s=Xe),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var l=Ke(s(e),s(t),r,i,o,a);return a.delete(e),l;case"[object Symbol]":if(Ye)return Ye.call(e)==Ye.call(t)}return!1}(e,t,c,n,r,i,o);if(!(1&n)){var p=l&&zt.call(e,"__wrapped__"),h=f&&zt.call(t,"__wrapped__");if(p||h){var g=p?e.value():e,v=h?t.value():t;return o||(o=new He),i(g,v,n,r,o)}}return!!d&&(o||(o=new He),function(e,t,n,r,i,o){var a=1&n,s=Et(e),c=s.length;if(c!=Et(t).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in t:Ct.call(t,l)))return!1}var f=o.get(e);if(f&&o.get(t))return f==t;var d=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<c;){var h=e[l=s[u]],g=t[l];if(r)var v=a?r(g,h,l,t,e,o):r(h,g,l,e,t,o);if(!(void 0===v?h===g||i(h,g,n,r,o):v)){d=!1;break}p||(p="constructor"==l)}if(d&&!p){var m=e.constructor,y=t.constructor;m==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y||(d=!1)}return o.delete(e),o.delete(t),d}(e,t,n,r,i,o))},Ft=function(e,t){return function e(t,n,r,i,o){return t===n||(null==t||null==n||!rt(t)&&!rt(n)?t!=t&&n!=n:Bt(t,n,r,i,e,o))}(e,t)};function Wt(e,t){Object.entries(t).forEach((function(t){var n=_(t,2),r=n[0],i=n[1];if("children"!==r){var o=e[r];o?o.push(i):e[r]=[i]}}))}function Ht(e){return function(t,n,r){var i,o=n.children,a=n.pathData,s=m(n,["children","pathData"]),c=e[t];return c&&(i=c(s,r,o),a&&(i.pathData=a)),i}}var Vt=Ht(E),Ut={getRootHostContext:function(e){return e},getChildHostContext:function(e,t,n){return{}},getPublicInstance:function(e){return e},createInstance:Vt,appendInitialChild:function(e,t){e instanceof s.Group&&t instanceof s.Item?e.addChild(t):e instanceof s.TextItem&&"string"==typeof t&&Object.assign(e,{content:t})},finalizeInitialChildren:function(e,t,n){return!0},commitMount:function(e,t,n,r){},prepareUpdate:function(e,t,n,r,i,o){return function(e,t){var n=[],r={};return Wt(r,e),Wt(r,t),Object.entries(r).forEach((function(e){var r=_(e,2),i=r[0],o=r[1];if(1===o.length)if(i in t){var a=_(o,1)[0];n.push(i,a)}else n.push(i,null);else if(2===o.length){var s=_(o,2),c=s[0],u=s[1];Ft(c,u)||n.push(i,u)}})),n.length?n:null}(n,r)},shouldSetTextContent:function(e,t){return"string"==typeof t.children},shouldDeprioritizeSubtree:function(e,t){return!1},createTextInstance:function(e,t,n,r){return e},scheduleDeferredCallback:"undefined"!=typeof window?window.requestIdleCallback:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};setTimeout(e,t.timeout)},prepareForCommit:function(){},resetAfterCommit:function(){},now:Date.now,supportsMutation:!0,commitUpdate:function(e,t,n,r,i,o){!function(e,t){for(var n=1;n<t.length;n+=2){var r=t[n-1],i=t[n];"center"===r?e.position=i:"from"===r?e.firstSegment.point=i:"to"===r?e.lastSegment.point=i:r in e?e[r]=i:console.log("instance does not have property ".concat(r),e)}}(e,t)},commitTextUpdate:function(e,t,n){},resetTextContent:function(e){},appendChild:function(e,t){e instanceof s.Group&&t instanceof s.Item&&e.addChild(t)},appendChildToContainer:function(e,t){if(t instanceof s.Item){var n=e.project.layers,r=n.$$default,i=n.$$metadata;t instanceof s.Layer?t.insertBelow(i):t.addTo(r)}else t instanceof s.Tool&&t.activate()},insertBefore:function(e,t,n){},insertInContainerBefore:function(e,t,n){var r=e.project.layers,i=r.$$default,o=r.$$metadata;t instanceof s.Layer&&n instanceof s.Layer?t.insertBelow(n):t instanceof s.Layer?t.insertBelow(o):t instanceof s.Item&&n instanceof s.Layer?t.addTo(i):t instanceof s.Item&&n instanceof s.Item&&t.insertBelow(n)},removeChild:function(e,t){t.remove()},removeChildFromContainer:function(e,t){t instanceof Object&&t.remove()}},qt=function(){function e(){c(this,e),this.defaultHostConfig=Ut,this.defaultTypes=E,this.reconciler=void 0,this.createInstance=void 0;var t=this.getInstanceFactory(),n=this.getHostConfig();this.defaultTypes!==t&&Ut===n?(this.createInstance=Ht(t),n=h(h({},n),{},{createInstance:this.createInstance})):this.createInstance=Vt,this.reconciler=ee(n)}return l(e,[{key:"getInstanceFactory",value:function(){return this.defaultTypes}},{key:"getHostConfig",value:function(){return this.defaultHostConfig}}]),e}();function Gt(e,t){return"function"==typeof t?t(e):t||{}}var Kt,$t,Zt,Xt=function(){return function(e,t,n){return h(h({},Gt(n,t)),Gt(n,e))}},Qt=function(e){var t,n;return n=t=function(t){g(r,o.Component);var n=w(r);function r(e){var t;c(this,r),(t=n.call(this,e)).mergeContainerProps=z(Xt()),t.mergeViewProps=z(Xt()),t.mergeCanvasProps=z(Xt()),t.renderer=void 0;var i=e.renderer,o=void 0===i?qt:i;return t.renderer=new o,t.state={paper:t.renderer.createInstance(S.PaperScope,{},s),mergeProps:e.mergeProps||function(n){return t.setState((function(t){return n(t,e)}))}},t}return l(r,[{key:"render",value:function(){var t=this.props,n=t.innerRef,r=t.children,i=t.viewProps,a=t.canvasProps,s=m(t,["innerRef","children","viewProps","canvasProps"]),c=this.state,u=c.viewProps,l=c.canvasProps,f=m(c,["viewProps","canvasProps"]);return o.createElement(e,d({},this.mergeContainerProps(f,s,f.paper),{viewProps:this.mergeViewProps(u,i,f.paper),canvasProps:this.mergeCanvasProps(l,a,f.paper),ref:n,renderer:this.renderer}),o.createElement(D.Provider,{value:f},r))}}]),r}(),t.defaultProps={renderer:qt,children:null},n}((Zt=$t=function(e){g(n,o.Component);var t=w(n);function n(e){var r;c(this,n),(r=t.call(this,e)).mountNode=void 0,r.canvas=void 0,r.update=function(){var e=r.props,t=e.paper,n=e.viewProps,i=e.renderer,o=e.children;Object.assign(t.view,n),i.reconciler.updateContainer(o,r.mountNode,y(r))};var i=r.props,a=i.renderer,s=i.paper;return r.mountNode=a.reconciler.createContainer(s),r.canvas=o.createRef(),r}return l(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.paper,n=e.onMount;if(this.canvas.current){t.setup(this.canvas.current);var r=this.newLayer({name:"$$default"});this.newLayer({name:"$$metadata"}),r.activate(),this.update()}n&&n(t)}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.props.renderer.reconciler.updateContainer(null,this.mountNode,this)}},{key:"newLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.props,n=t.paper,r=t.renderer;return n.project.addLayer(r.createInstance(S.Layer,e,n))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.canvasProps;return o.createElement("canvas",d({},n,{className:t,ref:this.canvas}))}}]),n}(),$t.defaultProps={onMount:function(){}},Kt=Zt))||Kt,Yt=o.forwardRef((function(e,t){return o.createElement(Qt,d({},e,{innerRef:t}))}));t.CONSTANTS=S,t.Circle=A,t.Group=j,t.Layer=T,t.Line=I,t.PaperContainer=Yt,t.PaperRenderer=qt,t.PaperScope=function(e){return function(t){return a.createElement(D.Consumer,null,(function(n){return a.createElement(e,d({},t,n))}))}},t.Path=P,t.PointText=M,t.Rectangle=R,t.Tool=k,t.components=C,t.default={render:function(){}},t.getProps=Gt,t.renderWithPaperScope=function(e){return a.createElement(D.Consumer,null,(function(t){var n=t.paper;return e(n)}))}}).call(this,n(91))},function(e,t,n){"use strict";n.r(t),n.d(t,"Node",(function(){return re})),n.d(t,"Parser",(function(){return F})),n.d(t,"Position",(function(){return M})),n.d(t,"SourceLocation",(function(){return D})),n.d(t,"TokContext",(function(){return ae})),n.d(t,"Token",(function(){return je})),n.d(t,"TokenType",(function(){return v})),n.d(t,"defaultOptions",(function(){return L})),n.d(t,"getLineInfo",(function(){return N})),n.d(t,"isIdentifierChar",(function(){return g})),n.d(t,"isIdentifierStart",(function(){return h})),n.d(t,"isNewLine",(function(){return E})),n.d(t,"keywordTypes",(function(){return w})),n.d(t,"lineBreak",(function(){return O})),n.d(t,"lineBreakG",(function(){return S})),n.d(t,"nonASCIIwhitespace",(function(){return C})),n.d(t,"parse",(function(){return Me})),n.d(t,"parseExpressionAt",(function(){return De})),n.d(t,"tokContexts",(function(){return se})),n.d(t,"tokTypes",(function(){return x})),n.d(t,"tokenizer",(function(){return Ne})),n.d(t,"version",(function(){return Ae}));var r={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},i="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",o={5:i,"5module":i+" export import",6:i+" const class extends export import super"},a=/^in(stanceof)?$/,s="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA--zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",c="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍--_",u=new RegExp("["+s+"]"),l=new RegExp("["+s+c+"]");s=c=null;var f=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],d=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239];function p(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}}function h(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&u.test(String.fromCharCode(e)):!1!==t&&p(e,f)))}function g(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&l.test(String.fromCharCode(e)):!1!==t&&(p(e,f)||p(e,d)))))}var v=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function m(e,t){return new v(e,{beforeExpr:!0,binop:t})}var y={beforeExpr:!0},b={startsExpr:!0},w={};function _(e,t){return void 0===t&&(t={}),t.keyword=e,w[e]=new v(e,t)}var x={num:new v("num",b),regexp:new v("regexp",b),string:new v("string",b),name:new v("name",b),eof:new v("eof"),bracketL:new v("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new v("]"),braceL:new v("{",{beforeExpr:!0,startsExpr:!0}),braceR:new v("}"),parenL:new v("(",{beforeExpr:!0,startsExpr:!0}),parenR:new v(")"),comma:new v(",",y),semi:new v(";",y),colon:new v(":",y),dot:new v("."),question:new v("?",y),arrow:new v("=>",y),template:new v("template"),invalidTemplate:new v("invalidTemplate"),ellipsis:new v("...",y),backQuote:new v("`",b),dollarBraceL:new v("${",{beforeExpr:!0,startsExpr:!0}),eq:new v("=",{beforeExpr:!0,isAssign:!0}),assign:new v("_=",{beforeExpr:!0,isAssign:!0}),incDec:new v("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new v("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=/===/!==",6),relational:m("</>/<=/>=",7),bitShift:m("<</>>/>>>",8),plusMin:new v("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new v("**",{beforeExpr:!0}),_break:_("break"),_case:_("case",y),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",y),_do:_("do",{isLoop:!0,beforeExpr:!0}),_else:_("else",y),_finally:_("finally"),_for:_("for",{isLoop:!0}),_function:_("function",b),_if:_("if"),_return:_("return",y),_switch:_("switch"),_throw:_("throw",y),_try:_("try"),_var:_("var"),_const:_("const"),_while:_("while",{isLoop:!0}),_with:_("with"),_new:_("new",{beforeExpr:!0,startsExpr:!0}),_this:_("this",b),_super:_("super",b),_class:_("class",b),_extends:_("extends",y),_export:_("export"),_import:_("import",b),_null:_("null",b),_true:_("true",b),_false:_("false",b),_in:_("in",{beforeExpr:!0,binop:7}),_instanceof:_("instanceof",{beforeExpr:!0,binop:7}),_typeof:_("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:_("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:_("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},O=/\r\n?|\n|\u2028|\u2029/,S=new RegExp(O.source,"g");function E(e,t){return 10===e||13===e||!t&&(8232===e||8233===e)}var C=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,k=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,T=Object.prototype,j=T.hasOwnProperty,P=T.toString;function I(e,t){return j.call(e,t)}var R=Array.isArray||function(e){return"[object Array]"===P.call(e)};function A(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var M=function(e,t){this.line=e,this.column=t};M.prototype.offset=function(e){return new M(this.line,this.column+e)};var D=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function N(e,t){for(var n=1,r=0;;){S.lastIndex=r;var i=S.exec(e);if(!(i&&i.index<t))return new M(n,t-r);++n,r=i.index+i[0].length}}var L={ecmaVersion:9,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function z(e){var t={};for(var n in L)t[n]=e&&I(e,n)?e[n]:L[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),R(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return R(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,o,a,s){var c={type:n?"Block":"Line",value:r,start:i,end:o};e.locations&&(c.loc=new D(this,a,s)),e.ranges&&(c.range=[i,o]),t.push(c)}}(t,t.onComment)),t}function B(e,t){return 2|(e?4:0)|(t?8:0)}var F=function(e,t,n){this.options=e=z(e),this.sourceFile=e.sourceFile,this.keywords=A(o[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var i="";if(!0!==e.allowReserved){for(var a=e.ecmaVersion;!(i=r[a]);a--);"module"===e.sourceType&&(i+=" await")}this.reservedWords=A(i);var s=(i?i+" ":"")+r.strict;this.reservedWordsStrict=A(s),this.reservedWordsStrictBind=A(s+" "+r.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(O).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=x.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},W={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};F.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},W.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},W.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},W.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},W.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},W.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},W.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},F.prototype.inNonArrowFunction=function(){return(2&this.currentThisScope().flags)>0},F.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},F.parse=function(e,t){return new this(t,e).parse()},F.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},F.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(F.prototype,W);var H=F.prototype,V=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function U(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}H.strictDirective=function(e){for(;;){k.lastIndex=e,e+=k.exec(this.input)[0].length;var t=V.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2]))return!0;e+=t[0].length,k.lastIndex=e,e+=k.exec(this.input)[0].length,";"===this.input[e]&&e++}},H.eat=function(e){return this.type===e&&(this.next(),!0)},H.isContextual=function(e){return this.type===x.name&&this.value===e&&!this.containsEsc},H.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},H.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},H.canInsertSemicolon=function(){return this.type===x.eof||this.type===x.braceR||O.test(this.input.slice(this.lastTokEnd,this.start))},H.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},H.semicolon=function(){this.eat(x.semi)||this.insertSemicolon()||this.unexpected()},H.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},H.expect=function(e){this.eat(e)||this.unexpected()},H.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},H.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},H.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},H.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},H.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var q=F.prototype;q.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==x.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var o=i[r];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var G={kind:"loop"},K={kind:"switch"};q.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;k.lastIndex=this.pos;var t=k.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r)return!0;if(e)return!1;if(123===r)return!0;if(h(r,!0)){for(var i=n+1;g(this.input.charCodeAt(i),!0);)++i;var o=this.input.slice(n,i);if(!a.test(o))return!0}return!1},q.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;k.lastIndex=this.pos;var e=k.exec(this.input),t=this.pos+e[0].length;return!(O.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!==this.input.length&&g(this.input.charAt(t+8)))},q.parseStatement=function(e,t,n){var r,i=this.type,o=this.startNode();switch(this.isLet(e)&&(i=x._var,r="let"),i){case x._break:case x._continue:return this.parseBreakContinueStatement(o,i.keyword);case x._debugger:return this.parseDebuggerStatement(o);case x._do:return this.parseDoStatement(o);case x._for:return this.parseForStatement(o);case x._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(o,!1,!e);case x._class:return e&&this.unexpected(),this.parseClass(o,!0);case x._if:return this.parseIfStatement(o);case x._return:return this.parseReturnStatement(o);case x._switch:return this.parseSwitchStatement(o);case x._throw:return this.parseThrowStatement(o);case x._try:return this.parseTryStatement(o);case x._const:case x._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(o,r);case x._while:return this.parseWhileStatement(o);case x._with:return this.parseWithStatement(o);case x.braceL:return this.parseBlock(!0,o);case x.semi:return this.parseEmptyStatement(o);case x._export:case x._import:if(this.options.ecmaVersion>10&&i===x._import){k.lastIndex=this.pos;var a=k.exec(this.input),s=this.pos+a[0].length;if(40===this.input.charCodeAt(s))return this.parseExpressionStatement(o,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===x._import?this.parseImport(o):this.parseExport(o,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(o,!0,!e);var c=this.value,u=this.parseExpression();return i===x.name&&"Identifier"===u.type&&this.eat(x.colon)?this.parseLabeledStatement(o,c,u,e):this.parseExpressionStatement(o,u)}},q.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(x.semi)||this.insertSemicolon()?e.label=null:this.type!==x.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},q.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},q.parseDoStatement=function(e){return this.next(),this.labels.push(G),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(x._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(x.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},q.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(G),this.enterScope(0),this.expect(x.parenL),this.type===x.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===x._var||this.type===x._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),(this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===r.declarations.length?(this.options.ecmaVersion>=9&&(this.type===x._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var o=new U,a=this.parseExpression(!0,o);return this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===x._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(a,!1,o),this.checkLVal(a),this.parseForIn(e,a)):(this.checkExpressionErrors(o,!0),t>-1&&this.unexpected(t),this.parseFor(e,a))},q.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Z|(n?0:X),!1,t)},q.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(x._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},q.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(x.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},q.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(x.braceL),this.labels.push(K),this.enterScope(0);for(var n=!1;this.type!==x.braceR;)if(this.type===x._case||this.type===x._default){var r=this.type===x._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(x.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},q.parseThrowStatement=function(e){return this.next(),O.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var $=[];q.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===x._catch){var t=this.startNode();if(this.next(),this.eat(x.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLVal(t.param,n?4:2),this.expect(x.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(x._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},q.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},q.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(G),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},q.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},q.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},q.parseLabeledStatement=function(e,t,n,r){for(var i=0,o=this.labels;i<o.length;i+=1){o[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===x._switch?"switch":null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart!==e.start)break;c.statementStart=this.start,c.kind=a}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},q.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},q.parseBlock=function(e,t){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(x.braceL),e&&this.enterScope(0);!this.eat(x.braceR);){var n=this.parseStatement(null);t.body.push(n)}return e&&this.exitScope(),this.finishNode(t,"BlockStatement")},q.parseFor=function(e,t){return e.init=t,this.expect(x.semi),e.test=this.type===x.semi?null:this.parseExpression(),this.expect(x.semi),e.update=this.type===x.parenR?null:this.parseExpression(),this.expect(x.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},q.parseForIn=function(e,t){var n=this.type===x._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)?this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"):"AssignmentPattern"===t.type&&this.raise(t.start,"Invalid left-hand side in for-loop"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(x.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},q.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(x.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===r.id.type||t&&(this.type===x._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(x.comma))break}return e},q.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?1:2,!1)};var Z=1,X=2;q.parseFunction=function(e,t,n,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===x.star&&t&X&&this.unexpected(),e.generator=this.eat(x.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Z&&(e.id=4&t&&this.type!==x.name?null:this.parseIdent(),!e.id||t&X||this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(B(e.async,e.generator)),t&Z||(e.id=this.type===x.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&Z?"FunctionDeclaration":"FunctionExpression")},q.parseFunctionParams=function(e){this.expect(x.parenL),e.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},q.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(x.braceL);!this.eat(x.braceR);){var o=this.parseClassElement(null!==e.superClass);o&&(r.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind&&(i&&this.raise(o.start,"Duplicate constructor in the same class"),i=!0))}return e.body=this.finishNode(r,"ClassBody"),this.strict=n,this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},q.parseClassElement=function(e){var t=this;if(this.eat(x.semi))return null;var n=this.startNode(),r=function(e,r){void 0===r&&(r=!1);var i=t.start,o=t.startLoc;return!!t.eatContextual(e)&&(!(t.type===x.parenL||r&&t.canInsertSemicolon())||(n.key&&t.unexpected(),n.computed=!1,n.key=t.startNodeAt(i,o),n.key.name=e,t.finishNode(n.key,"Identifier"),!1))};n.kind="method",n.static=r("static");var i=this.eat(x.star),o=!1;i||(this.options.ecmaVersion>=8&&r("async",!0)?(o=!0,i=this.options.ecmaVersion>=9&&this.eat(x.star)):r("get")?n.kind="get":r("set")&&(n.kind="set")),n.key||this.parsePropertyName(n);var a=n.key,s=!1;return n.computed||n.static||!("Identifier"===a.type&&"constructor"===a.name||"Literal"===a.type&&"constructor"===a.value)?n.static&&"Identifier"===a.type&&"prototype"===a.name&&this.raise(a.start,"Classes may not have a static property named prototype"):("method"!==n.kind&&this.raise(a.start,"Constructor can't have get/set modifier"),i&&this.raise(a.start,"Constructor can't be a generator"),o&&this.raise(a.start,"Constructor can't be an async method"),n.kind="constructor",s=e),this.parseClassMethod(n,i,o,s),"get"===n.kind&&0!==n.value.params.length&&this.raiseRecoverable(n.value.start,"getter should have no params"),"set"===n.kind&&1!==n.value.params.length&&this.raiseRecoverable(n.value.start,"setter should have exactly one param"),"set"===n.kind&&"RestElement"===n.value.params[0].type&&this.raiseRecoverable(n.value.params[0].start,"Setter cannot use rest params"),n},q.parseClassMethod=function(e,t,n,r){return e.value=this.parseMethod(t,n,r),this.finishNode(e,"MethodDefinition")},q.parseClassId=function(e,t){this.type===x.name?(e.id=this.parseIdent(),t&&this.checkLVal(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},q.parseClassSuper=function(e){e.superClass=this.eat(x._extends)?this.parseExprSubscripts():null},q.parseExport=function(e,t){if(this.next(),this.eat(x.star))return this.expectContextual("from"),this.type!==x.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(x._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===x._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,4|Z,!1,n)}else if(this.type===x._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==x.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var o=0,a=e.specifiers;o<a.length;o+=1){var s=a[o];this.checkUnreserved(s.local),this.checkLocalExport(s.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},q.checkExport=function(e,t,n){e&&(I(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},q.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var o=i[r];this.checkPatternExport(e,o)}else if("ArrayPattern"===n)for(var a=0,s=t.elements;a<s.length;a+=1){var c=s[a];c&&this.checkPatternExport(e,c)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===n&&this.checkPatternExport(e,t.expression)},q.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},q.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},q.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(x.braceL);!this.eat(x.braceR);){if(n)n=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;var r=this.startNode();r.local=this.parseIdent(!0),r.exported=this.eatContextual("as")?this.parseIdent(!0):r.local,this.checkExport(e,r.exported.name,r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},q.parseImport=function(e){return this.next(),this.type===x.string?(e.specifiers=$,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===x.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},q.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===x.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,2),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(x.comma))return e}if(this.type===x.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLVal(r.local,2),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(x.braceL);!this.eat(x.braceR);){if(t)t=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,2),e.push(this.finishNode(i,"ImportSpecifier"))}return e},q.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},q.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var Q=F.prototype;Q.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.toAssignable(o,t),"RestElement"!==o.type||"ArrayPattern"!==o.argument.type&&"ObjectPattern"!==o.argument.type||this.raise(o.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},Q.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var o=e[n-1];6===this.options.ecmaVersion&&t&&o&&"RestElement"===o.type&&"Identifier"!==o.argument.type&&this.unexpected(o.argument.start)}return e},Q.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},Q.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==x.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},Q.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case x.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(x.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case x.braceL:return this.parseObj(!0)}return this.parseIdent()},Q.parseBindingList=function(e,t,n){for(var r=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(x.comma),t&&this.type===x.comma)r.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===x.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),r.push(o),this.type===x.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var a=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(a),r.push(a)}return r},Q.parseBindingListItem=function(e){return e},Q.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(x.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},Q.checkLVal=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Identifier":2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(I(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),0!==t&&5!==t&&this.declareName(e.name,t,e.start);break;case"MemberExpression":t&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.checkLVal(o,t,n)}break;case"Property":this.checkLVal(e.value,t,n);break;case"ArrayPattern":for(var a=0,s=e.elements;a<s.length;a+=1){var c=s[a];c&&this.checkLVal(c,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var Y=F.prototype;Y.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===o&&(t.proto&&(n&&n.doubleProto<0?n.doubleProto=i.start:this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var a=t[r="$"+r];if(a)("init"===o?this.strict&&a.init||a.get||a.set:a.init||a[o])&&this.raiseRecoverable(i.start,"Redefinition of property");else a=t[r]={init:!1,get:!1,set:!1};a[o]=!0}}},Y.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===x.comma){var o=this.startNodeAt(n,r);for(o.expressions=[i];this.eat(x.comma);)o.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return i},Y.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,o=-1,a=-1;t?(i=t.parenthesizedAssign,o=t.trailingComma,a=t.shorthandAssign,t.parenthesizedAssign=t.trailingComma=t.shorthandAssign=-1):(t=new U,r=!0);var s=this.start,c=this.startLoc;this.type!==x.parenL&&this.type!==x.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,s,c)),this.type.isAssign){var l=this.startNodeAt(s,c);return l.operator=this.value,l.left=this.type===x.eq?this.toAssignable(u,!1,t):u,r||U.call(t),t.shorthandAssign=-1,this.checkLVal(u),this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),o>-1&&(t.trailingComma=o),a>-1&&(t.shorthandAssign=a),u},Y.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(x.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(x.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i},Y.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)||i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},Y.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(null!=o&&(!i||this.type!==x._in)&&o>r){var a=this.type===x.logicalOR||this.type===x.logicalAND,s=this.value;this.next();var c=this.start,u=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),c,u,o,i),f=this.buildBinary(t,n,e,l,s,a);return this.parseExprOp(f,t,n,r,i)}return e},Y.buildBinary=function(e,t,n,r,i,o){var a=this.startNodeAt(e,t);return a.left=n,a.operator=i,a.right=r,this.finishNode(a,o?"LogicalExpression":"BinaryExpression")},Y.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))n=this.parseAwait(),t=!0;else if(this.type.prefix){var o=this.startNode(),a=this.type===x.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),a?this.checkLVal(o.argument):this.strict&&"delete"===o.operator&&"Identifier"===o.argument.type?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(o,a?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var s=this.startNodeAt(r,i);s.operator=this.value,s.prefix=!1,s.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(s,"UpdateExpression")}}return!t&&this.eat(x.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},Y.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var o=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===o.type&&(e.parenthesizedAssign>=o.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=o.start&&(e.parenthesizedBind=-1)),o},Y.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(e.start,e.end);;){var o=this.parseSubscript(e,t,n,r,i);if(o===e||"ArrowFunctionExpression"===o.type)return o;e=o}},Y.parseSubscript=function(e,t,n,r,i){var o=this.eat(x.bracketL);if(o||this.eat(x.dot)){var a=this.startNodeAt(t,n);a.object=e,a.property=o?this.parseExpression():this.parseIdent("never"!==this.options.allowReserved),a.computed=!!o,o&&this.expect(x.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!r&&this.eat(x.parenL)){var s=new U,c=this.yieldPos,u=this.awaitPos,l=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var f=this.parseExprList(x.parenR,this.options.ecmaVersion>=8&&"Import"!==e.type,!1,s);if(i&&!this.canInsertSemicolon()&&this.eat(x.arrow))return this.checkPatternErrors(s,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=c,this.awaitPos=u,this.awaitIdentPos=l,this.parseArrowExpression(this.startNodeAt(t,n),f,!0);this.checkExpressionErrors(s,!0),this.yieldPos=c||this.yieldPos,this.awaitPos=u||this.awaitPos,this.awaitIdentPos=l||this.awaitIdentPos;var d=this.startNodeAt(t,n);if(d.callee=e,d.arguments=f,"Import"===d.callee.type){1!==d.arguments.length&&this.raise(d.start,"import() requires exactly one argument");var p=d.arguments[0];p&&"SpreadElement"===p.type&&this.raise(p.start,"... is not allowed in import()")}e=this.finishNode(d,"CallExpression")}else if(this.type===x.backQuote){var h=this.startNodeAt(t,n);h.tag=e,h.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(h,"TaggedTemplateExpression")}return e},Y.parseExprAtom=function(e){this.type===x.slash&&this.readRegexp();var t,n=this.potentialArrowAt===this.start;switch(this.type){case x._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),t=this.startNode(),this.next(),this.type!==x.parenL||this.allowDirectSuper||this.raise(t.start,"super() call outside constructor of a subclass"),this.type!==x.dot&&this.type!==x.bracketL&&this.type!==x.parenL&&this.unexpected(),this.finishNode(t,"Super");case x._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case x.name:var r=this.start,i=this.startLoc,o=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===a.name&&!this.canInsertSemicolon()&&this.eat(x._function))return this.parseFunction(this.startNodeAt(r,i),0,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(x.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[a],!1);if(this.options.ecmaVersion>=8&&"async"===a.name&&this.type===x.name&&!o)return a=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(x.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[a],!0)}return a;case x.regexp:var s=this.value;return(t=this.parseLiteral(s.value)).regex={pattern:s.pattern,flags:s.flags},t;case x.num:case x.string:return this.parseLiteral(this.value);case x._null:case x._true:case x._false:return(t=this.startNode()).value=this.type===x._null?null:this.type===x._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case x.parenL:var c=this.start,u=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),u;case x.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(x.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case x.braceL:return this.parseObj(!1,e);case x._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case x._class:return this.parseClass(this.startNode(),!1);case x._new:return this.parseNew();case x.backQuote:return this.parseTemplate();case x._import:return this.options.ecmaVersion>10?this.parseDynamicImport():this.unexpected();default:this.unexpected()}},Y.parseDynamicImport=function(){var e=this.startNode();return this.next(),this.type!==x.parenL&&this.unexpected(),this.finishNode(e,"Import")},Y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1)),this.next(),this.finishNode(t,"Literal")},Y.parseParenExpression=function(){this.expect(x.parenL);var e=this.parseExpression();return this.expect(x.parenR),e},Y.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,s=this.startLoc,c=[],u=!0,l=!1,f=new U,d=this.yieldPos,p=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==x.parenR;){if(u?u=!1:this.expect(x.comma),i&&this.afterTrailingComma(x.parenR,!0)){l=!0;break}if(this.type===x.ellipsis){o=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===x.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var h=this.start,g=this.startLoc;if(this.expect(x.parenR),e&&!this.canInsertSemicolon()&&this.eat(x.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=p,this.parseParenArrowList(n,r,c);c.length&&!l||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?((t=this.startNodeAt(a,s)).expressions=c,this.finishNodeAt(t,"SequenceExpression",h,g)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(n,r);return v.expression=t,this.finishNode(v,"ParenthesizedExpression")}return t},Y.parseParenItem=function(e){return e},Y.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var J=[];Y.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(x.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),("target"!==e.property.name||n)&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inNonArrowFunction()||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),r,i,!0),this.options.ecmaVersion>10&&"Import"===e.callee.type&&this.raise(e.callee.start,"Cannot use new with import(...)"),this.eat(x.parenL)?e.arguments=this.parseExprList(x.parenR,this.options.ecmaVersion>=8&&"Import"!==e.callee.type,!1):e.arguments=J,this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===x.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===x.backQuote,this.finishNode(n,"TemplateElement")},Y.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===x.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(x.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(x.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Y.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===x.name||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===x.star)&&!O.test(this.input.slice(this.lastTokEnd,this.start))},Y.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(x.braceR);){if(r)r=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;var o=this.parseProperty(e,t);e||this.checkPropClash(o,i,t),n.properties.push(o)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Y.parseProperty=function(e,t){var n,r,i,o,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(x.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===x.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(this.type===x.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),a.argument=this.parseMaybeAssign(!1,t),this.type===x.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||t)&&(i=this.start,o=this.startLoc),e||(n=this.eat(x.star)));var s=this.containsEsc;return this.parsePropertyName(a),!e&&!s&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(a)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(x.star),this.parsePropertyName(a,t)):r=!1,this.parsePropertyValue(a,e,n,r,i,o,t,s),this.finishNode(a,"Property")},Y.parsePropertyValue=function(e,t,n,r,i,o,a,s){if((n||r)&&this.type===x.colon&&this.unexpected(),this.eat(x.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===x.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||s||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===x.comma||this.type===x.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,o,e.key):this.type===x.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,o,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var c="get"===e.kind?0:1;if(e.value.params.length!==c){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},Y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(x.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(x.bracketR),e.key;e.computed=!1}return e.key=this.type===x.num||this.type===x.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Y.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|B(t,r.generator)|(n?128:0)),this.expect(x.parenL),r.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")},Y.parseArrowExpression=function(e,t,n){var r=this.yieldPos,i=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|B(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1),this.yieldPos=r,this.awaitPos=i,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},Y.parseFunctionBody=function(e,t,n){var r=t&&this.type!==x.braceL,i=this.strict,o=!1;if(r)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var s=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!i&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=s}this.exitScope(),this.strict&&e.id&&this.checkLVal(e.id,5),this.strict=i},Y.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){if("Identifier"!==n[t].type)return!1}return!0},Y.checkParams=function(e,t){for(var n={},r=0,i=e.params;r<i.length;r+=1){var o=i[r];this.checkLVal(o,1,t?null:n)}},Y.parseExprList=function(e,t,n,r){for(var i=[],o=!0;!this.eat(e);){if(o)o=!1;else if(this.expect(x.comma),t&&this.afterTrailingComma(e))break;var a=void 0;n&&this.type===x.comma?a=null:this.type===x.ellipsis?(a=this.parseSpread(r),r&&this.type===x.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),i.push(a)}return i},Y.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;(this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},Y.parseIdent=function(e,t){var n=this.startNode();return this.type===x.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(),this.finishNode(n,"Identifier"),e||(this.checkUnreserved(n),"await"!==n.name||this.awaitIdentPos||(this.awaitIdentPos=n.start)),n},Y.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===x.semi||this.canInsertSemicolon()||this.type!==x.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(x.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},Y.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var ee=F.prototype;ee.raise=function(e,t){var n=N(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},ee.raiseRecoverable=ee.raise,ee.curPosition=function(){if(this.options.locations)return new M(this.curLine,this.pos-this.lineStart)};var te=F.prototype,ne=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};te.enterScope=function(e){this.scopeStack.push(new ne(e))},te.exitScope=function(){this.scopeStack.pop()},te.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},te.declareName=function(e,t,n){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var o=this.currentScope();r=this.treatFunctionsAsVar?o.lexical.indexOf(e)>-1:o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var s=this.scopeStack[a];if(s.lexical.indexOf(e)>-1&&!(32&s.flags&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&1&s.flags&&delete this.undefinedExports[e],3&s.flags)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},te.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},te.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},te.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(3&t.flags)return t}},te.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(3&t.flags&&!(16&t.flags))return t}};var re=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new D(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},ie=F.prototype;function oe(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}ie.startNode=function(){return new re(this,this.start,this.startLoc)},ie.startNodeAt=function(e,t){return new re(this,e,t)},ie.finishNode=function(e,t){return oe.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},ie.finishNodeAt=function(e,t,n,r){return oe.call(this,e,t,n,r)};var ae=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},se={b_stat:new ae("{",!1),b_expr:new ae("{",!0),b_tmpl:new ae("${",!1),p_stat:new ae("(",!1),p_expr:new ae("(",!0),q_tmpl:new ae("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new ae("function",!1),f_expr:new ae("function",!0),f_expr_gen:new ae("function",!0,!1,null,!0),f_gen:new ae("function",!1,!1,null,!0)},ce=F.prototype;ce.initialContext=function(){return[se.b_stat]},ce.braceIsBlock=function(e){var t=this.curContext();return t===se.f_expr||t===se.f_stat||(e!==x.colon||t!==se.b_stat&&t!==se.b_expr?e===x._return||e===x.name&&this.exprAllowed?O.test(this.input.slice(this.lastTokEnd,this.start)):e===x._else||e===x.semi||e===x.eof||e===x.parenR||e===x.arrow||(e===x.braceL?t===se.b_stat:e!==x._var&&e!==x._const&&e!==x.name&&!this.exprAllowed):!t.isExpr)},ce.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ce.updateContext=function(e){var t,n=this.type;n.keyword&&e===x.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},x.parenR.updateContext=x.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===se.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},x.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?se.b_stat:se.b_expr),this.exprAllowed=!0},x.dollarBraceL.updateContext=function(){this.context.push(se.b_tmpl),this.exprAllowed=!0},x.parenL.updateContext=function(e){var t=e===x._if||e===x._for||e===x._with||e===x._while;this.context.push(t?se.p_stat:se.p_expr),this.exprAllowed=!0},x.incDec.updateContext=function(){},x._function.updateContext=x._class.updateContext=function(e){!e.beforeExpr||e===x.semi||e===x._else||e===x._return&&O.test(this.input.slice(this.lastTokEnd,this.start))||(e===x.colon||e===x.braceL)&&this.curContext()===se.b_stat?this.context.push(se.f_stat):this.context.push(se.f_expr),this.exprAllowed=!1},x.backQuote.updateContext=function(){this.curContext()===se.q_tmpl?this.context.pop():this.context.push(se.q_tmpl),this.exprAllowed=!1},x.star.updateContext=function(e){if(e===x._function){var t=this.context.length-1;this.context[t]===se.f_expr?this.context[t]=se.f_expr_gen:this.context[t]=se.f_gen}this.exprAllowed=!0},x.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==x.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ue="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",le=ue+" Extended_Pictographic",fe={9:ue,10:le,11:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic"},de="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",pe="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",he=pe+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ge={9:pe,10:he,11:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"},ve={};function me(e){var t=ve[e]={binary:A(fe[e]+" "+de),nonBinary:{General_Category:A(de),Script:A(ge[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}me(9),me(10),me(11);var ye=F.prototype,be=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":""),this.unicodeProperties=ve[e.options.ecmaVersion>=11?11:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function we(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function _e(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function xe(e){return e>=65&&e<=90||e>=97&&e<=122}function Oe(e){return xe(e)||95===e}function Se(e){return Oe(e)||Ee(e)}function Ee(e){return e>=48&&e<=57}function Ce(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function ke(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Te(e){return e>=48&&e<=55}be.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},be.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},be.prototype.at=function(e){var t=this.source,n=t.length;if(e>=n)return-1;var r=t.charCodeAt(e);if(!this.switchU||r<=55295||r>=57344||e+1>=n)return r;var i=t.charCodeAt(e+1);return i>=56320&&i<=57343?(r<<10)+i-56613888:r},be.prototype.nextIndex=function(e){var t=this.source,n=t.length;if(e>=n)return n;var r,i=t.charCodeAt(e);return!this.switchU||i<=55295||i>=57344||e+1>=n||(r=t.charCodeAt(e+1))<56320||r>57343?e+1:e+2},be.prototype.current=function(){return this.at(this.pos)},be.prototype.lookahead=function(){return this.at(this.nextIndex(this.pos))},be.prototype.advance=function(){this.pos=this.nextIndex(this.pos)},be.prototype.eat=function(e){return this.current()===e&&(this.advance(),!0)},ye.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=0;r<n.length;r++){var i=n.charAt(r);-1===t.indexOf(i)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(i,r+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},ye.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},ye.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];-1===e.groupNames.indexOf(r)&&e.raise("Invalid named capture referenced")}},ye.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},ye.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},ye.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},ye.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},ye.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},ye.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},ye.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},ye.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},ye.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},ye.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},ye.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},ye.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},ye.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},ye.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!_e(t)&&(e.lastIntValue=t,e.advance(),!0)},ye.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!_e(n);)e.advance();return e.pos!==t},ye.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},ye.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},ye.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},ye.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=we(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=we(e.lastIntValue);return!0}return!1},ye.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return h(e,!0)||36===e||95===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},ye.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return g(e,!0)||36===e||95===e||8204===e||8205===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},ye.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},ye.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},ye.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},ye.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},ye.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},ye.regexp_eatZero=function(e){return 48===e.current()&&!Ee(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},ye.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},ye.regexp_eatControlLetter=function(e){var t=e.current();return!!xe(t)&&(e.lastIntValue=t%32,e.advance(),!0)},ye.regexp_eatRegExpUnicodeEscapeSequence=function(e){var t,n=e.pos;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(e.switchU&&r>=55296&&r<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=1024*(r-55296)+(o-56320)+65536,!0}e.pos=i,e.lastIntValue=r}return!0}if(e.switchU&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((t=e.lastIntValue)>=0&&t<=1114111))return!0;e.switchU&&e.raise("Invalid unicode escape"),e.pos=n}return!1},ye.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},ye.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},ye.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},ye.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i),!0}return!1},ye.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){I(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},ye.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},ye.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Oe(t=e.current());)e.lastStringValue+=we(t),e.advance();return""!==e.lastStringValue},ye.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Se(t=e.current());)e.lastStringValue+=we(t),e.advance();return""!==e.lastStringValue},ye.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},ye.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},ye.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},ye.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||Te(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},ye.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},ye.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Ee(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},ye.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},ye.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Ee(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},ye.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Ce(n=e.current());)e.lastIntValue=16*e.lastIntValue+ke(n),e.advance();return e.pos!==t},ye.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},ye.regexp_eatOctalDigit=function(e){var t=e.current();return Te(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},ye.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Ce(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+ke(i),e.advance()}return!0};var je=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new D(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Pe=F.prototype;function Ie(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Pe.next=function(){this.options.onToken&&this.options.onToken(new je(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Pe.getToken=function(){return this.next(),new je(this)},"undefined"!=typeof Symbol&&(Pe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===x.eof,value:t}}}}),Pe.curContext=function(){return this.context[this.context.length-1]},Pe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(x.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Pe.readToken=function(e){return h(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Pe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},Pe.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(S.lastIndex=n;(e=S.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,r),n,this.pos,t,this.curPosition())},Pe.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!E(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Pe.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&C.test(String.fromCharCode(e))))break e;++this.pos}}},Pe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Pe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(x.ellipsis)):(++this.pos,this.finishToken(x.dot))},Pe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(x.assign,2):this.finishOp(x.slash,1)},Pe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?x.star:x.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=x.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(x.assign,n+1):this.finishOp(r,n)},Pe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?x.logicalOR:x.logicalAND,2):61===t?this.finishOp(x.assign,2):this.finishOp(124===e?x.bitwiseOR:x.bitwiseAND,1)},Pe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(x.assign,2):this.finishOp(x.bitwiseXOR,1)},Pe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!O.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(x.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(x.assign,2):this.finishOp(x.plusMin,1)},Pe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(x.assign,n+1):this.finishOp(x.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(x.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Pe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(x.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(x.arrow)):this.finishOp(61===e?x.eq:x.prefix,1)},Pe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(x.parenL);case 41:return++this.pos,this.finishToken(x.parenR);case 59:return++this.pos,this.finishToken(x.semi);case 44:return++this.pos,this.finishToken(x.comma);case 91:return++this.pos,this.finishToken(x.bracketL);case 93:return++this.pos,this.finishToken(x.bracketR);case 123:return++this.pos,this.finishToken(x.braceL);case 125:return++this.pos,this.finishToken(x.braceR);case 58:return++this.pos,this.finishToken(x.colon);case 63:return++this.pos,this.finishToken(x.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(x.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(x.prefix,1)}this.raise(this.pos,"Unexpected character '"+Ie(e)+"'")},Pe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Pe.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(O.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var o=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(o);var s=this.regexpState||(this.regexpState=new be(this));s.reset(n,i,a),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,a)}catch(e){}return this.finishToken(x.regexp,{pattern:i,flags:a,value:c})},Pe.readInt=function(e,t){for(var n=this.pos,r=0,i=0,o=null==t?1/0:t;i<o;++i){var a=this.input.charCodeAt(this.pos),s=void 0;if((s=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.pos,r=r*e+s}return this.pos===n||null!=t&&this.pos-n!==t?null:r},Pe.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n="undefined"!=typeof BigInt?BigInt(this.input.slice(t,this.pos)):null,++this.pos):h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(x.num,n)},Pe.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number"),n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===r){var i=this.input.slice(t,this.pos),o="undefined"!=typeof BigInt?BigInt(i):null;return++this.pos,h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(x.num,o)}46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=this.input.slice(t,this.pos),s=n?parseInt(a,8):parseFloat(a);return this.finishToken(x.num,s)},Pe.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Pe.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(E(r,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(x.string,t)};var Re={};Pe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Re)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Pe.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Re;this.raise(e,t)},Pe.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==x.template&&this.type!==x.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(x.template,e)):36===n?(this.pos+=2,this.finishToken(x.dollarBraceL)):(++this.pos,this.finishToken(x.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(E(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Pe.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(x.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Pe.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ie(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),"0"===n&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return E(t)?"":String.fromCharCode(t)}},Pe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Pe.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(g(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var o=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?h:g)(a,r)||this.invalidStringToken(o,"Invalid Unicode escape"),e+=Ie(a),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Pe.readWord=function(){var e=this.readWord1(),t=x.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=w[e]),this.finishToken(t,e)};var Ae="6.4.2";function Me(e,t){return F.parse(e,t)}function De(e,t,n){return F.parseExpressionAt(e,t,n)}function Ne(e,t){return F.tokenizer(e,t)}F.acorn={Parser:F,version:Ae,defaultOptions:L,Position:M,SourceLocation:D,getLineInfo:N,Node:re,TokenType:v,tokTypes:x,keywordTypes:w,TokContext:ae,tokContexts:se,isIdentifierChar:g,isIdentifierStart:h,Token:je,isNewLine:E,lineBreak:O,lineBreakG:S,nonASCIIwhitespace:C}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(c(n(2)),n(605)),o=n(435),a=c(n(29)),s=n(608);function c(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=function(e){var t,n;function c(t){var n;return(n=e.call(this,t)||this).onMouseMove=n.onMouseMove.bind(f(n)),n.onMouseDown=n.onMouseDown.bind(f(n)),n.onMouseDrag=n.onMouseDrag.bind(f(n)),n.onMouseUp=n.onMouseUp.bind(f(n)),n}n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var u=c.prototype;return u.onMouseDown=function(e){var t=this.props.paper.project;(0,a.default)(t.layers.map((function(e){return(0,a.default)((0,s.mapChildren)(e)).map((function(e){return e}))}))).forEach((function(t){t.contains(e.point)?t.data.state="moving":t.hitTest(e.point,{segments:!0,tolerance:15})&&(t.data.state="resizing",t.data.bounds=t.bounds.clone(),t.data.scaleBase=e.point.subtract(t.bounds.center))}))},u.onMouseDrag=function(e){var t=this.props.paper.project;(0,a.default)(t.layers.map((function(e){return(0,a.default)((0,s.mapChildren)(e)).map((function(e){return e}))}))).forEach((function(t){if("moving"===t.data.state)t.position=t.position.add(e.point.subtract(e.lastPoint));else if("resizing"===t.data.state){var n=t.data.bounds,r=e.point.subtract(n.center).length/t.data.scaleBase.length,i=n.topLeft.subtract(n.center).multiply(r),a=n.bottomRight.subtract(n.center).multiply(r),s=new o.Rectangle(i.add(n.center),a.add(n.center));t.bounds=s}}))},u.onMouseMove=function(e){var t=this.props.paper,n=t.project,r=(0,a.default)(n.layers.map((function(e){return(0,a.default)((0,s.mapChildren)(e)).map((function(e){return e}))})));n.activeLayer.selected=!1;var i=!1;r.forEach((function(n){if(n.contains(e.point)||n.hitTest(e.point,{segments:!0,tolerance:15})){var r=n.hitTest(e.point,{segments:!0,tolerance:15}),o="move";if(r&&"segment"===r.type){var a=n.position.subtract(r.segment.point),s=45*Math.round(180*Math.atan(a.y/a.x)/Math.PI/45);switch(!0){case 45===s:o="nwse-resize";break;case-45===s:o="nesw-resize";break;case 0===s:o="ew-resize";break;case 90===Math.abs(s):o="ns-resize";break;default:return}}t.view.getElement().style.cursor=o,i=!0,n.selected=!0}})),i||(t.view.getElement().style.cursor="auto")},u.onMouseUp=function(e){var t=this.props,n=t.onPathAdd,r=t.paper,i=r.project;(0,a.default)(i.layers.map((function(e){return(0,a.default)((0,s.mapChildren)(e)).map((function(e){return e}))}))).forEach((function(e){e.data.state=null,n(e)})),r.view.getElement().style.cursor="auto"},u.render=function(){return r.default.createElement(i.Tool,{onMouseDown:this.onMouseDown,onMouseDrag:this.onMouseDrag,onMouseMove:this.onMouseMove,onMouseUp:this.onMouseUp})},c}(r.Component);d.propTypes={};var p=r.default.forwardRef((function(e,t){return r.default.createElement(d,l({innerRef:t},e))}));t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(d(n(2)),n(105)),o=d(n(452)),a=d(n(451)),s=d(n(1040)),c=d(n(1041)),u=n(28),l=n(1117),f=n(1115);function d(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var g=function(e){var t,n;function u(t){var n;return(n=e.call(this,t)||this).state={editorState:i.EditorState.createWithContent((0,f.stateFromHTML)(t.annoHtml))},n.onChange=n.onChange.bind(h(n)),n.handleKeyCommand=n.handleKeyCommand.bind(h(n)),n.handleFormating=n.handleFormating.bind(h(n)),n}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var d=u.prototype;return d.handleFormating=function(e,t){var n=this.state.editorState;this.onChange(i.RichUtils.toggleInlineStyle(n,t))},d.handleKeyCommand=function(e,t){var n=i.RichUtils.handleKeyCommand(t,e);return n?(this.onChange(n),"handled"):"not-handled"},d.onChange=function(e){var t=this.props.updateAnnotationBody;if(this.setState({editorState:e}),t){t((0,l.stateToHTML)(e.getCurrentContent(),{inlineStyles:{BOLD:{element:"b"},ITALIC:{element:"i"}}}).toString())}},d.render=function(){var e=this.props.classes,t=this.state.editorState,n=t.getCurrentInlineStyle();return r.default.createElement("div",null,r.default.createElement(a.default,{size:"small",value:n.toArray()},r.default.createElement(o.default,{onClick:this.handleFormating,value:"BOLD"},r.default.createElement(s.default,null)),r.default.createElement(o.default,{onClick:this.handleFormating,value:"ITALIC"},r.default.createElement(c.default,null))),r.default.createElement("div",{className:e.editorRoot},r.default.createElement(i.Editor,{editorState:t,handleKeyCommand:this.handleKeyCommand,onChange:this.onChange})))},u}(r.Component);g.propTypes={},g.defaultProps={annoHtml:"",updateAnnotationBody:function(){}};var v=(0,u.withStyles)((function(e){return{editorRoot:{borderColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",borderRadius:e.shape.borderRadius,borderStyle:"solid",borderWidth:1,fontFamily:e.typography.fontFamily,marginBottom:e.spacing(1),marginTop:e.spacing(1),minHeight:6*e.typography.fontSize,padding:e.spacing(1)}}}))(g);t.default=v},function(e,t,n){"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(235),a=n(98),s=n(171),c=n(99),u=n(85),l=n(51),f=n(116),d=n(146),p=n(40),h=n(960),g=d("draft_tree_data_support"),v=g?c:s,m=p.List,y=p.Repeat,b={insertAtomicBlock:function(e,t,n){var i=e.getCurrentContent(),s=e.getSelection(),c=u.removeRange(i,s,"backward"),d=c.getSelectionAfter(),p=u.splitBlock(c,d),h=p.getSelectionAfter(),b=u.setBlockType(p,h,"atomic"),w=a.create({entity:t}),_={key:f(),type:"atomic",text:n,characterList:m(y(w,n.length))},x={key:f(),type:"unstyled"};g&&(_=r({},_,{nextSibling:x.key}),x=r({},x,{prevSibling:_.key}));var O=[new v(_),new v(x)],S=o.createFromArray(O),E=u.replaceWithFragment(b,h,S),C=E.merge({selectionBefore:s,selectionAfter:E.getSelectionAfter().set("hasFocus",!0)});return l.push(e,C,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var i,o=e.getCurrentContent(),a=e.getSelection();if("before"===r||"after"===r){var s=o.getBlockForKey("before"===r?n.getStartKey():n.getEndKey());i=h(o,t,s,r)}else{var c=u.removeRange(o,n,"backward"),f=c.getSelectionAfter(),d=c.getBlockForKey(f.getFocusKey());if(0===f.getStartOffset())i=h(c,t,d,"before");else if(f.getEndOffset()===d.getLength())i=h(c,t,d,"after");else{var p=u.splitBlock(c,f),g=p.getSelectionAfter(),v=p.getBlockForKey(g.getFocusKey());i=h(p,t,v,"before")}}var m=i.merge({selectionBefore:a,selectionAfter:i.getSelectionAfter().set("hasFocus",!0)});return l.push(e,m,"move-block")}};e.exports=b},function(e,t,n){"use strict";var r=n(98),i=n(40).Map,o={add:function(e,t,n){return a(e,t,n,!0)},remove:function(e,t,n){return a(e,t,n,!1)}};function a(e,t,n,o){var a=e.getBlockMap(),s=t.getStartKey(),c=t.getStartOffset(),u=t.getEndKey(),l=t.getEndOffset(),f=a.skipUntil((function(e,t){return t===s})).takeUntil((function(e,t){return t===u})).concat(i([[u,a.get(u)]])).map((function(e,t){var i,a;s===u?(i=c,a=l):(i=t===s?c:0,a=t===u?l:e.getLength());for(var f,d=e.getCharacterList();i<a;)f=d.get(i),d=d.set(i,o?r.applyStyle(f,n):r.removeStyle(f,n)),i++;return e.set("characterList",d)}));return e.merge({blockMap:a.merge(f),selectionBefore:t,selectionAfter:t})}e.exports=o},function(e,t,n){"use strict";var r=n(948),i=n(40);e.exports=function(e,t,n){var o=e.getBlockMap(),a=t.getStartKey(),s=t.getStartOffset(),c=t.getEndKey(),u=t.getEndOffset(),l=o.skipUntil((function(e,t){return t===a})).takeUntil((function(e,t){return t===c})).toOrderedMap().merge(i.OrderedMap([[c,o.get(c)]])).map((function(e,t){var i=t===a?s:0,o=t===c?u:e.getLength();return r(e,i,o,n)}));return e.merge({blockMap:o.merge(l),selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var r=n(98);e.exports=function(e,t,n,i){for(var o=t,a=e.getCharacterList();o<n;)a=a.set(o,r.applyEntity(a.get(o),i)),o++;return e.set("characterList",a)}},function(e,t,n){"use strict";var r=n(950),i=n(951),o=n(42);function a(e,t,n,a,s,c,u){var l=n.getStartOffset(),f=n.getEndOffset(),d=e.__get(s).getMutability(),p=u?l:f;if("MUTABLE"===d)return n;var h=i(t,s).filter((function(e){return p<=e.end&&p>=e.start}));1!=h.length&&o(!1);var g=h[0];if("IMMUTABLE"===d)return n.merge({anchorOffset:g.start,focusOffset:g.end,isBackward:!1});c||(u?f=g.end:l=g.start);var v=r.getRemovalRange(l,f,t.getText().slice(g.start,g.end),g.start,a);return n.merge({anchorOffset:v.start,focusOffset:v.end,isBackward:!1})}e.exports=function(e,t,n,r,i){var o=r.getStartOffset(),s=r.getEndOffset(),c=t.getEntityAt(o),u=n.getEntityAt(s-1);if(!c&&!u)return r;var l=r;if(c&&c===u)l=a(e,t,l,i,c,!0,!0);else if(c&&u){var f=a(e,t,l,i,c,!1,!0),d=a(e,n,l,i,u,!1,!1);l=l.merge({anchorOffset:f.getAnchorOffset(),focusOffset:d.getFocusOffset(),isBackward:!1})}else if(c){var p=a(e,t,l,i,c,!1,!0);l=l.merge({anchorOffset:p.getStartOffset(),isBackward:!1})}else if(u){var h=a(e,n,l,i,u,!1,!1);l=l.merge({focusOffset:h.getEndOffset(),isBackward:!1})}return l}},function(e,t,n){"use strict";e.exports={getRemovalRange:function(e,t,n,r,i){var o=n.split(" ");o=o.map((function(e,t){if("forward"===i){if(t>0)return" "+e}else if(t<o.length-1)return e+" ";return e}));for(var a,s=r,c=null,u=null,l=0;l<o.length;l++){if(e<(a=s+o[l].length)&&s<t)null!==c||(c=s),u=a;else if(null!==c)break;s=a}var f=r+n.length,d=c===r,p=u===f;return(!d&&p||d&&!p)&&("forward"===i?u!==f&&u++:c!==r&&c--),{start:c,end:u}}}},function(e,t,n){"use strict";var r=n(42);e.exports=function(e,t){var n=[];return e.findEntityRanges((function(e){return e.getEntity()===t}),(function(e,t){n.push({start:e,end:t})})),n.length||r(!1),n}},function(e,t,n){"use strict";var r=n(235),i=n(99),o=n(40),a=n(611),s=n(42),c=n(609),u=o.List,l=function(e,t,n,r,i,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",c=n.get(i),u=c.getText(),l=c.getCharacterList(),f=i,d=o+r.getText().length,p=null;switch(s){case"MERGE_OLD_DATA_TO_NEW_DATA":p=r.getData().merge(c.getData());break;case"REPLACE_WITH_NEW_DATA":p=r.getData()}var h=c.getType();u&&"unstyled"===h&&(h=r.getType());var g=c.merge({text:u.slice(0,o)+r.getText()+u.slice(o),characterList:a(l,r.getCharacterList(),o),type:h,data:p});return e.merge({blockMap:n.set(i,g),selectionBefore:t,selectionAfter:t.merge({anchorKey:f,anchorOffset:d,focusKey:f,focusOffset:d,isBackward:!1})})},f=function(e,t,n,o,a,s){var c=n.first()instanceof i,l=[],f=o.size,d=n.get(a),p=o.first(),h=o.last(),g=h.getLength(),v=h.getKey(),m=c&&(!d.getChildKeys().isEmpty()||!p.getChildKeys().isEmpty());n.forEach((function(e,t){t===a?(m?l.push(e):l.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.slice(0,t),a=i.slice(0,t),s=n.first();return e.merge({text:o+s.getText(),characterList:a.concat(s.getCharacterList()),type:o?e.getType():s.getType(),data:s.getData()})}(e,s,o)),o.slice(m?0:1,f-1).forEach((function(e){return l.push(e)})),l.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.length,a=r.slice(t,o),s=i.slice(t,o),c=n.last();return c.merge({text:c.getText()+a,characterList:c.getCharacterList().concat(s),data:c.getData()})}(e,s,o))):l.push(e)}));var y=r.createFromArray(l);return c&&(y=function(e,t,n,r){return e.withMutations((function(t){var i=n.getKey(),o=r.getKey(),a=n.getNextSiblingKey(),s=n.getParentKey(),c=function(e,t){var n=e.getKey(),r=e,i=[];for(t.get(n)&&i.push(n);r&&r.getNextSiblingKey();){var o=r.getNextSiblingKey();if(!o)break;i.push(o),r=t.get(o)}return i}(r,e),l=c[c.length-1];if(t.get(o)?(t.setIn([i,"nextSibling"],o),t.setIn([o,"prevSibling"],i)):(t.setIn([i,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],i)),t.setIn([l,"nextSibling"],a),a&&t.setIn([a,"prevSibling"],l),c.forEach((function(e){return t.setIn([e,"parent"],s)})),s){var f=e.get(s).getChildKeys(),d=f.indexOf(i)+1,p=f.toArray();p.splice.apply(p,[d,0].concat(c)),t.setIn([s,"children"],u(p))}}))}(y,0,d,p)),e.merge({blockMap:y,selectionBefore:t,selectionAfter:t.merge({anchorKey:v,anchorOffset:g,focusKey:v,focusOffset:g,isBackward:!1})})};e.exports=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";t.isCollapsed()||s(!1);var o=e.getBlockMap(),a=c(n),u=t.getStartKey(),d=t.getStartOffset(),p=o.get(u);return p instanceof i&&(p.getChildKeys().isEmpty()||s(!1)),1===a.size?l(e,t,o,a.first(),u,d,r):f(e,t,o,a,u,d)}},function(e,t,n){"use strict";var r=n(40),i=n(611),o=n(42),a=r.Repeat;e.exports=function(e,t,n,r){t.isCollapsed()||o(!1);var s=null;if(null!=n&&(s=n.length),null==s||0===s)return e;var c=e.getBlockMap(),u=t.getStartKey(),l=t.getStartOffset(),f=c.get(u),d=f.getText(),p=f.merge({text:d.slice(0,l)+n+d.slice(l,f.getLength()),characterList:i(f.getCharacterList(),a(r,s).toList(),l)}),h=l+s;return e.merge({blockMap:c.set(u,p),selectionAfter:t.merge({anchorOffset:h,focusOffset:h})})}},function(e,t,n){"use strict";var r=n(99),i=n(613),o=n(40),a=(o.List,o.Map),s=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},c=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var i=r.getParentKey();i&&n.push(i),r=i?t.get(i):null}return n},u=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},l=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},f=function(e,t,n,r){return e.withMutations((function(o){if(s(t.getKey(),o,(function(e){return e.merge({nextSibling:u(e,o,r),prevSibling:l(e,o,r)})})),s(n.getKey(),o,(function(e){return e.merge({nextSibling:u(e,o,r),prevSibling:l(e,o,r)})})),c(t.getKey(),r).forEach((function(e){return s(e,o,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return o.get(e)})),nextSibling:u(e,o,r),prevSibling:l(e,o,r)})}))})),s(t.getNextSiblingKey(),o,(function(e){return e.merge({prevSibling:t.getPrevSiblingKey()})})),s(t.getPrevSiblingKey(),o,(function(e){return e.merge({nextSibling:u(e,o,r)})})),s(n.getNextSiblingKey(),o,(function(e){return e.merge({prevSibling:l(e,o,r)})})),s(n.getPrevSiblingKey(),o,(function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})),c(n.getKey(),r).forEach((function(e){s(e,o,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return o.get(e)})),nextSibling:u(e,o,r),prevSibling:l(e,o,r)})}))})),function(e,t){var n=[];if(!e)return n;for(var r=i(e,t);r&&t.get(r);){var o=t.get(r);n.push(r),r=o.getParentKey()?i(o,t):null}return n}(n,r).forEach((function(e){return s(e,o,(function(e){return e.merge({nextSibling:u(e,o,r),prevSibling:l(e,o,r)})}))})),null==e.get(t.getKey())&&null!=e.get(n.getKey())&&n.getParentKey()===t.getKey()&&null==n.getPrevSiblingKey()){var a=t.getPrevSiblingKey();s(n.getKey(),o,(function(e){return e.merge({prevSibling:a})})),s(a,o,(function(e){return e.merge({nextSibling:n.getKey()})}));var f=a?e.get(a):null,d=f?f.getParentKey():null;if(t.getChildKeys().forEach((function(e){s(e,o,(function(e){return e.merge({parent:d})}))})),null!=d){var p=e.get(d);s(d,o,(function(e){return e.merge({children:p.getChildKeys().concat(t.getChildKeys())})}))}s(t.getChildKeys().find((function(t){return null===e.get(t).getNextSiblingKey()})),o,(function(e){return e.merge({nextSibling:t.getNextSiblingKey()})}))}}))},d=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),i=e.slice(n);e=r.concat(i).toList()}return e};e.exports=function(e,t){if(t.isCollapsed())return e;var n,o=e.getBlockMap(),s=t.getStartKey(),u=t.getStartOffset(),l=t.getEndKey(),p=t.getEndOffset(),h=o.get(s),g=o.get(l),v=h instanceof r,m=[];if(v){var y=g.getChildKeys(),b=c(l,o);g.getNextSiblingKey()&&(m=m.concat(b)),y.isEmpty()||(m=m.concat(b.concat([l]))),m=m.concat(c(i(g,o),o))}n=h===g?d(h.getCharacterList(),u,p):h.getCharacterList().slice(0,u).concat(g.getCharacterList().slice(p));var w=h.merge({text:h.getText().slice(0,u)+g.getText().slice(p),characterList:n}),_=v&&0===u&&0===p&&g.getParentKey()===s&&null==g.getPrevSiblingKey()?a([[s,null]]):o.toSeq().skipUntil((function(e,t){return t===s})).takeUntil((function(e,t){return t===l})).filter((function(e,t){return-1===m.indexOf(t)})).concat(a([[l,null]])).map((function(e,t){return t===s?w:null})),x=o.merge(_).filter((function(e){return!!e}));return v&&h!==g&&(x=f(x,h,g,o)),e.merge({blockMap:x,selectionBefore:t,selectionAfter:t.merge({anchorKey:s,anchorOffset:u,focusKey:s,focusOffset:u,isBackward:!1})})}},function(e,t,n){"use strict";var r=n(99),i=n(116),o=n(40),a=n(42),s=n(612),c=o.List,u=o.Map,l=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}};e.exports=function(e,t){t.isCollapsed()||a(!1);var n=t.getAnchorKey(),o=e.getBlockMap(),f=o.get(n),d=f.getText();if(!d){var p=f.getType();if("unordered-list-item"===p||"ordered-list-item"===p)return s(e,t,(function(e){return e.merge({type:"unstyled",depth:0})}))}var h=t.getAnchorOffset(),g=f.getCharacterList(),v=i(),m=f instanceof r,y=f.merge({text:d.slice(0,h),characterList:g.slice(0,h)}),b=y.merge({key:v,text:d.slice(h),characterList:g.slice(h),data:u()}),w=o.toSeq().takeUntil((function(e){return e===f})),_=o.toSeq().skipUntil((function(e){return e===f})).rest(),x=w.concat([[n,y],[v,b]],_).toOrderedMap();return m&&(f.getChildKeys().isEmpty()||a(!1),x=function(e,t,n){return e.withMutations((function(e){var r=t.getKey(),i=n.getKey();l(t.getParentKey(),e,(function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,o=t.toArray();return o.splice(n,0,i),e.merge({children:c(o)})})),l(t.getNextSiblingKey(),e,(function(e){return e.merge({prevSibling:i})})),l(r,e,(function(e){return e.merge({nextSibling:i})})),l(i,e,(function(e){return e.merge({prevSibling:r})}))}))}(x,y,b)),e.merge({blockMap:x,selectionBefore:t,selectionAfter:t.merge({anchorKey:v,anchorOffset:0,focusKey:v,focusOffset:0,isBackward:!1})})}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(236),o=n(614),a=n(40),s=a.List,c=a.Repeat,u=a.Record,l=function(){return!0},f=u({start:null,end:null}),d=u({start:null,end:null,decoratorKey:null,leaves:null}),p={generate:function(e,t,n){var r=t.getLength();if(!r)return s.of(new d({start:0,end:0,decoratorKey:null,leaves:s.of(new f({start:0,end:0}))}));var o=[],a=n?n.getDecorations(t,e):s(c(null,r)),u=t.getCharacterList();return i(a,g,l,(function(e,t){o.push(new d({start:e,end:t,decoratorKey:a.get(e),leaves:h(u.slice(e,t).toList(),e)}))})),s(o)},fromJS:function(e){var t=e.leaves,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["leaves"]);return new d(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){r(e,t,n[t])}))}return e}({},n,{leaves:null!=t?s(Array.isArray(t)?t:o(t)).map((function(e){return f(e)})):null}))}};function h(e,t){var n=[],r=e.map((function(e){return e.getStyle()})).toList();return i(r,g,l,(function(e,r){n.push(new f({start:e+t,end:r+t}))})),s(n)}function g(e,t){return e===t}e.exports=p},function(e,t,n){"use strict";e.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}},function(e,t,n){"use strict";var r,i=n(959),o=n(40),a=n(86),s=o.OrderedMap,c={getDirectionMap:function(e,t){r?r.reset():r=new i;var n=e.getBlockMap(),c=n.valueSeq().map((function(e){return a(r).getDirection(e.getText())})),u=s(n.keySeq().zip(c));return null!=t&&o.is(t,u)?t:u}};e.exports=c},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(437),o=n(309),a=n(42),s=function(){function e(e){r(this,"_defaultDir",void 0),r(this,"_lastDir",void 0),e?o.isStrong(e)||a(!1):e=o.getGlobalDir(),this._defaultDir=e,this.reset()}var t=e.prototype;return t.reset=function(){this._lastDir=this._defaultDir},t.getDirection=function(e){return this._lastDir=i.getDirection(e,this._lastDir),this._lastDir},e}();e.exports=s},function(e,t,n){"use strict";var r=n(99),i=n(613),o=n(40),a=n(42),s=o.OrderedMap,c=o.List,u=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},l=function(e,t,n,r,i){if(!i)return e;var o="after"===r,a=t.getKey(),s=n.getKey(),l=t.getParentKey(),f=t.getNextSiblingKey(),d=t.getPrevSiblingKey(),p=n.getParentKey(),h=o?n.getNextSiblingKey():s,g=o?s:n.getPrevSiblingKey();return e.withMutations((function(e){u(l,e,(function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(a))})})),u(d,e,(function(e){return e.merge({nextSibling:f})})),u(f,e,(function(e){return e.merge({prevSibling:d})})),u(h,e,(function(e){return e.merge({prevSibling:a})})),u(g,e,(function(e){return e.merge({nextSibling:a})})),u(p,e,(function(e){var t=e.getChildKeys(),n=t.indexOf(s),r=o?n+1:0!==n?n-1:0,i=t.toArray();return i.splice(r,0,a),e.merge({children:c(i)})})),u(a,e,(function(e){return e.merge({nextSibling:h,prevSibling:g,parent:p})}))}))};e.exports=function(e,t,n,o){"replace"===o&&a(!1);var c=n.getKey(),u=t.getKey();u===c&&a(!1);var f=e.getBlockMap(),d=t instanceof r,p=[t],h=f.delete(u);d&&(p=[],h=f.withMutations((function(e){var n=t.getNextSiblingKey(),r=i(t,e);e.toSeq().skipUntil((function(e){return e.getKey()===u})).takeWhile((function(e){var t=e.getKey(),i=t===u,o=n&&t!==n,a=!n&&e.getParentKey()&&(!r||t!==r);return!!(i||o||a)})).forEach((function(t){p.push(t),e.delete(t.getKey())}))})));var g=h.toSeq().takeUntil((function(e){return e===n})),v=h.toSeq().skipUntil((function(e){return e===n})).skip(1),m=p.map((function(e){return[e.getKey(),e]})),y=s();if("before"===o){var b=e.getBlockBefore(c);b&&b.getKey()===t.getKey()&&a(!1),y=g.concat([].concat(m,[[c,n]]),v).toOrderedMap()}else if("after"===o){var w=e.getBlockAfter(c);w&&w.getKey()===u&&a(!1),y=g.concat([[c,n]].concat(m),v).toOrderedMap()}return e.merge({blockMap:l(y,t,n,o,d),selectionBefore:e.getSelectionAfter(),selectionAfter:e.getSelectionAfter().merge({anchorKey:u,focusKey:u})})}},function(e,t,n){"use strict";var r=n(40).List,i=function(){function e(e){var t,n,r;r=void 0,(n="_decorators")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this._decorators=e.slice()}var t=e.prototype;return t.getDecorations=function(e,t){var n=Array(e.getText().length).fill(null);return this._decorators.forEach((function(r,i){var o=0;(0,r.strategy)(e,(function(e,t){(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0})(n,e,t)&&(!function(e,t,n,r){for(var i=t;i<n;i++)e[i]=r}(n,e,t,i+"."+o),o++)}),t)})),r(n)},t.getComponentForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].component},t.getPropsForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].props},e}();e.exports=i},function(e,t,n){"use strict";(function(t){var r=n(131);function i(){return(i=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var u=n(438),l=n(617),f=n(963),d=n(971),p=n(988),h=n(991),g=n(1026),v=n(1027),m=n(629),y=n(51),b=n(0),w=n(441),_=n(313),x=n(87),O=n(172),S=n(116),E=n(646),C=n(314),k=n(146),T=n(42),j=n(237),P=n(86),I=x.isBrowser("IE"),R=!I,A={edit:h,composite:f,drag:p,cut:null,render:null},M=!1,D=function(e){function t(){return e.apply(this,arguments)||this}c(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(b.Component),N=function(e){function n(t){var n;return s(a(n=e.call(this,t)||this),"_blockSelectEvents",void 0),s(a(n),"_clipboard",void 0),s(a(n),"_handler",void 0),s(a(n),"_dragCount",void 0),s(a(n),"_internalDrag",void 0),s(a(n),"_editorKey",void 0),s(a(n),"_placeholderAccessibilityID",void 0),s(a(n),"_latestEditorState",void 0),s(a(n),"_latestCommittedEditorState",void 0),s(a(n),"_pendingStateFromBeforeInput",void 0),s(a(n),"_onBeforeInput",void 0),s(a(n),"_onBlur",void 0),s(a(n),"_onCharacterData",void 0),s(a(n),"_onCompositionEnd",void 0),s(a(n),"_onCompositionStart",void 0),s(a(n),"_onCopy",void 0),s(a(n),"_onCut",void 0),s(a(n),"_onDragEnd",void 0),s(a(n),"_onDragOver",void 0),s(a(n),"_onDragStart",void 0),s(a(n),"_onDrop",void 0),s(a(n),"_onInput",void 0),s(a(n),"_onFocus",void 0),s(a(n),"_onKeyDown",void 0),s(a(n),"_onKeyPress",void 0),s(a(n),"_onKeyUp",void 0),s(a(n),"_onMouseDown",void 0),s(a(n),"_onMouseUp",void 0),s(a(n),"_onPaste",void 0),s(a(n),"_onSelect",void 0),s(a(n),"editor",void 0),s(a(n),"editorContainer",void 0),s(a(n),"focus",void 0),s(a(n),"blur",void 0),s(a(n),"setMode",void 0),s(a(n),"exitCurrentMode",void 0),s(a(n),"restoreEditorDOM",void 0),s(a(n),"setClipboard",void 0),s(a(n),"getClipboard",void 0),s(a(n),"getEditorKey",void 0),s(a(n),"update",void 0),s(a(n),"onDragEnter",void 0),s(a(n),"onDragLeave",void 0),s(a(n),"_handleEditorContainerRef",(function(e){n.editorContainer=e,n.editor=null!==e?e.firstChild:null})),s(a(n),"focus",(function(e){var t=n.props.editorState,r=t.getSelection().getHasFocus(),i=n.editor;if(i){var o=_.getScrollParent(i),a=e||C(o),s=a.x,c=a.y;j(i)||T(!1),i.focus(),o===window?window.scrollTo(s,c):w.setTop(o,c),r||n.update(y.forceSelection(t,t.getSelection()))}})),s(a(n),"blur",(function(){var e=n.editor;e&&(j(e)||T(!1),e.blur())})),s(a(n),"setMode",(function(e){var t=n.props,r=t.onPaste,i=t.onCut,a=t.onCopy,s=o({},A.edit);r&&(s.onPaste=r),i&&(s.onCut=i),a&&(s.onCopy=a);var c=o({},A,{edit:s});n._handler=c[e]})),s(a(n),"exitCurrentMode",(function(){n.setMode("edit")})),s(a(n),"restoreEditorDOM",(function(e){n.setState({contentsKey:n.state.contentsKey+1},(function(){n.focus(e)}))})),s(a(n),"setClipboard",(function(e){n._clipboard=e})),s(a(n),"getClipboard",(function(){return n._clipboard})),s(a(n),"update",(function(e){n._latestEditorState=e,n.props.onChange(e)})),s(a(n),"onDragEnter",(function(){n._dragCount++})),s(a(n),"onDragLeave",(function(){n._dragCount--,0===n._dragCount&&n.exitCurrentMode()})),n._blockSelectEvents=!1,n._clipboard=null,n._handler=null,n._dragCount=0,n._editorKey=t.editorKey||S(),n._placeholderAccessibilityID="placeholder-"+n._editorKey,n._latestEditorState=t.editorState,n._latestCommittedEditorState=t.editorState,n._onBeforeInput=n._buildHandler("onBeforeInput"),n._onBlur=n._buildHandler("onBlur"),n._onCharacterData=n._buildHandler("onCharacterData"),n._onCompositionEnd=n._buildHandler("onCompositionEnd"),n._onCompositionStart=n._buildHandler("onCompositionStart"),n._onCopy=n._buildHandler("onCopy"),n._onCut=n._buildHandler("onCut"),n._onDragEnd=n._buildHandler("onDragEnd"),n._onDragOver=n._buildHandler("onDragOver"),n._onDragStart=n._buildHandler("onDragStart"),n._onDrop=n._buildHandler("onDrop"),n._onInput=n._buildHandler("onInput"),n._onFocus=n._buildHandler("onFocus"),n._onKeyDown=n._buildHandler("onKeyDown"),n._onKeyPress=n._buildHandler("onKeyPress"),n._onKeyUp=n._buildHandler("onKeyUp"),n._onMouseDown=n._buildHandler("onMouseDown"),n._onMouseUp=n._buildHandler("onMouseUp"),n._onPaste=n._buildHandler("onPaste"),n._onSelect=n._buildHandler("onSelect"),n.getEditorKey=function(){return n._editorKey},n.state={contentsKey:0},n}c(n,e);var r=n.prototype;return r._buildHandler=function(e){var t=this;return function(n){if(!t.props.readOnly){var r=t._handler&&t._handler[e];r&&(g?g((function(){return r(t,n)})):r(t,n))}}},r._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},r._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:P(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return b.createElement(v,e)}return null},r._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},r.render=function(){var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,a=e.customStyleFn,s=e.customStyleMap,c=e.editorState,u=e.preventScroll,f=e.readOnly,p=e.textAlignment,h=e.textDirectionality,g=O({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===p,"DraftEditor/alignRight":"right"===p,"DraftEditor/alignCenter":"center"===p}),v=this.props.role||"textbox",m="combobox"===v?!!this.props.ariaExpanded:null,y={blockRenderMap:t,blockRendererFn:n,blockStyleFn:r,customStyleMap:o({},l,s),customStyleFn:a,editorKey:this._editorKey,editorState:c,preventScroll:u,textDirectionality:h};return b.createElement("div",{className:g},this._renderPlaceholder(),b.createElement("div",{className:O("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},b.createElement("div",{"aria-activedescendant":f?null:this.props.ariaActiveDescendantID,"aria-autocomplete":f?null:this.props.ariaAutoComplete,"aria-controls":f?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":f?null:m,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":f?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:O({notranslate:!f,"public/DraftEditor/content":!0}),contentEditable:!f,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:f?null:v,spellCheck:R&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},b.createElement(D,{editor:this,editorState:c}),b.createElement(d,i({},y,{key:"contents"+this.state.contentsKey})))))},r.componentDidMount=function(){this._blockSelectEvents=!1,!M&&k("draft_ods_enabled")&&(M=!0,m.initODS()),this.setMode("edit"),I&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):t.execCommand("AutoUrlDetect",!1,!1))},r.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},n}(b.Component);s(N,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:u,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:E,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),e.exports=N}).call(this,n(91))},function(e,t,n){"use strict";var r=n(964),i=n(85),o=n(133),a=n(51),s=n(312),c=n(87),u=n(620),l=n(622),f=n(623),d=n(439),p=n(86),h=c.isBrowser("IE"),g=!1,v=!1,m=null;var y={onCompositionStart:function(e){v=!0,function(e){m||(m=new r(l(e))).start()}(e)},onCompositionEnd:function(e){g=!1,v=!1,setTimeout((function(){g||y.resolveComposition(e)}),20)},onSelect:u,onKeyDown:function(e,t){if(!v)return y.resolveComposition(e),void e._onKeyDown(t);t.which!==s.RIGHT&&t.which!==s.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===s.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!v){var t=p(m).stopAndFlushMutations();m=null,g=!0;var n=a.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),t.size){var r=n.getCurrentContent();t.forEach((function(e,t){var s=o.decode(t),c=s.blockKey,u=s.decoratorKey,l=s.leafKey,f=n.getBlockTree(c).getIn([u,"leaves",l]),p=f.start,h=f.end,g=n.getSelection().merge({anchorKey:c,focusKey:c,anchorOffset:p,focusOffset:h,isBackward:!1}),v=d(r,g),m=r.getBlockForKey(c).getInlineStyleAt(p);r=i.replaceText(r,g,e,m,v),n=a.set(n,{currentContent:r})}));var s=f(n,l(e)).selectionState;e.restoreEditorDOM();var c=h?a.forceSelection(n,s):a.acceptSelection(n,s);e.update(a.push(c,r,"insert-characters"))}else e.update(n)}}};e.exports=y},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(87),o=n(310),a=n(619),s=n(40),c=n(42),u=n(86),l=s.Map,f={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},d=i.isBrowser("IE <= 11"),p=function(){function e(e){var t=this;r(this,"observer",void 0),r(this,"container",void 0),r(this,"mutations",void 0),r(this,"onCharData",void 0),this.container=e,this.mutations=l();var n=a(e);n.MutationObserver&&!d?this.observer=new n.MutationObserver((function(e){return t.registerMutations(e)})):this.onCharData=function(e){e.target instanceof Node||c(!1),t.registerMutation({type:"characterData",target:e.target})}}var t=e.prototype;return t.start=function(){this.observer?this.observer.observe(this.container,f):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},t.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=l(),t},t.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},t.getMutationTextContent=function(e){var t=e.type,n=e.target,r=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return d?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(r&&r.length)return"";if(""!==n.textContent)return n.textContent}return null},t.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var n=u(o(e.target));this.mutations=this.mutations.set(n,t)}},e}();e.exports=p},function(e,t,n){"use strict";var r=n(966),i="Unknown",o={"Mac OS":"Mac OS X"};var a,s=(new r).getResult(),c=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(s.browser.version),u={browserArchitecture:s.cpu.architecture||i,browserFullVersion:s.browser.version||i,browserMinorVersion:c.minor||i,browserName:s.browser.name||i,browserVersion:s.browser.major||i,deviceName:s.device.model||i,engineName:s.engine.name||i,engineVersion:s.engine.version||i,platformArchitecture:s.cpu.architecture||i,platformName:(a=s.os.name,o[a]||a||i),platformVersion:s.os.version||i,platformFullVersion:s.os.version||i};e.exports=u},function(e,t,n){var r;!function(i,o){"use strict";var a="model",s="name",c="type",u="vendor",l="version",f="mobile",d="tablet",p="smarttv",h=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},g=function(e,t){return"string"==typeof e&&-1!==v(t).indexOf(v(e))},v=function(e){return e.toLowerCase()},m=function(e,t){if("string"==typeof e)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0===t?e:e.substring(0,255)},y=function(e,t){for(var n,r,i,o,a,s,c=0;c<t.length&&!a;){var u=t[c],l=t[c+1];for(n=r=0;n<u.length&&!a;)if(a=u[n++].exec(e))for(i=0;i<l.length;i++)s=a[++r],"object"==typeof(o=l[i])&&o.length>0?2===o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3===o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4===o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;c+=2}},b=function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(g(t[n][r],e))return"?"===n?void 0:n}else if(g(t[n],e))return"?"===n?void 0:n;return e},w={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},_={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[l,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[l,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,l],[/opios[\/ ]+([\w\.]+)/i],[l,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[l,[s,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[s,l],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[l,[s,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[l,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[l,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[l,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[l,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[l,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],l],[/\bfocus\/([\w\.]+)/i],[l,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[l,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[l,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[l,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[l,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[l,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[l,[s,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],l],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],l],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,l],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,"Facebook"],l],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,l],[/\bgsa\/([\w\.]+) .*safari\//i],[l,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[l,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],l],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[l,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,l],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[l,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[l,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[l,b,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[s,l],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],l],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[l,[s,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[s,l]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",v]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",v]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",v]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[u,"Samsung"],[c,d]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[u,"Samsung"],[c,f]],[/\((ip(?:hone|od)[\w ]*);/i],[a,[u,"Apple"],[c,f]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[u,"Apple"],[c,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[u,"Huawei"],[c,d]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[a,[u,"Huawei"],[c,f]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[a,/_/g," "],[u,"Xiaomi"],[c,f]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[u,"Xiaomi"],[c,d]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[u,"OPPO"],[c,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[u,"Vivo"],[c,f]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[a,[u,"Realme"],[c,f]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[a,[u,"Motorola"],[c,f]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[u,"Motorola"],[c,d]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[u,"LG"],[c,d]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[u,"LG"],[c,f]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[u,"Lenovo"],[c,d]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[u,"Nokia"],[c,f]],[/(pixel c)\b/i],[a,[u,"Google"],[c,d]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[u,"Google"],[c,f]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[u,"Sony"],[c,f]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[u,"Sony"],[c,d]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[u,"OnePlus"],[c,f]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[u,"Amazon"],[c,d]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[u,"Amazon"],[c,f]],[/(playbook);[-\w\),; ]+(rim)/i],[a,u,[c,d]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[u,"BlackBerry"],[c,f]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[u,"ASUS"],[c,d]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[u,"ASUS"],[c,f]],[/(nexus 9)/i],[a,[u,"HTC"],[c,d]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[u,[a,/_/g," "],[c,f]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[u,"Acer"],[c,d]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[u,"Meizu"],[c,f]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[u,"Sharp"],[c,f]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,a,[c,f]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,a,[c,d]],[/(surface duo)/i],[a,[u,"Microsoft"],[c,d]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[u,"Fairphone"],[c,f]],[/(u304aa)/i],[a,[u,"AT&T"],[c,f]],[/\bsie-(\w*)/i],[a,[u,"Siemens"],[c,f]],[/\b(rct\w+) b/i],[a,[u,"RCA"],[c,d]],[/\b(venue[\d ]{2,7}) b/i],[a,[u,"Dell"],[c,d]],[/\b(q(?:mv|ta)\w+) b/i],[a,[u,"Verizon"],[c,d]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[u,"Barnes & Noble"],[c,d]],[/\b(tm\d{3}\w+) b/i],[a,[u,"NuVision"],[c,d]],[/\b(k88) b/i],[a,[u,"ZTE"],[c,d]],[/\b(nx\d{3}j) b/i],[a,[u,"ZTE"],[c,f]],[/\b(gen\d{3}) b.+49h/i],[a,[u,"Swiss"],[c,f]],[/\b(zur\d{3}) b/i],[a,[u,"Swiss"],[c,d]],[/\b((zeki)?tb.*\b) b/i],[a,[u,"Zeki"],[c,d]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],a,[c,d]],[/\b(ns-?\w{0,9}) b/i],[a,[u,"Insignia"],[c,d]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[u,"NextBook"],[c,d]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],a,[c,f]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],a,[c,f]],[/\b(ph-1) /i],[a,[u,"Essential"],[c,f]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[u,"Envizen"],[c,d]],[/\b(trio[-\w\. ]+) b/i],[a,[u,"MachSpeed"],[c,d]],[/\btu_(1491) b/i],[a,[u,"Rotor"],[c,d]],[/(shield[\w ]+) b/i],[a,[u,"Nvidia"],[c,d]],[/(sprint) (\w+)/i],[u,a,[c,f]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[u,"Microsoft"],[c,f]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[u,"Zebra"],[c,d]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[u,"Zebra"],[c,f]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,a,[c,"console"]],[/droid.+; (shield) bui/i],[a,[u,"Nvidia"],[c,"console"]],[/(playstation [345portablevi]+)/i],[a,[u,"Sony"],[c,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[u,"Microsoft"],[c,"console"]],[/smart-tv.+(samsung)/i],[u,[c,p]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[u,"Samsung"],[c,p]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,"LG"],[c,p]],[/(apple) ?tv/i],[u,[a,"Apple TV"],[c,p]],[/crkey/i],[[a,"Chromecast"],[u,"Google"],[c,p]],[/droid.+aft(\w)( bui|\))/i],[a,[u,"Amazon"],[c,p]],[/\(dtv[\);].+(aquos)/i],[a,[u,"Sharp"],[c,p]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,m],[a,m],[c,p]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,p]],[/((pebble))app/i],[u,a,[c,"wearable"]],[/droid.+; (glass) \d/i],[a,[u,"Google"],[c,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[a,[u,"Zebra"],[c,"wearable"]],[/(quest( 2)?)/i],[a,[u,"Facebook"],[c,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[c,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[a,[c,f]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[c,d]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,d]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[c,f]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[l,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[s,l],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[l,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,l],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[l,b,w]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[l,b,w]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[l,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[l,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[l,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,l],[/\(bb(10);/i],[l,[s,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[l,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[l,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[l,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[l,[s,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],l],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,l],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],l],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,l]]},x=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof x))return new x(e,t).getResult();var n=e||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(_,t):_;return this.getBrowser=function(){var e,t={};return t[s]=void 0,t[l]=void 0,y.call(t,n,r.browser),t.major="string"==typeof(e=t.version)?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0,t},this.getCPU=function(){var e={architecture:void 0};return y.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return y.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return y.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return y.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n="string"==typeof e&&e.length>255?m(e,255):e,this},this.setUA(n),this};x.VERSION="0.7.31",x.BROWSER=h([s,l,"major"]),x.CPU=h(["architecture"]),x.DEVICE=h([a,u,c,"console",f,p,d,"wearable","embedded"]),x.ENGINE=x.OS=h([s,l]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=x),t.UAParser=x):n(967)?void 0===(r=function(){return x}.call(t,n,t,e))||(e.exports=r):void 0!==i&&(i.UAParser=x);var O=void 0!==i&&(i.jQuery||i.Zepto);if(O&&!O.ua){var S=new x;O.ua=S.getResult(),O.ua.get=function(){return S.getUA()},O.ua.set=function(e){S.setUA(e);var t=S.getResult();for(var n in t)O.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";var r=n(42),i=/\./,o=/\|\|/,a=/\s+\-\s+/,s=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,c=/^(\d*)(.*)/;function u(e,t){var n=e.split(o);return n.length>1?n.some((function(e){return w.contains(e,t)})):function(e,t){var n=e.split(a);if(n.length>0&&n.length<=2||r(!1),1===n.length)return l(n[0],t);var i=n[0],o=n[1];return g(i)&&g(o)||r(!1),l(">="+i,t)&&l("<="+o,t)}(e=n[0].trim(),t)}function l(e,t){if(""===(e=e.trim()))return!0;var n,r=t.split(i),o=p(e),a=o.modifier,s=o.rangeComponents;switch(a){case"<":return f(r,s);case"<=":return-1===(n=b(r,s))||0===n;case">=":return d(r,s);case">":return function(e,t){return 1===b(e,t)}(r,s);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var i=r.length-1,o=parseInt(r[i],10);h(o)&&(r[i]=o+1+"");return d(e,n)&&f(e,r)}(r,s);default:return function(e,t){return 0===b(e,t)}(r,s)}}function f(e,t){return-1===b(e,t)}function d(e,t){var n=b(e,t);return 1===n||0===n}function p(e){var t=e.split(i),n=t[0].match(s);return n||r(!1),{modifier:n[1],rangeComponents:[n[2]].concat(t.slice(1))}}function h(e){return!isNaN(e)&&isFinite(e)}function g(e){return!p(e).modifier}function v(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function m(e,t){var n=e.match(c)[1],r=t.match(c)[1],i=parseInt(n,10),o=parseInt(r,10);return h(i)&&h(o)&&i!==o?y(i,o):y(e,t)}function y(e,t){return typeof e!=typeof t&&r(!1),e>t?1:e<t?-1:0}function b(e,t){for(var n=function(e,t){v(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var i=n;i<e.length;i++)e[i]="0"}return v(t,e.length),[e,t]}(e,t),r=n[0],i=n[1],o=0;o<i.length;o++){var a=m(r[o],i[o]);if(a)return a}return 0}var w={contains:function(e,t){return u(e.trim(),t.trim())}};e.exports=w},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!e)return null;var i={};for(var o in e)r.call(e,o)&&(i[o]=t.call(n,e[o],o,e));return i}},function(e,t,n){"use strict";e.exports=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}},function(e,t,n){"use strict";var r=n(146)("draft_tree_data_support");e.exports=n(r?972:986)},function(e,t,n){"use strict";var r=n(131);function i(){return(i=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=n(973),a=n(133),s=n(0),c=n(86),u=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var u=r.prototype;return u.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),s=n.getCurrentContent(),c=t.getDecorator(),u=n.getDecorator();return i!==o||a!==s||c!==u||n.mustForceSelection()},u.render=function(){for(var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,u=e.customStyleMap,l=e.customStyleFn,f=e.editorState,d=e.editorKey,p=e.textDirectionality,h=f.getCurrentContent(),g=f.getSelection(),v=f.mustForceSelection(),m=f.getDecorator(),y=c(f.getDirectionMap()),b=[],w=h.getBlocksAsArray()[0];w;){var _=w.getKey(),x={blockRenderMap:t,blockRendererFn:n,blockStyleFn:r,contentState:h,customStyleFn:l,customStyleMap:u,decorator:m,editorKey:d,editorState:f,forceSelection:v,selection:g,block:w,direction:p||y.get(_),tree:f.getBlockTree(_)},O=(t.get(w.getType())||t.get("unstyled")).wrapper;b.push({block:s.createElement(o,i({key:_},x)),wrapperTemplate:O,key:_,offsetKey:a.encode(_,0,0)});var S=w.getNextSiblingKey();w=S?h.getBlockForKey(S):null}for(var E=[],C=0;C<b.length;){var k=b[C];if(k.wrapperTemplate){var T=[];do{T.push(b[C].block),C++}while(C<b.length&&b[C].wrapperTemplate===k.wrapperTemplate);var j=s.cloneElement(k.wrapperTemplate,{key:k.key+"-wrap","data-offset-key":k.offsetKey},T);E.push(j)}else E.push(k.block),C++}return s.createElement("div",{"data-contents":"true"},E)},r}(s.Component);e.exports=u},function(e,t,n){"use strict";var r=n(131);function i(){return(i=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=n(974),u=n(133),l=n(0),f=n(441),d=n(313),p=n(631),h=n(314),g=n(632),v=n(40),m=n(42),y=n(237),b=(v.List,function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t}),w=function(e,t){var n=t.get(e.getType())||t.get("unstyled"),r=n.wrapper;return{Element:n.element||t.get("unstyled").element,wrapperTemplate:r}},_=function(e,t){var n=t(e);return n?{CustomComponent:n.component,customProps:n.props,customEditable:n.editable}:{}},x=function(e,t,n,r,i,o){var s={"data-block":!0,"data-editor":t,"data-offset-key":n,key:e.getKey(),ref:o},c=r(e);return c&&(s.className=c),void 0!==i.customEditable&&(s=a({},s,{contentEditable:i.customEditable,suppressContentEditableWarning:!0})),s},O=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return s(o(t=e.call.apply(e,[this].concat(r))||this),"wrapperRef",l.createRef()),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var v=r.prototype;return v.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,i=t.tree,o=!n.getChildKeys().isEmpty(),a=n!==e.block||i!==e.tree||r!==e.direction||b(e.selection,e.block.getKey())&&e.forceSelection;return o||a},v.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this.wrapperRef.current;if(n){var r,i=d.getScrollParent(n),o=h(i);if(i===window){var a=p(n);(r=a.y+a.height-g().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{y(n)||m(!1);var s=n;(r=s.offsetHeight+s.offsetTop-(i.offsetHeight+o.y))>0&&f.setTop(i,f.getTop(i)+r+10)}}}},v.render=function(){var e=this,t=this.props,n=t.block,o=t.blockRenderMap,s=t.blockRendererFn,f=t.blockStyleFn,d=t.contentState,p=t.decorator,h=t.editorKey,g=t.editorState,v=t.customStyleFn,m=t.customStyleMap,y=t.direction,O=t.forceSelection,S=t.selection,E=t.tree,C=null;n.children.size&&(C=n.children.reduce((function(t,n){var i=u.encode(n,0,0),c=d.getBlockForKey(n),p=_(c,s),v=p.CustomComponent||r,m=w(c,o),y=m.Element,b=m.wrapperTemplate,O=x(c,h,i,f,p,null),S=a({},e.props,{tree:g.getBlockTree(n),blockProps:p.customProps,offsetKey:i,block:c});return t.push(l.createElement(y,O,l.createElement(v,S))),!b||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(c,d)||function(e,t,n){var r=[],i=!0,o=!1,a=void 0;try{for(var s,c=n.reverse()[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var f=s.value;if(f.type!==t)break;r.push(f)}}catch(e){o=!0,a=e}finally{try{i||null==c.return||c.return()}finally{if(o)throw a}}n.splice(n.indexOf(r[0]),r.length+1);var d=r.reverse(),p=d[0].key;n.push(l.cloneElement(e,{key:"".concat(p,"-wrap"),"data-offset-key":u.encode(p,0,0)},d))}(b,y,t),t}),[]));var k=n.getKey(),T=u.encode(k,0,0),j=_(n,s),P=j.CustomComponent,I=null!=P?l.createElement(P,i({},this.props,{tree:g.getBlockTree(k),blockProps:j.customProps,offsetKey:T,block:n})):l.createElement(c,{block:n,children:C,contentState:d,customStyleFn:v,customStyleMap:m,decorator:p,direction:y,forceSelection:O,hasSelection:b(S,k),selection:S,tree:E});if(n.getParentKey())return I;var R=w(n,o).Element,A=x(n,h,T,f,j,this.wrapperRef);return l.createElement(R,A,I)},r}(l.Component);e.exports=O},function(e,t,n){"use strict";var r=n(975),i=n(627),o=n(133),a=n(40),s=n(0),c=n(172),u=(a.List,function(e){var t,n;function a(){return e.apply(this,arguments)||this}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.prototype.render=function(){var e=this.props,t=e.block,n=e.contentState,a=e.customStyleFn,u=e.customStyleMap,l=e.decorator,f=e.direction,d=e.forceSelection,p=e.hasSelection,h=e.selection,g=e.tree,v=t.getKey(),m=t.getText(),y=g.size-1,b=this.props.children||g.map((function(e,c){var g=e.get("decoratorKey"),b=e.get("leaves"),w=b.size-1,_=b.map((function(e,n){var r=o.encode(v,c,n),l=e.get("start"),f=e.get("end");return s.createElement(i,{key:r,offsetKey:r,block:t,start:l,selection:p?h:null,forceSelection:d,text:m.slice(l,f),styleSet:t.getInlineStyleAt(l),customStyleMap:u,customStyleFn:a,isLast:g===y&&n===w})})).toArray();return g&&l?s.createElement(r,{block:t,children:_,contentState:n,decorator:l,decoratorKey:g,direction:f,leafSet:e,text:m,key:c}):_})).toArray();return s.createElement("div",{"data-offset-key":o.encode(v,0,0),className:c({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===f,"public/DraftStyleDefault/rtl":"RTL"===f})},b)},a}(s.Component));e.exports=u},function(e,t,n){"use strict";var r=n(131);function i(){return(i=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=n(133),a=n(0),s=n(437),c=n(309),u=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){var e=this.props,t=e.block,n=e.children,r=e.contentState,u=e.decorator,l=e.decoratorKey,f=e.direction,d=e.leafSet,p=e.text,h=t.getKey(),g=d.get("leaves"),v=u.getComponentForKey(l),m=u.getPropsForKey(l),y=o.encode(h,parseInt(l,10),0),b=p.slice(g.first().get("start"),g.last().get("end")),w=c.getHTMLDirIfDifferent(s.getDirection(b),f);return a.createElement(v,i({},m,{contentState:r,decoratedText:b,dir:w,key:y,entityKey:t.getEntityAt(d.get("start")),offsetKey:y}),n)},r}(a.Component);e.exports=u},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(0),a=n(87),s=n(42),c=n(173),u=a.isBrowser("IE <= 11");var l=function(e){var t,n;function a(t){var n;return i(r(n=e.call(this,t)||this),"_forceFlag",void 0),i(r(n),"_node",void 0),n._forceFlag=!1,n}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=a.prototype;return l.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;c(t)||s(!1);var r=t;return n?!function(e){return u?"\n"===e.textContent:"BR"===e.tagName}(r):r.textContent!==e.children},l.componentDidMount=function(){this._forceFlag=!this._forceFlag},l.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},l.render=function(){var e=this;return""===this.props.children?this._forceFlag?function(e){return u?o.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):o.createElement("br",{key:"A","data-text":"true",ref:e})}((function(t){return e._node=t})):function(e){return u?o.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):o.createElement("br",{key:"B","data-text":"true",ref:e})}((function(t){return e._node=t})):o.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(t){return e._node=t}},this.props.children)},a}(o.Component);e.exports=l},function(e,t,n){"use strict";var r=n(629),i=n(621),o=n(87),a=n(440),s=n(630),c=n(311),u=n(42),l=n(173),f=o.isBrowser("IE");function d(e,t){if(!e)return"[empty]";var n=function e(t,n){var r=void 0!==n?n(t):[];if(t.nodeType===Node.TEXT_NODE){var i=t.textContent.length;return c(t).createTextNode("[text "+i+(r.length?" | "+r.join(", "):"")+"]")}var o=t.cloneNode();1===o.nodeType&&r.length&&o.setAttribute("data-labels",r.join(", "));for(var a=t.childNodes,s=0;s<a.length;s++)o.appendChild(e(a[s],n));return o}(e,t);return n.nodeType===Node.TEXT_NODE?n.textContent:(l(n)||u(!1),n.outerHTML)}function p(e,t){for(var n=e,r=n;n;){if(l(n)&&r.hasAttribute("contenteditable"))return d(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function h(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function g(e,t,n,r){var o=s();if(e.extend&&null!=t&&a(o,t)){n>h(t)&&i.logSelectionStateFailure({anonymizedDom:p(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())});var c=t===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(t,n)}catch(a){throw i.logSelectionStateFailure({anonymizedDom:p(t,(function(t){var n=[];return t===o&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n})),extraParams:JSON.stringify({activeElementName:o?o.nodeName:null,nodeIsFocus:t===e.focusNode,nodeWasFocus:c,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:a?""+a:null,offset:n},null,2),selectionState:JSON.stringify(r.toJS(),null,2)}),a}}else if(t&&e.rangeCount>0){var u=e.getRangeAt(0);u.setEnd(t,n),e.addRange(u.cloneRange())}}function v(e,t,n,o){var a=c(t).createRange();if(n>h(t)&&(i.logSelectionStateFailure({anonymizedDom:p(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(o.toJS())}),r.handleExtensionCausedError()),a.setStart(t,n),f)try{e.addRange(a)}catch(e){0}else e.addRange(a)}e.exports={setDraftEditorSelection:function(e,t,n,r,i){var o=c(t);if(a(o.documentElement,t)){var s=o.defaultView.getSelection(),u=e.getAnchorKey(),l=e.getAnchorOffset(),f=e.getFocusKey(),d=e.getFocusOffset(),p=e.getIsBackward();if(!s.extend&&p){var h=u,m=l;u=f,l=d,f=h,d=m,p=!1}var y=u===n&&r<=l&&i>=l,b=f===n&&r<=d&&i>=d;if(y&&b)return s.removeAllRanges(),v(s,t,l-r,e),void g(s,t,d-r,e);if(p){if(b&&(s.removeAllRanges(),v(s,t,d-r,e)),y){var w=s.focusNode,_=s.focusOffset;s.removeAllRanges(),v(s,t,l-r,e),g(s,w,_,e)}}else y&&(s.removeAllRanges(),v(s,t,l-r,e)),b&&g(s,t,d-r,e)}},addFocusToSelection:g}},function(e,t,n){"use strict";var r=n(979);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},function(e,t,n){"use strict";var r=n(981),i=n(982);function o(e){return null==e?e:String(e)}e.exports=function(e,t){var n;if(window.getComputedStyle&&(n=window.getComputedStyle(e,null)))return o(n.getPropertyValue(i(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(n=document.defaultView.getComputedStyle(e,null))return o(n.getPropertyValue(i(t)));if("display"===t)return"none"}return e.currentStyle?o("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[r(t)]):o(e.style&&e.style[r(t)])}},function(e,t,n){"use strict";var r=/-(.)/g;e.exports=function(e){return e.replace(r,(function(e,t){return t.toUpperCase()}))}},function(e,t,n){"use strict";var r=/([A-Z])/g;e.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},function(e,t,n){"use strict";var r=n(440);e.exports=function(e){var t=e.ownerDocument.documentElement;if(!("getBoundingClientRect"in e)||!r(t,e))return{left:0,right:0,top:0,bottom:0};var n=e.getBoundingClientRect();return{left:Math.round(n.left)-t.clientLeft,right:Math.round(n.right)-t.clientLeft,top:Math.round(n.top)-t.clientTop,bottom:Math.round(n.bottom)-t.clientTop}}},function(e,t,n){"use strict";var r="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;e.exports=function(e){return(e=e||document).scrollingElement?e.scrollingElement:r||"CSS1Compat"!==e.compatMode?e.body:e.documentElement}},function(e,t,n){"use strict";e.exports=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}},function(e,t,n){"use strict";var r=n(131);function i(){return(i=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(633),c=n(133),u=n(0),l=n(172),f=n(987),d=n(86),p=function(e,t,n,r){return l({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":n,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":t>=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},h=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),s=n.getCurrentContent(),c=t.getDecorator(),u=n.getDecorator();return i!==o||a!==s||c!==u||n.mustForceSelection()},a.render=function(){for(var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,a=e.customStyleMap,l=e.customStyleFn,h=e.editorState,g=e.editorKey,v=e.preventScroll,m=e.textDirectionality,y=h.getCurrentContent(),b=h.getSelection(),w=h.mustForceSelection(),_=h.getDecorator(),x=d(h.getDirectionMap()),O=y.getBlocksAsArray(),S=[],E=null,C=null,k=0;k<O.length;k++){var T=O[k],j=T.getKey(),P=T.getType(),I=n(T),R=void 0,A=void 0,M=void 0;I&&(R=I.component,A=I.props,M=I.editable);var D=m||x.get(j),N=c.encode(j,0,0),L={contentState:y,block:T,blockProps:A,blockStyleFn:r,customStyleMap:a,customStyleFn:l,decorator:_,direction:D,forceSelection:w,offsetKey:N,preventScroll:v,selection:b,tree:h.getBlockTree(j)},z=t.get(P)||t.get("unstyled"),B=z.wrapper,F=z.element||t.get("unstyled").element,W=T.getDepth(),H="";if(r&&(H=r(T)),"li"===F)H=f(H,p(P,W,C!==B||null===E||W>E,D));var V=R||s,U={className:H,"data-block":!0,"data-editor":g,"data-offset-key":N,key:j};void 0!==M&&(U=o({},U,{contentEditable:M,suppressContentEditableWarning:!0}));var q=u.createElement(F,U,u.createElement(V,i({},L,{key:j})));S.push({block:q,wrapperTemplate:B,key:j,offsetKey:N}),E=B?T.getDepth():null,C=B}for(var G=[],K=0;K<S.length;){var $=S[K];if($.wrapperTemplate){var Z=[];do{Z.push(S[K].block),K++}while(K<S.length&&S[K].wrapperTemplate===$.wrapperTemplate);var X=u.cloneElement($.wrapperTemplate,{key:$.key+"-wrap","data-offset-key":$.offsetKey},Z);G.push(X)}else G.push($.block),K++}return u.createElement("div",{"data-contents":"true"},G)},r}(u.Component);e.exports=h},function(e,t,n){"use strict";e.exports=function(e){var t=e||"",n=arguments.length;if(n>1)for(var r=1;r<n;r++){var i=arguments[r];i&&(t=(t?t+" ":"")+i)}return t}},function(e,t,n){"use strict";var r=n(634),i=n(85),o=n(51),a=n(310),s=n(311),c=n(636),u=n(625),l=n(619),f=n(315),d=n(86);var p={onDragEnd:function(e){e.exitCurrentMode(),h(e)},onDrop:function(e,t){var n=new r(t.nativeEvent.dataTransfer),l=e._latestEditorState,p=function(e,t){var n=null,r=null,i=s(e.currentTarget);if("function"==typeof i.caretRangeFromPoint){var o=i.caretRangeFromPoint(e.x,e.y);n=o.startContainer,r=o.startOffset}else{if(!e.rangeParent)return null;n=e.rangeParent,r=e.rangeOffset}n=d(n),r=d(r);var c=d(a(n));return u(t,c,r,c,r)}(t.nativeEvent,l);if(t.preventDefault(),e._dragCount=0,e.exitCurrentMode(),null!=p){var v=n.getFiles();if(v.length>0){if(e.props.handleDroppedFiles&&f(e.props.handleDroppedFiles(p,v)))return;c(v,(function(t){t&&e.update(g(l,p,t))}))}else{var m=e._internalDrag?"internal":"external";e.props.handleDrop&&f(e.props.handleDrop(p,n,m))||(e._internalDrag?e.update(function(e,t){var n=i.moveText(e.getCurrentContent(),e.getSelection(),t);return o.push(e,n,"insert-fragment")}(l,p)):e.update(g(l,p,n.getText()))),h(e)}}}};function h(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:l(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function g(e,t,n){var r=i.insertText(e.getCurrentContent(),t,n,e.getCurrentInlineStyle());return o.push(e,r,"insert-fragment")}e.exports=p},function(e,t,n){"use strict";var r={isImage:function(e){return"image"===i(e)[0]},isJpeg:function(e){var t=i(e);return r.isImage(e)&&("jpeg"===t[1]||"pjpeg"===t[1])}};function i(e){return e.split("/")}e.exports=r},function(e,t,n){"use strict";var r=n(42);e.exports=function(e){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(e)?Array.isArray(e)?e.slice():function(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e)&&r(!1),"number"!=typeof t&&r(!1),0===t||t-1 in e||r(!1),"function"==typeof e.callee&&r(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),i=0;i<t;i++)n[i]=e[i];return n}(e):[e]}},function(e,t,n){"use strict";var r=n(87),i=n(992),o=n(996),a=n(997),s=n(998),c=n(999),u=n(1001),l=n(1002),f=n(1003),d=n(1004),p=n(1005),h=n(1019),g=n(620),v=r.isBrowser("Chrome"),m=r.isBrowser("Firefox"),y=v||m?g:function(e){},b={onBeforeInput:i,onBlur:o,onCompositionStart:a,onCopy:s,onCut:c,onDragOver:u,onDragStart:l,onFocus:f,onInput:d,onKeyDown:p,onPaste:h,onSelect:g,onMouseUp:y,onKeyUp:y};e.exports=b},function(e,t,n){"use strict";var r=n(85),i=n(51),o=n(87),a=n(439),s=n(315),c=n(993),u=n(86),l=n(994),f=o.isBrowser("Firefox");function d(e,t,n,o,a){var s=r.replaceText(e.getCurrentContent(),e.getSelection(),t,n,o);return i.push(e,s,"insert-characters",a)}e.exports=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e._latestEditorState,r=t.data;if(r)if(e.props.handleBeforeInput&&s(e.props.handleBeforeInput(r,n,t.timeStamp)))t.preventDefault();else{var o=n.getSelection(),p=o.getStartOffset(),h=o.getAnchorKey();if(!o.isCollapsed())return t.preventDefault(),void e.update(d(n,r,n.getCurrentInlineStyle(),a(n.getCurrentContent(),n.getSelection()),!0));var g,v=d(n,r,n.getCurrentInlineStyle(),a(n.getCurrentContent(),n.getSelection()),!1),m=!1;if(m||(m=c(e._latestCommittedEditorState)),!m){var y=n.getBlockTree(h),b=v.getBlockTree(h);m=y.size!==b.size||y.zip(b).some((function(e){var t=e[0],n=e[1],i=t.get("start"),o=i+(i>=p?r.length:0),a=t.get("end"),s=a+(a>=p?r.length:0),c=n.get("start"),u=n.get("end"),l=n.get("decoratorKey");return t.get("decoratorKey")!==l||t.get("leaves").size!==n.get("leaves").size||o!==c||s!==u||null!=l&&u-c!=a-i}))}if(m||(g=r,m=f&&("'"==g||"/"==g)),m||(m=u(v.getDirectionMap()).get(h)!==u(n.getDirectionMap()).get(h)),m)return t.preventDefault(),v=i.set(v,{forceSelection:!0}),void e.update(v);v=i.set(v,{nativelyRenderedContent:v.getCurrentContent()}),e._pendingStateFromBeforeInput=v,l((function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),i=t.getStartOffset(),o=!1;return r.some((function(e){return i===e.get("start")?(o=!0,!0):i<e.get("end")&&e.get("leaves").some((function(e){var t=e.get("start");return i===t&&(o=!0,!0)}))})),o}},function(e,t,n){"use strict";(function(t){n(995),e.exports=t.setImmediate}).call(this,n(91))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,c=1,u={},l=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return u[c]=i,r(c),c++},d.clearImmediate=p}function p(e){delete u[e]}function h(e){if(l)setTimeout(h,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(91),n(637))},function(e,t,n){"use strict";var r=n(51),i=n(440),o=n(630);e.exports=function(e,t){var n=t.currentTarget.ownerDocument;if(!Boolean(e.props.preserveSelectionOnBlur)&&o(n)===n.body){var a=n.defaultView.getSelection(),s=e.editor;1===a.rangeCount&&i(s,a.anchorNode)&&i(s,a.focusNode)&&a.removeAllRanges()}var c=e._latestEditorState,u=c.getSelection();if(u.getHasFocus()){var l=u.set("hasFocus",!1);e.props.onBlur&&e.props.onBlur(t),e.update(r.acceptSelection(c,l))}}},function(e,t,n){"use strict";var r=n(51);e.exports=function(e,t){e.setMode("composite"),e.update(r.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)}},function(e,t,n){"use strict";var r=n(638);e.exports=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(r(e._latestEditorState))}},function(e,t,n){"use strict";var r=n(85),i=n(51),o=n(313),a=n(638),s=n(314),c=n(1e3);e.exports=function(e,t){var n,u=e._latestEditorState,l=u.getSelection(),f=t.target;if(l.isCollapsed())t.preventDefault();else{if(c(f)){var d=f;n=s(o.getScrollParent(d))}var p=a(u);e.setClipboard(p),e.setMode("cut"),setTimeout((function(){e.restoreEditorDOM(n),e.exitCurrentMode(),e.update(function(e){var t=r.removeRange(e.getCurrentContent(),e.getSelection(),"forward");return i.push(e,t,"remove-range")}(u))}),0)}}},function(e,t,n){"use strict";e.exports=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1}},function(e,t,n){"use strict";e.exports=function(e,t){e.setMode("drag"),t.preventDefault()}},function(e,t,n){"use strict";e.exports=function(e){e._internalDrag=!0,e.setMode("drag")}},function(e,t,n){"use strict";var r=n(51),i=n(87);e.exports=function(e,t){var n=e._latestEditorState,o=n.getSelection();if(!o.getHasFocus()){var a=o.set("hasFocus",!0);e.props.onFocus&&e.props.onFocus(t),i.isBrowser("Chrome < 60.0.3081.0")?e.update(r.forceSelection(n,a)):e.update(r.acceptSelection(n,a))}}},function(e,t,n){"use strict";var r=n(85),i=n(133),o=n(51),a=n(87),s=n(626).notEmptyKey,c=n(310),u=n(639),l=n(86),f=a.isEngine("Gecko");e.exports=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e.editor.ownerDocument.defaultView.getSelection(),a=n.anchorNode,d=n.isCollapsed,p=(null==a?void 0:a.nodeType)!==Node.TEXT_NODE&&(null==a?void 0:a.nodeType)!==Node.ELEMENT_NODE;if(null!=a&&!p){if(a.nodeType===Node.TEXT_NODE&&(null!==a.previousSibling||null!==a.nextSibling)){var h=a.parentNode;if(null==h)return;a.nodeValue=h.textContent;for(var g=h.firstChild;null!=g;g=g.nextSibling)g!==a&&h.removeChild(g)}var v=a.textContent,m=e._latestEditorState,y=l(c(a)),b=i.decode(y),w=b.blockKey,_=b.decoratorKey,x=b.leafKey,O=m.getBlockTree(w).getIn([_,"leaves",x]),S=O.start,E=O.end,C=m.getCurrentContent(),k=C.getBlockForKey(w),T=k.getText().slice(S,E);if(v.endsWith("\n\n")&&(v=v.slice(0,-1)),v!==T){var j,P,I,R,A=m.getSelection(),M=A.merge({anchorOffset:S,focusOffset:E,isBackward:!1}),D=k.getEntityAt(S),N=s(D)?C.getEntity(D):null,L="MUTABLE"===(null!=N?N.getMutability():null),z=L?"spellcheck-change":"apply-entity",B=r.replaceText(C,M,v,k.getInlineStyleAt(S),L?k.getEntityAt(S):null);if(f)j=n.anchorOffset,P=n.focusOffset,R=(I=S+Math.min(j,P))+Math.abs(j-P),j=I,P=R;else{var F=v.length-T.length;I=A.getStartOffset(),R=A.getEndOffset(),j=d?R+F:I,P=R+F}var W=B.merge({selectionBefore:C.getSelectionAfter(),selectionAfter:A.merge({anchorOffset:j,focusOffset:P})});e.update(o.push(m,W,z))}else{var H=t.nativeEvent.inputType;if(H){var V=function(e,t){switch(e){case"deleteContentBackward":return u(t)}return t}(H,m);if(V!==m)return e.restoreEditorDOM(),void e.update(V)}}}}},function(e,t,n){"use strict";var r=n(85),i=n(51),o=n(444),a=n(312),s=n(1007),c=n(87),u=n(315),l=n(1008),f=n(1010),d=n(1012),p=n(1013),h=n(1014),g=n(1015),v=n(639),m=n(1016),y=n(1017),b=n(1018),w=o.isOptionKeyCommand,_=c.isBrowser("Chrome");e.exports=function(e,t){var n=t.which,o=e._latestEditorState;function c(n){var r=e.props[n];return!!r&&(r(t),!0)}switch(n){case a.RETURN:if(t.preventDefault(),e.props.handleReturn&&u(e.props.handleReturn(t,o)))return;break;case a.ESC:if(t.preventDefault(),c("onEscape"))return;break;case a.TAB:if(c("onTab"))return;break;case a.UP:if(c("onUpArrow"))return;break;case a.RIGHT:if(c("onRightArrow"))return;break;case a.DOWN:if(c("onDownArrow"))return;break;case a.LEFT:if(c("onLeftArrow"))return;break;case a.SPACE:_&&w(t)&&t.preventDefault()}var x=e.props.keyBindingFn(t);if(null!=x&&""!==x)if("undo"!==x){if(t.preventDefault(),!e.props.handleKeyCommand||!u(e.props.handleKeyCommand(x,o,t.timeStamp))){var O=function(e,t,n){switch(e){case"redo":return i.redo(t);case"delete":return m(t);case"delete-word":return d(t);case"backspace":return v(t);case"backspace-word":return f(t);case"backspace-to-start-of-line":return l(t,n);case"split-block":return p(t);case"transpose-characters":return y(t);case"move-selection-to-start-of-block":return g(t);case"move-selection-to-end-of-block":return h(t);case"secondary-cut":return s.cut(t);case"secondary-paste":return s.paste(t);default:return t}}(x,o,t);O!==o&&e.update(O)}}else b(t,o,e.update);else if(n===a.SPACE&&_&&w(t)){var S=r.replaceText(o.getCurrentContent(),o.getSelection()," ");e.update(i.push(o,S,"insert-characters"))}}},function(e,t,n){"use strict";var r=n(312);e.exports=function(e){return e.which===r.RETURN&&(e.getModifierState("Shift")||e.getModifierState("Alt")||e.getModifierState("Control"))}},function(e,t,n){"use strict";var r=n(85),i=n(51),o=n(306),a=n(86),s=null,c={cut:function(e){var t=e.getCurrentContent(),n=e.getSelection(),c=null;if(n.isCollapsed()){var u=n.getAnchorKey(),l=t.getBlockForKey(u).getLength();if(l===n.getAnchorOffset()){var f=t.getKeyAfter(u);if(null==f)return e;c=n.set("focusKey",f).set("focusOffset",0)}else c=n.set("focusOffset",l)}else c=n;c=a(c),s=o(t,c);var d=r.removeRange(t,c,"forward");return d===t?e:i.push(e,d,"remove-range")},paste:function(e){if(!s)return e;var t=r.replaceWithFragment(e.getCurrentContent(),e.getSelection(),s);return i.push(e,t,"insert-fragment")}};e.exports=c},function(e,t,n){"use strict";var r=n(51),i=n(1009),o=n(624),a=n(442),s=n(238);e.exports=function(e,t){var n=s(e,(function(e){var n=e.getSelection();if(n.isCollapsed()&&0===n.getAnchorOffset())return a(e,1);var r=t.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return r=i(r),o(e,null,r.endContainer,r.endOffset,r.startContainer,r.startOffset).selectionState}),"backward");return n===e.getCurrentContent()?e:r.push(e,n,"remove-range")}},function(e,t,n){"use strict";var r=n(174),i=n(311),o=n(640),a=n(42);function s(e,t){for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<e.length;a++){var s=e[a];0!==s.width&&1!==s.width&&(n=Math.min(n,s.top),r=Math.min(r,s.bottom),i=Math.max(i,s.top),o=Math.max(o,s.bottom))}return i<=r&&i-n<t&&o-r<t}function c(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}e.exports=function(e){e.collapsed||a(!1);var t=(e=e.cloneRange()).startContainer;1!==t.nodeType&&(t=t.parentNode);var n=function(e){var t=getComputedStyle(e),n=i(e),r=n.createElement("div");r.style.fontFamily=t.fontFamily,r.style.fontSize=t.fontSize,r.style.fontStyle=t.fontStyle,r.style.fontWeight=t.fontWeight,r.style.lineHeight=t.lineHeight,r.style.position="absolute",r.textContent="M";var o=n.body;o||a(!1),o.appendChild(r);var s=r.getBoundingClientRect();return o.removeChild(r),s.height}(t),u=e.endContainer,l=e.endOffset;for(e.setStart(e.startContainer,0);s(o(e),n)&&(u=e.startContainer,l=e.startOffset,u.parentNode||a(!1),e.setStartBefore(u),1!==u.nodeType||"inline"===getComputedStyle(u).display););for(var f=u,d=l-1;;){for(var p=f.nodeValue,h=d;h>=0;h--)if(!(null!=p&&h>0&&r.isSurrogatePair(p,h-1))){if(e.setStart(f,h),!s(o(e),n))break;u=f,l=h}if(-1===h||0===f.childNodes.length)break;d=c(f=f.childNodes[h])}return e.setStart(u,l),e}},function(e,t,n){"use strict";var r=n(641),i=n(51),o=n(442),a=n(238);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),n=t.getStartOffset();if(0===n)return o(e,1);var i=t.getStartKey(),a=e.getCurrentContent().getBlockForKey(i).getText().slice(0,n),s=r.getBackward(a);return o(e,s.length||1)}),"backward");return t===e.getCurrentContent()?e:i.push(e,t,"remove-range")}},function(e,t,n){"use strict";e.exports={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:----・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}},function(e,t,n){"use strict";var r=n(641),i=n(51),o=n(642),a=n(238);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),n=t.getStartOffset(),i=t.getStartKey(),a=e.getCurrentContent().getBlockForKey(i).getText().slice(n),s=r.getForward(a);return o(e,s.length||1)}),"forward");return t===e.getCurrentContent()?e:i.push(e,t,"remove-range")}},function(e,t,n){"use strict";var r=n(85),i=n(51);e.exports=function(e){var t=r.splitBlock(e.getCurrentContent(),e.getSelection());return i.push(e,t,"split-block")}},function(e,t,n){"use strict";var r=n(51);e.exports=function(e){var t=e.getSelection(),n=t.getEndKey(),i=e.getCurrentContent().getBlockForKey(n).getLength();return r.set(e,{selection:t.merge({anchorKey:n,anchorOffset:i,focusKey:n,focusOffset:i,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(51);e.exports=function(e){var t=e.getSelection(),n=t.getStartKey();return r.set(e,{selection:t.merge({anchorKey:n,anchorOffset:0,focusKey:n,focusOffset:0,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(51),i=n(174),o=n(642),a=n(238);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),a=t.getAnchorOffset(),s=n.getBlockForKey(r).getText()[a];return o(e,s?i.getUTF16Length(s,0):1)}),"forward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"delete-character":"remove-range")}},function(e,t,n){"use strict";var r=n(85),i=n(51),o=n(306);e.exports=function(e){var t=e.getSelection();if(!t.isCollapsed())return e;var n=t.getAnchorOffset();if(0===n)return e;var a,s,c=t.getAnchorKey(),u=e.getCurrentContent(),l=u.getBlockForKey(c).getLength();if(l<=1)return e;n===l?(a=t.set("anchorOffset",n-1),s=t):s=(a=t.set("focusOffset",n+1)).set("anchorOffset",n+1);var f=o(u,a),d=r.removeRange(u,a,"backward"),p=d.getSelectionAfter(),h=p.getAnchorOffset()-1,g=p.merge({anchorOffset:h,focusOffset:h}),v=r.replaceWithFragment(d,g,f),m=i.push(e,v,"insert-fragment");return i.acceptSelection(m,s)}},function(e,t,n){"use strict";var r=n(51);e.exports=function(e,t,n){var i=r.undo(t);if("spellcheck-change"!==t.getLastChangeType())e.preventDefault(),t.getNativelyRenderedContent()?(n(r.set(t,{nativelyRenderedContent:null})),setTimeout((function(){n(i)}),0)):n(i);else{var o=i.getCurrentContent();n(r.set(i,{nativelyRenderedContent:o}))}}},function(e,t,n){"use strict";var r=n(235),i=n(98),o=n(634),a=n(85),s=n(1020),c=n(51),u=n(645),l=n(439),f=n(636),d=n(315),p=n(1025);function h(e,t,n){var r=a.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return c.push(e,r.set("entityMap",n),"insert-fragment")}e.exports=function(e,t){t.preventDefault();var n=new o(t.clipboardData);if(!n.isRichText()){var g=n.getFiles(),v=n.getText();if(g.length>0){if(e.props.handlePastedFiles&&d(e.props.handlePastedFiles(g)))return;return void f(g,(function(t){if(t=t||v){var n=e._latestEditorState,o=p(t),f=i.create({style:n.getCurrentInlineStyle(),entity:l(n.getCurrentContent(),n.getSelection())}),d=u.getCurrentBlockType(n),h=s.processText(o,f,d),g=r.createFromArray(h),m=a.replaceWithFragment(n.getCurrentContent(),n.getSelection(),g);e.update(c.push(n,m,"insert-fragment"))}}))}}var m=[],y=n.getText(),b=n.getHTML(),w=e._latestEditorState;if(e.props.formatPastedText){var _=e.props.formatPastedText(y,b);y=_.text,b=_.html}if(!e.props.handlePastedText||!d(e.props.handlePastedText(y,b,w))){if(y&&(m=p(y)),!e.props.stripPastedStyles){var x,O=e.getClipboard();if(!e.props.formatPastedText&&n.isRichText()&&O){if(-1!==(null===(x=b)||void 0===x?void 0:x.indexOf(e.getEditorKey()))||1===m.length&&1===O.size&&O.first().getText()===y)return void e.update(h(e._latestEditorState,O))}else if(O&&n.types.includes("com.apple.webarchive")&&!n.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every((function(t,n){return t.getText()===e[n]}))}(m,O))return void e.update(h(e._latestEditorState,O));if(b){var S=s.processHTML(b,e.props.blockRenderMap);if(S){var E=S.contentBlocks,C=S.entityMap;if(E){var k=r.createFromArray(E);return void e.update(h(e._latestEditorState,k,C))}}}e.setClipboard(null)}if(m.length){var T=i.create({style:w.getCurrentInlineStyle(),entity:l(w.getCurrentContent(),w.getSelection())}),j=u.getCurrentBlockType(w),P=s.processText(m,T,j),I=r.createFromArray(P);e.update(h(e._latestEditorState,I))}}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(171),o=n(99),a=n(643),s=n(116),c=n(644),u=n(146),l=n(40),f=n(616),d=l.List,p=l.Repeat,h=u("draft_tree_data_support"),g=h?o:i,v={processHTML:function(e,t){return a(e,c,t)},processText:function(e,t,n){return e.reduce((function(e,i,o){i=f(i);var a=s(),c={key:a,type:n,text:i,characterList:d(p(t,i.length))};if(h&&0!==o){var u=o-1;c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){r(e,t,n[t])}))}return e}({},c,{prevSibling:(e[u]=e[u].merge({nextSibling:a})).getKey()})}return e.push(new g(c)),e}),[])}};e.exports=v},function(e,t,n){"use strict";var r=function(){function e(e){var t,n,r;r=void 0,(n="_uri")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this._uri=e}return e.prototype.toString=function(){return this._uri},e}();e.exports=r},function(e,t,n){"use strict";var r=n(173);e.exports=function(e){return!(!e||!e.ownerDocument)&&(r(e)&&"A"===e.nodeName)}},function(e,t,n){"use strict";var r=n(173);e.exports=function(e){return!(!e||!e.ownerDocument)&&(r(e)&&"IMG"===e.nodeName)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var i=t.getStartKey(),o=t.getEndKey(),a=e.getBlockMap(),s=a.toSeq().skipUntil((function(e,t){return t===i})).takeUntil((function(e,t){return t===o})).concat([[o,a.get(o)]]).map((function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)}));return a=a.merge(s),e.merge({blockMap:a,selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var r=/\r\n?|\n/g;e.exports=function(e){return e.split(r)}},function(e,t,n){"use strict";var r=n(33).unstable_flushControlled;e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(172),o=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=o.prototype;return a.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},a.render=function(){var e=this.props.editorState.getSelection().getHasFocus(),t=i({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":e});return r.createElement("div",{className:t},r.createElement("div",{className:i("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},o}(r.Component);e.exports=o},function(e,t,n){},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(171),o=n(99),a=n(647),s=n(1030),c=n(1031),u=n(42),l=function(e,t){return{key:e.getKey(),text:e.getText(),type:e.getType(),depth:e.getDepth(),inlineStyleRanges:c(e),entityRanges:s(e,t),data:e.getData().toObject()}},f=function(e,t,n,a){if(e instanceof i)n.push(l(e,t));else{e instanceof o||u(!1);var s=e.getParentKey(),c=a[e.getKey()]=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){r(e,t,n[t])}))}return e}({},l(e,t),{children:[]});s?a[s].children.push(c):n.push(c)}};e.exports=function(e){var t={entityMap:{},blocks:[]};return t=function(e,t){var n=t.entityMap,r=[],i={},o={},s=0;return e.getBlockMap().forEach((function(e){e.findEntityRanges((function(e){return null!==e.getEntity()}),(function(t){var r=e.getEntityAt(t),i=a.stringify(r);o[i]||(o[i]=r,n[i]="".concat(s),s++)})),f(e,n,r,i)})),{blocks:r,entityMap:n}}(e,t),t=function(e,t){var n=t.blocks,r=t.entityMap,i={};return Object.keys(r).forEach((function(t,n){var r=e.getEntity(a.unstringify(t));i[n]={type:r.getType(),mutability:r.getMutability(),data:r.getData()}})),{blocks:n,entityMap:i}}(e,t)}},function(e,t,n){"use strict";var r=n(647),i=n(174).strlen;e.exports=function(e,t){var n=[];return e.findEntityRanges((function(e){return!!e.getEntity()}),(function(o,a){var s=e.getText(),c=e.getEntityAt(o);n.push({offset:i(s.slice(0,o)),length:i(s.slice(o,a)),key:Number(t[r.stringify(c)])})})),n}},function(e,t,n){"use strict";var r=n(174),i=n(236),o=function(e,t){return e===t},a=function(e){return!!e},s=[];e.exports=function(e){var t=e.getCharacterList().map((function(e){return e.getStyle()})).toList(),n=t.flatten().toSet().map((function(n){return function(e,t,n){var s=[],c=t.map((function(e){return e.has(n)})).toList();return i(c,o,a,(function(t,i){var o=e.getText();s.push({offset:r.strlen(o.slice(0,t)),length:r.strlen(o.slice(t,i)),style:n})})),s}(e,t,n)}));return Array.prototype.concat.apply(s,n.toJS())}},function(e,t,n){"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(171),a=n(99),s=n(436),c=n(307),u=n(1033),l=(n(1034),n(308)),f=n(1035),d=n(1036),p=n(1037),h=n(116),g=n(146),v=n(40),m=n(42),y=g("draft_tree_data_support"),b=v.List,w=v.Map,_=v.OrderedMap,x=function(e,t){var n=e.key,r=e.type,i=e.data;return{text:e.text,depth:e.depth||0,type:r||"unstyled",key:n||h(),data:w(i),characterList:O(e,t)}},O=function(e,t){var n=e.text,i=e.entityRanges,o=e.inlineStyleRanges,a=i||[];return f(p(n,o||[]),d(n,a.filter((function(e){return t.hasOwnProperty(e.key)})).map((function(e){return r({},e,{key:t[e.key]})}))))},S=function(e){return r({},e,{key:e.key||h()})},E=function(e,t,n){var i=t.map((function(e){return r({},e,{parentRef:n})}));return e.concat(i.reverse())},C=function(e,t){var n=e.blocks.find((function(e){return Array.isArray(e.children)&&e.children.length>0})),i=y&&!n?u.fromRawStateToRawTreeState(e).blocks:e.blocks;return y?function(e,t){return e.map(S).reduce((function(n,i,o){Array.isArray(i.children)||m(!1);var s=i.children.map(S),c=new a(r({},x(i,t),{prevSibling:0===o?null:e[o-1].key,nextSibling:o===e.length-1?null:e[o+1].key,children:b(s.map((function(e){return e.key})))}));n=n.set(c.getKey(),c);for(var u=E([],s,c);u.length>0;){var l=u.pop(),f=l.parentRef,d=f.getChildKeys(),p=d.indexOf(l.key),h=Array.isArray(l.children);if(!h){h||m(!1);break}var g=l.children.map(S),v=new a(r({},x(l,t),{parent:f.getKey(),children:b(g.map((function(e){return e.key}))),prevSibling:0===p?null:d.get(p-1),nextSibling:p===d.size-1?null:d.get(p+1)}));n=n.set(v.getKey(),v),u=E(u,g,v)}return n}),_())}(i,t):function(e,t){return _(e.map((function(e){var n=new o(x(e,t));return[n.getKey(),n]})))}(n?u.fromRawTreeStateToRawState(e).blocks:i,t)};e.exports=function(e){Array.isArray(e.blocks)||m(!1);var t=function(e){var t=e.entityMap,n={};return Object.keys(t).forEach((function(e){var r=t[e],i=r.type,o=r.mutability,a=r.data;n[e]=c.__create(i,o,a||{})})),n}(e),n=C(e,t),r=n.isEmpty()?new l:l.createEmpty(n.first().getKey());return new s({blockMap:n,entityMap:t,selectionBefore:r,selectionAfter:r})}},function(e,t,n){"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(116),a=n(42),s=function(e){if(!e||!e.type)return!1;var t=e.type;return"unordered-list-item"===t||"ordered-list-item"===t},c={fromRawTreeStateToRawState:function(e){var t=e.blocks,n=[];return Array.isArray(t)||a(!1),Array.isArray(t)&&t.length?(function(e,t){for(var n=[].concat(e).reverse();n.length;){var r=n.pop();t(r);var i=r.children;Array.isArray(i)||a(!1),n=n.concat([].concat(i.reverse()))}}(t,(function(e){var t=r({},e);s(e)&&(t.depth=t.depth||0,function(e){Array.isArray(e.children)&&(e.children=e.children.map((function(t){return t.type===e.type?r({},t,{depth:(e.depth||0)+1}):t})))}(e),null!=e.children&&e.children.length>0)||(delete t.children,n.push(t))})),e.blocks=n,r({},e,{blocks:n})):e},fromRawStateToRawTreeState:function(e){var t=[],n=[];return e.blocks.forEach((function(e){var i=s(e),a=e.depth||0,c=r({},e,{children:[]});if(i){var u=n[0];if(null==u&&0===a)t.push(c);else if(null==u||u.depth<a-1){var l={key:o(),text:"",depth:a-1,type:e.type,children:[],entityRanges:[],inlineStyleRanges:[]};n.unshift(l),1===a?t.push(l):null!=u&&u.children.push(l),l.children.push(c)}else if(u.depth===a-1)u.children.push(c);else{for(;null!=u&&u.depth>=a;)n.shift(),u=n[0];a>0?u.children.push(c):t.push(c)}}else t.push(c)})),r({},e,{blocks:t})}};e.exports=c},function(e,t,n){"use strict";n(443);var r={isValidBlock:function(e,t){var n=e.getKey(),r=e.getParentKey();if(null!=r&&!t.get(r).getChildKeys().includes(n))return!1;if(!e.getChildKeys().map((function(e){return t.get(e)})).every((function(e){return e.getParentKey()===n})))return!1;var i=e.getPrevSiblingKey();if(null!=i&&t.get(i).getNextSiblingKey()!==n)return!1;var o=e.getNextSiblingKey();if(null!=o&&t.get(o).getPrevSiblingKey()!==n)return!1;return(null===o||null===i||i!==o)&&!(""!=e.text&&e.getChildKeys().size>0)},isConnectedTree:function(e){var t=e.toArray().filter((function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()}));if(1!==t.length)return!1;for(var n=0,r=t.shift().getKey(),i=[];null!=r;){var o=e.get(r),a=o.getChildKeys(),s=o.getNextSiblingKey();if(a.size>0){null!=s&&i.unshift(s);var c=a.map((function(t){return e.get(t)})).find((function(e){return null==e.getPrevSiblingKey()}));if(null==c)return!1;r=c.getKey()}else r=null!=o.getNextSiblingKey()?o.getNextSiblingKey():i.shift();n++}return n===e.size},isValidTree:function(e){var t=this;return!!e.toArray().every((function(n){return t.isValidBlock(n,e)}))&&this.isConnectedTree(e)}};e.exports=r},function(e,t,n){"use strict";var r=n(98),i=n(40).List;e.exports=function(e,t){var n=e.map((function(e,n){var i=t[n];return r.create({style:e,entity:i})}));return i(n)}},function(e,t,n){"use strict";var r=n(174).substr;e.exports=function(e,t){var n=Array(e.length).fill(null);return t&&t.forEach((function(t){for(var i=r(e,0,t.offset).length,o=i+r(e,t.offset,t.length).length,a=i;a<o;a++)n[a]=t.key})),n}},function(e,t,n){"use strict";var r=n(174),i=n(40).OrderedSet,o=r.substr,a=i();e.exports=function(e,t){var n=Array(e.length).fill(a);return t&&t.forEach((function(t){for(var r=o(e,0,t.offset).length,i=r+o(e,t.offset,t.length).length;r<i;)n[r]=n[r].add(t.style),r++})),n}},function(e,t,n){"use strict";var r=n(1039);e.exports=function(e){var t=e.getSelection();if(!t.rangeCount)return null;var n=t.getRangeAt(0),i=r(n),o=i.top,a=i.right,s=i.bottom,c=i.left;return 0===o&&0===a&&0===s&&0===c?null:i}},function(e,t,n){"use strict";var r=n(640);e.exports=function(e){var t=r(e),n=0,i=0,o=0,a=0;if(t.length){if(t.length>1&&0===t[0].width){var s=t[1];n=s.top,i=s.right,o=s.bottom,a=s.left}else{var c=t[0];n=c.top,i=c.right,o=c.bottom,a=c.left}for(var u=1;u<t.length;u++){var l=t[u];0!==l.height&&0!==l.width&&(n=Math.min(n,l.top),i=Math.max(i,l.right),o=Math.max(o,l.bottom),a=Math.min(a,l.left))}}return{top:n,right:i,bottom:o,left:a,width:i-a,height:o-n}}},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"}),"FormatBold");t.default=a},function(e,t,n){"use strict";var r=n(13),i=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(19)).default)(o.createElement("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic");t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){function e(e){var t=e.canvasId,n=e.id,r=e.xywh,i=e.body,o=e.tags,a=e.svg,s=e.manifestId;this.id=n,this.canvasId=t,this.xywh=r,this.body=i,this.tags=o,this.svg=a,this.manifestId=s}var t=e.prototype;return t.toJson=function(){return{body:this.createBody(),id:this.id,motivation:"commenting",target:this.target(),type:"Annotation"}},t.createBody=function(){var e=[];return this.body&&e.push({type:"TextualBody",value:this.body}),this.tags&&(e=e.concat(this.tags.map((function(e){return{purpose:"tagging",type:"TextualBody",value:e}})))),1===e.length?e[0]:e},t.target=function(){var e=this.canvasId;if((this.svg||this.xywh)&&(e={source:this.source()}),this.svg&&(e.selector={type:"SvgSelector",value:this.svg}),this.xywh){var t={type:"FragmentSelector",value:"xywh="+this.xywh};e.selector?e.selector=[t,e.selector]:e.selector=t}return e},t.source=function(){var e=this.canvasId;return this.manifest&&(e={id:this.canvasId,partOf:{id:this.manifest.id,type:"Manifest"},type:"Canvas"}),e},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return r.default.createElement(i.default,e,r.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"1064.7701 445.5539 419.8101 717.0565",enableBackground:"new 1064.7701 445.5539 419.8101 717.0565",xmlSpace:"preserve"},r.default.createElement("polygon",{fill:"#231F20",points:"1283.1857,1127.3097 1406.1421,1077.6322 1314.2406,850.1678 1463.913,852.7823 1093.4828,480.8547 1085.4374,1005.6964 1191.2842,899.8454 "})))};var r=o(n(0)),i=o(n(66));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0));(r=n(2))&&r.__esModule;function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var s=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){var e=this.props,t=e.PluginComponents,n=e.TargetComponent,r=e.targetProps;return r.hasAnyAnnotations=!0,i.default.createElement(n,a({},r,{PluginComponents:t}))},r}(i.Component);s.propTypes={},s.defaultProps={PluginComponents:[]};var c={component:s,mode:"wrap",target:"WindowSideBarButtons"};t.default=c},function(e,t,n){var r=n(431),i=n(445),o=n(430),a=n(599),s=n(56),c=n(598);e.exports=function(e){return i((function(t){var n=t.length,i=n,u=r.prototype.thru;for(e&&t.reverse();i--;){var l=t[i];if("function"!=typeof l)throw new TypeError("Expected a function");if(u&&!f&&"wrapper"==a(l))var f=new r([],!0)}for(i=f?i:n;++i<n;){l=t[i];var d=a(l),p="wrapper"==d?o(l):void 0;f=p&&c(p[0])&&424==p[1]&&!p[4].length&&1==p[9]?f[a(p[0])].apply(f,p[3]):1==l.length&&c(l)?f[d]():f.thru(l)}return function(){var e=arguments,r=e[0];if(f&&1==e.length&&s(r))return f.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.createMuiTheme=function(){0;return g.apply(void 0,arguments)},t.default=void 0;r(n(134));var i=r(n(177)),o=n(25),a=r(n(1047)),s=r(n(1048)),c=r(n(1049)),u=r(n(1058)),l=r(n(1059)),f=r(n(1060)),d=r(n(1061)),p=r(n(1062)),h=r(n(1063));function g(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,g=void 0===r?{}:r,v=e.palette,m=void 0===v?{}:v,y=e.spacing,b=e.typography,w=void 0===b?{}:b,_=(0,i.default)(e,["breakpoints","mixins","palette","spacing","typography"]),x=(0,c.default)(m),O=(0,a.default)(n),S=(0,d.default)(y),E=(0,o.deepmerge)({breakpoints:O,direction:"ltr",mixins:(0,s.default)(O,S,g),overrides:{},palette:x,props:{},shadows:l.default,typography:(0,u.default)(x,w),spacing:S,shape:f.default,transitions:p.default,zIndex:h.default},_),C=arguments.length,k=new Array(C>1?C-1:0),T=1;T<C;T++)k[T-1]=arguments[T];return E=k.reduce((function(e,t){return(0,o.deepmerge)(e,t)}),E)}var v=g;t.default=v},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,s=void 0===r?"px":r,c=e.step,u=void 0===c?5:c,l=(0,o.default)(e,["values","unit","step"]);function f(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function d(e,t){var r=a.indexOf(t);return r===a.length-1?f(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[a[r+1]]?n[a[r+1]]:t)-u/100).concat(s,")")}return(0,i.default)({keys:a,values:n,up:f,down:function(e){var t=a.indexOf(e)+1,r=n[a[t]];return t===a.length?f("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-u/100).concat(s,")")},between:d,only:function(e){return d(e,e)},width:function(e){return n[e]}},l)},t.keys=void 0;var i=r(n(239)),o=r(n(177)),a=["xs","sm","md","lg","xl"];t.keys=a},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r;return(0,o.default)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,o.default)({paddingLeft:t(2),paddingRight:t(2)},n,(0,i.default)({},e.up("sm"),(0,o.default)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},(0,i.default)(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,i.default)(r,e.up("sm"),{minHeight:64}),r)},n)};var i=r(n(134)),o=r(n(239))},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.primary,n=void 0===t?{light:u.default[300],main:u.default[500],dark:u.default[700]}:t,r=e.secondary,b=void 0===r?{light:l.default.A200,main:l.default.A400,dark:l.default.A700}:r,w=e.error,_=void 0===w?{light:f.default[300],main:f.default[500],dark:f.default[700]}:w,x=e.warning,O=void 0===x?{light:d.default[300],main:d.default[500],dark:d.default[700]}:x,S=e.info,E=void 0===S?{light:p.default[300],main:p.default[500],dark:p.default[700]}:S,C=e.success,k=void 0===C?{light:h.default[300],main:h.default[500],dark:h.default[700]}:C,T=e.type,j=void 0===T?"light":T,P=e.contrastThreshold,I=void 0===P?3:P,R=e.tonalOffset,A=void 0===R?.2:R,M=(0,o.default)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function D(e){return(0,g.getContrastRatio)(e,m.text.primary)>=I?m.text.primary:v.text.primary}var N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,i.default)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error((0,a.formatMuiErrorMessage)(4,t));if("string"!=typeof e.main)throw new Error(_formatMuiErrorMessage(5,JSON.stringify(e.main)));return y(e,"light",n,A),y(e,"dark",r,A),e.contrastText||(e.contrastText=D(e.main)),e},L={dark:m,light:v};0;return(0,a.deepmerge)((0,i.default)({common:s.default,type:j,primary:N(n),secondary:N(b,"A400","A200","A700"),error:N(_),warning:N(O),info:N(E),success:N(k),grey:c.default,contrastThreshold:I,getContrastText:D,augmentColor:N,tonalOffset:A},L[j]),M)},t.dark=t.light=void 0;var i=r(n(239)),o=r(n(177)),a=n(25),s=r(n(1050)),c=r(n(1051)),u=r(n(1052)),l=r(n(1053)),f=r(n(1054)),d=r(n(1055)),p=r(n(1056)),h=r(n(1057)),g=n(71),v={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:s.default.white,default:c.default[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}};t.light=v;var m={text:{primary:s.default.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:c.default[800],default:"#303030"},action:{active:s.default.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 y(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,g.lighten)(e.main,i):"dark"===t&&(e.dark=(0,g.darken)(e.main,o)))}t.dark=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={black:"#000",white:"#fff"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,l=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,f=n.fontSize,d=void 0===f?14:f,p=n.fontWeightLight,h=void 0===p?300:p,g=n.fontWeightRegular,v=void 0===g?400:g,m=n.fontWeightMedium,y=void 0===m?500:m,b=n.fontWeightBold,w=void 0===b?700:b,_=n.htmlFontSize,x=void 0===_?16:_,O=n.allVariants,S=n.pxToRem,E=(0,o.default)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);0;var C=d/14,k=S||function(e){return"".concat(e/x*C,"rem")},T=function(e,t,n,r,o){return(0,i.default)({fontFamily:l,fontWeight:e,fontSize:k(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===l?{letterSpacing:"".concat(s(r/t),"em")}:{},o,O)},j={h1:T(h,96,1.167,-1.5),h2:T(h,60,1.2,-.5),h3:T(v,48,1.167,0),h4:T(v,34,1.235,.25),h5:T(v,24,1.334,0),h6:T(y,20,1.6,.15),subtitle1:T(v,16,1.75,.15),subtitle2:T(y,14,1.57,.1),body1:T(v,16,1.5,.15),body2:T(v,14,1.43,.15),button:T(y,14,1.75,.4,u),caption:T(v,12,1.66,.4),overline:T(v,12,2.66,1,u)};return(0,a.deepmerge)((0,i.default)({htmlFontSize:x,pxToRem:k,round:c,fontFamily:l,fontSize:d,fontWeightLight:h,fontWeightRegular:v,fontWeightMedium:y,fontWeightBold:w},j),E,{clone:!1})};var i=r(n(239)),o=r(n(177)),a=n(25);function s(e){return Math.round(1e5*e)/1e5}function c(e){return s(e)}var u={textTransform:"uppercase"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;function r(){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(.2,")"),"".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(.14,")"),"".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(.12,")")].join(",")}var i=["none",r(0,2,1,-1,0,1,1,0,0,1,3,0),r(0,3,1,-2,0,2,2,0,0,1,5,0),r(0,3,3,-2,0,3,4,0,0,1,8,0),r(0,2,4,-1,0,4,5,0,0,1,10,0),r(0,3,5,-1,0,5,8,0,0,1,14,0),r(0,3,5,-1,0,6,10,0,0,1,18,0),r(0,4,5,-2,0,7,10,1,0,2,16,1),r(0,5,5,-3,0,8,10,1,0,3,14,2),r(0,5,6,-3,0,9,12,1,0,3,16,2),r(0,6,6,-3,0,10,14,1,0,4,18,3),r(0,6,7,-4,0,11,15,1,0,4,20,3),r(0,7,8,-4,0,12,17,2,0,5,22,4),r(0,7,8,-4,0,13,19,2,0,5,24,4),r(0,7,9,-4,0,14,21,2,0,5,26,4),r(0,8,9,-5,0,15,22,2,0,6,28,5),r(0,8,10,-5,0,16,24,2,0,6,30,5),r(0,8,11,-5,0,17,26,2,0,6,32,5),r(0,9,11,-5,0,18,28,2,0,7,34,6),r(0,9,12,-6,0,19,29,2,0,7,36,6),r(0,10,13,-6,0,20,31,3,0,8,38,7),r(0,10,13,-6,0,21,33,3,0,8,40,7),r(0,10,14,-6,0,22,35,3,0,8,42,7),r(0,11,14,-7,0,23,36,3,0,9,44,8),r(0,11,15,-7,0,24,38,3,0,9,46,8)];t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={borderRadius:4};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=(0,r.createUnarySpacing)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n};var r=n(446)},function(e,t,n){"use strict";var r=n(13);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.duration=t.easing=void 0;var i=r(n(177)),o={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};t.easing=o;var a={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function s(e){return"".concat(Math.round(e),"ms")}t.duration=a;var c={easing:o,duration:a,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?a.standard:n,c=t.easing,u=void 0===c?o.easeInOut:c,l=t.delay,f=void 0===l?0:l;(0,i.default)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:s(r)," ").concat(u," ").concat("string"==typeof f?f:s(f))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};t.default=r},function(e,t,n){var r=n(143);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t,n){var r=n(200),i=n(649),o=n(1066),a=n(168);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[a(i(t))]}},function(e,t,n){var r=n(199),i=n(316);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},function(e,t,n){var r=n(419);e.exports=function(e){return r(e)?void 0:e}},function(e,t,n){var r=n(1069),i=n(447),o=Array.prototype.push;function a(e,t){return 2==t?function(t,n){return e(t,n)}:function(t){return e(t)}}function s(e){for(var t=e?e.length:0,n=Array(t);t--;)n[t]=e[t];return n}function c(e,t){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=t.apply(void 0,r);return e.apply(void 0,r),i}}}e.exports=function e(t,n,u,l){var f="function"==typeof n,d=n===Object(n);if(d&&(l=u,u=n,n=void 0),null==u)throw new TypeError;l||(l={});var p=!("cap"in l)||l.cap,h=!("curry"in l)||l.curry,g=!("fixed"in l)||l.fixed,v=!("immutable"in l)||l.immutable,m=!("rearg"in l)||l.rearg,y=f?u:i,b="curry"in l&&l.curry,w="fixed"in l&&l.fixed,_="rearg"in l&&l.rearg,x=f?u.runInContext():void 0,O=f?u:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},S=O.ary,E=O.assign,C=O.clone,k=O.curry,T=O.forEach,j=O.isArray,P=O.isError,I=O.isFunction,R=O.isWeakMap,A=O.keys,M=O.rearg,D=O.toInteger,N=O.toPath,L=A(r.aryMethod),z={castArray:function(e){return function(){var t=arguments[0];return j(t)?e(s(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],n=arguments[1],r=e(t,n),i=r.length;return p&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:a(r,n)):r}},mixin:function(e){return function(t){var n=this;if(!I(n))return e(n,Object(t));var r=[];return T(A(t),(function(e){I(t[e])&&r.push([e,n.prototype[e]])})),e(n,Object(t)),T(r,(function(e){var t=e[1];I(t)?n.prototype[e[0]]=t:delete n.prototype[e[0]]})),n}},nthArg:function(e){return function(t){var n=t<0?1:D(t)+1;return k(e(t),n)}},rearg:function(e){return function(t,n){var r=n?n.length:0;return k(e(t,n),r)}},runInContext:function(n){return function(r){return e(t,n(r),l)}}};function B(e,t){if(p){var n=r.iterateeRearg[e];if(n)return function(e,t){return U(e,(function(e){var n=t.length;return function(e,t){return 2==t?function(t,n){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(M(a(e,n),t),n)}))}(t,n);var i=!f&&r.iterateeAry[e];if(i)return function(e,t){return U(e,(function(e){return"function"==typeof e?a(e,t):e}))}(t,i)}return t}function F(e,t,n){if(g&&(w||!r.skipFixed[e])){var i=r.methodSpread[e],a=i&&i.start;return void 0===a?S(t,n):function(e,t){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var a=i[t],s=i.slice(0,t);return a&&o.apply(s,a),t!=r&&o.apply(s,i.slice(t+1)),e.apply(this,s)}}(t,a)}return t}function W(e,t,n){return m&&n>1&&(_||!r.skipRearg[e])?M(t,r.methodRearg[e]||r.aryRearg[n]):t}function H(e,t){for(var n=-1,r=(t=N(t)).length,i=r-1,o=C(Object(e)),a=o;null!=a&&++n<r;){var s=t[n],c=a[s];null==c||I(c)||P(c)||R(c)||(a[s]=C(n==i?c:Object(c))),a=a[s]}return o}function V(t,n){var i=r.aliasToReal[t]||t,o=r.remap[i]||i,a=l;return function(t){var r=f?x:O,s=f?x[o]:n,c=E(E({},a),t);return e(r,i,s,c)}}function U(e,t){return function(){var n=arguments.length;if(!n)return e();for(var r=Array(n);n--;)r[n]=arguments[n];var i=m?0:n-1;return r[i]=t(r[i]),e.apply(void 0,r)}}function q(e,t,n){var i,o=r.aliasToReal[e]||e,a=t,u=z[o];return u?a=u(t):v&&(r.mutate.array[o]?a=c(t,s):r.mutate.object[o]?a=c(t,function(e){return function(t){return e({},t)}}(t)):r.mutate.set[o]&&(a=c(t,H))),T(L,(function(e){return T(r.aryMethod[e],(function(t){if(o==t){var n=r.methodSpread[o],s=n&&n.afterRearg;return i=s?F(o,W(o,a,e),e):W(o,F(o,a,e),e),i=function(e,t,n){return b||h&&n>1?k(t,n):t}(0,i=B(o,i),e),!1}})),!i})),i||(i=a),i==t&&(i=b?k(i,1):function(){return t.apply(this,arguments)}),i.convert=V(o,t),i.placeholder=t.placeholder=n,i}if(!d)return q(n,u,y);var G=u,K=[];return T(L,(function(e){T(r.aryMethod[e],(function(e){var t=G[r.remap[e]||e];t&&K.push([e,q(e,t,G)])}))})),T(A(G),(function(e){var t=G[e];if("function"==typeof t){for(var n=K.length;n--;)if(K[n][0]==e)return;t.convert=V(e,t),K.push([e,t])}})),T(K,(function(e){G[e[0]]=e[1]})),G.convert=function(e){return G.runInContext.convert(e)(void 0)},G.placeholder=G,T(A(G),(function(e){T(r.realToAlias[e]||[],(function(t){G[t]=G[e]}))})),G}},function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,n=t.aliasToReal,r={};for(var i in n){var o=n[i];e.call(r,o)?r[o].push(i):r[o]=[i]}return r}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(e,t,n){e.exports={ary:n(1071),assign:n(587),clone:n(651),curry:n(458),forEach:n(421),isArray:n(56),isError:n(1072),isFunction:n(179),isWeakMap:n(1073),iteratee:n(1074),keys:n(399),rearg:n(1075),toInteger:n(234),toPath:n(1076)}},function(e,t,n){var r=n(427);e.exports=function(e,t,n){return t=n?void 0:t,t=e&&null==t?e.length:t,r(e,128,void 0,void 0,void 0,void 0,t)}},function(e,t,n){var r=n(142),i=n(92),o=n(419);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!o(e)}},function(e,t,n){var r=n(198),i=n(92);e.exports=function(e){return i(e)&&"[object WeakMap]"==r(e)}},function(e,t,n){var r=n(301),i=n(167);e.exports=function(e){return i("function"==typeof e?e:r(e,1))}},function(e,t,n){var r=n(427),i=n(445),o=i((function(e,t){return r(e,256,void 0,void 0,void 0,t)}));e.exports=o},function(e,t,n){var r=n(143),i=n(302),o=n(56),a=n(201),s=n(549),c=n(168),u=n(411);e.exports=function(e){return o(e)?r(e,c):a(e)?[e]:i(s(u(e)))}},function(e,t,n){var r=n(199),i=n(448);e.exports=function(e,t,n,o){return i(e,t,n(r(e,t)),o)}},function(e,t,n){var r=n(1079)({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});e.exports=r},function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e,t,n){var r=n(78);e.exports=function(){return r.Date.now()}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){"use strict";n.r(t);var r={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},i=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],o=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],a=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],s="undefined"!=typeof window&&void 0!==window.document?window.document:{},c="fullscreenEnabled"in s&&Object.keys(r)||i[0]in s&&i||o[0]in s&&o||a[0]in s&&a||[],u={requestFullscreen:function(e){return e[c[r.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[c[r.requestFullscreen]]},get exitFullscreen(){return s[c[r.exitFullscreen]].bind(s)},get fullscreenPseudoClass(){return":"+c[r.fullscreen]},addEventListener:function(e,t,n){return s.addEventListener(c[r[e]],t,n)},removeEventListener:function(e,t,n){return s.removeEventListener(c[r[e]],t,n)},get fullscreenEnabled(){return Boolean(s[c[r.fullscreenEnabled]])},set fullscreenEnabled(e){},get fullscreenElement(){return s[c[r.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return s[("on"+c[r.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return s[("on"+c[r.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return s[("on"+c[r.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return s[("on"+c[r.fullscreenerror]).toLowerCase()]=e}};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=o(n(0)),i=o(n(1085));function o(e){return e&&e.__esModule?e:{default:e}}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?p(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){function t(){var e,n;u(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return g(p(n=f(this,(e=d(t)).call.apply(e,[this].concat(a)))),"onClick",(function(e){var t=n.props,o=t.text,a=t.onCopy,s=t.children,c=t.options,u=r.default.Children.only(s),l=(0,i.default)(o,c);a&&a(o,l),u&&u.props&&"function"==typeof u.props.onClick&&u.props.onClick(e)})),n}var n,o,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=c(e,["text","onCopy","options","children"]),i=r.default.Children.only(t);return r.default.cloneElement(i,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(n,!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{onClick:this.onClick}))}}])&&l(n.prototype,o),a&&l(n,a),t}(r.default.PureComponent);t.CopyToClipboard=v,g(v,"defaultProps",{onCopy:void 0,options:void 0})},function(e,t,n){"use strict";var r=n(1086),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,a,s,c,u,l=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),c=document.getSelection(),(u=document.createElement("span")).textContent=e,u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(u),s.selectNodeContents(u),c.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(s):c.removeAllRanges()),u&&document.body.removeChild(u),a()}return l}},function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},function(e,t,n){"use strict";(function(n){function r(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var i="object"==typeof n&&!0;function o(e,t){if(!e){if(i)throw new Error("Invariant failed");throw new Error(t())}}t.invariant=o;var a=Object.prototype.hasOwnProperty,s=Array.prototype.splice,c=Object.prototype.toString;function u(e){return c.call(e).slice(8,-1)}var l=Object.assign||function(e,t){return f(t).forEach((function(n){a.call(t,n)&&(e[n]=t[n])})),e},f="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function d(e){return Array.isArray(e)?l(e.constructor(e.length),e):"Map"===u(e)?new Map(e):"Set"===u(e)?new Set(e):e&&"object"==typeof e?l(Object.create(Object.getPrototypeOf(e)),e):e}var p=function(){function e(){this.commands=l({},h),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return(new e).update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var n=this,r="function"==typeof t?{$apply:t}:t;Array.isArray(e)&&Array.isArray(r)||o(!Array.isArray(r),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),o("object"==typeof r&&null!==r,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."}));var i=e;return f(r).forEach((function(t){if(a.call(n.commands,t)){var o=e===i;i=n.commands[t](r[t],i,r,e),o&&n.isEquals(i,e)&&(i=e)}else{var s="Map"===u(e)?n.update(e.get(t),r[t]):n.update(e[t],r[t]),c="Map"===u(i)?i.get(t):i[t];n.isEquals(s,c)&&(void 0!==s||a.call(e,t))||(i===e&&(i=d(e)),"Map"===u(i)?i.set(t,s):i[t]=s)}})),i},e}();t.Context=p;var h={$push:function(e,t,n){return v(t,n,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,n){return v(t,n,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,n,i){return function(e,t){o(Array.isArray(e),(function(){return"Expected $splice target to be an array; got "+r(e)})),y(t.$splice)}(t,n),e.forEach((function(e){y(e),t===i&&e.length&&(t=d(i)),s.apply(t,e)})),t},$set:function(e,t,n){return function(e){o(1===Object.keys(e).length,(function(){return"Cannot have more than one key in an object with $set"}))}(n),e},$toggle:function(e,t){m(e,"$toggle");var n=e.length?d(t):t;return e.forEach((function(e){n[e]=!t[e]})),n},$unset:function(e,t,n,r){return m(e,"$unset"),e.forEach((function(e){Object.hasOwnProperty.call(t,e)&&(t===r&&(t=d(r)),delete t[e])})),t},$add:function(e,t,n,r){return b(t,"$add"),m(e,"$add"),"Map"===u(t)?e.forEach((function(e){var n=e[0],i=e[1];t===r&&t.get(n)!==i&&(t=d(r)),t.set(n,i)})):e.forEach((function(e){t!==r||t.has(e)||(t=d(r)),t.add(e)})),t},$remove:function(e,t,n,r){return b(t,"$remove"),m(e,"$remove"),e.forEach((function(e){t===r&&t.has(e)&&(t=d(r)),t.delete(e)})),t},$merge:function(e,t,n,i){var a,s;return a=t,o((s=e)&&"object"==typeof s,(function(){return"update(): $merge expects a spec of type 'object'; got "+r(s)})),o(a&&"object"==typeof a,(function(){return"update(): $merge expects a target of type 'object'; got "+r(a)})),f(e).forEach((function(n){e[n]!==t[n]&&(t===i&&(t=d(i)),t[n]=e[n])})),t},$apply:function(e,t){var n;return o("function"==typeof(n=e),(function(){return"update(): expected spec of $apply to be a function; got "+r(n)+"."})),e(t)}},g=new p;function v(e,t,n){o(Array.isArray(e),(function(){return"update(): expected target of "+r(n)+" to be an array; got "+r(e)+"."})),m(t[n],n)}function m(e,t){o(Array.isArray(e),(function(){return"update(): expected spec of "+r(t)+" to be an array; got "+r(e)+". Did you forget to wrap your parameter in an array?"}))}function y(e){o(Array.isArray(e),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+r(e)+". Did you forget to wrap your parameters in an array?"}))}function b(e,t){var n=u(e);o("Map"===n||"Set"===n,(function(){return"update(): "+r(t)+" expects a target of type Set or Map; got "+r(n)}))}t.isEquals=g.update.isEquals,t.extend=g.extend,t.default=g.update,t.default.default=e.exports=l(t.default,t)}).call(this,n(637))},function(e,t,n){var r=n(316),i=n(234);e.exports=function(e,t,n){var o=null==e?0:e.length;return o?(t=n||void 0===t?1:i(t),r(e,t<0?0:t,o)):[]}},function(e,t,n){var r=n(316),i=n(234);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:i(t),r(e,0,t<0?0:t)):[]}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Mosaic=t.MosaicWithoutDragDropContext=void 0;var s=a(n(23)),c=(a(n(1091)),a(n(165)),a(n(1092)),a(n(0))),u=n(176),l=a(n(461)),f=a(n(460)),d=n(1094),p=n(100),h=n(1097),g=n(659),v=n(1103),m=n(181);n(109);function y(e){return null!=e.initialValue}var b=function(e){function t(){var t,n=e.apply(this,arguments)||this;return n.state={currentNode:null,lastInitialValue:null,mosaicId:null!==(t=n.props.mosaicId)&&void 0!==t?t:d.v4()},n.updateRoot=function(e,t){void 0===t&&(t=!1);var r=n.getRoot()||{};n.replaceRoot(m.updateTree(r,e),t)},n.replaceRoot=function(e,t){void 0===t&&(t=!1),n.props.onChange(e),!t&&n.props.onRelease&&n.props.onRelease(e),y(n.props)&&n.setState({currentNode:e})},n.actions={updateTree:n.updateRoot,remove:function(e){0===e.length?n.replaceRoot(null):n.updateRoot([m.createRemoveUpdate(n.getRoot(),e)])},expand:function(e,t){return void 0===t&&(t=70),n.updateRoot([m.createExpandUpdate(e,t)])},getRoot:function(){return n.getRoot()},hide:function(e){return n.updateRoot([m.createHideUpdate(e)])},replaceWith:function(e,t){return n.updateRoot([{path:e,spec:{$set:t}}])}},n.childContext={mosaicActions:n.actions,mosaicId:n.state.mosaicId},n}return i(t,e),t.getDerivedStateFromProps=function(e,t){return e.mosaicId&&(t.mosaicId,e.mosaicId),y(e)&&e.initialValue!==t.lastInitialValue?{lastInitialValue:e.initialValue,currentNode:e.initialValue}:null},t.prototype.render=function(){var e=this.props.className;return c.default.createElement(p.MosaicContext.Provider,{value:this.childContext},c.default.createElement("div",{className:s.default(e,"mosaic mosaic-drop-target")},this.renderTree(),c.default.createElement(v.RootDropTargets,null)))},t.prototype.getRoot=function(){return y(this.props)?this.state.currentNode:this.props.value},t.prototype.renderTree=function(){var e=this.getRoot();if(this.validateTree(e),null==e)return this.props.zeroStateView;var t=this.props,n=t.renderTile,r=t.resize;return c.default.createElement(h.MosaicRoot,{root:e,renderTile:n,resize:r})},t.prototype.validateTree=function(e){},t.defaultProps={onChange:function(){},zeroStateView:c.default.createElement(g.MosaicZeroState,null),className:"mosaic-blueprint-theme"},t}(c.default.PureComponent);t.MosaicWithoutDragDropContext=b;var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){return c.default.createElement(u.DndProvider,{backend:l.default,options:f.default},c.default.createElement(b,o({},this.props)))},t}(c.default.PureComponent);t.Mosaic=w},function(e,t,n){var r=n(278),i=n(535),o=Object.prototype.hasOwnProperty,a=i((function(e,t,n){o.call(e,n)?++e[n]:r(e,n,1)}));e.exports=a},function(e,t,n){var r=n(143),i=n(167),o=n(1093),a=n(424);e.exports=function(e,t){if(null==e)return{};var n=r(a(e),(function(e){return[e]}));return t=i(t),o(e,n,(function(e,n){return t(e,n[0])}))}},function(e,t,n){var r=n(199),i=n(448),o=n(200);e.exports=function(e,t,n){for(var a=-1,s=t.length,c={};++a<s;){var u=t[a],l=r(e,u);n(l,u)&&i(c,o(u,e),l)}return c}},function(e,t,n){var r=n(1095),i=n(1096),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){var r,i,o=n(656),a=n(657),s=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,l=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==d){var p=o();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=i=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:c+1,v=h-s+(g-c)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||h>s)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,c=g,i=d;var m=(1e4*(268435455&(h+=122192928e5))+g)%4294967296;l[u++]=m>>>24&255,l[u++]=m>>>16&255,l[u++]=m>>>8&255,l[u++]=255&m;var y=h/4294967296*1e4&268435455;l[u++]=y>>>8&255,l[u++]=255&y,l[u++]=y>>>24&15|16,l[u++]=y>>>16&255,l[u++]=d>>>8|128,l[u++]=255&d;for(var b=0;b<6;++b)l[u+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(656),i=n(657);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicRoot=void 0;var s=a(n(29)),c=a(n(0)),u=n(100),l=n(1098),f=n(658),d=n(109),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onResize=function(e,n,r){t.context.mosaicActions.updateTree([{path:n,spec:{splitPercentage:{$set:e}}}],r)},t}return i(t,e),t.prototype.render=function(){var e=this.props.root;return c.default.createElement("div",{className:"mosaic-root"},this.renderRecursively(e,f.BoundingBox.empty(),[]))},t.prototype.renderRecursively=function(e,t,n){if(d.isParent(e)){var r=null==e.splitPercentage?50:e.splitPercentage,i=f.BoundingBox.split(t,r,e.direction),a=i.first,u=i.second;return s.default([this.renderRecursively(e.first,a,n.concat("first")),this.renderSplit(e.direction,t,r,n),this.renderRecursively(e.second,u,n.concat("second"))].filter(h))}return c.default.createElement("div",{key:e,className:"mosaic-tile",style:o({},f.BoundingBox.asStyles(t))},this.props.renderTile(e,n))},t.prototype.renderSplit=function(e,t,n,r){var i=this,a=this.props.resize;return"DISABLED"!==a?c.default.createElement(l.Split,o({key:r.join(",")+"splitter"},a,{boundingBox:t,splitPercentage:n,direction:e,onChange:function(e){return i.onResize(e,r,!0)},onRelease:function(e){return i.onResize(e,r,!1)}})):null},t.contextType=u.MosaicContext,t}(c.default.PureComponent);function h(e){return null!==e}t.MosaicRoot=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Split=void 0;var s=a(n(23)),c=a(n(1099)),u=a(n(1101)),l=a(n(0)),f=n(658),d={capture:!0,passive:!1},p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElement=l.default.createRef(),t.listenersBound=!1,t.onMouseDown=function(e){(h(e)||0===e.button)&&(e.preventDefault(),t.bindListeners())},t.onMouseUp=function(e){t.unbindListeners();var n=t.calculateRelativePercentage(e);t.props.onRelease(n)},t.onMouseMove=function(e){e.preventDefault(),e.stopPropagation(),t.throttledUpdatePercentage(e)},t.throttledUpdatePercentage=u.default((function(e){var n=t.calculateRelativePercentage(e);n!==t.props.splitPercentage&&t.props.onChange(n)}),1e3/30),t}return i(t,e),t.prototype.render=function(){var e=this.props.direction;return l.default.createElement("div",{className:s.default("mosaic-split",{"-row":"row"===e,"-column":"column"===e}),ref:this.rootElement,onMouseDown:this.onMouseDown,style:this.computeStyle()},l.default.createElement("div",{className:"mosaic-split-line"}))},t.prototype.componentDidMount=function(){this.rootElement.current.addEventListener("touchstart",this.onMouseDown,d)},t.prototype.componentWillUnmount=function(){this.unbindListeners(),this.rootElement.current&&this.rootElement.current.ownerDocument.removeEventListener("touchstart",this.onMouseDown,d)},t.prototype.bindListeners=function(){this.listenersBound||(this.rootElement.current.ownerDocument.addEventListener("mousemove",this.onMouseMove,!0),this.rootElement.current.ownerDocument.addEventListener("touchmove",this.onMouseMove,d),this.rootElement.current.ownerDocument.addEventListener("mouseup",this.onMouseUp,!0),this.rootElement.current.ownerDocument.addEventListener("touchend",this.onMouseUp,!0),this.listenersBound=!0)},t.prototype.unbindListeners=function(){this.rootElement.current&&(this.rootElement.current.ownerDocument.removeEventListener("mousemove",this.onMouseMove,!0),this.rootElement.current.ownerDocument.removeEventListener("touchmove",this.onMouseMove,d),this.rootElement.current.ownerDocument.removeEventListener("mouseup",this.onMouseUp,!0),this.rootElement.current.ownerDocument.removeEventListener("touchend",this.onMouseUp,!0),this.listenersBound=!1)},t.prototype.computeStyle=function(){var e,t=this.props,n=t.boundingBox,r=t.direction,i=t.splitPercentage,a="column"===r?"top":"left",s=f.BoundingBox.getAbsoluteSplitPercentage(n,i,r);return o(o({},f.BoundingBox.asStyles(n)),((e={})[a]=s+"%",e))},t.prototype.calculateRelativePercentage=function(e){var t,n=this.props,r=n.minimumPaneSizePercentage,i=n.direction,o=n.boundingBox,a=this.rootElement.current.parentElement.getBoundingClientRect(),s=h(e)?e.changedTouches[0]:e;t="column"===i?(s.clientY-a.top)/a.height*100:(s.clientX-a.left)/a.width*100;var u=f.BoundingBox.getRelativeSplitPercentage(o,t,i);return c.default(u,r,100-r)},t.defaultProps={onChange:function(){},onRelease:function(){},minimumPaneSizePercentage:20},t}(l.default.PureComponent);function h(e){return null!=e.changedTouches}t.Split=p},function(e,t,n){var r=n(1100),i=n(433);e.exports=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=i(n))==n?n:0),void 0!==t&&(t=(t=i(t))==t?t:0),r(i(e),t,n)}},function(e,t){e.exports=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},function(e,t,n){var r=n(180),i=n(68);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNever=void 0,t.assertNever=function(e){throw new Error("Unhandled case: "+JSON.stringify(e))}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RootDropTargets=void 0;var a=o(n(23)),s=o(n(323)),c=o(n(0)),u=n(176),l=n(449),f=n(660),d=n(317),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){return c.default.createElement("div",{className:a.default("drop-target-container",{"-dragging":this.props.isDragging})},s.default(l.MosaicDropTargetPosition).map((function(e){return c.default.createElement(f.MosaicDropTarget,{position:e,path:[],key:e})})))},t}(c.default.PureComponent);t.RootDropTargets=u.DropTarget(d.MosaicDragType.WINDOW,{},(function(e,t){return{isDragging:null!==t.getItem()&&t.getItemType()===d.MosaicDragType.WINDOW}}))(p)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicWindow=t.SourceDropConnectedInternalMosaicWindow=t.SourceConnectedInternalMosaicWindow=t.InternalMosaicWindow=void 0;var s=a(n(23)),c=a(n(1105)),u=a(n(324)),l=a(n(221)),f=a(n(119)),d=a(n(323)),p=a(n(0)),h=n(176),g=n(661),v=n(666),m=n(100),y=n(449),b=n(660),w=n(317),_=n(181),x=n(109),O=n(175),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={additionalControlsOpen:!1},t.rootElement=null,t.renderDropTarget=function(e){var n=t.props.path;return p.default.createElement(b.MosaicDropTarget,{position:e,path:n,key:e})},t.split=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.checkCreateNode();var r=t.props,i=r.createNode,o=r.path,a=t.context.mosaicActions,s=a.getRoot(),c=t.rootElement.offsetWidth>t.rootElement.offsetHeight?"row":"column";return Promise.resolve(i.apply(void 0,e)).then((function(e){return a.replaceWith(o,{direction:c,second:e,first:x.getAndAssertNodeAtPathExists(s,o)})}))},t.swap=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.checkCreateNode();var r=t.context.mosaicActions,i=t.props,o=i.createNode,a=i.path;return Promise.resolve(o.apply(void 0,e)).then((function(e){return r.replaceWith(a,e)}))},t.setAdditionalControlsOpen=function(e){t.setState({additionalControlsOpen:e})},t.getPath=function(){return t.props.path},t.connectDragSource=function(e){return(0,t.props.connectDragSource)(e)},t.childContext={mosaicWindowActions:{split:t.split,replaceWithNew:t.swap,setAdditionalControlsOpen:t.setAdditionalControlsOpen,getPath:t.getPath,connectDragSource:t.connectDragSource}},t}return i(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.isOver,i=t.renderPreview,o=t.additionalControls,a=t.connectDropTarget,c=t.connectDragPreview,u=t.draggedMosaicId;return p.default.createElement(m.MosaicWindowContext.Provider,{value:this.childContext},a(p.default.createElement("div",{className:s.default("mosaic-window mosaic-drop-target",n,{"drop-target-hover":r&&u===this.context.mosaicId,"additional-controls-open":this.state.additionalControlsOpen}),ref:function(t){return e.rootElement=t}},this.renderToolbar(),p.default.createElement("div",{className:"mosaic-window-body"},this.props.children),p.default.createElement("div",{className:"mosaic-window-body-overlay",onClick:function(){return e.setAdditionalControlsOpen(!1)}}),p.default.createElement("div",{className:"mosaic-window-additional-actions-bar"},o),c(i(this.props)),p.default.createElement("div",{className:"drop-target-container"},d.default(y.MosaicDropTargetPosition).map(this.renderDropTarget)))))},t.prototype.getToolbarControls=function(){var e=this.props,t=e.toolbarControls,n=e.createNode;return t||(n?g.DEFAULT_CONTROLS_WITH_CREATION:g.DEFAULT_CONTROLS_WITHOUT_CREATION)},t.prototype.renderToolbar=function(){var e,t=this,n=this.props,r=n.title,i=n.draggable,o=n.additionalControls,a=n.additionalControlButtonText,c=n.path,u=n.renderToolbar,f=this.state.additionalControlsOpen,d=this.getToolbarControls(),h=i&&c.length>0,g=h?this.props.connectDragSource:function(e){return e};if(u){var m=g(u(this.props,i));return p.default.createElement("div",{className:s.default("mosaic-window-toolbar",{draggable:h})},m)}var y=g(p.default.createElement("div",{title:r,className:"mosaic-window-title"},r)),b=!l.default(o);return p.default.createElement("div",{className:s.default("mosaic-window-toolbar",{draggable:h})},y,p.default.createElement("div",{className:s.default("mosaic-window-controls",O.OptionalBlueprint.getClasses("BUTTON_GROUP"))},b&&p.default.createElement("button",{onClick:function(){return t.setAdditionalControlsOpen(!f)},className:s.default(O.OptionalBlueprint.getClasses("BUTTON","MINIMAL"),O.OptionalBlueprint.getIconClass("MORE"),(e={},e[O.OptionalBlueprint.getClasses("ACTIVE")]=f,e))},p.default.createElement("span",{className:"control-text"},a)),b&&p.default.createElement(v.Separator,null),d))},t.prototype.checkCreateNode=function(){if(null==this.props.createNode)throw new Error("Operation invalid unless `createNode` is defined")},t.defaultProps={additionalControlButtonText:"More",draggable:!0,renderPreview:function(e){var t=e.title;return p.default.createElement("div",{className:"mosaic-preview"},p.default.createElement("div",{className:"mosaic-window-toolbar"},p.default.createElement("div",{className:"mosaic-window-title"},t)),p.default.createElement("div",{className:"mosaic-window-body"},p.default.createElement("h4",null,t),p.default.createElement(O.OptionalBlueprint.Icon,{iconSize:72,icon:"application"})))},renderToolbar:null},t.contextType=m.MosaicContext,t}(p.default.Component);t.InternalMosaicWindow=S;var E={beginDrag:function(e,t,n){e.onDragStart&&e.onDragStart();var r=c.default((function(){return n.context.mosaicActions.hide(n.props.path)}));return{mosaicId:n.context.mosaicId,hideTimer:r}},endDrag:function(e,t,n){var r=t.getItem().hideTimer;window.clearTimeout(r);var i=n.props.path,o=t.getDropResult()||{},a=n.context.mosaicActions,s=o.position,c=o.path;null==s||null==c||f.default(c,i)?(a.updateTree([{path:u.default(i),spec:{splitPercentage:{$set:null}}}]),e.onDragEnd&&e.onDragEnd("reset")):(a.updateTree(_.createDragToUpdates(a.getRoot(),i,c,s)),e.onDragEnd&&e.onDragEnd("drop"))}};t.SourceConnectedInternalMosaicWindow=h.DragSource(w.MosaicDragType.WINDOW,E,(function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}}))(S),t.SourceDropConnectedInternalMosaicWindow=h.DropTarget(w.MosaicDragType.WINDOW,{},(function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),draggedMosaicId:(t.getItem()||{}).mosaicId}}))(t.SourceConnectedInternalMosaicWindow);var C=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),n.prototype.render=function(){return p.default.createElement(t.SourceDropConnectedInternalMosaicWindow,o({},this.props))},n}(p.default.PureComponent);t.MosaicWindow=C},function(e,t,n){var r=n(1106),i=n(204)((function(e,t){return r(e,1,t)}));e.exports=i},function(e,t){e.exports=function(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)}},function(e,t,n){var r=n(143),i=n(199),o=n(167),a=n(586),s=n(1108),c=n(228),u=n(1109),l=n(202),f=n(56);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return f(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[l];var d=-1;t=r(t,c(o));var p=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++d,value:e}}));return s(p,(function(e,t){return u(e,t,n)}))}},function(e,t){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},function(e,t,n){var r=n(1110);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,c=n.length;++i<s;){var u=r(o[i],a[i]);if(u)return i>=c?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}},function(e,t,n){var r=n(201);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,c=null===t,u=t==t,l=r(t);if(!c&&!l&&!a&&e>t||a&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!l&&e<t||l&&n&&o&&!i&&!a||c&&n&&o||!s&&o||!u)return-1}return 0}},function(e,t,n){var r=n(285),i=n(166),o=n(227),a=n(68);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},function(e,t,n){var r=n(416),i=n(203),o=n(414);e.exports=function(e,t,n){var a=e.length;if(a<2)return a?o(e[0]):[];for(var s=-1,c=Array(a);++s<a;)for(var u=e[s],l=-1;++l<a;)l!=s&&(c[s]=r(c[s]||u,e[l],t,n));return o(i(c,1),t,n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"AlphaPicker",(function(){return Gn})),n.d(t,"BlockPicker",(function(){return ui})),n.d(t,"CirclePicker",(function(){return Ii})),n.d(t,"default",(function(){return Wi})),n.d(t,"ChromePicker",(function(){return Wi})),n.d(t,"CompactPicker",(function(){return qi})),n.d(t,"GithubPicker",(function(){return $i})),n.d(t,"HuePicker",(function(){return Yi})),n.d(t,"MaterialPicker",(function(){return Ji})),n.d(t,"PhotoshopPicker",(function(){return so})),n.d(t,"SketchPicker",(function(){return go})),n.d(t,"SliderPicker",(function(){return wo})),n.d(t,"SwatchesPicker",(function(){return Co})),n.d(t,"TwitterPicker",(function(){return To})),n.d(t,"GooglePicker",(function(){return Do})),n.d(t,"CustomPicker",(function(){return Dn}));var r=n(0),i=n.n(r),o=n(12),a=n.n(o),s=function(e,t,n,r,i){var o=i.clientWidth,a=i.clientHeight,s="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,c="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=s-(i.getBoundingClientRect().left+window.pageXOffset),l=c-(i.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var f=void 0;if(f=l<0?0:l>a?1:Math.round(100*l/a)/100,t.a!==f)return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}else{var d=void 0;if(r!==(d=u<0?0:u>o?1:Math.round(100*u/o)/100))return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}return null},c={},u=function(e,t,n,r){var i=e+"-"+t+"-"+n+(r?"-server":"");if(c[i])return c[i];var o=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var i=r?new r:document.createElement("canvas");i.width=2*n,i.height=2*n;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null}(e,t,n,r);return c[i]=o,o},l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(e){var t=e.white,n=e.grey,o=e.size,s=e.renderers,c=e.borderRadius,f=e.boxShadow,d=e.children,p=a()({default:{grid:{borderRadius:c,boxShadow:f,absolute:"0px 0px 0px 0px",background:"url("+u(t,n,o,s.canvas)+") center left"}}});return Object(r.isValidElement)(d)?i.a.cloneElement(d,l({},d.props,{style:l({},d.props.style,p.grid)})):i.a.createElement("div",{style:p.grid})};f.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var d=f,p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){function t(){var e,n,r;g(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=v(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=s(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},v(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),h(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=a()({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:p({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return i.a.createElement("div",{style:n.alpha},i.a.createElement("div",{style:n.checkboard},i.a.createElement(d,{renderers:this.props.renderers})),i.a.createElement("div",{style:n.gradient}),i.a.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.a.createElement("div",{style:n.pointer},this.props.pointer?i.a.createElement(this.props.pointer,this.props):i.a.createElement("div",{style:n.slider}))))}}]),t}(r.PureComponent||r.Component),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var b=[38,40],w=1,_=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,r=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(r)&&(t=e.keyCode,b.indexOf(t)>-1)){var i=n.getArrowOffset(),o=38===e.keyCode?r+i:r-i;n.setUpdatedValue(o,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+w++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),y(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=a()({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i.a.createElement("div",{style:t.wrap},i.a.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i.a.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(r.PureComponent||r.Component),x=function(e,t,n,r){var i=r.clientWidth,o=r.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(r.getBoundingClientRect().left+window.pageXOffset),u=s-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var l=void 0;if(u<0)l=359;else if(u>o)l=0;else{l=360*(-100*u/o+100)/100}if(n.h!==l)return{h:l,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var f=void 0;if(c<0)f=0;else if(c>i)f=359;else{f=360*(100*c/i)/100}if(n.h!==f)return{h:f,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},O=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var C=function(e){function t(){var e,n,r;S(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=E(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=x(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},E(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),O(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=a()({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return i.a.createElement("div",{style:r.hue},i.a.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.a.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),i.a.createElement("div",{style:r.pointer},this.props.pointer?i.a.createElement(this.props.pointer,this.props):i.a.createElement("div",{style:r.slider}))))}}]),t}(r.PureComponent||r.Component),k=n(2),T=n.n(k);var j=function(){this.__data__=[],this.size=0};var P=function(e,t){return e===t||e!=e&&t!=t};var I=function(e,t){for(var n=e.length;n--;)if(P(e[n][0],t))return n;return-1},R=Array.prototype.splice;var A=function(e){var t=this.__data__,n=I(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),--this.size,!0)};var M=function(e){var t=this.__data__,n=I(t,e);return n<0?void 0:t[n][1]};var D=function(e){return I(this.__data__,e)>-1};var N=function(e,t){var n=this.__data__,r=I(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function L(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}L.prototype.clear=j,L.prototype.delete=A,L.prototype.get=M,L.prototype.has=D,L.prototype.set=N;var z=L;var B=function(){this.__data__=new z,this.size=0};var F=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var W=function(e){return this.__data__.get(e)};var H=function(e){return this.__data__.has(e)},V=n(54),U=V.a.Symbol,q=Object.prototype,G=q.hasOwnProperty,K=q.toString,$=U?U.toStringTag:void 0;var Z=function(e){var t=G.call(e,$),n=e[$];try{e[$]=void 0;var r=!0}catch(e){}var i=K.call(e);return r&&(t?e[$]=n:delete e[$]),i},X=Object.prototype.toString;var Q=function(e){return X.call(e)},Y=U?U.toStringTag:void 0;var J=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Y&&Y in Object(e)?Z(e):Q(e)};var ee=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var te,ne=function(e){if(!ee(e))return!1;var t=J(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},re=V.a["__core-js_shared__"],ie=(te=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||""))?"Symbol(src)_1."+te:"";var oe=function(e){return!!ie&&ie in e},ae=Function.prototype.toString;var se=function(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ce=/^\[object .+?Constructor\]$/,ue=Function.prototype,le=Object.prototype,fe=ue.toString,de=le.hasOwnProperty,pe=RegExp("^"+fe.call(de).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var he=function(e){return!(!ee(e)||oe(e))&&(ne(e)?pe:ce).test(se(e))};var ge=function(e,t){return null==e?void 0:e[t]};var ve=function(e,t){var n=ge(e,t);return he(n)?n:void 0},me=ve(V.a,"Map"),ye=ve(Object,"create");var be=function(){this.__data__=ye?ye(null):{},this.size=0};var we=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},_e=Object.prototype.hasOwnProperty;var xe=function(e){var t=this.__data__;if(ye){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _e.call(t,e)?t[e]:void 0},Oe=Object.prototype.hasOwnProperty;var Se=function(e){var t=this.__data__;return ye?void 0!==t[e]:Oe.call(t,e)};var Ee=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ye&&void 0===t?"__lodash_hash_undefined__":t,this};function Ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ce.prototype.clear=be,Ce.prototype.delete=we,Ce.prototype.get=xe,Ce.prototype.has=Se,Ce.prototype.set=Ee;var ke=Ce;var Te=function(){this.size=0,this.__data__={hash:new ke,map:new(me||z),string:new ke}};var je=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Pe=function(e,t){var n=e.__data__;return je(t)?n["string"==typeof t?"string":"hash"]:n.map};var Ie=function(e){var t=Pe(this,e).delete(e);return this.size-=t?1:0,t};var Re=function(e){return Pe(this,e).get(e)};var Ae=function(e){return Pe(this,e).has(e)};var Me=function(e,t){var n=Pe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function De(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}De.prototype.clear=Te,De.prototype.delete=Ie,De.prototype.get=Re,De.prototype.has=Ae,De.prototype.set=Me;var Ne=De;var Le=function(e,t){var n=this.__data__;if(n instanceof z){var r=n.__data__;if(!me||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ne(r)}return n.set(e,t),this.size=n.size,this};function ze(e){var t=this.__data__=new z(e);this.size=t.size}ze.prototype.clear=B,ze.prototype.delete=F,ze.prototype.get=W,ze.prototype.has=H,ze.prototype.set=Le;var Be=ze,Fe=function(){try{var e=ve(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var We=function(e,t,n){"__proto__"==t&&Fe?Fe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var He=function(e,t,n){(void 0!==n&&!P(e[t],n)||void 0===n&&!(t in e))&&We(e,t,n)};var Ve=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===n(o[c],c,o))break}return t}}(),Ue=n(678),qe=V.a.Uint8Array;var Ge=function(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t};var Ke=function(e,t){var n=t?Ge(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var $e=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Ze=Object.create,Xe=function(){function e(){}return function(t){if(!ee(t))return{};if(Ze)return Ze(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Qe=function(e,t){return function(n){return e(t(n))}},Ye=Qe(Object.getPrototypeOf,Object),Je=Object.prototype;var et=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Je)};var tt=function(e){return"function"!=typeof e.constructor||et(e)?{}:Xe(Ye(e))};var nt=function(e){return null!=e&&"object"==typeof e};var rt=function(e){return nt(e)&&"[object Arguments]"==J(e)},it=Object.prototype,ot=it.hasOwnProperty,at=it.propertyIsEnumerable,st=rt(function(){return arguments}())?rt:function(e){return nt(e)&&ot.call(e,"callee")&&!at.call(e,"callee")},ct=Array.isArray;var ut=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var lt=function(e){return null!=e&&ut(e.length)&&!ne(e)};var ft=function(e){return nt(e)&&lt(e)},dt=n(185),pt=Function.prototype,ht=Object.prototype,gt=pt.toString,vt=ht.hasOwnProperty,mt=gt.call(Object);var yt=function(e){if(!nt(e)||"[object Object]"!=J(e))return!1;var t=Ye(e);if(null===t)return!0;var n=vt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&gt.call(n)==mt},bt={};bt["[object Float32Array]"]=bt["[object Float64Array]"]=bt["[object Int8Array]"]=bt["[object Int16Array]"]=bt["[object Int32Array]"]=bt["[object Uint8Array]"]=bt["[object Uint8ClampedArray]"]=bt["[object Uint16Array]"]=bt["[object Uint32Array]"]=!0,bt["[object Arguments]"]=bt["[object Array]"]=bt["[object ArrayBuffer]"]=bt["[object Boolean]"]=bt["[object DataView]"]=bt["[object Date]"]=bt["[object Error]"]=bt["[object Function]"]=bt["[object Map]"]=bt["[object Number]"]=bt["[object Object]"]=bt["[object RegExp]"]=bt["[object Set]"]=bt["[object String]"]=bt["[object WeakMap]"]=!1;var wt=function(e){return nt(e)&&ut(e.length)&&!!bt[J(e)]};var _t=function(e){return function(t){return e(t)}},xt=n(463),Ot=xt.a&&xt.a.isTypedArray,St=Ot?_t(Ot):wt;var Et=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Ct=Object.prototype.hasOwnProperty;var kt=function(e,t,n){var r=e[t];Ct.call(e,t)&&P(r,n)&&(void 0!==n||t in e)||We(e,t,n)};var Tt=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),i?We(n,s,c):kt(n,s,c)}return n};var jt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},Pt=/^(?:0|[1-9]\d*)$/;var It=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Pt.test(e))&&e>-1&&e%1==0&&e<t},Rt=Object.prototype.hasOwnProperty;var At=function(e,t){var n=ct(e),r=!n&&st(e),i=!n&&!r&&Object(dt.a)(e),o=!n&&!r&&!i&&St(e),a=n||r||i||o,s=a?jt(e.length,String):[],c=s.length;for(var u in e)!t&&!Rt.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||It(u,c))||s.push(u);return s};var Mt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Dt=Object.prototype.hasOwnProperty;var Nt=function(e){if(!ee(e))return Mt(e);var t=et(e),n=[];for(var r in e)("constructor"!=r||!t&&Dt.call(e,r))&&n.push(r);return n};var Lt=function(e){return lt(e)?At(e,!0):Nt(e)};var zt=function(e){return Tt(e,Lt(e))};var Bt=function(e,t,n,r,i,o,a){var s=Et(e,n),c=Et(t,n),u=a.get(c);if(u)He(e,n,u);else{var l=o?o(s,c,n+"",e,t,a):void 0,f=void 0===l;if(f){var d=ct(c),p=!d&&Object(dt.a)(c),h=!d&&!p&&St(c);l=c,d||p||h?ct(s)?l=s:ft(s)?l=$e(s):p?(f=!1,l=Object(Ue.a)(c,!0)):h?(f=!1,l=Ke(c,!0)):l=[]:yt(c)||st(c)?(l=s,st(s)?l=zt(s):ee(s)&&!ne(s)||(l=tt(c))):f=!1}f&&(a.set(c,l),i(l,c,r,o,a),a.delete(c)),He(e,n,l)}};var Ft=function e(t,n,r,i,o){t!==n&&Ve(n,(function(a,s){if(o||(o=new Be),ee(a))Bt(t,n,s,r,e,i,o);else{var c=i?i(Et(t,s),a,s+"",t,n,o):void 0;void 0===c&&(c=a),He(t,s,c)}}),Lt)};var Wt=function(e){return e};var Ht=function(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)},Vt=Math.max;var Ut=function(e,t,n){return t=Vt(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Vt(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),Ht(e,this,s)}};var qt=function(e){return function(){return e}},Gt=Fe?function(e,t){return Fe(e,"toString",{configurable:!0,enumerable:!1,value:qt(t),writable:!0})}:Wt,Kt=Date.now;var $t=function(e){var t=0,n=0;return function(){var r=Kt(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Gt);var Zt=function(e,t){return $t(Ut(e,t,Wt),e+"")};var Xt=function(e,t,n){if(!ee(n))return!1;var r=typeof t;return!!("number"==r?lt(n)&&It(t,n.length):"string"==r&&t in n)&&P(n[t],e)};var Qt=function(e){return Zt((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&Xt(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t}))}((function(e,t,n){Ft(e,t,n)})),Yt=function(e){var t=e.zDepth,n=e.radius,r=e.background,o=e.children,s=e.styles,c=void 0===s?{}:s,u=a()(Qt({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},c),{"zDepth-1":1===t});return i.a.createElement("div",{style:u.wrap},i.a.createElement("div",{style:u.bg}),i.a.createElement("div",{style:u.content},o))};Yt.propTypes={background:T.a.string,zDepth:T.a.oneOf([0,1,2,3,4,5]),radius:T.a.number,styles:T.a.object},Yt.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var Jt=Yt,en=function(){return V.a.Date.now()},tn=/\s/;var nn=function(e){for(var t=e.length;t--&&tn.test(e.charAt(t)););return t},rn=/^\s+/;var on=function(e){return e?e.slice(0,nn(e)+1).replace(rn,""):e};var an=function(e){return"symbol"==typeof e||nt(e)&&"[object Symbol]"==J(e)},sn=/^[-+]0x[0-9a-f]+$/i,cn=/^0b[01]+$/i,un=/^0o[0-7]+$/i,ln=parseInt;var fn=function(e){if("number"==typeof e)return e;if(an(e))return NaN;if(ee(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ee(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=on(e);var n=cn.test(e);return n||un.test(e)?ln(e.slice(2),n?2:8):sn.test(e)?NaN:+e},dn=Math.max,pn=Math.min;var hn=function(e,t,n){var r,i,o,a,s,c,u=0,l=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function h(e){return u=e,s=setTimeout(v,t),l?p(e):a}function g(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-u>=o}function v(){var e=en();if(g(e))return m(e);s=setTimeout(v,function(e){var n=t-(e-c);return f?pn(n,o-(e-u)):n}(e))}function m(e){return s=void 0,d&&r?p(e):(r=i=void 0,a)}function y(){var e=en(),n=g(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return h(c);if(f)return clearTimeout(s),s=setTimeout(v,t),p(c)}return void 0===s&&(s=setTimeout(v,t)),a}return t=fn(t)||0,ee(n)&&(l=!!n.leading,o=(f="maxWait"in n)?dn(fn(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=c=i=s=void 0},y.flush=function(){return void 0===s?a:m(en())},y};var gn=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return ee(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),hn(e,t,{leading:r,maxWait:t,trailing:i})},vn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var mn=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,function(e,t,n){var r=n.getBoundingClientRect(),i=r.width,o=r.height,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(n.getBoundingClientRect().left+window.pageXOffset),u=s-(n.getBoundingClientRect().top+window.pageYOffset);c<0?c=0:c>i&&(c=i),u<0?u=0:u>o&&(u=o);var l=c/i,f=1-u/o;return{h:t.h,s:l,v:f,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=gn((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),vn(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,o=t.black,s=t.pointer,c=t.circle,u=a()({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:o,pointer:s,circle:c}},{custom:!!this.props.style});return i.a.createElement("div",{style:u.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.a.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),i.a.createElement("div",{style:u.white,className:"saturation-white"},i.a.createElement("div",{style:u.black,className:"saturation-black"}),i.a.createElement("div",{style:u.pointer},this.props.pointer?i.a.createElement(this.props.pointer,this.props):i.a.createElement("div",{style:u.circle}))))}}]),t}(r.PureComponent||r.Component);var yn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},bn=Qe(Object.keys,Object),wn=Object.prototype.hasOwnProperty;var _n=function(e){if(!et(e))return bn(e);var t=[];for(var n in Object(e))wn.call(e,n)&&"constructor"!=n&&t.push(n);return t};var xn=function(e){return lt(e)?At(e):_n(e)};var On=function(e,t){return function(n,r){if(null==n)return n;if(!lt(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(e,t){return e&&Ve(e,t,xn)}));var Sn=function(e){return"function"==typeof e?e:Wt};var En=function(e,t){return(ct(e)?yn:On)(e,Sn(t))},Cn=n(257),kn=n.n(Cn),Tn=function(e){var t=0,n=0;return En(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},jn=function(e,t){var n=e.hex?kn()(e.hex):kn()(e),r=n.toHsl(),i=n.toHsv(),o=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===a&&0===o.a?"transparent":"#"+a,rgb:o,hsv:i,oldHue:e.h||t||r.h,source:e.source}},Pn=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&kn()(e).isValid()},In=function(e){if(!e)return"#fff";var t=jn(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},Rn=function(e,t){var n=e.replace("°","");return kn()(t+" ("+n+")")._ok},An=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Dn=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(Tn(e)){var r=jn(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(Tn(e)){var r=jn(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=An({},jn(e.color,0)),t.debounce=hn((function(e,t,n){e(t,n)}),100),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),Mn(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),i.a.createElement(e,An({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return An({},jn(e.color,t.oldHue))}}]),n}(r.PureComponent||r.Component);return t.propTypes=An({},e.propTypes),t.defaultProps=An({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},Nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ln=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function zn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function Fn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Wn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;zn(this,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=n=Bn(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(o))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},Bn(n,t)}return Fn(r,n),Ln(r,[{key:"render",value:function(){return i.a.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},i.a.createElement(e,Nn({},this.props,this.state)))}}]),r}(i.a.Component)}((function(e){var t=e.color,n=e.style,r=e.onClick,o=void 0===r?function(){}:r,s=e.onHover,c=e.title,u=void 0===c?t:c,l=e.children,f=e.focus,p=e.focusStyle,h=void 0===p?{}:p,g="transparent"===t,v=a()({default:{swatch:Wn({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,f?h:{})}}),m={};return s&&(m.onMouseOver=function(e){return s(t,e)}),i.a.createElement("div",Wn({style:v.swatch,onClick:function(e){return o(t,e)},title:u,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&o(t,e)}},m),l,g&&i.a.createElement(d,{borderRadius:v.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))})),Vn=function(e){var t=e.direction,n=a()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return i.a.createElement("div",{style:n.picker})},Un=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qn=function(e){var t=e.rgb,n=e.hsl,r=e.width,o=e.height,s=e.onChange,c=e.direction,u=e.style,l=e.renderers,f=e.pointer,d=e.className,p=void 0===d?"":d,h=a()({default:{picker:{position:"relative",width:r,height:o},alpha:{radius:"2px",style:u}}});return i.a.createElement("div",{style:h.picker,className:"alpha-picker "+p},i.a.createElement(m,Un({},h.alpha,{rgb:t,hsl:n,pointer:f,renderers:l,onChange:s,direction:c})))};qn.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Vn};var Gn=Dn(qn);var Kn=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var $n=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Zn=function(e){return this.__data__.has(e)};function Xn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ne;++t<n;)this.add(e[t])}Xn.prototype.add=Xn.prototype.push=$n,Xn.prototype.has=Zn;var Qn=Xn;var Yn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Jn=function(e,t){return e.has(t)};var er=function(e,t,n,r,i,o){var a=1&n,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var f=-1,d=!0,p=2&n?new Qn:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var h=e[f],g=t[f];if(r)var v=a?r(g,h,f,t,e,o):r(h,g,f,e,t,o);if(void 0!==v){if(v)continue;d=!1;break}if(p){if(!Yn(t,(function(e,t){if(!Jn(p,t)&&(h===e||i(h,e,n,r,o)))return p.push(t)}))){d=!1;break}}else if(h!==g&&!i(h,g,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d};var tr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var nr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},rr=U?U.prototype:void 0,ir=rr?rr.valueOf:void 0;var or=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new qe(e),new qe(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return P(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=tr;case"[object Set]":var c=1&r;if(s||(s=nr),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var l=er(s(e),s(t),r,i,o,a);return a.delete(e),l;case"[object Symbol]":if(ir)return ir.call(e)==ir.call(t)}return!1};var ar=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e};var sr=function(e,t,n){var r=t(e);return ct(e)?r:ar(r,n(e))};var cr=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o};var ur=function(){return[]},lr=Object.prototype.propertyIsEnumerable,fr=Object.getOwnPropertySymbols,dr=fr?function(e){return null==e?[]:(e=Object(e),cr(fr(e),(function(t){return lr.call(e,t)})))}:ur;var pr=function(e){return sr(e,xn,dr)},hr=Object.prototype.hasOwnProperty;var gr=function(e,t,n,r,i,o){var a=1&n,s=pr(e),c=s.length;if(c!=pr(t).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in t:hr.call(t,l)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=!0;o.set(e,t),o.set(t,e);for(var h=a;++u<c;){var g=e[l=s[u]],v=t[l];if(r)var m=a?r(v,g,l,t,e,o):r(g,v,l,e,t,o);if(!(void 0===m?g===v||i(g,v,n,r,o):m)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(e),o.delete(t),p},vr=ve(V.a,"DataView"),mr=ve(V.a,"Promise"),yr=ve(V.a,"Set"),br=ve(V.a,"WeakMap"),wr=se(vr),_r=se(me),xr=se(mr),Or=se(yr),Sr=se(br),Er=J;(vr&&"[object DataView]"!=Er(new vr(new ArrayBuffer(1)))||me&&"[object Map]"!=Er(new me)||mr&&"[object Promise]"!=Er(mr.resolve())||yr&&"[object Set]"!=Er(new yr)||br&&"[object WeakMap]"!=Er(new br))&&(Er=function(e){var t=J(e),n="[object Object]"==t?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case wr:return"[object DataView]";case _r:return"[object Map]";case xr:return"[object Promise]";case Or:return"[object Set]";case Sr:return"[object WeakMap]"}return t});var Cr=Er,kr=Object.prototype.hasOwnProperty;var Tr=function(e,t,n,r,i,o){var a=ct(e),s=ct(t),c=a?"[object Array]":Cr(e),u=s?"[object Array]":Cr(t),l="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),d=c==u;if(d&&Object(dt.a)(e)){if(!Object(dt.a)(t))return!1;a=!0,l=!1}if(d&&!l)return o||(o=new Be),a||St(e)?er(e,t,n,r,i,o):or(e,t,c,n,r,i,o);if(!(1&n)){var p=l&&kr.call(e,"__wrapped__"),h=f&&kr.call(t,"__wrapped__");if(p||h){var g=p?e.value():e,v=h?t.value():t;return o||(o=new Be),i(g,v,n,r,o)}}return!!d&&(o||(o=new Be),gr(e,t,n,r,i,o))};var jr=function e(t,n,r,i,o){return t===n||(null==t||null==n||!nt(t)&&!nt(n)?t!=t&&n!=n:Tr(t,n,r,i,e,o))};var Pr=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var c=(s=n[i])[0],u=e[c],l=s[1];if(a&&s[2]){if(void 0===u&&!(c in e))return!1}else{var f=new Be;if(r)var d=r(u,l,c,e,t,f);if(!(void 0===d?jr(l,u,3,r,f):d))return!1}}return!0};var Ir=function(e){return e==e&&!ee(e)};var Rr=function(e){for(var t=xn(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ir(i)]}return t};var Ar=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};var Mr=function(e){var t=Rr(e);return 1==t.length&&t[0][2]?Ar(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}},Dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nr=/^\w*$/;var Lr=function(e,t){if(ct(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!an(e))||(Nr.test(e)||!Dr.test(e)||null!=t&&e in Object(t))};function zr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(zr.Cache||Ne),n}zr.Cache=Ne;var Br=zr;var Fr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wr=/\\(\\)?/g,Hr=function(e){var t=Br(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Fr,(function(e,n,r,i){t.push(r?i.replace(Wr,"$1"):n||e)})),t})),Vr=U?U.prototype:void 0,Ur=Vr?Vr.toString:void 0;var qr=function e(t){if("string"==typeof t)return t;if(ct(t))return Kn(t,e)+"";if(an(t))return Ur?Ur.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var Gr=function(e){return null==e?"":qr(e)};var Kr=function(e,t){return ct(e)?e:Lr(e,t)?[e]:Hr(Gr(e))};var $r=function(e){if("string"==typeof e||an(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var Zr=function(e,t){for(var n=0,r=(t=Kr(t,e)).length;null!=e&&n<r;)e=e[$r(t[n++])];return n&&n==r?e:void 0};var Xr=function(e,t,n){var r=null==e?void 0:Zr(e,t);return void 0===r?n:r};var Qr=function(e,t){return null!=e&&t in Object(e)};var Yr=function(e,t,n){for(var r=-1,i=(t=Kr(t,e)).length,o=!1;++r<i;){var a=$r(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ut(i)&&It(a,i)&&(ct(e)||st(e))};var Jr=function(e,t){return null!=e&&Yr(e,t,Qr)};var ei=function(e,t){return Lr(e)&&Ir(t)?Ar($r(e),t):function(n){var r=Xr(n,e);return void 0===r&&r===t?Jr(n,e):jr(t,r,3)}};var ti=function(e){return function(t){return null==t?void 0:t[e]}};var ni=function(e){return function(t){return Zr(t,e)}};var ri=function(e){return Lr(e)?ti($r(e)):ni(e)};var ii=function(e){return"function"==typeof e?e:null==e?Wt:"object"==typeof e?ct(e)?ei(e[0],e[1]):Mr(e):ri(e)};var oi=function(e,t){var n=-1,r=lt(e)?Array(e.length):[];return On(e,(function(e,i,o){r[++n]=t(e,i,o)})),r};var ai=function(e,t){return(ct(e)?Kn:oi)(e,ii(t,3))},si=function(e){var t=e.colors,n=e.onClick,r=e.onSwatchHover,o=a()({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return i.a.createElement("div",{style:o.swatches},ai(t,(function(e){return i.a.createElement(Hn,{key:e,color:e,style:o.swatch,onClick:n,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})})),i.a.createElement("div",{style:o.clear}))},ci=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,o=e.colors,s=e.width,c=e.triangle,u=e.styles,l=void 0===u?{}:u,f=e.className,p=void 0===f?"":f,h="transparent"===r,g=function(e,n){Pn(e)&&t({hex:e,source:"hex"},n)},v=a()(Qt({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:In(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},l),{"hide-triangle":"hide"===c});return i.a.createElement("div",{style:v.card,className:"block-picker "+p},i.a.createElement("div",{style:v.triangle}),i.a.createElement("div",{style:v.head},h&&i.a.createElement(d,{borderRadius:"6px 6px 0 0"}),i.a.createElement("div",{style:v.label},r)),i.a.createElement("div",{style:v.body},i.a.createElement(si,{colors:o,onClick:g,onSwatchHover:n}),i.a.createElement(_,{style:{input:v.input},value:r,onChange:g})))};ci.propTypes={width:T.a.oneOfType([T.a.string,T.a.number]),colors:T.a.arrayOf(T.a.string),triangle:T.a.oneOf(["top","hide"]),styles:T.a.object},ci.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};var ui=Dn(ci),li={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"},fi={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"},di={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},pi={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},hi={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"},gi={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"},vi={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},mi={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},yi={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},bi={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"},wi={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},_i={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},xi={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Oi={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Si={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"},Ei={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ci={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},ki={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},Ti=function(e){var t=e.color,n=e.onClick,r=e.onSwatchHover,o=e.hover,s=e.active,c=e.circleSize,u=e.circleSpacing,l=a()({default:{swatch:{width:c,height:c,marginRight:u,marginBottom:u,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(c/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:o,active:s});return i.a.createElement("div",{style:l.swatch},i.a.createElement(Hn,{style:l.Swatch,color:t,onClick:n,onHover:r,focusStyle:{boxShadow:l.Swatch.boxShadow+", 0 0 5px "+t}}))};Ti.defaultProps={circleSize:28,circleSpacing:14};var ji=Object(o.handleHover)(Ti),Pi=function(e){var t=e.width,n=e.onChange,r=e.onSwatchHover,o=e.colors,s=e.hex,c=e.circleSize,u=e.styles,l=void 0===u?{}:u,f=e.circleSpacing,d=e.className,p=void 0===d?"":d,h=a()(Qt({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-f,marginBottom:-f}}},l)),g=function(e,t){return n({hex:e,source:"hex"},t)};return i.a.createElement("div",{style:h.card,className:"circle-picker "+p},ai(o,(function(e){return i.a.createElement(ji,{key:e,color:e,onClick:g,onSwatchHover:r,active:s===e.toLowerCase(),circleSize:c,circleSpacing:f})})))};Pi.propTypes={width:T.a.oneOfType([T.a.string,T.a.number]),circleSize:T.a.number,circleSpacing:T.a.number,styles:T.a.object},Pi.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[li[500],fi[500],di[500],pi[500],hi[500],gi[500],vi[500],mi[500],yi[500],bi[500],wi[500],_i[500],xi[500],Oi[500],Si[500],Ei[500],Ci[500],ki[500]],styles:{}};var Ii=Dn(Pi);var Ri=function(e){return void 0===e},Ai=n(679),Mi=n.n(Ai),Di=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Ni=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){"hex"===n.state.view?n.setState({view:"rgb"}):"rgb"===n.state.view?n.setState({view:"hsl"}):"hsl"===n.state.view&&(1===n.props.hsl.a?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(e,t){e.hex?Pn(e.hex)&&n.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?n.props.onChange({r:e.r||n.props.rgb.r,g:e.g||n.props.rgb.g,b:e.b||n.props.rgb.b,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(Ri(e.s)?n.props.hsl.s:e.s),l:Number(Ri(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Di(t,[{key:"render",value:function(){var e=this,t=a()({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=i.a.createElement("div",{style:t.fields,className:"flexbox-fix"},i.a.createElement("div",{style:t.field},i.a.createElement(_,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=i.a.createElement("div",{style:t.fields,className:"flexbox-fix"},i.a.createElement("div",{style:t.field},i.a.createElement(_,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),i.a.createElement("div",{style:t.field},i.a.createElement(_,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),i.a.createElement("div",{style:t.field},i.a.createElement(_,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),i.a.createElement("div",{style:t.alpha},i.a.createElement(_,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=i.a.createElement("div",{style:t.fields,className:"flexbox-fix"},i.a.createElement("div",{style:t.field},i.a.createElement(_,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),i.a.createElement("div",{style:t.field},i.a.createElement(_,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),i.a.createElement("div",{style:t.field},i.a.createElement(_,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),i.a.createElement("div",{style:t.alpha},i.a.createElement(_,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),i.a.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,i.a.createElement("div",{style:t.toggle},i.a.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},i.a.createElement(Mi.a,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(i.a.Component);Ni.defaultProps={view:"hex"};var Li=Ni,zi=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i.a.createElement("div",{style:e.picker})},Bi=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return i.a.createElement("div",{style:e.picker})},Fi=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,o=e.rgb,s=e.hsl,c=e.hsv,u=e.hex,l=e.renderers,f=e.styles,p=void 0===f?{}:f,h=e.className,g=void 0===h?"":h,v=e.defaultView,y=a()(Qt({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:r});return i.a.createElement("div",{style:y.picker,className:"chrome-picker "+g},i.a.createElement("div",{style:y.saturation},i.a.createElement(mn,{style:y.Saturation,hsl:s,hsv:c,pointer:Bi,onChange:n})),i.a.createElement("div",{style:y.body},i.a.createElement("div",{style:y.controls,className:"flexbox-fix"},i.a.createElement("div",{style:y.color},i.a.createElement("div",{style:y.swatch},i.a.createElement("div",{style:y.active}),i.a.createElement(d,{renderers:l}))),i.a.createElement("div",{style:y.toggles},i.a.createElement("div",{style:y.hue},i.a.createElement(C,{style:y.Hue,hsl:s,pointer:zi,onChange:n})),i.a.createElement("div",{style:y.alpha},i.a.createElement(m,{style:y.Alpha,rgb:o,hsl:s,pointer:zi,renderers:l,onChange:n})))),i.a.createElement(Li,{rgb:o,hsl:s,hex:u,view:v,onChange:n,disableAlpha:r})))};Fi.propTypes={width:T.a.oneOfType([T.a.string,T.a.number]),disableAlpha:T.a.bool,styles:T.a.object,defaultView:T.a.oneOf(["hex","rgb","hsl"])},Fi.defaultProps={width:225,disableAlpha:!1,styles:{}};var Wi=Dn(Fi),Hi=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,s=e.active,c=a()({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:In(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return i.a.createElement(Hn,{style:c.color,color:t,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},i.a.createElement("div",{style:c.dot}))},Vi=function(e){var t=e.hex,n=e.rgb,r=e.onChange,o=a()({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return i.a.createElement("div",{style:o.fields,className:"flexbox-fix"},i.a.createElement("div",{style:o.active}),i.a.createElement(_,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:s}),i.a.createElement(_,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:s}),i.a.createElement(_,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:s}),i.a.createElement(_,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:s}))},Ui=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,o=e.hex,s=e.rgb,c=e.styles,u=void 0===c?{}:c,l=e.className,f=void 0===l?"":l,d=a()(Qt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},u)),p=function(e,n){e.hex?Pn(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return i.a.createElement(Jt,{style:d.Compact,styles:u},i.a.createElement("div",{style:d.compact,className:"compact-picker "+f},i.a.createElement("div",null,ai(r,(function(e){return i.a.createElement(Hi,{key:e,color:e,active:e.toLowerCase()===o,onClick:p,onSwatchHover:n})})),i.a.createElement("div",{style:d.clear})),i.a.createElement(Vi,{hex:o,rgb:s,onChange:p})))};Ui.propTypes={colors:T.a.arrayOf(T.a.string),styles:T.a.object},Ui.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};var qi=Dn(Ui),Gi=Object(o.handleHover)((function(e){var t=e.hover,n=e.color,r=e.onClick,o=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},c=a()({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return i.a.createElement("div",{style:c.swatch},i.a.createElement(Hn,{color:n,onClick:r,onHover:o,focusStyle:s}))})),Ki=function(e){var t=e.width,n=e.colors,r=e.onChange,o=e.onSwatchHover,s=e.triangle,c=e.styles,u=void 0===c?{}:c,l=e.className,f=void 0===l?"":l,d=a()(Qt({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},u),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"===s,"bottom-right-triangle":"bottom-right"===s}),p=function(e,t){return r({hex:e,source:"hex"},t)};return i.a.createElement("div",{style:d.card,className:"github-picker "+f},i.a.createElement("div",{style:d.triangleShadow}),i.a.createElement("div",{style:d.triangle}),ai(n,(function(e){return i.a.createElement(Gi,{color:e,key:e,onClick:p,onSwatchHover:o})})))};Ki.propTypes={width:T.a.oneOfType([T.a.string,T.a.number]),colors:T.a.arrayOf(T.a.string),triangle:T.a.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:T.a.object},Ki.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};var $i=Dn(Ki),Zi=function(e){var t=e.direction,n=a()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return i.a.createElement("div",{style:n.picker})},Xi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qi=function(e){var t=e.width,n=e.height,r=e.onChange,o=e.hsl,s=e.direction,c=e.pointer,u=e.styles,l=void 0===u?{}:u,f=e.className,d=void 0===f?"":f,p=a()(Qt({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},l));return i.a.createElement("div",{style:p.picker,className:"hue-picker "+d},i.a.createElement(C,Xi({},p.hue,{hsl:o,pointer:c,onChange:function(e){return r({a:1,h:e.h,l:.5,s:1})},direction:s})))};Qi.propTypes={styles:T.a.object},Qi.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Zi,styles:{}};var Yi=Dn(Qi),Ji=Dn((function(e){var t=e.onChange,n=e.hex,r=e.rgb,o=e.styles,s=void 0===o?{}:o,c=e.className,u=void 0===c?"":c,l=a()(Qt({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},s)),f=function(e,n){e.hex?Pn(e.hex)&&t({hex:e.hex,source:"hex"},n):(e.r||e.g||e.b)&&t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},n)};return i.a.createElement(Jt,{styles:s},i.a.createElement("div",{style:l.material,className:"material-picker "+u},i.a.createElement(_,{style:{wrap:l.HEXwrap,input:l.HEXinput,label:l.HEXlabel},label:"hex",value:n,onChange:f}),i.a.createElement("div",{style:l.split,className:"flexbox-fix"},i.a.createElement("div",{style:l.third},i.a.createElement(_,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"r",value:r.r,onChange:f})),i.a.createElement("div",{style:l.third},i.a.createElement(_,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"g",value:r.g,onChange:f})),i.a.createElement("div",{style:l.third},i.a.createElement(_,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"b",value:r.b,onChange:f})))))})),eo=function(e){var t=e.onChange,n=e.rgb,r=e.hsv,o=e.hex,s=a()({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),c=function(e,i){e["#"]?Pn(e["#"])&&t({hex:e["#"],source:"hex"},i):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},i):(e.h||e.s||e.v)&&t({h:e.h||r.h,s:e.s||r.s,v:e.v||r.v,source:"hsv"},i)};return i.a.createElement("div",{style:s.fields},i.a.createElement(_,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(r.h),onChange:c}),i.a.createElement(_,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(100*r.s),onChange:c}),i.a.createElement(_,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(100*r.v),onChange:c}),i.a.createElement("div",{style:s.divider}),i.a.createElement(_,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:c}),i.a.createElement(_,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:c}),i.a.createElement(_,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:c}),i.a.createElement("div",{style:s.divider}),i.a.createElement(_,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:o.replace("#",""),onChange:c}),i.a.createElement("div",{style:s.fieldSymbols},i.a.createElement("div",{style:s.symbol},"°"),i.a.createElement("div",{style:s.symbol},"%"),i.a.createElement("div",{style:s.symbol},"%")))},to=function(e){var t=e.hsl,n=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return i.a.createElement("div",{style:n.picker})},no=function(){var e=a()({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return i.a.createElement("div",{style:e.pointer},i.a.createElement("div",{style:e.left},i.a.createElement("div",{style:e.leftInside})),i.a.createElement("div",{style:e.right},i.a.createElement("div",{style:e.rightInside})))},ro=function(e){var t=e.onClick,n=e.label,r=e.children,o=e.active,s=a()({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return i.a.createElement("div",{style:s.button,onClick:t},n||r)},io=function(e){var t=e.rgb,n=e.currentColor,r=a()({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return i.a.createElement("div",null,i.a.createElement("div",{style:r.label},"new"),i.a.createElement("div",{style:r.swatches},i.a.createElement("div",{style:r.new}),i.a.createElement("div",{style:r.current})),i.a.createElement("div",{style:r.label},"current"))},oo=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var ao=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:e.hex},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),oo(t,[{key:"render",value:function(){var e=this.props,t=e.styles,n=void 0===t?{}:t,r=e.className,o=void 0===r?"":r,s=a()(Qt({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},n));return i.a.createElement("div",{style:s.picker,className:"photoshop-picker "+o},i.a.createElement("div",{style:s.head},this.props.header),i.a.createElement("div",{style:s.body,className:"flexbox-fix"},i.a.createElement("div",{style:s.saturation},i.a.createElement(mn,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:to,onChange:this.props.onChange})),i.a.createElement("div",{style:s.hue},i.a.createElement(C,{direction:"vertical",hsl:this.props.hsl,pointer:no,onChange:this.props.onChange})),i.a.createElement("div",{style:s.controls},i.a.createElement("div",{style:s.top,className:"flexbox-fix"},i.a.createElement("div",{style:s.previews},i.a.createElement(io,{rgb:this.props.rgb,currentColor:this.state.currentColor})),i.a.createElement("div",{style:s.actions},i.a.createElement(ro,{label:"OK",onClick:this.props.onAccept,active:!0}),i.a.createElement(ro,{label:"Cancel",onClick:this.props.onCancel}),i.a.createElement(eo,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(i.a.Component);ao.propTypes={header:T.a.string,styles:T.a.object},ao.defaultProps={header:"Color Picker",styles:{}};var so=Dn(ao),co=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,o=e.hex,s=e.disableAlpha,c=a()({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:s}),u=function(e,i){e.hex?Pn(e.hex)&&t({hex:e.hex,source:"hex"},i):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},i):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},i))};return i.a.createElement("div",{style:c.fields,className:"flexbox-fix"},i.a.createElement("div",{style:c.double},i.a.createElement(_,{style:{input:c.input,label:c.label},label:"hex",value:o.replace("#",""),onChange:u})),i.a.createElement("div",{style:c.single},i.a.createElement(_,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:u,dragLabel:"true",dragMax:"255"})),i.a.createElement("div",{style:c.single},i.a.createElement(_,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:u,dragLabel:"true",dragMax:"255"})),i.a.createElement("div",{style:c.single},i.a.createElement(_,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:u,dragLabel:"true",dragMax:"255"})),i.a.createElement("div",{style:c.alpha},i.a.createElement(_,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:u,dragLabel:"true",dragMax:"100"})))},uo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lo=function(e){var t=e.colors,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,s=a()({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),c=function(e,t){r({hex:e,source:"hex"},t)};return i.a.createElement("div",{style:s.colors,className:"flexbox-fix"},t.map((function(e){var t="string"==typeof e?{color:e}:e,n=""+t.color+(t.title||"");return i.a.createElement("div",{key:n,style:s.swatchWrap},i.a.createElement(Hn,uo({},t,{style:s.swatch,onClick:c,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))})))};lo.propTypes={colors:T.a.arrayOf(T.a.oneOfType([T.a.string,T.a.shape({color:T.a.string,title:T.a.string})])).isRequired};var fo=lo,po=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ho=function(e){var t=e.width,n=e.rgb,r=e.hex,o=e.hsv,s=e.hsl,c=e.onChange,u=e.onSwatchHover,l=e.disableAlpha,f=e.presetColors,p=e.renderers,h=e.styles,g=void 0===h?{}:h,v=e.className,y=void 0===v?"":v,b=a()(Qt({default:po({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},g),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},g),{disableAlpha:l});return i.a.createElement("div",{style:b.picker,className:"sketch-picker "+y},i.a.createElement("div",{style:b.saturation},i.a.createElement(mn,{style:b.Saturation,hsl:s,hsv:o,onChange:c})),i.a.createElement("div",{style:b.controls,className:"flexbox-fix"},i.a.createElement("div",{style:b.sliders},i.a.createElement("div",{style:b.hue},i.a.createElement(C,{style:b.Hue,hsl:s,onChange:c})),i.a.createElement("div",{style:b.alpha},i.a.createElement(m,{style:b.Alpha,rgb:n,hsl:s,renderers:p,onChange:c}))),i.a.createElement("div",{style:b.color},i.a.createElement(d,null),i.a.createElement("div",{style:b.activeColor}))),i.a.createElement(co,{rgb:n,hsl:s,hex:r,onChange:c,disableAlpha:l}),i.a.createElement(fo,{colors:f,onClick:c,onSwatchHover:u}))};ho.propTypes={disableAlpha:T.a.bool,width:T.a.oneOfType([T.a.string,T.a.number]),styles:T.a.object},ho.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};var go=Dn(ho),vo=function(e){var t=e.hsl,n=e.offset,r=e.onClick,o=void 0===r?function(){}:r,s=e.active,c=e.first,u=e.last,l=a()({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*n+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:c,last:u});return i.a.createElement("div",{style:l.swatch,onClick:function(e){return o({h:t.h,s:.5,l:n,source:"hsl"},e)}})},mo=function(e){var t=e.onClick,n=e.hsl,r=a()({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}});return i.a.createElement("div",{style:r.swatches},i.a.createElement("div",{style:r.swatch},i.a.createElement(vo,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<.1&&Math.abs(n.s-.5)<.1,onClick:t,first:!0})),i.a.createElement("div",{style:r.swatch},i.a.createElement(vo,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),i.a.createElement("div",{style:r.swatch},i.a.createElement(vo,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),i.a.createElement("div",{style:r.swatch},i.a.createElement(vo,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),i.a.createElement("div",{style:r.swatch},i.a.createElement(vo,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<.1&&Math.abs(n.s-.5)<.1,onClick:t,last:!0})),i.a.createElement("div",{style:r.clear}))},yo=function(){var e=a()({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i.a.createElement("div",{style:e.picker})},bo=function(e){var t=e.hsl,n=e.onChange,r=e.pointer,o=e.styles,s=void 0===o?{}:o,c=e.className,u=void 0===c?"":c,l=a()(Qt({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return i.a.createElement("div",{style:l.wrap||{},className:"slider-picker "+u},i.a.createElement("div",{style:l.hue},i.a.createElement(C,{style:l.Hue,hsl:t,pointer:r,onChange:n})),i.a.createElement("div",{style:l.swatches},i.a.createElement(mo,{hsl:t,onClick:n})))};bo.propTypes={styles:T.a.object},bo.defaultProps={pointer:yo,styles:{}};var wo=Dn(bo),_o=n(680),xo=n.n(_o),Oo=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,s=e.first,c=e.last,u=e.active,l=a()({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:In(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:s,last:c,active:u,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return i.a.createElement(Hn,{color:t,style:l.color,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},i.a.createElement("div",{style:l.check},i.a.createElement(xo.a,null)))},So=function(e){var t=e.onClick,n=e.onSwatchHover,r=e.group,o=e.active,s=a()({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return i.a.createElement("div",{style:s.group},ai(r,(function(e,a){return i.a.createElement(Oo,{key:e,color:e,active:e.toLowerCase()===o,first:0===a,last:a===r.length-1,onClick:t,onSwatchHover:n})})))},Eo=function(e){var t=e.width,n=e.height,r=e.onChange,o=e.onSwatchHover,s=e.colors,c=e.hex,u=e.styles,l=void 0===u?{}:u,f=e.className,d=void 0===f?"":f,p=a()(Qt({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},l)),h=function(e,t){return r({hex:e,source:"hex"},t)};return i.a.createElement("div",{style:p.picker,className:"swatches-picker "+d},i.a.createElement(Jt,null,i.a.createElement("div",{style:p.overflow},i.a.createElement("div",{style:p.body},ai(s,(function(e){return i.a.createElement(So,{key:e.toString(),group:e,active:c,onClick:h,onSwatchHover:o})})),i.a.createElement("div",{style:p.clear})))))};Eo.propTypes={width:T.a.oneOfType([T.a.string,T.a.number]),height:T.a.oneOfType([T.a.string,T.a.number]),colors:T.a.arrayOf(T.a.arrayOf(T.a.string)),styles:T.a.object},Eo.defaultProps={width:320,height:240,colors:[[li[900],li[700],li[500],li[300],li[100]],[fi[900],fi[700],fi[500],fi[300],fi[100]],[di[900],di[700],di[500],di[300],di[100]],[pi[900],pi[700],pi[500],pi[300],pi[100]],[hi[900],hi[700],hi[500],hi[300],hi[100]],[gi[900],gi[700],gi[500],gi[300],gi[100]],[vi[900],vi[700],vi[500],vi[300],vi[100]],[mi[900],mi[700],mi[500],mi[300],mi[100]],[yi[900],yi[700],yi[500],yi[300],yi[100]],["#194D33",bi[700],bi[500],bi[300],bi[100]],[wi[900],wi[700],wi[500],wi[300],wi[100]],[_i[900],_i[700],_i[500],_i[300],_i[100]],[xi[900],xi[700],xi[500],xi[300],xi[100]],[Oi[900],Oi[700],Oi[500],Oi[300],Oi[100]],[Si[900],Si[700],Si[500],Si[300],Si[100]],[Ei[900],Ei[700],Ei[500],Ei[300],Ei[100]],[Ci[900],Ci[700],Ci[500],Ci[300],Ci[100]],[ki[900],ki[700],ki[500],ki[300],ki[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};var Co=Dn(Eo),ko=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,o=e.colors,s=e.width,c=e.triangle,u=e.styles,l=void 0===u?{}:u,f=e.className,d=void 0===f?"":f,p=a()(Qt({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},l),{"hide-triangle":"hide"===c,"top-left-triangle":"top-left"===c,"top-right-triangle":"top-right"===c}),h=function(e,n){Pn(e)&&t({hex:e,source:"hex"},n)};return i.a.createElement("div",{style:p.card,className:"twitter-picker "+d},i.a.createElement("div",{style:p.triangleShadow}),i.a.createElement("div",{style:p.triangle}),i.a.createElement("div",{style:p.body},ai(o,(function(e,t){return i.a.createElement(Hn,{key:t,color:e,hex:e,style:p.swatch,onClick:h,onHover:n,focusStyle:{boxShadow:"0 0 4px "+e}})})),i.a.createElement("div",{style:p.hash},"#"),i.a.createElement(_,{label:null,style:{input:p.input},value:r.replace("#",""),onChange:h}),i.a.createElement("div",{style:p.clear})))};ko.propTypes={width:T.a.oneOfType([T.a.string,T.a.number]),triangle:T.a.oneOf(["hide","top-left","top-right"]),colors:T.a.arrayOf(T.a.string),styles:T.a.object},ko.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};var To=Dn(ko),jo=function(e){var t=a()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)"}}});return i.a.createElement("div",{style:t.picker})};jo.propTypes={hsl:T.a.shape({h:T.a.number,s:T.a.number,l:T.a.number,a:T.a.number})},jo.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Po=jo,Io=function(e){var t=a()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return i.a.createElement("div",{style:t.picker})};Io.propTypes={hsl:T.a.shape({h:T.a.number,s:T.a.number,l:T.a.number,a:T.a.number})},Io.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Ro=Io,Ao=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,o=e.hex,s=e.hsv,c=function(e,n){if(e.hex)Pn(e.hex)&&t({hex:e.hex,source:"hex"},n);else if(e.rgb){var r=e.rgb.split(",");Rn(e.rgb,"rgb")&&t({r:r[0],g:r[1],b:r[2],a:1,source:"rgb"},n)}else if(e.hsv){var i=e.hsv.split(",");Rn(e.hsv,"hsv")&&(i[2]=i[2].replace("%",""),i[1]=i[1].replace("%",""),i[0]=i[0].replace("°",""),1==i[1]?i[1]=.01:1==i[2]&&(i[2]=.01),t({h:Number(i[0]),s:Number(i[1]),v:Number(i[2]),source:"hsv"},n))}else if(e.hsl){var o=e.hsl.split(",");Rn(e.hsl,"hsl")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("°",""),1==d[1]?d[1]=.01:1==d[2]&&(d[2]=.01),t({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsl"},n))}},u=a()({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),l=n.r+", "+n.g+", "+n.b,f=Math.round(r.h)+"°, "+Math.round(100*r.s)+"%, "+Math.round(100*r.l)+"%",d=Math.round(s.h)+"°, "+Math.round(100*s.s)+"%, "+Math.round(100*s.v)+"%";return i.a.createElement("div",{style:u.wrap,className:"flexbox-fix"},i.a.createElement("div",{style:u.fields},i.a.createElement("div",{style:u.double},i.a.createElement(_,{style:{input:u.input,label:u.label},label:"hex",value:o,onChange:c})),i.a.createElement("div",{style:u.column},i.a.createElement("div",{style:u.single},i.a.createElement(_,{style:{input:u.input2,label:u.label2},label:"rgb",value:l,onChange:c})),i.a.createElement("div",{style:u.single},i.a.createElement(_,{style:{input:u.input2,label:u.label2},label:"hsv",value:d,onChange:c})),i.a.createElement("div",{style:u.single},i.a.createElement(_,{style:{input:u.input2,label:u.label2},label:"hsl",value:f,onChange:c})))))},Mo=function(e){var t=e.width,n=e.onChange,r=e.rgb,o=e.hsl,s=e.hsv,c=e.hex,u=e.header,l=e.styles,f=void 0===l?{}:l,d=e.className,p=void 0===d?"":d,h=a()(Qt({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},f));return i.a.createElement("div",{style:h.picker,className:"google-picker "+p},i.a.createElement("div",{style:h.head},u),i.a.createElement("div",{style:h.swatch}),i.a.createElement("div",{style:h.saturation},i.a.createElement(mn,{hsl:o,hsv:s,pointer:Po,onChange:n})),i.a.createElement("div",{style:h.body},i.a.createElement("div",{style:h.controls,className:"flexbox-fix"},i.a.createElement("div",{style:h.hue},i.a.createElement(C,{style:h.Hue,hsl:o,radius:"4px",pointer:Ro,onChange:n}))),i.a.createElement(Ao,{rgb:r,hsl:o,hex:c,hsv:s,onChange:n})))};Mo.propTypes={width:T.a.oneOfType([T.a.string,T.a.number]),styles:T.a.object,header:T.a.string},Mo.defaultProps={width:652,styles:{},header:"Color picker"};var Do=Dn(Mo)},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"default",(function(){return Rs}));var i={};n.r(i),n.d(i,"accessTokensReducer",(function(){return Vr})),n.d(i,"companionWindowsReducer",(function(){return fi})),n.d(i,"errorsReducer",(function(){return Pi})),n.d(i,"workspaceReducer",(function(){return lo})),n.d(i,"windowsReducer",(function(){return no})),n.d(i,"manifestsReducer",(function(){return Hi})),n.d(i,"infoResponsesReducer",(function(){return Mi})),n.d(i,"configReducer",(function(){return mi})),n.d(i,"viewersReducer",(function(){return Yi})),n.d(i,"annotationsReducer",(function(){return Kr})),n.d(i,"authReducer",(function(){return Qr})),n.d(i,"elasticLayoutReducer",(function(){return _i})),n.d(i,"searchesReducer",(function(){return $i})),n.d(i,"layersReducer",(function(){return zi})),n.d(i,"catalogReducer",(function(){return ri}));var o=n(0),a=n.n(o),s=n(33),c=n.n(s),u=n(9),l=n(347),f=n(459),d=n.n(f),p=n(254);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e){return e.mapStateToProps||e.mapDispatchToProps?u.b.apply(void 0,[e.mapStateToProps,e.mapDispatchToProps].concat(m(e.connectOptions||[])))(e.component):e.component}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e){var t=e.plugins,n=e.children,r=w(Object(o.useState)({}),2),i=r[0],s=r[1];return Object(o.useEffect)((function(){var e=function(e){return e.map((function(e){return g(g({},e),{},{component:b(e)})}))}(t);!function(e){e.filter((function(e){return e.companionWindowKey})).forEach((function(e){p.a[e.companionWindowKey]=e.component})),p.a}(e),s(function(e){return e.reduce((function(e,t){return d()(e,[t.target,t.mode],(function(e){return[].concat(m(e||[]),[t])}))}),{})}(e))}),[t]),a.a.createElement(l.a.Provider,{value:i},n)}x.defaultProps={children:null,plugins:[]};var O=n(7),S=n(8),E=n(559),C=n(88),k=n(319),T=n(712),j=n.n(T),P=n(188);function I(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=Object(o.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return Object(o.createElement)(P.a.Provider,{value:i},r)}var R=n(366),A=n(756),M=n(1151),D=n(178),N=n(242),L=n(762),z=n(655),B=n(182),F=n(461),W=n(460),H=n.n(W),V=n(59),U=n(713),q=n.n(U),G=n(70),K=n(27);function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Object(K.a)(e,t,n[t])}))}return e}var Z=n(77),X=n(60),Q=n(156),Y=n(157),J=n(53),ee=n(187),te={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},ne=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(Z.a)(this,e),this.init(t,n)}return Object(X.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||te,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,$({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),re=function(){function e(){Object(Z.a)(this,e),this.observers={}}return Object(X.a)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function ie(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function oe(e){return null==e?"":""+e}function ae(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function se(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function ce(e,t,n){var r=se(e,t,Object);r.obj[r.k]=n}function ue(e,t){var n=se(e,t),r=n.obj,i=n.k;if(r)return r[i]}function le(e,t,n){var r=ue(e,n);return void 0!==r?r:ue(t,n)}function fe(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):fe(e[r],t[r],n):e[r]=t[r]);return e}function de(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var pe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function he(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return pe[e]})):e}var ge="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,ve=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Object(Z.a)(this,t),n=Object(Q.a)(this,Object(Y.a)(t).call(this)),ge&&re.call(Object(J.a)(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return Object(ee.a)(t,e),Object(X.a)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=[e,t];return n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split(".")),ue(this.data,o)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),ce(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=ue(this.data,a)||{};r?fe(s,n,i):s=$({},s,n),ce(this.data,a,s),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?$({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(re),me={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))})),t}},ye={},be=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(Z.a)(this,t),n=Object(Q.a)(this,Object(Y.a)(t).call(this)),ge&&re.call(Object(J.a)(n)),ae(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,Object(J.a)(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=ne.create("translator"),n}return Object(ee.a)(t,e),Object(X.a)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:i};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,n,r){var i=this;if("object"!==Object(G.a)(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),s=a.key,c=a.namespaces,u=c[c.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(f){var d=n.nsSeparator||this.options.nsSeparator;return u+d+s}return s}var p=this.resolve(e,n),h=p&&p.res,g=p&&p.usedKey||s,v=p&&p.exactUsedKey||s,m=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&_&&y.indexOf(m)<0&&("string"!=typeof b||"[object Array]"!==m)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,n):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(o){var x="[object Array]"===m,O=x?[]:{},S=x?v:g;for(var E in h)if(Object.prototype.hasOwnProperty.call(h,E)){var C="".concat(S).concat(o).concat(E);O[E]=this.translate(C,$({},n,{joinArrays:!1,ns:c})),O[E]===C&&(O[E]=h[E])}h=O}}else if(w&&"string"==typeof b&&"[object Array]"===m)(h=h.join(b))&&(h=this.extendTranslation(h,e,n,r));else{var k=!1,T=!1,j=void 0!==n.count&&"string"!=typeof n.count,P=t.hasDefaultValue(n),I=j?this.pluralResolver.getSuffix(l,n.count):"",R=n["defaultValue".concat(I)]||n.defaultValue;!this.isValidLookup(h)&&P&&(k=!0,h=R),this.isValidLookup(h)||(T=!0,h=s);var A=P&&R!==h&&this.options.updateMissing;if(T||k||A){if(this.logger.log(A?"updateKey":"missingKey",l,u,s,A?R:h),o){var M=this.resolve(s,$({},n,{keySeparator:!1}));M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[],N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&N&&N[0])for(var L=0;L<N.length;L++)D.push(N[L]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);var z=function(e,t,r){i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,t,A?r:h,A,n):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,t,A?r:h,A,n),i.emit("missingKey",e,u,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?D.forEach((function(e){i.pluralResolver.getSuffixes(e).forEach((function(t){z([e],s+t,n["defaultValue".concat(t)]||R)}))})):z(D,s,R))}h=this.extendTranslation(h,e,n,p,r),T&&h===s&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(s)),T&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init($({},n,{interpolation:$({},this.options.interpolation,n.interpolation)}));var a,s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u=$({},this.options.interpolation.defaultVariables,u)),e=this.interpolator.interpolate(e,u,n.lng||this.language,n),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,d="string"==typeof f?[f]:f;return null!=e&&d&&d.length&&!1!==n.applyPostProcessor&&(e=me.handle(d,e,t,this.options&&this.options.postProcessPassResolved?$({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,s),u=c.key;n=u;var l=c.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(o=e,!ye["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(ye["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){i=n;var o,c,l=u,p=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(p,u,n,e,s);else f&&(o=a.pluralResolver.getSuffix(n,s.count)),f&&d&&p.push(l+o),d&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=o);for(;c=p.pop();)a.isValidLookup(t)||(r=c,t=a.getResource(n,e,c,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}]),t}(re);function we(e){return e.charAt(0).toUpperCase()+e.slice(1)}var _e=function(){function e(t){Object(Z.a)(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ne.create("languageUtils")}return Object(X.a)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=we(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=we(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=we(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))})),i}}]),e}(),xe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Oe={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function Se(){var e={};return xe.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:Oe[t.fc]}}))})),e}var Ee=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(Z.a)(this,e),this.languageUtils=t,this.options=n,this.logger=ne.create("pluralResolver"),this.rules=Se()}return Object(X.a)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var i=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),o=r.numbers[i];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),Ce=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(Z.a)(this,e),this.logger=ne.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Object(X.a)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:he,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?de(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?de(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?de(t.nestingPrefix):t.nestingPrefixEscaped||de("$t("),this.nestingSuffix=t.nestingSuffix?de(t.nestingSuffix):t.nestingSuffixEscaped||de(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,a,s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var i=le(t,c,e);return s.alwaysFormat?s.format(i,void 0,n):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),u=o.join(s.formatSeparator).trim();return s.format(le(t,c,a),u,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach((function(t){for(a=0;i=t.regex.exec(e);){if(void 0===(o=l(i[1].trim())))if("function"==typeof f){var n=f(e,i,r);o="string"==typeof n?n:""}else{if(d){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o=""}else"string"==typeof o||s.useRawValueToEscape||(o=oe(o));if(e=e.replace(i[0],t.safeValue(o)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=$({},o);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0],i=(i=this.interpolate(i,a)).replace(/'/g,'"');try{a=JSON.parse(i),t&&(a=$({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],u=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),c=l,u=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=oe(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),u&&(r=c.reduce((function(e,t){return i.format(e,t,o.lng,o)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();var ke=function(e){function t(e,n,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(Z.a)(this,t),i=Object(Q.a)(this,Object(Y.a)(t).call(this)),ge&&re.call(Object(J.a)(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=o,i.logger=ne.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,o.backend,o),i}return Object(ee.a)(t,e),Object(X.a)(t,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o=[],a=[],s=[],c=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),o.indexOf(s)<0&&o.push(s),c.indexOf(t)<0&&c.push(t)))})),r||s.push(e)})),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:o,pending:a,toLoadLanguages:s,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,c,u,l,f;r=n.loaded,s=o,u=se(r,[i],Object),l=u.obj,f=u.k,l[f]=l[f]||[],c&&(l[f]=l[f].concat(s)),c||l[f].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,c){s&&c&&i<5?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*o,a)}),o):a(s,c)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,$({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(re);function Te(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Object(G.a)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Object(G.a)(e[2])||"object"===Object(G.a)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function je(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Pe(){}var Ie=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(Object(Z.a)(this,t),e=Object(Q.a)(this,Object(Y.a)(t).call(this)),ge&&re.call(Object(J.a)(e)),e.options=je(n),e.services={},e.logger=ne,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),Object(Q.a)(e,Object(J.a)(e));setTimeout((function(){e.init(n,r)}),0)}return e}return Object(ee.a)(t,e),Object(X.a)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=$({},Te(),this.options,je(t)),this.format=this.options.interpolation.format,n||(n=Pe),!this.options.isClone){this.modules.logger?ne.init(r(this.modules.logger),this.options):ne.init(null,this.options);var i=new _e(this.options);this.store=new ve(this.options.resources,this.options);var o=this.services;o.logger=ne,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new Ee(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new Ce(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new ke(r(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(o.languageDetector=r(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=r(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new be(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var s=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var u=ie(),l=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pe,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)a(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(o,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=ie();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Pe),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&me.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=ie();this.emit("languageChanging",e);var i=function(e){var i="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);i&&(n.language||(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i)),n.translator.language||n.translator.changeLanguage(i),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(i)),n.loadResources(i,(function(e){!function(e,i){i?(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,i)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var i;if("object"!==Object(G.a)(r)){for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];i=n.options.overloadTranslationOptionHandler([t,r].concat(a))}else i=$({},r);return i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,n.t(t,i)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!this.services.backendConnector.backend||!(!a(r,e)||i&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=ie();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=ie();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pe,i=$({},this.options,n,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.services=$({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new be(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}}]),t}(re)),Re=n(714),Ae=n(715),Me=n(716),De=n(729),Ne=n(730),Le=n(717),ze=n(719),Be=n(720),Fe=n(723),We=n(724),He=n(725),Ve=n(718),Ue=n(726),qe=n(727),Ge=n(721),Ke=n(728),$e=n(722);var Ze=function(){var e={ar:Re,de:Ae,en:Me,fr:Le,it:Ve,ja:ze,kr:Be,lt:Ge,"nb-NO":$e,nl:Fe,pl:We,"pt-BR":He,sr:Ue,sv:qe,vi:Ke,"zh-CN":De,"zh-TW":Ne},t=Ie.createInstance();return t.use(P.e).init({fallbackLng:"en",interpolation:{escapeValue:!1},lng:"en",resources:e}),t};function Xe(e){return function(e){if(Array.isArray(e))return Qe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qe(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Je(e,t){return(Je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nt(e);if(t){var i=nt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return tt(this,n)}}function tt(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rt=function(e){var t=e.dndManager,n=e.children;return!1===t?n:void 0===t?a.a.createElement(z.a,{backend:F.default,options:H.a},n):a.a.createElement(B.a.Provider,{value:t},n)},it=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Je(e,t)}(o,e);var t,n,r,i=et(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).i18n=Ze(),t}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props.language;this.i18n.changeLanguage(e)}},{key:"componentDidUpdate",value:function(e){var t=this.props.language;e.language!==t&&this.i18n.changeLanguage(t)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.createGenerateClassNameOptions,i=t.isFullscreenEnabled,o=t.setWorkspaceFullscreen,s=t.theme,c=t.translations,u=t.dndManager,l=Object(A.a)(r);return Object.keys(c).forEach((function(t){e.i18n.addResourceBundle(t,"translation",c[t],!0,!0)})),a.a.createElement(j.a,{enabled:i,onChange:o},a.a.createElement(I,{i18n:this.i18n},a.a.createElement(R.a,null,a.a.createElement(M.a,{theme:Object(D.a)(s)},a.a.createElement(N.b,{jss:Object(V.c)({plugins:[].concat(Xe(Object(L.a)().plugins),[q()()])}),generateClassName:l},a.a.createElement(rt,{dndManager:u},n))))))}}])&&Ye(t.prototype,n),r&&Ye(t,r),o}(o.Component);it.defaultProps={children:null,createGenerateClassNameOptions:{},dndManager:void 0,isFullscreenEnabled:!1};var ot={setWorkspaceFullscreen:E.b},at=Object(O.compose)(Object(u.b)((function(e){return{createGenerateClassNameOptions:Object(C.a)(e).createGenerateClassNameOptions,isFullscreenEnabled:Object(k.b)(e),language:Object(C.a)(e).language,theme:Object(C.g)(e),translations:Object(C.a)(e).translations}}),ot),Object(S.a)("AppProviders"))(it);function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ut(e,t){return(ut=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dt(e);if(t){var i=dt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ft(this,n)}}function ft(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dt(e){return(dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pt=Object(o.lazy)((function(){return Promise.resolve().then(n.bind(null,1170))})),ht=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ut(e,t)}(s,e);var t,n,r,i=lt(s);function s(){return st(this,s),i.apply(this,arguments)}return t=s,(n=[{key:"render",value:function(){var e=this.props,t=e.dndManager,n=e.plugins;return a.a.createElement(x,{plugins:n},a.a.createElement(at,{dndManager:t},a.a.createElement(o.Suspense,{fallback:a.a.createElement("div",null)},a.a.createElement(pt,null))))}}])&&ct(t.prototype,n),r&&ct(t,r),s}(o.Component);ht.defaultProps={dndManager:void 0,plugins:[]};var gt=ht,vt=n(120),mt=n.n(vt),yt=n(343),bt=n.n(yt),wt=n(128),_t=n.n(wt),xt=n(179),Ot=n.n(xt),St=n(68),Et=n.n(St),Ct=n(464),kt=n.n(Ct),Tt=n(323),jt=n.n(Tt),Pt=function(e){return[It,Rt,At,Mt,Dt,Nt,Lt].every((function(t){return t(e)}))},It=function(e){return Et()(e)},Rt=function(e){var t=e.name;return _t()(t)||bt()(t)},At=function(e){var t=e.mode,n=e.target;return _t()(t)?_t()(n):bt()(n)},Mt=function(e){var t=e.mode;return _t()(t)||["add","wrap"].some((function(e){return e===t}))},Dt=function(e){var t=e.mapStateToProps;return _t()(t)||kt()(t)||Ot()(t)},Nt=function(e){var t=e.mapDispatchToProps;return _t()(t)||kt()(t)||Ot()(t)||Et()(t)},Lt=function(e){var t=e.reducers;return _t()(t)||Et()(t)&&jt()(t).every(Ot.a)};function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zt(Object(n),!0).forEach((function(t){Ft(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(e){return function(e){if(Array.isArray(e))return Ht(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ht(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ht(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vt(e){var t=function(e){var t=[],n=[];return e.forEach((function(e){Array.isArray(e)?e.every((function(e){return Pt(e)}))?n.push.apply(n,Wt(e)):t.push.apply(t,Wt(e)):Pt(e)?n.push(e):t.push(e)})),{invalidPlugins:t,validPlugins:n}}(e),n=t.validPlugins;return function(e){e.forEach((function(e){return console.log("Mirador: Plugin ".concat(e.name," is not valid and was rejected."))}))}(t.invalidPlugins),n}function Ut(e){return e&&e.reduce((function(e,t){return Bt(Bt({},e),t.reducers)}),{})}function qt(e){return e&&e.reduce((function(e,t){return mt()(e,t.config||{})}),{})}function Gt(e){return e&&e.filter((function(e){return e.saga})).map((function(e){return e.saga}))}function Kt(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var $t=Kt();$t.withExtraArgument=Kt;var Zt=$t,Xt=function(e){return"@@redux-saga/"+e},Qt=Xt("CANCEL_PROMISE"),Yt=Xt("CHANNEL_END"),Jt=Xt("IO"),en=Xt("MATCH"),tn=Xt("MULTICAST"),nn=Xt("SAGA_ACTION"),rn=Xt("SELF_CANCELLATION"),on=Xt("TASK"),an=Xt("TASK_CANCEL"),sn=Xt("TERMINATE"),cn=Xt("LOCATION"),un=n(1),ln=n(58),fn=function(e){return null==e},dn=function(e){return null!=e},pn=function(e){return"function"==typeof e},hn=function(e){return"string"==typeof e},gn=Array.isArray,vn=function(e){return e&&pn(e.then)},mn=function(e){return e&&pn(e.next)&&pn(e.throw)},yn=function e(t){return t&&(hn(t)||_n(t)||pn(t)||gn(t)&&t.every(e))},bn=function(e){return e&&pn(e.take)&&pn(e.close)},wn=function(e){return pn(e)&&e.hasOwnProperty("toString")},_n=function(e){return Boolean(e)&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype};var xn=function(e,t){var n;void 0===t&&(t=!0);var r=new Promise((function(r){n=setTimeout(r,e,t)}));return r[Qt]=function(){clearTimeout(n)},r},On=function(e){return function(){return e}}(!0),Sn=function(){};var En=function(e){return e};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var Cn=function(e,t){Object(un.a)(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(n){e[n]=t[n]}))};function kn(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function Tn(e){var t=!1;return function(){t||(t=!0,e())}}var jn=function(e){throw e},Pn=function(e){return{value:e,done:!0}};function In(e,t,n){void 0===t&&(t=jn),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:Pn,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function Rn(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var An=function(e){return Array.apply(null,new Array(e))},Mn=function(e){return function(t){return e(Object.defineProperty(t,nn,{value:!0}))}},Dn=function(e){return e===sn},Nn=function(e){return e===an},Ln=function(e){return Dn(e)||Nn(e)};function zn(e,t){var n=Object.keys(e),r=n.length;var i,o=0,a=gn(e)?An(r):{},s={};return n.forEach((function(e){var n=function(n,s){i||(s||Ln(n)?(t.cancel(),t(n,s)):(a[e]=n,++o===r&&(i=!0,t(a))))};n.cancel=Sn,s[e]=n})),t.cancel=function(){i||(i=!0,n.forEach((function(e){return s[e].cancel()})))},s}function Bn(e){return{name:e.name||"anonymous",location:Fn(e)}}function Fn(e){return e[cn]}function Wn(e,t){void 0===e&&(e=10);var n=new Array(e),r=0,i=0,o=0,a=function(t){n[i]=t,i=(i+1)%e,r++},s=function(){if(0!=r){var t=n[o];return n[o]=null,r--,o=(o+1)%e,t}},c=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){var u;if(r<e)a(s);else switch(t){case 1:throw new Error("Channel's Buffer overflow!");case 3:n[i]=s,o=i=(i+1)%e;break;case 4:u=2*e,n=c(),r=n.length,i=n.length,o=0,n.length=u,e=u,a(s)}},take:s,flush:c}}var Hn=function(e){return Wn(e,4)},Vn=function(e,t){var n;return(n={})[Jt]=!0,n.combinator=!1,n.type=e,n.payload=t,n},Un=function(e){return Vn("FORK",Object(un.a)({},e.payload,{detached:!0}))};function qn(e,t){return void 0===e&&(e="*"),yn(e)?Vn("TAKE",{pattern:e}):bn(n=e)&&n[tn]&&dn(t)&&yn(t)?Vn("TAKE",{channel:e,pattern:t}):bn(e)?Vn("TAKE",{channel:e}):void 0;var n}function Gn(e,t){return fn(t)&&(t=e,e=void 0),Vn("PUT",{channel:e,action:t})}function Kn(e){var t=Vn("ALL",e);return t.combinator=!0,t}function $n(e,t){var n,r=null;return pn(e)?n=e:(gn(e)?(r=e[0],n=e[1]):(r=e.context,n=e.fn),r&&hn(n)&&pn(r[n])&&(n=r[n])),{context:r,fn:n,args:t}}function Zn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Vn("CALL",$n(e,n))}function Xn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Vn("FORK",$n(e,n))}function Qn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Un(Xn.apply(void 0,[e].concat(n)))}function Yn(e){void 0===e&&(e=En);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Vn("SELECT",{selector:e,args:n})}var Jn=Zn.bind(null,xn);function er(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}var tr=er,nr=[],rr=0;function ir(e){try{sr(),e()}finally{cr()}}function or(e){nr.push(e),rr||(sr(),ur())}function ar(e){try{return sr(),e()}finally{ur()}}function sr(){rr++}function cr(){rr--}function ur(){var e;for(cr();!rr&&void 0!==(e=nr.shift());)ir(e)}var lr=function(e){return function(t){return e.some((function(e){return gr(e)(t)}))}},fr=function(e){return function(t){return e(t)}},dr=function(e){return function(t){return t.type===String(e)}},pr=function(e){return function(t){return t.type===e}},hr=function(){return On};function gr(e){var t="*"===e?hr:hn(e)?dr:gn(e)?lr:wn(e)?dr:pn(e)?fr:_n(e)?pr:null;if(null===t)throw new Error("invalid pattern: "+e);return t(e)}var vr={type:Yt},mr=function(e){return e&&e.type===Yt};function yr(e){void 0===e&&(e=Hn());var t=!1,n=[];return{take:function(r){t&&e.isEmpty()?r(vr):e.isEmpty()?(n.push(r),r.cancel=function(){kn(n,r)}):r(e.take())},put:function(r){if(!t){if(0===n.length)return e.put(r);n.shift()(r)}},flush:function(n){t&&e.isEmpty()?n(vr):n(e.flush())},close:function(){if(!t){t=!0;var e=n;n=[];for(var r=0,i=e.length;r<i;r++){(0,e[r])(vr)}}}}}function br(){var e,t,n,r,i,o,a=(t=!1,r=n=[],i=function(){r===n&&(r=n.slice())},o=function(){t=!0;var e=n=r;r=[],e.forEach((function(e){e(vr)}))},(e={})[tn]=!0,e.put=function(e){if(!t)if(mr(e))o();else for(var i=n=r,a=0,s=i.length;a<s;a++){var c=i[a];c[en](e)&&(c.cancel(),c(e))}},e.take=function(e,n){void 0===n&&(n=hr),t?e(vr):(e[en]=n,i(),r.push(e),e.cancel=Tn((function(){i(),kn(r,e)})))},e.close=o,e),s=a.put;return a.put=function(e){e[nn]?s(e):or((function(){s(e)}))},a}function wr(e,t){var n=e[Qt];pn(n)&&(t.cancel=n),e.then(t,(function(e){t(e,!0)}))}var _r,xr=0,Or=function(){return++xr};function Sr(e){e.isRunning()&&e.cancel()}var Er=((_r={}).TAKE=function(e,t,n){var r=t.channel,i=void 0===r?e.channel:r,o=t.pattern,a=t.maybe,s=function(e){e instanceof Error?n(e,!0):!mr(e)||a?n(e):n(sn)};try{i.take(s,dn(o)?gr(o):null)}catch(e){return void n(e,!0)}n.cancel=s.cancel},_r.PUT=function(e,t,n){var r=t.channel,i=t.action,o=t.resolve;or((function(){var t;try{t=(r?r.put:e.dispatch)(i)}catch(e){return void n(e,!0)}o&&vn(t)?wr(t,n):n(t)}))},_r.ALL=function(e,t,n,r){var i=r.digestEffect,o=xr,a=Object.keys(t);if(0!==a.length){var s=zn(t,n);a.forEach((function(e){i(t[e],o,s[e],e)}))}else n(gn(t)?[]:{})},_r.RACE=function(e,t,n,r){var i=r.digestEffect,o=xr,a=Object.keys(t),s=gn(t)?An(a.length):{},c={},u=!1;a.forEach((function(e){var t=function(t,r){u||(r||Ln(t)?(n.cancel(),n(t,r)):(n.cancel(),u=!0,s[e]=t,n(s)))};t.cancel=Sn,c[e]=t})),n.cancel=function(){u||(u=!0,a.forEach((function(e){return c[e].cancel()})))},a.forEach((function(e){u||i(t[e],o,c[e],e)}))},_r.CALL=function(e,t,n,r){var i=t.context,o=t.fn,a=t.args,s=r.task;try{var c=o.apply(i,a);if(vn(c))return void wr(c,n);if(mn(c))return void Ar(e,c,s.context,xr,Bn(o),!1,n);n(c)}catch(e){n(e,!0)}},_r.CPS=function(e,t,n){var r=t.context,i=t.fn,o=t.args;try{var a=function(e,t){fn(e)?n(t):n(e,!0)};i.apply(r,o.concat(a)),a.cancel&&(n.cancel=a.cancel)}catch(e){n(e,!0)}},_r.FORK=function(e,t,n,r){var i=t.context,o=t.fn,a=t.args,s=t.detached,c=r.task,u=function(e){var t=e.context,n=e.fn,r=e.args;try{var i=n.apply(t,r);if(mn(i))return i;var o=!1;return In((function(e){return o?{value:e,done:!0}:(o=!0,{value:i,done:!vn(i)})}))}catch(e){return In((function(){throw e}))}}({context:i,fn:o,args:a}),l=function(e,t){return e.isSagaIterator?{name:e.meta.name}:Bn(t)}(u,o);ar((function(){var t=Ar(e,u,c.context,xr,l,s,void 0);s?n(t):t.isRunning()?(c.queue.addTask(t),n(t)):t.isAborted()?c.queue.abort(t.error()):n(t)}))},_r.JOIN=function(e,t,n,r){var i=r.task,o=function(e,t){if(e.isRunning()){var n={task:i,cb:t};t.cancel=function(){e.isRunning()&&kn(e.joiners,n)},e.joiners.push(n)}else e.isAborted()?t(e.error(),!0):t(e.result())};if(gn(t)){if(0===t.length)return void n([]);var a=zn(t,n);t.forEach((function(e,t){o(e,a[t])}))}else o(t,n)},_r.CANCEL=function(e,t,n,r){var i=r.task;t===rn?Sr(i):gn(t)?t.forEach(Sr):Sr(t),n()},_r.SELECT=function(e,t,n){var r=t.selector,i=t.args;try{n(r.apply(void 0,[e.getState()].concat(i)))}catch(e){n(e,!0)}},_r.ACTION_CHANNEL=function(e,t,n){var r=t.pattern,i=yr(t.buffer),o=gr(r),a=function t(n){mr(n)||e.channel.take(t,o),i.put(n)},s=i.close;i.close=function(){a.cancel(),s()},e.channel.take(a,o),n(i)},_r.CANCELLED=function(e,t,n,r){n(r.task.isCancelled())},_r.FLUSH=function(e,t,n){t.flush(n)},_r.GET_CONTEXT=function(e,t,n,r){n(r.task.context[t])},_r.SET_CONTEXT=function(e,t,n,r){var i=r.task;Cn(i.context,t),n()},_r);function Cr(e,t){return e+"?"+t}function kr(e){var t=e.name,n=e.location;return n?t+" "+Cr(n.fileName,n.lineNumber):t}var Tr=null,jr=[],Pr=function(){Tr=null,jr.length=0},Ir=function(){var e,t,n,r,i,o,a,s=jr[0],c=jr.slice(1),u=s.crashedEffect?(e=s.crashedEffect,(t=Fn(e))?t.code+" "+Cr(t.fileName,t.lineNumber):""):null;return["The above error occurred in task "+kr(s.meta)+(u?" \n when executing effect "+u:"")].concat(c.map((function(e){return" created by "+kr(e.meta)})),[(n=jr,r=function(e){return e.cancelledTasks},i=n,a=(o=[]).concat.apply(o,i.map(r)),a.length?["Tasks cancelled due to error:"].concat(a).join("\n"):"")]).join("\n")};function Rr(e,t,n,r,i,o,a){var s;void 0===a&&(a=Sn);var c,u,l=0,f=null,d=[],p=Object.create(n),h=function(e,t,n){var r,i=[],o=!1;function a(e){t(),c(),n(e,!0)}function s(t){i.push(t),t.cont=function(s,c){o||(kn(i,t),t.cont=Sn,c?a(s):(t===e&&(r=s),i.length||(o=!0,n(r))))}}function c(){o||(o=!0,i.forEach((function(e){e.cont=Sn,e.cancel()})),i=[])}return s(e),{addTask:s,cancelAll:c,abort:a,getTasks:function(){return i}}}(t,(function(){d.push.apply(d,h.getTasks().map((function(e){return e.meta.name})))}),g);function g(t,n){if(n){if(l=2,(o={meta:i,cancelledTasks:d}).crashedEffect=Tr,jr.push(o),v.isRoot){var r=Ir();Pr(),e.onError(t,{sagaStack:r})}u=t,f&&f.reject(t)}else t===an?l=1:1!==l&&(l=3),c=t,f&&f.resolve(t);var o;v.cont(t,n),v.joiners.forEach((function(e){e.cb(t,n)})),v.joiners=null}var v=((s={})[on]=!0,s.id=r,s.meta=i,s.isRoot=o,s.context=p,s.joiners=[],s.queue=h,s.cancel=function(){0===l&&(l=1,h.cancelAll(),g(an,!1))},s.cont=a,s.end=g,s.setContext=function(e){Cn(p,e)},s.toPromise=function(){return f||(f=tr(),2===l?f.reject(u):0!==l&&f.resolve(c)),f.promise},s.isRunning=function(){return 0===l},s.isCancelled=function(){return 1===l||0===l&&1===t.status},s.isAborted=function(){return 2===l},s.result=function(){return c},s.error=function(){return u},s);return v}function Ar(e,t,n,r,i,o,a){var s=e.finalizeRunEffect((function(t,n,r){if(vn(t))wr(t,r);else if(mn(t))Ar(e,t,u.context,n,i,!1,r);else if(t&&t[Jt]){(0,Er[t.type])(e,t.payload,r,l)}else r(t)}));f.cancel=Sn;var c={meta:i,cancel:function(){0===c.status&&(c.status=1,f(an))},status:0},u=Rr(e,c,n,r,i,o,a),l={task:u,digestEffect:d};return a&&(a.cancel=u.cancel),f(),u;function f(e,n){try{var i;n?(i=t.throw(e),Pr()):Nn(e)?(c.status=1,f.cancel(),i=pn(t.return)?t.return(an):{done:!0,value:an}):i=Dn(e)?pn(t.return)?t.return():{done:!0}:t.next(e),i.done?(1!==c.status&&(c.status=3),c.cont(i.value)):d(i.value,r,f)}catch(e){if(1===c.status)throw e;c.status=2,c.cont(e,!0)}}function d(t,n,r,i){void 0===i&&(i="");var o,a=Or();function c(n,i){o||(o=!0,r.cancel=Sn,e.sagaMonitor&&(i?e.sagaMonitor.effectRejected(a,n):e.sagaMonitor.effectResolved(a,n)),i&&function(e){Tr=e}(t),r(n,i))}e.sagaMonitor&&e.sagaMonitor.effectTriggered({effectId:a,parentEffectId:n,label:i,effect:t}),c.cancel=Sn,r.cancel=function(){o||(o=!0,c.cancel(),c.cancel=Sn,e.sagaMonitor&&e.sagaMonitor.effectCancelled(a))},s(t,a,c)}}function Mr(e,t){var n=e.channel,r=void 0===n?br():n,i=e.dispatch,o=e.getState,a=e.context,s=void 0===a?{}:a,c=e.sagaMonitor,u=e.effectMiddlewares,l=e.onError,f=void 0===l?Rn:l;for(var d=arguments.length,p=new Array(d>2?d-2:0),h=2;h<d;h++)p[h-2]=arguments[h];var g=t.apply(void 0,p);var v,m=Or();if(c&&(c.rootSagaStarted=c.rootSagaStarted||Sn,c.effectTriggered=c.effectTriggered||Sn,c.effectResolved=c.effectResolved||Sn,c.effectRejected=c.effectRejected||Sn,c.effectCancelled=c.effectCancelled||Sn,c.actionDispatched=c.actionDispatched||Sn,c.rootSagaStarted({effectId:m,saga:t,args:p})),u){var y=O.compose.apply(void 0,u);v=function(e){return function(t,n,r){return y((function(t){return e(t,n,r)}))(t)}}}else v=En;var b={channel:r,dispatch:Mn(i),getState:o,sagaMonitor:c,onError:f,finalizeRunEffect:v};return ar((function(){var e=Ar(b,g,s,m,Bn(t),!0,void 0);return c&&c.effectResolved(m,e),e}))}var Dr=function(e){var t,n=void 0===e?{}:e,r=n.context,i=void 0===r?{}:r,o=n.channel,a=void 0===o?br():o,s=n.sagaMonitor,c=Object(ln.a)(n,["context","channel","sagaMonitor"]);function u(e){var n=e.getState,r=e.dispatch;return t=Mr.bind(null,Object(un.a)({},c,{context:i,channel:a,dispatch:r,getState:n,sagaMonitor:s})),function(e){return function(t){s&&s.actionDispatched&&s.actionDispatched(t);var n=e(t);return a.put(t),n}}}return u.run=function(){return t.apply(void 0,arguments)},u.setContext=function(e){Cn(i,e)},u},Nr=n(698),Lr=n(63),zr=n.n(Lr),Br=n(6);function Fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(n),!0).forEach((function(t){Hr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.RESOLVE_AUTHENTICATION_REQUEST:return Wr(Wr({},e),{},Hr({},t.tokenServiceId,{authId:t.id,id:t.tokenServiceId,isFetching:!0}));case Br.a.REQUEST_ACCESS_TOKEN:return Wr(Wr({},e),{},Hr({},t.serviceId,{authId:t.authId,id:t.serviceId,isFetching:!0}));case Br.a.RECEIVE_ACCESS_TOKEN:return Wr(Wr({},e),{},Hr({},t.serviceId,Wr(Wr({},e[t.serviceId]),{},{isFetching:!1,json:t.json})));case Br.a.RECEIVE_ACCESS_TOKEN_FAILURE:return Wr(Wr({},e),{},Hr({},t.serviceId,Wr(Wr({},e[t.serviceId]),{},{error:t.error,isFetching:!1})));case Br.a.RESET_AUTHENTICATION_STATE:return zr()(e,t.tokenServiceId);case Br.a.RECEIVE_INFO_RESPONSE:return t.tokenServiceId?e[t.tokenServiceId].success?e:Wr(Wr({},e),{},Hr({},t.tokenServiceId,Wr(Wr({},e[t.tokenServiceId]),{},{success:!0}))):e;default:return e}}function Ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ur(Object(n),!0).forEach((function(t){Gr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ur(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.REQUEST_ANNOTATION:return qr(qr({},e),{},Gr({},t.targetId,qr(qr({},e[t.targetId]),{},Gr({},t.annotationId,{id:t.annotationId,isFetching:!0}))));case Br.a.RECEIVE_ANNOTATION:return qr(qr({},e),{},Gr({},t.targetId,qr(qr({},e[t.targetId]),{},Gr({},t.annotationId,{id:t.annotationId,isFetching:!1,json:t.annotationJson}))));case Br.a.RECEIVE_ANNOTATION_FAILURE:return qr(qr({},e),{},Gr({},t.targetId,qr(qr({},e[t.targetId]),{},Gr({},t.annotationId,{error:t.error,id:t.annotationId,isFetching:!1}))));case Br.a.IMPORT_MIRADOR_STATE:return{};default:return e}};function $r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(n),!0).forEach((function(t){Xr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.ADD_AUTHENTICATION_REQUEST:return Zr(Zr({},e),{},Xr({},t.id,{id:t.id,isFetching:!0,profile:t.profile,windowId:t.windowId}));case Br.a.RESOLVE_AUTHENTICATION_REQUEST:return Zr(Zr({},e),{},Xr({},t.id,Zr(Zr({},e[t.id]),{},{isFetching:!1,ok:t.ok})));case Br.a.RECEIVE_ACCESS_TOKEN:return t.authId?Zr(Zr({},e),{},Xr({},t.authId,Zr(Zr({},e[t.authId]),{},{ok:!0}))):e;case Br.a.RESET_AUTHENTICATION_STATE:return zr()(e,t.id);default:return e}};function Yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yr(Object(n),!0).forEach((function(t){ei(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ei(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ti(e){return function(e){if(Array.isArray(e))return ni(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ni(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ni(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ni(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ri=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.ADD_RESOURCE:return e.some((function(e){return e.manifestId===t.manifestId}))?e:[Jr({manifestId:t.manifestId},t.payload)].concat(ti(e));case Br.a.ADD_WINDOW:return e.some((function(e){return e.manifestId===t.window.manifestId}))?e:[{manifestId:t.window.manifestId}].concat(ti(e));case Br.a.UPDATE_WINDOW:return t.payload.manifestId?e.some((function(e){return e.manifestId===t.payload.manifestId}))?e:[{manifestId:t.payload.manifestId}].concat(ti(e)):e;case Br.a.REMOVE_RESOURCE:return e.filter((function(e){return e.manifestId!==t.manifestId}));case Br.a.IMPORT_CONFIG:return t.config.catalog||[];case Br.a.IMPORT_MIRADOR_STATE:return t.state.catalog||[];default:return e}},ii=n(251),oi=n.n(ii),ai=n(153),si=n.n(ai);function ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ci(Object(n),!0).forEach((function(t){li(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function li(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.ADD_COMPANION_WINDOW:return oi()([t.id],t.payload,e);case Br.a.ADD_WINDOW:return ui(ui({},e),(t.companionWindows||[]).reduce((function(n,r){return n[r.id]=ui(ui(ui({},e[r.id]),r),{},{windowId:t.id}),n}),{}));case Br.a.REMOVE_WINDOW:return Object.keys(e).reduce((function(n,r){return e[r].windowId!==t.windowId&&(n[r]=e[r]),n}),{});case Br.a.UPDATE_COMPANION_WINDOW:return si()([t.id],(function(e){return ui(ui({},e||{}),t.payload)}),e);case Br.a.REMOVE_COMPANION_WINDOW:return zr()(e,t.id);case Br.a.IMPORT_MIRADOR_STATE:return t.state.companionWindows||[];case Br.a.TOGGLE_TOC_NODE:return si()([t.id,"tocNodes"],(function(e){return ui(ui({},e||{}),t.payload)}),e);default:return e}}var di=n(103);function pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gi=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pi(Object(n),!0).forEach((function(t){hi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},di.a),vi=function(e,t,n){return t},mi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.UPDATE_CONFIG:case Br.a.IMPORT_CONFIG:return mt()(e,t.config,{arrayMerge:vi});case Br.a.SET_CONFIG:return t.config;case Br.a.IMPORT_MIRADOR_STATE:return t.state.config||{};default:return e}};function yi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yi(Object(n),!0).forEach((function(t){wi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.ADD_WINDOW:return bi(bi({},e),{},wi({},t.window.id,bi({windowId:t.window.id},t.elasticLayout)));case Br.a.UPDATE_ELASTIC_WINDOW_LAYOUT:return si()([t.windowId],(function(e){return bi(bi({},e||{}),t.payload)}),e);case Br.a.REMOVE_WINDOW:return zr()(e,t.windowId);case Br.a.IMPORT_MIRADOR_STATE:return t.state.elasticLayout||{};default:return e}},xi=n(326),Oi=n.n(xi);function Si(e){return function(e){if(Array.isArray(e))return Ei(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ei(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ei(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ei(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ki(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ci(Object(n),!0).forEach((function(t){Ti(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ti(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ji={items:[]},Pi=function(){var e,t,n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ji,o=arguments.length>1?arguments[1]:void 0;switch(o.type){case Br.a.ADD_ERROR:return ki(ki({},i),{},(Ti(e={},o.id,{id:o.id,message:o.message}),Ti(e,"items",[].concat(Si(i.items),[o.id])),e));case Br.a.RECEIVE_INFO_RESPONSE_FAILURE:return ki(ki({},i),{},(Ti(t={},o.infoId,{id:o.infoId,message:o.error}),Ti(t,"items",[].concat(Si(i.items),[o.infoId])),t));case Br.a.RECEIVE_SEARCH_FAILURE:return ki(ki({},i),{},(Ti(n={},o.searchId,{id:o.searchId,message:o.error}),Ti(n,"items",[].concat(Si(i.items),[o.searchId])),n));case Br.a.REMOVE_ERROR:return(r=Object.keys(i).reduce((function(e,t){return t!==o.id&&(e[t]=i[t]),e}),{})).items=Oi()(r.items,o.id),r;case Br.a.IMPORT_MIRADOR_STATE:return ji;default:return i}};function Ii(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ri(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ii(Object(n),!0).forEach((function(t){Ai(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ai(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.REQUEST_INFO_RESPONSE:return Ri(Ri({},e),{},Ai({},t.infoId,{id:t.infoId,isFetching:!0}));case Br.a.RECEIVE_INFO_RESPONSE:return Ri(Ri({},e),{},Ai({},t.infoId,{degraded:!1,id:t.infoId,isFetching:!1,json:t.infoJson,tokenServiceId:t.tokenServiceId}));case Br.a.RECEIVE_DEGRADED_INFO_RESPONSE:return Ri(Ri({},e),{},Ai({},t.infoId,{degraded:!0,id:t.infoId,isFetching:!1,json:t.infoJson,tokenServiceId:t.tokenServiceId}));case Br.a.RECEIVE_INFO_RESPONSE_FAILURE:return Ri(Ri({},e),{},Ai({},t.infoId,{error:t.error,id:t.infoId,isFetching:!1,tokenServiceId:t.tokenServiceId}));case Br.a.REMOVE_INFO_RESPONSE:return Object.keys(e).reduce((function(n,r){return r!==t.infoId&&(n[r]=e[r]),n}),{});case Br.a.IMPORT_MIRADOR_STATE:return{};default:return e}};function Di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ni(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Di(Object(n),!0).forEach((function(t){Li(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Di(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Li(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.UPDATE_LAYERS:return Ni(Ni({},e),{},Li({},t.windowId,Ni(Ni({},e[t.windowId]),{},Li({},t.canvasId,mt()((e[t.windowId]||{})[t.canvasId]||{},t.payload)))));case Br.a.REMOVE_WINDOW:return zr()(e,[t.windowId]);default:return e}};function Bi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bi(Object(n),!0).forEach((function(t){Wi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.REQUEST_MANIFEST:return Fi(Wi({},t.manifestId,Fi(Fi(Fi({},e[t.manifestId]),t.properties),{},{id:t.manifestId})),zr()(e,t.manifestId));case Br.a.RECEIVE_MANIFEST:return Fi(Fi({},e),{},Wi({},t.manifestId,Fi(Fi({},e[t.manifestId]),{},{error:null,id:t.manifestId,isFetching:!1,json:t.manifestJson})));case Br.a.RECEIVE_MANIFEST_FAILURE:return Fi(Fi({},e),{},Wi({},t.manifestId,Fi(Fi({},e[t.manifestId]),{},{error:t.error,id:t.manifestId,isFetching:!1})));case Br.a.REMOVE_MANIFEST:return Object.keys(e).reduce((function(n,r){return r!==t.manifestId&&(n[r]=e[r]),n}),{});case Br.a.IMPORT_MIRADOR_STATE:return t.state.manifests||{};default:return e}},Vi=n(29),Ui=n.n(Vi);function qi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qi(Object(n),!0).forEach((function(t){Ki(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ki(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=(e[t.windowId]||{})[t.companionWindowId]||{};switch(t.type){case Br.a.REQUEST_SEARCH:return n.query!==t.query?Gi(Gi({},e),{},Ki({},t.windowId,Gi(Gi({},e[t.windowId]),{},Ki({},t.companionWindowId,Gi(Gi({},n),{},{data:Ki({},t.searchId,{isFetching:!0}),query:t.query,selectedContentSearchAnnotation:[]}))))):Gi(Gi({},e),{},Ki({},t.windowId,Gi(Gi({},e[t.windowId]),{},Ki({},t.companionWindowId,Gi(Gi({},n),{},{data:Gi(Gi({},n.data),{},Ki({},t.searchId,{isFetching:!0}))})))));case Br.a.RECEIVE_SEARCH:return Gi(Gi({},e),{},Ki({},t.windowId,Gi(Gi({},e[t.windowId]),{},Ki({},t.companionWindowId,Gi(Gi({},n),{},{data:Gi(Gi({},n.data),{},Ki({},t.searchId,{isFetching:!1,json:t.searchJson}))})))));case Br.a.RECEIVE_SEARCH_FAILURE:return Gi(Gi({},e),{},Ki({},t.windowId,Gi(Gi({},e[t.windowId]),{},Ki({},t.companionWindowId,Gi(Gi({},n),{},{data:Gi(Gi({},n.data),{},Ki({},t.searchId,{error:t.error,isFetching:!1}))})))));case Br.a.REMOVE_SEARCH:return Gi(Gi({},e),{},Ki({},t.windowId,Object.keys(e[t.windowId]).reduce((function(n,r){return r!==t.companionWindowId&&(n[r]=e[t.windowId][r]),n}),{})));case Br.a.SET_CONTENT_SEARCH_CURRENT_ANNOTATIONS:return Gi(Gi({},e),{},Ki({},t.windowId,Gi(Gi({},e[t.windowId]),{},Ki({},t.companionWindowId,Gi(Gi({},n),{},{selectedContentSearchAnnotationIds:t.annotationIds})))));case Br.a.SELECT_ANNOTATION:return e[t.windowId]?Gi(Gi({},e),{},Ki({},t.windowId,Object.keys(e[t.windowId]).reduce((function(n,r){var i=e[t.windowId][r],o=i.data&&Object.values(i.data).filter((function(e){return e.json&&e.json.resources})).some((function(e){return Ui()([e.json.resources]).some((function(e){return e["@id"]===t.annotationId}))}));return n[r]=o?Gi(Gi({},i),{},{selectedContentSearchAnnotationIds:[t.annotationId]}):i,n}),{}))):e;case Br.a.IMPORT_MIRADOR_STATE:return{};case Br.a.REMOVE_WINDOW:return zr()(e,t.windowId);case Br.a.REMOVE_COMPANION_WINDOW:return e[t.windowId]?Gi(Gi({},e),{},Ki({},t.windowId,Gi({},zr()(e[t.windowId],t.id)))):e;default:return e}};function Zi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zi(Object(n),!0).forEach((function(t){Qi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.UPDATE_VIEWPORT:return Xi(Xi({},e),{},Qi({},t.windowId,Xi(Xi({},e[t.windowId]),t.payload)));case Br.a.REMOVE_WINDOW:return zr()(e,t.windowId);case Br.a.SET_WINDOW_VIEW_TYPE:return oi()([t.windowId],null,e);case Br.a.SET_CANVAS:return t.preserveViewport?e:oi()([t.windowId],null,e);case Br.a.IMPORT_MIRADOR_STATE:return t.state.viewers||{};default:return e}};function Ji(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ji(Object(n),!0).forEach((function(t){to(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ji(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function to(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var no=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Br.a.ADD_WINDOW:return eo(eo({},e),{},to({},t.window.id,t.window));case Br.a.MAXIMIZE_WINDOW:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{maximized:!0})));case Br.a.MINIMIZE_WINDOW:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{maximized:!1})));case Br.a.UPDATE_WINDOW:return si()([t.id],(function(e){return eo(eo({},e||{}),t.payload)}),e);case Br.a.REMOVE_WINDOW:return zr()(e,[t.windowId]);case Br.a.TOGGLE_WINDOW_SIDE_BAR:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{sideBarOpen:!e[t.windowId].sideBarOpen})));case Br.a.SET_WINDOW_VIEW_TYPE:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{view:t.viewType})));case Br.a.UPDATE_WINDOW_POSITION:return eo(eo({},e),{},to({},t.payload.windowId,eo(eo({},e[t.payload.windowId]),{},{x:t.payload.position.x,y:t.payload.position.y})));case Br.a.SET_WINDOW_SIZE:return eo(eo({},e),{},to({},t.payload.windowId,eo(eo({},e[t.payload.windowId]),{},{height:t.payload.size.height,width:t.payload.size.width,x:t.payload.size.x,y:t.payload.size.y})));case Br.a.SET_CANVAS:return e[t.windowId]?si()([t.windowId],(function(e){return eo(eo({},e||{}),{},{canvasId:t.canvasId,visibleCanvases:t.visibleCanvases||[]})}),e):e;case Br.a.ADD_COMPANION_WINDOW:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{companionWindowIds:e[t.windowId].companionWindowIds.concat([t.id])},"left"===t.payload.position?{companionAreaOpen:!0,sideBarPanel:t.payload.content}:{})));case Br.a.UPDATE_COMPANION_WINDOW:return"left"!==t.payload.position?e:eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{companionAreaOpen:!0})));case Br.a.REMOVE_COMPANION_WINDOW:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{companionWindowIds:e[t.windowId].companionWindowIds.filter((function(e){return e!==t.id}))})));case Br.a.SELECT_ANNOTATION:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{selectedAnnotationId:t.annotationId})));case Br.a.DESELECT_ANNOTATION:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{selectedAnnotationId:void 0})));case Br.a.HOVER_ANNOTATION:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{hoveredAnnotationIds:t.annotationIds})));case Br.a.TOGGLE_ANNOTATION_DISPLAY:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{highlightAllAnnotations:!e[t.windowId].highlightAllAnnotations})));case Br.a.IMPORT_MIRADOR_STATE:return t.state.windows||[];case Br.a.REQUEST_SEARCH:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{suggestedSearches:void 0})));case Br.a.SHOW_COLLECTION_DIALOG:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{collectionDialogOn:!0,collectionManifestId:t.manifestId,collectionPath:t.collectionPath})));case Br.a.HIDE_COLLECTION_DIALOG:return eo(eo({},e),{},to({},t.windowId,eo(eo({},e[t.windowId]),{},{collectionDialogOn:!1})));default:return e}};function ro(e){return function(e){if(Array.isArray(e))return io(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return io(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return io(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function io(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ao(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oo(Object(n),!0).forEach((function(t){so(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function so(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function co(e){return void 0!==e.x&&void 0!==e.y&&void 0!==e.width&&void 0!==e.height}function uo(e,t){return t.x-t.width/2>e.x-e.width/2&&t.y-t.height/2>e.y-e.height/2&&t.x+t.width/2<e.x+e.width/2&&t.y+t.height/2<e.y+e.height/2}var lo=function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ao(ao({},di.a.workspace),{},{windowIds:[]}),i=arguments.length>1?arguments[1]:void 0;switch(i.type){case Br.a.UPDATE_WORKSPACE:return ao(ao({},r),i.config);case Br.a.FOCUS_WINDOW:return ao(ao({},r),{},{focusedWindowId:i.windowId,viewportPosition:ao(ao({},r.viewportPosition),i.position)});case Br.a.ADD_WINDOW:return ao(ao({},r),{},{focusedWindowId:i.window.id,windowIds:[].concat(ro(r.windowIds||[]),[i.window.id])});case Br.a.REMOVE_WINDOW:return n=(r.windowIds||[]).filter((function(e){return e!==i.windowId})),ao(ao({},r),{},{focusedWindowId:i.windowId===r.focusedWindowId?n[n.length-1]:r.focusedWindowId,windowIds:n});case Br.a.SET_WORKSPACE_FULLSCREEN:return ao(ao({},r),{},{isFullscreenEnabled:i.isFullscreenEnabled});case Br.a.TOGGLE_ZOOM_CONTROLS:return ao(ao({},r),{},{showZoomControls:i.showZoomControls});case Br.a.UPDATE_WORKSPACE_MOSAIC_LAYOUT:return ao(ao({},r),{},{layout:i.layout});case Br.a.SET_WORKSPACE_ADD_VISIBILITY:return ao(ao({},r),{},{isWorkspaceAddVisible:i.isWorkspaceAddVisible});case Br.a.SET_WORKSPACE_VIEWPORT_POSITION:return e={},co(t=ao(ao({},r.viewportPosition),i.payload.position))&&!uo({height:r.height,width:r.width,x:0,y:0},t)&&(e={height:2*r.height,width:2*r.width}),ao(ao(ao({},r),e),{},{viewportPosition:t});case Br.a.SET_CONFIG:case Br.a.IMPORT_CONFIG:case Br.a.UPDATE_CONFIG:return ao(ao({},r),i.config.workspace);case Br.a.IMPORT_MIRADOR_STATE:return i.state.workspace||{};case Br.a.TOGGLE_DRAGGING:return ao(ao({},r),{},{draggingEnabled:!r.draggingEnabled});default:return r}};function fo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ho(e){return Object(O.combineReducers)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fo(Object(n),!0).forEach((function(t){po(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({accessTokens:Vr,annotations:Kr,auth:Qr,catalog:ri,companionWindows:fi,config:mi,elasticLayout:_i,errors:Pi,infoResponses:Mi,layers:zi,manifests:Hi,searches:$i,viewers:Yi,windows:no,workspace:lo},e))}var go=n(15),vo=n.n(go),mo=function(e){return{done:!0,value:e}},yo={};function bo(e){return bn(e)?"channel":wn(e)?String(e):pn(e)?e.name:String(e)}function wo(e,t,n){var r,i,o,a=t;function s(t,n){if(a===yo)return mo(t);if(n&&!i)throw a=yo,n;r&&r(t);var s=n?e[i](n):e[a]();return a=s.nextState,o=s.effect,r=s.stateUpdater,i=s.errorState,a===yo?mo(t):o}return In(s,(function(e){return s(null,e)}),n)}function _o(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o,a={done:!1,value:qn(e)},s=function(e){return{done:!1,value:Xn.apply(void 0,[t].concat(r,[e]))}},c=function(e){return o=e};return wo({q1:function(){return{nextState:"q2",effect:a,stateUpdater:c}},q2:function(){return{nextState:"q1",effect:s(o)}}},"q1","takeEvery("+bo(e)+", "+t.name+")")}function xo(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return Xn.apply(void 0,[_o,e,t].concat(r))}var Oo=n(126),So=n(453),Eo=n.n(So),Co=n(35),ko=n(155),To=n.n(ko),jo=n(556),Po=n(557),Io=n(563),Ro=n(560),Ao=n(567),Mo=n(45),Do=n(38);function No(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?No(Object(n),!0).forEach((function(t){zo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):No(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bo=vo.a.mark(Xo),Fo=vo.a.mark(Qo),Wo=vo.a.mark(Yo),Ho=vo.a.mark(Jo),Vo=vo.a.mark(ea),Uo=vo.a.mark(ta),qo=vo.a.mark(na),Go=vo.a.mark(ra),Ko=vo.a.mark(ia),$o=vo.a.mark(oa);function Zo(e,t,n){var r=n.success,i=n.degraded,o=n.failure;return Eo()(e,t).then((function(e){return e.json().then((function(t){return 401===e.status?(i||r)({json:t,response:e}):e.ok?r({json:t,response:e}):o({error:e.statusText,json:t,response:e})})).catch((function(t){return o({error:t,response:e})}))})).catch((function(e){return o({error:e})}))}function Xo(e,t,n){var r,i,o,a,s,c,u,l,f,d;return vo.a.wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return r=n.success,i=n.degraded,o=n.failure,p.next=3,Yn(C.e);case 3:return a=p.sent,s=a.preprocessors,c=void 0===s?[]:s,u=a.postprocessors,l=void 0===u?[]:u,p.prev=8,f=c.reduce((function(t,n){return n(e,t)||t}),t),p.next=12,Zn(Zo,e,f,{degraded:i,failure:o,success:r});case 12:return d=p.sent,d=l.reduce((function(t,n){return n(e,t)||t}),d),p.abrupt("return",d);case 17:return p.prev=17,p.t0=p.catch(8),p.abrupt("return",o({error:p.t0}));case 20:case"end":return p.stop()}}),Bo,null,[[8,17]])}function Qo(e,t,n,r){var i,o,a,s,c,u,l,f,d,p,h,g;return vo.a.wrap((function(v){for(;;)switch(v.prev=v.next){case 0:if(i=r.degraded,o=r.failure,a=r.success,s=Lo({},n),!t){v.next=8;break}return v.next=5,Zn(Jo,t);case 5:u=v.sent,c=u&&u.id,u&&u.json&&(s.headers=Lo({Authorization:"Bearer ".concat(u.json.accessToken)},n.headers));case 8:return v.next=10,Zn(Xo,e,s,{failure:function(e){return e},success:function(e){return e}});case 10:if(l=v.sent,f=l.error,d=l.json,p=l.response,!f){v.next=18;break}return v.next=17,Gn(o({error:f,json:d,response:p,tokenServiceId:c}));case 17:return v.abrupt("return");case 18:if(h=d["@id"]||d.id,!p.ok){v.next=26;break}if(To()(h,{stripAuthentication:!1})!==To()(e.replace(/info\.json$/,""),{stripAuthentication:!1})){v.next=24;break}return v.next=23,Gn(a({json:d,response:p,tokenServiceId:c}));case 23:return v.abrupt("return");case 24:v.next=30;break;case 26:if(401===p.status){v.next=30;break}return v.next=29,Gn(o({error:f,json:d,response:p,tokenServiceId:c}));case 29:return v.abrupt("return");case 30:return v.next=32,Zn(Jo,d);case 32:if(!(g=v.sent)||g.id===c){v.next=37;break}return v.next=36,Zn(Qo,e,d,n,{degraded:i,failure:o,success:a});case 36:return v.abrupt("return");case 37:return v.next=39,Gn((i||a)({json:d,response:p,tokenServiceId:c}));case 39:case"end":return v.stop()}}),Fo)}function Yo(e){var t,n,r;return vo.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.manifestId,n={failure:function(e){var n=e.error;e.json,e.response;return Object(jo.c)(t,"object"==typeof n?String(n):n)},success:function(e){var n=e.json;e.response;return Object(jo.b)(t,n)}},i.next=4,Zn(Xo,t,{},n);case 4:return r=i.sent,i.next=7,Gn(r);case 7:case"end":return i.stop()}}),Wo)}function Jo(e){var t,n,r,i,o,a,s;return vo.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(t=e&&e.__jsonld?e:Lo(Lo({},e),{},{options:{}}),0!==(n=Co.d.getServices(t).filter((function(e){return e.getProfile().match(/http:\/\/iiif.io\/api\/auth\//)}))).length){c.next=4;break}return c.abrupt("return",void 0);case 4:return c.next=6,Yn(Ao.a);case 6:if(r=c.sent){c.next=9;break}return c.abrupt("return",void 0);case 9:i=0;case 10:if(!(i<n.length)){c.next=19;break}if(o=n[i],a=Co.d.getService(o,"http://iiif.io/api/auth/1/token")||Co.d.getService(o,"http://iiif.io/api/auth/0/token"),!(s=a&&r[a.id])||!s.json){c.next=16;break}return c.abrupt("return",s);case 16:i+=1,c.next=10;break;case 19:return c.abrupt("return",void 0);case 20:case"end":return c.stop()}}),Ho)}function ea(e){var t,n,r,i,o;return vo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=e.imageResource,n=e.infoId,r=e.windowId,i=t){a.next=6;break}return a.next=5,Yn(Mo.selectInfoResponse,{infoId:n});case 5:i=a.sent;case 6:return o={degraded:function(e){var t=e.json,i=e.response,o=e.tokenServiceId;return Object(Po.b)(n,t,i.ok,o,r)},failure:function(e){var t=e.error,r=(e.json,e.response,e.tokenServiceId);return Object(Po.d)(n,t,r)},success:function(e){var t=e.json,r=e.response,i=e.tokenServiceId;return Object(Po.c)(n,t,r.ok,i)}},a.next=9,Zn(Qo,"".concat(n.replace(/\/$/,""),"/info.json"),i,{},o);case 9:case"end":return a.stop()}}),Vo)}function ta(e){var t,n,r,i,o;return vo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.windowId,n=e.companionWindowId,e.query,r=e.searchId,i={failure:function(e){var i=e.error;e.json,e.response;return Object(Io.c)(t,n,r,i)},success:function(e){var i=e.json;e.response;return Object(Io.b)(t,n,r,i)}},a.next=4,Zn(Xo,r,{},i);case 4:return o=a.sent,a.next=7,Gn(o);case 7:case"end":return a.stop()}}),Uo)}function na(e){var t,n,r,i;return vo.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.targetId,n=e.annotationId,r={failure:function(e){var r=e.error;e.json,e.response;return Object(Ro.d)(t,n,r)},success:function(e){var r=e.json;e.response;return Object(Ro.c)(t,n,r)}},o.next=4,Zn(Xo,n,{},r);case 4:return i=o.sent,o.next=7,Gn(i);case 7:case"end":return o.stop()}}),qo)}function ra(e){var t,n;return vo.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=e.manifestId,!(n=e.manifestJson)){r.next=5;break}return r.next=4,Gn(Object(jo.b)(t,n));case 4:return r.abrupt("return");case 5:if(t){r.next=7;break}return r.abrupt("return");case 7:return r.next=9,Yn(Do.c)||{};case 9:if(r.sent[t]){r.next=12;break}return r.delegateYield(Yo({manifestId:t}),"t0",12);case 12:case"end":return r.stop()}}),Go)}function ia(){var e,t,n,r=arguments;return vo.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Yn(Do.c);case 2:e=i.sent,t=0;case 4:if(!(t<r.length)){i.next=12;break}if(n=t<0||r.length<=t?void 0:r[t],e[n]){i.next=9;break}return i.next=9,Zn(Yo,{manifestId:n});case 9:t+=1,i.next=4;break;case 12:case"end":return i.stop()}}),Ko)}function oa(){return vo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kn([xo(Br.a.REQUEST_MANIFEST,Yo),xo(Br.a.REQUEST_INFO_RESPONSE,ea),xo(Br.a.REQUEST_SEARCH,ta),xo(Br.a.REQUEST_ANNOTATION,na),xo(Br.a.ADD_RESOURCE,ra)]);case 2:case"end":return e.stop()}}),$o)}var aa=n(328),sa=n(48),ca=n(558),ua=n(555),la=n(90),fa=n(148),da=n(566),pa=n(206),ha=vo.a.mark(Pa),ga=vo.a.mark(Ia),va=vo.a.mark(Ra),ma=vo.a.mark(Aa),ya=vo.a.mark(Ma),ba=vo.a.mark(Da),wa=vo.a.mark(La),_a=vo.a.mark(za),xa=vo.a.mark(Ba),Oa=vo.a.mark(Fa),Sa=vo.a.mark(Wa),Ea=vo.a.mark(Ha),Ca=vo.a.mark(Va),ka=vo.a.mark(Ua);function Ta(e){return function(e){if(Array.isArray(e))return ja(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ja(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ja(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pa(e){var t,n,r,i;return vo.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=e.payload||e.window,n=t.collectionPath,r=t.id,i=t.manifestId){o.next=3;break}return o.abrupt("return");case 3:if(!e.manifest){o.next=8;break}return o.next=6,Gn(Object(jo.b)(i,e.manifest));case 6:o.next=10;break;case 8:return o.next=10,Zn.apply(void 0,[ia,i].concat(Ta(n||[])));case 10:return o.next=12,Zn(Ma,e);case 12:return o.next=14,Zn(Da,e);case 14:if(n){o.next=17;break}return o.next=17,Zn(Ra,{manifestId:i,windowId:e.id||e.window.id});case 17:return o.next=19,Zn(Va,i,r);case 19:case"end":return o.stop()}}),ha)}function Ia(e){var t,n,r;return vo.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=e.id,e&&e.payload&&e.payload.sequenceId){i.next=3;break}return i.abrupt("return");case 3:return i.next=5,Yn(Mo.getCanvases,{windowId:t});case 5:if((n=i.sent)&&n[0]&&n[0].id){i.next=8;break}return i.abrupt("return");case 8:return i.next=10,Zn(ca.a,t,n[0].id);case 10:return r=i.sent,i.next=13,Gn(r);case 13:case"end":return i.stop()}}),ga)}function Ra(e){var t,n,r,i,o;return vo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.manifestId,n=e.windowId,a.next=3,Yn(la.q,{manifestId:t});case 3:if(!(r=a.sent)){a.next=10;break}if(i=r.getProperty("partOf"),!(o=Array.isArray(i)?i[0]:i)||!o.id){a.next=10;break}return a.next=10,Gn(Object(ua.l)(n,{collectionPath:[o.id]}));case 10:case"end":return a.stop()}}),va)}function Aa(e){var t;return vo.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.payload.collectionPath){n.next=3;break}return n.abrupt("return");case 3:return n.next=5,Zn.apply(void 0,[ia].concat(Ta(t)));case 5:case"end":return n.stop()}}),ma)}function Ma(e){var t,n,r,i,o,a,s,c,u,l;return vo.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:if(t=e.payload||e.window,n=t.canvasId,r=t.canvasIndex,i=t.manifestId,o=e.id||e.window.id,!n){f.next=10;break}return f.next=5,Zn(ca.a,o,n,null,{preserveViewport:!!e.payload});case 5:return a=f.sent,f.next=8,Gn(a);case 8:f.next=22;break;case 10:return f.next=12,Yn(la.q,{manifestId:i});case 12:if(!(s=f.sent)){f.next=22;break}if(c=new aa.a(s),!(u=c.startCanvas||c.canvasAt(r||0)||c.canvasAt(0))){f.next=22;break}return f.next=19,Zn(ca.a,o,u.id);case 19:return l=f.sent,f.next=22,Gn(l);case 22:case"end":return f.stop()}}),ya)}function Da(e){var t,n,r,i,o,a,s;return vo.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(e.window&&e.window.defaultSearchQuery){c.next=2;break}return c.abrupt("return");case 2:return t=e.window,n=t.id,r=t.defaultSearchQuery,c.next=5,Yn(la.l,{windowId:n});case 5:return i=c.sent,c.next=8,Yn(fa.getCompanionWindowIdsForPosition,{position:"left",windowId:n});case 8:if(o=c.sent,a=o[0],!i||!a){c.next=14;break}return s=i&&"".concat(i.id,"?q=").concat(r),c.next=14,Gn(Object(Io.a)(n,a,s,r));case 14:case"end":return c.stop()}}),ba)}function Na(e,t){var n=t.canvasIds,r=t.companionWindowIds,i=t.windowId;return r.reduce((function(t,r){var o=Object(da.e)(e,{companionWindowId:r,windowId:i}).resources.find((function(e){return n.includes(e.targetId)}));return o&&(t[r]=[o.id]),t}),{})}function La(e){var t,n,r,i,o;return vo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e.annotationId,t=e.windowId,n=e.visibleCanvases,a.next=3,Yn(da.g,{windowId:t});case 3:if(r=a.sent,0!==(i=Object.keys(r||{})).length){a.next=7;break}return a.abrupt("return");case 7:return a.next=9,Yn(Na,{canvasIds:n,companionWindowIds:i,windowId:t});case 9:return o=a.sent,a.next=12,Kn(Object.keys(o).map((function(e){return Gn(Object(Io.f)(t,e,o[e]))})));case 12:if(!(Object.values(o).length>0)){a.next=15;break}return a.next=15,Gn(Object(Ro.g)(t,Object.values(o)[0][0]));case 15:case"end":return a.stop()}}),wa)}function za(e){var t,n,r,i,o,a,s,c,u,l,f,d;return vo.a.wrap((function(p){for(;;)switch(p.prev=p.next){case 0:if(t=e.pan,n=e.windowId,t){p.next=3;break}return p.abrupt("return");case 3:return p.next=5,Yn(k.a);case 5:return r=p.sent,i=r[n]||{},o=i.x,a=i.y,s=i.width,c=i.height,p.next=9,Yn(Do.i);case 9:return u=p.sent,l=u.viewportPosition,f=l.width,d=l.height,p.next=15,Gn(Object(E.d)({x:o+s/2-f/2,y:a+c/2-d/2}));case 15:case"end":return p.stop()}}),_a)}function Ba(e){var t,n,r,i;return vo.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.windowId,o.next=3,Yn(Do.e,{windowId:t});case 3:return n=o.sent,r=n.canvasId,o.next=7,Yn(Mo.getCanvasGrouping,{canvasId:r,windowId:t});case 7:return i=o.sent,o.next=10,Gn(Object(ua.l)(t,{visibleCanvases:(i||[]).map((function(e){return e.id}))}));case 10:case"end":return o.stop()}}),xa)}function Fa(e){var t,n,r,i;return vo.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.companionWindowId,n=e.windowId,o.next=3,Yn(pa.c,{windowId:n});case 3:if(r=o.sent,r.switchCanvasOnSearch){o.next=7;break}return o.abrupt("return");case 7:return o.next=9,Yn(da.k,{companionWindowId:t,windowId:n});case 9:if(0===o.sent.length){o.next=12;break}return o.abrupt("return");case 12:return o.next=14,Yn(da.l,{companionWindowId:t,windowId:n});case 14:if((i=o.sent)&&0!==i.length){o.next=17;break}return o.abrupt("return");case 17:return o.next=19,Gn(Object(Ro.g)(n,i[0].id));case 19:case"end":return o.stop()}}),Oa)}function Wa(e){var t,n,r,i,o;return vo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.annotationId,n=e.windowId,a.next=3,Yn(Mo.getVisibleCanvasIds,{windowId:n});case 3:return r=a.sent,a.next=6,Yn(da.a,{annotationId:t,windowId:n});case 6:if((i=a.sent)&&!r.includes(i.id)){a.next=9;break}return a.abrupt("return");case 9:return a.next=11,Zn(ca.a,n,i.id);case 11:return o=a.sent,a.next=14,Gn(o);case 14:case"end":return a.stop()}}),Sa)}function Ha(e){var t,n,r,i,o;return vo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.visibleCanvases,n=e.windowId,a.next=3,Yn(Mo.getCanvases,{windowId:n});case 3:return r=a.sent,a.next=6,Yn(Mo.selectInfoResponses);case 6:return i=a.sent,o=(r||[]).filter((function(e){return t.includes(e.id)})),a.next=10,Kn(o.map((function(e){return Kn(new sa.a(e).iiifImageResources.map((function(e){return!i[e.getServices()[0].id]&&Gn(Object(Po.a)({imageResource:e,windowId:n}))})).filter(Boolean))})));case 10:case"end":return a.stop()}}),Ea)}function Va(e,t){var n;return vo.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Yn(la.q,{manifestId:e});case 2:if(!(n=r.sent)||!n.isCollection()){r.next=6;break}return r.next=6,Gn(Object(ua.j)(e,[],t));case 6:case"end":return r.stop()}}),Ca)}function Ua(){return vo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kn([xo(Br.a.ADD_WINDOW,Pa),xo(Br.a.UPDATE_WINDOW,Pa),xo(Br.a.UPDATE_WINDOW,Ia),xo(Br.a.SET_CANVAS,La),xo(Br.a.SET_CANVAS,Ha),xo(Br.a.UPDATE_COMPANION_WINDOW,Aa),xo(Br.a.SET_WINDOW_VIEW_TYPE,Ba),xo(Br.a.RECEIVE_SEARCH,Fa),xo(Br.a.SELECT_ANNOTATION,Wa),xo(Br.a.FOCUS_WINDOW,za)]);case 2:case"end":return e.stop()}}),ka)}function qa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ga(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qa(Object(n),!0).forEach((function(t){Ka(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ka(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $a=vo.a.mark(ns),Za=vo.a.mark(rs),Xa=vo.a.mark(is),Qa=vo.a.mark(os);function Ya(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||es(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ja(e){return function(e){if(Array.isArray(e))return ts(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||es(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function es(e,t){if(e){if("string"==typeof e)return ts(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ts(e,t):void 0}}function ts(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ns(e){return vo.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Kn([].concat(Ja(Object.entries(e.state.windows||{}).map((function(e){var t=Ya(e,2),n=(t[0],t[1]);return Zn(Pa,{id:n.id,payload:n})}))),Ja(Object.entries(e.state.manifests||{}).filter((function(e){var t=Ya(e,2);t[0];return!t[1].json})).map((function(e){var t=Ya(e,2);t[0];return Zn(ia,t[1].id)})))));case 2:case"end":return t.stop()}}),$a)}function rs(e){var t,n,r,i;return vo.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=e.config,n=t.thumbnailNavigation,(r=t.windows)&&0!==r.length){o.next=3;break}return o.abrupt("return");case 3:return o.next=5,Kn(r.map((function(e){var t="window-".concat(Object(Oo.a)()),r=e.manifestId||e.loadedManifest;return Zn(ua.a,Ga({id:t,manifestId:r,thumbnailNavigationPosition:n&&n.defaultPosition},e))})));case 5:return i=o.sent,o.next=8,Kn(i.map((function(e){return Gn(e)})));case 8:case"end":return o.stop()}}),Za)}function is(e){var t,n;return vo.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.collectionPath,n=e.manifestId,r.next=3,Zn.apply(void 0,[ia,n].concat(Ja(t)));case 3:case"end":return r.stop()}}),Xa)}function os(){return vo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kn([xo(Br.a.IMPORT_MIRADOR_STATE,ns),xo(Br.a.IMPORT_CONFIG,rs),xo(Br.a.SHOW_COLLECTION_DIALOG,is)]);case 2:case"end":return e.stop()}}),Qa)}var as=n(667),ss=vo.a.mark(ds),cs=vo.a.mark(ps),us=vo.a.mark(hs);function ls(e){return function(e){if(Array.isArray(e))return fs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return fs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fs(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ds(e){var t,n,r,i,o;return vo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.canvasId,n=e.windowId,a.next=3,Yn(Mo.getCanvas,{canvasId:t,windowId:n});case 3:return r=a.sent,a.next=6,Yn(as.c);case 6:return i=a.sent,o=new sa.a(r),a.next=10,Kn([].concat(ls(o.annotationListUris.filter((function(e){return!(i[r.id]&&i[r.id][e])})).map((function(e){return Gn(Object(Ro.e)(r.id,e))}))),ls(o.canvasAnnotationPages.filter((function(e){return!(i[r.id]&&i[r.id][e.id])})).map((function(e){return e.items?Gn(Object(Ro.c)(r.id,e.id,e)):Gn(Object(Ro.e)(r.id,e.id))})))));case 10:return a.abrupt("return",a.sent);case 11:case"end":return a.stop()}}),ss)}function ps(e){var t,n,r;return vo.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.visibleCanvases,n=void 0===t?[]:t,r=e.windowId,i.next=3,Kn(n.map((function(e){return Gn(Object(Ro.f)(r,e))})));case 3:return i.abrupt("return",i.sent);case 4:case"end":return i.stop()}}),cs)}function hs(){return vo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kn([xo(Br.a.REQUEST_CANVAS_ANNOTATIONS,ds),xo(Br.a.SET_CANVAS,ps)]);case 2:case"end":return e.stop()}}),us)}var gs=n(561),vs=vo.a.mark(xs),ms=vo.a.mark(Os),ys=vo.a.mark(Ss),bs=vo.a.mark(Es),ws=vo.a.mark(Cs),_s=vo.a.mark(ks);function xs(e){var t;return vo.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.tokenServiceId,n.next=3,Jn(2e3);case 3:return n.next=5,Zn(Os,{serviceId:t});case 5:case"end":return n.stop()}}),vs)}function Os(e){var t,n,r,i,o,a,s;return vo.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.serviceId,c.next=3,Yn(Do.h);case 3:return n=c.sent,c.next=6,Kn(Object.keys(n).map((function(e){return Yn(Mo.getVisibleCanvases,{windowId:e})})));case 6:return r=c.sent,i=Ui()(Ui()(r).map((function(e){return new sa.a(e).imageServiceIds}))),c.next=10,Yn(Mo.selectInfoResponses);case 10:return o=c.sent,a=function(e){return Co.d.getServices(e).some((function(e){var n=Co.d.getService(e,"http://iiif.io/api/auth/1/token")||Co.d.getService(e,"http://iiif.io/api/auth/0/token");return n&&n.id===t}))},s=Object.values(o).filter((function(e){return e.json&&a(e.json)})),c.next=15,Kn(s.map((function(e){var t=e.id;return i.includes(t)?Zn(ea,{infoId:t}):Gn({infoId:t,type:Br.a.REMOVE_INFO_RESPONSE})})));case 15:case"end":return c.stop()}}),ms)}function Ss(e){var t,n,r,i,o,a,s,c,u,l;return vo.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return t=e.infoJson,n=e.windowId,f.next=3,Yn(Ao.b);case 3:return r=f.sent,f.next=6,Yn(C.a);case 6:if(i=f.sent,o=i.auth,a=(o=void 0===o?{}:o).serviceProfiles,s=(void 0===a?[]:a).filter((function(e){return e.external||e.kiosk})),c=Co.d.getServices(t).filter((function(e){return!r[e.id]})).find((function(e){return s.some((function(t){return t.profile===e.getProfile()}))}))){f.next=14;break}return f.abrupt("return");case 14:if(!(u=s.find((function(e){return e.profile===c.getProfile()}))).kiosk){f.next=20;break}return f.next=18,Gn(Object(gs.a)(n,c.id,c.getProfile()));case 18:f.next=28;break;case 20:if(!u.external){f.next=28;break}if(l=Co.d.getService(c,"http://iiif.io/api/auth/1/token")||Co.d.getService(c,"http://iiif.io/api/auth/0/token")){f.next=24;break}return f.abrupt("return");case 24:return f.next=26,Gn(Object(gs.g)(c.id,l.id));case 26:return f.next=28,Gn(Object(gs.d)(l.id,c.id));case 28:case"end":return f.stop()}}),ys)}function Es(e){var t,n,r,i,o;return vo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=e.infoJson,e.windowId,n=e.tokenServiceId){a.next=3;break}return a.abrupt("return");case 3:if(r=Co.d.getServices(t).find((function(e){var t=Co.d.getService(e,"http://iiif.io/api/auth/1/token")||Co.d.getService(e,"http://iiif.io/api/auth/0/token");return t&&t.id===n}))){a.next=6;break}return a.abrupt("return");case 6:return a.next=8,Yn(Ao.a);case 8:if(i=a.sent,(o=i[n])&&o.success){a.next=12;break}return a.abrupt("return");case 12:return a.next=14,Gn(Object(gs.d)(n,r.id));case 14:case"end":return a.stop()}}),bs)}function Cs(e){var t,n,r,i,o;return vo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.serviceId,a.next=3,Yn(Ao.a);case 3:return n=a.sent,a.next=6,Yn(Ao.b);case 6:if(r=a.sent,i=n[t]){a.next=10;break}return a.abrupt("return");case 10:if(o=r[i.authId]){a.next=13;break}return a.abrupt("return");case 13:if(!i.success){a.next=18;break}return a.next=16,Gn(Object(gs.e)({authServiceId:o.id,tokenServiceId:i.id}));case 16:a.next=20;break;case 18:return a.next=20,Gn(Object(gs.g)(o.id,i.id,{ok:!1}));case 20:case"end":return a.stop()}}),ws)}function ks(){return vo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kn([xo(Br.a.RECEIVE_DEGRADED_INFO_RESPONSE,Es),xo(Br.a.RECEIVE_ACCESS_TOKEN_FAILURE,Cs),xo(Br.a.RECEIVE_DEGRADED_INFO_RESPONSE,Ss),xo(Br.a.RECEIVE_ACCESS_TOKEN,Os),xo(Br.a.RESET_AUTHENTICATION_STATE,xs)]);case 2:case"end":return e.stop()}}),_s)}function Ts(e){return function(e){if(Array.isArray(e))return js(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return js(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return js(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function js(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ps=vo.a.mark(Is);function Is(e){return vo.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=1,t.next=4,Zn(e);case 4:return t.abrupt("break",12);case 7:t.prev=7,t.t0=t.catch(1),console.log(t.t0);case 10:t.next=0;break;case 12:case"end":return t.stop()}}),Ps,null,[[1,7]])}var Rs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return vo.a.mark((function t(){var n;return vo.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[hs,os,oa,Ua,ks].concat(Ts(e)),t.next=3,Kn(n.map((function(e){return Qn(Is,e)})));case 3:case"end":return t.stop()}}),t)}))};function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ms=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=ho(e),r=di.a.state.slice?Object(O.combineReducers)(As({},di.a.state.slice,n)):n,i=Dr(),o=Object(O.createStore)(r,Object(Nr.composeWithDevTools)(Object(O.applyMiddleware)(Zt,i)));return i.run(Rs(t)),o},Ds=n(320);var Ns=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Vt(t),r=Ms(Ut(n),Gt(n));return r.dispatch(Object(Ds.a)(mt()(qt(n),e))),r};function Ls(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Bs=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ls(this,e),this.plugins=Vt(n.plugins||[]),this.config=t,this.store=n.store||Ns(this.config,this.plugins),t.id&&c.a.render(this.render(),document.getElementById(t.id))}var t,n,r;return t=e,(n=[{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a.a.createElement(u.a,{store:this.store},a.a.createElement(gt,Object.assign({plugins:this.plugins},e)))}},{key:"unmount",value:function(){this.config.id&&c.a.unmountComponentAtNode(document.getElementById(this.config.id))}}])&&zs(t.prototype,n),r&&zs(t,r),e}();var Fs={viewer:function(e,t){var n;return n=Array.isArray(t)?{plugins:t}:t,new Bs(e,n)}},Ws=n(26),Hs=n(18),Vs={actions:Ws,createStore:Ms,reducers:i,sagas:r,selectors:Hs};function Us(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Us(Object(n),!0).forEach((function(t){Gs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Us(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ks=qs(qs({},Fs),Vs),$s=n(669),Zs=n.n($s),Xs=(n(670),n(671)),Qs=n.n(Xs),Ys=(n(2),n(577)),Js=n(578),ec=n(579),tc=n(686),nc=n.n(tc),rc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function ic(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oc(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var ac=function(e){function t(){return ic(this,t),oc(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.openDialogAndCloseMenu=function(){var e=this.props,t=e.handleClose;(0,e.openDownloadDialog)(),t()},t.prototype.render=function(){var e=this;return a.a.createElement(a.a.Fragment,null,a.a.createElement(ec.a,{onClick:function(){return e.openDialogAndCloseMenu()}},a.a.createElement(Ys.a,null,a.a.createElement(nc.a,null)),a.a.createElement(Js.a,{primaryTypographyProps:{variant:"body1"}},"Download")))},t}(o.Component);ac.propTypes={},ac.defaultProps={handleClose:function(){},openDownloadDialog:function(){}};var sc={target:"WindowTopBarPluginMenu",mode:"add",name:"MiradorDownloadPlugin",component:ac,mapDispatchToProps:function(e,t){var n=t.windowId;return{openDownloadDialog:function(){return e({type:"OPEN_WINDOW_DIALOG",windowId:n,dialogType:"download"})}}},reducers:{windowDialogs:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1];return"OPEN_WINDOW_DIALOG"===r.type?rc({},n,((e={})[r.windowId]={openDialog:r.dialogType},e)):"CLOSE_WINDOW_DIALOG"===r.type?rc({},n,((t={})[r.windowId]={openDialog:null},t)):n}}},cc=n(5),uc=n(571),lc=n(572),fc=n(573),dc=n(576),pc=n(96),hc=n(137),gc=n(1162),vc=n(1124),mc=n(1125),yc=n(687),bc=n.n(yc),wc=n(245);function _c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xc(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var Oc=function(e){function t(){return _c(this,t),xc(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props.rendering;return a.a.createElement(mc.a,{disableGutters:!0,divider:!0,key:e.id},a.a.createElement(Js.a,{primaryTypographyProps:{variant:"body1"}},a.a.createElement(gc.a,{href:e.id,rel:"noopener noreferrer",target:"_blank",variant:"body1"},e.getLabel().getValue()),e.getFormat()&&e.getFormat().value&&" ("+e.getFormat().value+")"))},t}(o.Component);function Sc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ec(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Oc.propTypes={};var Cc=function(e){function t(){return Sc(this,t),Ec(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.zoomedImageLabel=function(){var e=this.currentBounds();return"Zoomed region ("+Math.floor(e.width)+" x "+Math.floor(e.height)+"px)"},t.prototype.fullImageLabel=function(){var e=this.props.canvas;return"Whole image ("+e.getWidth()+" x "+e.getHeight()+"px)"},t.prototype.smallImageLabel=function(){var e=this.props.canvas;return"Whole image (1000 x "+Math.floor(1e3*e.getHeight()/e.getWidth())+"px)"},t.prototype.zoomedImageUrl=function(){var e=this.props.canvas,t=this.currentBounds();return e.getCanonicalImageUri().replace(/\/full\/.*\/0\//,"/"+t.x+","+t.y+","+t.width+","+t.height+"/full/0/")+"?download=true"},t.prototype.imageUrlForSize=function(e){return this.props.canvas.getCanonicalImageUri(e.width)+"?download=true"},t.prototype.fullImageUrl=function(){return this.props.canvas.getCanonicalImageUri().replace(/\/full\/.*\/0\//,"/full/full/0/")+"?download=true"},t.prototype.thousandPixelWideImage=function(){return this.props.canvas.getCanonicalImageUri("1000")+"?download=true"},t.prototype.osdViewport=function(){var e=this.props.windowId;return wc.OSDReferences.get(e).current.viewport},t.prototype.currentBounds=function(){var e=this.osdViewport().getBounds();return Object.keys(e).reduce((function(t,n){return t[n]=Math.ceil(e[n]),t}),{})},t.prototype.definedSizesRestrictsDownload=function(){var e=this.props.infoResponse;if(!e.json)return!1;var t=e.json,n=t.height,r=t.width;return 1===this.definedSizes().length&&(this.definedSizes()[0].width<=r&&this.definedSizes()[0].height<=n)},t.prototype.displayCurrentZoomLink=function(){var e=this.props,t=e.restrictDownloadOnSizeDefinition,n=e.infoResponse;if("single"!==e.viewType)return!1;if(t&&this.definedSizesRestrictsDownload())return!1;if(!n||!n.json)return!1;var r=this.currentBounds();return r.height<n.json.height&&r.width<n.json.width&&r.x>=0&&r.y>=0},t.prototype.definedSizes=function(){var e=this.props.infoResponse;return e&&e.json&&e.json.sizes?bc()(e.json.sizes,(function(e){return""+e.width+e.height})):[]},t.prototype.fullImageLink=function(){return a.a.createElement(mc.a,{disableGutters:!0,divider:!0,key:this.fullImageUrl()},a.a.createElement(gc.a,{href:this.fullImageUrl(),rel:"noopener noreferrer",target:"_blank",variant:"body1"},this.fullImageLabel()))},t.prototype.thousandPixelWideLink=function(){return this.props.canvas.getWidth()<1e3?"":a.a.createElement(mc.a,{disableGutters:!0,divider:!0,key:this.thousandPixelWideImage()},a.a.createElement(gc.a,{href:this.thousandPixelWideImage(),rel:"noopener noreferrer",target:"_blank",variant:"body1"},this.smallImageLabel()))},t.prototype.linksForDefinedSizes=function(){var e=this;return this.definedSizes().map((function(t){return a.a.createElement(mc.a,{disableGutters:!0,divider:!0,key:""+t.width+t.height},a.a.createElement(gc.a,{href:e.imageUrlForSize(t),rel:"noopener noreferrer",target:"_blank",variant:"body1"},"Whole image ("+t.width+" x "+t.height+"px)"))}))},t.prototype.render=function(){var e=this.props,t=e.canvas,n=e.canvasLabel,r=e.classes;return a.a.createElement(a.a.Fragment,null,a.a.createElement(pc.a,{noWrap:!0,variant:"h3",className:r.h3},n),a.a.createElement(vc.a,null,this.displayCurrentZoomLink()&&a.a.createElement(mc.a,{disableGutters:!0,divider:!0},a.a.createElement(gc.a,{href:this.zoomedImageUrl(),rel:"noopener noreferrer",target:"_blank",variant:"body1"},this.zoomedImageLabel())),0===this.definedSizes().length&&[this.fullImageLink(),this.thousandPixelWideLink()],this.definedSizes().length>0&&this.linksForDefinedSizes(),t.getRenderings().map((function(e){return a.a.createElement(Oc,{rendering:e,key:e.id})}))))},t}(o.Component);function kc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tc(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Cc.propTypes={};var jc=function(e){function t(){return kc(this,t),Tc(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.classes,n=e.renderings;return a.a.createElement(a.a.Fragment,null,a.a.createElement(pc.a,{variant:"h3",className:t.h3},"Other download options"),a.a.createElement(vc.a,null,n.map((function(e){return a.a.createElement(Oc,{rendering:e,key:e.id})}))))},t}(o.Component);function Pc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ic(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}jc.propTypes={};var Rc=function(e){function t(){return Pc(this,t),Ic(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.renderings=function(){var e=this.props.manifest;return e&&e.getSequences()&&e.getSequences()[0]&&e.getSequences()[0].getRenderings()?e.getSequences()[0].getRenderings():[]},t.prototype.render=function(){var e=this.props,t=e.canvases,n=e.canvasLabel,r=e.classes,i=e.closeDialog,o=e.containerId,s=e.infoResponse,c=e.open,u=e.restrictDownloadOnSizeDefinition,l=e.viewType,f=e.windowId;return c?a.a.createElement(a.a.Fragment,null,a.a.createElement(lc.a,{container:document.querySelector("#"+o+" .mirador-viewer"),disableEnforceFocus:!0,onClose:i,open:c,scroll:"paper",fullWidth:!0,maxWidth:"xs"},a.a.createElement(dc.a,{disableTypography:!0,className:r.h2},a.a.createElement(pc.a,{variant:"h2"},"Download")),a.a.createElement(hc.a,null,t.map((function(e){return a.a.createElement(Cc,{canvas:e,canvasLabel:n(e.id),classes:r,infoResponse:s(e.id),restrictDownloadOnSizeDefinition:u,key:e.id,viewType:l,windowId:f})})),this.renderings().length>0&&a.a.createElement(jc,{classes:r,renderings:this.renderings()})),a.a.createElement(fc.a,null,a.a.createElement(uc.a,{onClick:i,color:"primary"},"Close")))):""},t}(o.Component);Rc.propTypes={},Rc.defaultProps={canvases:[],manifest:{},open:!1,restrictDownloadOnSizeDefinition:!1};var Ac=[sc,{target:"Window",mode:"add",name:"MiradorDownloadDialog",component:Object(cc.a)((function(){return{h2:{paddingBottom:0},h3:{marginTop:"20px"}}}))(Rc),mapDispatchToProps:function(e,t){var n=t.windowId;return{closeDialog:function(){return e({type:"CLOSE_WINDOW_DIALOG",windowId:n})}}},mapStateToProps:function(e,t){var n=t.windowId;return{canvases:Object(Mo.getVisibleCanvases)(e,{windowId:n}),canvasLabel:function(t){return Object(Mo.getCanvasLabel)(e,{canvasId:t,windowId:n})},containerId:Object(C.b)(e),infoResponse:function(t){return Object(Mo.selectInfoResponse)(e,{windowId:n,canvasId:t})||{}},manifest:Object(la.q)(e,{windowId:n}),restrictDownloadOnSizeDefinition:e.config.miradorDownloadPlugin&&e.config.miradorDownloadPlugin.restrictDownloadOnSizeDefinition,open:e.windowDialogs[n]&&"download"===e.windowDialogs[n].openDialog,viewType:Object(pa.f)(e,{windowId:n})}}}],Mc=n(697),Dc=n.n(Mc),Nc=n(348),Lc=n.n(Nc),zc=n(691),Bc=n.n(zc),Fc=n(694),Wc=n.n(Fc),Hc=n(693),Vc=n.n(Hc),Uc=n(692),qc=n.n(Uc),Gc=n(695),Kc=n.n(Gc),$c=n(350),Zc=n.n($c),Xc=n(122),Qc=n.n(Xc),Yc=n(696),Jc=n.n(Yc),eu=n(71),tu=n(349),nu=n.n(tu),ru=n(299),iu=n(101),ou=n(1178);var au=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.state={open:n.open},r.handleChange=r.handleChange.bind(r),r.handleClick=r.handleClick.bind(r),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.handleClick=function(){var e=this.props,t=e.value;switch(e.variant){case"toggle":this.handleChange({},0===t?100:0);break;default:this.setState((function(e){return{open:!e.open}}))}},t.prototype.handleChange=function(e,t){(0,this.props.onChange)(t)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.containerId,r=e.label,i=e.max,o=e.min,s=e.value,c=e.type,u=e.variant,l=e.windowId,f=e.foregroundColor,d=e.classes,p=e.width,h=this.state.open,g=l+"-"+c,v=void 0;return(h||"toggle"===u&&s>0)&&(v=Object(eu.fade)(f,h?.1:.25)),a.a.createElement("div",{style:{display:"inline-block"}},a.a.createElement(iu.MiradorMenuButton,{id:g+"-label","aria-label":r,containerId:n,onClick:this.handleClick,"aria-expanded":h,"aria-controls":g,style:{backgroundColor:v}},t),h&&a.a.createElement("div",{id:g,"aria-labelledby":g+"-label",className:"MuiPaper-elevation4 "+d.slider},a.a.createElement(ou.a,{orientation:["xs","sm"].indexOf(p)>=0?"horizontal":"vertical",min:o,max:i,value:s,onChange:this.handleChange})))},t}(o.Component);au.propTypes={},au.defaultProps={foregroundColor:"rgb(0, 0, 0)",min:0,max:100,open:!1,variant:"slider"};var su=Lc()(nu()((function(e){var t,n=e.palette,r=e.breakpoints;return{slider:(t={backgroundColor:Object(eu.fade)(n.shades.main,.8),borderRadius:25,top:48,marginTop:2,position:"absolute",height:150,zIndex:100,marginLeft:2,padding:[[2,7,2,7]]},t[r.down("sm")]={top:"auto",right:48,width:150,height:"auto",marginTop:-46,marginBottom:2,padding:[[4,2,4,2]]},t)}})),Object(ru.a)())(au),cu=n(689),uu=n.n(cu),lu=n(688),fu=n.n(lu),du=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function pu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hu(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var gu=function(e){function t(){return pu(this,t),hu(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.variant,r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["label","variant"]);return a.a.createElement(iu.MiradorMenuButton,du({"aria-label":t},r),"left"===n?a.a.createElement(fu.a,null):a.a.createElement(uu.a,null))},t}(o.Component);gu.propTypes={};var vu=n(690),mu=n.n(vu),yu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function bu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wu(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var _u=function(e){function t(){return bu(this,t),wu(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.flipped,n=e.label,r=e.backgroundColor,i=e.foregroundColor,o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["flipped","label","backgroundColor","foregroundColor"]);return a.a.createElement(iu.MiradorMenuButton,yu({"aria-label":n,style:{backgroundColor:t&&Object(eu.fade)(i,.25)}},o),a.a.createElement(mu.a,{style:{color:t&&r}}))},t}(o.Component);_u.propTypes={},_u.defaultProps={backgroundColor:"rgb(255, 255, 255)",foregroundColor:"rgb(0, 0, 0)"};var xu=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.toggleState=r.toggleState.bind(r),r.toggleRotate=r.toggleRotate.bind(r),r.toggleFlip=r.toggleFlip.bind(r),r.handleChange=r.handleChange.bind(r),r.handleReset=r.handleReset.bind(r),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){this.props.viewer&&this.applyFilters()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.viewConfig;t.viewer&&n!==e.viewConfig&&this.applyFilters()},t.prototype.applyFilters=function(){var e=this.props,t=e.viewConfig,n=t.brightness,r=void 0===n?100:n,i=t.contrast,o=void 0===i?100:i,a=t.saturate,s=void 0===a?100:a,c=t.grayscale,u=void 0===c?0:c,l=t.invert,f=void 0===l?0:l,d=e.viewer.canvas;if(d){var p=["brightness","contrast","saturate","grayscale","invert"],h=d.style.filter.split(" ").filter((function(e){return!p.some((function(t){return e.includes(t)}))}));h.push("brightness("+r+"%)"),h.push("contrast("+o+"%)"),h.push("saturate("+s+"%)"),h.push("grayscale("+u+"%)"),h.push("invert("+f+"%)"),d.style.filter=h.join(" ")}},t.prototype.toggleState=function(){var e=this.props,t=e.open;(0,e.updateWindow)(e.windowId,{imageToolsOpen:!t})},t.prototype.toggleRotate=function(e){var t=this.props,n=t.updateViewport,r=t.viewConfig,i=r.flip,o=void 0!==i&&i,a=r.rotation,s=void 0===a?0:a;n(t.windowId,{rotation:(s+(o?-1*e:e))%360})},t.prototype.toggleFlip=function(){var e=this.props,t=e.updateViewport,n=e.viewConfig.flip,r=void 0!==n&&n;t(e.windowId,{flip:!r})},t.prototype.handleChange=function(e){var t=this.props,n=t.updateViewport,r=t.windowId;return function(t){var i;return n(r,((i={})[e]=t,i))}},t.prototype.handleReset=function(){var e=this.props;(0,e.updateViewport)(e.windowId,{rotation:0,flip:!1,brightness:100,contrast:100,saturate:100,grayscale:0,invert:0})},t.prototype.render=function(){var e=this,t=this.props,n=t.classes,r=t.containerId,i=t.enabled,o=t.open,s=t.viewer,c=t.windowId,u=t.width,l=t.theme.palette,f=t.viewConfig,d=f.flip,p=void 0!==d&&d,h=f.brightness,g=void 0===h?100:h,v=f.contrast,m=void 0===v?100:v,y=f.saturate,b=void 0===y?100:y,w=f.grayscale,_=void 0===w?0:w,x=f.invert,O=void 0===x?0:x,S=t.t;if(!s||!i)return null;var E=l.shades.main,C=l.getContrastText(E),k=["xs","sm"].indexOf(u)>=0,T=a.a.createElement("div",{className:k&&o?n.borderContainer:""},a.a.createElement(iu.MiradorMenuButton,{"aria-label":S("collapse",{context:o?"open":"close"}),containerId:r,onClick:this.toggleState},o?a.a.createElement(Qc.a,null):a.a.createElement(Zc.a,null)));return a.a.createElement("div",{className:"MuiPaper-elevation4 "+n.root},k&&T,o&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:n.borderContainer},a.a.createElement(gu,{containerId:r,label:S("rotateRight"),onClick:function(){return e.toggleRotate(90)},variant:"right"}),a.a.createElement(gu,{containerId:r,label:S("rotateLeft"),onClick:function(){return e.toggleRotate(-90)},variant:"left"}),a.a.createElement(_u,{label:S("flip"),onClick:this.toggleFlip,flipped:p,containerId:r})),a.a.createElement("div",{className:n.borderContainer},a.a.createElement(su,{type:"brightness",label:S("brightness"),max:200,windowId:c,value:g,foregroundColor:C,containerId:r,onChange:this.handleChange("brightness")},a.a.createElement(Bc.a,null)),a.a.createElement(su,{type:"contrast",label:S("contrast"),max:200,windowId:c,value:m,foregroundColor:C,containerId:r,onChange:this.handleChange("contrast")},a.a.createElement(qc.a,{style:{transform:"rotate(180deg)"}})),a.a.createElement(su,{type:"saturate",label:S("saturation"),max:200,windowId:c,value:b,foregroundColor:C,containerId:r,onChange:this.handleChange("saturate")},a.a.createElement(Vc.a,null)),a.a.createElement(su,{type:"grayscale",variant:"toggle",label:S("greyscale"),windowId:c,value:_,backgroundColor:E,foregroundColor:C,containerId:r,onChange:this.handleChange("grayscale")},a.a.createElement(Wc.a,null)),a.a.createElement(su,{type:"invert",variant:"toggle",label:S("invert"),windowId:c,value:O,foregroundColor:C,containerId:r,onChange:this.handleChange("invert")},a.a.createElement(Kc.a,null))),a.a.createElement("div",{className:k?"":n.borderContainer},a.a.createElement(iu.MiradorMenuButton,{"aria-label":S("revert"),containerId:r,onClick:this.handleReset},a.a.createElement(Jc.a,null)))),!k&&T)},t}(o.Component);xu.propTypes={},xu.defaultProps={enabled:!0,open:!0,viewer:void 0,viewConfig:{}};var Ou=Lc()(nu()((function(e){var t,n,r=e.breakpoints,i=e.palette;console.log(i);var o=i.shades.main,a=i.getContrastText(o),s="1px solid "+Object(eu.fade)(a,.2),c="linear-gradient(to bottom, "+Object(eu.fade)(a,0)+" 20%, "+Object(eu.fade)(a,.2)+" 20% 80%, "+Object(eu.fade)(a,0)+" 80% )",u=c.replace("to bottom","to right");return{root:(t={backgroundColor:Object(eu.fade)(o,.8),borderRadius:25,position:"absolute",top:8,right:8,zIndex:999,display:"flex",flexDirection:"row"},t[r.down("sm")]={flexDirection:"column"},t),borderContainer:(n={border:0,borderRight:s,borderImageSlice:1,borderImageSource:c,display:"flex",flexDirection:"row"},n[r.down("sm")]={flexDirection:"column",borderBottom:s,borderRight:"none",borderImageSource:u},n)}})),Object(ru.a)())(xu),Su=function(e){var t=e.enabled,n=e.handleClose,r=e.updateWindow,i=e.windowId;return a.a.createElement(ec.a,{onClick:function(){n(),r(i,{imageToolsEnabled:!t})}},a.a.createElement(Ys.a,null,a.a.createElement(Zc.a,null)),a.a.createElement(Js.a,{primaryTypographyProps:{variant:"body1"}},t?"Hide image tools":"Show image tools"))};Su.propTypes={},Su.defaultProps={enabled:!0};var Eu=Su,Cu={de:{brightness:"Helligkeit",collapse_open:"Bildbearbeitung ausblenden",collapse_close:"Bildbearbeitung einblenden",contrast:"Kontrast",flip:"Spiegeln",greyscale:"Darstellung in Graustufen",invert:"Umkehrung der Farben",revert:"Einstellungen zurücksetzen",rotateLeft:"Rotation links",rotateRight:"Rotation rechts",saturation:"Sättigung"},en:{brightness:"Brightness",collapse_open:"Collapse image tools",collapse_close:"Expand image tools",contrast:"Contrast",flip:"Flip",greyscale:"Greyscale",invert:"Invert colors",revert:"Revert image",rotateLeft:"Rotate left",rotateRight:"Rotate right",saturation:"Saturation"},fr:{brightness:"Luminosité",collapse_open:"Fermer les outils de réglages de l'image",collapse_close:"Ouvrir les outils de réglages de l'image",contrast:"Contraste",flip:"Miroir",greyscale:"Niveaux de gris",invert:"Inverser les couleurs",revert:"Réinitialiser les réglages",rotateLeft:"Rotation vers la gauche",rotateRight:"Rotation vers la droite",saturation:"Saturation"}},ku=[{target:"OpenSeadragonViewer",mapDispatchToProps:{updateWindow:ua.l,updateViewport:ca.d},mapStateToProps:function(e,t){var n=t.windowId;return{containerId:Object(C.b)(e),enabled:Object(pa.c)(e,{windowId:n}).imageToolsEnabled||!1,open:Object(pa.c)(e,{windowId:n}).imageToolsOpen||!1,viewConfig:Object(Do.d)(e,{windowId:n})||{}}},mode:"add",component:Dc()(Ou),config:{translations:Cu}},{target:"WindowTopBarPluginMenu",component:Eu,mode:"add",mapDispatchToProps:{updateWindow:ua.l},mapStateToProps:function(e,t){var n=t.windowId;return{enabled:Object(pa.c)(e,{windowId:n}).imageToolsEnabled||!1}}}];window.Mirador=Ks,window.miradorPlugins=[{name:"annotations",plugin:Qs.a},{name:"image-tools",plugin:ku},{name:"dl-plugin",plugin:Ac}];window.miradorAnnotationServerAdapter=function(e,t){return new Zs.a(e,t)}},function(e,t,n){"use strict";function r(e,t,n){for(var r=e.text,o=e.characterMeta,a=t.length,s=n.length,c=[],u=o.slice(0,0),l=0,f=r.indexOf(t);-1!==f;)c.push(r.slice(l,f)+n),u=u.concat(o.slice(l,f),i(o.slice(f,f+1),s)),l=f+a,f=r.indexOf(t,l);return c.push(r.slice(l)),u=u.concat(o.slice(l)),{text:c.join(""),characterMeta:u}}function i(e,t){for(var n=e.slice(0,0);t-- >0;)n=n.concat(e);return n}n.r(t),n.d(t,"stateFromHTML",(function(){return P}));var o=n(105),a=n(127),s=n(32);var c={a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,var:1,video:1,wbr:1,acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1},u={area:1,base:1,br:1,col:1,colgroup:1,command:1,dl:1,embed:1,head:1,hgroup:1,hr:1,iframe:1,img:1,input:1,keygen:1,link:1,meta:1,ol:1,optgroup:1,option:1,param:1,script:1,select:1,source:1,style:1,table:1,tbody:1,textarea:1,tfoot:1,thead:1,title:1,tr:1,track:1,ul:1,wbr:1,basefont:1,dialog:1,dir:1,isindex:1},l={img:1};function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=/^data:/i,m=Object(a.OrderedSet)(),y=new o.ContentBlock({key:Object(o.genKey)(),text:"",type:s.a.UNSTYLED,characterList:Object(a.List)(),depth:0}),b=/(\r\n|\r|\n)/g,w=/^data-([a-z0-9-]+)$/,_={a:{href:"url",rel:"rel",target:"target",title:"title"},img:{src:"src",alt:"alt",width:"width",height:"height"}},x=function(e,t){var n={};if(_.hasOwnProperty(e))for(var r=_[e],i=0;i<t.attributes.length;i++){var o=t.attributes[i],a=o.name,s=o.value;if("string"==typeof s){var c=s;if(r.hasOwnProperty(a))n[r[a]]=c;else w.test(a)&&(n[a]=c)}}return n},O={a:function(e,t,n){var r,i=x(t,n);if(null!=(r=i.url)&&!r.match(v))return e.createEntity(s.b.LINK,i)},img:function(e,t,n){var r=x(t,n);if(null!=r.src)return e.createEntity(s.b.IMAGE,r)}},S=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),g(this,"contentStateForEntities",void 0),g(this,"blockStack",void 0),g(this,"blockList",void 0),g(this,"depth",void 0),g(this,"options",void 0),g(this,"inlineCreators",{Style:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return{type:"STYLE",style:e}})),Entity:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"MUTABLE";return{type:"ENTITY",entityKey:t.createEntity(e,E(n),r)}}}),this.options=n,this.contentStateForEntities=o.ContentState.createFromBlockArray([]),this.blockStack=[],this.blockList=[],this.depth=0}var t,n,i;return t=e,(n=[{key:"process",value:function(e){this.processBlockElement(e);var t=[];return this.blockList.forEach((function(e){var n=function(e){var t="",n=Object(a.Seq)();return e.forEach((function(e){t+=e.text,n=n.concat(e.characterMeta)})),{text:t,characterMeta:n}}(e.textFragments),i=n.text,s=n.characterMeta,c=!1;if("\r"===i&&(c=!0,i=""),"pre"===e.tagName){var u=function(e,t){return"\n"===e.charAt(0)&&(e=e.slice(1),t=t.slice(1)),{text:e,characterMeta:t}}(i,s);i=u.text,s=u.characterMeta}else{var l=function(e,t){var n=function(e,t){for(;" "===e.charAt(0);)e=e.slice(1),t=t.slice(1);return{text:e,characterMeta:t}}(e=e.replace(/[ \t\n]/g," "),t);e=n.text,t=n.characterMeta;var i=function(e,t){for(;" "===e.slice(-1);)e=e.slice(0,-1),t=t.slice(0,-1);return{text:e,characterMeta:t}}(e,t);e=i.text,t=i.characterMeta;for(var o=e.length;o--;)" "===e.charAt(o)&&" "===e.charAt(o-1)&&(e=e.slice(0,o)+e.slice(o+1),t=t.slice(0,o).concat(t.slice(o+1)));var a=r({text:e,characterMeta:t},"\r ","\r");e=a.text,t=a.characterMeta;var s=r({text:e,characterMeta:t}," \r","\r");return e=s.text,t=s.characterMeta,{text:e,characterMeta:t}}(i,s);i=l.text,s=l.characterMeta}((i=i.split("\r").join("\n")).length||c)&&t.push(new o.ContentBlock({key:Object(o.genKey)(),text:i,type:e.type,characterList:s.toList(),depth:e.depth,data:e.data?Object(a.Map)(e.data):Object(a.Map)()}))})),t.length||(t=[y]),o.ContentState.createFromBlockArray(t,this.contentStateForEntities.getEntityMap())}},{key:"getBlockTypeFromTagName",value:function(e){var t=this.options.blockTypes;if(t&&t[e])return t[e];switch(e){case"li":return"ol"===this.blockStack.slice(-1)[0].tagName?s.a.ORDERED_LIST_ITEM:s.a.UNORDERED_LIST_ITEM;case"blockquote":return s.a.BLOCKQUOTE;case"h1":return s.a.HEADER_ONE;case"h2":return s.a.HEADER_TWO;case"h3":return s.a.HEADER_THREE;case"h4":return s.a.HEADER_FOUR;case"h5":return s.a.HEADER_FIVE;case"h6":return s.a.HEADER_SIX;case"pre":return s.a.CODE;case"figure":return s.a.ATOMIC;default:return s.a.UNSTYLED}}},{key:"processBlockElement",value:function(e){if(e){var t,n,r=this.options.customBlockFn,i=e.nodeName.toLowerCase();if(r){var o=r(e);null!=o&&(t=o.type,n=o.data)}var a=!0;if(null==t&&(a=!1,t=this.getBlockTypeFromTagName(i)),t===s.a.CODE){var c=e.getAttribute("data-language");c&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(n,!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{language:c}))}var l=function(e){switch(e){case s.a.UNORDERED_LIST_ITEM:case s.a.ORDERED_LIST_ITEM:return!0;default:return!1}}(t),f=!u.hasOwnProperty(i);if(!a&&t===s.a.UNSTYLED){var p=this.blockStack.slice(-1)[0];p&&(t=p.type)}var h={tagName:i,textFragments:[],type:t,styleStack:[m],entityStack:[null],depth:l?this.depth:0,data:n};f&&(this.blockList.push(h),l&&(this.depth+=1)),this.blockStack.push(h),null!=e.childNodes&&Array.from(e.childNodes).forEach(this.processNode,this),this.blockStack.pop(),f&&l&&(this.depth-=1)}}},{key:"processInlineElement",value:function(e){var t=e.nodeName.toLowerCase();if("br"!==t){var n=this.blockStack.slice(-1)[0],r=n.styleStack.slice(-1)[0],i=n.entityStack.slice(-1)[0],o=this.options.customInlineFn,a=o?o(e,this.inlineCreators):null;if(null!=a)switch(a.type){case"STYLE":r=r.add(a.style);break;case"ENTITY":i=a.entityKey}else r=function(e,t,n){switch(t){case"b":case"strong":return e.add(s.c.BOLD);case"i":case"em":return e.add(s.c.ITALIC);case"u":case"ins":return e.add(s.c.UNDERLINE);case"code":return e.add(s.c.CODE);case"s":case"del":return e.add(s.c.STRIKETHROUGH);default:return n&&n[t]?e.add(n[t]):e}}(r,t,this.options.elementStyles),O.hasOwnProperty(t)&&(i=O[t](this,t,e)||i);n.styleStack.push(r),n.entityStack.push(i),null!=e.childNodes&&Array.from(e.childNodes).forEach(this.processNode,this),l.hasOwnProperty(t)&&this.processText(" "),n.entityStack.pop(),n.styleStack.pop()}else this.processText("\r")}},{key:"processTextNode",value:function(e){var t=e.nodeValue;t=(t=t.replace(b,"\n")).split("").join("\r"),this.processText(t)}},{key:"processText",value:function(e){var t=this.blockStack.slice(-1)[0],n=t.styleStack.slice(-1)[0],r=t.entityStack.slice(-1)[0],i=o.CharacterMetadata.create({style:n,entity:r}),s=Object(a.Repeat)(i,e.length);t.textFragments.push({text:e,characterMeta:s})}},{key:"processNode",value:function(e){if(1===e.nodeType){var t=e,n=t.nodeName.toLowerCase();c.hasOwnProperty(n)?this.processInlineElement(t):this.processBlockElement(t)}else 3===e.nodeType&&this.processTextNode(e)}},{key:"createEntity",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"MUTABLE";return this.contentStateForEntities=this.contentStateForEntities.createEntity(e,n,t),this.contentStateForEntities.getLastCreatedEntityKey()}}])&&h(t.prototype,n),i&&h(t,i),e}();function E(e){var t={};if(null!==e&&"object"===f(e)&&!Array.isArray(e))for(var n=e,r=0,i=Object.keys(n);r<i.length;r++){var o=i[r],a=n[o];"string"==typeof a&&(t[o]=a)}return t}function C(e,t){return new S(t).process(e)}function k(e){var t;"undefined"!=typeof DOMParser?t=(new DOMParser).parseFromString(e,"text/html"):(t=document.implementation.createHTMLDocument("")).documentElement&&(t.documentElement.innerHTML=e);return t.body||t.createElement("body")}function T(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var j={};function P(e,t){var n=t||j,r=n.parser,i=T(n,["parser"]);return null==r&&(r=k),C(r(e),i)}},function(e,t,n){"use strict";n.r(t);var r,i=n(17);!function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(r||(r={}));var o=1,a=0;function s(e){return void 0===e.button||e.button===a}function c(e){return!!e.targetTouches}function u(e,t){return c(e)?function(e,t){return 1===e.targetTouches.length?u(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?u(e.touches[0]):void 0}(e,t):{x:e.clientX,y:e.clientY}}var l=function(){var e=!1;try{addEventListener("test",(function(){}),Object.defineProperty({},"passive",{get:function(){return e=!0,!0}}))}catch(e){}return e}();function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d,p=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.enableTouchEvents=!0,this.enableMouseEvents=!1,this.enableKeyboardEvents=!1,this.ignoreContextMenu=!1,this.enableHoverOutsideTarget=!1,this.touchSlop=0,this.scrollAngleRanges=void 0,this.context=n,this.delayTouchStart=t.delayTouchStart||t.delay||0,this.delayMouseStart=t.delayMouseStart||t.delay||0,Object.keys(t).forEach((function(e){null!=t[e]&&(r[e]=t[e])}))}var t,n,r;return t=e,(n=[{key:"window",get:function(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&f(t.prototype,n),r&&f(t,r),e}();function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=(g(d={},r.mouse,{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"}),g(d,r.touch,{start:"touchstart",move:"touchmove",end:"touchend"}),g(d,r.keyboard,{keydown:"keydown"}),d),m=function(){function e(t,n,i){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getSourceClientOffset=function(e){return function(e){var t=1===e.nodeType?e:e.parentElement;if(t){var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}}(a.sourceNodes[e])},this.handleTopMoveStartCapture=function(e){s(e)&&(a.moveStartSourceIds=[])},this.handleMoveStart=function(e){Array.isArray(a.moveStartSourceIds)&&a.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=function(e){if(s(e)){var t=u(e);t&&(c(e)&&(a.lastTargetTouchFallback=e.targetTouches[0]),a._mouseClientOffset=t),a.waitingForDelay=!1}},this.handleTopMoveStartDelay=function(e){if(s(e)){var t=e.type===v.touch.start?a.options.delayTouchStart:a.options.delayMouseStart;a.timeout=setTimeout(a.handleTopMoveStart.bind(a,e),t),a.waitingForDelay=!0}},this.handleTopMoveCapture=function(){a.dragOverTargetIds=[]},this.handleMove=function(e,t){a.dragOverTargetIds&&a.dragOverTargetIds.unshift(t)},this.handleTopMove=function(e){if(a.timeout&&clearTimeout(a.timeout),a.document&&!a.waitingForDelay){var t,n,r,i,o=a.moveStartSourceIds,s=a.dragOverTargetIds,c=a.options.enableHoverOutsideTarget,l=u(e,a.lastTargetTouchFallback);if(l)if(a._isScrolling||!a.monitor.isDragging()&&function(e,t,n,r,i){if(!i)return!1;for(var o=180*Math.atan2(r-t,n-e)/Math.PI+180,a=0;a<i.length;++a)if((null==i[a].start||o>=i[a].start)&&(null==i[a].end||o<=i[a].end))return!0;return!1}(a._mouseClientOffset.x||0,a._mouseClientOffset.y||0,l.x,l.y,a.options.scrollAngleRanges))a._isScrolling=!0;else if(!a.monitor.isDragging()&&a._mouseClientOffset.hasOwnProperty("x")&&o&&(t=a._mouseClientOffset.x||0,n=a._mouseClientOffset.y||0,r=l.x,i=l.y,Math.sqrt(Math.pow(Math.abs(r-t),2)+Math.pow(Math.abs(i-n),2))>(a.options.touchSlop?a.options.touchSlop:0))&&(a.moveStartSourceIds=void 0,a.actions.beginDrag(o,{clientOffset:a._mouseClientOffset,getSourceClientOffset:a.getSourceClientOffset,publishSource:!1})),a.monitor.isDragging()){var f=a.sourceNodes[a.monitor.getSourceId()];a.installSourceNodeRemovalObserver(f),a.actions.publishDragSource(),e.preventDefault();var d=(s||[]).map((function(e){return a.targetNodes[e]})),p=a.options.getDropTargetElementsAtPoint?a.options.getDropTargetElementsAtPoint(l.x,l.y,d):a.document.elementsFromPoint(l.x,l.y),h=[];for(var g in p)if(p.hasOwnProperty(g)){var v=p[g];for(h.push(v);v;)v=v.parentElement,-1===h.indexOf(v)&&h.push(v)}var m=h.filter((function(e){return d.indexOf(e)>-1})).map((function(e){for(var t in a.targetNodes)if(e===a.targetNodes[t])return t})).filter((function(e){return!!e})).filter((function(e,t,n){return n.indexOf(e)===t}));if(c)for(var y in a.targetNodes)if(a.targetNodes[y]&&a.targetNodes[y].contains(f)&&-1===m.indexOf(y)){m.unshift(y);break}m.reverse(),a.actions.hover(m,{clientOffset:l})}}},this.handleTopMoveEndCapture=function(e){a._isScrolling=!1,a.lastTargetTouchFallback=void 0,function(e){return void 0===e.buttons||0==(e.buttons&o)}(e)&&(a.monitor.isDragging()&&!a.monitor.didDrop()?(e.preventDefault(),a._mouseClientOffset={},a.uninstallSourceNodeRemovalObserver(),a.actions.drop(),a.actions.endDrag()):a.moveStartSourceIds=void 0)},this.handleCancelOnEscape=function(e){"Escape"===e.key&&a.monitor.isDragging()&&(a._mouseClientOffset={},a.uninstallSourceNodeRemovalObserver(),a.actions.endDrag())},this.options=new p(i,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes={},this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.targetNodes={},this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(r.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(r.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(r.keyboard)}var t,n,a;return t=e,(n=[{key:"setup",value:function(){this.window&&(Object(i.a)(!e.isSetUp,"Cannot have two Touch backends at the same time."),e.isSetUp=!0,this.addEventListener(this.window,"start",this.getTopMoveStartHandler()),this.addEventListener(this.window,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(this.window,"move",this.handleTopMove),this.addEventListener(this.window,"move",this.handleTopMoveCapture,!0),this.addEventListener(this.window,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(this.window,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(this.window,"keydown",this.handleCancelOnEscape,!0))}},{key:"teardown",value:function(){this.window&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(this.window,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(this.window,"start",this.handleTopMoveStart),this.removeEventListener(this.window,"move",this.handleTopMoveCapture,!0),this.removeEventListener(this.window,"move",this.handleTopMove),this.removeEventListener(this.window,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(this.window,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(this.window,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}},{key:"addEventListener",value:function(e,t,n,r){var i=l?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var o=v[r][t];o&&e.addEventListener(o,n,i)}))}},{key:"removeEventListener",value:function(e,t,n,r){var i=l?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var o=v[r][t];o&&e.removeEventListener(o,n,i)}))}},{key:"connectDragSource",value:function(e,t){var n=this,r=this.handleMoveStart.bind(this,e);return this.sourceNodes[e]=t,this.addEventListener(t,"start",r),function(){delete n.sourceNodes[e],n.removeEventListener(t,"start",r)}}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions[e]=n,this.sourcePreviewNodes[e]=t,function(){delete r.sourcePreviewNodes[e],delete r.sourcePreviewNodeOptions[e]}}},{key:"connectDropTarget",value:function(e,t){var n=this;if(!this.document)return function(){return null};var r=function(r){if(n.document&&n.monitor.isDragging()){var i;switch(r.type){case v.mouse.move:i={x:r.clientX,y:r.clientY};break;case v.touch.move:i={x:r.touches[0].clientX,y:r.touches[0].clientY}}var o=null!=i?n.document.elementFromPoint(i.x,i.y):void 0,a=o&&t.contains(o);return o===t||a?n.handleMove(r,e):void 0}};return this.addEventListener(this.document.body,"move",r),this.targetNodes[e]=t,function(){n.document&&(delete n.targetNodes[e],n.removeEventListener(n.document.body,"move",r))}}},{key:"getTopMoveStartHandler",value:function(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}},{key:"installSourceNodeRemovalObserver",value:function(e){var t=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver((function(){e&&!e.parentElement&&(t.resurrectSourceNode(),t.uninstallSourceNodeRemovalObserver())})),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}},{key:"resurrectSourceNode",value:function(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}},{key:"uninstallSourceNodeRemovalObserver",value:function(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&h(t.prototype,n),a&&h(t,a),e}();t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new m(e,t,n)}},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n.r(t),n.d(t,"stateToHTML",(function(){return z}));var c=function(e,t){if(null==e)return t;for(var n=s(t,2),i=n[0],a=n[1],c=o({},i),u=r(a),l=0,f=Object.keys(e);l<f.length;l++){var d=f[l];if(i.hasOwnProperty(d)){var p=i[d];c[d]=o({},p,{},e[d])}else c[d]=e[d],u.push(d)}return[c,u]},u={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};var l=function(e){if(null==e)return e;for(var t={},n=!1,r=0,i=Object.keys(e);r<i.length;r++){var o=i[r],a=o;u.hasOwnProperty(o)&&(a=u[o],n=!0),t[a]=e[o]}return n?t:e},f=/^(moz|ms|o|webkit)-/,d=/^\d+$/,p=/([A-Z])/g,h={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!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};var g,v,m,y=function(e){return Object.keys(e).map((function(t){var n=function(e,t){var n;return"string"==typeof t?n=d.test(t):(n=!0,t=String(t)),n&&"0"!==t&&!0!==h[e]?t+"px":t}(t,e[t]),r=function(e){return e.replace(p,"-$1").toLowerCase().replace(f,"-$1-")}(t);return"".concat(r,": ").concat(n)})).join("; ")},b=n(32);function w(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(n,!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=b.c.BOLD,C=b.c.CODE,k=b.c.ITALIC,T=b.c.STRIKETHROUGH,j=b.c.UNDERLINE,P=/^data-([a-z0-9-]+)$/,I=(S(g={},E,{element:"strong"}),S(g,C,{element:"code"}),S(g,k,{element:"em"}),S(g,T,{element:"del"}),S(g,j,{element:"u"}),g),R=[E,k,j,T,C],A=(S(v={},b.b.LINK,{url:"href",href:"href",rel:"rel",target:"target",title:"title",className:"class"}),S(v,b.b.IMAGE,{src:"src",height:"height",width:"width",alt:"alt",className:"class"}),v),M=(S(m={},b.b.LINK,(function(e,t){for(var n=A.hasOwnProperty(e)?A[e]:{},r=t.getData(),i={},o=0,a=Object.keys(r);o<a.length;o++){var s=a[o],c=r[s];if(n.hasOwnProperty(s))i[n[s]]=c;else P.test(s)&&(i[s]=c)}return i})),S(m,b.b.IMAGE,(function(e,t){for(var n=A.hasOwnProperty(e)?A[e]:{},r=t.getData(),i={},o=0,a=Object.keys(r);o<a.length;o++){var s=a[o],c=r[s];if(n.hasOwnProperty(s))i[n[s]]=c;else P.test(s)&&(i[s]=c)}return i})),m);function D(e,t){switch(e){case b.a.HEADER_ONE:return["h1"];case b.a.HEADER_TWO:return["h2"];case b.a.HEADER_THREE:return["h3"];case b.a.HEADER_FOUR:return["h4"];case b.a.HEADER_FIVE:return["h5"];case b.a.HEADER_SIX:return["h6"];case b.a.UNORDERED_LIST_ITEM:case b.a.ORDERED_LIST_ITEM:return["li"];case b.a.BLOCKQUOTE:return["blockquote"];case b.a.CODE:return["pre","code"];case b.a.ATOMIC:return["figure"];default:return null===t?[]:[t||"p"]}}var N=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),S(this,"blocks",void 0),S(this,"contentState",void 0),S(this,"currentBlock",void 0),S(this,"indentLevel",void 0),S(this,"output",void 0),S(this,"totalBlocks",void 0),S(this,"wrapperTag",void 0),S(this,"options",void 0),S(this,"inlineStyles",void 0),S(this,"inlineStyleFn",void 0),S(this,"styleOrder",void 0),null==n&&(n={}),this.contentState=t,this.options=n;var r=x(c(n.inlineStyles,[I,R]),2),i=r[0],o=r[1];this.inlineStyles=i,this.inlineStyleFn=n.inlineStyleFn,this.styleOrder=o}var t,n,r;return t=e,(n=[{key:"generate",value:function(){for(this.output=[],this.blocks=this.contentState.getBlocksAsArray(),this.totalBlocks=this.blocks.length,this.currentBlock=0,this.indentLevel=0,this.wrapperTag=null;this.currentBlock<this.totalBlocks;)this.processBlock();return this.closeWrapperTag(),this.output.join("").trim()}},{key:"processBlock",value:function(){var e=this.options,t=e.blockRenderers,n=e.defaultBlockTag,r=this.blocks[this.currentBlock],i=r.getType(),o=function(e){switch(e){case b.a.UNORDERED_LIST_ITEM:return"ul";case b.a.ORDERED_LIST_ITEM:return"ol";default:return null}}(i);this.wrapperTag!==o&&(this.wrapperTag&&this.closeWrapperTag(),o&&this.openWrapperTag(o)),this.indent();var a=null!=t&&t.hasOwnProperty(i)?t[i]:null,s=a?a(r):null;if(null!=s)return this.output.push(s),this.output.push("\n"),void(this.currentBlock+=1);this.writeStartTag(r,n),this.output.push(this.renderBlockContent(r));var c=this.getNextBlock();if(function(e){switch(e){case b.a.UNORDERED_LIST_ITEM:case b.a.ORDERED_LIST_ITEM:return!0;default:return!1}}(i)&&c&&c.getDepth()===r.getDepth()+1){this.output.push("\n");var u=this.wrapperTag;this.wrapperTag=null,this.indentLevel+=1,this.currentBlock+=1,this.processBlocksAtDepth(c.getDepth()),this.wrapperTag=u,this.indentLevel-=1,this.indent()}else this.currentBlock+=1;this.writeEndTag(r,n)}},{key:"processBlocksAtDepth",value:function(e){for(var t=this.blocks[this.currentBlock];t&&t.getDepth()===e;)this.processBlock(),t=this.blocks[this.currentBlock];this.closeWrapperTag()}},{key:"getNextBlock",value:function(){return this.blocks[this.currentBlock+1]}},{key:"writeStartTag",value:function(e,t){var n,r=D(e.getType(),t);if(this.options.blockStyleFn){var i=this.options.blockStyleFn(e)||{},o=i.attributes,a=i.style;if(o=l(o),null!=a){var s=y(a);o=null==o?{style:s}:_({},o,{style:s})}n=L(o)}else n="";var c=!0,u=!1,f=void 0;try{for(var d,p=r[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var h=d.value;this.output.push("<".concat(h).concat(n,">"))}}catch(e){u=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(u)throw f}}}},{key:"writeEndTag",value:function(e,t){var n=D(e.getType(),t);if(1===n.length)this.output.push("</".concat(n[0],">\n"));else{var r=[],i=!0,o=!1,a=void 0;try{for(var s,c=n[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var u=s.value;r.unshift("</".concat(u,">"))}}catch(e){o=!0,a=e}finally{try{i||null==c.return||c.return()}finally{if(o)throw a}}this.output.push(r.join("")+"\n")}}},{key:"openWrapperTag",value:function(e){this.wrapperTag=e,this.indent(),this.output.push("<".concat(e,">\n")),this.indentLevel+=1}},{key:"closeWrapperTag",value:function(){var e=this.wrapperTag;e&&(this.indentLevel-=1,this.indent(),this.output.push("</".concat(e,">\n")),this.wrapperTag=null)}},{key:"indent",value:function(){this.output.push(" ".repeat(this.indentLevel))}},{key:"withCustomInlineStyles",value:function(e,t){if(!this.inlineStyleFn)return e;var n=this.inlineStyleFn(t);if(!n)return e;var r=n.element,i=void 0===r?"span":r,o=n.attributes,a=n.style,s=L(_({},o,{style:a&&y(a)}));return"<".concat(i).concat(s,">").concat(e,"</").concat(i,">")}},{key:"renderBlockContent",value:function(e){var t=this,n=e.getType(),r=e.getText();if(""===r)return"<br>";r=this.preserveWhitespace(r);var i=e.getCharacterList();return Object(b.d)(r,i).map((function(e){var r,i=x(e,2),o=i[0],a=i[1].map((function(e){var r=x(e,2),i=r[0],o=r[1],a=function(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split(" ").join("&nbsp;").split("\n").join("<br>\n")}(i),s=!0,c=!1,u=void 0;try{for(var f,d=t.styleOrder[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var p=f.value;if((p!==C||n!==b.a.CODE)&&o.has(p)){var h=t.inlineStyles[p],g=h.element,v=h.attributes,m=h.style;if(null==g&&(g="span"),v=l(v),null!=m){var w=y(m);v=null==v?{style:w}:_({},v,{style:w})}var O=L(v);a="<".concat(g).concat(O,">").concat(a,"</").concat(g,">")}}}catch(e){c=!0,u=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw u}}return t.withCustomInlineStyles(a,o)})).join(""),s=o?t.contentState.getEntity(o):null,c=null==s?null:s.getType().toUpperCase();if(null!=s&&t.options.entityStyleFn&&(r=t.options.entityStyleFn(s))){var u=r,f=u.element,d=u.attributes,p=u.style;if(null==f&&(f="span"),d=l(d),null!=p){var h=y(p);d=null==d?{style:h}:_({},d,{style:h})}var g=L(d);return"<".concat(f).concat(g,">").concat(a,"</").concat(f,">")}if(null!=c&&c===b.b.LINK){var v=L(M.hasOwnProperty(c)?M[c](c,s):null);return"<a".concat(v,">").concat(a,"</a>")}if(null!=c&&c===b.b.IMAGE){var m=L(M.hasOwnProperty(c)?M[c](c,s):null);return"<img".concat(m,"/>")}return a})).join("")}},{key:"preserveWhitespace",value:function(e){for(var t=e.length,n=new Array(t),r=0;r<t;r++)" "!==e[r]||0!==r&&r!==t-1&&" "!==e[r-1]?n[r]=e[r]:n[r]=" ";return n.join("")}}])&&O(t.prototype,n),r&&O(t,r),e}();function L(e){if(null==e)return"";for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n],o=e[i];null!=o&&t.push(" ".concat(i,'="').concat((o+"").split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;"),'"'))}return t.join("")}function z(e,t){return new N(e,t).generate()}},function(e,t,n){"use strict";function r(e){return e.reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e[r]=n,e}),{})}function i(e){return"number"==typeof e}function o(e,t){return-1!==e.indexOf(t)}function a(e,t,n,r){return t+(i=n,0===parseFloat(i)?i:"-"===i[0]?i.slice(1):"-"+i)+r;var i}function s(e){return e.replace(/ +/g," ").split(" ").map((function(e){return e.trim()})).filter(Boolean).reduce((function(e,t){var n=e.list,r=e.state,i=(t.match(/\(/g)||[]).length,o=(t.match(/\)/g)||[]).length;return r.parensDepth>0?n[n.length-1]=n[n.length-1]+" "+t:n.push(t),r.parensDepth+=i-o,{list:n,state:r}}),{list:[],state:{parensDepth:0}}).list}function c(e){var t=s(e);if(t.length<=3||t.length>4)return e;var n=t[0],r=t[1],i=t[2];return[n,t[3],i,r].join(" ")}n.r(t);var u={padding:function(e){var t=e.value;return i(t)?t:c(t)},textShadow:function(e){return function(e){for(var t=[],n=0,r=0,i=!1;r<e.length;)i||","!==e[r]?"("===e[r]?(i=!0,r++):")"===e[r]?(i=!1,r++):r++:(t.push(e.substring(n,r).trim()),n=++r);return n!=r&&t.push(e.substring(n,r+1)),t}(e.value).map((function(e){return e.replace(/(-*)([.|\d]+)/,(function(e,t,n){return"0"===n?e:""+(""===t?"-":"")+n}))})).join(",")},borderColor:function(e){return c(e.value)},borderRadius:function(e){var t=e.value;if(i(t))return t;if(o(t,"/")){var n=t.split("/"),r=n[0],a=n[1];return u.borderRadius({value:r.trim()})+" / "+u.borderRadius({value:a.trim()})}var c=s(t);switch(c.length){case 2:return c.reverse().join(" ");case 4:var l=c[0],f=c[1],d=c[2];return[f,l,c[3],d].join(" ");default:return t}},background:function(e){var t=e.value,n=e.valuesToConvert,r=e.isRtl,o=e.bgImgDirectionRegex,a=e.bgPosDirectionRegex;if(i(t))return t;var s=t.replace(/(url\(.*?\))|(rgba?\(.*?\))|(hsl\(.*?\))|(#[a-fA-F0-9]+)|((^| )(\D)+( |$))/g,"").trim();return t=t.replace(s,u.backgroundPosition({value:s,valuesToConvert:n,isRtl:r,bgPosDirectionRegex:a})),u.backgroundImage({value:t,valuesToConvert:n,bgImgDirectionRegex:o})},backgroundImage:function(e){var t=e.value,n=e.valuesToConvert,r=e.bgImgDirectionRegex;return o(t,"url(")||o(t,"linear-gradient(")?t.replace(r,(function(e,t,r){return e.replace(r,n[r])})):t},backgroundPosition:function(e){var t=e.value,n=e.valuesToConvert,r=e.isRtl,i=e.bgPosDirectionRegex;return t.replace(r?/^((-|\d|\.)+%)/:null,(function(e,t){return function(e){var t=e.indexOf(".");if(-1===t)e=100-parseFloat(e)+"%";else{var n=e.length-t-2;e=(e=100-parseFloat(e)).toFixed(n)+"%"}return e}(t)})).replace(i,(function(e){return n[e]}))},backgroundPositionX:function(e){var t=e.value,n=e.valuesToConvert,r=e.isRtl,o=e.bgPosDirectionRegex;return i(t)?t:u.backgroundPosition({value:t,valuesToConvert:n,isRtl:r,bgPosDirectionRegex:o})},transition:function(e){var t=e.value,n=e.propertiesToConvert;return t.split(/,\s*/g).map((function(e){var t=e.split(" ");return t[0]=n[t[0]]||t[0],t.join(" ")})).join(", ")},transitionProperty:function(e){var t=e.value,n=e.propertiesToConvert;return t.split(/,\s*/g).map((function(e){return n[e]||e})).join(", ")},transform:function(e){var t=e.value,n="(?:(?:(?:\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",r="((?:-?(?:[0-9]*\\.[0-9]+|[0-9]+)(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|-?(?:[_a-z]|[^\\u0020-\\u007e]|"+n+")(?:[_a-z0-9-]|[^\\u0020-\\u007e]|"+n+")*)?)|(?:inherit|auto))",i=new RegExp("(translateX\\s*\\(\\s*)"+r+"(\\s*\\))","gi"),o=new RegExp("(translate\\s*\\(\\s*)"+r+"((?:\\s*,\\s*"+r+"){0,1}\\s*\\))","gi"),s=new RegExp("(translate3d\\s*\\(\\s*)"+r+"((?:\\s*,\\s*"+r+"){0,2}\\s*\\))","gi"),c=new RegExp("(rotate[ZY]?\\s*\\(\\s*)"+r+"(\\s*\\))","gi");return t.replace(i,a).replace(o,a).replace(s,a).replace(c,a)}};u.objectPosition=u.backgroundPosition,u.margin=u.padding,u.borderWidth=u.padding,u.boxShadow=u.textShadow,u.webkitBoxShadow=u.boxShadow,u.mozBoxShadow=u.boxShadow,u.WebkitBoxShadow=u.boxShadow,u.MozBoxShadow=u.boxShadow,u.borderStyle=u.borderColor,u.webkitTransform=u.transform,u.mozTransform=u.transform,u.WebkitTransform=u.transform,u.MozTransform=u.transform,u.transformOrigin=u.backgroundPosition,u.webkitTransformOrigin=u.transformOrigin,u.mozTransformOrigin=u.transformOrigin,u.WebkitTransformOrigin=u.transformOrigin,u.MozTransformOrigin=u.transformOrigin,u.webkitTransition=u.transition,u.mozTransition=u.transition,u.WebkitTransition=u.transition,u.MozTransition=u.transition,u.webkitTransitionProperty=u.transitionProperty,u.mozTransitionProperty=u.transitionProperty,u.WebkitTransitionProperty=u.transitionProperty,u.MozTransitionProperty=u.transitionProperty,u["text-shadow"]=u.textShadow,u["border-color"]=u.borderColor,u["border-radius"]=u.borderRadius,u["background-image"]=u.backgroundImage,u["background-position"]=u.backgroundPosition,u["background-position-x"]=u.backgroundPositionX,u["object-position"]=u.objectPosition,u["border-width"]=u.padding,u["box-shadow"]=u.textShadow,u["-webkit-box-shadow"]=u.textShadow,u["-moz-box-shadow"]=u.textShadow,u["border-style"]=u.borderColor,u["-webkit-transform"]=u.transform,u["-moz-transform"]=u.transform,u["transform-origin"]=u.transformOrigin,u["-webkit-transform-origin"]=u.transformOrigin,u["-moz-transform-origin"]=u.transformOrigin,u["-webkit-transition"]=u.transition,u["-moz-transition"]=u.transition,u["transition-property"]=u.transitionProperty,u["-webkit-transition-property"]=u.transitionProperty,u["-moz-transition-property"]=u.transitionProperty;var l=r([["paddingLeft","paddingRight"],["marginLeft","marginRight"],["left","right"],["borderLeft","borderRight"],["borderLeftColor","borderRightColor"],["borderLeftStyle","borderRightStyle"],["borderLeftWidth","borderRightWidth"],["borderTopLeftRadius","borderTopRightRadius"],["borderBottomLeftRadius","borderBottomRightRadius"],["padding-left","padding-right"],["margin-left","margin-right"],["border-left","border-right"],["border-left-color","border-right-color"],["border-left-style","border-right-style"],["border-left-width","border-right-width"],["border-top-left-radius","border-top-right-radius"],["border-bottom-left-radius","border-bottom-right-radius"]]),f=["content"],d=r([["ltr","rtl"],["left","right"],["w-resize","e-resize"],["sw-resize","se-resize"],["nw-resize","ne-resize"]]),p=new RegExp("(^|\\W|_)((ltr)|(rtl)|(left)|(right))(\\W|_|$)","g"),h=new RegExp("(left)|(right)");function g(e){return Object.keys(e).reduce((function(t,n){var r=e[n];if("string"==typeof r&&(r=r.trim()),o(f,n))return t[n]=r,t;var a=function(e,t){var n=/\/\*\s?@noflip\s?\*\//.test(t),r=n?e:(a=e,l[a]||a),o=n?t:function(e,t){if(!function(e){return!(t=e,"boolean"==typeof t||function(e){return null==e}(e)||function(e){return"string"==typeof e&&e.match(/var\(.*\)/g)}(e));var t}(t))return t;if(function(e){return e&&"object"==typeof e}(t))return g(t);var n,r=i(t),o=function(e){return"function"==typeof e}(t),a=r||o?t:t.replace(/ !important.*?$/,""),s=!r&&a.length!==t.length,c=u[e];n=c?c({value:a,valuesToConvert:d,propertiesToConvert:l,isRtl:!0,bgImgDirectionRegex:p,bgPosDirectionRegex:h}):d[a]||a;if(s)return n+" !important";return n}(r,t);var a;return{key:r,value:o}}(n,r),s=a.key,c=a.value;return t[s]=c,t}),Array.isArray(e)?[]:{})}t.default=g},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=n.n(o),s=(n(2),n(83)),c=n.n(s),u=n(763),l=n(475),f=n(223);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=t.defaultTheme,s=t.withTheme,d=void 0!==s&&s,p=t.name,h=Object(i.a)(t,["defaultTheme","withTheme","name"]);var g=p,v=Object(u.a)(e,Object(r.a)({defaultTheme:o,Component:n,name:p||n.displayName,classNamePrefix:g},h)),m=a.a.forwardRef((function(e,t){e.classes;var s,c=e.innerRef,u=Object(i.a)(e,["classes","innerRef"]),h=v(Object(r.a)({},n.defaultProps,e)),g=u;return("string"==typeof p||d)&&(s=Object(f.a)()||o,p&&(g=Object(l.a)({theme:s,name:p,props:u})),d&&!g.theme&&(g.theme=s)),a.a.createElement(n,Object(r.a)({ref:c||t,classes:h},g))}));return c()(m,n),m}}},function(e,t,n){"use strict";n(41);var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(11),u=o.forwardRef((function(e,t){var n=e.anchorOrigin,s=void 0===n?{vertical:"top",horizontal:"right"}:n,u=e.badgeContent,l=e.children,f=e.classes,d=e.className,p=e.color,h=void 0===p?"default":p,g=e.component,v=void 0===g?"span":g,m=e.invisible,y=e.max,b=void 0===y?99:y,w=e.overlap,_=void 0===w?"rectangle":w,x=e.showZero,O=void 0!==x&&x,S=e.variant,E=void 0===S?"standard":S,C=Object(i.a)(e,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),k=m;null==m&&(0===u&&!O||null==u&&"dot"!==E)&&(k=!0);var T="";return"dot"!==E&&(T=u>b?"".concat(b,"+"):u),o.createElement(v,Object(r.a)({className:Object(a.a)(f.root,d),ref:t},C),l,o.createElement("span",{className:Object(a.a)(f.badge,f["".concat(s.horizontal).concat(Object(c.a)(s.vertical),"}")],f["anchorOrigin".concat(Object(c.a)(s.vertical)).concat(Object(c.a)(s.horizontal)).concat(Object(c.a)(_))],"default"!==h&&f["color".concat(Object(c.a)(h))],k&&f.invisible,"dot"===E&&f.dot)},T))}));t.a=Object(s.a)((function(e){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorError:{backgroundColor:e.palette.error.main,color:e.palette.error.contrastText},dot:{borderRadius:4,height:8,minWidth:8,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginTopRightRectangular:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginBottomRightRectangular:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginTopLeftRectangular:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginBottomLeftRectangular:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginTopRightCircular:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginBottomRightCircular:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginTopLeftCircular:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginBottomLeftCircular:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}}),{name:"MuiBadge"})(u)},function(e,t,n){"use strict";var r=n(1),i=n(41),o=n(4),a=n(27),s=n(0),c=n(33),u=(n(2),n(3)),l=n(331),f=n(24),d=n(5),p=n(11),h=n(476),g=n(1122),v=n(31),m=n(135),y=n(64),b=n(118),w=n(75),_=n(36);function x(e){return Math.round(1e5*e)/1e5}var O=!1,S=null;var E=s.forwardRef((function(e,t){var n=e.arrow,a=void 0!==n&&n,f=e.children,d=e.classes,x=e.disableFocusListener,E=void 0!==x&&x,C=e.disableHoverListener,k=void 0!==C&&C,T=e.disableTouchListener,j=void 0!==T&&T,P=e.enterDelay,I=void 0===P?100:P,R=e.enterNextDelay,A=void 0===R?0:R,M=e.enterTouchDelay,D=void 0===M?700:M,N=e.id,L=e.interactive,z=void 0!==L&&L,B=e.leaveDelay,F=void 0===B?0:B,W=e.leaveTouchDelay,H=void 0===W?1500:W,V=e.onClose,U=e.onOpen,q=e.open,G=e.placement,K=void 0===G?"bottom":G,$=e.PopperComponent,Z=void 0===$?g.a:$,X=e.PopperProps,Q=e.title,Y=e.TransitionComponent,J=void 0===Y?h.a:Y,ee=e.TransitionProps,te=Object(o.a)(e,["arrow","children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"]),ne=Object(_.a)(),re=s.useState(),ie=re[0],oe=re[1],ae=s.useState(null),se=ae[0],ce=ae[1],ue=s.useRef(!1),le=s.useRef(),fe=s.useRef(),de=s.useRef(),pe=s.useRef(),he=Object(w.a)({controlled:q,default:!1,name:"Tooltip",state:"open"}),ge=Object(i.a)(he,2),ve=ge[0],me=ge[1],ye=ve,be=Object(m.a)(N);s.useEffect((function(){return function(){clearTimeout(le.current),clearTimeout(fe.current),clearTimeout(de.current),clearTimeout(pe.current)}}),[]);var we=function(e){clearTimeout(S),O=!0,me(!0),U&&U(e)},_e=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(t){var n=f.props;"mouseover"===t.type&&n.onMouseOver&&e&&n.onMouseOver(t),ue.current&&"touchstart"!==t.type||(ie&&ie.removeAttribute("title"),clearTimeout(fe.current),clearTimeout(de.current),I||O&&A?(t.persist(),fe.current=setTimeout((function(){we(t)}),O?A:I)):we(t))}},xe=Object(b.a)(),Oe=xe.isFocusVisible,Se=xe.onBlurVisible,Ee=xe.ref,Ce=s.useState(!1),ke=Ce[0],Te=Ce[1],je=function(){ke&&(Te(!1),Se())},Pe=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(t){ie||oe(t.currentTarget),Oe(t)&&(Te(!0),_e()(t));var n=f.props;n.onFocus&&e&&n.onFocus(t)}},Ie=function(e){clearTimeout(S),S=setTimeout((function(){O=!1}),800+F),me(!1),V&&V(e),clearTimeout(le.current),le.current=setTimeout((function(){ue.current=!1}),ne.transitions.duration.shortest)},Re=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(t){var n=f.props;"blur"===t.type&&(n.onBlur&&e&&n.onBlur(t),je()),"mouseleave"===t.type&&n.onMouseLeave&&t.currentTarget===ie&&n.onMouseLeave(t),clearTimeout(fe.current),clearTimeout(de.current),t.persist(),de.current=setTimeout((function(){Ie(t)}),F)}},Ae=function(e){ue.current=!0;var t=f.props;t.onTouchStart&&t.onTouchStart(e)},Me=Object(v.a)(oe,t),De=Object(v.a)(Ee,Me),Ne=s.useCallback((function(e){Object(y.a)(De,c.findDOMNode(e))}),[De]),Le=Object(v.a)(f.ref,Ne);""===Q&&(ye=!1);var ze=!ye&&!k,Be=Object(r.a)({"aria-describedby":ye?be:null,title:ze&&"string"==typeof Q?Q:null},te,f.props,{className:Object(u.a)(te.className,f.props.className),onTouchStart:Ae,ref:Le}),Fe={};j||(Be.onTouchStart=function(e){Ae(e),clearTimeout(de.current),clearTimeout(le.current),clearTimeout(pe.current),e.persist(),pe.current=setTimeout((function(){_e()(e)}),D)},Be.onTouchEnd=function(e){f.props.onTouchEnd&&f.props.onTouchEnd(e),clearTimeout(pe.current),clearTimeout(de.current),e.persist(),de.current=setTimeout((function(){Ie(e)}),H)}),k||(Be.onMouseOver=_e(),Be.onMouseLeave=Re(),z&&(Fe.onMouseOver=_e(!1),Fe.onMouseLeave=Re(!1))),E||(Be.onFocus=Pe(),Be.onBlur=Re(),z&&(Fe.onFocus=Pe(!1),Fe.onBlur=Re(!1)));var We=s.useMemo((function(){return Object(l.a)({popperOptions:{modifiers:{arrow:{enabled:Boolean(se),element:se}}}},X)}),[se,X]);return s.createElement(s.Fragment,null,s.cloneElement(f,Be),s.createElement(Z,Object(r.a)({className:Object(u.a)(d.popper,z&&d.popperInteractive,a&&d.popperArrow),placement:K,anchorEl:ie,open:!!ie&&ye,id:Be["aria-describedby"],transition:!0},Fe,We),(function(e){var t=e.placement,n=e.TransitionProps;return s.createElement(J,Object(r.a)({timeout:ne.transitions.duration.shorter},n,ee),s.createElement("div",{className:Object(u.a)(d.tooltip,d["tooltipPlacement".concat(Object(p.a)(t.split("-")[0]))],ue.current&&d.touch,a&&d.tooltipArrow)},Q,a?s.createElement("span",{className:d.arrow,ref:ce}):null))})))}));t.a=Object(d.a)((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none"},popperInteractive:{pointerEvents:"auto"},popperArrow:{'&[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"}}},tooltip:{backgroundColor:Object(f.a)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(x(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},tooltipArrow:{position:"relative",margin:"0"},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:Object(f.a)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(x(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:Object(a.a)({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:Object(a.a)({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:Object(a.a)({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:Object(a.a)({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip",flip:!1})(E)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(674)),s=n(223),c=n(1123),u=n(82),l=n(64),f=n(31);function d(e){return"function"==typeof e?e():e}var p="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,h={},g=o.forwardRef((function(e,t){var n=e.anchorEl,g=e.children,v=e.container,m=e.disablePortal,y=void 0!==m&&m,b=e.keepMounted,w=void 0!==b&&b,_=e.modifiers,x=e.open,O=e.placement,S=void 0===O?"bottom":O,E=e.popperOptions,C=void 0===E?h:E,k=e.popperRef,T=e.style,j=e.transition,P=void 0!==j&&j,I=Object(i.a)(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),R=o.useRef(null),A=Object(f.a)(R,t),M=o.useRef(null),D=Object(f.a)(M,k),N=o.useRef(D);p((function(){N.current=D}),[D]),o.useImperativeHandle(k,(function(){return M.current}),[]);var L=o.useState(!0),z=L[0],B=L[1],F=function(e,t){if("ltr"===(t&&t.direction||"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}}(S,Object(s.a)()),W=o.useState(F),H=W[0],V=W[1];o.useEffect((function(){M.current&&M.current.update()}));var U=o.useCallback((function(){if(R.current&&n&&x){M.current&&(M.current.destroy(),N.current(null));var e=function(e){V(e.placement)},t=(d(n),new a.a(d(n),R.current,Object(r.a)({placement:F},C,{modifiers:Object(r.a)({},y?{}:{preventOverflow:{boundariesElement:"window"}},_,C.modifiers),onCreate:Object(u.a)(e,C.onCreate),onUpdate:Object(u.a)(e,C.onUpdate)})));N.current(t)}}),[n,y,_,x,F,C]),q=o.useCallback((function(e){Object(l.a)(A,e),U()}),[A,U]),G=function(){M.current&&(M.current.destroy(),N.current(null))};if(o.useEffect((function(){return function(){G()}}),[]),o.useEffect((function(){x||P||G()}),[x,P]),!w&&!x&&(!P||z))return null;var K={placement:H};return P&&(K.TransitionProps={in:x,onEnter:function(){B(!1)},onExited:function(){B(!0),G()}}),o.createElement(c.a,{disablePortal:y,container:v},o.createElement("div",Object(r.a)({ref:q,role:"tooltip"},I,{style:Object(r.a)({position:"fixed",top:0,left:0,display:x||!w||P?null:"none"},T)}),"function"==typeof g?g(K):g))}));t.a=g},function(e,t,n){"use strict";var r=n(0),i=n(33),o=(n(2),n(64)),a=n(31);var s="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,c=r.forwardRef((function(e,t){var n=e.children,c=e.container,u=e.disablePortal,l=void 0!==u&&u,f=e.onRendered,d=r.useState(null),p=d[0],h=d[1],g=Object(a.a)(r.isValidElement(n)?n.ref:null,t);return s((function(){l||h(function(e){return e="function"==typeof e?e():e,i.findDOMNode(e)}(c)||document.body)}),[c,l]),s((function(){if(p&&!l)return Object(o.a)(t,p),function(){Object(o.a)(t,null)}}),[t,p,l]),s((function(){f&&(p||l)&&f()}),[f,p,l]),l?r.isValidElement(n)?r.cloneElement(n,{ref:g}):n:p?i.createPortal(n,p):p}));t.a=c},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(104),u=o.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,l=e.component,f=void 0===l?"ul":l,d=e.dense,p=void 0!==d&&d,h=e.disablePadding,g=void 0!==h&&h,v=e.subheader,m=Object(i.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),y=o.useMemo((function(){return{dense:p}}),[p]);return o.createElement(c.a.Provider,{value:y},o.createElement(f,Object(r.a)({className:Object(a.a)(s.root,u,p&&s.dense,!g&&s.padding,v&&s.subheader),ref:t},m),v,n))}));t.a=Object(s.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(u)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(190),u=n(89),l=n(31),f=n(104),d=n(33),p="undefined"==typeof window?o.useEffect:o.useLayoutEffect,h=o.forwardRef((function(e,t){var n=e.alignItems,s=void 0===n?"center":n,h=e.autoFocus,g=void 0!==h&&h,v=e.button,m=void 0!==v&&v,y=e.children,b=e.classes,w=e.className,_=e.component,x=e.ContainerComponent,O=void 0===x?"li":x,S=e.ContainerProps,E=(S=void 0===S?{}:S).className,C=Object(i.a)(S,["className"]),k=e.dense,T=void 0!==k&&k,j=e.disabled,P=void 0!==j&&j,I=e.disableGutters,R=void 0!==I&&I,A=e.divider,M=void 0!==A&&A,D=e.focusVisibleClassName,N=e.selected,L=void 0!==N&&N,z=Object(i.a)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),B=o.useContext(f.a),F={dense:T||B.dense||!1,alignItems:s},W=o.useRef(null);p((function(){g&&W.current&&W.current.focus()}),[g]);var H=o.Children.toArray(y),V=H.length&&Object(u.a)(H[H.length-1],["ListItemSecondaryAction"]),U=o.useCallback((function(e){W.current=d.findDOMNode(e)}),[]),q=Object(l.a)(U,t),G=Object(r.a)({className:Object(a.a)(b.root,w,F.dense&&b.dense,!R&&b.gutters,M&&b.divider,P&&b.disabled,m&&b.button,"center"!==s&&b.alignItemsFlexStart,V&&b.secondaryAction,L&&b.selected),disabled:P},z),K=_||"li";return m&&(G.component=_||"div",G.focusVisibleClassName=Object(a.a)(b.focusVisible,D),K=c.a),V?(K=G.component||_?K:"div","li"===O&&("li"===K?K="div":"li"===G.component&&(G.component="div")),o.createElement(f.a.Provider,{value:F},o.createElement(O,Object(r.a)({className:Object(a.a)(b.container,E),ref:q},C),o.createElement(K,G,H),H.pop()))):o.createElement(f.a.Provider,{value:F},o.createElement(K,Object(r.a)({ref:q},G),H))}));t.a=Object(s.a)((function(e){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:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.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(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(h)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),i=n(4),o=n(0),a=n.n(o),s=n(3),c=(n(2),n(83)),u=n.n(c),l=n(763);function f(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function d(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.name,c=Object(i.a)(n,["name"]);var d,p=o,h="function"==typeof t?function(e){return{root:function(n){return t(Object(r.a)({theme:e},n))}}}:{root:t},g=Object(l.a)(h,Object(r.a)({Component:e,name:o||e.displayName,classNamePrefix:p},c));t.filterProps&&(d=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var v=a.a.forwardRef((function(t,n){var o=t.children,c=t.className,u=t.clone,l=t.component,p=Object(i.a)(t,["children","className","clone","component"]),h=g(t),v=Object(s.a)(h.root,c),m=p;if(d&&(m=f(m,d)),u)return a.a.cloneElement(o,Object(r.a)({className:Object(s.a)(o.props.className,v)},m));if("function"==typeof o)return o(Object(r.a)({className:v},m));var y=l||e;return a.a.createElement(y,Object(r.a)({ref:n,className:v},m),o)}));return u()(v,e),v}}},function(e,t,n){"use strict";var r=n(1),i=n(41),o=n(4),a=n(0),s=n(3),c=(n(2),n(372)),u=n(5),l=n(49),f=n(55),d=n(36),p=n(31),h=a.forwardRef((function(e,t){var n=e.children,u=e.classes,h=e.className,g=e.collapsedHeight,v=e.collapsedSize,m=void 0===v?"0px":v,y=e.component,b=void 0===y?"div":y,w=e.disableStrictModeCompat,_=void 0!==w&&w,x=e.in,O=e.onEnter,S=e.onEntered,E=e.onEntering,C=e.onExit,k=e.onExited,T=e.onExiting,j=e.style,P=e.timeout,I=void 0===P?l.b.standard:P,R=e.TransitionComponent,A=void 0===R?c.a:R,M=Object(o.a)(e,["children","classes","className","collapsedHeight","collapsedSize","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),D=Object(d.a)(),N=a.useRef(),L=a.useRef(null),z=a.useRef(),B="number"==typeof(g||m)?"".concat(g||m,"px"):g||m;a.useEffect((function(){return function(){clearTimeout(N.current)}}),[]);var F=D.unstable_strictMode&&!_,W=a.useRef(null),H=Object(p.a)(t,F?W:void 0),V=function(e){return function(t,n){if(e){var r=F?[W.current,t]:[t,n],o=Object(i.a)(r,2),a=o[0],s=o[1];void 0===s?e(a):e(a,s)}}},U=V((function(e,t){e.style.height=B,O&&O(e,t)})),q=V((function(e,t){var n=L.current?L.current.clientHeight:0,r=Object(f.a)({style:j,timeout:I},{mode:"enter"}).duration;if("auto"===I){var i=D.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(i,"ms"),z.current=i}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style.height="".concat(n,"px"),E&&E(e,t)})),G=V((function(e,t){e.style.height="auto",S&&S(e,t)})),K=V((function(e){var t=L.current?L.current.clientHeight:0;e.style.height="".concat(t,"px"),C&&C(e)})),$=V(k),Z=V((function(e){var t=L.current?L.current.clientHeight:0,n=Object(f.a)({style:j,timeout:I},{mode:"exit"}).duration;if("auto"===I){var r=D.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(r,"ms"),z.current=r}else e.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");e.style.height=B,T&&T(e)}));return a.createElement(A,Object(r.a)({in:x,onEnter:U,onEntered:G,onEntering:q,onExit:K,onExited:$,onExiting:Z,addEndListener:function(e,t){var n=F?e:t;"auto"===I&&(N.current=setTimeout(n,z.current||0))},nodeRef:F?W:void 0,timeout:"auto"===I?null:I},M),(function(e,t){return a.createElement(b,Object(r.a)({className:Object(s.a)(u.root,u.container,h,{entered:u.entered,exited:!x&&"0px"===B&&u.hidden}[e]),style:Object(r.a)({minHeight:B},j),ref:H},t),a.createElement("div",{className:u.wrapper,ref:L},a.createElement("div",{className:u.wrapperInner},n)))}))}));h.muiSupportAuto=!0,t.a=Object(u.a)((function(e){return{root:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}}),{name:"MuiCollapse"})(h)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(33)),s=n(73),c=n(372),u=n(31),l=n(36),f=n(49),d=n(55);function p(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var i=window.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var s=n.split("(")[1].split(")")[0].split(",");o=parseInt(s[4],10),a=parseInt(s[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(o-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-o,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var h={enter:f.b.enteringScreen,exit:f.b.leavingScreen},g=o.forwardRef((function(e,t){var n=e.children,f=e.direction,g=void 0===f?"down":f,v=e.in,m=e.onEnter,y=e.onEntered,b=e.onEntering,w=e.onExit,_=e.onExited,x=e.onExiting,O=e.style,S=e.timeout,E=void 0===S?h:S,C=e.TransitionComponent,k=void 0===C?c.a:C,T=Object(i.a)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),j=Object(l.a)(),P=o.useRef(null),I=o.useCallback((function(e){P.current=a.findDOMNode(e)}),[]),R=Object(u.a)(n.ref,I),A=Object(u.a)(R,t),M=function(e){return function(t){e&&(void 0===t?e(P.current):e(P.current,t))}},D=M((function(e,t){p(g,e),Object(d.b)(e),m&&m(e,t)})),N=M((function(e,t){var n=Object(d.a)({timeout:E,style:O},{mode:"enter"});e.style.webkitTransition=j.transitions.create("-webkit-transform",Object(r.a)({},n,{easing:j.transitions.easing.easeOut})),e.style.transition=j.transitions.create("transform",Object(r.a)({},n,{easing:j.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",b&&b(e,t)})),L=M(y),z=M(x),B=M((function(e){var t=Object(d.a)({timeout:E,style:O},{mode:"exit"});e.style.webkitTransition=j.transitions.create("-webkit-transform",Object(r.a)({},t,{easing:j.transitions.easing.sharp})),e.style.transition=j.transitions.create("transform",Object(r.a)({},t,{easing:j.transitions.easing.sharp})),p(g,e),w&&w(e)})),F=M((function(e){e.style.webkitTransition="",e.style.transition="",_&&_(e)})),W=o.useCallback((function(){P.current&&p(g,P.current)}),[g]);return o.useEffect((function(){if(!v&&"down"!==g&&"right"!==g){var e=Object(s.a)((function(){P.current&&p(g,P.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[g,v]),o.useEffect((function(){v||W()}),[v,W]),o.createElement(k,Object(r.a)({nodeRef:P,onEnter:D,onEntered:L,onEntering:N,onExit:B,onExited:F,onExiting:z,appear:!0,in:v,timeout:E},T),(function(e,t){return o.cloneElement(n,Object(r.a)({ref:A,style:Object(r.a)({visibility:"exited"!==e||v?void 0:"hidden"},O,n.props.style)},t))}))}));t.a=g},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(760),c=n(5),u=o.forwardRef((function(e,t){var n=e.disableUnderline,c=e.classes,u=e.fullWidth,l=void 0!==u&&u,f=e.inputComponent,d=void 0===f?"input":f,p=e.multiline,h=void 0!==p&&p,g=e.type,v=void 0===g?"text":g,m=Object(i.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return o.createElement(s.a,Object(r.a)({classes:Object(r.a)({},c,{root:Object(a.a)(c.root,!n&&c.underline),underline:null}),fullWidth:l,inputComponent:d,multiline:h,ref:t,type:v},m))}));u.muiName="Input",t.a=Object(c.a)((function(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:r,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(u)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(73)),s=n(31);function c(e,t){return parseInt(e[t],10)||0}var u="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,l={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},f=o.forwardRef((function(e,t){var n=e.onChange,f=e.rows,d=e.rowsMax,p=e.rowsMin,h=e.maxRows,g=e.minRows,v=void 0===g?1:g,m=e.style,y=e.value,b=Object(i.a)(e,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),w=h||d,_=f||p||v,x=o.useRef(null!=y).current,O=o.useRef(null),S=Object(s.a)(t,O),E=o.useRef(null),C=o.useRef(0),k=o.useState({}),T=k[0],j=k[1],P=o.useCallback((function(){var t=O.current,n=window.getComputedStyle(t),r=E.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");var i=n["box-sizing"],o=c(n,"padding-bottom")+c(n,"padding-top"),a=c(n,"border-bottom-width")+c(n,"border-top-width"),s=r.scrollHeight-o;r.value="x";var u=r.scrollHeight-o,l=s;_&&(l=Math.max(Number(_)*u,l)),w&&(l=Math.min(Number(w)*u,l));var f=(l=Math.max(l,u))+("border-box"===i?o+a:0),d=Math.abs(l-s)<=1;j((function(e){return C.current<20&&(f>0&&Math.abs((e.outerHeightStyle||0)-f)>1||e.overflow!==d)?(C.current+=1,{overflow:d,outerHeightStyle:f}):e}))}),[w,_,e.placeholder]);o.useEffect((function(){var e=Object(a.a)((function(){C.current=0,P()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[P]),u((function(){P()})),o.useEffect((function(){C.current=0}),[y]);return o.createElement(o.Fragment,null,o.createElement("textarea",Object(r.a)({value:y,onChange:function(e){C.current=0,x||P(),n&&n(e)},ref:S,rows:_,style:Object(r.a)({height:T.outerHeightStyle,overflow:T.overflow?"hidden":null},m)},b)),o.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:E,tabIndex:-1,style:Object(r.a)({},l,m)}))}));t.a=f},function(e,t,n){"use strict";var r=n(4),i=n(1),o=n(0),a=(n(2),n(3)),s=n(102),c=n(81),u=n(5),l=o.forwardRef((function(e,t){var n=e.children,u=e.classes,l=e.className,f=e.component,d=void 0===f?"p":f,p=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,Object(r.a)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),h=Object(c.a)(),g=Object(s.a)({props:e,muiFormControl:h,states:["variant","margin","disabled","error","filled","focused","required"]});return o.createElement(d,Object(i.a)({className:Object(a.a)(u.root,("filled"===g.variant||"outlined"===g.variant)&&u.contained,l,g.disabled&&u.disabled,g.error&&u.error,g.filled&&u.filled,g.focused&&u.focused,g.required&&u.required,"dense"===g.margin&&u.marginDense),ref:t},p)," "===n?o.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):n)}));t.a=Object(u.a)((function(e){return{root:Object(i.a)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(l)},function(e,t,n){"use strict";var r=n(4),i=n(1),o=n(0),a=(n(2),n(3)),s=n(102),c=n(81),u=n(11),l=n(5),f=o.forwardRef((function(e,t){var n=e.children,l=e.classes,f=e.className,d=(e.color,e.component),p=void 0===d?"label":d,h=(e.disabled,e.error,e.filled,e.focused,e.required,Object(r.a)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),g=Object(c.a)(),v=Object(s.a)({props:e,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]});return o.createElement(p,Object(i.a)({className:Object(a.a)(l.root,l["color".concat(Object(u.a)(v.color||"primary"))],f,v.disabled&&l.disabled,v.error&&l.error,v.filled&&l.filled,v.focused&&l.focused,v.required&&l.required),ref:t},h),n,v.required&&o.createElement("span",{"aria-hidden":!0,className:Object(a.a)(l.asterisk,v.error&&l.error)},"","*"))}));t.a=Object(l.a)((function(e){return{root:Object(i.a)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(f)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(0),o=n(223),a=n(475);function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(o.a)(),s=Object(a.a)({theme:n,name:"MuiUseMediaQuery",props:{}});var c="function"==typeof e?e(n):e;c=c.replace(/^@media( ?)/m,"");var u="undefined"!=typeof window&&void 0!==window.matchMedia,l=Object(r.a)({},s,t),f=l.defaultMatches,d=void 0!==f&&f,p=l.matchMedia,h=void 0===p?u?window.matchMedia:null:p,g=l.noSsr,v=void 0!==g&&g,m=l.ssrMatchMedia,y=void 0===m?null:m,b=i.useState((function(){return v&&u?h(c).matches:y?y(c).matches:d})),w=b[0],_=b[1];return i.useEffect((function(){var e=!0;if(u){var t=h(c),n=function(){e&&_(t.matches)};return n(),t.addListener(n),function(){e=!1,t.removeListener(n)}}}),[c,h,u]),w}},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(102),c=n(81),u=n(5),l=n(1132),f=o.forwardRef((function(e,t){var n=e.classes,u=e.className,f=e.disableAnimation,d=void 0!==f&&f,p=(e.margin,e.shrink),h=(e.variant,Object(i.a)(e,["classes","className","disableAnimation","margin","shrink","variant"])),g=Object(c.a)(),v=p;void 0===v&&g&&(v=g.filled||g.focused||g.adornedStart);var m=Object(s.a)({props:e,muiFormControl:g,states:["margin","variant"]});return o.createElement(l.a,Object(r.a)({"data-shrink":v,className:Object(a.a)(n.root,u,g&&n.formControl,!d&&n.animated,v&&n.shrink,"dense"===m.margin&&n.marginDense,{filled:n.filled,outlined:n.outlined}[m.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:t},h))}));t.a=Object(u.a)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(f)},function(e,t,n){"use strict";var r=n(4),i=n(27),o=n(1),a=n(0),s=(n(2),n(3)),c=n(5),u=n(140),l=n(24),f=a.forwardRef((function(e,t){var n=e.action,i=e.classes,c=e.className,l=e.message,f=e.role,d=void 0===f?"alert":f,p=Object(r.a)(e,["action","classes","className","message","role"]);return a.createElement(u.a,Object(o.a)({role:d,square:!0,elevation:6,className:Object(s.a)(i.root,c),ref:t},p),a.createElement("div",{className:i.message},l),n?a.createElement("div",{className:i.action},n):null)}));t.a=Object(c.a)((function(e){var t="light"===e.palette.type?.8:.98,n=Object(l.d)(e.palette.background.default,t);return{root:Object(o.a)({},e.typography.body2,Object(i.a)({color:e.palette.getContrastText(n),backgroundColor:n,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}}}),{name:"MuiSnackbarContent"})(f)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(760),c=n(27),u=n(5),l=n(36),f=n(11),d=o.forwardRef((function(e,t){e.children;var n=e.classes,s=e.className,u=e.label,d=e.labelWidth,p=e.notched,h=e.style,g=Object(i.a)(e,["children","classes","className","label","labelWidth","notched","style"]),v="rtl"===Object(l.a)().direction?"right":"left";if(void 0!==u)return o.createElement("fieldset",Object(r.a)({"aria-hidden":!0,className:Object(a.a)(n.root,s),ref:t,style:h},g),o.createElement("legend",{className:Object(a.a)(n.legendLabelled,p&&n.legendNotched)},u?o.createElement("span",null,u):o.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})));var m=d>0?.75*d+8:.01;return o.createElement("fieldset",Object(r.a)({"aria-hidden":!0,style:Object(r.a)(Object(c.a)({},"padding".concat(Object(f.a)(v)),8),h),className:Object(a.a)(n.root,s),ref:t},g),o.createElement("legend",{className:n.legend,style:{width:p?m:.01}},o.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))})),p=Object(u.a)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(d),h=o.forwardRef((function(e,t){var n=e.classes,c=e.fullWidth,u=void 0!==c&&c,l=e.inputComponent,f=void 0===l?"input":l,d=e.label,h=e.labelWidth,g=void 0===h?0:h,v=e.multiline,m=void 0!==v&&v,y=e.notched,b=e.type,w=void 0===b?"text":b,_=Object(i.a)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return o.createElement(s.a,Object(r.a)({renderSuffix:function(e){return o.createElement(p,{className:n.notchedOutline,label:d,labelWidth:g,notched:void 0!==y?y:Boolean(e.startAdornment||e.filled||e.focused)})},classes:Object(r.a)({},n,{root:Object(a.a)(n.root,n.underline),notchedOutline:null}),fullWidth:u,inputComponent:f,multiline:m,ref:t,type:w},_))}));h.muiName="Input";t.a=Object(u.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(h)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(1147)),s=n(41),c=n(70),u=n(247),l=(n(67),n(3)),f=n(47),d=n(11),p=n(675),h=n(184),g=n(31),v=n(75);function m(e,t){return"object"===Object(c.a)(t)&&null!==t?e===t:String(e)===String(t)}var y=o.forwardRef((function(e,t){var n=e["aria-label"],a=e.autoFocus,c=e.autoWidth,y=e.children,b=e.classes,w=e.className,_=e.defaultValue,x=e.disabled,O=e.displayEmpty,S=e.IconComponent,E=e.inputRef,C=e.labelId,k=e.MenuProps,T=void 0===k?{}:k,j=e.multiple,P=e.name,I=e.onBlur,R=e.onChange,A=e.onClose,M=e.onFocus,D=e.onOpen,N=e.open,L=e.readOnly,z=e.renderValue,B=e.SelectDisplayProps,F=void 0===B?{}:B,W=e.tabIndex,H=(e.type,e.value),V=e.variant,U=void 0===V?"standard":V,q=Object(i.a)(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),G=Object(v.a)({controlled:H,default:_,name:"Select"}),K=Object(s.a)(G,2),$=K[0],Z=K[1],X=o.useRef(null),Q=o.useState(null),Y=Q[0],J=Q[1],ee=o.useRef(null!=N).current,te=o.useState(),ne=te[0],re=te[1],ie=o.useState(!1),oe=ie[0],ae=ie[1],se=Object(g.a)(t,E);o.useImperativeHandle(se,(function(){return{focus:function(){Y.focus()},node:X.current,value:$}}),[Y,$]),o.useEffect((function(){a&&Y&&Y.focus()}),[a,Y]),o.useEffect((function(){if(Y){var e=Object(f.a)(Y).getElementById(C);if(e){var t=function(){getSelection().isCollapsed&&Y.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[C,Y]);var ce,ue,le=function(e,t){e?D&&D(t):A&&A(t),ee||(re(c?null:Y.clientWidth),ae(e))},fe=o.Children.toArray(y),de=function(e){return function(t){var n;if(j||le(!1,t),j){n=Array.isArray($)?$.slice():[];var r=$.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),$!==n&&(Z(n),R&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:P}}),R(t,e)))}},pe=null!==Y&&(ee?N:oe);delete q["aria-invalid"];var he=[],ge=!1;(Object(h.b)({value:$})||O)&&(z?ce=z($):ge=!0);var ve=fe.map((function(e){if(!o.isValidElement(e))return null;var t;if(j){if(!Array.isArray($))throw new Error(Object(u.a)(2));(t=$.some((function(t){return m(t,e.props.value)})))&&ge&&he.push(e.props.children)}else(t=m($,e.props.value))&&ge&&(ue=e.props.children);return t&&!0,o.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:de(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ge&&(ce=j?he.join(", "):ue);var me,ye=ne;!c&&ee&&Y&&(ye=Y.clientWidth),me=void 0!==W?W:x?null:0;var be=F.id||(P?"mui-component-select-".concat(P):void 0);return o.createElement(o.Fragment,null,o.createElement("div",Object(r.a)({className:Object(l.a)(b.root,b.select,b.selectMenu,b[U],w,x&&b.disabled),ref:J,tabIndex:me,role:"button","aria-disabled":x?"true":void 0,"aria-expanded":pe?"true":void 0,"aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[C,be].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){if(!L){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),le(!0,e))}},onMouseDown:x||L?null:function(e){0===e.button&&(e.preventDefault(),Y.focus(),le(!0,e))},onBlur:function(e){!pe&&I&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:$,name:P}}),I(e))},onFocus:M},F,{id:be}),function(e){return null==e||"string"==typeof e&&!e.trim()}(ce)?o.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):ce),o.createElement("input",Object(r.a)({value:Array.isArray($)?$.join(","):$,name:P,ref:X,"aria-hidden":!0,onChange:function(e){var t=fe.map((function(e){return e.props.value})).indexOf(e.target.value);if(-1!==t){var n=fe[t];Z(n.props.value),R&&R(e,n)}},tabIndex:-1,className:b.nativeInput,autoFocus:a},q)),o.createElement(S,{className:Object(l.a)(b.icon,b["icon".concat(Object(d.a)(U))],pe&&b.iconOpen,x&&b.disabled)}),o.createElement(p.a,Object(r.a)({id:"menu-".concat(P||""),anchorEl:Y,open:pe,onClose:function(e){le(!1,e)}},T,{MenuListProps:Object(r.a)({"aria-labelledby":C,role:"listbox",disableListWrap:!0},T.MenuListProps),PaperProps:Object(r.a)({},T.PaperProps,{style:Object(r.a)({minWidth:ye},null!=T.PaperProps?T.PaperProps.style:null)})}),ve))})),b=n(102),w=n(81),_=n(5),x=n(341),O=n(761),S=n(676),E=n(342),C=n(1129),k=n(1136),T=S.b,j=o.createElement(O.a,null),P=o.createElement(C.a,null),I=o.forwardRef((function e(t,n){var s=t.autoWidth,c=void 0!==s&&s,u=t.children,l=t.classes,f=t.displayEmpty,d=void 0!==f&&f,p=t.IconComponent,h=void 0===p?x.a:p,g=t.id,v=t.input,m=t.inputProps,_=t.label,O=t.labelId,S=t.labelWidth,C=void 0===S?0:S,T=t.MenuProps,I=t.multiple,R=void 0!==I&&I,A=t.native,M=void 0!==A&&A,D=t.onClose,N=t.onOpen,L=t.open,z=t.renderValue,B=t.SelectDisplayProps,F=t.variant,W=void 0===F?"standard":F,H=Object(i.a)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),V=M?E.a:y,U=Object(w.a)(),q=Object(b.a)({props:t,muiFormControl:U,states:["variant"]}).variant||W,G=v||{standard:j,outlined:o.createElement(k.a,{label:_,labelWidth:C}),filled:P}[q];return o.cloneElement(G,Object(r.a)({inputComponent:V,inputProps:Object(r.a)({children:u,IconComponent:h,variant:q,type:void 0,multiple:R},M?{id:g}:{autoWidth:c,displayEmpty:d,labelId:O,MenuProps:T,onClose:D,onOpen:N,open:L,renderValue:z,SelectDisplayProps:Object(r.a)({id:g},B)},m,{classes:m?Object(a.a)({baseClasses:l,newClasses:m.classes,Component:e}):l},v?v.props.inputProps:{}),ref:n},H))}));I.muiName="Select";t.a=Object(_.a)(T,{name:"MuiSelect"})(I)},,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var i=Object(r.a)({},t);return Object.keys(n).forEach((function(e){n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))})),i}},function(e,t,n){"use strict";var r=n(0),i=n(33),o=(n(2),n(47)),a=n(31);t.a=function(e){var t=e.children,n=e.disableAutoFocus,s=void 0!==n&&n,c=e.disableEnforceFocus,u=void 0!==c&&c,l=e.disableRestoreFocus,f=void 0!==l&&l,d=e.getDoc,p=e.isEnabled,h=e.open,g=r.useRef(),v=r.useRef(null),m=r.useRef(null),y=r.useRef(),b=r.useRef(null),w=r.useCallback((function(e){b.current=i.findDOMNode(e)}),[]),_=Object(a.a)(t.ref,w),x=r.useRef();return r.useEffect((function(){x.current=h}),[h]),!x.current&&h&&"undefined"!=typeof window&&(y.current=d().activeElement),r.useEffect((function(){if(h){var e=Object(o.a)(b.current);s||!b.current||b.current.contains(e.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex",-1),b.current.focus());var t=function(){null!==b.current&&(e.hasFocus()&&!u&&p()&&!g.current?b.current&&!b.current.contains(e.activeElement)&&b.current.focus():g.current=!1)},n=function(t){!u&&p()&&9===t.keyCode&&e.activeElement===b.current&&(g.current=!0,t.shiftKey?m.current.focus():v.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var r=setInterval((function(){t()}),50);return function(){clearInterval(r),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),f||(y.current&&y.current.focus&&y.current.focus(),y.current=null)}}}),[s,u,f,p,h]),r.createElement(r.Fragment,null,r.createElement("div",{tabIndex:0,ref:v,"data-test":"sentinelStart"}),r.cloneElement(t,{ref:_}),r.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelEnd"}))}},function(e,t,n){"use strict";function r(e){return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(1),i=n(77),o=n(60),a=n(0),s=n.n(a),c=n(59),u=n(242),l=n(756),f=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,e),this.options=t}return Object(o.a)(e,[{key:"collect",value:function(e){var t=new Map;this.sheetsRegistry=new c.b;var n=Object(l.a)();return s.a.createElement(u.b,Object(r.a)({sheetsManager:t,serverGenerateClassName:n,sheetsRegistry:this.sheetsRegistry},this.options),e)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(e){return s.a.createElement("style",Object(r.a)({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},e))}}]),e}()},function(e,t,n){"use strict";var r=n(1),i=n(0),o=n.n(i),a=(n(2),n(332)),s=n(223),c=n(334);t.a=function(e){var t=e.children,n=e.theme,i=Object(s.a)(),u=o.a.useMemo((function(){var e=null===i?n:function(e,t){return"function"==typeof t?t(e):Object(r.a)({},e,t)}(i,n);return null!=e&&(e[c.a]=null!==i),e}),[n,i]);return o.a.createElement(a.a.Provider,{value:u},t)}},function(e,t,n){"use strict";var r=n(1),i=n(339),o=n(41),a=n(4),s=n(0),c=(n(67),n(2),n(3)),u=n(1127),l=n(140),f=n(5),d=n(340),p=n(75),h=s.forwardRef((function(e,t){var n=e.children,f=e.classes,h=e.className,g=e.defaultExpanded,v=void 0!==g&&g,m=e.disabled,y=void 0!==m&&m,b=e.expanded,w=e.onChange,_=e.square,x=void 0!==_&&_,O=e.TransitionComponent,S=void 0===O?u.a:O,E=e.TransitionProps,C=Object(a.a)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),k=Object(p.a)({controlled:b,default:v,name:"Accordion",state:"expanded"}),T=Object(o.a)(k,2),j=T[0],P=T[1],I=s.useCallback((function(e){P(!j),w&&w(e,!j)}),[j,w,P]),R=s.Children.toArray(n),A=Object(i.a)(R),M=A[0],D=A.slice(1),N=s.useMemo((function(){return{expanded:j,disabled:y,toggle:I}}),[j,y,I]);return s.createElement(l.a,Object(r.a)({className:Object(c.a)(f.root,h,j&&f.expanded,y&&f.disabled,!x&&f.rounded),ref:t,square:x},C),s.createElement(d.a.Provider,{value:N},M),s.createElement(S,Object(r.a)({in:j,timeout:"auto"},E),s.createElement("div",{"aria-labelledby":M.props.id,id:M.props["aria-controls"],role:"region"},D)))}));t.a=Object(f.a)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&: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"],t)},"&: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:{}}}),{name:"MuiAccordion"})(h)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=o.forwardRef((function(e,t){var n=e.classes,s=e.className,c=Object(i.a)(e,["classes","className"]);return o.createElement("div",Object(r.a)({className:Object(a.a)(n.root,s),ref:t},c))}));t.a=Object(s.a)((function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}}),{name:"MuiAccordionDetails"})(c)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(190),c=n(757),u=n(5),l=n(340),f=o.forwardRef((function(e,t){var n=e.children,u=e.classes,f=e.className,d=e.expandIcon,p=e.focusVisibleClassName,h=e.IconButtonProps,g=void 0===h?{}:h,v=e.onClick,m=Object(i.a)(e,["children","classes","className","expandIcon","focusVisibleClassName","IconButtonProps","onClick"]),y=o.useContext(l.a),b=y.disabled,w=void 0!==b&&b,_=y.expanded,x=y.toggle;return o.createElement(s.a,Object(r.a)({focusRipple:!1,disableRipple:!0,disabled:w,component:"div","aria-expanded":_,className:Object(a.a)(u.root,f,w&&u.disabled,_&&u.expanded),focusVisibleClassName:Object(a.a)(u.focusVisible,u.focused,p),onClick:function(e){x&&x(e),v&&v(e)},ref:t},m),o.createElement("div",{className:Object(a.a)(u.content,_&&u.expanded)},n),d&&o.createElement(c.a,Object(r.a)({className:Object(a.a)(u.expandIcon,_&&u.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},g),d))}));t.a=Object(u.a)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),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"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiAccordionSummary"})(f)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(11),u=n(140),l=o.forwardRef((function(e,t){var n=e.classes,s=e.className,l=e.color,f=void 0===l?"primary":l,d=e.position,p=void 0===d?"fixed":d,h=Object(i.a)(e,["classes","className","color","position"]);return o.createElement(u.a,Object(r.a)({square:!0,component:"header",elevation:4,className:Object(a.a)(n.root,n["position".concat(Object(c.a)(p))],n["color".concat(Object(c.a)(f))],s,"fixed"===p&&"mui-fixed"),ref:t},h))}));t.a=Object(s.a)((function(e){var t="light"===e.palette.type?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:t,color:e.palette.getContrastText(t)},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"}}}),{name:"MuiAppBar"})(l)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(140),c=n(5),u=o.forwardRef((function(e,t){var n=e.classes,c=e.className,u=e.raised,l=void 0!==u&&u,f=Object(i.a)(e,["classes","className","raised"]);return o.createElement(s.a,Object(r.a)({className:Object(a.a)(n.root,c),elevation:l?8:1,ref:t},f))}));t.a=Object(c.a)({root:{overflow:"hidden"}},{name:"MuiCard"})(u)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=o.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.component,u=void 0===c?"div":c,l=Object(i.a)(e,["classes","className","component"]);return o.createElement(u,Object(r.a)({className:Object(a.a)(n.root,s),ref:t},l))}));t.a=Object(s.a)({root:{padding:16,"&:last-child":{paddingBottom:24}}},{name:"MuiCardContent"})(c)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(11),u=o.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.color,l=void 0===u?"primary":u,f=e.disableShrink,d=void 0!==f&&f,p=e.size,h=void 0===p?40:p,g=e.style,v=e.thickness,m=void 0===v?3.6:v,y=e.value,b=void 0===y?0:y,w=e.variant,_=void 0===w?"indeterminate":w,x=Object(i.a)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),O={},S={},E={};if("determinate"===_||"static"===_){var C=2*Math.PI*((44-m)/2);O.strokeDasharray=C.toFixed(3),E["aria-valuenow"]=Math.round(b),O.strokeDashoffset="".concat(((100-b)/100*C).toFixed(3),"px"),S.transform="rotate(-90deg)"}return o.createElement("div",Object(r.a)({className:Object(a.a)(n.root,s,"inherit"!==l&&n["color".concat(Object(c.a)(l))],{determinate:n.determinate,indeterminate:n.indeterminate,static:n.static}[_]),style:Object(r.a)({width:h,height:h},S,g),ref:t,role:"progressbar"},E,x),o.createElement("svg",{className:n.svg,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44)},o.createElement("circle",{className:Object(a.a)(n.circle,d&&n.circleDisableShrink,{determinate:n.circleDeterminate,indeterminate:n.circleIndeterminate,static:n.circleStatic}[_]),style:O,cx:44,cy:44,r:(44-m)/2,fill:"none",strokeWidth:m})))}));t.a=Object(s.a)((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(u)},function(e,t,n){"use strict";var r=n(4),i=n(1),o=n(0),a=(n(2),n(3)),s=n(5),c=n(190),u=n(11),l=o.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,f=e.color,d=void 0===f?"default":f,p=e.component,h=void 0===p?"button":p,g=e.disabled,v=void 0!==g&&g,m=e.disableFocusRipple,y=void 0!==m&&m,b=e.focusVisibleClassName,w=e.size,_=void 0===w?"large":w,x=e.variant,O=void 0===x?"circular":x,S=Object(r.a)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return o.createElement(c.a,Object(i.a)({className:Object(a.a)(s.root,l,"large"!==_&&s["size".concat(Object(u.a)(_))],v&&s.disabled,"extended"===O&&s.extended,{primary:s.primary,secondary:s.secondary,inherit:s.colorInherit}[d]),component:h,disabled:v,focusRipple:!y,focusVisibleClassName:Object(a.a)(s.focusVisible,b),ref:t},S),o.createElement("span",{className:s.label},n))}));t.a=Object(s.a)((function(e){return{root:Object(i.a)({},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:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(l)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(81),c=n(5),u=n(96),l=n(11),f=o.forwardRef((function(e,t){e.checked;var n=e.classes,c=e.className,f=e.control,d=e.disabled,p=(e.inputRef,e.label),h=e.labelPlacement,g=void 0===h?"end":h,v=(e.name,e.onChange,e.value,Object(i.a)(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"])),m=Object(s.a)(),y=d;void 0===y&&void 0!==f.props.disabled&&(y=f.props.disabled),void 0===y&&m&&(y=m.disabled);var b={disabled:y};return["checked","name","onChange","value","inputRef"].forEach((function(t){void 0===f.props[t]&&void 0!==e[t]&&(b[t]=e[t])})),o.createElement("label",Object(r.a)({className:Object(a.a)(n.root,c,"end"!==g&&n["labelPlacement".concat(Object(l.a)(g))],y&&n.disabled),ref:t},v),o.cloneElement(f,b),o.createElement(u.a,{component:"span",className:Object(a.a)(n.label,y&&n.disabled)},p))}));t.a=Object(c.a)((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}}}}),{name:"MuiFormControlLabel"})(f)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(96),c=n(5),u=n(125),l=o.forwardRef((function(e,t){var n=e.children,c=e.classes,l=e.className,f=e.component,d=void 0===f?"div":f,p=e.disablePointerEvents,h=void 0!==p&&p,g=e.disableTypography,v=void 0!==g&&g,m=e.position,y=e.variant,b=Object(i.a)(e,["children","classes","className","component","disablePointerEvents","disableTypography","position","variant"]),w=Object(u.b)()||{},_=y;return y&&w.variant,w&&!_&&(_=w.variant),o.createElement(u.a.Provider,{value:null},o.createElement(d,Object(r.a)({className:Object(a.a)(c.root,l,"end"===m?c.positionEnd:c.positionStart,h&&c.disablePointerEvents,w.hiddenLabel&&c.hiddenLabel,"filled"===_&&c.filled,"dense"===w.margin&&c.marginDense),ref:t},b),"string"!=typeof n||v?n:o.createElement(s.a,{color:"textSecondary"},n)))}));t.a=Object(c.a)({root:{display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap"},filled:{"&$positionStart:not($hiddenLabel)":{marginTop:16}},positionStart:{marginRight:8},positionEnd:{marginLeft:8},disablePointerEvents:{pointerEvents:"none"},hiddenLabel:{},marginDense:{}},{name:"MuiInputAdornment"})(l)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(11),c=n(5),u=n(118),l=n(31),f=n(96),d=o.forwardRef((function(e,t){var n=e.classes,c=e.className,d=e.color,p=void 0===d?"primary":d,h=e.component,g=void 0===h?"a":h,v=e.onBlur,m=e.onFocus,y=e.TypographyClasses,b=e.underline,w=void 0===b?"hover":b,_=e.variant,x=void 0===_?"inherit":_,O=Object(i.a)(e,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),S=Object(u.a)(),E=S.isFocusVisible,C=S.onBlurVisible,k=S.ref,T=o.useState(!1),j=T[0],P=T[1],I=Object(l.a)(t,k);return o.createElement(f.a,Object(r.a)({className:Object(a.a)(n.root,n["underline".concat(Object(s.a)(w))],c,j&&n.focusVisible,"button"===g&&n.button),classes:y,color:p,component:g,onBlur:function(e){j&&(C(),P(!1)),v&&v(e)},onFocus:function(e){E(e)&&P(!0),m&&m(e)},ref:I,variant:x},O))}));t.a=Object(c.a)({root:{},underlineNone:{textDecoration:"none"},underlineHover:{textDecoration:"none","&:hover":{textDecoration:"underline"}},underlineAlways:{textDecoration:"underline"},button:{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","&::-moz-focus-inner":{borderStyle:"none"},"&$focusVisible":{outline:"auto"}},focusVisible:{}},{name:"MuiLink"})(d)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(11),u=o.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.color,l=void 0===u?"default":u,f=e.component,d=void 0===f?"li":f,p=e.disableGutters,h=void 0!==p&&p,g=e.disableSticky,v=void 0!==g&&g,m=e.inset,y=void 0!==m&&m,b=Object(i.a)(e,["classes","className","color","component","disableGutters","disableSticky","inset"]);return o.createElement(d,Object(r.a)({className:Object(a.a)(n.root,s,"default"!==l&&n["color".concat(Object(c.a)(l))],y&&n.inset,!v&&n.sticky,!h&&n.gutters),ref:t},b))}));t.a=Object(s.a)((function(e){return{root:{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:e.palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},colorPrimary:{color:e.palette.primary.main},colorInherit:{color:"inherit"},gutters:{paddingLeft:16,paddingRight:16},inset:{paddingLeft:72},sticky:{position:"sticky",top:0,zIndex:1,backgroundColor:"inherit"}}}),{name:"MuiListSubheader"})(u)},function(e,t,n){"use strict";var r=n(4),i=n(27),o=n(1),a=n(0),s=(n(2),n(3)),c=n(5),u=n(49),l=n(455),f=n(39),d=n(11),p=n(82),h=n(476),g=n(1135),v=a.forwardRef((function(e,t){var n=e.action,i=e.anchorOrigin,c=(i=void 0===i?{vertical:"bottom",horizontal:"center"}:i).vertical,v=i.horizontal,m=e.autoHideDuration,y=void 0===m?null:m,b=e.children,w=e.classes,_=e.className,x=e.ClickAwayListenerProps,O=e.ContentProps,S=e.disableWindowBlurListener,E=void 0!==S&&S,C=e.message,k=e.onClose,T=e.onEnter,j=e.onEntered,P=e.onEntering,I=e.onExit,R=e.onExited,A=e.onExiting,M=e.onMouseEnter,D=e.onMouseLeave,N=e.open,L=e.resumeHideDuration,z=e.TransitionComponent,B=void 0===z?h.a:z,F=e.transitionDuration,W=void 0===F?{enter:u.b.enteringScreen,exit:u.b.leavingScreen}:F,H=e.TransitionProps,V=Object(r.a)(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"]),U=a.useRef(),q=a.useState(!0),G=q[0],K=q[1],$=Object(f.a)((function(){k&&k.apply(void 0,arguments)})),Z=Object(f.a)((function(e){k&&null!=e&&(clearTimeout(U.current),U.current=setTimeout((function(){$(null,"timeout")}),e))}));a.useEffect((function(){return N&&Z(y),function(){clearTimeout(U.current)}}),[N,y,Z]);var X=function(){clearTimeout(U.current)},Q=a.useCallback((function(){null!=y&&Z(null!=L?L:.5*y)}),[y,L,Z]);return a.useEffect((function(){if(!E&&N)return window.addEventListener("focus",Q),window.addEventListener("blur",X),function(){window.removeEventListener("focus",Q),window.removeEventListener("blur",X)}}),[E,Q,N]),!N&&G?null:a.createElement(l.a,Object(o.a)({onClickAway:function(e){k&&k(e,"clickaway")}},x),a.createElement("div",Object(o.a)({className:Object(s.a)(w.root,w["anchorOrigin".concat(Object(d.a)(c)).concat(Object(d.a)(v))],_),onMouseEnter:function(e){M&&M(e),X()},onMouseLeave:function(e){D&&D(e),Q()},ref:t},V),a.createElement(B,Object(o.a)({appear:!0,in:N,onEnter:Object(p.a)((function(){K(!1)}),T),onEntered:j,onEntering:P,onExit:I,onExited:Object(p.a)((function(){K(!0)}),R),onExiting:A,timeout:W,direction:"top"===c?"down":"up"},H),b||a.createElement(g.a,Object(o.a)({message:C,action:n},O)))))}));t.a=Object(c.a)((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},a={justifyContent:"flex-start"},s={top:24},c={bottom:24},u={right:24},l={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:Object(o.a)({},t,Object(i.a)({},e.breakpoints.up("sm"),Object(o.a)({},s,f))),anchorOriginBottomCenter:Object(o.a)({},n,Object(i.a)({},e.breakpoints.up("sm"),Object(o.a)({},c,f))),anchorOriginTopRight:Object(o.a)({},t,r,Object(i.a)({},e.breakpoints.up("sm"),Object(o.a)({left:"auto"},s,u))),anchorOriginBottomRight:Object(o.a)({},n,r,Object(i.a)({},e.breakpoints.up("sm"),Object(o.a)({left:"auto"},c,u))),anchorOriginTopLeft:Object(o.a)({},t,a,Object(i.a)({},e.breakpoints.up("sm"),Object(o.a)({right:"auto"},s,l))),anchorOriginBottomLeft:Object(o.a)({},n,a,Object(i.a)({},e.breakpoints.up("sm"),Object(o.a)({right:"auto"},c,l)))}}),{flip:!1,name:"MuiSnackbar"})(v)},function(e,t,n){"use strict";var r=n(4),i=n(27),o=n(1),a=n(0),s=(n(2),n(3)),c=n(5),u=n(190),l=n(11),f=a.forwardRef((function(e,t){var n=e.classes,i=e.className,c=e.disabled,f=void 0!==c&&c,d=e.disableFocusRipple,p=void 0!==d&&d,h=e.fullWidth,g=e.icon,v=e.indicator,m=e.label,y=e.onChange,b=e.onClick,w=e.onFocus,_=e.selected,x=e.selectionFollowsFocus,O=e.textColor,S=void 0===O?"inherit":O,E=e.value,C=e.wrapped,k=void 0!==C&&C,T=Object(r.a)(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"]);return a.createElement(u.a,Object(o.a)({focusRipple:!p,className:Object(s.a)(n.root,n["textColor".concat(Object(l.a)(S))],i,f&&n.disabled,_&&n.selected,m&&g&&n.labelIcon,h&&n.fullWidth,k&&n.wrapped),ref:t,role:"tab","aria-selected":_,disabled:f,onClick:function(e){y&&y(e,E),b&&b(e)},onFocus:function(e){x&&!_&&y&&y(e,E),w&&w(e)},tabIndex:_?0:-1},T),a.createElement("span",{className:n.wrapper},g,m),v)}));t.a=Object(c.a)((function(e){var t;return{root:Object(o.a)({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},Object(i.a)(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),Object(i.a)(t,"overflow","hidden"),Object(i.a)(t,"whiteSpace","normal"),Object(i.a)(t,"textAlign","center"),Object(i.a)(t,e.breakpoints.up("sm"),{minWidth:160}),t)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(f)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(27),a=n(0),s=(n(2),n(3)),c=n(5),u=a.forwardRef((function(e,t){var n=e.classes,o=e.className,c=e.component,u=void 0===c?"div":c,l=e.disableGutters,f=void 0!==l&&l,d=e.variant,p=void 0===d?"regular":d,h=Object(i.a)(e,["classes","className","component","disableGutters","variant"]);return a.createElement(u,Object(r.a)({className:Object(s.a)(n.root,n[p],o,!f&&n.gutters),ref:t},h))}));t.a=Object(c.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(o.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(u)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(250),c=n(249),u=n(5),l=n(190),f=o.createElement(s.a,{fontSize:"small"}),d=o.createElement(c.a,{fontSize:"small"}),p=o.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.direction,u=e.orientation,p=e.disabled,h=Object(i.a)(e,["classes","className","direction","orientation","disabled"]);return o.createElement(l.a,Object(r.a)({component:"div",className:Object(a.a)(n.root,s,p&&n.disabled,"vertical"===u&&n.vertical),ref:t,role:null,tabIndex:null},h),"left"===c?f:d)}));t.a=Object(u.a)({root:{width:40,flexShrink:0,opacity:.8,"&$disabled":{opacity:0}},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}},disabled:{}},{name:"MuiTabScrollButton"})(p)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(761),c=n(1129),u=n(1136),l=n(1134),f=n(456),d=n(1131),p=n(1137),h=n(5),g={standard:s.a,filled:c.a,outlined:u.a},v=o.forwardRef((function(e,t){var n=e.autoComplete,s=e.autoFocus,c=void 0!==s&&s,u=e.children,h=e.classes,v=e.className,m=e.color,y=void 0===m?"primary":m,b=e.defaultValue,w=e.disabled,_=void 0!==w&&w,x=e.error,O=void 0!==x&&x,S=e.FormHelperTextProps,E=e.fullWidth,C=void 0!==E&&E,k=e.helperText,T=e.hiddenLabel,j=e.id,P=e.InputLabelProps,I=e.inputProps,R=e.InputProps,A=e.inputRef,M=e.label,D=e.multiline,N=void 0!==D&&D,L=e.name,z=e.onBlur,B=e.onChange,F=e.onFocus,W=e.placeholder,H=e.required,V=void 0!==H&&H,U=e.rows,q=e.rowsMax,G=e.maxRows,K=e.minRows,$=e.select,Z=void 0!==$&&$,X=e.SelectProps,Q=e.type,Y=e.value,J=e.variant,ee=void 0===J?"standard":J,te=Object(i.a)(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","maxRows","minRows","select","SelectProps","type","value","variant"]);var ne={};if("outlined"===ee&&(P&&void 0!==P.shrink&&(ne.notched=P.shrink),M)){var re,ie=null!==(re=null==P?void 0:P.required)&&void 0!==re?re:V;ne.label=o.createElement(o.Fragment,null,M,ie&&" *")}Z&&(X&&X.native||(ne.id=void 0),ne["aria-describedby"]=void 0);var oe=k&&j?"".concat(j,"-helper-text"):void 0,ae=M&&j?"".concat(j,"-label"):void 0,se=g[ee],ce=o.createElement(se,Object(r.a)({"aria-describedby":oe,autoComplete:n,autoFocus:c,defaultValue:b,fullWidth:C,multiline:N,name:L,rows:U,rowsMax:q,maxRows:G,minRows:K,type:Q,value:Y,id:j,inputRef:A,onBlur:z,onChange:B,onFocus:F,placeholder:W,inputProps:I},ne,R));return o.createElement(f.a,Object(r.a)({className:Object(a.a)(h.root,v),disabled:_,error:O,fullWidth:C,hiddenLabel:T,ref:t,required:V,color:y,variant:ee},te),M&&o.createElement(l.a,Object(r.a)({htmlFor:j,id:ae},P),M),Z?o.createElement(p.a,Object(r.a)({"aria-describedby":oe,id:j,labelId:ae,value:Y,input:ce},X),u):ce,k&&o.createElement(d.a,Object(r.a)({id:oe},S),k))}));t.a=Object(h.a)({root:{}},{name:"MuiTextField"})(v)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=n(3),s=(n(2),n(24)),c=n(5),u=o.forwardRef((function(e,t){var n=e.animation,s=void 0===n?"pulse":n,c=e.classes,u=e.className,l=e.component,f=void 0===l?"span":l,d=e.height,p=e.variant,h=void 0===p?"text":p,g=e.width,v=Object(i.a)(e,["animation","classes","className","component","height","variant","width"]),m=Boolean(v.children);return o.createElement(f,Object(r.a)({ref:t,className:Object(a.a)(c.root,c[h],u,m&&[c.withChildren,!g&&c.fitContent,!d&&c.heightAuto],!1!==s&&c[s])},v,{style:Object(r.a)({width:g,height:d},v.style)}))}));t.a=Object(c.a)((function(e){return{root:{display:"block",backgroundColor:Object(s.a)(e.palette.text.primary,"light"===e.palette.type?.11:.13),height:"1.2em"},text:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 60%",transform:"scale(1, 0.60)",borderRadius:e.shape.borderRadius,"&:empty:before":{content:'"\\00a0"'}},rect:{},circle:{borderRadius:"50%"},pulse:{animation:"$pulse 1.5s ease-in-out 0.5s infinite"},"@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}},wave:{position:"relative",overflow:"hidden","&::after":{animation:"$wave 1.6s linear 0.5s infinite",background:"linear-gradient(90deg, transparent, ".concat(e.palette.action.hover,", transparent)"),content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}},"@keyframes wave":{"0%":{transform:"translateX(-100%)"},"60%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}},withChildren:{"& > *":{visibility:"hidden"}},fitContent:{maxWidth:"fit-content"},heightAuto:{height:"auto"}}}),{name:"MuiSkeleton"})(u)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(9),o=n(1175),a=n(24),s=n(5),c=n(8),u=n(0),l=n.n(u),f=n(23),d=n.n(f),p=n(128),h=n.n(p),g=n(572),v=n(574),m=n(576),y=n(96),b=n(575),w=n(573),_=n(571);function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var i=k(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(o,e);var t,n,r,i=E(o);function o(){return x(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.error,n=e.removeError,r=e.t,i=!h()(t);return t?l.a.createElement(g.a,{"aria-labelledby":"error-dialog-title",id:"error-dialog",onClose:function(){return n(t.id)},open:i},l.a.createElement(m.a,{id:"error-dialog-title",disableTypography:!0},l.a.createElement(y.a,{variant:"h2"},r("errorDialogTitle"))),l.a.createElement(v.a,{disableTypography:!0},l.a.createElement(b.a,{variant:"body2",noWrap:!0,color:"inherit"},"".concat(t.message)),l.a.createElement(w.a,null,l.a.createElement(_.a,{onClick:function(){return n(t.id)},variant:"contained"},r("errorDialogConfirm"))))):null}}])&&O(t.prototype,n),r&&O(t,r),o}(u.Component);T.defaultProps={error:null,removeError:function(){},t:function(e){return e}};var j=n(554),P=n(319),I={removeError:j.b},R=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e){return{error:Object(P.c)(e)}}),I),Object(c.a)("ErrorDialog"))(T),A=n(1155),M=n(1166),D=n(299),N=n(559),L=n(38),z=n(1159),B=n(1121),F=n(357),W=n.n(F),H=n(122),V=n.n(H);function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Z(e);if(t){var i=Z(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $(this,n)}}function $(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var X=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(o,e);var t,n,r,i=K(o);function o(){return U(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=e.setWorkspaceAddVisibility,i=e.isWorkspaceAddVisible,o=e.useExtendedFab;return l.a.createElement(B.a,{title:n(i?"closeAddResourceMenu":"addResource")},l.a.createElement(z.a,{size:"medium",color:"primary",id:"addBtn",disableRipple:!0,"aria-label":i?n("closeAddResourceMenu"):o&&n("startHere")||n("addResource"),className:t.fab,classes:{primary:t.fabPrimary,secondary:t.fabSecondary},variant:o?"extended":"round",onClick:function(){r(!i)}},i?l.a.createElement(V.a,null):l.a.createElement(W.a,null),o&&n("startHere")))}}])&&q(t.prototype,n),r&&q(t,r),o}(u.Component);X.defaultProps={isWorkspaceAddVisible:!1,t:function(e){return e}};var Q={setWorkspaceAddVisibility:N.a},Y=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{fab:{margin:e.spacing(1)},fabPrimary:{"&:focus":{backgroundColor:e.palette.primary.dark}},fabSecondary:{"&:focus":{backgroundColor:e.palette.secondary.dark}}}})),Object(D.a)(),Object(i.b)((function(e,t){var n=t.width,r=Object(L.i)(e).isWorkspaceAddVisible;return{isWorkspaceAddVisible:r,useExtendedFab:"xs"!==n&&!r&&0===Object(L.f)(e).length}}),Q),Object(c.a)("WorkspaceAddButton"))(X),J=n(742),ee=n.n(J),te=n(741),ne=n.n(te),re=n(34);function ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ae(e,t){return(ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ue(e);if(t){var i=ue(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ce(this,n)}}function ce(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ae(e,t)}(o,e);var t,n,r,i=se(o);function o(){return ie(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.className,n=e.isFullscreenEnabled,r=e.setWorkspaceFullscreen,i=e.t;return l.a.createElement(re.a,{className:t,"aria-label":i(n?"exitFullScreen":"workspaceFullScreen"),onClick:function(){return r(!n)}},n?l.a.createElement(ne.a,null):l.a.createElement(ee.a,null))}}])&&oe(t.prototype,n),r&&oe(t,r),o}(u.Component);le.defaultProps={className:void 0,isFullscreenEnabled:!1,t:function(e){return e}};var fe={setWorkspaceFullscreen:N.b},de=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e){return{isFullscreenEnabled:Object(P.b)(e)}}),fe),Object(c.a)("FullScreenButton"))(le),pe=n(732),he=n.n(pe),ge=n(88),ve=n(675),me=n(579),ye=n(320),be=n(577),we=n(578),_e=n(734),xe=n.n(_e);function Oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ee(e,t){return(Ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Te(e);if(t){var i=Te(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}function ke(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Te(e){return(Te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var je=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ee(e,t)}(o,e);var t,n,r,i=Ce(o);function o(){return Oe(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.handleClick,n=e.languages;return l.a.createElement(l.a.Fragment,null,n.map((function(e){return l.a.createElement(me.a,{button:!e.current,key:e.locale,onClick:function(){t(e.locale)}},l.a.createElement(be.a,null,e.current&&l.a.createElement(xe.a,null)),l.a.createElement(we.a,{primaryTypographyProps:{variant:"body1"}},e.label))})))}}])&&Se(t.prototype,n),r&&Se(t,r),o}(u.Component),Pe=Object(r.compose)(Object(i.b)((function(e){return{languages:Object(ge.d)(e)}}),(function(e,t){var n=t.afterSelect;return{handleClick:function(t){e(ye.d({language:t})),n&&n()}}})),Object(c.a)("LanguageSettings"))(je),Ie=n(733),Re=n.n(Ie),Ae=n(358),Me=n.n(Ae),De=["children","icon","label"];function Ne(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=He(e);if(t){var i=He(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fe(this,n)}}function Fe(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return We(e)}function We(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ze(e,t)}(o,e);var t,n,r,i=Be(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={nestedMenuIsOpen:!1},t.handleMenuClick=t.handleMenuClick.bind(We(t)),t}return t=o,(n=[{key:"handleMenuClick",value:function(){var e=this.state.nestedMenuIsOpen;this.setState({nestedMenuIsOpen:!e})}},{key:"render",value:function(){var e=this.state.nestedMenuIsOpen,t=this.props,n=t.children,r=t.icon,i=t.label,o=Ne(t,De);return l.a.createElement(l.a.Fragment,null,l.a.createElement(me.a,Object.assign({onClick:this.handleMenuClick,divider:e},o),r&&l.a.createElement(be.a,null,r),l.a.createElement(we.a,{primaryTypographyProps:{variant:"body1"}},i),e?l.a.createElement(Re.a,null):l.a.createElement(Me.a,null)),e&&n)}}])&&Le(t.prototype,n),r&&Le(t,r),o}(u.Component);Ve.defaultProps={icon:null};var Ue=n(454),qe=n(1156),Ge=n(1157),Ke=n(329);function $e(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"90",viewBox:"0 0 300 225"},l.a.createElement("defs",null,l.a.createElement("linearGradient",{id:"linear-gradient",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},l.a.createElement("stop",{offset:"0"}),l.a.createElement("stop",{offset:"0.14",stopOpacity:"0.631"}),l.a.createElement("stop",{offset:"1",stopOpacity:"0"})),l.a.createElement("linearGradient",{id:"linear-gradient-2",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},l.a.createElement("stop",{offset:"0",stopColor:"#fff",stopOpacity:"0"}),l.a.createElement("stop",{offset:"0.23",stopColor:"#fff",stopOpacity:"0.012"}),l.a.createElement("stop",{offset:"0.36",stopColor:"#fff",stopOpacity:"0.039"}),l.a.createElement("stop",{offset:"0.47",stopColor:"#fff",stopOpacity:"0.102"}),l.a.createElement("stop",{offset:"0.57",stopColor:"#fff",stopOpacity:"0.18"}),l.a.createElement("stop",{offset:"0.67",stopColor:"#fff",stopOpacity:"0.278"}),l.a.createElement("stop",{offset:"0.75",stopColor:"#fff",stopOpacity:"0.412"}),l.a.createElement("stop",{offset:"0.83",stopColor:"#fff",stopOpacity:"0.561"}),l.a.createElement("stop",{offset:"0.91",stopColor:"#fff",stopOpacity:"0.741"}),l.a.createElement("stop",{offset:"0.98",stopColor:"#fff",stopOpacity:"0.929"}),l.a.createElement("stop",{offset:"1",stopColor:"#fff"})),l.a.createElement("clipPath",{id:"clip-elastic_icon"},l.a.createElement("rect",{width:"300",height:"225"}))),l.a.createElement("g",{id:"elastic_icon","data-name":"elastic icon",clipPath:"url(#clip-elastic_icon)"},l.a.createElement("rect",{width:"300",height:"225",fill:"#fff"}),l.a.createElement("g",{id:"Rectangle_278","data-name":"Rectangle 278",transform:"translate(232 159)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"54",height:"54",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"53",height:"53",fill:"none"})),l.a.createElement("g",{id:"Rectangle_8","data-name":"Rectangle 8",transform:"translate(7 148)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"70",height:"70",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"69",height:"69",fill:"none"})),l.a.createElement("g",{id:"Rectangle_258","data-name":"Rectangle 258",transform:"translate(224 6)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"70",height:"100",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"69",height:"99",fill:"none"})),l.a.createElement("g",{id:"Rectangle_259","data-name":"Rectangle 259",transform:"translate(71 64)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"115",height:"75",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"114",height:"74",fill:"none"})),l.a.createElement("g",{id:"Rectangle_260","data-name":"Rectangle 260",transform:"translate(99 87)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"115",height:"75",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"114",height:"74",fill:"none"})),l.a.createElement("g",{id:"Group_689","data-name":"Group 689"},l.a.createElement("g",{id:"Group_687","data-name":"Group 687",transform:"translate(0 3)"},l.a.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"}),l.a.createElement("g",{id:"Path_821","data-name":"Path 821",transform:"translate(40 36)",fill:"none"},l.a.createElement("path",{d:"M0,0H220V147H0Z",stroke:"none"}),l.a.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"}))),l.a.createElement("g",{id:"Rectangle_257","data-name":"Rectangle 257",transform:"translate(40 39)",fill:"#fff",stroke:"#01579b",strokeWidth:"2"},l.a.createElement("rect",{width:"20",height:"147",stroke:"none"}),l.a.createElement("rect",{x:"1",y:"1",width:"18",height:"145",fill:"none"})),l.a.createElement("g",{id:"Group_688","data-name":"Group 688",transform:"translate(-27.5 -126)"},l.a.createElement("circle",{id:"teal_circle","data-name":"teal circle",cx:"7.5",cy:"7.5",r:"7.5",transform:"translate(70 171)",fill:"#009688"}),l.a.createElement("g",{id:"Group_333","data-name":"Group 333",transform:"translate(70 171)",opacity:"0.12"},l.a.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)"}),l.a.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 Ze(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"90",viewBox:"0 0 300 225"},l.a.createElement("defs",null,l.a.createElement("linearGradient",{id:"linear-gradient",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},l.a.createElement("stop",{offset:"0"}),l.a.createElement("stop",{offset:"0.14",stopOpacity:"0.631"}),l.a.createElement("stop",{offset:"1",stopOpacity:"0"})),l.a.createElement("linearGradient",{id:"linear-gradient-2",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},l.a.createElement("stop",{offset:"0",stopColor:"#fff",stopOpacity:"0"}),l.a.createElement("stop",{offset:"0.23",stopColor:"#fff",stopOpacity:"0.012"}),l.a.createElement("stop",{offset:"0.36",stopColor:"#fff",stopOpacity:"0.039"}),l.a.createElement("stop",{offset:"0.47",stopColor:"#fff",stopOpacity:"0.102"}),l.a.createElement("stop",{offset:"0.57",stopColor:"#fff",stopOpacity:"0.18"}),l.a.createElement("stop",{offset:"0.67",stopColor:"#fff",stopOpacity:"0.278"}),l.a.createElement("stop",{offset:"0.75",stopColor:"#fff",stopOpacity:"0.412"}),l.a.createElement("stop",{offset:"0.83",stopColor:"#fff",stopOpacity:"0.561"}),l.a.createElement("stop",{offset:"0.91",stopColor:"#fff",stopOpacity:"0.741"}),l.a.createElement("stop",{offset:"0.98",stopColor:"#fff",stopOpacity:"0.929"}),l.a.createElement("stop",{offset:"1",stopColor:"#fff"})),l.a.createElement("clipPath",{id:"clip-mosaic_icon"},l.a.createElement("rect",{width:"300",height:"225"}))),l.a.createElement("g",{id:"mosaic_icon","data-name":"mosaic icon",clipPath:"url(#clip-mosaic_icon)"},l.a.createElement("rect",{width:"300",height:"225",fill:"#fff"}),l.a.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"}),l.a.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"}),l.a.createElement("g",{id:"Path_821","data-name":"Path 821",transform:"translate(40 39)",fill:"none"},l.a.createElement("path",{d:"M0,0H220V147H0Z",stroke:"none"}),l.a.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"})),l.a.createElement("g",{id:"Rectangle_257","data-name":"Rectangle 257",transform:"translate(40 39)",fill:"#fff",stroke:"#01579b",strokeWidth:"2"},l.a.createElement("rect",{width:"20",height:"147",stroke:"none"}),l.a.createElement("rect",{x:"1",y:"1",width:"18",height:"145",fill:"none"})),l.a.createElement("g",{id:"Group_688","data-name":"Group 688",transform:"translate(-27.5 -126)"},l.a.createElement("circle",{id:"teal_circle","data-name":"teal circle",cx:"7.5",cy:"7.5",r:"7.5",transform:"translate(70 171)",fill:"#009688"}),l.a.createElement("g",{id:"Group_333","data-name":"Group 333",transform:"translate(70 171)",opacity:"0.12"},l.a.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)"}),l.a.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)"}))),l.a.createElement("g",{id:"Rectangle_270","data-name":"Rectangle 270",transform:"translate(60 40.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"99",height:"72",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"98",height:"71",fill:"none"})),l.a.createElement("g",{id:"Rectangle_271","data-name":"Rectangle 271",transform:"translate(159 40.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"99",height:"72",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"98",height:"71",fill:"none"})),l.a.createElement("g",{id:"Rectangle_272","data-name":"Rectangle 272",transform:"translate(192 112.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"66",height:"71.45",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"65",height:"70.45",fill:"none"})),l.a.createElement("g",{id:"Rectangle_284","data-name":"Rectangle 284",transform:"translate(60 112.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"66",height:"71.45",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"65",height:"70.45",fill:"none"})),l.a.createElement("g",{id:"Rectangle_285","data-name":"Rectangle 285",transform:"translate(126 112.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},l.a.createElement("rect",{width:"66",height:"71.45",stroke:"none"}),l.a.createElement("rect",{x:"0.5",y:"0.5",width:"65",height:"70.45",fill:"none"})))))}var Xe=n(137);function Qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ye(e,t){return(Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Je(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nt(e);if(t){var i=nt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return et(this,n)}}function et(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tt(e)}function tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ye(e,t)}(o,e);var t,n,r,i=Je(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleWorkspaceTypeChange=t.handleWorkspaceTypeChange.bind(tt(t)),t}return t=o,r=[{key:"setInitialFocus",value:function(e,t){var n=e.querySelectorAll('li[value="'.concat(t,'"]'));n&&0!==n.length&&n[0].focus()}}],(n=[{key:"handleWorkspaceTypeChange",value:function(e){var t=this.props,n=t.handleClose;(0,t.updateWorkspace)({type:e}),n()}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.container,i=t.handleClose,a=t.open,s=t.children,c=t.t,u=t.workspaceType;return l.a.createElement(g.a,{"aria-labelledby":"workspace-selection-dialog-title",container:r,id:"workspace-selection-dialog",onClose:i,onEntered:function(e){return o.setInitialFocus(e,u)},onEscapeKeyDown:i,open:a},l.a.createElement(m.a,{id:"workspace-selection-dialog-title",disableTypography:!0},l.a.createElement(y.a,{variant:"h2"},c("workspaceSelectionTitle"))),l.a.createElement(Xe.a,null,s,l.a.createElement(Ue.a,{classes:{root:n.list},selected:u},l.a.createElement(me.a,{className:n.menuItem,onClick:function(){return e.handleWorkspaceTypeChange("elastic")},selected:"elastic"===u,value:"elastic"},l.a.createElement(qe.a,{className:n.card},l.a.createElement($e,{className:n.svgIcon,viewBox:"0 0 120 90"}),l.a.createElement("div",{className:n.details},l.a.createElement(Ge.a,{classes:{root:n.root},className:n.content},l.a.createElement(y.a,{className:n.headline,component:"p",variant:"h3"},c("elastic")),l.a.createElement(y.a,{variant:"body1"},c("elasticDescription")))))),l.a.createElement(me.a,{className:n.menuItem,onClick:function(){return e.handleWorkspaceTypeChange("mosaic")},selected:"mosaic"===u,value:"mosaic"},l.a.createElement(qe.a,{className:n.card},l.a.createElement(Ze,{className:n.svgIcon,viewBox:"0 0 120 90"}),l.a.createElement("div",{className:n.details},l.a.createElement(Ge.a,{className:n.content,classes:{root:n.root}},l.a.createElement(y.a,{className:n.headline,component:"p",variant:"h3"},c("mosaic")),l.a.createElement(y.a,{variant:"body1"},c("mosaicDescription")))))))))}}])&&Qe(t.prototype,n),r&&Qe(t,r),o}(u.Component);rt.defaultProps={children:null,container:null,open:!1,t:function(e){return e}};var it={updateWorkspace:N.g},ot=Object(r.compose)(Object(o.a)(),Object(s.a)((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"}}})),Object(i.b)((function(e){return{workspaceType:Object(P.d)(e)}}),it),Object(c.a)("WorkspaceSelectionDialog"))(rt),at=n(14),st=n(735),ct=n.n(st);function ut(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lt(e,t){return(lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ht(e);if(t){var i=ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dt(this,n)}}function dt(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pt(e)}function pt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ht(e){return(ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lt(e,t)}(o,e);var t,n,r,i=ft(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).selectedItemRef=l.a.createRef(),t.handleThemeChange=t.handleThemeChange.bind(pt(t)),t}return t=o,r=[{key:"setInitialFocus",value:function(e,t){var n=e.querySelectorAll('li[value="'.concat(t,'"]'));n&&0!==n.length&&n[0].focus()}}],(n=[{key:"handleThemeChange",value:function(e){var t=this.props,n=t.setSelectedTheme,r=t.handleClose;n(e),r()}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.handleClose,i=t.open,a=t.selectedTheme,s=t.t,c=t.themeIds;return l.a.createElement(g.a,{onClose:r,onEntered:function(e){return o.setInitialFocus(e,a)},open:i},l.a.createElement(m.a,{id:"change-the-dialog-title",disableTypography:!0},l.a.createElement(y.a,{variant:"h2"},s("changeTheme"))),l.a.createElement(v.a,{className:n.dialogContent},l.a.createElement(Ue.a,null,c.map((function(t){return l.a.createElement(me.a,{key:t,className:n.listitem,onClick:function(){e.handleThemeChange(t)},selected:t===a,value:t},l.a.createElement(be.a,null,l.a.createElement(ct.a,{className:n[t]})),l.a.createElement(we.a,null,s(t)))})))))}}])&&ut(t.prototype,n),r&&ut(t,r),o}(u.Component);gt.defaultProps={open:!1,themeIds:[]};var vt=Object(r.compose)(Object(o.a)(),Object(s.a)((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"}}})),Object(i.b)((function(e){return{selectedTheme:Object(ge.a)(e).selectedTheme,themeIds:Object(ge.i)(e)}}),(function(e,t){t.windowId;return{setSelectedTheme:function(t){return e(ye.d({selectedTheme:t}))}}})),Object(c.a)("ChangeThemeDialog"))(gt),mt=n(37);function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bt(e,t){return(bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ot(e);if(t){var i=Ot(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _t(this,n)}}function _t(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xt(e)}function xt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ot(e){return(Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bt(e,t)}(o,e);var t,n,r,i=wt(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={changeTheme:{},toggleZoom:{},workspaceSelection:{}},t.handleMenuItemClick=t.handleMenuItemClick.bind(xt(t)),t.handleMenuItemClose=t.handleMenuItemClose.bind(xt(t)),t}return t=o,(n=[{key:"handleMenuItemClick",value:function(e,t){var n={};n[e]={},n[e].open=!0,n[e].anchorEl=t.currentTarget,this.setState(n)}},{key:"handleMenuItemClose",value:function(e){var t=this;return function(n){var r={};r[e]={},r[e].open=!1,r[e].anchorEl=null,t.setState(r)}}},{key:"handleZoomToggleClick",value:function(){var e=this.props;(0,e.toggleZoomControls)(!e.showZoomControls)}},{key:"render",value:function(){var e=this,t=this.props,n=t.containerId,r=t.handleClose,i=t.anchorEl,o=t.showThemePicker,a=t.isWorkspaceAddVisible,s=t.t,c=t.showZoomControls,u=this.state,f=u.changeTheme,d=u.toggleZoom,p=u.workspaceSelection,h=document.querySelector("#".concat(n," .").concat(Object(at.a)("viewer")));return l.a.createElement(l.a.Fragment,null,l.a.createElement(ve.a,{id:"workspace-menu",container:h,anchorEl:i,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},open:Boolean(i),onClose:r},l.a.createElement(me.a,{"aria-haspopup":"true",disabled:a,onClick:function(t){e.handleZoomToggleClick(t),r(t)},"aria-owns":d.anchorEl?"toggle-zoom-menu":void 0},l.a.createElement(y.a,{variant:"body1"},s(c?"hideZoomControls":"showZoomControls"))),l.a.createElement(me.a,{"aria-haspopup":"true",onClick:function(t){e.handleMenuItemClick("workspaceSelection",t),r(t)},"aria-owns":p.anchorEl?"workspace-selection":void 0},l.a.createElement(y.a,{variant:"body1"},s("selectWorkspaceMenu"))),l.a.createElement(Ve,{label:s("language")},l.a.createElement(Pe,{afterSelect:r})),o&&l.a.createElement(me.a,{"aria-haspopup":"true",onClick:function(t){e.handleMenuItemClick("changeTheme",t),r(t)},"aria-owns":f.anchorEl?"change-theme":void 0},l.a.createElement(y.a,{variant:"body1"},s("changeTheme"))),l.a.createElement(mt.a,this.props)),Boolean(f.open)&&l.a.createElement(vt,{container:h,handleClose:this.handleMenuItemClose("changeTheme"),open:Boolean(f.open)}),Boolean(p.open)&&l.a.createElement(ot,{open:Boolean(p.open),container:h,handleClose:this.handleMenuItemClose("workspaceSelection")}))}}])&&yt(t.prototype,n),r&&yt(t,r),o}(u.Component);St.defaultProps={anchorEl:null,isWorkspaceAddVisible:!1,showThemePicker:!1,showZoomControls:!1,t:function(e){return e},toggleZoomControls:function(){}};var Et={toggleZoomControls:N.f},Ct=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e){return{containerId:Object(ge.b)(e),isWorkspaceAddVisible:Object(L.i)(e).isWorkspaceAddVisible,showThemePicker:Object(ge.i)(e).length>0,showZoomControls:Object(ge.f)(e)}}),Et),Object(c.a)("WorkspaceMenu"))(St);function kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tt(e,t){return(Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rt(e);if(t){var i=Rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pt(this,n)}}function Pt(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return It(e)}function It(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var At=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tt(e,t)}(o,e);var t,n,r,i=jt(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={anchorEl:null},t.handleMenuClick=t.handleMenuClick.bind(It(t)),t.handleMenuClose=t.handleMenuClose.bind(It(t)),t}return t=o,(n=[{key:"handleMenuClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=this.state.anchorEl;return l.a.createElement(l.a.Fragment,null,l.a.createElement(re.a,{"aria-haspopup":"true","aria-label":n("workspaceMenu"),"aria-owns":r?"workspace-menu":void 0,className:d()(t.ctrlBtn,r?t.ctrlBtnSelected:null),id:"menuBtn",onClick:this.handleMenuClick},l.a.createElement(he.a,null)),l.a.createElement(Ct,{anchorEl:r,handleClose:this.handleMenuClose}))}}])&&kt(t.prototype,n),r&&kt(t,r),o}(u.Component);At.defaultProps={t:function(e){return e}};var Mt=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{ctrlBtn:{margin:e.spacing(1)},ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(c.a)("WorkspaceMenuButton"))(At),Dt=n(736),Nt=n.n(Dt),Lt=n(738),zt=n.n(Lt),Bt=n(737),Ft=n.n(Bt),Wt=n(1164),Ht=n(757),Vt=n(217),Ut=n.n(Vt),qt=n(740),Gt=n.n(qt),Kt=n(1152),$t=n(1154),Zt=n(1153),Xt=n(739);function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yt(e,t){return(Yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nn(e);if(t){var i=nn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return en(this,n)}}function en(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tn(e)}function tn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yt(e,t)}(o,e);var t,n,r,i=Jt(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={copied:!1},t.onCopy=t.onCopy.bind(tn(t)),t.handleClose=t.handleClose.bind(tn(t)),t}return t=o,(n=[{key:"handleClose",value:function(){var e=this.props.handleClose;e()}},{key:"onCopy",value:function(){this.setState({copied:!0})}},{key:"exportedState",value:function(){var e=this.props.exportableState;return JSON.stringify(e,null,2)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.classes,r=e.container,i=e.open,o=e.t;return this.state.copied?l.a.createElement(Wt.a,{anchorOrigin:{horizontal:"center",vertical:"top"},open:!0,autoHideDuration:6e3,onClose:this.handleClose,message:o("exportCopied"),action:l.a.createElement(Ht.a,{size:"small","aria-label":o("dismiss"),color:"inherit",onClick:this.handleClose},l.a.createElement(Gt.a,{fontSize:"small"}))}):l.a.createElement(g.a,{id:"workspace-settings",container:r,open:i,onClose:this.handleClose,scroll:"paper",fullWidth:!0,maxWidth:"sm"},l.a.createElement(m.a,{id:"form-dialog-title",disableTypography:!0},l.a.createElement(y.a,{variant:"h2"},o("downloadExport"))),l.a.createElement(v.a,null,l.a.createElement(Kt.a,{elevation:0},l.a.createElement($t.a,{classes:{root:n.accordionTitle},expandIcon:l.a.createElement(Ut.a,null)},l.a.createElement(y.a,{variant:"h4"},o("viewWorkspaceConfiguration"))),l.a.createElement(Zt.a,null,t,l.a.createElement("pre",null,this.exportedState())))),l.a.createElement(w.a,null,l.a.createElement(_.a,{onClick:this.handleClose},o("cancel")),l.a.createElement(Xt.CopyToClipboard,{onCopy:this.onCopy,text:this.exportedState()},l.a.createElement(_.a,{variant:"contained",color:"primary"},o("copy")))))}}])&&Qt(t.prototype,n),r&&Qt(t,r),o}(u.Component);rn.defaultProps={children:null,classes:{},container:null,open:!1,t:function(e){return e}};var on=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{accordionTitle:{padding:0}}})),Object(i.b)((function(e){return{exportableState:Object(ge.c)(e)}}),{}),Object(c.a)("WorkspaceExport"))(rn),an=n(1168);function sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cn(e,t){return(cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function un(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dn(e);if(t){var i=dn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ln(this,n)}}function ln(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fn(e)}function fn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cn(e,t)}(o,e);var t,n,r,i=un(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={configImportValue:""},t.handleImportConfig=t.handleImportConfig.bind(fn(t)),t.handleChange=t.handleChange.bind(fn(t)),t}return t=o,(n=[{key:"handleChange",value:function(e){e.preventDefault(),this.setState({configImportValue:e.target.value})}},{key:"handleImportConfig",value:function(e){var t=this.props,n=t.handleClose,r=t.importConfig,i=this.state.configImportValue;try{r(JSON.parse(i)),n()}catch(e){(0,this.props.addError)(e.toString())}}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.handleClose,r=e.open,i=e.t;return l.a.createElement(g.a,{"aria-labelledby":"workspace-import-title",id:"workspace-import",onEscapeKeyDown:n,onClose:n,open:r,fullWidth:!0,maxWidth:"sm"},l.a.createElement(m.a,{id:"workspace-import-title",disableTypography:!0},l.a.createElement(y.a,{variant:"h2"},i("importWorkspace"))),l.a.createElement(Xe.a,null,l.a.createElement(an.a,{className:t.textField,id:"workspace-import-input",multiline:!0,onChange:this.handleChange,rows:"15",variant:"filled",inputProps:{autoFocus:"autofocus",className:t.textInput},helperText:i("importWorkspaceHint")})),l.a.createElement(w.a,null,l.a.createElement(_.a,{className:t.cancelBtn,onClick:n},i("cancel")),l.a.createElement(_.a,{color:"primary",onClick:this.handleImportConfig,variant:"contained"},i("import"))))}}])&&sn(t.prototype,n),r&&sn(t,r),o}(u.Component);pn.defaultProps={classes:{},open:!1,t:function(e){return e}};var hn={addError:j.a,importConfig:ye.b},gn=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{cancelBtn:{color:e.palette.text.primary},textField:{width:"100%"},textInput:{fontFamily:"monospace"}}})),Object(i.b)(null,hn),Object(c.a)("WorkspaceImport"))(pn);function vn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mn(e,t){return(mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_n(e);if(t){var i=_n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bn(this,n)}}function bn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wn(e)}function wn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mn(e,t)}(o,e);var t,n,r,i=yn(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={exportWorkspace:{},importWorkspace:{}},t.handleMenuItemClick=t.handleMenuItemClick.bind(wn(t)),t.handleMenuItemClose=t.handleMenuItemClose.bind(wn(t)),t}return t=o,(n=[{key:"handleMenuItemClick",value:function(e){var t={};t[e]={},t[e].open=!0,this.setState(t)}},{key:"handleMenuItemClose",value:function(e){var t=this;return function(n){var r={};r[e]={},r[e].open=!1,t.setState(r)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.anchorEl,r=t.containerId,i=t.handleClose,o=t.t,a=this.state,s=a.exportWorkspace,c=a.importWorkspace,u=document.querySelector("#".concat(r," .").concat(Object(at.a)("viewer")));return l.a.createElement(l.a.Fragment,null,l.a.createElement(ve.a,{id:"workspace-options-menu",container:u,anchorEl:n,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},open:Boolean(n),onClose:i},l.a.createElement(me.a,{"aria-haspopup":"true",onClick:function(){e.handleMenuItemClick("exportWorkspace"),i()},"aria-owns":s.open?"workspace-export":void 0},l.a.createElement(be.a,null,l.a.createElement(Ft.a,null)),l.a.createElement(y.a,{variant:"body1"},o("downloadExportWorkspace"))),l.a.createElement(me.a,{"aria-haspopup":"true",id:"workspace-menu-import",onClick:function(){e.handleMenuItemClick("importWorkspace"),i()},"aria-owns":s.open?"workspace-import":void 0},l.a.createElement(be.a,null,l.a.createElement(zt.a,null)),l.a.createElement(y.a,{variant:"body1"},o("importWorkspace"))),l.a.createElement(mt.a,this.props)),Boolean(s.open)&&l.a.createElement(on,{open:Boolean(s.open),container:u,handleClose:this.handleMenuItemClose("exportWorkspace")}),Boolean(c.open)&&l.a.createElement(gn,{open:Boolean(c.open),container:u,handleClose:this.handleMenuItemClose("importWorkspace")}))}}])&&vn(t.prototype,n),r&&vn(t,r),o}(u.Component);xn.defaultProps={anchorEl:null};var On=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e){return{containerId:Object(ge.b)(e)}}),null))(xn);function Sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t){return(En=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jn(e);if(t){var i=jn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kn(this,n)}}function kn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tn(e)}function Tn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jn(e){return(jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&En(e,t)}(o,e);var t,n,r,i=Cn(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={anchorEl:null},t.handleMenuClick=t.handleMenuClick.bind(Tn(t)),t.handleMenuClose=t.handleMenuClose.bind(Tn(t)),t}return t=o,(n=[{key:"handleMenuClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=this.state.anchorEl;return l.a.createElement(l.a.Fragment,null,l.a.createElement(re.a,{"aria-label":n("workspaceOptions"),className:d()(t.ctrlBtn,r?t.ctrlBtnSelected:null),onClick:this.handleMenuClick},l.a.createElement(Nt.a,null)),l.a.createElement(On,{anchorEl:r,handleClose:this.handleMenuClose}))}}])&&Sn(t.prototype,n),r&&Sn(t,r),o}(u.Component),In=Object(r.compose)(Object(s.a)((function(e){return{ctrlBtn:{margin:e.spacing(1)},ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(o.a)(),Object(c.a)("WorkspaceOptionsButton"))(Pn),Rn=n(731),An=n.n(Rn),Mn=n(555),Dn=n(206),Nn=n(1163);function Ln(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bn(e,t){return(Bn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hn(e);if(t){var i=Hn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wn(this,n)}}function Wn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Hn(e){return(Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bn(e,t)}(o,e);var t,n,r,i=Fn(o);function o(){return Ln(this,o),i.apply(this,arguments)}return t=o,r=[{key:"focus2ndListIitem",value:function(e){!e.querySelectorAll("li")||e.querySelectorAll("li").length<2||e.querySelectorAll("li")[1].focus()}}],(n=[{key:"titleContent",value:function(e){var t=this.props,n=t.titles,r=t.t;return n[e]||r("untitled")}},{key:"render",value:function(){var e=this,t=this.props,n=t.containerId,r=t.handleClose,i=t.anchorEl,a=t.windowIds,s=t.focusWindow,c=t.t;return l.a.createElement(ve.a,{anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},id:"window-list-menu",container:document.querySelector("#".concat(n," .").concat(Object(at.a)("viewer"))),disableAutoFocusItem:!0,anchorEl:i,open:Boolean(i),onClose:r,onEntering:o.focus2ndListIitem},l.a.createElement(Nn.a,{role:"presentation",selected:!1,disabled:!0,tabIndex:"-1"},c("openWindows")),a.map((function(t,n){return l.a.createElement(me.a,{key:t,onClick:function(e){s(t,!0),r(e)}},l.a.createElement(we.a,{primaryTypographyProps:{variant:"body1"}},e.titleContent(t)))})))}}])&&zn(t.prototype,n),r&&zn(t,r),o}(u.Component);Vn.defaultProps={anchorEl:null,t:function(e){return e},titles:{}};var Un={focusWindow:Mn.b},qn=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e){return{containerId:Object(ge.b)(e),titles:Object(Dn.e)(e),windowIds:Object(L.f)(e)}}),Un),Object(c.a)("WindowList"))(Vn);function Gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kn(e,t){return(Kn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qn(e);if(t){var i=Qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zn(this,n)}}function Zn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Xn(e)}function Xn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kn(e,t)}(o,e);var t,n,r,i=$n(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={windowListAnchor:null},t.handleClose=t.handleClose.bind(Xn(t)),t.handleOpen=t.handleOpen.bind(Xn(t)),t}return t=o,(n=[{key:"handleClose",value:function(){this.setState({windowListAnchor:null})}},{key:"handleOpen",value:function(e){this.setState({windowListAnchor:e.currentTarget})}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.disabled,i=t.t,o=t.windowCount,a=this.state.windowListAnchor;return l.a.createElement(l.a.Fragment,null,l.a.createElement(re.a,{"aria-haspopup":"true","aria-label":i("listAllOpenWindows"),"aria-owns":a?"window-list":null,className:d()(n.ctrlBtn,a?n.ctrlBtnSelected:null),disabled:r,badge:!0,BadgeProps:{badgeContent:o,classes:{badge:n.badge}},onClick:function(t){return e.handleOpen(t)}},l.a.createElement(An.a,null)),Boolean(a)&&l.a.createElement(qn,{anchorEl:a,id:"window-list",open:Boolean(a),handleClose:this.handleClose}))}}])&&Gn(t.prototype,n),r&&Gn(t,r),o}(u.Component);Yn.defaultProps={classes:{},disabled:!1};var Jn=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{badge:{paddingLeft:12},ctrlBtn:{margin:e.spacing(1)},ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(i.b)((function(e){return{disabled:Object(L.i)(e).isWorkspaceAddVisible,windowCount:Object(L.f)(e).length}}),null),Object(c.a)("WindowListButton"))(Yn);function er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nr(e,t){return(nr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ir(this,n)}}function ir(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ar=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nr(e,t)}(o,e);var t,n,r,i=rr(o);function o(){return er(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props.classes;return l.a.createElement(l.a.Fragment,null,l.a.createElement(Jn,null),l.a.createElement(Mt,null),l.a.createElement(In,null),l.a.createElement(de,{className:e.ctrlBtn}),l.a.createElement(mt.a,this.props))}}])&&tr(t.prototype,n),r&&tr(t,r),o}(u.Component);ar.defaultProps={classes:{}};var sr=Object(r.compose)(Object(s.a)((function(e){return{ctrlBtn:{margin:e.spacing(1)}}})),Object(c.a)("WorkspaceControlPanelButtons"))(ar);function cr(e){return l.a.createElement(Ke.a,Object.assign({viewBox:"0 0 60 55"},e),l.a.createElement("rect",{width:"18",height:"55"}),l.a.createElement("rect",{width:"18",height:"55",transform:"translate(42)"}),l.a.createElement("rect",{width:"18",height:"34",transform:"translate(21)"}))}var ur=["t","variant"];function lr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pr(e,t){return(pr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vr(e);if(t){var i=vr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gr(this,n)}}function gr(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vr(e){return(vr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pr(e,t)}(o,e);var t,n,r,i=hr(o);function o(){return fr(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.t,n=e.variant,r=lr(e,ur);return l.a.createElement("div",r,"wide"===n&&l.a.createElement("div",null,l.a.createElement(y.a,{align:"center",component:"p",variant:"h3"},t("mirador"))),l.a.createElement(y.a,{align:"center"},l.a.createElement(Ht.a,{component:"a",href:"https://projectmirador.org",target:"_blank",rel:"noopener"},l.a.createElement(cr,{"aria-label":t("aboutMirador"),titleAccess:t("aboutMirador"),fontSize:"large"}))))}}])&&dr(t.prototype,n),r&&dr(t,r),o}(u.Component);mr.defaultProps={t:function(e){return e},variant:"default"};var yr=Object(c.a)("Branding")(mr);function br(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<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _r(e,t){return(_r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sr(e);if(t){var i=Sr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}function Or(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sr(e){return(Sr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Er=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_r(e,t)}(o,e);var t,n,r,i=xr(o);function o(){return br(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=e.variant;return l.a.createElement(A.a,{className:d()(t.root,Object(at.a)("workspace-control-panel"),"wide"===r?t.wide:null),color:"default",position:"absolute",component:"nav","aria-label":n("workspaceNavigation")},l.a.createElement(M.a,{disableGutters:!0,className:t.toolbar},l.a.createElement(Y,null),l.a.createElement("div",{className:t.workspaceButtons},l.a.createElement(sr,null))),l.a.createElement(yr,{className:t.branding,t:n,variant:r}))}}])&&wr(t.prototype,n),r&&wr(t,r),o}(u.Component);function Cr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Er.defaultProps={variant:"default"};var kr=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){var t;return{branding:(t={display:"flex",position:"absolute"},Cr(t,e.breakpoints.up("xs"),{display:"none"}),Cr(t,e.breakpoints.up("sm"),{bottom:0,display:"block",float:"none",right:"auto",width:"100%"}),Cr(t,"right",0),t),ctrlBtn:{margin:e.spacing(1)},drawer:{overflowX:"hidden"},root:Cr({height:64},e.breakpoints.up("sm"),{height:"100%",left:0,right:"auto",width:64}),toolbar:Cr({display:"flex",justifyContent:"space-between"},e.breakpoints.up("sm"),{flexDirection:"column",justifyContent:"flex-start",minHeight:0}),wide:{width:"auto"},workspaceButtons:Cr({},e.breakpoints.up("sm"),{display:"flex",flexDirection:"column"})}})),Object(c.a)("WorkspaceControlPanel"))(Er),Tr=n(583),jr=n(140),Pr=n(100),Ir=n(363),Rr=n.n(Ir),Ar=n(148),Mr=n(1160),Dr=n(747),Nr=n.n(Dr);function Lr(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},l.a.createElement("path",{d:"M3,3H21V5H3Z",transform:"translate(0 16)"}),l.a.createElement("path",{d:"M21,5H3V19H21ZM19,17H5V7H19Z",transform:"translate(0 -2)"})))}function zr(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},l.a.createElement("path",{d:"M0,0H24V24H0Z",transform:"translate(24) rotate(90)",fill:"none"}),l.a.createElement("path",{d:"M3,3H21V5H3Z",transform:"translate(24) rotate(90)"}),l.a.createElement("path",{d:"M19,3H5V21H19ZM17,19H7V5H17Z",transform:"translate(-2)"})))}function Br(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fr(e,t){return(Fr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ur(e);if(t){var i=Ur(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Hr(this,n)}}function Hr(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Vr(e)}function Vr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ur(e){return(Ur=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fr(e,t)}(o,e);var t,n,r,i=Wr(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleChange=t.handleChange.bind(Vr(t)),t}return t=o,(n=[{key:"handleChange",value:function(e){var t=this.props,n=t.windowId;(0,t.setWindowThumbnailPosition)(n,e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.handleClose,i=t.t,o=t.thumbnailNavigationPosition,a=t.direction;return l.a.createElement(l.a.Fragment,null,l.a.createElement(Nn.a,{role:"presentation",disableSticky:!0,tabIndex:"-1"},i("thumbnails")),l.a.createElement(me.a,{className:n.MenuItem,onClick:function(){e.handleChange("off"),r()}},l.a.createElement(Mr.a,{value:"off",classes:{label:"off"===o?n.selectedLabel:n.label},control:l.a.createElement(Nr.a,{color:"off"===o?"secondary":void 0}),label:i("off"),labelPlacement:"bottom"})),l.a.createElement(me.a,{className:n.MenuItem,onClick:function(){e.handleChange("far-bottom"),r()}},l.a.createElement(Mr.a,{value:"far-bottom",classes:{label:"far-bottom"===o?n.selectedLabel:n.label},control:l.a.createElement(Lr,{color:"far-bottom"===o?"secondary":void 0}),label:i("bottom"),labelPlacement:"bottom"})),l.a.createElement(me.a,{className:n.MenuItem,onClick:function(){e.handleChange("far-right"),r()}},l.a.createElement(Mr.a,{value:"far-right",classes:{label:"far-right"===o?n.selectedLabel:n.label},control:l.a.createElement(zr,{color:"far-right"===o?"secondary":void 0,style:"rtl"===a?{transform:"rotate(180deg)"}:{}}),label:i("right"),labelPlacement:"bottom"})))}}])&&Br(t.prototype,n),r&&Br(t,r),o}(u.Component);qr.defaultProps={handleClose:function(){},t:function(e){return e}};var Gr={setWindowThumbnailPosition:Mn.h},Kr=Object(r.compose)(Object(s.a)((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}}})),Object(o.a)(null,{withRef:!0}),Object(i.b)((function(e,t){var n=t.windowId;return{direction:Object(ge.h)(e),thumbnailNavigationPosition:Object(Ar.getThumbnailNavigationPosition)(e,{windowId:n})}}),Gr,null,{forwardRef:!0}),Object(c.a)("WindowThumbnailSettings"))(qr),$r=n(746),Zr=n.n($r),Xr=n(745),Qr=n.n(Xr);function Yr(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},l.a.createElement("path",{d:"M1,4V21H22.853V4.1ZM3,19V6h8V19Zm18,0H13V6h8ZM14,9.5h6V11H14ZM14,12h6v1.5H14Zm0,2.5h6V16H14Z"})))}function Jr(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},l.a.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 ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ti(e,t){return(ti=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ni(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oi(e);if(t){var i=oi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ri(this,n)}}function ri(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ii(e)}function ii(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oi(e){return(oi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ai=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ti(e,t)}(o,e);var t,n,r,i=ni(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleChange=t.handleChange.bind(ii(t)),t}return t=o,(n=[{key:"handleChange",value:function(e){var t=this.props,n=t.windowId;(0,t.setWindowViewType)(n,e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.handleClose,i=t.t,o=t.windowViewType,a=t.viewTypes,s={book:Yr,gallery:Jr,scroll:Qr.a,single:Zr.a};return 0===a.length?null:l.a.createElement(l.a.Fragment,null,l.a.createElement(Nn.a,{role:"presentation",disableSticky:!0,tabIndex:"-1"},i("view")),a.map((function(t){return function(t){var a=t.value,s=t.Icon;return l.a.createElement(me.a,{key:a,className:n.MenuItem,autoFocus:o===a,onClick:function(){e.handleChange(a),r()}},l.a.createElement(Mr.a,{value:a,classes:{label:o===a?n.selectedLabel:n.label},control:l.a.createElement(s,{color:o===a?"secondary":void 0}),label:i(a),labelPlacement:"bottom"}))}({Icon:s[t],value:t})})))}}])&&ei(t.prototype,n),r&&ei(t,r),o}(u.Component);ai.defaultProps={handleClose:function(){},t:function(e){return e},viewTypes:[]};var si={setWindowViewType:Mn.i},ci=Object(r.compose)(Object(s.a)((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}}})),Object(o.a)(null,{withRef:!0}),Object(i.b)((function(e,t){var n=t.windowId;return{viewTypes:Object(Dn.a)(e,{windowId:n}),windowViewType:Object(Dn.f)(e,{windowId:n})}}),si,null,{forwardRef:!0}),Object(c.a)("WindowViewSettings"))(ai);function ui(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function li(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fi(e,t){return(fi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function di(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=hi(e);if(t){var i=hi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pi(this,n)}}function pi(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function hi(e){return(hi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gi(e){var t=e.PluginComponents,n=e.t;return t?l.a.createElement(l.a.Fragment,null,l.a.createElement(Nn.a,{role:"presentation",disableSticky:!0,tabIndex:"-1"},n("windowPluginButtons")),l.a.createElement(mt.a,e)):null}var vi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fi(e,t)}(o,e);var t,n,r,i=di(o);function o(){return ui(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.containerId,n=e.handleClose,r=e.anchorEl,i=e.showThumbnailNavigationSettings,o=e.toggleDraggingEnabled,a=e.windowId;return l.a.createElement(ve.a,{id:"window-menu_".concat(a),container:document.querySelector("#".concat(t," .").concat(Object(at.a)("viewer"))),anchorEl:r,anchorOrigin:{horizontal:"right",vertical:"bottom"},transformOrigin:{horizontal:"right",vertical:"top"},getContentAnchorEl:null,open:Boolean(r),onClose:n,onEntering:o,onExit:o,orientation:"horizontal"},l.a.createElement(ci,{windowId:a,handleClose:n}),i&&l.a.createElement(Kr,{windowId:a,handleClose:n}),l.a.createElement(gi,this.props))}}])&&li(t.prototype,n),r&&li(t,r),o}(u.Component);vi.defaultProps={anchorEl:null,showThumbnailNavigationSettings:!0};var mi=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e){return{containerId:Object(ge.b)(e),showThumbnailNavigationSettings:Object(ge.a)(e).thumbnailNavigation.displaySettings}}),(function(e){return{toggleDraggingEnabled:function(){return e(N.e())}}})),Object(c.a)("WindowTopMenu"))(vi);function yi(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},l.a.createElement("path",{d:"M0,0H24V24H0Z",fill:"none"}),l.a.createElement("path",{d:"M24.852,17.981,3,18V15.945l21.852-.019Z",transform:"translate(-2 5)"}),l.a.createElement("path",{d:"M1,4V21H22.853V4.1ZM3,19V6h8V19Zm18,0H13V6h8Z",transform:"translate(0 -2)"})))}function bi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wi(e,t){return(wi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Si(e);if(t){var i=Si(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xi(this,n)}}function xi(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Oi(e)}function Oi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Si(e){return(Si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ei=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wi(e,t)}(o,e);var t,n,r,i=_i(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={anchorEl:null},t.handleMenuClick=t.handleMenuClick.bind(Oi(t)),t.handleMenuClose=t.handleMenuClose.bind(Oi(t)),t}return t=o,(n=[{key:"handleMenuClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=e.windowId,i=this.state.anchorEl;return l.a.createElement(l.a.Fragment,null,l.a.createElement(re.a,{"aria-haspopup":"true","aria-label":n("windowMenu"),"aria-owns":i?"window-menu_".concat(r):void 0,className:i?t.ctrlBtnSelected:null,onClick:this.handleMenuClick},l.a.createElement(yi,null)),l.a.createElement(mi,{windowId:r,anchorEl:i,handleClose:this.handleMenuClose}))}}])&&bi(t.prototype,n),r&&bi(t,r),o}(u.Component);Ei.defaultProps={t:function(e){return e}};var Ci=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(c.a)("WindowTopMenuButton"))(Ei);function ki(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ti(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ji(e,t){return(ji=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ri(e);if(t){var i=Ri(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ii(this,n)}}function Ii(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ri(e){return(Ri=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ai=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ji(e,t)}(o,e);var t,n,r,i=Pi(o);function o(){return ki(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){return l.a.createElement(l.a.Fragment,null,l.a.createElement(mt.a,this.props))}}])&&Ti(t.prototype,n),r&&Ti(t,r),o}(u.Component),Mi=Object(r.compose)(Object(o.a)(),Object(s.a)({}),Object(i.b)(null,null),Object(c.a)("WindowTopBarPluginArea"))(Ai),Di=n(748),Ni=n.n(Di);function Li(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zi(e,t){return(zi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hi(e);if(t){var i=Hi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fi(this,n)}}function Fi(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Wi(e)}function Wi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hi(e){return(Hi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zi(e,t)}(o,e);var t,n,r,i=Bi(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={anchorEl:null},t.handleMenuClick=t.handleMenuClick.bind(Wi(t)),t.handleMenuClose=t.handleMenuClose.bind(Wi(t)),t}return t=o,(n=[{key:"handleMenuClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.containerId,i=t.PluginComponents,o=t.t,a=t.windowId,s=t.menuIcon,c=this.state.anchorEl;return i&&0!==i.length?l.a.createElement(l.a.Fragment,null,l.a.createElement(re.a,{"aria-haspopup":"true","aria-label":o("windowPluginMenu"),"aria-owns":c?"window-plugin-menu_".concat(a):void 0,className:c?n.ctrlBtnSelected:null,onClick:this.handleMenuClick},s),l.a.createElement(ve.a,{id:"window-plugin-menu_".concat(a),container:document.querySelector("#".concat(r," .").concat(Object(at.a)("viewer"))),anchorEl:c,anchorOrigin:{horizontal:"right",vertical:"bottom"},transformOrigin:{horizontal:"right",vertical:"top"},getContentAnchorEl:null,open:Boolean(c),onClose:function(){return e.handleMenuClose()}},l.a.createElement(mt.a,Object.assign({handleClose:function(){return e.handleMenuClose()}},this.props)))):l.a.createElement(l.a.Fragment,null)}}])&&Li(t.prototype,n),r&&Li(t,r),o}(u.Component);Vi.defaultProps={classes:{},menuIcon:l.a.createElement(Ni.a,null),PluginComponents:[]};var Ui=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(i.b)((function(e){return{containerId:Object(ge.b)(e)}}),null),Object(c.a)("WindowTopBarPluginMenu"))(Vi),qi=n(90),Gi=n(1169),Ki=n(359),$i=n.n(Ki);function Zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qi(e,t){return(Qi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=eo(e);if(t){var i=eo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ji(this,n)}}function Ji(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function eo(e){return(eo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var to=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qi(e,t)}(o,e);var t,n,r,i=Yi(o);function o(){return Zi(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.error,r=e.hideWindowTitle,i=e.isFetching,o=e.manifestTitle,a=function(e){return l.a.createElement(y.a,Object.assign({variant:"h2",noWrap:!0,color:"inherit",className:t.title},e),e.children)};return i?l.a.createElement(a,null,l.a.createElement(Gi.a,{variant:"text"})):n?l.a.createElement(l.a.Fragment,null,l.a.createElement($i.a,{color:"error"}),l.a.createElement(a,{color:"textSecondary"},n)):r?l.a.createElement("div",{className:t.title}):l.a.createElement(a,null,o)}}])&&Xi(t.prototype,n),r&&Xi(t,r),o}(u.Component);function no(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ro(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?no(Object(n),!0).forEach((function(t){io(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):no(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}to.defaultProps={error:null,hideWindowTitle:!1,isFetching:!1,manifestTitle:""};var oo=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{title:ro(ro({},e.typography.h6),{},{flexGrow:1,paddingLeft:e.spacing(.5)})}})),Object(i.b)((function(e,t){var n=t.windowId;return{error:Object(qi.m)(e,{windowId:n}).error,hideWindowTitle:Object(Dn.c)(e,{windowId:n}).hideWindowTitle,isFetching:Object(qi.m)(e,{windowId:n}).isFetching,manifestTitle:Object(qi.o)(e,{windowId:n})}}),null),Object(c.a)("WindowTopBarTitle"))(to);function ao(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},l.a.createElement("path",{d:"M7,14H5v5h5V17H7Zm7-9V7h3v3h2V5Z"}),l.a.createElement("path",{d:"M22.517,1.524H1.736V22.37H22.517Zm-2,18.845H3.736V3.524H20.517Z"})))}function so(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},l.a.createElement("path",{d:"M5,16H8v3h2V14H5ZM16,8V5H14v5h5V8Z"}),l.a.createElement("path",{d:"M22.517,1.524H1.736V22.37H22.517Zm-2,18.845H3.736V3.524H20.517Z"})))}function co(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lo(e,t){return(lo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ho(e);if(t){var i=ho(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return po(this,n)}}function po(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ho(e){return(ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var go=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lo(e,t)}(o,e);var t,n,r,i=fo(o);function o(){return co(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.removeWindow,n=e.windowId,r=e.classes,i=e.toggleWindowSideBar,o=e.t,a=e.windowDraggable,s=e.maximizeWindow,c=e.maximized,u=e.minimizeWindow,f=e.focused,p=e.allowClose,h=e.allowMaximize,g=e.focusWindow,v=e.allowFullscreen,m=e.allowTopMenuButton,y=e.allowWindowSideBar;return l.a.createElement(A.a,{position:"relative",color:"default"},l.a.createElement("nav",{"aria-label":o("windowNavigation")},l.a.createElement(M.a,{disableGutters:!0,onMouseDown:g,className:d()(r.windowTopBarStyle,a?r.windowTopBarStyleDraggable:null,f?r.focused:null,Object(at.a)("window-top-bar")),variant:"dense"},y&&l.a.createElement(re.a,{"aria-label":o("toggleWindowSideBar"),onClick:i},l.a.createElement(Rr.a,null)),l.a.createElement(oo,{windowId:n}),m&&l.a.createElement(Ci,{className:Object(at.a)("window-menu-btn"),windowId:n}),l.a.createElement(Mi,{windowId:n}),l.a.createElement(Ui,{windowId:n}),h&&l.a.createElement(re.a,{"aria-label":o(c?"minimizeWindow":"maximizeWindow"),className:Object(at.a)("window-maximize"),onClick:c?u:s},c?l.a.createElement(so,null):l.a.createElement(ao,null)),v&&l.a.createElement(de,null),p&&l.a.createElement(re.a,{"aria-label":o("closeWindow"),className:Object(at.a)("window-close"),onClick:t},l.a.createElement(V.a,null)))))}}])&&uo(t.prototype,n),r&&uo(t,r),o}(u.Component);go.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 vo=Object(r.compose)(Object(o.a)(),Object(s.a)((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"}}})),Object(i.b)((function(e,t){var n=t.windowId,r=Object(Dn.c)(e,{windowId:n});return{allowClose:r.allowClose,allowFullscreen:r.allowFullscreen,allowMaximize:r.allowMaximize,allowTopMenuButton:r.allowTopMenuButton,allowWindowSideBar:r.allowWindowSideBar,focused:Object(P.e)(e,{windowId:n}),maximized:r.maximized}}),(function(e,t){var n=t.windowId;return{focusWindow:function(){return e(Mn.b(n))},maximizeWindow:function(){return e(Mn.d(n))},minimizeWindow:function(){return e(Mn.e(n))},removeWindow:function(){return e(Mn.f(n))},toggleWindowSideBar:function(){return e(Mn.k(n))}}})),Object(c.a)("WindowTopBar"))(go),mo=n(45),yo=n(106),bo=n(531),wo=n(48),_o=n(667),xo=n(566),Oo=n(1120),So=n(1173),Eo=n(1165),Co=n(750),ko=n.n(Co),To=n(364),jo=n.n(To),Po=n(751),Io=n.n(Po),Ro=n(752),Ao=n.n(Ro),Mo=n(218),Do=n.n(Mo);function No(e){return l.a.createElement(Ke.a,e,l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},l.a.createElement("path",{d:"M6.924,21H21V19H6.924ZM3,17H21V15H3Zm3.924-4H21V11H6.924Zm0-4H21V7H6.924ZM3,3V5H21V3Z"})))}function Lo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zo(e,t){return(zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ho(e);if(t){var i=Ho(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fo(this,n)}}function Fo(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Wo(e)}function Wo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ho(e){return(Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zo(e,t)}(o,e);var t,n,r,i=Bo(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleChange=t.handleChange.bind(Wo(t)),t}return t=o,(n=[{key:"handleChange",value:function(e,t){(0,this.props.addCompanionWindow)(t)}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.hasAnnotations,i=t.hasAnyAnnotations,o=t.hasAnyLayers,a=t.hasCurrentLayers,s=t.hasSearchResults,c=t.hasSearchService,u=t.panels,f=t.PluginComponents,d=t.sideBarPanel,p=t.t,h=function(t){return l.a.createElement(B.a,{title:p("openCompanionWindow",{context:t.value})},l.a.createElement(Eo.a,Object.assign({},t,{classes:{root:n.tab,selected:n.tabSelected},"aria-label":p("openCompanionWindow",{context:t.value}),disableRipple:!0,onKeyUp:e.handleKeyUp})))};return l.a.createElement(So.a,{classes:{flexContainer:n.tabsFlexContainer,indicator:n.tabsIndicator},value:"closed"!==d&&d,onChange:this.handleChange,variant:"fullWidth",indicatorColor:"primary",textColor:"primary",orientation:"vertical","aria-orientation":"vertical","aria-label":p("sidebarPanelsNavigation")},u.info&&l.a.createElement(h,{value:"info",icon:l.a.createElement(ko.a,null)}),u.attribution&&l.a.createElement(h,{value:"attribution",icon:l.a.createElement(Io.a,null)}),u.canvas&&l.a.createElement(h,{value:"canvas",icon:l.a.createElement(No,null)}),u.annotations&&(r||i)&&l.a.createElement(h,{value:"annotations",icon:l.a.createElement(Oo.a,{classes:{badge:n.badge},invisible:!r,variant:"dot"},l.a.createElement(jo.a,null))}),u.search&&c&&l.a.createElement(h,{value:"search",icon:l.a.createElement(Oo.a,{classes:{badge:n.badge},invisible:!s,variant:"dot"},l.a.createElement(Do.a,null))}),u.layers&&o&&l.a.createElement(h,{value:"layers",icon:l.a.createElement(Oo.a,{classes:{badge:n.badge},invisible:!a,variant:"dot"},l.a.createElement(Ao.a,null))}),f&&f.map((function(e){return l.a.createElement(h,{key:e.value,value:e.value,icon:l.a.createElement(e,null)})})))}}])&&Lo(t.prototype,n),r&&Lo(t,r),o}(u.Component);Vo.defaultProps={classes:{},hasAnnotations:!1,hasAnyAnnotations:!1,hasAnyLayers:!1,hasCurrentLayers:!1,hasSearchResults:!1,hasSearchService:!1,panels:[],PluginComponents:null,sideBarPanel:"closed",t:function(e){return e}};function Uo(e){return e&&e.some((function(e){return new wo.a(e).imageResources.length>1}))}var qo=Object(r.compose)(Object(o.a)(),Object(s.a)((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"}}})),Object(i.b)((function(e,t){var n,r=t.windowId;return{hasAnnotations:Object(_o.a)(e,{windowId:r}).length>0,hasAnyAnnotations:(n=Object(mo.getCanvases)(e,{windowId:r}),n&&n.some((function(e){var t=new wo.a(e);return t.annotationListUris.length>0||t.canvasAnnotationPages.length>0}))),hasAnyLayers:Uo(Object(mo.getCanvases)(e,{windowId:r})),hasCurrentLayers:Uo(Object(mo.getVisibleCanvases)(e,{windowId:r})),hasSearchResults:Object(L.e)(e,{windowId:r}).suggestedSearches||Object(xo.j)(e,{companionWindowId:(Object(Ar.getCompanionWindowsForPosition)(e,{position:"left",windowId:r})[0]||{}).id,windowId:r}),hasSearchService:null!==Object(qi.l)(e,{windowId:r}),panels:Object(Dn.c)(e,{windowId:r}).panels,sideBarPanel:(Object(Ar.getCompanionWindowsForPosition)(e,{position:"left",windowId:r})[0]||{}).content}}),(function(e,t){var n=t.windowId;return{addCompanionWindow:function(t){return e(bo.b(n,{content:t,position:"left"}))}}})),Object(c.a)("WindowSideBarButtons"))(Vo);function Go(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ko(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $o(e,t){return($o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qo(e);if(t){var i=Qo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xo(this,n)}}function Xo(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qo(e){return(Qo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$o(e,t)}(o,e);var t,n,r,i=Zo(o);function o(){return Go(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.direction,r=e.t,i=e.windowId,o=e.sideBarOpen;return l.a.createElement(l.a.Fragment,null,l.a.createElement(yo.a,{variant:"persistent",className:d()(t.drawer),classes:{paper:d()(t.paper)},anchor:"rtl"===n?"right":"left",PaperProps:{"aria-label":r("sidebarPanelsNavigation"),component:"nav",style:{height:"100%",position:"relative"}},SlideProps:{direction:"rtl"===n?"left":"right",mountOnEnter:!0,unmountOnExit:!0},open:o},l.a.createElement(qo,{windowId:i})))}}])&&Ko(t.prototype,n),r&&Ko(t,r),o}(u.Component);Yo.defaultProps={sideBarOpen:!1};var Jo=Object(r.compose)(Object(s.a)((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}})),Object(o.a)(),Object(i.b)((function(e,t){var n=t.windowId;return{direction:Object(ge.h)(e),sideBarOpen:(Object(L.e)(e,{windowId:n})||{}).sideBarOpen,sideBarPanel:(Object(L.e)(e,{windowId:n})||{}).sideBarPanel}}),null),Object(c.a)("WindowSideBar"))(Yo),ea=n(1128),ta=n(470),na=n.n(ta),ra=n(469),ia=n.n(ra),oa=n(254),aa=n(62),sa=n(4),ca=n(1),ua=(n(2),n(3)),la=n(43),fa=Object(la.a)(u.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"}),"SuccessOutlined"),da=Object(la.a)(u.createElement("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),pa=Object(la.a)(u.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"}),"ErrorOutline"),ha=Object(la.a)(u.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"}),"InfoOutlined"),ga=n(354),va=n(11),ma={success:u.createElement(fa,{fontSize:"inherit"}),warning:u.createElement(da,{fontSize:"inherit"}),error:u.createElement(pa,{fontSize:"inherit"}),info:u.createElement(ha,{fontSize:"inherit"})},ya=u.createElement(ga.a,{fontSize:"small"}),ba=u.forwardRef((function(e,t){var n=e.action,r=e.children,i=e.classes,o=e.className,a=e.closeText,s=void 0===a?"Close":a,c=e.color,l=e.icon,f=e.iconMapping,d=void 0===f?ma:f,p=e.onClose,h=e.role,g=void 0===h?"alert":h,v=e.severity,m=void 0===v?"success":v,y=e.variant,b=void 0===y?"standard":y,w=Object(sa.a)(e,["action","children","classes","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"]);return u.createElement(jr.a,Object(ca.a)({role:g,square:!0,elevation:0,className:Object(ua.a)(i.root,i["".concat(b).concat(Object(va.a)(c||m))],o),ref:t},w),!1!==l?u.createElement("div",{className:i.icon},l||d[m]||ma[m]):null,u.createElement("div",{className:i.message},r),null!=n?u.createElement("div",{className:i.action},n):null,null==n&&p?u.createElement("div",{className:i.action},u.createElement(Ht.a,{size:"small","aria-label":s,title:s,color:"inherit",onClick:p},ya)):null)})),wa=Object(s.a)((function(e){var t="light"===e.palette.type?a.b:a.j,n="light"===e.palette.type?a.j:a.b;return{root:Object(ca.a)({},e.typography.body2,{borderRadius:e.shape.borderRadius,backgroundColor:"transparent",display:"flex",padding:"6px 16px"}),standardSuccess:{color:t(e.palette.success.main,.6),backgroundColor:n(e.palette.success.main,.9),"& $icon":{color:e.palette.success.main}},standardInfo:{color:t(e.palette.info.main,.6),backgroundColor:n(e.palette.info.main,.9),"& $icon":{color:e.palette.info.main}},standardWarning:{color:t(e.palette.warning.main,.6),backgroundColor:n(e.palette.warning.main,.9),"& $icon":{color:e.palette.warning.main}},standardError:{color:t(e.palette.error.main,.6),backgroundColor:n(e.palette.error.main,.9),"& $icon":{color:e.palette.error.main}},outlinedSuccess:{color:t(e.palette.success.main,.6),border:"1px solid ".concat(e.palette.success.main),"& $icon":{color:e.palette.success.main}},outlinedInfo:{color:t(e.palette.info.main,.6),border:"1px solid ".concat(e.palette.info.main),"& $icon":{color:e.palette.info.main}},outlinedWarning:{color:t(e.palette.warning.main,.6),border:"1px solid ".concat(e.palette.warning.main),"& $icon":{color:e.palette.warning.main}},outlinedError:{color:t(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}}}),{name:"MuiAlert"})(ba);function _a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oa(e,t){return(Oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ca(e);if(t){var i=Ca(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ea(this,n)}}function Ea(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ca(e){return(Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ka=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oa(e,t)}(o,e);var t,n,r,i=Sa(o);function o(){return _a(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.error,r=e.metadata,i=e.showJsError,o=e.t;return i?l.a.createElement(l.a.Fragment,null,l.a.createElement(wa,{elevation:6,variant:"filled",severity:"error"},o("errorDialogTitle")),i&&l.a.createElement(Kt.a,{square:!0,className:t.alert},l.a.createElement($t.a,{expandIcon:l.a.createElement(Ut.a,null)},l.a.createElement(y.a,null,o("jsError",{message:n.message,name:n.name}))),l.a.createElement(Zt.a,{className:t.details},l.a.createElement("pre",null,o("jsStack",{stack:n.stack})),r&&l.a.createElement("pre",null,JSON.stringify(r,null,2)))),l.a.createElement(mt.a,this.props)):null}}])&&xa(t.prototype,n),r&&xa(t,r),o}(u.Component);ka.defaultProps={metadata:null,showJsError:!0,t:function(e){return e}};var Ta=Object(r.compose)(Object(o.a)(),Object(s.a)((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"}}})),Object(i.b)((function(e,t){var n=t.companionWindowId,r=t.windowId;return{metadata:{companionWindow:n&&Object(Ar.getCompanionWindow)(e,{companionWindowId:n}),manifest:Object(L.b)(e,{windowId:r}),viewer:Object(L.d)(e,{windowId:r}),window:Object(L.e)(e,{windowId:r})},showJsError:Object(ge.a)(e).window.showJsError}})),Object(c.a)("ErrorContent"))(ka);function ja(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pa(e,t){return(Pa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ia(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Aa(e);if(t){var i=Aa(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ra(this,n)}}function Ra(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Aa(e){return(Aa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ma=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pa(e,t)}(o,e);var t,n,r,i=Ia(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={},t}return t=o,r=[{key:"getDerivedStateFromError",value:function(e){return{error:e,hasError:!0}}}],(n=[{key:"componentDidUpdate",value:function(e){this.props.content!==e.content&&this.setState({error:null,hasError:!1})}},{key:"render",value:function(){var e=this.props,t=e.content,n=e.windowId,r=e.id,i=e.t,o=this.state,a=o.error;if(o.hasError)return l.a.createElement(aa.default,{title:i("error"),windowId:n,id:r},l.a.createElement(Ta,{error:a,windowId:n,companionWindowId:r}));var s=oa.a[t];return s?l.a.createElement(s,{id:r,windowId:n}):l.a.createElement(l.a.Fragment,null)}}])&&ja(t.prototype,n),r&&ja(t,r),o}(u.Component);Ma.defaultProps={content:null,t:function(e){return e}};var Da=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e,t){var n=t.id;return{content:Object(Ar.getCompanionWindow)(e,{companionWindowId:n}).content,id:n}})),Object(c.a)("CompanionWindowFactory"))(Ma);function Na(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function La(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function za(e,t){return(za=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ba(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wa(e);if(t){var i=Wa(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fa(this,n)}}function Fa(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Wa(e){return(Wa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ha=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&za(e,t)}(o,e);var t,n,r,i=Ba(o);function o(){return Na(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"areaLayoutClass",value:function(){var e=this.props,t=e.classes,n=e.position;return"bottom"===n||"far-bottom"===n?t.horizontal:null}},{key:"collapseIcon",value:function(){var e=this.props,t=e.companionAreaOpen;return"rtl"===e.direction?t?l.a.createElement(ia.a,null):l.a.createElement(na.a,null):t?l.a.createElement(na.a,null):l.a.createElement(ia.a,null)}},{key:"slideDirection",value:function(){var e=this.props,t=e.direction,n="rtl"===t?"left":"right",r="rtl"===t?"right":"left";switch(e.position){case"right":case"far-right":return r;case"bottom":case"far-bottom":return"up";default:return n}}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.companionWindowIds,r=e.companionAreaOpen,i=e.setCompanionAreaOpen,o=e.position,a=e.sideBarOpen,s=e.t,c=e.windowId;return l.a.createElement("div",{className:[t.root,this.areaLayoutClass(),Object(at.a)("companion-area-".concat(o))].join(" ")},l.a.createElement(ea.a,{in:r,direction:this.slideDirection()},l.a.createElement("div",{className:[Object(at.a)("companion-windows"),n.length>0&&t[o],this.areaLayoutClass()].join(" "),style:{display:r?"flex":"none"}},n.map((function(e){return l.a.createElement(Da,{id:e,key:e,windowId:c})})))),i&&"left"===o&&a&&n.length>0&&l.a.createElement("div",{className:t.toggle},l.a.createElement(re.a,{"aria-expanded":r,"aria-label":s(r?"collapseSidePanel":"expandSidePanel"),className:t.toggleButton,key:r?"collapse":"expand",onClick:function(){i(c,!r)},TooltipProps:{placement:"right"}},this.collapseIcon())))}}])&&La(t.prototype,n),r&&La(t,r),o}(u.Component);Ha.defaultProps={classes:{},setCompanionAreaOpen:function(){},sideBarOpen:!1};var Va={setCompanionAreaOpen:Mn.g},Ua=Object(r.compose)(Object(o.a)(),Object(s.a)((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}}})),Object(i.b)((function(e,t){var n=t.windowId,r=t.position;return{companionAreaOpen:Object(Ar.getCompanionAreaVisibility)(e,{position:r,windowId:n}),companionWindowIds:Object(Ar.getCompanionWindowIdsForPosition)(e,{position:r,windowId:n}),direction:Object(ge.h)(e),sideBarOpen:(Object(L.e)(e,{windowId:n})||{}).sideBarOpen}}),Va),Object(c.a)("CompanionArea"))(Ha),qa=n(76),Ga=n(1162),Ka=n(1177),$a=n(355),Za=n.n($a),Xa=n(110),Qa=n(151),Ya=n(124),Ja=n(369);function es(e){return function(e){if(Array.isArray(e))return ts(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ts(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ts(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ts(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ns(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rs(e,t){return(rs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function is(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ss(e);if(t){var i=ss(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return os(this,n)}}function os(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return as(e)}function as(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ss(e){return(ss=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rs(e,t)}(o,e);var t,n,r,i=is(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={filter:null},t.hideDialog=t.hideDialog.bind(as(t)),t}return t=o,r=[{key:"getUseableLabel",value:function(e,t){return e&&e.getLabel&&e.getLabel().length>0?e.getLabel().getValue():String(t+1)}}],(n=[{key:"setFilter",value:function(e){this.setState({filter:e})}},{key:"hideDialog",value:function(){var e=this.props;(0,e.hideCollectionDialog)(e.windowId)}},{key:"selectCollection",value:function(e){var t=this.props,n=t.collectionPath,r=t.manifestId,i=t.showCollectionDialog,o=t.windowId;i(e.id,[].concat(es(n),[r]),o)}},{key:"goToPreviousCollection",value:function(){var e=this.props,t=e.collectionPath,n=e.showCollectionDialog,r=e.windowId;n(t[t.length-1],t.slice(0,-1),r)}},{key:"selectManifest",value:function(e){var t=this.props,n=t.addWindow,r=t.collectionPath,i=t.manifestId,o=t.setWorkspaceAddVisibility,a=t.updateWindow,s=t.windowId;s?a(s,{canvasId:null,collectionPath:[].concat(es(r),[i]),manifestId:e.id}):n({collectionPath:[].concat(es(r),[i]),manifestId:e.id}),this.hideDialog(),o(!1)}},{key:"dialogContainer",value:function(){var e=this.props,t=e.containerId,n=e.windowId;return document.querySelector("#".concat(t," #").concat(n))}},{key:"placeholder",value:function(){var e=this.props.classes;return l.a.createElement(g.a,{className:e.dialog,onClose:this.hideDialog,open:!0,container:this.dialogContainer(),BackdropProps:this.backdropProps()},l.a.createElement(m.a,{id:"select-collection",disableTypography:!0},l.a.createElement(Gi.a,{className:e.placeholder,variant:"text"})),l.a.createElement(Xe.a,null,l.a.createElement(Gi.a,{className:e.placeholder,variant:"text"}),l.a.createElement(Gi.a,{className:e.placeholder,variant:"text"})))}},{key:"backdropProps",value:function(){return{classes:{root:this.props.classes.dialog}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.collection,i=t.error,a=t.isMultipart,s=t.manifest,c=t.ready,u=t.t,f=this.state.filter;if(i)return null;if(!this.dialogContainer())return this.forceUpdate(),l.a.createElement(l.a.Fragment,null);if(!c)return this.placeholder();var d=s&&Object(Xa.a)(s.getProperty("rights")||s.getProperty("license")),p=s&&Object(Xa.a)(s.getRequiredStatement()).filter((function(e){return e.getValue()})).map((function(e){return{label:null,values:e.getValues()}})),h=s.getCollections(),v=f||(h.length>0?"collections":"manifests");return l.a.createElement(g.a,{className:n.dialog,onClose:this.hideDialog,container:this.dialogContainer(),BackdropProps:this.backdropProps(),open:!0},l.a.createElement(m.a,{id:"select-collection",disableTypography:!0},l.a.createElement(y.a,{component:"div",variant:"overline"},u(a?"multipartCollection":"collection")),l.a.createElement(y.a,{variant:"h3"},o.getUseableLabel(s))),l.a.createElement(Xe.a,{className:n.dialogContent},r&&l.a.createElement(_.a,{startIcon:l.a.createElement(Za.a,null),onClick:function(){return e.goToPreviousCollection()}},o.getUseableLabel(r)),l.a.createElement("div",{className:n.collectionMetadata},l.a.createElement(Ja.a,{manifestId:s.id}),l.a.createElement(Ya.a,{id:"select-collection-rights",label:u("attributionTitle")},p&&l.a.createElement(Qa.a,{labelValuePairs:p,defaultLabel:u("attribution")}),d&&d.length>0&&l.a.createElement(l.a.Fragment,null,l.a.createElement(y.a,{variant:"subtitle2",component:"dt"},u("rights")),d.map((function(e){return l.a.createElement(y.a,{variant:"body1",component:"dd",key:e},l.a.createElement(Ga.a,{target:"_blank",rel:"noopener noreferrer",href:e},e))}))))),l.a.createElement("div",{className:n.collectionFilter},s.getTotalCollections()>0&&l.a.createElement(Ka.a,{clickable:!0,color:"collections"===v?"primary":"default",onClick:function(){return e.setFilter("collections")},label:u("totalCollections",{count:s.getTotalCollections()})}),s.getTotalManifests()>0&&l.a.createElement(Ka.a,{clickable:!0,color:"manifests"===v?"primary":"default",onClick:function(){return e.setFilter("manifests")},label:u("totalManifests",{count:s.getTotalManifests()})})),"collections"===v&&l.a.createElement(Ue.a,null,h.map((function(t){return l.a.createElement(me.a,{key:t.id,onClick:function(){e.selectCollection(t)},className:n.collectionItem},o.getUseableLabel(t))}))),"manifests"===v&&l.a.createElement(Ue.a,null,s.getManifests().map((function(t){return l.a.createElement(me.a,{key:t.id,onClick:function(){e.selectManifest(t)},className:n.collectionItem},o.getUseableLabel(t))})))),l.a.createElement(w.a,null,l.a.createElement(_.a,{onClick:this.hideDialog},u("close"))))}}])&&ns(t.prototype,n),r&&ns(t,r),o}(u.Component);cs.defaultProps={collection:null,collectionPath:[],containerId:null,error:null,isMultipart:!1,ready:!1,windowId:null};var us={addWindow:Mn.a,hideCollectionDialog:Mn.c,setWorkspaceAddVisibility:N.a,showCollectionDialog:Mn.j,updateWindow:Mn.l},ls=Object(r.compose)(Object(o.a)(),Object(s.a)((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"}}})),Object(i.b)((function(e,t){var n=t.windowId,r=Object(L.e)(e,{windowId:n}),i=r.collectionPath,o=r.collectionManifestId,a=Object(L.b)(e,{manifestId:o}),s=i&&i[i.length-1],c=s&&Object(L.b)(e,{manifestId:s});return{collection:c&&Object(qi.q)(e,{manifestId:c.id}),collectionPath:i,containerId:Object(ge.b)(e),error:a&&a.error,isMultipart:Object(qa.c)(e,{manifestId:o}).includes("multi-part"),manifest:a&&Object(qi.q)(e,{manifestId:o}),manifestId:o,open:e.workspace.collectionDialogOn,ready:a&&!!a.json,windowId:n}}),us),Object(c.a)("CollectionDialog"))(cs);function fs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ds(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ps(e,t){return(ps=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vs(e);if(t){var i=vs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gs(this,n)}}function gs(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vs(e){return(vs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ms=Object(u.lazy)((function(){return Promise.resolve().then(n.bind(null,1179))})),ys=Object(u.lazy)((function(){return Promise.resolve().then(n.bind(null,1174))})),bs=Object(u.lazy)((function(){return Promise.resolve().then(n.bind(null,1180))})),ws=Object(u.lazy)((function(){return Promise.resolve().then(n.bind(null,1171))})),_s=Object(u.lazy)((function(){return Promise.resolve().then(n.bind(null,1181))}));ys.displayName="GalleryView",bs.displayName="SelectCollection",ws.displayName="WindowViewer";var xs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ps(e,t)}(o,e);var t,n,r,i=hs(o);function o(){return fs(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"renderViewer",value:function(){var e=this.props,t=e.audioResources,n=e.isCollection,r=e.isFetching,i=e.videoResources,o=e.view,a=e.windowId;return n?l.a.createElement(l.a.Fragment,null,l.a.createElement(bs,{windowId:a})):!1===r?"gallery"===o?l.a.createElement(ys,{windowId:a}):i.length>0?l.a.createElement(_s,{windowId:a}):t.length>0?l.a.createElement(ms,{windowId:a}):l.a.createElement(ws,{windowId:a}):null}},{key:"render",value:function(){var e=this.props,t=e.isCollectionDialogVisible,n=e.windowId,r=e.classes,i=e.children;return l.a.createElement("div",{className:d()(Object(at.a)("primary-window"),r.primaryWindow)},l.a.createElement(Jo,{windowId:n}),l.a.createElement(Ua,{windowId:n,position:"left"}),t&&l.a.createElement(ls,{windowId:n}),l.a.createElement(u.Suspense,{fallback:l.a.createElement("div",null)},i||this.renderViewer()))}}])&&ds(t.prototype,n),r&&ds(t,r),o}(u.Component);xs.defaultProps={audioResources:[],children:void 0,isCollection:!1,isCollectionDialogVisible:!1,isFetching:!1,videoResources:[],view:void 0};var Os=Object(r.compose)(Object(s.a)({primaryWindow:{display:"flex",flex:1,position:"relative"}}),Object(i.b)((function(e,t){var n=t.windowId,r=Object(qi.q)(e,{windowId:n});return{audioResources:Object(mo.getVisibleCanvasAudioResources)(e,{windowId:n})||[],isCollection:r&&r.isCollection(),isCollectionDialogVisible:Object(L.e)(e,{windowId:n}).collectionDialogOn,videoResources:Object(mo.getVisibleCanvasVideoResources)(e,{windowId:n})||[]}}),null),Object(c.a)("PrimaryWindow"))(xs);function Ss(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Es(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cs(e,t){return(Cs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=js(e);if(t){var i=js(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ts(this,n)}}function Ts(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function js(e){return(js=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ps=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cs(e,t)}(o,e);var t,n,r,i=ks(o);function o(){return Ss(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.allowClose,n=e.allowWindowSideBar,r=e.ariaLabel,i=e.children,o=e.classes,a=e.label,s=e.removeWindow,c=e.t,u=e.windowId;return l.a.createElement(jr.a,{component:"section",elevation:1,id:u,className:d()(o.window,Object(at.a)("placeholder-window")),"aria-label":a&&r?c("window",{label:a}):null},l.a.createElement(A.a,{position:"relative",color:"default"},l.a.createElement(M.a,{disableGutters:!0,className:d()(o.windowTopBarStyle,Object(at.a)("window-top-bar")),variant:"dense"},n&&l.a.createElement(re.a,{"aria-label":c("toggleWindowSideBar"),disabled:!0},l.a.createElement(Rr.a,null)),l.a.createElement(y.a,{variant:"h2",noWrap:!0,color:"inherit",className:o.title},a),t&&s&&l.a.createElement(re.a,{"aria-label":c("closeWindow"),className:d()(o.button,Object(at.a)("window-close")),onClick:s,TooltipProps:{tabIndex:r?"0":"-1"}},l.a.createElement(V.a,null)))),i)}}])&&Es(t.prototype,n),r&&Es(t,r),o}(u.Component);function Is(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Is(Object(n),!0).forEach((function(t){As(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Is(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ps.defaultProps={allowClose:!0,allowWindowSideBar:!0,ariaLabel:!0,children:null,classes:{},label:"",removeWindow:function(){},t:function(e){return e}};var Ms=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{button:{marginLeft:"auto"},title:Rs(Rs({},e.typography.h6),{},{flexGrow:1,paddingLeft:e.spacing(.5)}),window:{backgroundColor:e.palette.shades.dark,borderRadius:0,display:"flex",flexDirection:"column",height:"100%",minHeight:0,overflow:"hidden",width:"100%"},windowTopBarStyle:{backgroundColor:e.palette.shades.main,borderTop:"2px solid transparent",minHeight:32,paddingLeft:e.spacing(.5),paddingRight:e.spacing(.5)}}})),Object(i.b)((function(e,t){var n=t.windowId;return{allowClose:Object(Dn.c)(e,{windowId:n}).allowClose,allowWindowSideBar:Object(Dn.c)(e,{windowId:n}).allowWindowSideBar}}),(function(e,t){var n=t.windowId;return{removeWindow:function(){return e(Mn.f(n))}}})),Object(c.a)("MinimalWindow"))(Ps),Ds=n(35),Ns=n(561),Ls=n(567),zs=n(749),Bs=n.n(zs);function Fs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ws(e,t){return(Ws=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qs(e);if(t){var i=qs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vs(this,n)}}function Vs(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Us(e)}function Us(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qs(e){return(qs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ws(e,t)}(o,e);var t,n,r,i=Hs(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).onReceiveAccessTokenMessage=t.onReceiveAccessTokenMessage.bind(Us(t)),t}return t=o,(n=[{key:"onReceiveAccessTokenMessage",value:function(e){var t=this.props,n=t.handleAccessTokenMessage,r=t.url;e.data&&e.data.messageId&&e.data.messageId===r&&n(e.data)}},{key:"render",value:function(){var e=this.props.url;return e?l.a.createElement(Bs.a,{attributes:{"aria-hidden":!0,height:1,src:"".concat(e,"?origin=").concat(window.origin,"&messageId=").concat(e),style:{visibility:"hidden"},width:1},handleReceiveMessage:this.onReceiveAccessTokenMessage}):l.a.createElement(l.a.Fragment,null)}}])&&Fs(t.prototype,n),r&&Fs(t,r),o}(u.Component);function Ks(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $s(e,t){return($s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qs(e);if(t){var i=Qs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xs(this,n)}}function Xs(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qs(e){return(Qs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gs.defaultProps={url:void 0};var Ys=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$s(e,t)}(o,e);var t,n,r,i=Zs(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).released=void 0,t.window=null,t.checkIfWindowClosed=null,t}return t=o,(n=[{key:"componentDidMount",value:function(){this.openWindow()}},{key:"componentWillUnmount",value:function(){this.window&&this.window.close()}},{key:"onClose",value:function(){var e=this.props,t=e.onClose,n=e.url;this.released||(this.released=!0,clearInterval(this.checkIfWindowClosed),t(n))}},{key:"openWindow",value:function(){var e=this,t=this.props,n=t.depWindow,r=t.features,i=t.name,o=t.url;this.window=(n||window).open(o,i,r),this.released=!1,this.checkIfWindowClosed=setInterval((function(){e.window&&!e.window.closed||e.onClose()}),250)}},{key:"render",value:function(){return null}}])&&Ks(t.prototype,n),r&&Ks(t,r),o}(u.Component);Ys.defaultProps={depWindow:void 0,features:void 0,name:void 0};var Js=n(71),ec=n(1127),tc=n(468),nc=n.n(tc),rc=n(72);function ic(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ic(Object(n),!0).forEach((function(t){ac(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ic(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ac(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cc(e,t){return(cc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dc(e);if(t){var i=dc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lc(this,n)}}function lc(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fc(e)}function fc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dc(e){return(dc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cc(e,t)}(o,e);var t,n,r,i=uc(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={open:!1},t.setOpen=t.setOpen.bind(fc(t)),t.onSubmit=t.onSubmit.bind(fc(t)),t}return t=o,(n=[{key:"onSubmit",value:function(){var e=this.props.onConfirm;this.setOpen(!1),e()}},{key:"setOpen",value:function(e){this.setState((function(t){return oc(oc({},t),{},{open:e})}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.confirmButton,i=t.continueLabel,o=t.header,a=t.description,s=t.icon,c=t.label,u=t.t,f=t.ruleSet,d=t.hasLogoutService,p=t.status,h=t.ConfirmProps;if("ok"===p&&!d)return null;var g=this.state.open,v=l.a.createElement(_.a,Object.assign({onClick:this.onSubmit,className:n.buttonInvert,color:"secondary"},h),r||u("login"));return a||o?l.a.createElement(jr.a,{square:!0,elevation:4,color:"secondary",classes:{root:n.paper}},l.a.createElement(_.a,{fullWidth:!0,className:n.topBar,onClick:function(){return e.setOpen(!0)},component:"div",color:"inherit"},s||l.a.createElement(nc.a,{className:n.icon}),l.a.createElement(y.a,{className:n.label,component:"h3",variant:"body1",color:"inherit"},f?l.a.createElement(rc.a,{htmlString:c,ruleSet:f}):c),l.a.createElement(mt.a,this.props),l.a.createElement("span",{className:n.fauxButton},!g&&l.a.createElement(y.a,{variant:"button",color:"inherit"},i||u("continue")))),l.a.createElement(ec.a,{in:g,onClose:function(){return e.setOpen(!1)}},l.a.createElement(y.a,{variant:"body1",color:"inherit",className:n.expanded},f?l.a.createElement(rc.a,{htmlString:o,ruleSet:f}):o,o&&a?": ":"",f?l.a.createElement(rc.a,{htmlString:a,ruleSet:f}):a),l.a.createElement(w.a,null,l.a.createElement(_.a,{onClick:function(){return e.setOpen(!1)},color:"inherit"},u("cancel")),v))):l.a.createElement(jr.a,{square:!0,elevation:4,color:"secondary",classes:{root:n.paper}},l.a.createElement("div",{className:n.topBar},s||l.a.createElement(nc.a,{className:n.icon}),l.a.createElement(y.a,{className:n.label,component:"h3",variant:"body1",color:"inherit"},f?l.a.createElement(rc.a,{htmlString:c,ruleSet:f}):c),l.a.createElement(mt.a,this.props),v))}}])&&sc(t.prototype,n),r&&sc(t,r),o}(u.Component);pc.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 hc=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{buttonInvert:{"&:hover":{backgroundColor:Object(Js.fade)(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"}}})),Object(c.a)("WindowAuthenticationBar"))(pc);function gc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vc(e,t){return(vc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wc(e);if(t){var i=wc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yc(this,n)}}function yc(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bc(e)}function bc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wc(e){return(wc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vc(e,t)}(o,e);var t,n,r,i=mc(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).performLogout=t.performLogout.bind(bc(t)),t.onReceiveAccessTokenMessage=t.onReceiveAccessTokenMessage.bind(bc(t)),t}return t=o,(n=[{key:"onReceiveAccessTokenMessage",value:function(e){var t=this.props,n=t.authServiceId,r=t.accessTokenServiceId;(0,t.resolveAccessTokenRequest)(n,r,e)}},{key:"defaultAuthBarProps",value:function(){var e=this.props,t=e.authServiceId,n=e.windowId,r=e.status;return{authServiceId:t,hasLogoutService:!!e.logoutServiceId,status:r,windowId:n}}},{key:"performLogout",value:function(){var e=this.props,t=e.accessTokenServiceId,n=e.authServiceId,r=e.features,i=e.logoutServiceId,o=e.resetAuthenticationState;(0,e.openWindow)(i,void 0,r),o({authServiceId:n,tokenServiceId:t})}},{key:"renderLoggedIn",value:function(){var e=this.props,t=e.isInteractive,n=e.logoutConfirm,r=e.t;return t?l.a.createElement(hc,Object.assign({confirmButton:n||r("logout"),onConfirm:this.performLogout},this.defaultAuthBarProps())):null}},{key:"renderFailure",value:function(){var e=this.props,t=e.handleAuthInteraction,n=e.failureHeader,r=e.failureDescription,i=e.t,o=e.authServiceId,a=e.windowId;return l.a.createElement(hc,Object.assign({header:n,description:r,confirmButton:i("retry"),onConfirm:function(){return t(a,o)}},this.defaultAuthBarProps()))}},{key:"renderLoggingInCookie",value:function(){var e=this.props,t=e.accessTokenServiceId,n=e.authServiceId,r=e.resolveAuthenticationRequest,i=e.features;return l.a.createElement(l.a.Fragment,null,this.renderLogin(),l.a.createElement(Ys,{name:"IiifLoginSender",url:"".concat(n,"?origin=").concat(window.origin),features:i,onClose:function(){return r(n,t)}}))}},{key:"renderLoggingInToken",value:function(){var e=this.props.accessTokenServiceId;return l.a.createElement(l.a.Fragment,null,this.renderLogin(),l.a.createElement(Gs,{handleAccessTokenMessage:this.onReceiveAccessTokenMessage,url:e}))}},{key:"renderLogin",value:function(){var e=this.props,t=e.confirm,n=e.description,r=e.handleAuthInteraction,i=e.header,o=e.isInteractive,a=e.label,s=e.authServiceId,c=e.windowId;return o?l.a.createElement(hc,Object.assign({header:i,description:n,label:a,confirmButton:t,onConfirm:function(){return r(c,s)}},this.defaultAuthBarProps())):null}},{key:"render",value:function(){var e=this.props,t=e.authServiceId,n=e.status;return t?null===n?this.renderLogin():"cookie"===n?this.renderLoggingInCookie():"token"===n?this.renderLoggingInToken():"failed"===n?this.renderFailure():"ok"===n?this.renderLoggedIn():null:null}}])&&gc(t.prototype,n),r&&gc(t,r),o}(u.Component);_c.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 xc={handleAuthInteraction:Ns.a,resetAuthenticationState:Ns.e,resolveAccessTokenRequest:Ns.f,resolveAuthenticationRequest:Ns.g},Oc=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e,t){var n=t.windowId,r=Object(Ls.d)(e,{windowId:n})[0],i=r&&(Ds.d.getService(r,"http://iiif.io/api/auth/1/token")||Ds.d.getService(r,"http://iiif.io/api/auth/0/token")),o=r&&(Ds.d.getService(r,"http://iiif.io/api/auth/1/logout")||Ds.d.getService(r,"http://iiif.io/api/auth/0/logout")),a=Object(Ls.b)(e),s=r&&a[r.id],c=Object(Ls.a)(e),u=i&&c[i.id],l=null;s?s.isFetching?s.windowId===n&&(l="cookie"):u&&u.isFetching?s.windowId===n&&(l="token"):s.ok?l="ok":!1===s.ok&&(l="failed"):l=null;var f=Object(Ls.c)(e),d=r&&r.getProfile(),p=f.some((function(e){return e.profile===d&&!(e.external||e.kiosk)}));return{accessTokenServiceId:i&&i.id,authServiceId:r&&r.id,confirm:r&&r.getConfirmLabel(),description:r&&r.getDescription(),failureDescription:r&&r.getFailureDescription(),failureHeader:r&&r.getFailureHeader(),header:r&&r.getHeader(),isInteractive:p,label:r&&r.getLabel()[0].value,logoutConfirm:o&&o.getLabel()[0]&&o.getLabel()[0].value,logoutServiceId:o&&o.id,profile:d,status:l}}),xc),Object(c.a)("IIIFAuthentication"))(_c);function Sc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ec(e,t){return(Ec=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tc(e);if(t){var i=Tc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kc(this,n)}}function kc(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Tc(e){return(Tc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ec(e,t)}(o,e);var t,n,r,i=Cc(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={},t}return t=o,r=[{key:"getDerivedStateFromError",value:function(e){return{error:e,hasError:!0}}}],(n=[{key:"wrappedTopBar",value:function(){var e=this.props,t=e.windowId,n=e.workspaceType,r=e.windowDraggable,i=l.a.createElement("div",null,l.a.createElement(vo,{windowId:t,windowDraggable:r}),l.a.createElement(Oc,{windowId:t}));return"mosaic"===n&&r?this.context.mosaicWindowActions.connectDragSource(i):i}},{key:"render",value:function(){var e=this.props,t=e.focusWindow,n=e.label,r=e.isFetching,i=e.maximized,o=e.sideBarOpen,a=e.view,s=e.windowId,c=e.classes,u=e.t,f=e.manifestError,p=this.state,h=p.error;return p.hasError?l.a.createElement(Ms,{windowId:s},l.a.createElement(Ta,{error:h,windowId:s})):l.a.createElement(jr.a,{onFocus:t,component:"section",elevation:1,id:s,className:d()(c.window,Object(at.a)("window"),i?c.maximized:null),"aria-label":u("window",{label:n})},this.wrappedTopBar(),f&&l.a.createElement(Ta,{error:{stack:f},windowId:s}),l.a.createElement("div",{className:c.middle},l.a.createElement("div",{className:c.middleLeft},l.a.createElement("div",{className:c.primaryWindow},l.a.createElement(Os,{view:a,windowId:s,isFetching:r,sideBarOpen:o})),l.a.createElement("div",{className:c.companionAreaBottom},l.a.createElement(Ua,{windowId:s,position:"bottom"}))),l.a.createElement("div",{className:c.companionAreaRight},l.a.createElement(Ua,{windowId:s,position:"right"}),l.a.createElement(Ua,{windowId:s,position:"far-right"}))),l.a.createElement(Ua,{windowId:s,position:"far-bottom"}),l.a.createElement(mt.a,this.props))}}])&&Sc(t.prototype,n),r&&Sc(t,r),o}(u.Component);jc.contextType=Pr.MosaicWindowContext,jc.defaultProps={classes:{},focusWindow:function(){},isFetching:!1,label:null,manifestError:null,maximized:!1,sideBarOpen:!1,view:void 0,windowDraggable:null,workspaceType:null};var Pc=Object(r.compose)(Object(o.a)(),Object(s.a)((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%"}}})),Object(i.b)((function(e,t){var n=t.windowId;return{isFetching:Object(qi.m)(e,{windowId:n}).isFetching,label:Object(qi.o)(e,{windowId:n}),manifestError:Object(qi.d)(e,{windowId:n}),maximized:(Object(L.e)(e,{windowId:n})||{}).maximized,sideBarOpen:(Object(L.e)(e,{windowId:n})||{}).sideBarOpen,thumbnailNavigationPosition:Object(Ar.getThumbnailNavigationPosition)(e,{windowId:n}),view:Object(Dn.f)(e,{windowId:n}),window:Object(L.e)(e,{windowId:n}),windowDraggable:Object(Dn.d)(e,{windowId:n}),workspaceType:Object(P.d)(e)}}),(function(e,t){var n=t.windowId;return{focusWindow:function(){return e(Mn.b(n))}}})),Object(c.a)("Window"))(jc),Ic=n(222),Rc=n(471),Ac=n.n(Rc),Mc=n(119),Dc=n.n(Mc);function Nc(e){var t=e.t,n=e.title,r=e.windowId;return l.a.createElement(Ms,{windowId:"".concat(r,"-preview"),label:t("previewWindowTitle",{title:n}),ariaLabel:!1})}function Lc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lc(Object(n),!0).forEach((function(t){Bc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Nc.defaultProps={t:function(e){return e},title:""};var Fc=Object(r.compose)(Object(s.a)((function(e){return{preview:zc({},e.typography.h4)}})),Object(o.a)(),Object(i.b)((function(e,t){var n=t.windowId;return{title:Object(qi.o)(e,{windowId:n})}}),null),Object(c.a)("MosaicRenderPreview"))(Nc),Wc=n(181),Hc=n(109),Vc=n(324),Uc=n.n(Vc);function qc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Gc=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.layout=t}var t,n,r;return t=e,(n=[{key:"pathToCorner",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hc.Corner.TOP_RIGHT;return Object(Hc.getPathToCorner)(this.layout,e)}},{key:"pathToParent",value:function(e){return Object(Hc.getNodeAtPath)(this.layout,Uc()(e))}},{key:"nodeAtPath",value:function(e){return Object(Hc.getNodeAtPath)(this.layout,e)}},{key:"addWindows",value:function(e){var t=this;e.forEach((function(n,r){var i,o,a=t.pathToCorner(),s=t.pathToParent(a),c=t.nodeAtPath(a),u=s?Object(Hc.getOtherDirection)(s.direction):"row";"row"===u?(i=c,o=e[r]):(i=e[r],o=c);var l={path:a,spec:{$set:{direction:u,first:i,second:o}}};t.layout=Object(Wc.updateTree)(t.layout,[l])}))}},{key:"removeWindows",value:function(e,t){var n=this,r=e.map((function(e){return Object(Wc.createRemoveUpdate)(n.layout,t[e])}));this.layout=Object(Wc.updateTree)(this.layout,r)}}])&&qc(t.prototype,n),r&&qc(t,r),e}();function Kc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $c(e,t){return($c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yc(e);if(t){var i=Yc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xc(this,n)}}function Xc(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Qc(e)}function Qc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yc(e){return(Yc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$c(e,t)}(o,e);var t,n,r,i=Zc(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).tileRenderer=t.tileRenderer.bind(Qc(t)),t.mosaicChange=t.mosaicChange.bind(Qc(t)),t.determineWorkspaceLayout=t.determineWorkspaceLayout.bind(Qc(t)),t.zeroStateView=l.a.createElement("div",null),t.windowPaths={},t.toolbarControls=[],t.additionalControls=[],t}return t=o,r=[{key:"renderPreview",value:function(e){return l.a.createElement("div",{className:"mosaic-preview","aria-hidden":!0},l.a.createElement(Fc,{windowId:e.windowId}))}}],(n=[{key:"componentDidMount",value:function(){var e=this.props.updateWorkspaceMosaicLayout,t=this.determineWorkspaceLayout();t&&e(t)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.windowIds,r=t.layout,i=t.updateWorkspaceMosaicLayout,o=e.windowIds;if(n.every((function(e){return o.includes(e)}))){if(!o.every((function(e){return n.includes(e)}))){if(0===n.length)return void i(null);var a=Ac()(o,n),s=new Gc(r);s.removeWindows(a,this.windowPaths),i(s.layout)}}else{var c=this.determineWorkspaceLayout();Dc()(c,r)||i(c)}}},{key:"bookkeepPath",value:function(e,t){this.windowPaths[e]=t}},{key:"determineWorkspaceLayout",value:function(){var e=this.props,t=e.windowIds,n=e.layout,r=Object(Ic.getLeaves)(n);if(!t.every((function(e){return r.includes(e)}))){if(r.length<2)return Object(Ic.createBalancedTreeFromLeaves)(t);var i=Ac()(t,r),o=new Gc(n);return o.addWindows(i),o.layout}return r.every((function(e){return t.includes(e)}))?n:Object(Ic.createBalancedTreeFromLeaves)(t)}},{key:"tileRenderer",value:function(e,t){var n=this.props,r=n.windowIds,i=n.workspaceId;return r.includes(e)?(this.bookkeepPath(e,t),l.a.createElement(Ic.MosaicWindow,{toolbarControls:this.toolbarControls,additionalControls:this.additionalControls,path:t,windowId:e,renderPreview:o.renderPreview},l.a.createElement(Pc,{key:"".concat(e,"-").concat(i),windowId:e}))):null}},{key:"mosaicChange",value:function(e){(0,this.props.updateWorkspaceMosaicLayout)(e)}},{key:"render",value:function(){var e=this.props,t=e.layout,n=e.classes;return l.a.createElement(Ic.MosaicWithoutDragDropContext,{renderTile:this.tileRenderer,initialValue:t||this.determineWorkspaceLayout(),onChange:this.mosaicChange,className:d()("mirador-mosaic",n.root),zeroStateView:this.zeroStateView})}}])&&Kc(t.prototype,n),r&&Kc(t,r),o}(l.a.Component);Jc.defaultProps={layout:void 0,windowIds:[]};var eu={"@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'"}}};function tu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ru={updateWorkspaceMosaicLayout:N.h},iu=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tu(Object(n),!0).forEach((function(t){nu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({root:{"& .mosaic-preview":{boxShadow:"none"},"& .mosaic-tile":{boxShadow:"0 1px 3px 0 rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .2), 0 2px 1px -1px rgba(0, 0, 0, .2)"},"& .mosaic-window":{boxShadow:"none"},"& .mosaic-window-toolbar":{display:"none !important"}}},eu),ou=Object(r.compose)(Object(s.a)(iu),Object(i.b)((function(e){return{layout:Object(L.i)(e).layout,windowIds:Object(L.i)(e).windowIds,workspaceId:Object(L.i)(e).id}}),ru),Object(c.a)("WorkspaceMosaic"))(Jc),au=n(562),su=n(219),cu=n(744),uu=n.n(cu);function lu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function du(e,t){return(du=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gu(e);if(t){var i=gu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hu(this,n)}}function hu(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gu(e){return(gu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&du(e,t)}(o,e);var t,n,r,i=pu(o);function o(){return lu(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.companionWindowDimensions,r=e.focused,i=e.layout,o=e.workspace,a=e.updateElasticWindowLayout,s=o.width/2,c=o.height/2;return l.a.createElement(su.a,{key:"".concat(i.windowId,"-").concat(o.id),size:{height:i.height+n.height,width:i.width+n.width},position:{x:i.x+s,y:i.y+c},bounds:"parent",onDragStop:function(e,t){a(i.windowId,{x:t.x-s,y:t.y-c})},onResize:function(e,t,r,o,u){a(i.windowId,{height:Number.parseInt(r.style.height,10)-n.height,width:Number.parseInt(r.style.width,10)-n.width,x:u.x-s,y:u.y-c})},dragHandleClassName:Object(at.a)("window-top-bar"),className:r?t.focused:null},l.a.createElement(Pc,{windowId:i.windowId}))}}])&&fu(t.prototype,n),r&&fu(t,r),o}(l.a.Component);vu.defaultProps={classes:{},companionWindowDimensions:{height:0,width:0},focused:!1};var mu=vu,yu=Object(r.compose)(Object(s.a)((function(e){return{focused:{zIndex:e.zIndex.modal-1}}})),Object(i.b)((function(e,t){var n=t.windowId;return{companionWindowDimensions:Object(Ar.selectCompanionWindowDimensions)(e,{windowId:n}),focused:Object(P.e)(e,{windowId:n}),layout:Object(P.a)(e)[n],workspace:Object(L.i)(e)}}),(function(e,t){return{updateElasticWindowLayout:function(t,n){e(au.a(t,n))}}})))(mu);function bu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _u(e,t){return(_u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Su(e);if(t){var i=Su(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ou(this,n)}}function Ou(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Su(e){return(Su=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Eu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_u(e,t)}(o,e);var t,n,r,i=xu(o);function o(){return bu(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.workspace,r=e.elasticLayout,i=e.setWorkspaceViewportDimensions,o=e.setWorkspaceViewportPosition,a=n.viewportPosition,s=n.width/2,c=n.height/2;return l.a.createElement("div",{style:{height:"100%",position:"relative",width:"100%"}},l.a.createElement(uu.a,{onResize:function(e){i(e)}}),l.a.createElement(su.a,{size:{height:n.height,width:n.width},position:{x:-1*a.x-s,y:-1*a.y-c},enableResizing:{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!1,right:!1,top:!1,topLeft:!1,topRight:!1},onDragStop:function(e,t){o({x:-1*t.x-s,y:-1*t.y-c})},cancel:".".concat(Object(at.a)("window")),className:d()(t.workspace,Object(at.a)("workspace")),disableDragging:!n.draggingEnabled},Object.keys(r).map((function(e){return l.a.createElement(yu,{key:e,windowId:e})}))))}}])&&wu(t.prototype,n),r&&wu(t,r),o}(l.a.Component),Cu=Object(r.compose)(Object(s.a)({workspace:{boxSizing:"border-box",margin:0,position:"absolute",transitionDuration:".7s","& .react-draggable-dragging":{transitionDuration:"unset"}}}),Object(i.b)((function(e){return{elasticLayout:Object(P.a)(e),workspace:Object(L.i)(e)}}),(function(e,t){return{setWorkspaceViewportDimensions:function(t){e(N.c(t))},setWorkspaceViewportPosition:function(t){e(N.d(t))},updateElasticWindowLayout:function(t,n){e(au.a(t,n))}}})),Object(c.a)("WorkspaceElastic"))(Eu),ku=n(759),Tu=n(743),ju=n.n(Tu),Pu=n(210),Iu=n(126),Ru=n(365),Au=n(668);function Mu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Nu(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Du(e){return function(e){if(Array.isArray(e))return Lu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Nu(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nu(e,t){if(e){if("string"==typeof e)return Lu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lu(e,t):void 0}}function Lu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zu=function(e,t,n){var r=n.onDrop;if(e.urls&&e.urls.forEach((function(e){var i=new URL(e),o=i.searchParams.get("manifest"),a=i.searchParams.get("canvas");o&&r({canvasId:a,manifestId:o},n,t)})),e.files){var i,o=e.files.filter((function(e){return"application/json"===e.type})).map((function(e){return new Promise((function(i,o){var a=new FileReader;a.addEventListener("load",(function(){var e=a.result,o=Object(Iu.a)();e&&r({manifestId:o,manifestJson:e},n,t),i()})),a.readAsText(e)}))})),a=e.files.filter((function(e){return e.type.startsWith("image/")}));if(a.length>0){var s=Object(Iu.a)(),c=a.map((function(e){return function(e){return new Promise((function(t,n){var r=new FileReader;r.addEventListener("load",(function(){var n=new Image;n.addEventListener("load",(function(){t({height:n.height,name:e.name,type:e.type,url:r.result,width:n.width})})),n.src=r.result})),r.readAsDataURL(e)}))}(e)}));i=Promise.all(c).then((function(e){var i={"@context":"http://iiif.io/api/presentation/3/context.json",id:s,items:e.map((function(e,t){var n=e.name,r=e.type,i=e.width,o=e.height,a=e.url;return{height:o,id:"".concat(s,"/canvas/").concat(t),items:[{id:"".concat(s,"/canvas/").concat(t,"/1"),items:[{body:{format:r,id:a,type:"Image"},height:o,id:"".concat(s,"/canvas/").concat(t,"/1/image"),motivation:"painting",target:"".concat(s,"/canvas/").concat(t,"/1"),type:"Annotation",width:i}],type:"AnnotationPage"}],label:n,type:"Canvas",width:i}})),label:e[0].name,type:"Manifest"},o=Object(Iu.a)();i&&r({manifestId:o,manifestJson:i},n,t)}))}return Promise.all([].concat(Du(o),[i]))}},Bu=function(e){var t=e.children,n=e.onDrop,r=Mu(Object(Au.a)({accept:[Ru.NativeTypes.URL,Ru.NativeTypes.FILE],collect:function(e){return{canDrop:e.canDrop(),isOver:e.isOver()}},drop:function(t,r){n&&zu(t,r,e)}}),2),i=r[0],o=i.canDrop,a=i.isOver,s=r[1],c=o&&a;return l.a.createElement("div",{ref:s,onDrop:function(t){if(window.safari&&n&&t.dataTransfer&&t.dataTransfer.types.includes("Files")&&t.dataTransfer.types.includes("text/uri-list")){var r=t.dataTransfer.getData("text/uri-list");if(!r)return;zu({urls:[r]},null,e)}},style:{height:"100%",width:"100%"}},t,l.a.createElement(ku.a,{open:c,style:{zIndex:9999}},l.a.createElement(ju.a,{style:{color:Pu.a[400],fontSize:256}})))};function Fu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wu(e,t){return(Wu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qu(e);if(t){var i=qu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vu(this,n)}}function Vu(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Uu(e)}function Uu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qu(e){return(qu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wu(e,t)}(o,e);var t,n,r,i=Hu(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleDrop=t.handleDrop.bind(Uu(t)),t}return t=o,(n=[{key:"handleDrop",value:function(e,t,n){var r=e.canvasId,i=e.manifestId,o=e.manifestJson,a=this.props,s=a.addWindow;a.allowNewWindows&&s({canvasId:r,manifest:o,manifestId:i})}},{key:"workspaceByType",value:function(){var e=this.props,t=e.workspaceId,n=e.workspaceType,r=e.windowIds;if(this.maximizedWindows())return this.maximizedWindows();if(0===r.length)return this.zeroWindows();switch(n){case"elastic":return l.a.createElement(Cu,null);case"mosaic":return l.a.createElement(ou,null);default:return r.map((function(e){return l.a.createElement(Pc,{key:"".concat(e,"-").concat(t),windowId:e})}))}}},{key:"zeroWindows",value:function(){var e=this.props.t;return l.a.createElement(Tr.a,{alignItems:"center",container:!0,style:{height:"100%"}},l.a.createElement(Tr.a,{xs:12,item:!0},l.a.createElement(y.a,{variant:"h1",component:"div",align:"center"},e("welcome"))))}},{key:"maximizedWindows",value:function(){var e=this.props,t=e.maximizedWindowIds,n=e.workspaceId;return t.length>0&&t.map((function(e){return l.a.createElement(Pc,{key:"".concat(e,"-").concat(n),windowId:e,className:d()(Object(at.a)("workspace-maximized-window"))})}))}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.isWorkspaceControlPanelVisible,r=e.t;return l.a.createElement(Bu,{onDrop:this.handleDrop},l.a.createElement("div",{className:d()(Object(at.a)("workspace-viewport"),n&&Object(at.a)("workspace-with-control-panel"),n&&t.workspaceWithControlPanel,t.workspaceViewport)},l.a.createElement(y.a,{variant:"srOnly",component:"h1"},r("miradorViewer")),this.workspaceByType()))}}])&&Fu(t.prototype,n),r&&Fu(t,r),o}(l.a.Component);Gu.defaultProps={addWindow:function(){},allowNewWindows:!0,maximizedWindowIds:[],windowIds:[]};var Ku={addWindow:Mn.a},$u=Object(r.compose)(Object(o.a)(),Object(s.a)((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}}}})),Object(i.b)((function(e){return{allowNewWindows:Object(ge.a)(e).workspace.allowNewWindows,isWorkspaceControlPanelVisible:Object(ge.a)(e).workspaceControlPanel.enabled,maximizedWindowIds:Object(Dn.b)(e),windowIds:Object(L.f)(e),workspaceId:Object(L.i)(e).id,workspaceType:Object(P.d)(e)}}),Ku),Object(c.a)("Workspace"))(Gu),Zu=n(565),Xu=n(1124);function Qu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yu(e,t){return(Yu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ju(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nl(e);if(t){var i=nl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return el(this,n)}}function el(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tl(e)}function tl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nl(e){return(nl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yu(e,t)}(o,e);var t,n,r,i=Ju(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={formValue:""},t.formSubmit=t.formSubmit.bind(tl(t)),t.handleCancel=t.handleCancel.bind(tl(t)),t.handleInputChange=t.handleInputChange.bind(tl(t)),t}return t=o,(n=[{key:"handleCancel",value:function(){(0,this.props.onCancel)(),this.setState({formValue:""})}},{key:"handleInputChange",value:function(e){e.preventDefault(),this.setState({formValue:e.target.value})}},{key:"formSubmit",value:function(e){var t=this.props,n=t.addResource,r=t.onSubmit,i=this.state.formValue;e.preventDefault(),r(),n(i),this.setState({formValue:""})}},{key:"render",value:function(){var e=this.state.formValue,t=this.props,n=t.addResourcesOpen,r=t.classes,i=t.onCancel,o=t.t;return n?l.a.createElement("form",{onSubmit:this.formSubmit},l.a.createElement(Tr.a,{container:!0,spacing:2},l.a.createElement(Tr.a,{item:!0,xs:12,sm:8,md:9},l.a.createElement(an.a,{autoFocus:!0,fullWidth:!0,value:e,id:"manifestURL",type:"text",onChange:this.handleInputChange,variant:"filled",label:o("addManifestUrl"),helperText:o("addManifestUrlHelp"),InputLabelProps:{shrink:!0},InputProps:{className:r.input}})),l.a.createElement(Tr.a,{item:!0,xs:12,sm:4,md:3,className:r.buttons},i&&l.a.createElement(_.a,{onClick:this.handleCancel},o("cancel")),l.a.createElement(_.a,{id:"fetchBtn",type:"submit",variant:"contained",color:"primary"},o("fetchManifest"))))):null}}])&&Qu(t.prototype,n),r&&Qu(t,r),o}(u.Component);function il(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?il(Object(n),!0).forEach((function(t){al(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):il(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function al(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}rl.defaultProps={classes:{},onCancel:null,onSubmit:function(){},t:function(e){return e}};var sl={addResource:Zu.a},cl=Object(r.compose)(Object(s.a)((function(e){return{buttons:al({textAlign:"right"},e.breakpoints.up("sm"),{textAlign:"inherit"}),input:ol({},e.typography.body1)}})),Object(o.a)(),Object(i.b)(null,sl),Object(c.a)("ManifestForm"))(rl),ul=n(556),ll=n(1125),fl=n(190),dl=n(252);function pl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gl(e,t){return(gl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yl(e);if(t){var i=yl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ml(this,n)}}function ml(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function yl(e){return(yl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gl(e,t)}(o,e);var t,n,r,i=vl(o);function o(){return pl(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.manifestId,r=e.onDismissClick,i=e.onTryAgainClick,o=e.t;return l.a.createElement(Tr.a,{container:!0},l.a.createElement(Tr.a,{container:!0},l.a.createElement(Tr.a,{container:!0,item:!0,xs:12,sm:6},l.a.createElement(Tr.a,{item:!0,xs:4,sm:3},l.a.createElement(Tr.a,{container:!0,justify:"center"},l.a.createElement($i.a,{className:t.errorIcon}))),l.a.createElement(Tr.a,{item:!0,xs:8,sm:9},l.a.createElement(y.a,null,o("manifestError")),l.a.createElement(y.a,{className:t.manifestIdText},n)))),l.a.createElement(Tr.a,{container:!0},l.a.createElement(Tr.a,{container:!0,item:!0,xs:12,sm:6,justify:"flex-end"},l.a.createElement(Tr.a,{item:!0},l.a.createElement(_.a,{onClick:function(){r(n)}},o("dismiss")),l.a.createElement(_.a,{onClick:function(){i(n)}},o("tryAgain"))))))}}])&&hl(t.prototype,n),r&&hl(t,r),o}(u.Component),wl={onDismissClick:Zu.b,onTryAgainClick:ul.a},_l=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{errorIcon:{color:e.palette.error.main,height:"2rem",width:"2rem"},manifestIdText:{wordBreak:"break-all"}}})),Object(i.b)(null,wl),Object(c.a)("ManifestListItemError"))(bl);function xl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ol(e,t){return(Ol=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kl(e);if(t){var i=kl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return El(this,n)}}function El(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Cl(e)}function Cl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kl(e){return(kl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ol(e,t)}(o,e);var t,n,r,i=Sl(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleOpenButtonClick=t.handleOpenButtonClick.bind(Cl(t)),t}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchManifest,n=e.manifestId,r=e.ready,i=e.isFetching,o=e.error,a=e.provider;r||o||i||"file"===a||t(n)}},{key:"handleOpenButtonClick",value:function(){var e=this.props,t=e.addWindow,n=e.handleClose;t({manifestId:e.manifestId}),n()}},{key:"render",value:function(){var e=this.props,t=e.active,n=e.buttonRef,r=e.manifestId,i=e.ready,o=e.title,a=e.thumbnail,s=e.manifestLogo,c=e.size,u=e.classes,f=e.provider,d=e.t,p=e.error,h=e.isCollection,g=e.isMultipart,v=l.a.createElement(Tr.a,{container:!0,className:Object(at.a)("manifest-list-item"),spacing:2},l.a.createElement(Tr.a,{item:!0,xs:3,sm:2},l.a.createElement(Gi.a,{className:u.placeholder,variant:"rect",height:80,width:120})),l.a.createElement(Tr.a,{item:!0,xs:9,sm:6},l.a.createElement(Gi.a,{className:u.placeholder,variant:"text"})),l.a.createElement(Tr.a,{item:!0,xs:8,sm:2},l.a.createElement(Gi.a,{className:u.placeholder,variant:"text"}),l.a.createElement(Gi.a,{className:u.placeholder,variant:"text"})),l.a.createElement(Tr.a,{item:!0,xs:4,sm:2},l.a.createElement(Gi.a,{className:u.placeholder,variant:"rect",height:60,width:60})));return p?l.a.createElement(ll.a,{divider:!0,className:u.root,"data-manifestid":r},l.a.createElement(_l,{manifestId:r})):l.a.createElement(ll.a,{divider:!0,className:[u.root,t?u.active:""].join(" "),"data-manifestid":r},i?l.a.createElement(Tr.a,{container:!0,className:Object(at.a)("manifest-list-item"),spacing:2},l.a.createElement(Tr.a,{item:!0,xs:12,sm:6,className:u.buttonGrid},l.a.createElement(fl.a,{ref:n,className:Object(at.a)("manifest-list-item-title"),style:{width:"100%"},onClick:this.handleOpenButtonClick},l.a.createElement(Tr.a,{container:!0,spacing:2,className:u.label,component:"span"},l.a.createElement(Tr.a,{item:!0,xs:4,sm:3,component:"span"},a?l.a.createElement(dl.Img,{className:[u.thumbnail,Object(at.a)("manifest-list-item-thumb")].join(" "),src:[a],alt:"",height:"80",unloader:l.a.createElement(Gi.a,{variant:"rect",animation:!1,className:u.placeholder,height:80,width:120})}):l.a.createElement(Gi.a,{className:u.placeholder,variant:"rect",height:80,width:120})),l.a.createElement(Tr.a,{item:!0,xs:8,sm:9,component:"span"},h&&l.a.createElement(y.a,{component:"div",variant:"overline"},d(g?"multipartCollection":"collection")),l.a.createElement(y.a,{component:"span",variant:"h6"},o||r))))),l.a.createElement(Tr.a,{item:!0,xs:8,sm:4},l.a.createElement(y.a,{className:Object(at.a)("manifest-list-item-provider")},f),l.a.createElement(y.a,null,d("numItems",{count:c,number:c}))),l.a.createElement(Tr.a,{item:!0,xs:4,sm:2},s&&l.a.createElement(dl.Img,{src:[s],alt:"",role:"presentation",className:u.logo,unloader:l.a.createElement(Gi.a,{variant:"rect",animation:!1,className:u.placeholder,height:60,width:60})}))):v)}}])&&xl(t.prototype,n),r&&xl(t,r),o}(l.a.Component);function jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jl(Object(n),!0).forEach((function(t){Il(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Il(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Tl.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};var Rl={addWindow:Mn.a,fetchManifest:ul.a},Al=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{active:{},buttonGrid:{},label:{textAlign:"left",textTransform:"initial"},logo:{height:"2.5rem",maxWidth:"100%",objectFit:"contain",paddingRight:8},placeholder:{backgroundColor:e.palette.grey[300]},root:Pl(Pl({},e.mixins.gutters()),{},{"&$active":{borderLeft:"4px solid ".concat(e.palette.primary.main)},"&:hover,&:focus-within":{"&$active":{borderLeft:"4px solid ".concat(e.palette.primary.main)},backgroundColor:e.palette.action.hover,borderLeft:"4px solid ".concat(e.palette.action.hover)},borderLeft:"4px solid transparent"}),thumbnail:{maxWidth:"100%",objectFit:"contain"}}})),Object(i.b)((function(e,t){var n=t.manifestId,r=t.provider,i=Object(L.b)(e,{manifestId:n})||{},o=Object(qi.q)(e,{manifestId:n}),a=(o||{isCollection:function(){return!1}}).isCollection(),s=a?o.getTotalItems():Object(mo.getCanvases)(e,{manifestId:n}).length;return{active:Object(L.g)(e).includes(n),error:i.error,isCollection:a,isFetching:i.isFetching,isMultipart:a&&Object(qa.c)(e,{manifestId:n}).includes("multi-part"),manifestLogo:Object(qi.g)(e,{manifestId:n}),provider:r||Object(qi.i)(e,{manifestId:n}),ready:!!i.json,size:s,thumbnail:Object(qi.n)(e,{manifestId:n}),title:Object(qi.o)(e,{manifestId:n})}}),Rl),Object(c.a)("ManifestListItem"))(Tl);function Ml(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dl(e,t){return(Dl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bl(e);if(t){var i=Bl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ll(this,n)}}function Ll(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return zl(e)}function zl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bl(e){return(Bl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dl(e,t)}(o,e);var t,n,r,i=Nl(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={addResourcesOpen:!1},t.ref=l.a.createRef(),t.onSubmit=t.onSubmit.bind(zl(t)),t.setAddResourcesVisibility=t.setAddResourcesVisibility.bind(zl(t)),t.handleDrop=t.handleDrop.bind(zl(t)),t}return t=o,(n=[{key:"handleDrop",value:function(e,t,n){var r=e.manifestId,i=e.manifestJson,o=this.props.addResource;i?o(r,i,{provider:"file"}):o(r),this.scrollToTop()}},{key:"onSubmit",value:function(){this.setAddResourcesVisibility(!1),this.scrollToTop()}},{key:"setAddResourcesVisibility",value:function(e){this.setState({addResourcesOpen:e})}},{key:"scrollToTop",value:function(){this.ref.current&&this.ref.current.scrollTo({behavior:"smooth",left:0,top:0})}},{key:"render",value:function(){var e,t,n,r=this,i=this.props,o=i.catalog,a=i.setWorkspaceAddVisibility,s=i.t,c=i.classes,u=this.state.addResourcesOpen,f=o.map((function(e,t){return l.a.createElement(Al,Object.assign({},0===t&&{buttonRef:function(e){return e&&e.focus()}},{key:e.manifestId,manifestId:e.manifestId,provider:e.provider,handleClose:function(){return a(!1)}}))}));return l.a.createElement(Bu,{onDrop:this.handleDrop},l.a.createElement("div",{ref:this.ref,className:d()(Object(at.a)("workspace-add"),c.workspaceAdd)},o.length<1?l.a.createElement(Tr.a,{alignItems:"center",container:!0,style:{height:"100%"}},l.a.createElement(Tr.a,{xs:12,item:!0},l.a.createElement(y.a,{variant:"h1",component:"div",align:"center"},s("emptyResourceList")))):l.a.createElement(jr.a,{className:c.list},l.a.createElement(y.a,{variant:"srOnly",component:"h1"},s("miradorResources")),l.a.createElement(mt.a,this.props),l.a.createElement(Xu.a,{disablePadding:!0},f)),l.a.createElement(z.a,{variant:"extended",disabled:u,className:d()(c.fab,Object(at.a)("add-resource-button")),color:"primary",onClick:function(){return r.setAddResourcesVisibility(!0)}},l.a.createElement(W.a,null),s("addResource")),l.a.createElement(yo.a,{className:d()((e={},t=c.displayNone,n=!u,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e)),classes:{paper:c.paper},variant:"persistent",anchor:"bottom",open:u,ModalProps:{disablePortal:!0,hideBackdrop:!0,style:{position:"absolute"}}},l.a.createElement(jr.a,{className:c.form},l.a.createElement(A.a,{position:"absolute",color:"primary",onClick:function(){return r.setAddResourcesVisibility(!1)}},l.a.createElement(M.a,{variant:"dense"},l.a.createElement(re.a,{"aria-label":s("closeAddResourceForm"),className:c.menuButton,color:"inherit"},l.a.createElement(Me.a,null)),l.a.createElement(y.a,{variant:"h2",noWrap:!0,color:"inherit",className:c.typographyBody},s("addResource")))),l.a.createElement(cl,{addResourcesOpen:u,onSubmit:this.onSubmit,onCancel:function(){return r.setAddResourcesVisibility(!1)}})))))}}])&&Ml(t.prototype,n),r&&Ml(t,r),o}(l.a.Component);function Wl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wl(Object(n),!0).forEach((function(t){Vl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Fl.defaultProps={addResource:function(){},catalog:[],classes:{},t:function(e){return e}};var Ul={addResource:Zu.a,setWorkspaceAddVisibility:N.a},ql=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{displayNone:{display:"none"},fab:{bottom:e.spacing(2),position:"absolute",right:e.spacing(2)},form:Hl(Hl({},e.mixins.gutters()),{},{left:"0",marginTop:48,paddingBottom:e.spacing(2),paddingTop:e.spacing(2),right:"0"}),list:{margin:"16px"},menuButton:{marginLeft:-12,marginRight:20},paper:Vl({borderTop:"0",left:"0"},e.breakpoints.up("sm"),{left:"65px"}),typographyBody:{flexGrow:1},workspaceAdd:{boxSizing:"border-box",height:"100%",overflowX:"hidden",overflowY:"auto",paddingTop:68},"@media (min-width: 600px)":{workspaceAdd:{paddingLeft:68,paddingTop:0}}}})),Object(i.b)((function(e){return{catalog:Object(L.a)(e)}}),Ul),Object(c.a)("WorkspaceAdd"))(Fl),Gl=function(e){return l.a.createElement("div",{className:Object(at.a)("background-plugin-area"),style:{display:"none"}},l.a.createElement(mt.a,e))};Gl.defaultProps={PluginComponents:[]};var Kl=Object(c.a)("BackgroundPluginArea")(Gl);function $l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xl(e,t){return(Xl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ql(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jl(e);if(t){var i=Jl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yl(this,n)}}function Yl(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jl(e){return(Jl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ef=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xl(e,t)}(o,e);var t,n,r,i=Ql(o);function o(){return $l(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.controlPanelVariant,r=e.isWorkspaceAddVisible,i=e.isWorkspaceControlPanelVisible,o=e.lang,a=e.t;return l.a.createElement(l.a.Fragment,null,i&&l.a.createElement(kr,{variant:n}),l.a.createElement("main",{className:d()(t.viewer,Object(at.a)("viewer")),lang:o,"aria-label":a("workspace")},r?l.a.createElement(ql,null):l.a.createElement($u,null),l.a.createElement(R,null),l.a.createElement(Kl,null)))}}])&&Zl(t.prototype,n),r&&Zl(t,r),o}(u.Component);ef.defaultProps={controlPanelVariant:void 0,isWorkspaceAddVisible:!1,lang:void 0};var tf=Object(r.compose)(Object(o.a)(),Object(s.a)((function(e){return{viewer:{background:("light"===e.palette.type?a.b:a.j)(e.palette.shades.light,.1),bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0}}})),Object(i.b)((function(e){return{controlPanelVariant:Object(L.i)(e).isWorkspaceAddVisible||Object(L.f)(e).length>0?void 0:"wide",isWorkspaceAddVisible:Object(L.i)(e).isWorkspaceAddVisible,isWorkspaceControlPanelVisible:Object(ge.a)(e).workspaceControlPanel.enabled,lang:Object(ge.a)(e).language}})),Object(c.a)("WorkspaceArea"));t.default=tf(ef)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(8),o=n(0),a=n.n(o),s=n(9),c=n(345),u=n(5),l=n(71),f=n(38),d=n(23),p=n.n(d),h=n(140),g=n(96),v=n(1175),m=n(558),y=n(88),b=n(754),w=n.n(b),_=n(755),x=n.n(_),O=n(329);function S(e){return a.a.createElement(O.a,e,a.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},a.a.createElement("path",{d:"M6,15H9v3h2V13H6Zm9-6V6H13v5h5V9Z"}),a.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"})))}var E=n(34);function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=I(e);if(t){var i=I(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(o,e);var t,n,r,i=T(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).handleZoomInClick=t.handleZoomInClick.bind(P(t)),t.handleZoomOutClick=t.handleZoomOutClick.bind(P(t)),t}return t=o,(n=[{key:"handleZoomInClick",value:function(){var e=this.props,t=e.windowId;(0,e.updateViewport)(t,{zoom:2*e.viewer.zoom})}},{key:"handleZoomOutClick",value:function(){var e=this.props,t=e.windowId;(0,e.updateViewport)(t,{zoom:e.viewer.zoom/2})}},{key:"render",value:function(){var e=this.props,t=e.displayDivider,n=e.showZoomControls,r=e.classes,i=e.t,o=e.zoomToWorld;return n?a.a.createElement("div",{className:r.zoom_controls},a.a.createElement(E.a,{"aria-label":i("zoomIn"),onClick:this.handleZoomInClick},a.a.createElement(w.a,null)),a.a.createElement(E.a,{"aria-label":i("zoomOut"),onClick:this.handleZoomOutClick},a.a.createElement(x.a,null)),a.a.createElement(E.a,{"aria-label":i("zoomReset"),onClick:function(){return o(!1)}},a.a.createElement(S,null)),t&&a.a.createElement("span",{className:r.divider})):a.a.createElement(a.a.Fragment,null)}}])&&C(t.prototype,n),r&&C(t,r),o}(o.Component);R.defaultProps={displayDivider:!0,showZoomControls:!1,t:function(e){return e},updateViewport:function(){},viewer:{},windowId:""};var A={updateViewport:m.d},M=Object(r.compose)(Object(v.a)(),Object(u.a)((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"}}})),Object(s.b)((function(e,t){var n=t.windowId;return{showZoomControls:Object(y.f)(e),viewer:Object(f.d)(e,{windowId:n})}}),A),Object(i.a)("ZoomControls"))(R),D=n(14);function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=W(e);if(t){var i=W(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return F(this,n)}}function F(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function W(e){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var H=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&z(e,t)}(o,e);var t,n,r,i=B(o);function o(){return N(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.canvasCount,n=e.canvasIndex,r=e.canvasLabel,i=e.classes,o=e.t;return a.a.createElement("div",{className:p()(Object(D.a)("osd-info"),i.osdInfo)},a.a.createElement(g.a,{display:"inline",variant:"caption",className:Object(D.a)("canvas-count")},o("pagination",{current:n+1,total:t})),a.a.createElement(g.a,{display:"inline",variant:"caption",className:Object(D.a)("canvas-label")},r&&" • ".concat(r)))}}])&&L(t.prototype,n),r&&L(t,r),o}(o.Component);H.defaultProps={canvasLabel:void 0,t:function(){}};var V=n(45),U=n(76),q=Object(r.compose)(Object(u.a)({osdInfo:{order:2,overflow:"hidden",paddingBottom:3,textOverflow:"ellipsis",unicodeBidi:"plaintext",whiteSpace:"nowrap",width:"100%"}}),Object(v.a)(),Object(s.b)((function(e,t){var n=t.windowId,r=Object(V.getCanvases)(e,{windowId:n}),i=Object(U.a)(e,{windowId:n}),o=(Object(V.getCurrentCanvas)(e,{windowId:n})||{}).id;return{canvasCount:r.length,canvasIndex:i,canvasLabel:Object(V.getCanvasLabel)(e,{canvasId:o,windowId:n})}}),null),Object(i.a)("ViewerInfo"))(H),G=n(472),K=n.n(G);function $(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<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Y(this,n)}}function Y(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function J(e){return(J=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X(e,t)}(o,e);var t,n,r,i=Q(o);function o(){return $(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.hasNextCanvas,n=e.hasPreviousCanvas,r=e.setNextCanvas,i=e.setPreviousCanvas,o=e.t,s=e.classes,c="ltr",u={},l={};switch(e.viewingDirection){case"top-to-bottom":u={transform:"rotate(270deg)"},l={transform:"rotate(90deg)"};break;case"bottom-to-top":u={transform:"rotate(90deg)"},l={transform:"rotate(270deg)"};break;case"right-to-left":c="rtl",u={},l={transform:"rotate(180deg)"};break;default:u={transform:"rotate(180deg)"},l={}}return a.a.createElement("div",{className:p()(Object(D.a)("osd-navigation"),s.osdNavigation),dir:c},a.a.createElement(E.a,{"aria-label":o("previousCanvas"),className:Object(D.a)("previous-canvas-button"),disabled:!n,onClick:function(){n&&i()}},a.a.createElement(K.a,{style:u})),a.a.createElement(E.a,{"aria-label":o("nextCanvas"),className:Object(D.a)("next-canvas-button"),disabled:!t,onClick:function(){t&&r()}},a.a.createElement(K.a,{style:l})))}}])&&Z(t.prototype,n),r&&Z(t,r),o}(o.Component);ee.defaultProps={hasNextCanvas:!1,hasPreviousCanvas:!1,setNextCanvas:function(){},setPreviousCanvas:function(){},viewingDirection:""};var te=Object(r.compose)(Object(u.a)({osdNavigation:{order:1}}),Object(v.a)(),Object(s.b)((function(e,t){var n=t.windowId;return{hasNextCanvas:!!Object(V.getNextCanvasGrouping)(e,{windowId:n}),hasPreviousCanvas:!!Object(V.getPreviousCanvasGrouping)(e,{windowId:n}),viewingDirection:Object(U.e)(e,{windowId:n})}}),(function(e,t){var n=t.windowId;return{setNextCanvas:function(){return e(m.b(n))},setPreviousCanvas:function(){return e(m.c(n))}}})),Object(i.a)("ViewerNavigation"))(ee),ne=n(37);function re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ce(e);if(t){var i=ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return se(this,n)}}function se(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ce(e){return(ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(o,e);var t,n,r,i=ae(o);function o(){return re(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"canvasNavControlsAreStacked",value:function(){var e=this.props.size;return e&&e.width&&e.width<=253}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.visible,r=e.windowId,i=e.zoomToWorld;return n?a.a.createElement(h.a,{square:!0,className:p()(t.controls,Object(D.a)("canvas-nav"),t.canvasNav,this.canvasNavControlsAreStacked()?Object(D.a)("canvas-nav-stacked"):null,this.canvasNavControlsAreStacked()?t.canvasNavStacked:null),elevation:0},a.a.createElement(M,{displayDivider:!this.canvasNavControlsAreStacked(),windowId:r,zoomToWorld:i}),a.a.createElement(te,{windowId:r}),a.a.createElement(q,{windowId:r}),a.a.createElement(ne.a,this.props)):a.a.createElement(g.a,{variant:"srOnly",component:"div"},a.a.createElement(q,{windowId:r}))}}])&&ie(t.prototype,n),r&&ie(t,r),o}(o.Component);ue.defaultProps={classes:{},visible:!0};var le=Object(r.compose)(Object(s.b)((function(e,t){var n=t.windowId;return{visible:Object(f.i)(e).focusedWindowId===n}})),Object(u.a)((function(e){return{canvasNav:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",textAlign:"center"},canvasNavStacked:{flexDirection:"column"},controls:{backgroundColor:Object(l.fade)(e.palette.background.paper,.5),bottom:0,position:"absolute",width:"100%",zIndex:50}}})),Object(c.withSize)(),Object(i.a)("WindowCanvasNavigationControls"))(ue);function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t){return(de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ge(e);if(t){var i=ge(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return he(this,n)}}function he(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ve=Object(o.lazy)((function(){return Promise.resolve().then(n.bind(null,1172))})),me=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&de(e,t)}(s,e);var t,n,r,i=pe(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=i.call(this,e)).state={},t}return t=s,r=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}],(n=[{key:"render",value:function(){var e=this.props.windowId;return this.state.hasError?a.a.createElement(a.a.Fragment,null):a.a.createElement(o.Suspense,{fallback:a.a.createElement("div",null)},a.a.createElement(ve,{windowId:e},a.a.createElement(le,{windowId:e})))}}])&&fe(t.prototype,n),r&&fe(t,r),s}(o.Component),ye=Object(r.compose)(Object(i.a)("WindowViewer"));t.default=ye(me)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(9),o=n(1175),a=n(5),s=n(29),c=n.n(s),u=n(8),l=n(0),f=n.n(l),d=n(180),p=n.n(d),h=n(119),g=n.n(h),v=n(189),m=n.n(v),y=n(23),b=n.n(y),w=n(14),_=n(33),x=n.n(_),O=n(473),S=n.n(O),E=n(474),C=n.n(E);function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var T=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.viewer=t,this.ref=n,this.containerWidth=0,this.containerHeight=0,this.imgAspectRatio=1}var t,n,r;return t=e,(n=[{key:"canvas",get:function(){return this.canvasDiv.firstElementChild}},{key:"canvasDiv",get:function(){return this.ref.current}},{key:"context2d",get:function(){return this.canvas.getContext("2d")}},{key:"clear",value:function(){this.context2d.clearRect(0,0,this.containerWidth,this.containerHeight)}},{key:"resize",value:function(){this.containerWidth!==this.viewer.container.clientWidth&&(this.containerWidth=this.viewer.container.clientWidth,this.canvasDiv.setAttribute("width",this.containerWidth),this.canvas.setAttribute("width",this.containerWidth)),this.containerHeight!==this.viewer.container.clientHeight&&(this.containerHeight=this.viewer.container.clientHeight,this.canvasDiv.setAttribute("height",this.containerHeight),this.canvas.setAttribute("height",this.containerHeight)),this.viewportOrigin=new m.a.Point(0,0);var e=this.viewer.viewport.getBoundsNoRotate(!0);this.viewportOrigin.x=e.x,this.viewportOrigin.y=e.y*this.imgAspectRatio,this.viewportWidth=e.width,this.viewportHeight=e.height*this.imgAspectRatio;var t=this.viewer.world.getItemAt(0);t&&(this.imgWidth=t.source.dimensions.x,this.imgHeight=t.source.dimensions.y,this.imgAspectRatio=this.imgWidth/this.imgHeight)}},{key:"canvasUpdate",value:function(e){var t=this.viewer.viewport.getZoom(!0),n=this.viewer.world.getItemAt(0);if(n){var r=n.viewportToImageZoom(t),i=(this.viewportOrigin.x/this.imgWidth-this.viewportOrigin.x)/this.viewportWidth*this.containerWidth,o=(this.viewportOrigin.y/this.imgHeight-this.viewportOrigin.y)/this.viewportHeight*this.containerHeight;this.clearBeforeRedraw&&this.clear(),this.context2d.translate(i,o),this.context2d.scale(r,r);var a=this.viewer.viewport.getCenter();this.viewer.viewport.getFlip()&&(this.context2d.translate(2*a.x,0),this.context2d.scale(-1,1));var s=this.viewer.viewport.getRotation();0!==s&&(this.context2d.translate(a.x,a.y),this.context2d.rotate(s*Math.PI/180),this.context2d.translate(-1*a.x,-1*a.y)),e(),this.context2d.setTransform(1,0,0,1,0,0)}}}])&&k(t.prototype,n),r&&k(t,r),e}();function j(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var R=function(){function e(t){var n=t.resource,r=t.palette,i=t.zoomRatio,o=t.offset,a=t.selected,s=t.hovered;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resource=n,this.palette=r,this.zoomRatio=i,this.offset=o,this.selected=a,this.hovered=s}var t,n,r;return t=e,(n=[{key:"toContext",value:function(e){this.context=e,this.resource.svgSelector?this.svgContext():this.resource.fragmentSelector&&this.fragmentContext()}},{key:"svgString",get:function(){return this.resource.svgSelector.value}},{key:"svgContext",value:function(){var e,t=this;0!==(e=this.hovered?this.palette.hovered:this.selected?this.palette.selected:this.palette.default).globalAlpha&&j(this.svgPaths).forEach((function(n){t.context.save(),t.context.translate(t.offset.x,t.offset.y);var r=new Path2D(n.attributes.d.nodeValue);t.context.strokeStyle=t.color,n.attributes["stroke-dasharray"]&&t.context.setLineDash(n.attributes["stroke-dasharray"].nodeValue.split(","));var i={fill:"fillStyle",stroke:"strokeStyle","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterlimit","stroke-width":"lineWidth"};Object.keys(i).forEach((function(e){n.attributes[e]&&(t.context[i[e]]=n.attributes[e].nodeValue)})),t.context.lineWidth/=t.zoomRatio,(t.selected||t.hovered)&&(t.context.strokeStyle=e.strokeStyle||e.fillStyle),n.attributes["stroke-opacity"]?t.context.globalAlpha=e.globalAlpha*n.attributes["stroke-opacity"].nodeValue:t.context.globalAlpha=e.globalAlpha,t.context.stroke(r),n.attributes.fill&&"none"!==n.attributes.fill.nodeValue&&(n.attributes["fill-opacity"]?t.context.globalAlpha=e.globalAlpha*n.attributes["fill-opacity"].nodeValue:t.context.globalAlpha=e.globalAlpha,t.context.fill(r)),t.context.restore()}))}},{key:"fragmentContext",value:function(){var e,t,n,r=this,i=this.resource.fragmentSelector;(i[0]+=this.offset.x,i[1]+=this.offset.y,e=this.selected?this.palette.selected:this.hovered?this.palette.hovered:this.palette.default,this.context.save(),Object.keys(e).forEach((function(t){r.context[t]=e[t]})),0!==e.globalAlpha)&&(e.fillStyle?(t=this.context).fillRect.apply(t,j(i)):(this.context.lineWidth=1/this.zoomRatio,(n=this.context).strokeRect.apply(n,j(i))),this.context.restore())}},{key:"svgPaths",get:function(){return(new DOMParser).parseFromString(this.svgString,"text/xml").getElementsByTagName("path")}}])&&I(t.prototype,n),r&&I(t,r),e}();function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||z(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||z(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=q(e);if(t){var i=q(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return V(this,n)}}function V(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return U(e)}function U(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(o,e);var t,n,r,i=H(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).ref=f.a.createRef(),t.osdCanvasOverlay=null,t.updateCanvas=function(){},t.onUpdateViewport=t.onUpdateViewport.bind(U(t)),t.onCanvasClick=t.onCanvasClick.bind(U(t)),t.onCanvasMouseMove=p()(t.onCanvasMouseMove.bind(U(t)),10),t.onCanvasExit=t.onCanvasExit.bind(U(t)),t}return t=o,r=[{key:"annotationsMatch",value:function(e,t){return!e&&!t||!(e&&!t||!e&&t)&&(0===e.length&&0===t.length||e.length===t.length&&e.every((function(e,n){var r=e.resources.map((function(e){return e.id})),i=t[n].resources.map((function(e){return e.id}));return 0===r.length&&0===i.length||r.length===i.length&&!(e.id!==t[n].id||!g()(r,i))})))}}],(n=[{key:"componentDidMount",value:function(){this.initializeViewer()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.drawAnnotations,r=t.drawSearchAnnotations,i=t.annotations,a=t.searchAnnotations,s=t.hoveredAnnotationIds,c=t.selectedAnnotationId,u=t.highlightAllAnnotations,l=t.viewer;this.initializeViewer();var f=!o.annotationsMatch(i,e.annotations),d=!o.annotationsMatch(a,e.searchAnnotations),p=C()(s,e.hoveredAnnotationIds).length>0;this.osdCanvasOverlay&&p&&(s.length>0?this.osdCanvasOverlay.canvasDiv.style.cursor="pointer":this.osdCanvasOverlay.canvasDiv.style.cursor="");var h=c!==e.selectedAnnotationId,g=n!==e.drawAnnotations||r!==e.drawSearchAnnotations||u!==e.highlightAllAnnotations;(d||f||h||p||g)&&(this.updateCanvas=this.canvasUpdateCallback(),l.forceRedraw())}},{key:"componentWillUnmount",value:function(){var e=this.props.viewer;e.removeHandler("canvas-click",this.onCanvasClick),e.removeHandler("canvas-exit",this.onCanvasExit),e.removeHandler("update-viewport",this.onUpdateViewport),e.removeHandler("mouse-move",this.onCanvasMouseMove)}},{key:"onCanvasClick",value:function(e){var t=this,n=this.props.canvasWorld,r=e.position,i=e.eventSource.viewport.pointFromPixel(r),o=n.canvasAtPoint(i);if(o){var a=L(n.canvasToWorldCoordinates(o.id),4),s=(a[0],a[1],a[2]),c=a[3],u=this.annotationsAtPoint(o,i);if(u.length>0&&(e.preventDefaultAction=!0),1===u.length)this.toggleAnnotation(u[0].id);else if(u.length>0){var l=function(e){var n=Math.PI/180;return function(r){for(var a=0,s=0;s<360;s+=1){var c=Math.cos(s*n)*e+i.x,u=Math.sin(s*n)*e+i.y;t.isAnnotationAtPoint(r,o,{x:c,y:u})&&(a+=1)}return{anno:r,score:a}}},f=[],d=1;for(f=S()(u.map(l(d)),"score");d<Math.max(s,c)&&f[0].score===f[1].score;)d*=2,f=S()(u.map(l(d)),"score");this.toggleAnnotation(f[0].anno.id)}}}},{key:"onCanvasMouseMove",value:function(e){var t=this.props,n=t.annotations,r=t.canvasWorld,i=t.hoverAnnotation,o=t.hoveredAnnotationIds,a=t.searchAnnotations,s=t.viewer,c=t.windowId;if(0!==n.length||0!==a.length){var u=e.position,l=s.viewport.pointFromPixel(u),f=r.canvasAtPoint(l);if(f){var d=this.annotationsAtPoint(f,l);C()(o,d.map((function(e){return e.id}))).length>0&&i(c,d.map((function(e){return e.id})))}else i(c,[])}}},{key:"onCanvasExit",value:function(e){var t=this.props,n=t.hoverAnnotation,r=t.windowId;this.onCanvasMouseMove.cancel(),n(r,[])}},{key:"onUpdateViewport",value:function(e){this.updateCanvas()}},{key:"initializeViewer",value:function(){var e=this.props.viewer;e&&(this.osdCanvasOverlay||(this.osdCanvasOverlay=new T(e,this.ref),e.addHandler("canvas-click",this.onCanvasClick),e.addHandler("canvas-exit",this.onCanvasExit),e.addHandler("update-viewport",this.onUpdateViewport),e.addHandler("mouse-move",this.onCanvasMouseMove),this.updateCanvas=this.canvasUpdateCallback()))}},{key:"canvasUpdateCallback",value:function(){var e=this;return function(){e.osdCanvasOverlay.clear(),e.osdCanvasOverlay.resize(),e.osdCanvasOverlay.canvasUpdate(e.renderAnnotations.bind(e))}}},{key:"isAnnotationAtPoint",value:function(e,t,n){var r=L(this.props.canvasWorld.canvasToWorldCoordinates(t.id),2),i=r[0],o=r[1],a=n.x-i,s=n.y-o;if(e.svgSelector){var c=this.osdCanvasOverlay.context2d;return N(new R({resource:e}).svgPaths).some((function(e){return c.isPointInPath(new Path2D(e.attributes.d.nodeValue),a,s)}))}if(e.fragmentSelector){var u=L(e.fragmentSelector,4),l=u[0],f=u[1],d=u[2],p=u[3];return l<=a&&a<=l+d&&f<=s&&s<=f+p}return!1}},{key:"annotationsAtPoint",value:function(e,t){var n=this,r=this.props,i=r.annotations,o=r.searchAnnotations,a=[].concat(N(i),N(o));return c()(a.map((function(e){return e.resources}))).filter((function(r){return e.id===r.targetId&&n.isAnnotationAtPoint(r,e,t)}))}},{key:"toggleAnnotation",value:function(e){var t=this.props,n=t.selectedAnnotationId,r=t.selectAnnotation,i=t.deselectAnnotation,o=t.windowId;n===e?i(o,e):r(o,e)}},{key:"annotationsToContext",value:function(e,t){var n=this.props,r=n.highlightAllAnnotations,i=n.hoveredAnnotationIds,o=n.selectedAnnotationId,a=n.canvasWorld,s=n.viewer,c=this.osdCanvasOverlay.context2d,u=s.viewport.getZoom(!0)/s.viewport.getMaxZoom();e.forEach((function(e){e.resources.forEach((function(e){if(a.canvasIds.includes(e.targetId)){var n=a.offsetByCanvas(e.targetId);new R({hovered:i.includes(e.id),offset:n,palette:M(M({},t),{},{default:M(M({},t.default),!r&&t.hidden)}),resource:e,selected:o===e.id,zoomRatio:u}).toContext(c)}}))}))}},{key:"renderAnnotations",value:function(){var e=this.props,t=e.annotations,n=e.drawAnnotations,r=e.drawSearchAnnotations,i=e.searchAnnotations,o=e.palette;r&&this.annotationsToContext(i,o.search),n&&this.annotationsToContext(t,o.annotations)}},{key:"render",value:function(){var e=this.props.viewer;return e?x.a.createPortal(f.a.createElement("div",{ref:this.ref,style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"}},f.a.createElement("canvas",null)),e.canvas):f.a.createElement(f.a.Fragment,null)}}])&&F(t.prototype,n),r&&F(t,r),o}(l.Component);G.defaultProps={annotations:[],deselectAnnotation:function(){},drawAnnotations:!0,drawSearchAnnotations:!0,highlightAllAnnotations:!1,hoverAnnotation:function(){},hoveredAnnotationIds:[],palette:{},searchAnnotations:[],selectAnnotation:function(){},selectedAnnotationId:void 0,viewer:null};var K=n(560),$=n(667),Z=n(568),X=n(88),Q=n(148),Y=n(38),J=n(566),ee={deselectAnnotation:K.a,hoverAnnotation:K.b,selectAnnotation:K.g},te=Object(r.compose)(Object(o.a)(),Object(i.b)((function(e,t){var n=t.windowId;return{annotations:Object($.d)(e,{windowId:n}),canvasWorld:Object(Z.a)(e,{windowId:n}),drawAnnotations:Object(X.a)(e).window.forceDrawAnnotations||Object(Q.getCompanionWindowsForContent)(e,{content:"annotations",windowId:n}).length>0,drawSearchAnnotations:Object(X.a)(e).window.forceDrawAnnotations||Object(Q.getCompanionWindowsForContent)(e,{content:"search",windowId:n}).length>0,highlightAllAnnotations:Object(Y.e)(e,{windowId:n}).highlightAllAnnotations,hoveredAnnotationIds:Object(Y.e)(e,{windowId:n}).hoveredAnnotationIds,palette:Object(X.g)(e).palette,searchAnnotations:Object(J.f)(e,{windowId:n}),selectedAnnotationId:Object($.e)(e,{windowId:n})}}),ee),Object(u.a)("AnnotationsOverlay"))(G),ne=n(37),re=n(245);function ie(e,t,n){return(ie=he()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&fe(i,n.prototype),i}).apply(null,arguments)}function oe(e){return function(e){if(Array.isArray(e))return ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ae(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fe(e,t){return(fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function de(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pe(e)}function pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function he(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fe(e,t)}(s,e);var t,n,r,i,o,a=(t=s,n=he(),function(){var e,r=ge(t);if(n){var i=ge(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return de(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this,e)).state={viewer:void 0},t.ref=f.a.createRef(),t.apiRef=f.a.createRef(),re.OSDReferences.set(e.windowId,t.apiRef),t.onCanvasMouseMove=p()(t.onCanvasMouseMove.bind(pe(t)),10),t.onViewportChange=t.onViewportChange.bind(pe(t)),t.zoomToWorld=t.zoomToWorld.bind(pe(t)),t.osdUpdating=!1,t}return r=s,(i=[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.osdConfig,r=t.t,i=t.windowId;if(this.ref.current){var o=new m.a(ce({id:this.ref.current.id},n)),a=o.canvas&&o.canvas.firstElementChild;a&&(a.setAttribute("role","img"),a.setAttribute("aria-label",r("digitizedView")),a.setAttribute("aria-describedby","".concat(i,"-osd"))),this.apiRef.current=o,this.setState({viewer:o}),o.addHandler("animation-start",(function(){e.osdUpdating=!0})),o.addHandler("animation-finish",this.onViewportChange),o.addHandler("animation-finish",(function(){e.osdUpdating=!1})),o.innerTracker&&(o.innerTracker.moveHandler=this.onCanvasMouseMove)}}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.viewerConfig,i=n.canvasWorld,o=this.state.viewer;if(this.apiRef.current=o,void 0===t.viewer)return r&&(o.viewport.panTo(r,!0),o.viewport.zoomTo(r.zoom,r,!0),void 0!==r.degrees&&o.viewport.setRotation(r.degrees),void 0!==r.flip&&o.viewport.setFlip(r.flip)),void this.addAllImageSources(!r);if(this.infoResponsesMatch(e.infoResponses)&&this.nonTiledImagedMatch(e.nonTiledImages))if(g()(i.layers,e.canvasWorld.layers)){if(r&&!this.osdUpdating){var a=o.viewport;r.x===a.centerSpringX.target.value&&r.y===a.centerSpringY.target.value||a.panTo(r,!1),r.zoom!==a.zoomSpring.target.value&&a.zoomTo(r.zoom,r,!1),r.rotation!==a.getRotation()&&a.setRotation(r.rotation),r.flip!==a.getFlip()&&a.setFlip(r.flip)}}else this.refreshTileProperties();else{o.close();var s=!g()(i.canvasIds,e.canvasWorld.canvasIds);this.addAllImageSources(s||!r)}}},{key:"componentWillUnmount",value:function(){var e=this.state.viewer;e.innerTracker&&e.innerTracker.moveHandler===this.onCanvasMouseMove&&(e.innerTracker.moveHandler=null),e.removeAllHandlers(),this.apiRef.current=void 0}},{key:"onCanvasMouseMove",value:function(e){this.state.viewer.raiseEvent("mouse-move",e)}},{key:"onViewportChange",value:function(e){var t=this.props,n=t.updateViewport,r=t.windowId,i=e.eventSource.viewport;n(r,{flip:i.getFlip(),rotation:i.getRotation(),x:Math.round(i.centerSpringX.target.value),y:Math.round(i.centerSpringY.target.value),zoom:i.zoomSpring.target.value})}},{key:"addAllImageSources",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this.props,r=n.nonTiledImages,i=n.infoResponses;Promise.all(i.map((function(t){return e.addTileSource(t)})),r.map((function(t){return e.addNonTiledImage(t)}))).then((function(){(i[0]||r[0])&&(t&&e.zoomToWorld(),e.refreshTileProperties())}))}},{key:"addNonTiledImage",value:function(e){var t=this.props.canvasWorld,n=this.state.viewer,r=e.getProperty("type"),i=e.getProperty("format")||"";return"Image"===r||"dctypes:Image"===r||i.startsWith("image/")?new Promise((function(r,i){n||i(),n.addSimpleImage({error:function(e){return i(e)},fitBounds:ie(m.a.Rect,oe(t.contentResourceToWorldCoordinates(e))),index:t.layerIndexOfImageResource(e),opacity:t.layerOpacityOfImageResource(e),success:function(e){return r(e)},url:e.id})})):Promise.resolve()}},{key:"addTileSource",value:function(e){var t=this.props.canvasWorld,n=this.state.viewer;return new Promise((function(r,i){n||i();var o=ce({},e.json),a=t.contentResource(e.id);a&&n.addTiledImage({error:function(e){return i(e)},fitBounds:ie(m.a.Rect,oe(t.contentResourceToWorldCoordinates(a))),index:t.layerIndexOfImageResource(a),opacity:t.layerOpacityOfImageResource(a),success:function(e){return r(e)},tileSource:o})}))}},{key:"refreshTileProperties",value:function(){for(var e=this.props.canvasWorld,t=this.state.viewer.world,n=[],r=0;r<t.getItemCount();r+=1)n.push(t.getItemAt(r));n.forEach((function(n,r){var i=e.contentResource(n.source["@id"]||n.source.id);if(i){var o=e.layerIndexOfImageResource(i);r!==o&&t.setItemIndex(n,o),n.setOpacity(e.layerOpacityOfImageResource(i))}}))}},{key:"fitBounds",value:function(e,t,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.state.viewer;o.viewport.fitBounds(new m.a.Rect(e,t,n,r),i)}},{key:"infoResponsesMatch",value:function(e){var t=this.props.infoResponses;return 0===t.length&&0===e.length||t.length===e.length&&t.every((function(t,n){return!!(e[n]&&t.json&&e[n].json&&t.tokenServiceId===e[n].tokenServiceId&&(t.json["@id"]&&t.json["@id"]===e[n].json["@id"]||t.json.id&&t.json.id===e[n].json.id))}))}},{key:"nonTiledImagedMatch",value:function(e){var t=this.props.nonTiledImages;return 0===t.length&&0===e.length||t.some((function(t,n){return!!e[n]&&t.id===e[n].id}))}},{key:"zoomToWorld",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.props.canvasWorld;this.fitBounds.apply(this,oe(t.worldBounds()).concat([e]))}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.classes,i=t.label,o=t.t,a=t.windowId,s=t.drawAnnotations,c=this.state.viewer,u=f.a.Children.map(n,(function(t){return f.a.cloneElement(t,{zoomToWorld:e.zoomToWorld})}));return f.a.createElement(f.a.Fragment,null,f.a.createElement("section",{className:b()(Object(w.a)("osd-container"),r.osdContainer),id:"".concat(a,"-osd"),ref:this.ref,"aria-label":o("item",{label:i}),"aria-live":"polite"},s&&f.a.createElement(te,{viewer:c,windowId:a}),u,f.a.createElement(ne.a,Object.assign({viewer:c},ce(ce({},this.props),{},{children:null})))))}}])&&le(r.prototype,i),o&&le(r,o),s}(l.Component);ve.defaultProps={children:null,drawAnnotations:!1,infoResponses:[],label:null,nonTiledImages:[],osdConfig:{},viewerConfig:null};var me=n(558),ye=n(45),be={updateViewport:me.d},we=Object(r.compose)(Object(a.a)({osdContainer:{flex:1,position:"relative"}}),Object(o.a)(),Object(i.b)((function(e,t){var n=t.windowId,r=Object(Z.a)(e,{windowId:n}),i=Object(ye.selectInfoResponses)(e),o=c()(r.canvases.map((function(e){return e.imageServiceIds})));return{canvasWorld:r,drawAnnotations:Object(X.a)(e).window.forceDrawAnnotations||Object(Q.getCompanionWindowsForContent)(e,{content:"annotations",windowId:n}).length>0||Object(Q.getCompanionWindowsForContent)(e,{content:"search",windowId:n}).length>0,infoResponses:o.map((function(e){return i[e]})).filter((function(e){return void 0!==e&&!1===e.isFetching&&void 0===e.error})),label:Object(ye.getCanvasLabel)(e,{canvasId:(Object(ye.getCurrentCanvas)(e,{windowId:n})||{}).id,windowId:n}),nonTiledImages:Object(ye.getVisibleCanvasNonTiledResources)(e,{windowId:n}),osdConfig:Object(X.a)(e).osdConfig,viewerConfig:Object(Y.d)(e,{windowId:n})}}),be),Object(u.a)("OpenSeadragonViewer"));t.default=we(ve)},function(e,t,n){"use strict";var r,i=n(1),o=n(4),a=n(27),s=n(0),c=(n(67),n(2),n(3)),u=n(73),l=n(149);function f(){if(r)return r;var e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),r="reverse",e.scrollLeft>0?r="default":(e.scrollLeft=1,0===e.scrollLeft&&(r="negative")),document.body.removeChild(e),r}function d(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;switch(f()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function p(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var h={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function g(e){var t=e.onChange,n=Object(o.a)(e,["onChange"]),r=s.useRef(),a=s.useRef(null),c=function(){r.current=a.current.offsetHeight-a.current.clientHeight};return s.useEffect((function(){var e=Object(u.a)((function(){var e=r.current;c(),e!==r.current&&t(r.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),s.useEffect((function(){c(),t(r.current)}),[t]),s.createElement("div",Object(i.a)({style:h,ref:a},n))}var v=n(5),m=n(11),y=s.forwardRef((function(e,t){var n=e.classes,r=e.className,a=e.color,u=e.orientation,l=Object(o.a)(e,["classes","className","color","orientation"]);return s.createElement("span",Object(i.a)({className:Object(c.a)(n.root,n["color".concat(Object(m.a)(a))],r,"vertical"===u&&n.vertical),ref:t},l))})),b=Object(v.a)((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(y),w=n(1167),_=n(39),x=n(36),O=s.forwardRef((function(e,t){var n=e["aria-label"],r=e["aria-labelledby"],h=e.action,v=e.centered,m=void 0!==v&&v,y=e.children,O=e.classes,S=e.className,E=e.component,C=void 0===E?"div":E,k=e.indicatorColor,T=void 0===k?"secondary":k,j=e.onChange,P=e.orientation,I=void 0===P?"horizontal":P,R=e.ScrollButtonComponent,A=void 0===R?w.a:R,M=e.scrollButtons,D=void 0===M?"auto":M,N=e.selectionFollowsFocus,L=e.TabIndicatorProps,z=void 0===L?{}:L,B=e.TabScrollButtonProps,F=e.textColor,W=void 0===F?"inherit":F,H=e.value,V=e.variant,U=void 0===V?"standard":V,q=Object(o.a)(e,["aria-label","aria-labelledby","action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant"]),G=Object(x.a)(),K="scrollable"===U,$="rtl"===G.direction,Z="vertical"===I,X=Z?"scrollTop":"scrollLeft",Q=Z?"top":"left",Y=Z?"bottom":"right",J=Z?"clientHeight":"clientWidth",ee=Z?"height":"width";var te=s.useState(!1),ne=te[0],re=te[1],ie=s.useState({}),oe=ie[0],ae=ie[1],se=s.useState({start:!1,end:!1}),ce=se[0],ue=se[1],le=s.useState({overflow:"hidden",marginBottom:null}),fe=le[0],de=le[1],pe=new Map,he=s.useRef(null),ge=s.useRef(null),ve=function(){var e,t,n=he.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:d(n,G.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==H){var i=ge.current.children;if(i.length>0){var o=i[pe.get(H)];0,t=o?o.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},me=Object(_.a)((function(){var e,t=ve(),n=t.tabsMeta,r=t.tabMeta,i=0;if(r&&n)if(Z)i=r.top-n.top+n.scrollTop;else{var o=$?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;i=r.left-n.left+o}var s=(e={},Object(a.a)(e,Q,i),Object(a.a)(e,ee,r?r[ee]:0),e);if(isNaN(oe[Q])||isNaN(oe[ee]))ae(s);else{var c=Math.abs(oe[Q]-s[Q]),u=Math.abs(oe[ee]-s[ee]);(c>=1||u>=1)&&ae(s)}})),ye=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=r.ease,a=void 0===o?p:o,s=r.duration,c=void 0===s?300:s,u=null,l=t[e],f=!1,d=function(){f=!0},h=function r(o){if(f)i(new Error("Animation cancelled"));else{null===u&&(u=o);var s=Math.min(1,(o-u)/c);t[e]=a(s)*(n-l)+l,s>=1?requestAnimationFrame((function(){i(null)})):requestAnimationFrame(r)}};l===n?i(new Error("Element already at target position")):requestAnimationFrame(h)}(X,he.current,e)},be=function(e){var t=he.current[X];Z?t+=e:(t+=e*($?-1:1),t*=$&&"reverse"===f()?-1:1),ye(t)},we=function(){be(-he.current[J])},_e=function(){be(he.current[J])},xe=s.useCallback((function(e){de({overflow:null,marginBottom:-e})}),[]),Oe=Object(_.a)((function(){var e=ve(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[Q]<t[Q]){var r=t[X]+(n[Q]-t[Q]);ye(r)}else if(n[Y]>t[Y]){var i=t[X]+(n[Y]-t[Y]);ye(i)}})),Se=Object(_.a)((function(){if(K&&"off"!==D){var e,t,n=he.current,r=n.scrollTop,i=n.scrollHeight,o=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(Z)e=r>1,t=r<i-o-1;else{var c=d(he.current,G.direction);e=$?c<a-s-1:c>1,t=$?c>1:c<a-s-1}e===ce.start&&t===ce.end||ue({start:e,end:t})}}));s.useEffect((function(){var e=Object(u.a)((function(){me(),Se()})),t=Object(l.a)(he.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[me,Se]);var Ee=s.useCallback(Object(u.a)((function(){Se()})));s.useEffect((function(){return function(){Ee.clear()}}),[Ee]),s.useEffect((function(){re(!0)}),[]),s.useEffect((function(){me(),Se()})),s.useEffect((function(){Oe()}),[Oe,oe]),s.useImperativeHandle(h,(function(){return{updateIndicator:me,updateScrollButtons:Se}}),[me,Se]);var Ce=s.createElement(b,Object(i.a)({className:O.indicator,orientation:I,color:T},z,{style:Object(i.a)({},oe,z.style)})),ke=0,Te=s.Children.map(y,(function(e){if(!s.isValidElement(e))return null;var t=void 0===e.props.value?ke:e.props.value;pe.set(t,ke);var n=t===H;return ke+=1,s.cloneElement(e,{fullWidth:"fullWidth"===U,indicator:n&&!ne&&Ce,selected:n,selectionFollowsFocus:N,onChange:j,textColor:W,value:t})})),je=function(){var e={};e.scrollbarSizeListener=K?s.createElement(g,{className:O.scrollable,onChange:xe}):null;var t=ce.start||ce.end,n=K&&("auto"===D&&t||"desktop"===D||"on"===D);return e.scrollButtonStart=n?s.createElement(A,Object(i.a)({orientation:I,direction:$?"right":"left",onClick:we,disabled:!ce.start,className:Object(c.a)(O.scrollButtons,"on"!==D&&O.scrollButtonsDesktop)},B)):null,e.scrollButtonEnd=n?s.createElement(A,Object(i.a)({orientation:I,direction:$?"left":"right",onClick:_e,disabled:!ce.end,className:Object(c.a)(O.scrollButtons,"on"!==D&&O.scrollButtonsDesktop)},B)):null,e}();return s.createElement(C,Object(i.a)({className:Object(c.a)(O.root,S,Z&&O.vertical),ref:t},q),je.scrollButtonStart,je.scrollbarSizeListener,s.createElement("div",{className:Object(c.a)(O.scroller,K?O.scrollable:O.fixed),style:fe,ref:he,onScroll:Ee},s.createElement("div",{"aria-label":n,"aria-labelledby":r,className:Object(c.a)(O.flexContainer,Z&&O.flexContainerVertical,m&&!K&&O.centered),onKeyDown:function(e){var t=e.target;if("tab"===t.getAttribute("role")){var n=null,r="vertical"!==I?"ArrowLeft":"ArrowUp",i="vertical"!==I?"ArrowRight":"ArrowDown";switch("vertical"!==I&&"rtl"===G.direction&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:n=t.previousElementSibling||ge.current.lastChild;break;case i:n=t.nextElementSibling||ge.current.firstChild;break;case"Home":n=ge.current.firstChild;break;case"End":n=ge.current.lastChild}null!==n&&(n.focus(),e.preventDefault())}},ref:ge,role:"tablist"},Te),ne&&Ce),je.scrollButtonEnd)}));t.a=Object(v.a)((function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:Object(a.a)({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(O)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(9),o=n(5),a=n(8),s=n(0),c=n.n(s),u=n(140),l=n(29),f=n.n(l),d=n(555),p=n(560),h=n(558),g=n(26),v=n(1176),m=n(1177),y=n(364),b=n.n(y),w=n(218),_=n.n(w),x=n(23),O=n.n(x),S=(n(653),n(367)),E=n(48),C=n(123);function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=R(e);if(t){var i=R(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return I(e)}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(o,e);var t,n,r,i=j(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={requestedAnnotations:!1},t.handleSelect=t.handleSelect.bind(I(t)),t.handleKey=t.handleKey.bind(I(t)),t.handleIntersection=t.handleIntersection.bind(I(t)),t}return t=o,(n=[{key:"handleSelect",value:function(){var e=this.props,t=e.canvas,n=e.selected,r=e.setCanvas,i=e.focusOnCanvas;n?i():r(t.id)}},{key:"handleKey",value:function(e){var t=this.props,n=t.canvas,r=t.setCanvas,i=t.focusOnCanvas;this.keys={enter:"Enter",space:" "},this.chars={enter:13,space:32},e.key===this.keys.enter||e.which===this.chars.enter||e.key===this.keys.space||e.which===this.chars.space?i():r(n.id)}},{key:"handleIntersection",value:function(e){var t=e.isIntersecting,n=this.props,r=n.annotationsCount,i=n.requestCanvasAnnotations,o=this.state.requestedAnnotations;!t||void 0===r||r>0||o||(this.setState({requestedAnnotations:!0}),i())}},{key:"render",value:function(){var e=this.props,t=e.annotationsCount,n=e.searchAnnotationsCount,r=e.canvas,i=e.classes,o=e.config,a=e.selected,s=new E.a(r);return c.a.createElement(S.a,{onChange:this.handleIntersection},c.a.createElement("div",{key:r.index,className:O()(i.galleryViewItem,a?i.selected:"",n>0?i.hasAnnotations:""),onClick:this.handleSelect,onKeyUp:this.handleKey,role:"button",tabIndex:0},c.a.createElement(C.a,{resource:r,labelled:!0,variant:"outside",maxWidth:o.width,maxHeight:o.height,style:{margin:"0 auto",maxWidth:"".concat(Math.ceil(o.height*s.aspectRatio),"px")}},c.a.createElement("div",{className:i.chips},n>0&&c.a.createElement(m.a,{avatar:c.a.createElement(v.a,{className:i.avatar,classes:{circle:i.avatarIcon}},c.a.createElement(_.a,{fontSize:"small"})),label:n,className:O()(i.searchChip),size:"small"}),(t||0)>0&&c.a.createElement(m.a,{avatar:c.a.createElement(v.a,{className:i.avatar,classes:{circle:i.avatarIcon}},c.a.createElement(b.a,{className:i.annotationIcon})),label:t,className:O()(i.annotationsChip),size:"small"})))))}}])&&k(t.prototype,n),r&&k(t,r),o}(s.Component);A.defaultProps={annotationsCount:void 0,config:{height:100,width:null},requestCanvasAnnotations:function(){},searchAnnotationsCount:0,selected:!1};var M=n(45),D=n(566),N=n(148),L=n(667),z=n(88);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var H=Object(r.compose)(Object(i.b)((function(e,t){var n=t.canvas,r=t.windowId,i=Object(M.getCurrentCanvas)(e,{windowId:r}),o=Object(D.f)(e,{windowId:r}),a=f()(o.map((function(e){return e.resources}))).filter((function(e){return e.targetId===n.id})),s=Object(N.getCompanionWindowsForContent)(e,{content:"annotations",windowId:r}).length>0;return{annotationsCount:function(){if(s)return Object(L.d)(e,{canvasId:n.id}).reduce((function(e,t){return e+t.resources.filter((function(e){return e.targetId===n.id})).length}),0)}(),config:Object(z.a)(e).galleryView,searchAnnotationsCount:a.length,selected:i&&i.id===n.id}}),(function(e,t){var n=t.canvas,r=(t.id,t.windowId);return{focusOnCanvas:function(){return e(d.i(r,"single"))},requestCanvasAnnotations:function(){return e(p.f(r,n.id))},setCanvas:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e(h.a.apply(g,[r].concat(n)))}}})),Object(o.a)((function(e){return{annotationIcon:{height:"1rem",width:"1rem"},annotationsChip:F({},e.typography.caption),avatar:{backgroundColor:"transparent"},chips:{opacity:.875,position:"absolute",right:0,textAlign:"right",top:0},galleryViewItem:{"&$hasAnnotations":{border:"2px solid ".concat(e.palette.action.selected)},"&$selected,&$selected$hasAnnotations":{border:"2px solid ".concat(e.palette.primary.main)},"&:focus":{outline:"none"},"&:hover":{backgroundColor:e.palette.action.hover},border:"2px solid transparent",cursor:"pointer",display:"inline-block",margin:"".concat(e.spacing(1),"px ").concat(e.spacing(.5),"px"),maxHeight:function(e){return e.config.height+45},minWidth:"60px",overflow:"hidden",padding:e.spacing(.5),position:"relative",width:"min-content"},hasAnnotations:{},searchChip:F(F({},e.typography.caption),{},{"&$selected $avatar":{backgroundColor:e.palette.highlights.primary},marginTop:2}),selected:{}}})))(A);function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$(e);if(t){var i=$(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $(e){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q(e,t)}(o,e);var t,n,r,i=G(o);function o(){return V(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.canvases,n=e.classes,r=e.viewingDirection,i=e.windowId,o="right-to-left"===r?"rtl":"ltr";return c.a.createElement(u.a,{component:"section",dir:o,square:!0,elevation:0,className:n.galleryContainer,id:"".concat(i,"-gallery")},t.map((function(e){return c.a.createElement(H,{key:e.id,windowId:i,canvas:e})})))}}])&&U(t.prototype,n),r&&U(t,r),o}(s.Component);Z.defaultProps={classes:{},viewingDirection:""};var X=n(76),Q=Object(r.compose)(Object(o.a)((function(e){return{galleryContainer:{alignItems:"flex-start",display:"flex",flexDirection:"row",flexWrap:"wrap",overflowX:"hidden",overflowY:"scroll",padding:"50px 0 50px 20px",width:"100%"}}})),Object(i.b)((function(e,t){var n=t.windowId;return{canvases:Object(M.getCanvases)(e,{windowId:n}),viewingDirection:Object(X.e)(e,{windowId:n})}})),Object(a.a)("GalleryView"));t.default=Q(Z)},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(134),i=n.n(r),o=n(346),a=n.n(o),s=n(177),c=n.n(s),u=n(0),l=n.n(u),f=n(188);function d(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var p={};function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&p[t[0]]||("string"==typeof t[0]&&(p[t[0]]=new Date),d.apply(void 0,t))}function g(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return h("i18n.languages were undefined or empty",t.languages),!0;var r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!t.services.backendConnector.backend||!(!a(r,e)||i&&!a(o,e))))}function m(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=Object(u.useContext)(f.a)||{},i=r.i18n,o=r.defaultNS,s=n||i||Object(f.d)();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new f.b),!s){h("You will need to pass in an i18next instance by using initReactI18next");var c=function(e){return Array.isArray(e)?e[e.length-1]:e},l=[c,{},!1];return l.t=c,l.i18n={},l.ready=!1,l}s.options.react&&void 0!==s.options.react.wait&&h("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=b(b(b({},Object(f.c)()),s.options.react),t),p=d.useSuspense,m=d.keyPrefix,y=e||o||s.options&&s.options.defaultNS;y="string"==typeof y?[y]:y||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(y);var w=(s.isInitialized||s.initializedStoreOnce)&&y.every((function(e){return v(e,s,d)}));function _(){return s.getFixedT(null,"fallback"===d.nsMode?y:y[0],m)}var x=Object(u.useState)(_),O=a()(x,2),S=O[0],E=O[1],C=Object(u.useRef)(!0);Object(u.useEffect)((function(){var e=d.bindI18n,t=d.bindI18nStore;function n(){C.current&&E(_)}return C.current=!0,w||p||g(s,y,(function(){C.current&&E(_)})),e&&s&&s.on(e,n),t&&s&&s.store.on(t,n),function(){C.current=!1,e&&s&&e.split(" ").forEach((function(e){return s.off(e,n)})),t&&s&&t.split(" ").forEach((function(e){return s.store.off(e,n)}))}}),[s,y.join()]);var k=Object(u.useRef)(!0);Object(u.useEffect)((function(){C.current&&!k.current&&E(_),k.current=!1}),[s]);var T=[S,s,w];if(T.t=S,T.i18n=s,T.ready=w,w)return T;if(!w&&!p)return T;throw new Promise((function(e){g(s,y,(function(){e()}))}))}var _=["forwardedRef"];function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){function r(r){var i=r.forwardedRef,o=c()(r,_),s=w(e,o),u=a()(s,3),f=u[0],d=u[1],p=u[2],h=O(O({},o),{},{t:f,i18n:d,tReady:p});return t.withRef&&i?h.ref=i:!t.withRef&&i&&(h.forwardedRef=i),l.a.createElement(n,h)}r.displayName="withI18nextTranslation(".concat(m(n),")"),r.WrappedComponent=n;return t.withRef?l.a.forwardRef((function(e,t){return l.a.createElement(r,Object.assign({},e,{forwardedRef:t}))})):r}}},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(5),c=n(43),u=Object(c.a)(o.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"}),"Person");var l=o.forwardRef((function(e,t){var n=e.alt,s=e.children,c=e.classes,l=e.className,f=e.component,d=void 0===f?"div":f,p=e.imgProps,h=e.sizes,g=e.src,v=e.srcSet,m=e.variant,y=void 0===m?"circular":m,b=Object(i.a)(e,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),w=null,_=function(e){var t=e.src,n=e.srcSet,r=o.useState(!1),i=r[0],a=r[1];return o.useEffect((function(){if(t||n){a(!1);var e=!0,r=new Image;return r.src=t,r.srcSet=n,r.onload=function(){e&&a("loaded")},r.onerror=function(){e&&a("error")},function(){e=!1}}}),[t,n]),i}({src:g,srcSet:v}),x=g||v,O=x&&"error"!==_;return w=O?o.createElement("img",Object(r.a)({alt:n,src:g,srcSet:v,sizes:h,className:c.img},p)):null!=s?s:x&&n?n[0]:o.createElement(u,{className:c.fallback}),o.createElement(d,Object(r.a)({className:Object(a.a)(c.root,c.system,c[y],l,!O&&c.colorDefault),ref:t},b),w)}));t.a=Object(s.a)((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:"light"===e.palette.type?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%"}}}),{name:"MuiAvatar"})(l)},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(0),a=(n(2),n(3)),s=n(43),c=Object(s.a)(o.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"}),"Cancel"),u=n(5),l=n(24),f=n(31),d=n(11),p=n(190);function h(e){return"Backspace"===e.key||"Delete"===e.key}var g=o.forwardRef((function(e,t){var n=e.avatar,s=e.classes,u=e.className,l=e.clickable,g=e.color,v=void 0===g?"default":g,m=e.component,y=e.deleteIcon,b=e.disabled,w=void 0!==b&&b,_=e.icon,x=e.label,O=e.onClick,S=e.onDelete,E=e.onKeyDown,C=e.onKeyUp,k=e.size,T=void 0===k?"medium":k,j=e.variant,P=void 0===j?"default":j,I=Object(i.a)(e,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),R=o.useRef(null),A=Object(f.a)(R,t),M=function(e){e.stopPropagation(),S&&S(e)},D=!(!1===l||!O)||l,N="small"===T,L=m||(D?p.a:"div"),z=L===p.a?{component:"div"}:{},B=null;if(S){var F=Object(a.a)("default"!==v&&("default"===P?s["deleteIconColor".concat(Object(d.a)(v))]:s["deleteIconOutlinedColor".concat(Object(d.a)(v))]),N&&s.deleteIconSmall);B=y&&o.isValidElement(y)?o.cloneElement(y,{className:Object(a.a)(y.props.className,s.deleteIcon,F),onClick:M}):o.createElement(c,{className:Object(a.a)(s.deleteIcon,F),onClick:M})}var W=null;n&&o.isValidElement(n)&&(W=o.cloneElement(n,{className:Object(a.a)(s.avatar,n.props.className,N&&s.avatarSmall,"default"!==v&&s["avatarColor".concat(Object(d.a)(v))])}));var H=null;return _&&o.isValidElement(_)&&(H=o.cloneElement(_,{className:Object(a.a)(s.icon,_.props.className,N&&s.iconSmall,"default"!==v&&s["iconColor".concat(Object(d.a)(v))])})),o.createElement(L,Object(r.a)({role:D||S?"button":void 0,className:Object(a.a)(s.root,u,"default"!==v&&[s["color".concat(Object(d.a)(v))],D&&s["clickableColor".concat(Object(d.a)(v))],S&&s["deletableColor".concat(Object(d.a)(v))]],"default"!==P&&[s.outlined,{primary:s.outlinedPrimary,secondary:s.outlinedSecondary}[v]],w&&s.disabled,N&&s.sizeSmall,D&&s.clickable,S&&s.deletable),"aria-disabled":!!w||void 0,tabIndex:D||S?0:void 0,onClick:O,onKeyDown:function(e){e.currentTarget===e.target&&h(e)&&e.preventDefault(),E&&E(e)},onKeyUp:function(e){e.currentTarget===e.target&&(S&&h(e)?S(e):"Escape"===e.key&&R.current&&R.current.blur()),C&&C(e)},ref:A},z,I),W||H,o.createElement("span",{className:Object(a.a)(s.label,N&&s.labelSmall)},x),B)}));t.a=Object(u.a)((function(e){var t="light"===e.palette.type?e.palette.grey[300]:e.palette.grey[700],n=Object(l.a)(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(t),backgroundColor:t,borderRadius:16,whiteSpace:"nowrap",transition:e.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:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},"& $avatarColorPrimary":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},"& $avatarColorSecondary":{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:Object(l.d)(t,.08)},"&:active":{boxShadow:e.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:Object(l.d)(e.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:Object(l.d)(e.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:Object(l.d)(t,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:Object(l.d)(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:Object(l.d)(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Object(l.a)(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Object(l.a)(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Object(l.a)(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:"light"===e.palette.type?e.palette.grey[700]:e.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:n,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:Object(l.a)(n,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:Object(l.a)(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:Object(l.a)(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:Object(l.a)(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:Object(l.a)(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}}),{name:"MuiChip"})(g)},function(e,t,n){"use strict";var r=n(50),i=n(41),o=n(4),a=n(1),s=n(0),c=(n(2),n(3)),u=n(5),l=n(36),f=n(24),d=n(118),p=n(47),h=n(39),g=n(31),v=n(11),m=n(75);var y=Object(u.a)((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Object(a.a)({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,r=e.className,i=e.open,o=e.value,a=e.valueLabelDisplay;return"off"===a?t:s.cloneElement(t,{className:Object(c.a)(t.props.className,(i||"on"===a)&&n.open,n.thumb)},s.createElement("span",{className:Object(c.a)(n.offset,r)},s.createElement("span",{className:n.circle},s.createElement("span",{className:n.label},o))))}));function b(e,t){return e-t}function w(e,t,n){return Math.min(Math.max(t,e),n)}function _(e,t){return e.reduce((function(e,n,r){var i=Math.abs(t-n);return null===e||i<e.distance||i===e.distance?{distance:i,index:r}:e}),null).index}function x(e,t){if(void 0!==t.current&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var r=e.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function O(e,t,n){return 100*(e-t)/(n-t)}function S(e,t,n){var r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}(t)))}function E(e){var t=e.values,n=e.source,r=e.newValue,i=e.index;if(t[i]===r)return n;var o=t.slice();return o[i]=r,o}function C(e){var t=e.sliderRef,n=e.activeIndex,r=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===n||t.current.querySelector('[role="slider"][data-index="'.concat(n,'"]')).focus(),r&&r(n)}var k={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},T=function(e){return e},j=s.forwardRef((function(e,t){var n=e["aria-label"],u=e["aria-labelledby"],f=e["aria-valuetext"],j=e.classes,P=e.className,I=e.color,R=void 0===I?"primary":I,A=e.component,M=void 0===A?"span":A,D=e.defaultValue,N=e.disabled,L=void 0!==N&&N,z=e.getAriaLabel,B=e.getAriaValueText,F=e.marks,W=void 0!==F&&F,H=e.max,V=void 0===H?100:H,U=e.min,q=void 0===U?0:U,G=e.name,K=e.onChange,$=e.onChangeCommitted,Z=e.onMouseDown,X=e.orientation,Q=void 0===X?"horizontal":X,Y=e.scale,J=void 0===Y?T:Y,ee=e.step,te=void 0===ee?1:ee,ne=e.ThumbComponent,re=void 0===ne?"span":ne,ie=e.track,oe=void 0===ie?"normal":ie,ae=e.value,se=e.ValueLabelComponent,ce=void 0===se?y:se,ue=e.valueLabelDisplay,le=void 0===ue?"off":ue,fe=e.valueLabelFormat,de=void 0===fe?T:fe,pe=Object(o.a)(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","scale","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),he=Object(l.a)(),ge=s.useRef(),ve=s.useState(-1),me=ve[0],ye=ve[1],be=s.useState(-1),we=be[0],_e=be[1],xe=Object(m.a)({controlled:ae,default:D,name:"Slider"}),Oe=Object(i.a)(xe,2),Se=Oe[0],Ee=Oe[1],Ce=Array.isArray(Se),ke=Ce?Se.slice().sort(b):[Se];ke=ke.map((function(e){return w(e,q,V)}));var Te=!0===W&&null!==te?Object(r.a)(Array(Math.floor((V-q)/te)+1)).map((function(e,t){return{value:q+te*t}})):W||[],je=Object(d.a)(),Pe=je.isFocusVisible,Ie=je.onBlurVisible,Re=je.ref,Ae=s.useState(-1),Me=Ae[0],De=Ae[1],Ne=s.useRef(),Le=Object(g.a)(Re,Ne),ze=Object(g.a)(t,Le),Be=Object(h.a)((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));Pe(e)&&De(t),_e(t)})),Fe=Object(h.a)((function(){-1!==Me&&(De(-1),Ie()),_e(-1)})),We=Object(h.a)((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));_e(t)})),He=Object(h.a)((function(){_e(-1)})),Ve="rtl"===he.direction,Ue=Object(h.a)((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),r=ke[n],i=(V-q)/10,o=Te.map((function(e){return e.value})),a=o.indexOf(r),s=Ve?"ArrowLeft":"ArrowRight",c=Ve?"ArrowRight":"ArrowLeft";switch(e.key){case"Home":t=q;break;case"End":t=V;break;case"PageUp":te&&(t=r+i);break;case"PageDown":te&&(t=r-i);break;case s:case"ArrowUp":t=te?r+te:o[a+1]||o[o.length-1];break;case c:case"ArrowDown":t=te?r-te:o[a-1]||o[0];break;default:return}if(e.preventDefault(),te&&(t=S(t,te,q)),t=w(t,q,V),Ce){var u=t;t=E({values:ke,source:Se,newValue:t,index:n}).sort(b),C({sliderRef:Ne,activeIndex:t.indexOf(u)})}Ee(t),De(n),K&&K(e,t),$&&$(e,t)})),qe=s.useRef(),Ge=Q;Ve&&"vertical"!==Q&&(Ge+="-reverse");var Ke=function(e){var t,n,r=e.finger,i=e.move,o=void 0!==i&&i,a=e.values,s=e.source,c=Ne.current.getBoundingClientRect(),u=c.width,l=c.height,f=c.bottom,d=c.left;if(t=0===Ge.indexOf("vertical")?(f-r.y)/l:(r.x-d)/u,-1!==Ge.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,q,V),te)n=S(n,te,q);else{var p=Te.map((function(e){return e.value}));n=p[_(p,n)]}n=w(n,q,V);var h=0;if(Ce){var g=n;h=(n=E({values:a,source:s,newValue:n,index:h=o?qe.current:_(a,n)}).sort(b)).indexOf(g),qe.current=h}return{newValue:n,activeIndex:h}},$e=Object(h.a)((function(e){var t=x(e,ge);if(t){var n=Ke({finger:t,move:!0,values:ke,source:Se}),r=n.newValue,i=n.activeIndex;C({sliderRef:Ne,activeIndex:i,setActive:ye}),Ee(r),K&&K(e,r)}})),Ze=Object(h.a)((function(e){var t=x(e,ge);if(t){var n=Ke({finger:t,values:ke,source:Se}).newValue;ye(-1),"touchend"===e.type&&_e(-1),$&&$(e,n),ge.current=void 0;var r=Object(p.a)(Ne.current);r.removeEventListener("mousemove",$e),r.removeEventListener("mouseup",Ze),r.removeEventListener("touchmove",$e),r.removeEventListener("touchend",Ze)}})),Xe=Object(h.a)((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(ge.current=t.identifier);var n=x(e,ge),r=Ke({finger:n,values:ke,source:Se}),i=r.newValue,o=r.activeIndex;C({sliderRef:Ne,activeIndex:o,setActive:ye}),Ee(i),K&&K(e,i);var a=Object(p.a)(Ne.current);a.addEventListener("touchmove",$e),a.addEventListener("touchend",Ze)}));s.useEffect((function(){var e=Ne.current;e.addEventListener("touchstart",Xe);var t=Object(p.a)(e);return function(){e.removeEventListener("touchstart",Xe),t.removeEventListener("mousemove",$e),t.removeEventListener("mouseup",Ze),t.removeEventListener("touchmove",$e),t.removeEventListener("touchend",Ze)}}),[Ze,$e,Xe]);var Qe=Object(h.a)((function(e){Z&&Z(e),e.preventDefault();var t=x(e,ge),n=Ke({finger:t,values:ke,source:Se}),r=n.newValue,i=n.activeIndex;C({sliderRef:Ne,activeIndex:i,setActive:ye}),Ee(r),K&&K(e,r);var o=Object(p.a)(Ne.current);o.addEventListener("mousemove",$e),o.addEventListener("mouseup",Ze)})),Ye=O(Ce?ke[0]:q,q,V),Je=O(ke[ke.length-1],q,V)-Ye,et=Object(a.a)({},k[Ge].offset(Ye),k[Ge].leap(Je));return s.createElement(M,Object(a.a)({ref:ze,className:Object(c.a)(j.root,j["color".concat(Object(v.a)(R))],P,L&&j.disabled,Te.length>0&&Te.some((function(e){return e.label}))&&j.marked,!1===oe&&j.trackFalse,"vertical"===Q&&j.vertical,"inverted"===oe&&j.trackInverted),onMouseDown:Qe},pe),s.createElement("span",{className:j.rail}),s.createElement("span",{className:j.track,style:et}),s.createElement("input",{value:ke.join(","),name:G,type:"hidden"}),Te.map((function(e,t){var n,r=O(e.value,q,V),i=k[Ge].offset(r);return n=!1===oe?-1!==ke.indexOf(e.value):"normal"===oe&&(Ce?e.value>=ke[0]&&e.value<=ke[ke.length-1]:e.value<=ke[0])||"inverted"===oe&&(Ce?e.value<=ke[0]||e.value>=ke[ke.length-1]:e.value>=ke[0]),s.createElement(s.Fragment,{key:e.value},s.createElement("span",{style:i,"data-index":t,className:Object(c.a)(j.mark,n&&j.markActive)}),null!=e.label?s.createElement("span",{"aria-hidden":!0,"data-index":t,style:i,className:Object(c.a)(j.markLabel,n&&j.markLabelActive)},e.label):null)})),ke.map((function(e,t){var r=O(e,q,V),i=k[Ge].offset(r);return s.createElement(ce,{key:t,valueLabelFormat:de,valueLabelDisplay:le,className:j.valueLabel,value:"function"==typeof de?de(J(e),t):de,index:t,open:we===t||me===t||"on"===le,disabled:L},s.createElement(re,{className:Object(c.a)(j.thumb,j["thumbColor".concat(Object(v.a)(R))],me===t&&j.active,L&&j.disabled,Me===t&&j.focusVisible),tabIndex:L?null:0,role:"slider",style:i,"data-index":t,"aria-label":z?z(t):n,"aria-labelledby":u,"aria-orientation":Q,"aria-valuemax":J(V),"aria-valuemin":J(q),"aria-valuenow":J(e),"aria-valuetext":B?B(J(e),t):f,onKeyDown:Ue,onFocus:Be,onBlur:Fe,onMouseOver:We,onMouseLeave:He}))})))}));t.a=Object(u.a)((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}},"@media print":{colorAdjust:"exact"}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?Object(f.j)(e.palette.primary.main,.62):Object(f.b)(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Object(f.a)(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(f.a)(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Object(f.a)(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(f.a)(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{left:"calc(-50% - 4px)"},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:Object(a.a)({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(j)},function(e,t,n){"use strict";n.r(t);var r=n(9),i=n(7),o=n(1175),a=n(5),s=n(8),c=n(0),u=n.n(c);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(o,e);var t,n,r,i=p(o);function o(){return l(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.captions,n=e.classes,r=e.audioOptions,i=e.audioResources;return u.a.createElement("div",{className:n.container},u.a.createElement("audio",Object.assign({className:n.audio},r),i.map((function(e){return u.a.createElement(c.Fragment,{key:e.id},u.a.createElement("source",{src:e.id,type:e.getFormat()}))})),t.map((function(e){return u.a.createElement(c.Fragment,{key:e.id},u.a.createElement("track",{src:e.id,label:e.getDefaultLabel(),srcLang:e.getProperty("language")}))}))))}}])&&f(t.prototype,n),r&&f(t,r),o}(c.Component);v.defaultProps={audioOptions:{},audioResources:[],captions:[]};var m=n(88),y=n(45),b=Object(i.compose)(Object(o.a)(),Object(a.a)((function(){return{audio:{width:"100%"},container:{alignItems:"center",display:"flex",width:"100%"}}})),Object(r.b)((function(e,t){var n=t.windowId;return{audioOptions:Object(m.a)(e).audioOptions,audioResources:Object(y.getVisibleCanvasAudioResources)(e,{windowId:n})||[],captions:Object(y.getVisibleCanvasCaptions)(e,{windowId:n})||[]}}),null),Object(s.a)("AudioViewer"));t.default=b(v)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(9),o=n(1175),a=n(5),s=n(555),c=n(8),u=n(38),l=n(0),f=n.n(l),d=n(571),p=n(583),h=n(96),g=n(753),v=n.n(g);function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=x(e);if(t){var i=x(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(o,e);var t,n,r,i=b(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).openCollectionDialog=t.openCollectionDialog.bind(_(t)),t}return t=o,(n=[{key:"openCollectionDialog",value:function(){var e=this.props,t=e.collectionPath,n=e.manifestId,r=e.showCollectionDialog,i=e.windowId;r(n,t.slice(0,-1),i)}},{key:"render",value:function(){var e=this.props.t;return f.a.createElement(p.a,{container:!0,justify:"center",alignItems:"center"},f.a.createElement(p.a,{container:!0,direction:"column",alignItems:"center"},f.a.createElement(h.a,{variant:"h4",paragraph:!0},f.a.createElement("em",null,e("noItemSelected"))),f.a.createElement(d.a,{color:"primary",variant:"contained",onClick:this.openCollectionDialog,startIcon:f.a.createElement(v.a,null)},e("showCollection"))))}}])&&m(t.prototype,n),r&&m(t,r),o}(l.Component);O.defaultProps={collectionPath:[],manifestId:null,t:function(){},windowId:null};var S={showCollectionDialog:s.j},E=Object(r.compose)(Object(o.a)(),Object(a.a)((function(e){return{}})),Object(i.b)((function(e,t){var n=t.windowId,r=Object(u.e)(e,{windowId:n})||{};return{collectionPath:r.collectionPath,manifestId:r.manifestId}}),S),Object(c.a)("SelectCollection"));t.default=E(O)},function(e,t,n){"use strict";n.r(t);var r=n(9),i=n(7),o=n(1175),a=n(5),s=n(8),c=n(0),u=n.n(c);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(o,e);var t,n,r,i=p(o);function o(){return l(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.captions,n=e.classes,r=e.videoOptions,i=e.videoResources;return u.a.createElement("div",{className:n.container},u.a.createElement("video",Object.assign({className:n.video},r),i.map((function(e){return u.a.createElement(c.Fragment,{key:e.id},u.a.createElement("source",{src:e.id,type:e.getFormat()}))})),t.map((function(e){return u.a.createElement(c.Fragment,{key:e.id},u.a.createElement("track",{src:e.id,label:e.getDefaultLabel(),srcLang:e.getProperty("language")}))}))))}}])&&f(t.prototype,n),r&&f(t,r),o}(c.Component);v.defaultProps={captions:[],videoOptions:{},videoResources:[]};var m=n(45),y=n(88),b=Object(i.compose)(Object(o.a)(),Object(a.a)((function(){return{container:{alignItems:"center",display:"flex",width:"100%"},video:{maxHeight:"100%",width:"100%"}}})),Object(r.b)((function(e,t){var n=t.windowId;return{captions:Object(m.getVisibleCanvasCaptions)(e,{windowId:n})||[],videoOptions:Object(y.a)(e).videoOptions,videoResources:Object(m.getVisibleCanvasVideoResources)(e,{windowId:n})||[]}}),null),Object(s.a)("VideoViewer"));t.default=b(v)}]);
//# sourceMappingURL=mirador-integration.js.map