med-viewer-sdk 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/AnnoAnnotator.d.ts +5 -4
- package/dist/core/ColorAdjustPlugin.d.ts +3 -2
- package/dist/core/Engine.d.ts +12 -1
- package/dist/core/Magnification.d.ts +16 -0
- package/dist/core/SelectionPlugin.d.ts +5 -1
- package/dist/core/Toolbar.d.ts +16 -0
- package/dist/med-viewer-sdk.mjs +180 -12
- package/dist/med-viewer-sdk.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var __defProp=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),n);!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("openseadragon")):"function"==typeof define&&define.amd?define(["exports","openseadragon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).MedViewerSDK={},e.OpenSeadragon)}(this,function(e,t){var n,r,o,i,a;function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l,u={exports:{}};
|
|
2
|
-
/*! For license information please see openseadragon-annotorious.min.js.LICENSE.txt */self,l=e=>(()=>{var t={15(e){e.exports=EvalError},98(e,t,n){var r=n(1953);e.exports=function(e){if(null==e)throw new r(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}},157(e){e.exports=Error},223(e,t){t.A=function(e,t){var n=0;return(1==t||3==t||5==t||7==t||9==t||11==t||13==t)&&e>=5&&(n=1),[[["právě teď","právě teď"]],[["před %s vteřinami","za %s vteřiny"],["před %s vteřinami","za %s vteřin"]],[["před minutou","za minutu"]],[["před %s minutami","za %s minuty"],["před %s minutami","za %s minut"]],[["před hodinou","za hodinu"]],[["před %s hodinami","za %s hodiny"],["před %s hodinami","za %s hodin"]],[["včera","zítra"]],[["před %s dny","za %s dny"],["před %s dny","za %s dnů"]],[["minulý týden","příští týden"]],[["před %s týdny","za %s týdny"],["před %s týdny","za %s týdnů"]],[["minulý měsíc","přístí měsíc"]],[["před %s měsíci","za %s měsíce"],["před %s měsíci","za %s měsíců"]],[["před rokem","přístí rok"]],[["před %s lety","za %s roky"],["před %s lety","za %s let"]]][t][n]}},309(e,t){t.A=function(e,t){return[["à l'instant","dans un instant"],["il y a %s secondes","dans %s secondes"],["il y a 1 minute","dans 1 minute"],["il y a %s minutes","dans %s minutes"],["il y a 1 heure","dans 1 heure"],["il y a %s heures","dans %s heures"],["il y a 1 jour","dans 1 jour"],["il y a %s jours","dans %s jours"],["il y a 1 semaine","dans 1 semaine"],["il y a %s semaines","dans %s semaines"],["il y a 1 mois","dans 1 mois"],["il y a %s mois","dans %s mois"],["il y a 1 an","dans 1 an"],["il y a %s ans","dans %s ans"]][t]}},377(e,t,n){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)}var o="undefined"!=typeof Symbol&&Symbol,i=n(4379);e.exports=function(){return"function"==typeof o&&"function"==typeof Symbol&&"symbol"===r(o("foo"))&&"symbol"===r(Symbol("bar"))&&i()}},404(e,t){t.A=function(e,t){return[["just nu","om en stund"],["%s sekunder sedan","om %s sekunder"],["1 minut sedan","om 1 minut"],["%s minuter sedan","om %s minuter"],["1 timme sedan","om 1 timme"],["%s timmar sedan","om %s timmar"],["1 dag sedan","om 1 dag"],["%s dagar sedan","om %s dagar"],["1 vecka sedan","om 1 vecka"],["%s veckor sedan","om %s veckor"],["1 månad sedan","om 1 månad"],["%s månader sedan","om %s månader"],["1 år sedan","om 1 år"],["%s år sedan","om %s år"]][t]}},658(e,t){Object.defineProperty(t,"__esModule",{value:!0}),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."))},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.int=function(e){return parseInt(e,10)},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)}},688(e,t){t.A=function(e,t){return[["μόλις τώρα","σε λίγο"],["%s δευτερόλεπτα πριν","σε %s δευτερόλεπτα"],["1 λεπτό πριν","σε 1 λεπτό"],["%s λεπτά πριν","σε %s λεπτά"],["1 ώρα πριν","σε 1 ώρα"],["%s ώρες πριν","σε %s ώρες"],["1 μέρα πριν","σε 1 μέρα"],["%s μέρες πριν","σε %s μέρες"],["1 εβδομάδα πριν","σε 1 εβδομάδα"],["%s εβδομάδες πριν","σε %s εβδομάδες"],["1 μήνα πριν","σε 1 μήνα"],["%s μήνες πριν","σε %s μήνες"],["1 χρόνο πριν","σε 1 χρόνο"],["%s χρόνια πριν","σε %s χρόνια"]][t]}},830(e,t,n){var r,o=this&&this.__extends||(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])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a=this&&this.__rest||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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var s=n(6512),l=n(5762),u=n(7858),c=n(7405),p="autosize:resized",f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:c(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout(function(){return e.textarea&&u(e.textarea)}):this.textarea&&u(this.textarea),this.textarea&&this.textarea.addEventListener(p,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(p,this.onResize),u.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),l=a(t,["onResize","maxRows","onChange","style","innerRef","children"]),u=this.state.lineHeight,c=n&&u?u*n:null;return s.createElement("textarea",i({},l,{onChange:this.onChange,style:c?i({},r,{maxHeight:c}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&u.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef(function(e,t){return s.createElement(f,i({},e,{innerRef:t}))})},863(e,t,n){var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(5465);e.exports=i.call(r,o)},889(e,t,n){var r=n(8087),o=n(986);e.exports=function(){var e=r();return o(Object,{entries:e},{entries:function(){return Object.entries!==e}}),e}},973(e,t){t.A=function(e,t){return[["justo ahora","en un rato"],["hace %s segundos","en %s segundos"],["hace 1 minuto","en 1 minuto"],["hace %s minutos","en %s minutos"],["hace 1 hora","en 1 hora"],["hace %s horas","en %s horas"],["hace 1 día","en 1 día"],["hace %s días","en %s días"],["hace 1 semana","en 1 semana"],["hace %s semanas","en %s semanas"],["hace 1 mes","en 1 mes"],["hace %s meses","en %s meses"],["hace 1 año","en 1 año"],["hace %s años","en %s años"]][t]}},986(e,t,n){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)}var o=n(4491),i="function"==typeof Symbol&&"symbol"===r(Symbol("foo")),a=Object.prototype.toString,s=Array.prototype.concat,l=n(3423),u=n(6698)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==a.call(o)||!r())return;var o;u?l(e,t,n,!0):l(e,t,n)},p=function(e,t){var n=arguments.length>2?arguments[2]:{},r=o(t);i&&(r=s.call(r,Object.getOwnPropertySymbols(t)));for(var a=0;a<r.length;a+=1)c(e,r[a],t[r[a]],n[r[a]])};p.supportsDescriptors=!!u,e.exports=p},1026(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){}},1226(e){e.exports=SyntaxError},1622(e){e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},1730(e,t,n){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)}var 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},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}}(),a=n(6512),s=u(a),l=u(n(5762));function u(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},p=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],f=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},d=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),h=function(){return d?"_"+Math.random().toString(36).substr(2,12):void 0},m=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"!==r(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||h(),prevId:e.id},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(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,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||h(),prevId:n}:null}}]),i(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(f(e,this.sizer),this.placeHolderSizer&&f(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return d&&e?s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce(function(e,t){return null!=e?e:t}),t=o({},this.props.style);t.display||(t.display="inline-block");var n,r=o({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=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}(this.props,[]);return n=i,p.forEach(function(e){return delete n[e]}),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=r,s.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),s.default.createElement("input",o({},i,{ref:this.inputRef})),s.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?s.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(a.Component);m.propTypes={className:l.default.string,defaultValue:l.default.any,extraWidth:l.default.oneOfType([l.default.number,l.default.string]),id:l.default.string,injectStyles:l.default.bool,inputClassName:l.default.string,inputRef:l.default.func,inputStyle:l.default.object,minWidth:l.default.oneOfType([l.default.number,l.default.string]),onAutosize:l.default.func,onChange:l.default.func,placeholder:l.default.string,placeholderIsMinWidth:l.default.bool,style:l.default.object,value:l.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.A=m},1742(e,t,n){var r=n(986),o=n(8953),i=n(9990),a=n(8087),s=n(889),l=o(a(),Object);r(l,{getPolyfill:a,implementation:i,shim:s}),e.exports=l},1851(e,t,n){var r=n(5465),o=n(7052),i=n(1978);e.exports=function(){return i(r,o,arguments)}},1953(e){e.exports=TypeError},1978(e,t,n){var r=n(5465),o=n(7052),i=n(5118),a=n(2069);e.exports=a||r.call(i,o)},2069(e){e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},2104(e){e.exports=RangeError},2411(e,t){t.A=function(e,t){return[["방금","곧"],["%s초 전","%s초 후"],["1분 전","1분 후"],["%s분 전","%s분 후"],["1시간 전","1시간 후"],["%s시간 전","%s시간 후"],["1일 전","1일 후"],["%s일 전","%s일 후"],["1주일 전","1주일 후"],["%s주일 전","%s주일 후"],["1개월 전","1개월 후"],["%s개월 전","%s개월 후"],["1년 전","1년 후"],["%s년 전","%s년 후"]][t]}},2493(e,t){function n(e){return(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)}var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,A=r?Symbol.for("react.scope"):60119;function S(e){if("object"===n(e)&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case f:case a:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case d:case b:case y:case u:return e;default:return t}}case i:return t}}}function O(e){return S(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=u,t.Element=o,t.ForwardRef=d,t.Fragment=a,t.Lazy=b,t.Memo=y,t.Portal=i,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||S(e)===p},t.isConcurrentMode=O,t.isContextConsumer=function(e){return S(e)===c},t.isContextProvider=function(e){return S(e)===u},t.isElement=function(e){return"object"===n(e)&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return S(e)===d},t.isFragment=function(e){return S(e)===a},t.isLazy=function(e){return S(e)===b},t.isMemo=function(e){return S(e)===y},t.isPortal=function(e){return S(e)===i},t.isProfiler=function(e){return S(e)===l},t.isStrictMode=function(e){return S(e)===s},t.isSuspense=function(e){return S(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===l||e===s||e===h||e===m||"object"===n(e)&&null!==e&&(e.$$typeof===b||e.$$typeof===y||e.$$typeof===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===v||e.$$typeof===w||e.$$typeof===A||e.$$typeof===g)},t.typeOf=S},2495(e){function t(e){return(t="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)}e.exports=function e(n,r){if(n===r)return!0;if(n&&r&&"object"==t(n)&&"object"==t(r)){if(n.constructor!==r.constructor)return!1;var o,i,a;if(Array.isArray(n)){if((o=n.length)!=r.length)return!1;for(i=o;0!==i--;)if(!e(n[i],r[i]))return!1;return!0}if(n.constructor===RegExp)return n.source===r.source&&n.flags===r.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===r.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===r.toString();if((o=(a=Object.keys(n)).length)!==Object.keys(r).length)return!1;for(i=o;0!==i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=o;0!==i--;){var s=a[i];if(!e(n[s],r[s]))return!1}return!0}return n!=n&&r!=r}},2503(e,t,n){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 o(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){i(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 i(e,t,n){return r=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==a(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}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)}Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=d,t.addEvent=function(e,t,n,r){if(e){var i=o({capture:!0},r);e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}},t.addUserSelectStyles=function(e){if(e){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&&d(e.body,"react-draggable-transparent-selection")}},t.createCSSTransform=function(e,t){var n=p(e,t,"px");return i({},(0,l.browserPrefixToKey)("transform",l.default),n)},t.createSVGTransform=function(e,t){return p(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,s.findInArray)(e.targetTouches,function(e){return t===e.identifier})||e.changedTouches&&(0,s.findInArray)(e.changedTouches,function(e){return t===e.identifier})},t.getTouchIdentifier=function(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0},t.getTranslation=p,t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=(0,s.int)(n.paddingTop))-(0,s.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=(0,s.int)(n.paddingLeft))-(0,s.int)(n.paddingRight)},t.matchesSelector=c,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(c(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t+=(0,s.int)(n.borderTopWidth))+(0,s.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t+=(0,s.int)(n.borderLeftWidth))+(0,s.int)(n.borderRightWidth)},t.removeClassName=h,t.removeEvent=function(e,t,n,r){if(e){var i=o({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}},t.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame(function(){f(e)}):f(e)};var s=n(658),l=function(e){if("function"==typeof WeakMap)var t=new WeakMap;return function(e){if(e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=a(e)&&"function"!=typeof e)return o;if(n=t){if(n.has(e))return n.get(e);n.set(e,o)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?n(o,i,r):o[i]=e[i]);return o}(e)}(n(5080)),u="";function c(e,t){return u||(u=(0,s.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,s.isFunction)(e[t])})),!!(0,s.isFunction)(e[u])&&e[u](t)}function p(e,t,n){var r=e.x,o=e.y,i="translate(".concat(r).concat(n,",").concat(o).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);i="translate(".concat(a,", ").concat(s,")")+i}return i}function f(e){if(e)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(n){}}function d(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"),"")}},2703(e){var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e){for(var t=[],n=1,r=0;n<e.length;n+=1,r+=1)t[r]=e[n];return t}(arguments),s=n(0,o.length-a.length),l=[],u=0;u<s;u++)l[u]="$"+u;if(i=Function("binder","return function ("+function(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=",");return t}(l)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(e,r(a,arguments))}),o.prototype){var c=function(){};c.prototype=o.prototype,i.prototype=new c,c.prototype=null}return i}},2948(e,t,n){var r=n(8643);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,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,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},3190(e,t,n){var r=n(8299),o=n(9472),i=o([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o([n]):n}},3423(e,t,n){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)}var o=n(5049),i=n(1226),a=n(1953),s=n(3581);e.exports=function(e,t,n){if(!e||"object"!==r(e)&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!==r(t))throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,p=arguments.length>6&&arguments[6],f=!!s&&s(e,t);if(o)o(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===l&&f?f.enumerable:!l,value:n,writable:null===u&&f?f.writable:!u});else{if(!p&&(l||u||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},3424(e,t,n){var r=n(8813),o=r.default,i=r.DraggableCore;e.exports=o,e.exports.default=o,e.exports.DraggableCore=i},3581(e,t,n){var r=n(5759);if(r)try{r([],"length")}catch(o){r=null}e.exports=r},3847(e,t){t.A=function(e,t){return[["az önce","şimdi"],["%s saniye önce","%s saniye içinde"],["1 dakika önce","1 dakika içinde"],["%s dakika önce","%s dakika içinde"],["1 saat önce","1 saat içinde"],["%s saat önce","%s saat içinde"],["1 gün önce","1 gün içinde"],["%s gün önce","%s gün içinde"],["1 hafta önce","1 hafta içinde"],["%s hafta önce","%s hafta içinde"],["1 ay önce","1 ay içinde"],["%s ay önce","%s ay içinde"],["1 yıl önce","1 yıl içinde"],["%s yıl önce","%s yıl içinde"]][t]}},3940(e,t){t.A=function(e,t){return[["poco fa","fra poco"],["%s secondi fa","fra %s secondi"],["un minuto fa","fra un minuto"],["%s minuti fa","fra %s minuti"],["un'ora fa","fra un'ora"],["%s ore fa","fra %s ore"],["un giorno fa","fra un giorno"],["%s giorni fa","fra %s giorni"],["una settimana fa","fra una settimana"],["%s settimane fa","fra %s settimane"],["un mese fa","fra un mese"],["%s mesi fa","fra %s mesi"],["un anno fa","fra un anno"],["%s anni fa","fra %s anni"]][t]}},4038(e,t){t.A=function(e,t){return[["gerade eben","vor einer Weile"],["vor %s Sekunden","in %s Sekunden"],["vor 1 Minute","in 1 Minute"],["vor %s Minuten","in %s Minuten"],["vor 1 Stunde","in 1 Stunde"],["vor %s Stunden","in %s Stunden"],["vor 1 Tag","in 1 Tag"],["vor %s Tagen","in %s Tagen"],["vor 1 Woche","in 1 Woche"],["vor %s Wochen","in %s Wochen"],["vor 1 Monat","in 1 Monat"],["vor %s Monaten","in %s Monaten"],["vor 1 Jahr","in 1 Jahr"],["vor %s Jahren","in %s Jahren"]][t]}},4218(e){e.exports=Math.floor},4379(e){function t(e){return(t="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)}e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===t(Symbol.iterator))return!0;var e={},n=Symbol("test"),r=Object(n);if("string"==typeof n)return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var o in e[n]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==n)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,n);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},4491(e,t,n){var r=Array.prototype.slice,o=n(9267),i=Object.keys,a=i?function(e){return i(e)}:n(4717),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?s(r.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},4688(e,t){t.A=function(e,t){return[["すこし前","すぐに"],["%s秒前","%s秒以内"],["1分前","1分以内"],["%s分前","%s分以内"],["1時間前","1時間以内"],["%s時間前","%s時間以内"],["1日前","1日以内"],["%s日前","%s日以内"],["1週間前","1週間以内"],["%s週間前","%s週間以内"],["1ヶ月前","1ヶ月以内"],["%sヶ月前","%sヶ月以内"],["1年前","1年以内"],["%s年前","%s年以内"]][t]}},4717(e,t,n){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)}var o;if(!Object.keys){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=n(9267),l=Object.prototype.propertyIsEnumerable,u=!l.call({toString:null},"toString"),c=l.call(function(){},"prototype"),p=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"===r(window[e]))try{f(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();o=function(e){var t=null!==e&&"object"===r(e),n="[object Function]"===a.call(e),o=s(e),l=t&&"[object String]"===a.call(e),d=[];if(!t&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var m=c&&n;if(l&&e.length>0&&!i.call(e,0))for(var y=0;y<e.length;++y)d.push(String(y));if(o&&e.length>0)for(var b=0;b<e.length;++b)d.push(String(b));else for(var g in e)m&&"prototype"===g||!i.call(e,g)||d.push(String(g));if(u)for(var v=function(e){if("undefined"==typeof window||!h)return f(e);try{return f(e)}catch(t){return!1}}(e),w=0;w<p.length;++w)v&&"constructor"===p[w]||!i.call(e,p[w])||d.push(p[w]);return d}}e.exports=o},4940(e){e.exports=Math.abs},5049(e){var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(n){t=!1}e.exports=t},5080(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.browserPrefixToKey=o,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0,t.getPrefix=r;var n=["Moz","Webkit","O","ms"];function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";var r=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!r)return"";if(t in r)return"";for(var i=0;i<n.length;i++)if(o(t,n[i])in r)return n[i];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}t.default=r()},5086(e,t,n){function r(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.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)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function a(e,t,n){return t=l(t),function(e,t){if(t&&("object"==c(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)}(e,s()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!e})()}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c="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.default=void 0;var p=function(e){if("function"==typeof WeakMap)var t=new WeakMap;return function(e){if(e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=c(e)&&"function"!=typeof e)return o;if(n=t){if(n.has(e))return n.get(e);n.set(e,o)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?n(o,i,r):o[i]=e[i]);return o}(e)}(n(6512)),f=g(n(5762)),d=g(n(6512)),h=n(2503),m=n(6500),y=n(658),b=g(n(1026));function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return r=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==c(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var w={start:"touchstart",move:"touchmove",stop:"touchend"},A={start:"mousedown",move:"mousemove",stop:"mouseup"},S=A,O=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),v(e=a(this,t,arguments),"dragging",!1),v(e,"lastX",NaN),v(e,"lastY",NaN),v(e,"touchIdentifier",null),v(e,"mounted",!1),v(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,h.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,h.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"!==t.type||e.props.allowMobileScroll||t.preventDefault();var o=(0,h.getTouchIdentifier)(t);e.touchIdentifier=o;var i=(0,m.getControlPosition)(t,o,e);if(null!=i){var a=i.x,s=i.y,l=(0,m.createCoreData)(e,a,s);(0,b.default)("DraggableCore: handleDragStart: %j",l),(0,b.default)("calling",e.props.onStart),!1!==e.props.onStart(t,l)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,h.addUserSelectStyles)(r),e.dragging=!0,e.lastX=a,e.lastY=s,(0,h.addEvent)(r,S.move,e.handleDrag),(0,h.addEvent)(r,S.stop,e.handleDragStop))}}}),v(e,"handleDrag",function(t){var n=(0,m.getControlPosition)(t,e.touchIdentifier,e);if(null!=n){var o=n.x,i=n.y;if(Array.isArray(e.props.grid)){var a=o-e.lastX,s=i-e.lastY,l=r((0,m.snapToGrid)(e.props.grid,a,s),2);if(a=l[0],s=l[1],!a&&!s)return;o=e.lastX+a,i=e.lastY+s}var u=(0,m.createCoreData)(e,o,i);if((0,b.default)("DraggableCore: handleDrag: %j",u),!1!==e.props.onDrag(t,u)&&!1!==e.mounted)e.lastX=o,e.lastY=i;else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(p){var c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(c)}}}),v(e,"handleDragStop",function(t){if(e.dragging){var n=(0,m.getControlPosition)(t,e.touchIdentifier,e);if(null!=n){var o=n.x,i=n.y;if(Array.isArray(e.props.grid)){var a=o-e.lastX||0,s=i-e.lastY||0,l=r((0,m.snapToGrid)(e.props.grid,a,s),2);a=l[0],s=l[1],o=e.lastX+a,i=e.lastY+s}var u=(0,m.createCoreData)(e,o,i);if(!1===e.props.onStop(t,u)||!1===e.mounted)return!1;var c=e.findDOMNode();c&&e.props.enableUserSelectHack&&(0,h.scheduleRemoveUserSelectStyles)(c.ownerDocument),(0,b.default)("DraggableCore: handleDragStop: %j",u),e.dragging=!1,e.lastX=NaN,e.lastY=NaN,c&&((0,b.default)("DraggableCore: Removing handlers"),(0,h.removeEvent)(c.ownerDocument,S.move,e.handleDrag),(0,h.removeEvent)(c.ownerDocument,S.stop,e.handleDragStop))}}}),v(e,"onMouseDown",function(t){return S=A,e.handleDragStart(t)}),v(e,"onMouseUp",function(t){return S=A,e.handleDragStop(t)}),v(e,"onTouchStart",function(t){return S=w,e.handleDragStart(t)}),v(e,"onTouchEnd",function(t){return S=w,e.handleDragStop(t)}),e}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),n=t,(o=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,h.addEvent)(e,w.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,h.removeEvent)(t,A.move,this.handleDrag),(0,h.removeEvent)(t,w.move,this.handleDrag),(0,h.removeEvent)(t,A.stop,this.handleDragStop),(0,h.removeEvent)(t,w.stop,this.handleDragStop),(0,h.removeEvent)(e,w.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,h.scheduleRemoveUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:d.default.findDOMNode(this)}},{key:"render",value:function(){return p.cloneElement(p.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&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,i(r.key),r)}}(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(p.Component);t.default=O,v(O,"displayName","DraggableCore"),v(O,"propTypes",{allowAnyClick:f.default.bool,allowMobileScroll:f.default.bool,children:f.default.node.isRequired,disabled:f.default.bool,enableUserSelectHack:f.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:f.default.arrayOf(f.default.number),handle:f.default.string,cancel:f.default.string,nodeRef:f.default.object,onStart:f.default.func,onDrag:f.default.func,onStop:f.default.func,onMouseDown:f.default.func,scale:f.default.number,className:y.dontSetMe,style:y.dontSetMe,transform:y.dontSetMe}),v(O,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},5118(e){e.exports=Function.prototype.call},5197(e){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]}},5409(e,t,n){e.exports=n(2493)},5416(e,t,n){var r=n(5409),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={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 l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=d(n);o&&o!==h&&e(t,o,r)}var a=c(n);p&&(a=a.concat(p(n)));for(var s=l(t),m=l(n),y=0;y<a.length;++y){var b=a[y];if(!(i[b]||r&&r[b]||m&&m[b]||s&&s[b])){var g=f(n,b);try{u(t,b,g)}catch(v){}}}}return t}},5419(e,t){t.A=function(e,t){return[["剛剛","片刻後"],["%s 秒前","%s 秒後"],["1 分鐘前","1 分鐘後"],["%s 分鐘前","%s 分鐘後"],["1 小時前","1 小時後"],["%s 小時前","%s 小時後"],["1 天前","1 天後"],["%s 天前","%s 天後"],["1 週前","1 週後"],["%s 週前","%s 週後"],["1 個月前","1 個月後"],["%s 個月前","%s 個月後"],["1 年前","1 年後"],["%s 年前","%s 年後"]][t]}},5465(e,t,n){var r=n(2703);e.exports=Function.prototype.bind||r},5586(e,t,n){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)}var o=n(1622),i=n(9302),a=n(8950);e.exports=o?function(e){return o(e)}:i?function(e){if(!e||"object"!==r(e)&&"function"!=typeof e)throw new TypeError("getProto: not an object");return i(e)}:a?function(e){return a(e)}:null},5617(e,t){t.A=function(e,t){return[["เมื่อสักครู่นี้","อีกสักครู่"],["%s วินาทีที่แล้ว","ใน %s วินาที"],["1 นาทีที่แล้ว","ใน 1 นาที"],["%s นาทีที่แล้ว","ใน %s นาที"],["1 ชั่วโมงที่แล้ว","ใน 1 ชั่วโมง"],["%s ชั่วโมงที่แล้ว","ใน %s ชั่วโมง"],["1 วันที่แล้ว","ใน 1 วัน"],["%s วันที่แล้ว","ใน %s วัน"],["1 อาทิตย์ที่แล้ว","ใน 1 อาทิตย์"],["%s อาทิตย์ที่แล้ว","ใน %s อาทิตย์"],["1 เดือนที่แล้ว","ใน 1 เดือน"],["%s เดือนที่แล้ว","ใน %s เดือน"],["1 ปีที่แล้ว","ใน 1 ปี"],["%s ปีที่แล้ว","ใน %s ปี"]][t]}},5690(e,t){var n=[["ثانية","ثانيتين","%s ثوان","%s ثانية"],["دقيقة","دقيقتين","%s دقائق","%s دقيقة"],["ساعة","ساعتين","%s ساعات","%s ساعة"],["يوم","يومين","%s أيام","%s يوماً"],["أسبوع","أسبوعين","%s أسابيع","%s أسبوعاً"],["شهر","شهرين","%s أشهر","%s شهراً"],["عام","عامين","%s أعوام","%s عاماً"]];t.A=function(e,t){if(0===t)return["منذ لحظات","بعد لحظات"];var r,o,i=(r=Math.floor(t/2),(o=e)<3?n[r][o-1]:o>=3&&o<=10?n[r][2]:n[r][3]);return["منذ "+i,"بعد "+i]}},5759(e){e.exports=Object.getOwnPropertyDescriptor},5762(e,t,n){e.exports=n(2948)()},5773(e){e.exports=function(){}},5810(e,t){t.A=function(e,t){return[["अभी","कुछ समय"],["%s सेकंड पहले","%s सेकंड में"],["1 मिनट पहले","1 मिनट में"],["%s मिनट पहले","%s मिनट में"],["1 घंटे पहले","1 घंटे में"],["%s घंटे पहले","%s घंटे में"],["1 दिन पहले","1 दिन में"],["%s दिन पहले","%s दिनों में"],["1 सप्ताह पहले","1 सप्ताह में"],["%s हफ्ते पहले","%s हफ्तों में"],["1 महीने पहले","1 महीने में"],["%s महीने पहले","%s महीनों में"],["1 साल पहले","1 साल में"],["%s साल पहले","%s साल में"]][t]}},5887(e,t,n){var r=n(8299),o=n(3423),i=n(6698)(),a=n(3581),s=n(1953),l=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,u=!0;if("length"in e&&a){var c=a(e,"length");c&&!c.configurable&&(r=!1),c&&!c.writable&&(u=!1)}return(r||u||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},6076(e){e.exports=ReferenceError},6114(e){e.exports=Math.pow},6436(e,t){t.A=function(e,t){return[["juuri äsken","juuri nyt"],["%s sekuntia sitten","%s sekunnin päästä"],["minuutti sitten","minuutin päästä"],["%s minuuttia sitten","%s minuutin päästä"],["tunti sitten","tunnin päästä"],["%s tuntia sitten","%s tunnin päästä"],["päivä sitten","päivän päästä"],["%s päivää sitten","%s päivän päästä"],["viikko sitten","viikon päästä"],["%s viikkoa sitten","%s viikon päästä"],["kuukausi sitten","kuukauden päästä"],["%s kuukautta sitten","%s kuukauden päästä"],["vuosi sitten","vuoden päästä"],["%s vuotta sitten","%s vuoden päästä"]][t]}},6500(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),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.createCoreData=function(e,t,n){var o=!(0,r.isNum)(e.lastX),a=i(e);return o?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:a,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.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}},t.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var a,s=e.props.bounds;s="string"==typeof s?s:{left:(a=s).left,top:a.top,right:a.right,bottom:a.bottom};var l=i(e);if("string"==typeof s){var u,c=l.ownerDocument.defaultView;if(!((u="parent"===s?l.parentNode:l.getRootNode().querySelector(s))instanceof c.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');var p=u,f=c.getComputedStyle(l),d=c.getComputedStyle(p);s={left:-l.offsetLeft+(0,r.int)(d.paddingLeft)+(0,r.int)(f.marginLeft),top:-l.offsetTop+(0,r.int)(d.paddingTop)+(0,r.int)(f.marginTop),right:(0,o.innerWidth)(p)-(0,o.outerWidth)(l)-l.offsetLeft+(0,r.int)(d.paddingRight)-(0,r.int)(f.marginRight),bottom:(0,o.innerHeight)(p)-(0,o.outerHeight)(l)-l.offsetTop+(0,r.int)(d.paddingBottom)-(0,r.int)(f.marginBottom)}}return(0,r.isNum)(s.right)&&(t=Math.min(t,s.right)),(0,r.isNum)(s.bottom)&&(n=Math.min(n,s.bottom)),(0,r.isNum)(s.left)&&(t=Math.max(t,s.left)),(0,r.isNum)(s.top)&&(n=Math.max(n,s.top)),[t,n]},t.getControlPosition=function(e,t,n){var r="number"==typeof t?(0,o.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;var a=i(n),s=n.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,o.offsetXYFromParent)(r||e,s,n.props.scale)},t.snapToGrid=function(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]};var r=n(658),o=n(2503);function i(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}},6512(e,t,n){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.r(t),n.d(t,{Children:()=>ze,Component:()=>C,Fragment:()=>x,PureComponent:()=>Le,StrictMode:()=>It,Suspense:()=>We,SuspenseList:()=>Ke,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>vt,cloneElement:()=>xt,createContext:()=>W,createElement:()=>S,createFactory:()=>At,createPortal:()=>tt,createRef:()=>E,default:()=>Tt,findDOMNode:()=>Mt,flushSync:()=>Pt,forwardRef:()=>Fe,hydrate:()=>ut,isElement:()=>kt,isFragment:()=>Ot,isMemo:()=>Et,isValidElement:()=>St,lazy:()=>Xe,memo:()=>_e,render:()=>lt,startTransition:()=>De,unmountComponentAtNode:()=>Ct,unstable_batchedUpdates:()=>jt,useCallback:()=>ye,useContext:()=>be,useDebugValue:()=>ge,useDeferredValue:()=>Re,useEffect:()=>pe,useErrorBoundary:()=>ve,useId:()=>we,useImperativeHandle:()=>he,useInsertionEffect:()=>Be,useLayoutEffect:()=>fe,useMemo:()=>me,useReducer:()=>ce,useRef:()=>de,useState:()=>ue,useSyncExternalStore:()=>ke,useTransition:()=>Ne,version:()=>wt});var o,i,a,s,l,u,c,p,f,d,h,m,y={},b=[],g=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function A(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function S(e,t,n){var r,i,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?i=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return O(e,s,r,i,null)}function O(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++a:o,__i:-1,__u:0};return null==o&&null!=i.vnode&&i.vnode(s),s}function E(){return{current:null}}function x(e){return e.children}function C(e,t){this.props=e,this.context=t}function M(e,t){if(null==t)return e.__?M(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?M(e):null}function j(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return j(e)}}function P(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!I.__r++||l!=i.debounceRendering)&&((l=i.debounceRendering)||u)(I)}function I(){for(var e,t,n,r,o,a,l,u=1;s.length;)s.length>u&&s.sort(c),e=s.shift(),u=s.length,e.__d&&(n=void 0,r=void 0,o=(r=(t=e).__v).__e,a=[],l=[],t.__P&&((n=w({},r)).__v=r.__v+1,i.vnode&&i.vnode(n),_(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,null==o?M(r):o,!!(32&r.__u),l),n.__v=r.__v,n.__.__k[n.__i]=n,H(a,n,l),r.__e=r.__=null,n.__e!=o&&j(n)));I.__r=0}function k(e,t,n,r,o,i,a,s,l,u,c){var p,f,d,h,m,g,w,A=r&&r.__k||b,S=t.length;for(l=function(e,t,n,r,o){var i,a,s,l,u,c=n.length,p=c,f=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[i]=O(null,a,null,null,null):v(a)?a=e.__k[i]=O(x,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[i]=O(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,l=i+f,a.__=e,a.__b=e.__b+1,s=null,-1!=(u=a.__i=R(a,n,l,p))&&(p--,(s=n[u])&&(s.__u|=2)),null==s||null==s.__v?(-1==u&&(o>c?f--:o<c&&f++),"function"!=typeof a.type&&(a.__u|=4)):u!=l&&(u==l-1?f--:u==l+1?f++:(u>l?f--:f++,a.__u|=4))):e.__k[i]=null;if(p)for(i=0;i<c;i++)null!=(s=n[i])&&!(2&s.__u)&&(s.__e==r&&(r=M(s)),z(s,s));return r}(n,t,A,l,S),p=0;p<S;p++)null!=(d=n.__k[p])&&(f=-1==d.__i?y:A[d.__i]||y,d.__i=p,g=_(e,d,f,o,i,a,s,l,u,c),h=d.__e,d.ref&&f.ref!=d.ref&&(f.ref&&U(f.ref,null,d),c.push(d.ref,d.__c||h,d)),null==m&&null!=h&&(m=h),(w=!!(4&d.__u))||f.__k===d.__k?l=T(d,l,e,w):"function"==typeof d.type&&void 0!==g?l=g:h&&(l=h.nextSibling),d.__u&=-7);return n.__e=m,l}function T(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=T(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=M(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function D(e,t){return t=t||[],null==e||"boolean"==typeof e||(v(e)?e.some(function(e){D(e,t)}):t.push(e)),t}function R(e,t,n,r){var o,i,a,s=e.key,l=e.type,u=t[n],c=null!=u&&!(2&u.__u);if(null===u&&null==s||c&&s==u.key&&l==u.type)return n;if(r>(c?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(u=t[a=o>=0?o--:i++])&&!(2&u.__u)&&s==u.key&&l==u.type)return a;return-1}function N(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||g.test(t)?n:n+"px"}function B(e,t,n,r,o){var i,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||N(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||N(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(p,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=f,e.addEventListener(t,i?h:d,i)):e.removeEventListener(t,i?h:d,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function L(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=f++;else if(t.t<n.u)return;return n(i.event?i.event(t):t)}}}function _(e,t,n,r,a,s,l,u,c,p){var f,d,h,m,b,g,S,O,E,j,P,I,T,D,R,N,L,_=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),s=[u=t.__e=n.__e]),(f=i.__b)&&f(t);e:if("function"==typeof _)try{if(O=t.props,E="prototype"in _&&_.prototype.render,j=(f=_.contextType)&&r[f.__c],P=f?j?j.props.value:f.__:r,n.__c?S=(d=t.__c=n.__c).__=d.__E:(E?t.__c=d=new _(O,P):(t.__c=d=new C(O,P),d.constructor=_,d.render=Y),j&&j.sub(d),d.state||(d.state={}),d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),E&&null==d.__s&&(d.__s=d.state),E&&null!=_.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=w({},d.__s)),w(d.__s,_.getDerivedStateFromProps(O,d.__s))),m=d.props,b=d.state,d.__v=t,h)E&&null==_.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),E&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(E&&null==_.getDerivedStateFromProps&&O!==m&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(O,P),t.__v==n.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(O,d.__s,P)){for(t.__v!=n.__v&&(d.props=O,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[],d.__h.length&&l.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(O,d.__s,P),E&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(m,b,g)})}if(d.context=P,d.props=O,d.__P=e,d.__e=!1,T=i.__r,D=0,E){for(d.state=d.__s,d.__d=!1,T&&T(t),f=d.render(d.props,d.state,d.context),R=0;R<d._sb.length;R++)d.__h.push(d._sb[R]);d._sb=[]}else do{d.__d=!1,T&&T(t),f=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++D<25);d.state=d.__s,null!=d.getChildContext&&(r=w(w({},r),d.getChildContext())),E&&!h&&null!=d.getSnapshotBeforeUpdate&&(g=d.getSnapshotBeforeUpdate(m,b)),N=f,null!=f&&f.type===x&&null==f.key&&(N=F(f.props.children)),u=k(e,v(N)?N:[N],t,n,r,a,s,l,u,c,p),d.base=t.__e,t.__u&=-161,d.__h.length&&l.push(d),S&&(d.__E=d.__=null)}catch(H){if(t.__v=null,c||null!=s)if(H.then){for(t.__u|=c?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;s[s.indexOf(u)]=null,t.__e=u}else{for(L=s.length;L--;)A(s[L]);G(t)}else t.__e=n.__e,t.__k=n.__k,H.then||G(t);i.__e(H,t,n)}else null==s&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):u=t.__e=function(e,t,n,r,a,s,l,u,c){var p,f,d,h,m,b,g,w=n.props||y,S=t.props,O=t.type;if("svg"==O?a="http://www.w3.org/2000/svg":"math"==O?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=s)for(p=0;p<s.length;p++)if((m=s[p])&&"setAttribute"in m==!!O&&(O?m.localName==O:3==m.nodeType)){e=m,s[p]=null;break}if(null==e){if(null==O)return document.createTextNode(S);e=document.createElementNS(a,O,S.is&&S),u&&(i.__m&&i.__m(t,s),u=!1),s=null}if(null==O)w===S||u&&e.data==S||(e.data=S);else{if(s=s&&o.call(e.childNodes),!u&&null!=s)for(w={},p=0;p<e.attributes.length;p++)w[(m=e.attributes[p]).name]=m.value;for(p in w)if(m=w[p],"children"==p);else if("dangerouslySetInnerHTML"==p)d=m;else if(!(p in S)){if("value"==p&&"defaultValue"in S||"checked"==p&&"defaultChecked"in S)continue;B(e,p,null,m,a)}for(p in S)m=S[p],"children"==p?h=m:"dangerouslySetInnerHTML"==p?f=m:"value"==p?b=m:"checked"==p?g=m:u&&"function"!=typeof m||w[p]===m||B(e,p,m,w[p],a);if(f)u||d&&(f.__html==d.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(d&&(e.innerHTML=""),k("template"==t.type?e.content:e,v(h)?h:[h],t,n,r,"foreignObject"==O?"http://www.w3.org/1999/xhtml":a,s,l,s?s[0]:n.__k&&M(n,0),u,c),null!=s)for(p=s.length;p--;)A(s[p]);u||(p="value","progress"==O&&null==b?e.removeAttribute("value"):null!=b&&(b!==e[p]||"progress"==O&&!b||"option"==O&&b!=w[p])&&B(e,p,b,w[p],a),p="checked",null!=g&&g!=e[p]&&B(e,p,g,w[p],a))}return e}(n.__e,t,n,r,a,s,l,c,p);return(f=i.diffed)&&f(t),128&t.__u?void 0:u}function G(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(G)}function H(e,t,n){for(var r=0;r<n.length;r++)U(n[r],n[++r],n[++r]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(n){i.__e(n,t.__v)}})}function F(e){return"object"!=r(e)||null==e||e.__b&&e.__b>0?e:v(e)?e.map(F):w({},e)}function U(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(o){i.__e(o,n)}}function z(e,t,n){var r,o;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||U(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){i.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&z(r[o],t,n||"function"!=typeof e.type);n||A(e.__e),e.__c=e.__=e.__e=void 0}function Y(e,t,n){return this.constructor(e,n)}function V(e,t,n){var r,a,s,l;t==document&&(t=document.documentElement),i.__&&i.__(e,t),a=(r="function"==typeof n)?null:n&&n.__k||t.__k,s=[],l=[],_(t,e=(!r&&n||t).__k=S(x,null,[e]),a||y,y,t.namespaceURI,!r&&n?[n]:a?null:t.firstChild?o.call(t.childNodes):null,s,!r&&n?n:a?a.__e:t.firstChild,r,l),H(s,e,l)}function Q(e,t){V(e,t,Q)}function J(e,t,n){var r,i,a,s,l=w({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==a?r=t[a]:"ref"==a?i=t[a]:l[a]=void 0===t[a]&&null!=s?s[a]:t[a];return arguments.length>2&&(l.children=arguments.length>3?o.call(arguments,2):n),O(e.type,l,r||e.key,i||e.ref,null)}function W(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,P(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+m++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}o=b.slice,i={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},a=0,C.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},C.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},C.prototype.render=x,s=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},I.__r=0,p=/(PointerCapture)$|Capture$/i,f=0,d=L(!1),h=L(!0),m=0;var Z,X,K,q,$=0,ee=[],te=i,ne=te.__b,re=te.__r,oe=te.diffed,ie=te.__c,ae=te.unmount,se=te.__;function le(e,t){te.__h&&te.__h(X,e,$||t),$=0;var n=X.__H||(X.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ue(e){return $=1,ce(Me,e)}function ce(e,t,n){var r=le(Z++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Me(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=X,!X.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(e){return!!e.__c});if(o.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var a=r.__c.props!==e;return o.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),i&&i.call(this,e,t,n)||a};X.__f=!0;var i=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},X.shouldComponentUpdate=o}return r.__N||r.__}function pe(e,t){var n=le(Z++,3);!te.__s&&Ce(n.__H,t)&&(n.__=e,n.u=t,X.__H.__h.push(n))}function fe(e,t){var n=le(Z++,4);!te.__s&&Ce(n.__H,t)&&(n.__=e,n.u=t,X.__h.push(n))}function de(e){return $=5,me(function(){return{current:e}},[])}function he(e,t,n){$=6,fe(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function me(e,t){var n=le(Z++,7);return Ce(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ye(e,t){return $=8,me(function(){return e},t)}function be(e){var t=X.context[e.__c],n=le(Z++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(X)),t.props.value):e.__}function ge(e,t){te.useDebugValue&&te.useDebugValue(t?t(e):e)}function ve(e){var t=le(Z++,10),n=ue();return t.__=e,X.componentDidCatch||(X.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function we(){var e=le(Z++,11);if(!e.__){for(var t=X.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ae(){for(var e;e=ee.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ee),e.__H.__h.forEach(xe),e.__H.__h=[]}catch(t){e.__H.__h=[],te.__e(t,e.__v)}}te.__b=function(e){X=null,ne&&ne(e)},te.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),se&&se(e,t)},te.__r=function(e){re&&re(e),Z=0;var t=(X=e.__c).__H;t&&(K===X?(t.__h=[],X.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Ee),t.__h.forEach(xe),t.__h=[],Z=0)),K=X},te.diffed=function(e){oe&&oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ee.push(t)&&q===te.requestAnimationFrame||((q=te.requestAnimationFrame)||Oe)(Ae)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),K=X=null},te.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Ee),e.__h=e.__h.filter(function(e){return!e.__||xe(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],te.__e(n,e.__v)}}),ie&&ie(e,t)},te.unmount=function(e){ae&&ae(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Ee(e)}catch(n){t=n}}),n.__H=void 0,t&&te.__e(t,n.__v))};var Se="function"==typeof requestAnimationFrame;function Oe(e){var t,n=function(){clearTimeout(r),Se&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Se&&(t=requestAnimationFrame(n))}function Ee(e){var t=X,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),X=t}function xe(e){var t=X;e.__c=e.__(),X=t}function Ce(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Me(e,t){return"function"==typeof t?t(e):t}function je(e){return(je="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 Pe(e,t){for(var n in t)e[n]=t[n];return e}function Ie(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function ke(e,t){var n=t(),r=ue({t:{__:n,u:t}}),o=r[0].t,i=r[1];return fe(function(){o.__=n,o.u=t,Te(o)&&i({t:o})},[e,n,t]),pe(function(){return Te(o)&&i({t:o}),e(function(){Te(o)&&i({t:o})})},[e]),n}function Te(e){var t,n,r=e.u,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(a){return!0}}function De(e){e()}function Re(e){return e}function Ne(){return[!1,De]}var Be=fe;function Le(e,t){this.props=e,this.context=t}function _e(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Ie(this.props,e)}function r(t){return this.shouldComponentUpdate=n,S(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Le.prototype=new C).isPureReactComponent=!0,Le.prototype.shouldComponentUpdate=function(e,t){return Ie(this.props,e)||Ie(this.state,t)};var Ge=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ge&&Ge(e)};var He="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fe(e){function t(t){var n=Pe({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=He,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ue=function(e,t){return null==e?null:D(D(e).map(t))},ze={map:Ue,forEach:Ue,count:function(e){return e?D(e).length:0},only:function(e){var t=D(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:D},Ye=i.__e;i.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Ye(e,t,n,r)};var Ve=i.unmount;function Qe(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Pe({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Qe(e,t,n)})),e}function Je(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Je(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function We(){this.__u=0,this.o=null,this.__b=null}function Ze(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Xe(e){var t,n,r,o=null;function i(i){if(t||(t=e()).then(function(e){e&&(o=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return o?S(o,i):null}return i.displayName="Lazy",i.__f=!0,i}function Ke(){this.i=null,this.l=null}i.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ve&&Ve(e)},(We.prototype=new C).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=Ze(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Je(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},We.prototype.componentWillUnmount=function(){this.o=[]},We.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Qe(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&S(x,null,e.fallback);return o&&(o.__u&=-33),[S(x,null,t.__a?null:e.children),o]};var qe=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function $e(e){return this.getChildContext=function(){return e.context},e.children}function et(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){V(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}V(S($e,{context:t.context},e.__v),t.v)}function tt(e,t){var n=S(et,{__v:e,h:t});return n.containerInfo=t,n}(Ke.prototype=new C).__a=function(e){var t=this,n=Ze(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),qe(t,e,r)):o()};n?n(i):i()}},Ke.prototype.render=function(e){this.i=null,this.l=new Map;var t=D(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ke.prototype.componentDidUpdate=Ke.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){qe(e,n,t)})};var nt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,rt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ot=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,it=/[A-Z0-9]/g,at="undefined"!=typeof document,st=function(e){return("undefined"!=typeof Symbol&&"symbol"==je(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};function lt(e,t,n){return null==t.__k&&(t.textContent=""),V(e,t),"function"==typeof n&&n(),e?e.__c:null}function ut(e,t,n){return Q(e,t),"function"==typeof n&&n(),e?e.__c:null}C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(C.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ct=i.event;function pt(){}function ft(){return this.cancelBubble}function dt(){return this.defaultPrevented}i.event=function(e){return ct&&(e=ct(e)),e.persist=pt,e.isPropagationStopped=ft,e.isDefaultPrevented=dt,e.nativeEvent=e};var ht,mt={enumerable:!1,configurable:!0,get:function(){return this.class}},yt=i.vnode;i.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var a=t[i];if(!("value"===i&&"defaultValue"in t&&null==a||at&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===a?a="":"translate"===s&&"no"===a?a=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||st(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":ot.test(i)&&(i=s):s=i="oninput":o&&rt.test(i)?i=i.replace(it,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===s&&r[i=s]&&(i="oninputCapture"),r[i]=a}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=D(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=D(t.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",mt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=nt,yt&&yt(e)};var bt=i.__r;i.__r=function(e){bt&&bt(e),ht=e.__c};var gt=i.diffed;i.diffed=function(e){gt&>(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),ht=null};var vt={ReactCurrentDispatcher:{current:{readContext:function(e){return ht.__n[e.__c].props.value},useCallback:ye,useContext:be,useDebugValue:ge,useDeferredValue:Re,useEffect:pe,useId:we,useImperativeHandle:he,useInsertionEffect:Be,useLayoutEffect:fe,useMemo:me,useReducer:ce,useRef:de,useState:ue,useSyncExternalStore:ke,useTransition:Ne}}},wt="18.3.1";function At(e){return S.bind(null,e)}function St(e){return!!e&&e.$$typeof===nt}function Ot(e){return St(e)&&e.type===x}function Et(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function xt(e){return St(e)?J.apply(null,arguments):e}function Ct(e){return!!e.__k&&(V(null,e),!0)}function Mt(e){return e&&(e.base||1===e.nodeType&&e)||null}var jt=function(e,t){return e(t)},Pt=function(e,t){return e(t)},It=x,kt=St,Tt={useState:ue,useId:we,useReducer:ce,useEffect:pe,useLayoutEffect:fe,useInsertionEffect:Be,useTransition:Ne,useDeferredValue:Re,useSyncExternalStore:ke,startTransition:De,useRef:de,useImperativeHandle:he,useMemo:me,useCallback:ye,useContext:be,useDebugValue:ge,version:"18.3.1",Children:ze,render:lt,hydrate:ut,unmountComponentAtNode:Ct,createPortal:tt,createElement:S,createContext:W,createFactory:At,cloneElement:xt,createRef:E,Fragment:x,isValidElement:St,isElement:St,isFragment:Ot,isMemo:Et,findDOMNode:Mt,Component:C,PureComponent:Le,memo:_e,forwardRef:Fe,flushSync:Pt,unstable_batchedUpdates:jt,StrictMode:x,Suspense:We,SuspenseList:Ke,lazy:Xe,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:vt}},6681(e){e.exports=Number.isNaN||function(e){return e!=e}},6698(e,t,n){var r=n(5049),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},6740(e,t){function n(e,t,n,r,o){var i=o%10,a=r;return 1===o?a=e:1===i&&o>20?a=t:i>1&&i<5&&(o>20||o<10)&&(a=n),a}var r=n.bind(null,"секунду","%s секунду","%s секунды","%s секунд"),o=n.bind(null,"минуту","%s минуту","%s минуты","%s минут"),i=n.bind(null,"час","%s час","%s часа","%s часов"),a=n.bind(null,"день","%s день","%s дня","%s дней"),s=n.bind(null,"неделю","%s неделю","%s недели","%s недель"),l=n.bind(null,"месяц","%s месяц","%s месяца","%s месяцев"),u=n.bind(null,"год","%s год","%s года","%s лет");t.A=function(e,t){switch(t){case 0:return["только что","через несколько секунд"];case 1:return[r(e)+" назад","через "+r(e)];case 2:case 3:return[o(e)+" назад","через "+o(e)];case 4:case 5:return[i(e)+" назад","через "+i(e)];case 6:return["вчера","завтра"];case 7:return[a(e)+" назад","через "+a(e)];case 8:case 9:return[s(e)+" назад","через "+s(e)];case 10:case 11:return[l(e)+" назад","через "+l(e)];case 12:case 13:return[u(e)+" назад","через "+u(e)];default:return["",""]}}},6748(e,t,n){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)}var o=n(1742),i=n(5773),a=n(863),s=function(e){i(!1,e)},l=String.prototype.replace,u=String.prototype.split,c="||||",p=function(e){var t=e%100,n=t%10;return 11!==t&&1===n?0:2<=n&&n<=4&&!(t>=12&&t<=14)?1:2},f={pluralTypes:{arabic:function(e){if(e<3)return e;var t=e%100;return t>=3&&t<=10?3:t>=11?4:5},bosnian_serbian:p,chinese:function(){return 0},croatian:p,french:function(e){return e>=2?1:0},german:function(e){return 1!==e?1:0},russian:p,lithuanian:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?1:2},czech:function(e){return 1===e?0:e>=2&&e<=4?1:2},polish:function(e){if(1===e)return 0;var t=e%10;return 2<=t&&t<=4&&(e%100<10||e%100>=20)?1:2},icelandic:function(e){return e%10!=1||e%100==11?1:0},slovenian:function(e){var t=e%100;return 1===t?0:2===t?1:3===t||4===t?2:3},romanian:function(e){if(1===e)return 0;var t=e%100;return 0===e||t>=2&&t<=19?1:2},ukrainian:p},pluralTypeToLanguages:{arabic:["ar"],bosnian_serbian:["bs-Latn-BA","bs-Cyrl-BA","srl-RS","sr-RS"],chinese:["id","id-ID","ja","ko","ko-KR","lo","ms","th","th-TH","zh"],croatian:["hr","hr-HR"],german:["fa","da","de","en","es","fi","el","he","hi-IN","hu","hu-HU","it","nl","no","pt","sv","tr"],french:["fr","tl","pt-br"],russian:["ru","ru-RU"],lithuanian:["lt"],czech:["cs","cs-CZ","sk"],polish:["pl"],icelandic:["is","mk"],slovenian:["sl-SL"],romanian:["ro"],ukrainian:["uk","ua"]}};function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var h,m=(h={},function(e,t){var n,r,i=h[t];return i&&!e.pluralTypes[i]&&(i=null,h[t]=i),i||(n=t,(i=(r=function(e){for(var t={},n=o(e),r=0;r<n.length;r+=1)for(var i=n[r][0],a=n[r][1],s=0;s<a.length;s+=1)t[a[s]]=i;return t}(e.pluralTypeToLanguages))[n]||r[u.call(n,/-/,1)[0]]||r.en)&&(h[t]=i)),i}),y=/%\{(.*?)\}/g;function b(e,t,n,r,o,i){if("string"!=typeof e)throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string");if(null==t)return e;var s,p,d,h=e,b=r||y,g=i||l,v="number"==typeof t?{smart_count:t}:t;if(null!=v.smart_count&&e){var w=o||f,A=u.call(e,c),S=(s=w,p=m(w,n||"en"),d=v.smart_count,s.pluralTypes[p](d));h=l.call(A[S]||A[0],/^[^\S]*|[^\S]*$/g,"")}return g.call(h,b,function(e,t){return a(v,t)&&null!=v[t]?v[t]:e})}function g(e){var t=e||{};this.phrases={},this.extend(t.phrases||{}),this.currentLocale=t.locale||"en";var n=t.allowMissing?b:null;this.onMissingKey="function"==typeof t.onMissingKey?t.onMissingKey:n,this.warn=t.warn||s,this.replaceImplementation=t.replace||l,this.tokenRegex=function(e){var t=e&&e.prefix||"%{",n=e&&e.suffix||"}";if(t===c||n===c)throw new RangeError('"||||" token is reserved for pluralization');return new RegExp(d(t)+"(.*?)"+d(n),"g")}(t.interpolation),this.pluralRules=t.pluralRules||f}g.prototype.locale=function(e){return e&&(this.currentLocale=e),this.currentLocale},g.prototype.extend=function(e,t){for(var n=o(e||{}),i=0;i<n.length;i+=1){var a=n[i][0],s=n[i][1],l=t?t+"."+a:a;"object"===r(s)?this.extend(s,l):this.phrases[l]=s}},g.prototype.unset=function(e,t){if("string"==typeof e)delete this.phrases[e];else for(var n=o(e||{}),i=0;i<n.length;i+=1){var a=n[i][0],s=n[i][1],l=t?t+"."+a:a;"object"===r(s)?this.unset(s,l):delete this.phrases[l]}},g.prototype.clear=function(){this.phrases={}},g.prototype.replace=function(e){this.clear(),this.extend(e)},g.prototype.t=function(e,t){var n,r,o=null==t?{}:t;return"string"==typeof this.phrases[e]?n=this.phrases[e]:"string"==typeof o._?n=o._:this.onMissingKey?r=(0,this.onMissingKey)(e,o,this.currentLocale,this.tokenRegex,this.pluralRules,this.replaceImplementation):(this.warn('Missing translation for key: "'+e+'"'),r=e),"string"==typeof n&&(r=b(n,o,this.currentLocale,this.tokenRegex,this.pluralRules,this.replaceImplementation)),r},g.prototype.has=function(e){return a(this.phrases,e)},g.transformPhrase=function(e,t,n){return b(e,t,n)},e.exports=g},6763(e,t){var n=["秒","分钟","小时","天","周","个月","年"];t.A=function(e,t){if(0===t)return["刚刚","片刻后"];var r=n[~~(t/2)];return[e+" "+r+"前",e+" "+r+"后"]}},7047(e){e.exports=URIError},7052(e){e.exports=Function.prototype.apply},7154(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t},7295(e,t,n){var r,o,i;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)}i=function(){function e(e,r,o,i,a){!function e(n,r,o,i,a){for(;i>o;){if(i-o>600){var s=i-o+1,l=r-o+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(n,r,Math.max(o,Math.floor(r-l*c/s+p)),Math.min(i,Math.floor(r+(s-l)*c/s+p)),a)}var f=n[r],d=o,h=i;for(t(n,o,r),a(n[i],f)>0&&t(n,o,i);d<h;){for(t(n,d,h),d++,h--;a(n[d],f)<0;)d++;for(;a(n[h],f)>0;)h--}0===a(n[o],f)?t(n,o,h):t(n,++h,i),h<=r&&(o=h+1),r<=h&&(i=h-1)}}(e,r,o||0,i||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function i(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,o){o||(o=h(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var i=t;i<n;i++){var a=e.children[i];s(o,e.leaf?r(a):a)}return o}function s(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function d(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function h(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(t,n,r,o,i){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=o)){var s=n+Math.ceil((r-n)/o/2)*o;e(t,s,n,r,i),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!d(e,t))return n;for(var r=this.toBBox,o=[];t;){for(var i=0;i<t.children.length;i++){var a=t.children[i],s=t.leaf?r(a):a;d(e,s)&&(t.leaf?n.push(a):f(e,s)?this._all(a,n):o.push(a))}t=o.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!d(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var o=t.children[r],i=t.leaf?this.toBBox(o):o;if(d(e,i)){if(t.leaf||f(e,i))return!0;n.push(o)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=h([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,i,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),r=l[l.length-1],n=u.pop(),i=!0),a.leaf){var c=o(e,a.children,t);if(-1!==c)return a.children.splice(c,1),l.push(a),this._condense(l),this}i||a.leaf||!f(a,s)?r?(n++,a=r.children[n],i=!1):a=null:(l.push(a),u.push(n),n=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},r.prototype._build=function(e,t,n,r){var o,a=n-t+1,s=this._maxEntries;if(a<=s)return i(o=h(e.slice(t,n+1)),this.toBBox),o;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(o=h([])).leaf=!1,o.height=r;var l=Math.ceil(a/s),u=l*Math.ceil(Math.sqrt(s));m(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var p=Math.min(c+u-1,n);m(e,c,p,l,this.compareMinY);for(var f=c;f<=p;f+=l){var d=Math.min(f+l-1,p);o.children.push(this._build(e,f,d,r-1))}}return i(o,this.toBBox),o},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var o=1/0,i=1/0,a=void 0,s=0;s<t.children.length;s++){var l=t.children[s],u=c(l),p=(f=e,d=l,(Math.max(d.maxX,f.maxX)-Math.min(d.minX,f.minX))*(Math.max(d.maxY,f.maxY)-Math.min(d.minY,f.minY))-u);p<i?(i=p,o=u<o?u:o,a=l):p===i&&u<o&&(o=u,a=l)}t=a||t.children[0]}var f,d;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),o=[],i=this._chooseSubtree(r,this.data,t,o);for(i.children.push(e),s(i,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);var a=this._chooseSplitIndex(n,o,r),s=h(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,i(n,this.toBBox),i(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(e,t){this.data=h([e,t]),this.data.height=e.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,o,i,s,l,u,p,f=1/0,d=1/0,h=t;h<=n-t;h++){var m=a(e,0,h,this.toBBox),y=a(e,h,n,this.toBBox),b=(o=m,i=y,s=Math.max(o.minX,i.minX),l=Math.max(o.minY,i.minY),u=Math.min(o.maxX,i.maxX),p=Math.min(o.maxY,i.maxY),Math.max(0,u-s)*Math.max(0,p-l)),g=c(m)+c(y);b<f?(f=b,r=h,d=g<d?g:d):b===f&&g<d&&(d=g,r=h)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:l,o=e.leaf?this.compareMinY:u;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,o)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var o=this.toBBox,i=a(e,0,t,o),l=a(e,n-t,n,o),u=p(i)+p(l),c=t;c<n-t;c++){var f=e.children[c];s(i,e.leaf?o(f):f),u+=p(i)}for(var d=n-t-1;d>=t;d--){var h=e.children[d];s(l,e.leaf?o(h):h),u+=p(l)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)s(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():i(e[t],this.toBBox)},r},"object"==a(t)?e.exports=i():void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o)},7405(e,t,n){var r=n(5197);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,a=document.createElement(i);a.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&a.setAttribute("rows","1");var s=r(e,"font-size");a.style.fontSize=s,a.style.padding="0px",a.style.border="0px";var l=document.body;l.appendChild(a),n=a.offsetHeight,l.removeChild(a)}return n}},7463(e,t){t.A=function(e,t){return[["recent","binnenkort"],["%s seconden geleden","binnen %s seconden"],["1 minuut geleden","binnen 1 minuut"],["%s minuten geleden","binnen %s minuten"],["1 uur geleden","binnen 1 uur"],["%s uur geleden","binnen %s uur"],["1 dag geleden","binnen 1 dag"],["%s dagen geleden","binnen %s dagen"],["1 week geleden","binnen 1 week"],["%s weken geleden","binnen %s weken"],["1 maand geleden","binnen 1 maand"],["%s maanden geleden","binnen %s maanden"],["1 jaar geleden","binnen 1 jaar"],["%s jaar geleden","binnen %s jaar"]][t]}},7548(e){e.exports=Math.round},7858(e,t){var n;void 0===(n=function(e,t){var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(u){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function a(e){var t=o.get(e);t&&t.destroy()}function s(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!o.has(t)){var n=null,r=null,a=null,s=function(){t.clientWidth!==r&&f()},l=function(e){window.removeEventListener("resize",s,!1),t.removeEventListener("input",f,!1),t.removeEventListener("keyup",f,!1),t.removeEventListener("autosize:destroy",l,!1),t.removeEventListener("autosize:update",f,!1),Object.keys(e).forEach(function(n){t.style[n]=e[n]}),o.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",f,!1),window.addEventListener("resize",s,!1),t.addEventListener("input",f,!1),t.addEventListener("autosize:update",f,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",o.set(t,{destroy:l,update:f}),"vertical"===(u=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===u.resize&&(t.style.resize="horizontal"),n="content-box"===u.boxSizing?-(parseFloat(u.paddingTop)+parseFloat(u.paddingBottom)):parseFloat(u.borderTopWidth)+parseFloat(u.borderBottomWidth),isNaN(n)&&(n=0),f()}var u;function c(e){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,t.style.overflowY=e}function p(){if(0!==t.scrollHeight){var e=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",r=t.clientWidth,e.forEach(function(e){e.node.scrollTop=e.scrollTop}),o&&(document.documentElement.scrollTop=o)}}function f(){p();var n=Math.round(parseFloat(t.style.height)),r=window.getComputedStyle(t,null),o="content-box"===r.boxSizing?Math.round(parseFloat(r.height)):t.offsetHeight;if(o<n?"hidden"===r.overflowY&&(c("scroll"),p(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==r.overflowY&&(c("hidden"),p(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),a!==o){a=o;var s=i("autosize:resized");try{t.dispatchEvent(s)}catch(e){}}}}(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=l,e.exports=t.default}.apply(t,[e,t]))||(e.exports=n)},8087(e,t,n){var r=n(9990);e.exports=function(){return"function"==typeof Object.entries?Object.entries:r}},8202(t){t.exports=e},8299(e,t,n){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)}var o,i=n(9142),a=n(157),s=n(15),l=n(2104),u=n(6076),c=n(1226),p=n(1953),f=n(7047),d=n(4940),h=n(4218),m=n(9406),y=n(8624),b=n(6114),g=n(7548),v=n(9063),w=Function,A=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(t){}},S=n(3581),O=n(5049),E=function(){throw new p},x=S?function(){try{return E}catch(e){try{return S(arguments,"callee").get}catch(t){return E}}}():E,C=n(377)(),M=n(5586),j=n(9302),P=n(1622),I=n(7052),k=n(5118),T={},D="undefined"!=typeof Uint8Array&&M?M(Uint8Array):o,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?o:ArrayBuffer,"%ArrayIteratorPrototype%":C&&M?M([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":"undefined"==typeof Atomics?o:Atomics,"%BigInt%":"undefined"==typeof BigInt?o:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?o:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?o:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?o:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?o:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?o:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":T,"%Int8Array%":"undefined"==typeof Int8Array?o:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?o:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&M?M(M([][Symbol.iterator]())):o,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":r(JSON))?JSON:o,"%Map%":"undefined"==typeof Map?o:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&C&&M?M((new Map)[Symbol.iterator]()):o,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?o:Promise,"%Proxy%":"undefined"==typeof Proxy?o:Proxy,"%RangeError%":l,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?o:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?o:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&C&&M?M((new Set)[Symbol.iterator]()):o,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&M?M(""[Symbol.iterator]()):o,"%Symbol%":C?Symbol:o,"%SyntaxError%":c,"%ThrowTypeError%":x,"%TypedArray%":D,"%TypeError%":p,"%Uint8Array%":"undefined"==typeof Uint8Array?o:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?o:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?o:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?o:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?o:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?o:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?o:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":I,"%Object.defineProperty%":O,"%Object.getPrototypeOf%":j,"%Math.abs%":d,"%Math.floor%":h,"%Math.max%":m,"%Math.min%":y,"%Math.pow%":b,"%Math.round%":g,"%Math.sign%":v,"%Reflect.getPrototypeOf%":P};if(M)try{null.error}catch(W){var N=M(M(W));R["%Error.prototype%"]=N}var B=function e(t){var n;if("%AsyncFunction%"===t)n=A("async function () {}");else if("%GeneratorFunction%"===t)n=A("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=A("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&M&&(n=M(o.prototype))}return R[t]=n,n},L={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_=n(5465),G=n(863),H=_.call(k,Array.prototype.concat),F=_.call(I,Array.prototype.splice),U=_.call(k,String.prototype.replace),z=_.call(k,String.prototype.slice),Y=_.call(k,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,J=function(e,t){var n,r=e;if(G(L,r)&&(r="%"+(n=L[r])[0]+"%"),G(R,r)){var o=R[r];if(o===T&&(o=B(r)),void 0===o&&!t)throw new p("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new p('"allowMissing" argument must be a boolean');if(null===Y(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=z(e,0,1),n=z(e,-1);if("%"===t&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return U(e,V,function(e,t,n,o){r[r.length]=n?U(o,Q,"$1"):t||e}),r}(e),r=n.length>0?n[0]:"",o=J("%"+r+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(r=l[0],F(n,H([0,1],l)));for(var u=1,f=!0;u<n.length;u+=1){var d=n[u],h=z(d,0,1),m=z(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===m||"'"===m||"`"===m)&&h!==m)throw new c("property names with quotes must have matching quotes");if("constructor"!==d&&f||(s=!0),G(R,i="%"+(r+="."+d)+"%"))a=R[i];else if(null!=a){if(!(d in a)){if(!t)throw new p("base intrinsic for "+e+" exists, but the property is not available.");return}if(S&&u+1>=n.length){var y=S(a,d);a=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[d]}else f=G(a,d),a=a[d];f&&!s&&(R[i]=a)}}return a}},8474(e){function t(e){return(t="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 n(e){var r,o,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==t(e))if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(o=n(e[r]))&&(i&&(i+=" "),i+=o)}else for(o in e)e[o]&&(i&&(i+=" "),i+=o);return i}function r(){for(var e,t,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=n(e))&&(o&&(o+=" "),o+=t);return o}e.exports=r,e.exports.clsx=r},8624(e){e.exports=Math.min},8643(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8813(e,t,n){var r=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];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 i(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){a(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 a(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}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,u(r.key),r)}}function u(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function c(e,t,n){return t=f(t),function(e,t){if(t&&("object"==h(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)}(e,p()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!e})()}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}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)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return S.default}}),t.default=void 0;var m=function(e){if("function"==typeof WeakMap)var t=new WeakMap;return function(e){if(e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=h(e)&&"function"!=typeof e)return o;if(n=t){if(n.has(e))return n.get(e);n.set(e,o)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?n(o,i,r):o[i]=e[i]);return o}(e)}(n(6512)),y=E(n(5762)),b=E(n(6512)),g=n(8474),v=n(2503),w=n(6500),A=n(658),S=E(n(5086)),O=E(n(1026));function E(e){return e&&e.__esModule?e:{default:e}}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(null,arguments)}function C(e,t,n){return r=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==h(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var M=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),C(n=c(this,t,[e]),"onDragStart",function(e,t){if((0,O.default)("Draggable: onDragStart: %j",t),!1===n.props.onStart(e,(0,w.createDraggableData)(n,t)))return!1;n.setState({dragging:!0,dragged:!0})}),C(n,"onDrag",function(e,t){if(!n.state.dragging)return!1;(0,O.default)("Draggable: onDrag: %j",t);var r,o=(0,w.createDraggableData)(n,t),i={x:o.x,y:o.y,slackX:0,slackY:0};if(n.props.bounds){var a=i.x,l=i.y;i.x+=n.state.slackX,i.y+=n.state.slackY;var u=function(e){if(Array.isArray(e))return e}(r=(0,w.getBoundPosition)(n,i.x,i.y))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(r)||function(e){if(e){if("string"==typeof e)return s(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(e,2):void 0}}(r)||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.")}(),c=u[0],p=u[1];i.x=c,i.y=p,i.slackX=n.state.slackX+(a-i.x),i.slackY=n.state.slackY+(l-i.y),o.x=i.x,o.y=i.y,o.deltaX=i.x-n.state.x,o.deltaY=i.y-n.state.y}if(!1===n.props.onDrag(e,o))return!1;n.setState(i)}),C(n,"onDragStop",function(e,t){if(!n.state.dragging)return!1;if(!1===n.props.onStop(e,(0,w.createDraggableData)(n,t)))return!1;(0,O.default)("Draggable: onDragStop: %j",t);var r={dragging:!1,slackX:0,slackY:0};if(Boolean(n.props.position)){var o=n.props.position,i=o.x,a=o.y;r.x=i,r.y=a}n.setState(r)}),n.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:i({},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."),n}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,u=[{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,O.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:i({},n)})}}],(o=[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.state.dragging&&this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:b.default.findDOMNode(this)}},{key:"render",value:function(){var e=this.props,t=(e.axis,e.bounds,e.children),n=e.defaultPosition,o=e.defaultClassName,s=e.defaultClassNameDragging,l=e.defaultClassNameDragged,u=e.position,c=e.positionOffset,p=(e.scale,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,r)),f={},d=null,h=!Boolean(u)||this.state.dragging,y=u||n,b={x:(0,w.canDragX)(this)&&h?this.state.x:y.x,y:(0,w.canDragY)(this)&&h?this.state.y:y.y};this.state.isElementSVG?d=(0,v.createSVGTransform)(b,c):f=(0,v.createCSSTransform)(b,c);var A=(0,g.clsx)(t.props.className||"",o,a(a({},s,this.state.dragging),l,this.state.dragged));return m.createElement(S.default,x({},p,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),m.cloneElement(m.Children.only(t),{className:A,style:i(i({},t.props.style),f),transform:d}))}}])&&l(n.prototype,o),u&&l(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,u}(m.Component);t.default=M,C(M,"displayName","Draggable"),C(M,"propTypes",i(i({},S.default.propTypes),{},{axis:y.default.oneOf(["both","x","y","none"]),bounds:y.default.oneOfType([y.default.shape({left:y.default.number,right:y.default.number,top:y.default.number,bottom:y.default.number}),y.default.string,y.default.oneOf([!1])]),defaultClassName:y.default.string,defaultClassNameDragging:y.default.string,defaultClassNameDragged:y.default.string,defaultPosition:y.default.shape({x:y.default.number,y:y.default.number}),positionOffset:y.default.shape({x:y.default.oneOfType([y.default.number,y.default.string]),y:y.default.oneOfType([y.default.number,y.default.string])}),position:y.default.shape({x:y.default.number,y:y.default.number}),className:A.dontSetMe,style:A.dontSetMe,transform:A.dontSetMe})),C(M,"defaultProps",i(i({},S.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},8950(e,t,n){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)}var o,i=n(9472),a=n(3581);try{o=[].__proto__===Array.prototype}catch(c){if(!c||"object"!==r(c)||!("code"in c)||"ERR_PROTO_ACCESS"!==c.code)throw c}var s=!!o&&a&&a(Object.prototype,"__proto__"),l=Object,u=l.getPrototypeOf;e.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof u&&function(e){return u(null==e?e:l(e))}},8953(e,t,n){var r=n(5887),o=n(5049),i=n(9472),a=n(1851);e.exports=function(e){var t=i(arguments),n=e.length-(arguments.length-1);return r(t,1+(n>0?n:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},9032(e,t){t.A=function(e,t){return[["agora mesmo","agora"],["há %s segundos","em %s segundos"],["há um minuto","em um minuto"],["há %s minutos","em %s minutos"],["há uma hora","em uma hora"],["há %s horas","em %s horas"],["há um dia","em um dia"],["há %s dias","em %s dias"],["há uma semana","em uma semana"],["há %s semanas","em %s semanas"],["há um mês","em um mês"],["há %s meses","em %s meses"],["há um ano","em um ano"],["há %s anos","em %s anos"]][t]}},9063(e,t,n){var r=n(6681);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},9142(e){e.exports=Object},9267(e){function t(e){return(t="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)}var n=Object.prototype.toString;e.exports=function(e){var r=n.call(e),o="[object Arguments]"===r;return o||(o="[object Array]"!==r&&null!==e&&"object"===t(e)&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===n.call(e.callee)),o}},9268(e,t,n){var r=n(830);t.A=r.TextareaAutosize},9302(e,t,n){var r=n(9142);e.exports=r.getPrototypeOf||null},9406(e){e.exports=Math.max},9472(e,t,n){var r=n(5465),o=n(1953),i=n(5118),a=n(1978);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(r,i,e)}},9874(e,t){t.A=function(e,t){return[["xusto agora","daquí a un pouco"],["hai %s segundos","en %s segundos"],["hai 1 minuto","nun minuto"],["hai %s minutos","en %s minutos"],["hai 1 hora","nunha hora"],["hai %s horas","en %s horas"],["hai 1 día","nun día"],["hai %s días","en %s días"],["hai 1 semana","nunha semana"],["hai %s semanas","en %s semanas"],["hai 1 mes","nun mes"],["hai %s meses","en %s meses"],["hai 1 ano","nun ano"],["hai %s anos","en %s anos"]][t]}},9990(e,t,n){var r=n(98),o=n(3190),i=o("Object.prototype.propertyIsEnumerable"),a=o("Array.prototype.push");e.exports=function(e){var t=r(e),n=[];for(var o in t)i(t,o)&&a(n,[o,t[o]]);return n}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{r.d(o,{default:()=>ed});var e=r(6512),t=r(7154),n=r.n(t),i=r(3424),a=r.n(i),s=["second","minute","hour","day","week","month","year"],l=["秒","分钟","小时","天","周","个月","年"],u={},c=function(e,t){u[e]=t},p=function(e){return u[e]||u.en_US},f=[60,60,24,7,365/7/12,12];function d(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function h(e,t){for(var n=e<0?1:0,r=e=Math.abs(e),o=0;e>=f[o]&&o<f.length;o++)e/=f[o];return(e=Math.floor(e))>(0==(o*=2)?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function m(e,t){return(+(t?d(t):new Date)-+d(e))/1e3}var y="timeago-id";function b(e){return parseInt(e.getAttribute(y))}var g={},v=function(e){clearTimeout(e),delete g[e]};function w(e,t,n,r){v(b(e));var o=r.relativeDate,i=r.minInterval,a=m(t,o);e.innerText=h(a,n);var s,l=setTimeout(function(){w(e,t,n,r)},Math.min(1e3*Math.max(function(e){for(var t=1,n=0,r=Math.abs(e);e>=f[n]&&n<f.length;n++)e/=f[n],t*=f[n];return r=(r%=t)?t-r:t,Math.ceil(r)}(a),i||1),2147483647));g[l]=0,s=l,e.setAttribute(y,s)}function A(e){e?v(b(e)):Object.keys(g).forEach(v)}c("en_US",function(e,t){if(0===t)return["just now","right now"];var n=s[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}),c("zh_CN",function(e,t){if(0===t)return["刚刚","片刻后"];var n=l[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]});var S,O=(S=function(e,t){return(S=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){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),E=function(){return E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},E.apply(this,arguments)},x=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.dom=null,e}return O(n,t),n.prototype.componentDidMount=function(){this.renderTimeAgo()},n.prototype.componentDidUpdate=function(){this.renderTimeAgo()},n.prototype.renderTimeAgo=function(){var e,t,n,r,o=this.props,i=o.live,a=o.datetime,s=o.locale,l=o.opts;A(this.dom),!1!==i&&(this.dom.setAttribute("datetime",""+((e=a)instanceof Date?e.getTime():e)),t=this.dom,n=s,r=l,(t.length?t:[t]).forEach(function(e){w(e,e.getAttribute("datetime"),p(n),r||{})}))},n.prototype.componentWillUnmount=function(){A(this.dom)},n.prototype.render=function(){var t,n,r=this,o=this.props,i=o.datetime,a=(o.live,o.locale),s=o.opts,l=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(o,["datetime","live","locale","opts"]);return e.createElement("time",E({ref:function(e){r.dom=e}},l),(t=a,h(m(i,(n=s)&&n.relativeDate),p(t))))},n.defaultProps={live:!0,className:""},n}(e.PureComponent);const C=x;var M=r(6748),j=r.n(M);const P=JSON.parse('{"Add a comment...":"إضافة تعليق","Add a reply...":"إضافة رد","Add tag...":"إضافة علامة","Cancel":"إلغاء","Close":"إغلاق","Edit":"Edit","Delete":"Delete","Ok":"تم"}'),I=JSON.parse('{"Add a comment...":"Napsat komentář...","Add a reply...":"Odpovědět...","Add tag...":"Přidat štítek...","Cancel":"Zrušit","Close":"Zavřít","Edit":"Upravit","Delete":"Smazat","Ok":"Ok"}'),k=JSON.parse('{"Add a comment...":"Kommentar schreiben...","Add a reply...":"Antwort schreiben...","Add tag...":"Tag...","Cancel":"Abbrechen","Close":"Schliessen","Edit":"Bearbeiten","Delete":"Löschen","Ok":"Ok"}'),T=JSON.parse('{"Add a comment...":"Σχολίασε...","Add a reply...":"Απάντησε...","Add tag...":"Πρόσθεσε tag...","Cancel":"Άκυρο","Close":"Κλείσιμο","Edit":"Επεξεργασία","Delete":"Διαγραφή","Ok":"Ok"}'),D=JSON.parse('{"Add a comment...":"Agregar un comentario...","Add a reply...":"Agregar una respuesta...","Add tag...":"Etiquetar...","Cancel":"Cancelar","Close":"Cerrar","Edit":"Editar","Delete":"Eliminar","Ok":"Ok"}'),R=JSON.parse('{"Add a comment...":"Lisää kommentti","Add a reply...":"Lisää vastaus","Add tag...":"Lisää tunniste","Cancel":"Peruuta","Close":"Sulje","Edit":"Muokkaa","Delete":"Poista","Ok":"Ok"}'),N=JSON.parse('{"Add a comment...":"Ajouter un commentaire...","Add a reply...":"Ajouter une réponse...","Add tag...":"Ajouter une étiquette...","Cancel":"Annuler","Close":"Fermer","Edit":"Éditer","Delete":"Supprimer","Ok":"Ok"}'),B=JSON.parse('{"Add a comment...":"Engadir un comentario...","Add a reply...":"Engadir unha resposta...","Add tag...":"Etiquetar...","Cancel":"Cancelar","Close":"Pechar","Edit":"Edit","Delete":"Delete","Ok":"Ok"}'),L=JSON.parse('{"Add a comment...":"टिप्पणी जोड़ें","Add a reply...":"जवाब दें","Add tag...":"टैग लगाएँ","Cancel":"रद्द करें","Close":"बंद करें","Edit":"संपादित करें","Delete":"हटाएँ","Ok":"ठीक है"}'),_=JSON.parse('{"Add a comment...":"Commenta...","Add a reply...":"Rispondi...","Add tag...":"Aggiungi tag...","Cancel":"Annulla","Close":"Chiudi","Edit":"Edit","Delete":"Delete","Ok":"Ok"}'),G=JSON.parse('{"Add a comment...":"コメントを追加する...","Add a reply...":"返信する...","Add tag...":"タグを追加する...","Cancel":"キャンセル","Close":"閉じる","Edit":"編集","Delete":"削除","Ok":"Ok"}'),H=JSON.parse('{"Add a comment...":"댓글 추가","Add a reply...":"답글 추가","Add tag...":"태그 추가","Cancel":"취소","Close":"닫기","Edit":"수정","Delete":"삭제","Ok":"확인"}'),F=JSON.parse('{"Add a comment...":"Commentaar toevoegen...","Add a reply...":"Antwoord toevoegen...","Add tag...":"Tag toevoegen...","Cancel":"Afbreken","Close":"Sluiten","Edit":"Bewerken","Delete":"Verwijderen","Ok":"Ok"}'),U=JSON.parse('{"Add a comment...":"Adicionar um comentário...","Add a reply...":"Adicionar uma resposta...","Add tag...":"Etiquetar...","Cancel":"Cancelar","Close":"Fechar","Edit":"Editar","Delete":"Apagar","Ok":"Ok"}'),z=JSON.parse('{"Add a comment...":"Добавить комментарий...","Add a reply...":"Добавить ответ...","Add tag...":"Добавить тэг...","Cancel":"Отмена","Close":"Закрыть","Edit":"Редактировать","Delete":"Удалить","Ok":"Ок"}'),Y=JSON.parse('{"Add a comment...":"Skriv en kommentar...","Add a reply...":"Skriv ett svar...","Add tag...":"Tagg...","Cancel":"Cancel","Close":"Stäng","Edit":"Edit","Delete":"Delete","Ok":"Ok"}'),V=JSON.parse('{"Add a comment...":"เพิ่มคอมเมนต์...","Add a reply...":"ตอบกลับ...","Add tag...":"เพิ่มแท็ก...","Cancel":"ยกเลิก","Close":"ปิด","Edit":"แก้ไข","Delete":"ลบ","Ok":"ตกลง"}'),Q=JSON.parse('{"Add a comment...":"Yorum ekle...","Add a reply...":"Cevap ekle...","Add tag...":"Tag Ekle...","Cancel":"İptal","Close":"Kapat","Edit":"Düzenle","Delete":"Sil","Ok":"Tamam"}'),J=JSON.parse('{"Add a comment...":"تبصرہ کریں","Add a reply...":"جواب دیں","Add tag...":"ٹیگ لگائیں","Cancel":"منسوخ کریں","Close":"بند کریں","Edit":"ترمیم کریں","Delete":"ہٹائیں","Ok":"ٹھیک ہے"}'),W=JSON.parse('{"Add a comment...":"添加注释...","Add a reply...":"添加回复...","Add tag...":"标签...","Cancel":"取消","Close":"关闭","Edit":"编辑","Delete":"删除","Ok":"确认"}'),Z=JSON.parse('{"Add a comment...":"添加评论...","Add a reply...":"添加回复...","Add tag...":"添加标签...","Cancel":"取消","Close":"关闭","Edit":"编辑","Delete":"删除","Ok":"确认"}'),X=JSON.parse('{"Add a comment...":"添加評論...","Add a reply...":"添加回覆...","Add tag...":"添加標籤...","Cancel":"取消","Close":"關閉","Edit":"編輯","Delete":"刪除","Ok":"確認"}');var K=r(5690),q=r(223),$=r(4038),ee=r(688),te=r(973),ne=r(6436),re=r(309),oe=r(9874),ie=r(5810),ae=r(3940),se=r(4688),le=r(2411),ue=r(7463),ce=r(9032),pe=r(6740),fe=r(404),de=r(5617),he=r(3847),me=r(6763),ye=r(5419);function be(e){return(be="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 ge(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 ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach(function(t){we(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function we(e,t,n){return r=function(e){if("object"!=be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==be(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var Ae={ar:P,cs:I,de:k,el:T,es:D,fi:R,fr:N,gl:B,hi:L,it:_,ja:G,ko:H,nl:F,pt:U,ru:z,sv:Y,th:V,tr:Q,ur:J,zh:W,"zh-CN":Z,"zh-TW":X},Se=Object.keys(Ae),Oe=new(j())({allowMissing:!0});Oe.init=function(e,t){Oe.clear(),e&&(Oe.locale(e),Oe.extend(Ae[e])),t&&Oe.extend(t)},c("ar",K.A),c("cs",q.A),c("de",$.A),c("el",ee.A),c("es",te.A),c("fi",ne.A),c("fr",re.A),c("gl",oe.A),c("hi",ie.A),c("it",ae.A),c("ja",se.A),c("ko",le.A),c("nl",ue.A),c("pt",ce.A),c("ru",pe.A),c("sv",fe.A),c("th",de.A),c("tr",he.A),c("zh",me.A),c("zh-CN",me.A),c("zh-TW",ye.A),Oe.registerMessages=function(e,t){Ae[e]?Ae[e]=ve(ve({},Ae[e]),t):Ae[e]=t};const Ee=Oe,xe=function(t){var n,r,o=(0,e.useRef)();return n=o,r=function(e){n.current&&!n.current.contains(event.target)&&t.onClickOutside()},(0,e.useEffect)(function(){return document.addEventListener("mousedown",r),function(){return document.removeEventListener("mousedown",r)}}),e.default.createElement("ul",{ref:o,className:"r6o-comment-dropdown-menu"},e.default.createElement("li",{onClick:t.onEdit},Ee.t("Edit")),e.default.createElement("li",{onClick:t.onDelete},Ee.t("Delete")))};var Ce=r(9268);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 je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(je=function(){return!!e})()}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ie(e,t){return(Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ke(e,t,n){return(t=Te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Te(e){var t=function(e){if("object"!=Me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Me(t)?t:t+""}var De=function(t){function n(t){var r,o,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),ke((o=this,a=[t],i=Pe(i=n),r=function(e,t){if(t&&("object"==Me(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)}(o,je()?Reflect.construct(i,a||[],Pe(o).constructor):i.apply(o,a))),"onKeyDown",function(e){13===e.which&&e.ctrlKey&&r.props.onSaveAndClose()}),ke(r,"onKeyUp",function(e){46===e.which&&e.stopPropagation()}),r.element=(0,e.createRef)(),r}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ie(e,t)}(n,t),r=n,(o=[{key:"componentDidMount",value:function(){this.props.focus&&this.element.current&&this.element.current.focus({preventScroll:!0})}},{key:"render",value:function(){return e.default.createElement(Ce.A,{ref:this.element,className:"r6o-editable-text",value:this.props.content,placeholder:this.props.placeholder||Ee.t("Add a comment..."),disabled:!this.props.editable,onChange:this.props.onChange,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown})}}])&&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,Te(r.key),r)}}(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(e.Component);function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Re.apply(null,arguments)}var Ne=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){var t,n;this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag((t=this,(n=document.createElement("style")).setAttribute("data-emotion",t.key),void 0!==t.nonce&&n.setAttribute("nonce",t.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{o.insertRule(e,o.cssRules.length)}catch(t){}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Be=Math.abs,Le=String.fromCharCode,_e=Object.assign;function Ge(e){return e.trim()}function He(e,t,n){return e.replace(t,n)}function Fe(e,t){return e.indexOf(t)}function Ue(e,t){return 0|e.charCodeAt(t)}function ze(e,t,n){return e.slice(t,n)}function Ye(e){return e.length}function Ve(e){return e.length}function Qe(e,t){return t.push(e),e}var Je=1,We=1,Ze=0,Xe=0,Ke=0,qe="";function $e(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Je,column:We,length:a,return:""}}function et(e,t){return _e($e("",null,null,"",null,null,0),e,{length:-e.length},t)}function tt(){return Ke=Xe>0?Ue(qe,--Xe):0,We--,10===Ke&&(We=1,Je--),Ke}function nt(){return Ke=Xe<Ze?Ue(qe,Xe++):0,We++,10===Ke&&(We=1,Je++),Ke}function rt(){return Ue(qe,Xe)}function ot(){return Xe}function it(e,t){return ze(qe,e,t)}function at(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function st(e){return Je=We=1,Ze=Ye(qe=e),Xe=0,[]}function lt(e){return qe="",e}function ut(e){return Ge(it(Xe-1,ft(91===e?e+2:40===e?e+1:e)))}function ct(e){for(;(Ke=rt())&&Ke<33;)nt();return at(e)>2||at(Ke)>3?"":" "}function pt(e,t){for(;--t&&nt()&&!(Ke<48||Ke>102||Ke>57&&Ke<65||Ke>70&&Ke<97););return it(e,ot()+(t<6&&32==rt()&&32==nt()))}function ft(e){for(;nt();)switch(Ke){case e:return Xe;case 34:case 39:34!==e&&39!==e&&ft(Ke);break;case 40:41===e&&ft(e);break;case 92:nt()}return Xe}function dt(e,t){for(;nt()&&e+Ke!==57&&(e+Ke!==84||47!==rt()););return"/*"+it(t,Xe-1)+"*"+Le(47===e?e:nt())}function ht(e){for(;!at(rt());)nt();return it(e,Xe)}var mt="-ms-",yt="-moz-",bt="-webkit-",gt="comm",vt="rule",wt="decl",At="@keyframes";function St(e,t){for(var n="",r=Ve(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ot(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case wt:return e.return=e.return||e.value;case gt:return"";case At:return e.return=e.value+"{"+St(e.children,r)+"}";case vt:e.value=e.props.join(",")}return Ye(n=St(e.children,r))?e.return=e.value+"{"+n+"}":""}function Et(e){return lt(xt("",null,null,null,[""],e=st(e),0,[0],e))}function xt(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,p=a,f=0,d=0,h=0,m=1,y=1,b=1,g=0,v="",w=o,A=i,S=r,O=v;y;)switch(h=g,g=nt()){case 40:if(108!=h&&58==Ue(O,p-1)){-1!=Fe(O+=He(ut(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:O+=ut(g);break;case 9:case 10:case 13:case 32:O+=ct(h);break;case 92:O+=pt(ot()-1,7);continue;case 47:switch(rt()){case 42:case 47:Qe(Mt(dt(nt(),ot()),t,n),l);break;default:O+="/"}break;case 123*m:s[u++]=Ye(O)*b;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+c:-1==b&&(O=He(O,/\f/g,"")),d>0&&Ye(O)-p&&Qe(d>32?jt(O+";",r,n,p-1):jt(He(O," ","")+";",r,n,p-2),l);break;case 59:O+=";";default:if(Qe(S=Ct(O,t,n,u,c,o,s,v,w=[],A=[],p),i),123===g)if(0===c)xt(O,t,S,S,w,i,p,s,A);else switch(99===f&&110===Ue(O,3)?100:f){case 100:case 108:case 109:case 115:xt(e,S,S,r&&Qe(Ct(e,S,S,0,0,o,s,v,o,w=[],p),A),o,A,p,s,r?w:A);break;default:xt(O,S,S,S,[""],A,0,s,A)}}u=c=d=0,m=b=1,v=O="",p=a;break;case 58:p=1+Ye(O),d=h;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==tt())continue;switch(O+=Le(g),g*m){case 38:b=c>0?1:(O+="\f",-1);break;case 44:s[u++]=(Ye(O)-1)*b,b=1;break;case 64:45===rt()&&(O+=ut(nt())),f=rt(),c=p=Ye(v=O+=ht(ot())),g++;break;case 45:45===h&&2==Ye(O)&&(m=0)}}return i}function Ct(e,t,n,r,o,i,a,s,l,u,c){for(var p=o-1,f=0===o?i:[""],d=Ve(f),h=0,m=0,y=0;h<r;++h)for(var b=0,g=ze(e,p+1,p=Be(m=a[h])),v=e;b<d;++b)(v=Ge(m>0?f[b]+" "+g:He(g,/&\f/g,f[b])))&&(l[y++]=v);return $e(e,t,n,0===o?vt:s,l,u,c)}function Mt(e,t,n){return $e(e,t,n,gt,Le(Ke),ze(e,2,-2),0)}function jt(e,t,n,r){return $e(e,t,n,wt,ze(e,0,r),ze(e,r+1,-1),r)}var Pt=function(e,t,n){for(var r=0,o=0;r=o,o=rt(),38===r&&12===o&&(t[n]=1),!at(o);)nt();return it(e,Xe)},It=new WeakMap,kt=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||It.get(n))&&!r){It.set(e,!0);for(var o=[],i=(c=o,lt(function(e,t){var n=-1,r=44;do{switch(at(r)){case 0:38===r&&12===rt()&&(t[n]=1),e[n]+=Pt(Xe-1,t,n);break;case 2:e[n]+=ut(r);break;case 4:if(44===r){e[++n]=58===rt()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Le(r)}}while(r=nt());return e}(st(t),c))),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}var c},Tt=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Dt(e,t){switch(r=t,45^Ue(n=e,0)?(((r<<2^Ue(n,0))<<2^Ue(n,1))<<2^Ue(n,2))<<2^Ue(n,3):0){case 5103:return bt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return bt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return bt+e+yt+e+mt+e+e;case 6828:case 4268:return bt+e+mt+e+e;case 6165:return bt+e+mt+"flex-"+e+e;case 5187:return bt+e+He(e,/(\w+).+(:[^]+)/,bt+"box-$1$2"+mt+"flex-$1$2")+e;case 5443:return bt+e+mt+"flex-item-"+He(e,/flex-|-self/,"")+e;case 4675:return bt+e+mt+"flex-line-pack"+He(e,/align-content|flex-|-self/,"")+e;case 5548:return bt+e+mt+He(e,"shrink","negative")+e;case 5292:return bt+e+mt+He(e,"basis","preferred-size")+e;case 6060:return bt+"box-"+He(e,"-grow","")+bt+e+mt+He(e,"grow","positive")+e;case 4554:return bt+He(e,/([^-])(transform)/g,"$1"+bt+"$2")+e;case 6187:return He(He(He(e,/(zoom-|grab)/,bt+"$1"),/(image-set)/,bt+"$1"),e,"")+e;case 5495:case 3959:return He(e,/(image-set\([^]*)/,bt+"$1$`$1");case 4968:return He(He(e,/(.+:)(flex-)?(.*)/,bt+"box-pack:$3"+mt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+bt+e+e;case 4095:case 3583:case 4068:case 2532:return He(e,/(.+)-inline(.+)/,bt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ye(e)-1-t>6)switch(Ue(e,t+1)){case 109:if(45!==Ue(e,t+4))break;case 102:return He(e,/(.+:)(.+)-([^]+)/,"$1"+bt+"$2-$3$1"+yt+(108==Ue(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Fe(e,"stretch")?Dt(He(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ue(e,t+1))break;case 6444:switch(Ue(e,Ye(e)-3-(~Fe(e,"!important")&&10))){case 107:return He(e,":",":"+bt)+e;case 101:return He(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+bt+(45===Ue(e,14)?"inline-":"")+"box$3$1"+bt+"$2$3$1"+mt+"$2box$3")+e}break;case 5936:switch(Ue(e,t+11)){case 114:return bt+e+mt+He(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return bt+e+mt+He(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return bt+e+mt+He(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return bt+e+mt+e+e}var n,r;return e}var Rt=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case wt:e.return=Dt(e.value,e.length);break;case At:return St([et(e,{value:He(e.value,"@","@"+bt)})],r);case vt:if(e.length)return e.props.map(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return St([et(e,{props:[He(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return St([et(e,{props:[He(t,/:(plac\w+)/,":"+bt+"input-$1")]}),et(e,{props:[He(t,/:(plac\w+)/,":-moz-$1")]}),et(e,{props:[He(t,/:(plac\w+)/,mt+"input-$1")]})],r)}return""}).join("")}}];function Nt(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Bt=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Lt=function(e,t,n){Bt(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},_t={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Gt(e){return(Gt="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)}var Ht,Ft,Ut=/[A-Z]|^ms/g,zt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yt=function(e){return 45===e.charCodeAt(1)},Vt=function(e){return null!=e&&"boolean"!=typeof e},Qt=(Ht=function(e){return Yt(e)?e:e.replace(Ut,"-$&").toLowerCase()},Ft=Object.create(null),function(e){return void 0===Ft[e]&&(Ft[e]=Ht(e)),Ft[e]}),Jt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(zt,function(e,t,n){return Zt={name:t,styles:n,next:Zt},t})}return 1===_t[e]||Yt(e)||"number"!=typeof t||0===t?t:t+"px"};function Wt(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(Gt(n)){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Zt={name:o.name,styles:o.styles,next:Zt},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Zt={name:a.name,styles:a.styles,next:Zt},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Wt(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!==Gt(a)){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":Vt(s)&&(r+=Qt(i)+":"+Jt(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=Wt(e,t,a);switch(i){case"animation":case"animationName":r+=Qt(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var u=0;u<a.length;u++)Vt(a[u])&&(r+=Qt(i)+":"+Jt(i,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=Zt,l=n(e);return Zt=s,Wt(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var Zt,Xt=/label:\s*([^\s;{]+)\s*(;|$)/g;function Kt(e,t,n){if(1===e.length&&"object"===Gt(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Zt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Wt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Wt(n,t,e[a]),r&&(o+=i[a]);Xt.lastIndex=0;for(var s,l="";null!==(s=Xt.exec(o));)l+="-"+s[1];return{name:function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l,styles:o,next:Zt}}var qt=!!e.useInsertionEffect&&e.useInsertionEffect,$t=qt||function(e){return e()},en=(qt||e.useLayoutEffect,e.createContext("undefined"!=typeof HTMLElement?function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Rt,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,u,c,p,f=[Ot,(p=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],d=(u=[kt,Tt].concat(i,f),c=Ve(u),function(e,t,n,r){for(var o="",i=0;i<c;i++)o+=u[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,St(Et(e?e+"{"+t.styles+"}":t.styles),d),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new Ne({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return h.sheet.hydrate(s),h}({key:"css"}):null)),tn=(en.Provider,function(t){return(0,e.forwardRef)(function(n,r){var o=(0,e.useContext)(en);return t(n,o,r)})}),nn=e.createContext({}),rn={}.hasOwnProperty,on="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",an=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Bt(t,n,r),$t(function(){return Lt(t,n,r)}),null},sn=tn(function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[on],a=[o],s="";"string"==typeof t.className?s=Nt(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=Kt(a,void 0,e.useContext(nn));s+=n.key+"-"+l.name;var u={};for(var c in t)rn.call(t,c)&&"css"!==c&&c!==on&&(u[c]=t[c]);return u.className=s,r&&(u.ref=r),e.createElement(e.Fragment,null,e.createElement(an,{cache:n,serialized:l,isStringTag:"string"==typeof i}),e.createElement(i,u))});function ln(e){return(ln="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)}r(5416);var un,cn,pn=function(t,n){var r=arguments;if(null==n||!rn.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=sn,i[1]=function(e,t){var n={};for(var r in t)rn.call(t,r)&&(n[r]=t[r]);return n[on]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)};function fn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Kt(t)}un=pn||(pn={}),cn||(cn=un.JSX||(un.JSX={}));var dn=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(ln(i)){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o},hn=function(e){var t=e.cache,n=e.serializedArr;return $t(function(){for(var e=0;e<n.length;e++)Lt(t,n[e],!1)}),null},mn=tn(function(t,n){var r=[],o=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=Kt(t,n.registered);return r.push(i),Bt(n,i,!1),n.key+"-"+i.name},i={css:o,cx:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i=n.registered,a=o,s=dn(t),u=Nt(i,l=[],s),l.length<2?s:u+a(l);var i,a,s,l,u},theme:e.useContext(nn)},a=t.children(i);return e.createElement(e.Fragment,null,e.createElement(hn,{cache:n,serializedArr:r}),a)});function yn(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function bn(e,t){if(null==e)return{};var n,r,o=yn(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function gn(e){return(gn="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)}var vn=r(1730);function wn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function An(e){var t=function(e){if("object"!=gn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gn(t)?t:t+""}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,An(r.key),r)}}function On(e,t,n){return t&&Sn(e.prototype,t),n&&Sn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xn(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&&En(e,t)}function Cn(e,t,n){return(t=An(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mn(e){return(Mn="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 jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pn(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 In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pn(Object(n),!0).forEach(function(t){jn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kn(e){return(kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tn(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,o,i=kn(e);if(t){var a=kn(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return r=this,!(o=n)||"object"!==Mn(o)&&"function"!=typeof o?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r):o}}var Dn=function(){};function Rn(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Nn(e,t,n){var r=[n];if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&r.push("".concat(Rn(e,o)));return r.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var Bn=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===gn(e)&&null!==e?[e]:[]},Ln=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,In({},bn(e,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]))};function _n(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Gn(e){return _n(e)?window.pageYOffset:e.scrollTop}function Hn(e,t){_n(e)?window.scrollTo(0,t):e.scrollTop=t}function Fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Dn,o=Gn(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;Hn(e,l),a<n?window.requestAnimationFrame(t):r(e)}()}function Un(){try{return document.createEvent("TouchEvent"),!0}catch(Ht){return!1}}var zn=!1,Yn={get passive(){return zn=!0}},Vn="undefined"!=typeof window?window:{};Vn.addEventListener&&Vn.removeEventListener&&(Vn.addEventListener("p",Dn,Yn),Vn.removeEventListener("p",Dn,!1));var Qn=zn,Jn=function(e){return"auto"===e?"bottom":e},Wn=(0,e.createContext)({getPortalPlacement:null}),Zn=function(e){xn(n,e);var t=Tn(n);function n(){var e;wn(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,o=n.maxMenuHeight,i=n.menuPlacement,a=n.menuPosition,s=n.menuShouldScrollIntoView,l=n.theme;if(t){var u="fixed"===a,c=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.theme.spacing,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,d=p.height,h=p.top,m=n.offsetParent.getBoundingClientRect().top,y=window.innerHeight,b=Gn(l),g=parseInt(getComputedStyle(n).marginBottom,10),v=parseInt(getComputedStyle(n).marginTop,10),w=m-v,A=y-h,S=w+b,O=c-b-h,E=f-y+b+g,x=b+h-v,C=160;switch(o){case"auto":case"bottom":if(A>=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!a)return i&&Fn(l,E,C),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&A>=r)return i&&Fn(l,E,C),{placement:"bottom",maxHeight:a?A-g:O-g};if("auto"===o||a){var M=t,j=a?w:S;return j>=r&&(M=Math.min(j-g-s.controlHeight,t)),{placement:"top",maxHeight:M}}if("bottom"===o)return i&&Hn(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(S>=d&&!a)return i&&Fn(l,x,C),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&w>=r){var P=t;return(!a&&S>=r||a&&w>=r)&&(P=a?w-v:S-v),i&&Fn(l,x,C),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}({maxHeight:o,menuEl:t,minHeight:r,placement:i,shouldScroll:s&&!u,isFixedPosition:u,theme:l}),p=e.context.getPortalPlacement;p&&p(c),e.setState(c)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||Jn(t);return In(In({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return On(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(e.Component);Zn.contextType=Wn;var Xn=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},Kn=Xn,qn=Xn,$n=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};$n.defaultProps={children:"No options"};var er=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};er.defaultProps={children:"Loading..."};var tr,nr,rr,or=function(t){xn(r,t);var n=Tn(r);function r(){var e;wn(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return(e=n.call.apply(n,[this].concat(o))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==Jn(e.props.menuPlacement)&&e.setState({placement:n})},e}return On(r,[{key:"render",value:function(){var t=this.props,n=t.appendTo,r=t.children,o=t.className,i=t.controlElement,a=t.cx,s=t.innerProps,l=t.menuPlacement,u=t.menuPosition,c=t.getStyles,p="fixed"===u;if(!n&&!p||!i)return null;var f=this.state.placement||Jn(l),d=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),h=p?0:window.pageYOffset,m=d[f]+h,y=pn("div",Re({css:c("menuPortal",{offset:m,position:u,rect:d}),className:a({"menu-portal":!0},o)},s),r);return pn(Wn.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},n?(0,e.createPortal)(y,n):y)}}]),r}(e.Component),ir={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},ar=function(e){var t=e.size,n=bn(e,["size"]);return pn("svg",Re({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ir},n))},sr=function(e){return pn(ar,Re({size:20},e),pn("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},lr=function(e){return pn(ar,Re({size:20},e),pn("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},ur=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},cr=ur,pr=ur,fr=function(){var e=fn.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(tr||(nr=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],rr||(rr=nr.slice(0)),tr=Object.freeze(Object.defineProperties(nr,{raw:{value:Object.freeze(rr)}})))),dr=function(e){var t=e.delay,n=e.offset;return pn("span",{css:fn({animation:"".concat(fr," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},hr=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isRtl;return pn("div",Re({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},o),pn(dr,{delay:0,offset:i}),pn(dr,{delay:160,offset:!0}),pn(dr,{delay:320,offset:!i}))};hr.defaultProps={size:4};var mr=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},yr=function(e){var t=e.children,n=e.innerProps;return pn("div",n,t)},br=yr,gr=yr,vr=function(e){var t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,s=e.innerProps,l=e.isDisabled,u=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove;return pn(mn,null,function(r){var h=r.css,m=r.cx;return pn(p,{data:i,innerProps:In({className:m(h(a("multiValue",e)),o({"multi-value":!0,"multi-value--is-disabled":l},n))},s),selectProps:c},pn(f,{data:i,innerProps:{className:m(h(a("multiValueLabel",e)),o({"multi-value__label":!0},n))},selectProps:c},t),pn(d,{data:i,innerProps:In({className:m(h(a("multiValueRemove",e)),o({"multi-value__remove":!0},n))},u),selectProps:c}))})};vr.defaultProps={cropWithEllipsis:!0};var wr={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},i),t||pn(sr,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,s=e.innerRef,l=e.innerProps,u=e.menuIsOpen;return pn("div",Re({ref:s,css:r("control",e),className:n({control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":u},o)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},i),t||pn(lr,null))},DownChevron:lr,CrossIcon:sr,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return pn("div",Re({css:o("group",e),className:r({group:!0},n)},s),pn(i,Re({},a,{selectProps:c,theme:u,getStyles:o,cx:r}),l),pn("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,r=e.className,o=Ln(e);o.data;var i=bn(o,["data"]);return pn("div",Re({css:t("groupHeading",e),className:n({"group-heading":!0},r)},i))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.innerProps,i=e.getStyles;return pn("div",Re({css:i("indicatorsContainer",e),className:r({indicators:!0},n)},o),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return pn("span",Re({},o,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=Ln(e),i=o.innerRef,a=o.isDisabled,s=o.isHidden,l=bn(o,["innerRef","isDisabled","isHidden"]);return pn("div",{css:r("input",e)},pn(vn.A,Re({className:n({input:!0},t),inputRef:i,inputStyle:mr(s),disabled:a},l)))},LoadingIndicator:hr,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps;return pn("div",Re({css:o("menu",e),className:r({menu:!0},n),ref:i},a),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.innerRef,s=e.isMulti;return pn("div",Re({css:o("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":s},n),ref:a},i),t)},MenuPortal:or,LoadingMessage:er,NoOptionsMessage:$n,MultiValue:vr,MultiValueContainer:br,MultiValueLabel:gr,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return pn("div",n,t||pn(sr,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,s=e.isSelected,l=e.innerRef,u=e.innerProps;return pn("div",Re({css:o("option",e),className:r({option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":s},n),ref:l},u),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("placeholder",e),className:r({placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,s=e.isRtl;return pn("div",Re({css:o("container",e),className:r({"--is-disabled":a,"--is-rtl":s},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return pn("div",Re({css:o("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":i},n)},a),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.innerProps,i=e.isMulti,a=e.getStyles,s=e.hasValue;return pn("div",Re({css:a("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s},n)},o),t)}};function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sr(e){return function(e){if(Array.isArray(e))return Ar(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){if("string"==typeof e)return Ar(e,t);var n={}.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)?Ar(e,t):void 0}}(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.")}()}var Or=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Er(e,t){return e===t||!(!Or(e)||!Or(t))}function xr(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}for(var Cr={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Mr=function(e){return pn("span",Re({css:Cr},e))},jr={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,o=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"select-option":return"option ".concat(r,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=void 0===n?{}:n,o=e.options,i=e.label,a=void 0===i?"":i,s=e.selectValue,l=e.isDisabled,u=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(a," focused, ").concat(c(s,r),".");if("menu"===t){var p=l?" disabled":"",f="".concat(u?"selected":"focused").concat(p);return"option ".concat(a," ").concat(f,", ").concat(c(o,r),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Pr=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,u=l.ariaLiveMessages,c=l.getOptionLabel,p=l.inputValue,f=l.isMulti,d=l.isOptionDisabled,h=l.isSearchable,m=l.menuIsOpen,y=l.options,b=l.screenReaderStatus,g=l.tabSelectsValue,v=l["aria-label"],w=l["aria-live"],A=(0,e.useMemo)(function(){return In(In({},jr),u||{})},[u]),S=(0,e.useMemo)(function(){var e,t="";if(n&&A.onChange){var r=n.option,o=n.removedValue,i=n.value,a=o||r||(e=i,Array.isArray(e)?null:e),s=In({isDisabled:a&&d(a),label:a?c(a):""},n);t=A.onChange(s)}return t},[n,d,c,A]),O=(0,e.useMemo)(function(){var e="",t=r||o,n=!!(r&&s&&s.includes(r));if(t&&A.onFocus){var i={focused:t,label:c(t),isDisabled:d(t),isSelected:n,options:y,context:t===r?"menu":"value",selectValue:s};e=A.onFocus(i)}return e},[r,o,c,d,A,y,s]),E=(0,e.useMemo)(function(){var e="";if(m&&y.length&&A.onFilter){var t=b({count:i.length});e=A.onFilter({inputValue:p,resultsMessage:t})}return e},[i,p,m,A,y,b]),x=(0,e.useMemo)(function(){var e="";if(A.guidance){var t=o?"value":m?"menu":"input";e=A.guidance({"aria-label":v,context:t,isDisabled:r&&d(r),isMulti:f,isSearchable:h,tabSelectsValue:g})}return e},[v,r,o,f,d,h,m,A,g]),C="".concat(O," ").concat(E," ").concat(x);return pn(Mr,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},a&&pn(e.default.Fragment,null,pn("span",{id:"aria-selection"},S),pn("span",{id:"aria-context"},C)))},Ir=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],kr=new RegExp("["+Ir.map(function(e){return e.letters}).join("")+"]","g"),Tr={},Dr=0;Dr<Ir.length;Dr++)for(var Rr=Ir[Dr],Nr=0;Nr<Rr.letters.length;Nr++)Tr[Rr.letters[Nr]]=Rr.base;var Br=function(e){return e.replace(kr,function(e){return Tr[e]})},Lr=function(e,t){var n;void 0===t&&(t=xr);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(Br),_r=function(e){return e.replace(/^\s+|\s+$/g,"")},Gr=function(e){return"".concat(e.label," ").concat(e.value)};function Hr(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef;e.emotion;var n=bn(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return pn("input",Re({ref:t},n,{css:fn({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var Fr=["boxSizing","height","overflow","paddingRight","position"],Ur={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function zr(e){e.preventDefault()}function Yr(e){e.stopPropagation()}function Vr(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Qr(){return"ontouchstart"in window||navigator.maxTouchPoints}var Jr=!("undefined"==typeof window||!window.document||!window.document.createElement),Wr=0,Zr={capture:!1,passive:!1},Xr=function(){return document.activeElement&&document.activeElement.blur()},Kr={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function qr(t){var n,r,o,i,a,s,l,u,c,p,f,d,h,m,y,b,g=t.children,v=t.lockEnabled,w=t.captureEnabled,A=(n={isEnabled:void 0===w||w,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave},r=n.isEnabled,o=n.onBottomArrive,i=n.onBottomLeave,a=n.onTopArrive,s=n.onTopLeave,l=(0,e.useRef)(!1),u=(0,e.useRef)(!1),c=(0,e.useRef)(0),p=(0,e.useRef)(null),f=(0,e.useCallback)(function(e,t){if(null!==p.current){var n=p.current,r=n.scrollTop,c=n.scrollHeight,f=n.clientHeight,d=p.current,h=t>0,m=c-f-r,y=!1;m>t&&l.current&&(i&&i(e),l.current=!1),h&&u.current&&(s&&s(e),u.current=!1),h&&t>m?(o&&!l.current&&o(e),d.scrollTop=c,y=!0,l.current=!0):!h&&-t>r&&(a&&!u.current&&a(e),d.scrollTop=0,y=!0,u.current=!0),y&&((b=e).preventDefault(),b.stopPropagation())}var b},[]),d=(0,e.useCallback)(function(e){f(e,e.deltaY)},[f]),h=(0,e.useCallback)(function(e){c.current=e.changedTouches[0].clientY},[]),m=(0,e.useCallback)(function(e){var t=c.current-e.changedTouches[0].clientY;f(e,t)},[f]),y=(0,e.useCallback)(function(e){if(e){var t=!!Qn&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",d,t),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",h,t),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",m,t)}},[m,h,d]),b=(0,e.useCallback)(function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",d,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",h,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",m,!1))},[m,h,d]),(0,e.useEffect)(function(){if(r){var e=p.current;return y(e),function(){b(e)}}},[r,y,b]),function(e){p.current=e}),S=function(t){var n=t.isEnabled,r=t.accountForScrollbars,o=void 0===r||r,i=(0,e.useRef)({}),a=(0,e.useRef)(null),s=(0,e.useCallback)(function(e){if(Jr){var t=document.body,n=t&&t.style;if(o&&Fr.forEach(function(e){var t=n&&n[e];i.current[e]=t}),o&&Wr<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(Ur).forEach(function(e){var t=Ur[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&Qr()&&(t.addEventListener("touchmove",zr,Zr),e&&(e.addEventListener("touchstart",Vr,Zr),e.addEventListener("touchmove",Yr,Zr))),Wr+=1}},[]),l=(0,e.useCallback)(function(e){if(Jr){var t=document.body,n=t&&t.style;Wr=Math.max(Wr-1,0),o&&Wr<1&&Fr.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&Qr()&&(t.removeEventListener("touchmove",zr,Zr),e&&(e.removeEventListener("touchstart",Vr,Zr),e.removeEventListener("touchmove",Yr,Zr)))}},[]);return(0,e.useEffect)(function(){if(n){var e=a.current;return s(e),function(){l(e)}}},[n,s,l]),function(e){a.current=e}}({isEnabled:v});return pn(e.default.Fragment,null,v&&pn("div",{onClick:Xr,css:Kr}),g(function(e){A(e),S(e)}))}var $r={clearIndicator:pr,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:cr,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:qn,menu:function(e){var t,n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return Cn(t={label:"menu"},(n=r)?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),Cn(t,"backgroundColor",s.neutral0),Cn(t,"borderRadius",i),Cn(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Cn(t,"marginBottom",a.menuGutter),Cn(t,"marginTop",a.menuGutter),Cn(t,"position","absolute"),Cn(t,"width","100%"),Cn(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Kn,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},eo={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},to={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Un(),captureMenuScroll:!Un(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=In({ignoreCase:!0,ignoreAccents:!0,stringify:Gr,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?_r(t):t,u=a?_r(i(e)):i(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=Lr(l),u=Br(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(Ht){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function no(e,t,n,r){return{type:"option",data:t,isDisabled:lo(e,t,n),isSelected:uo(e,t,n),label:ao(e,t),value:so(e,t),index:r}}function ro(e,t){return e.options.map(function(n,r){if(n.options){var o=n.options.map(function(n,r){return no(e,n,t,r)}).filter(function(t){return io(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=no(e,n,t,r);return io(e,i)?i:void 0}).filter(function(e){return!!e})}function oo(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,Sr(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function io(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!po(e)||!i)&&co(e,{label:a,value:s,data:o},r)}var ao=function(e,t){return e.getOptionLabel(t)},so=function(e,t){return e.getOptionValue(t)};function lo(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function uo(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=so(e,t);return n.some(function(t){return so(e,t)===r})}function co(e,t,n){return!e.filterOption||e.filterOption(t,n)}var po=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},fo=1,ho=function(t){xn(r,t);var n=Tn(r);function r(e){var t;return wn(this,r),(t=n.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;n.name=i,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,o=t.props,i=o.closeMenuOnSelect,a=o.isMulti;t.onInputChange("",{action:"set-value"}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=n.name,a=t.state.selectValue,s=o&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var u=t.getOptionValue(e);t.setValue(a.filter(function(e){return t.getOptionValue(e)!==u}),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",name:i});o?t.setValue([].concat(Sr(a),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),i=r.filter(function(e){return t.getOptionValue(e)!==o}),a=n?i:i[0]||null;t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(t.props.isMulti?[]:null,{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),i=e?o:o[0]||null;t.onChange(i,{action:"pop-value",removedValue:r})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Nn.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return ao(t.props,e)},t.getOptionValue=function(e){return so(t.props,e)},t.getStyles=function(e,n){var r=$r[e](n);r.boxSizing="border-box";var o=t.props.styles[e];return o?o(r,n):r},t.getElementId=function(e){return"".concat(t.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,In(In({},wr),e.components);var e},t.buildCategorizedOptions=function(){return ro(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return oo(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:In({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,r=n.isMulti,o=n.menuIsOpen;t.focusInput(),o?(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()):t.openMenu("first"),e.preventDefault(),e.stopPropagation()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.stopPropagation(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout(function(){return t.focusInput()}))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&_n(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var o=Math.abs(r.clientX-t.initialTouchX),i=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=o>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(n,{action:"input-change"}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur"}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return po(t.props)},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,u=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=t.state,h=d.focusedOption,m=d.focusedValue,y=d.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!u||!p||!h||f&&t.isOptionSelected(h,y))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":u?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close"}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!u){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":u?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":u?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!u)return;t.focusOption("pageup");break;case"PageDown":if(!u)return;t.focusOption("pagedown");break;case"Home":if(!u)return;t.focusOption("first");break;case"End":if(!u)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++fo),t.state.selectValue=Bn(e.value),t}return On(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,i,a=this.props,s=a.isDisabled,l=a.menuIsOpen,u=this.state.isFocused;(u&&!s&&e.isDisabled||u&&l&&!e.menuIsOpen)&&this.focusInput(),u&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=n.offsetHeight/3,o.bottom+i>r.bottom?Hn(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+i,t.scrollHeight)):o.top-i<r.top&&Hn(t,Math.max(n.offsetTop-i,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a]},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(eo):In(In({},eo),this.props.theme):eo}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.selectOption,i=this.setValue,a=this.props,s=a.isMulti,l=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:u,selectOption:o,selectProps:a,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return lo(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return uo(this.props,e,t)}},{key:"filterOption",value:function(e,t){return co(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,n=t.isDisabled,r=t.isSearchable,o=t.inputId,i=t.inputValue,a=t.tabIndex,s=t.form,l=this.getComponents().Input,u=this.state.inputIsHidden,c=this.commonProps,p=o||this.getElementId("input"),f={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return r?e.default.createElement(l,Re({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:n,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},f)):e.default.createElement(Hr,Re({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Dn,onFocus:this.onInputFocus,readOnly:!0,disabled:n,tabIndex:a,form:s,value:""},f))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,l=n.Placeholder,u=this.commonProps,c=this.props,p=c.controlShouldRenderValue,f=c.isDisabled,d=c.isMulti,h=c.inputValue,m=c.placeholder,y=this.state,b=y.selectValue,g=y.focusedValue,v=y.isFocused;if(!this.hasValue()||!p)return h?null:e.default.createElement(l,Re({},u,{key:"placeholder",isDisabled:f,isFocused:v}),m);if(d){var w=b.map(function(n,s){var l=n===g;return e.default.createElement(r,Re({},u,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:f,key:"".concat(t.getOptionValue(n)).concat(s),index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:n}),t.formatOptionLabel(n,"value"))});return w}if(h)return null;var A=b[0];return e.default.createElement(s,Re({},u,{data:A,isDisabled:f}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.default.createElement(t,Re({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;return t&&i?e.default.createElement(t,Re({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,r=t.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.default.createElement(r,Re({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.default.createElement(t,Re({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,l=n.LoadingMessage,u=n.NoOptionsMessage,c=n.Option,p=this.commonProps,f=this.state.focusedOption,d=this.props,h=d.captureMenuScroll,m=d.inputValue,y=d.isLoading,b=d.loadingMessage,g=d.minMenuHeight,v=d.maxMenuHeight,w=d.menuIsOpen,A=d.menuPlacement,S=d.menuPosition,O=d.menuPortalTarget,E=d.menuShouldBlockScroll,x=d.menuShouldScrollIntoView,C=d.noOptionsMessage,M=d.onMenuScrollToTop,j=d.onMenuScrollToBottom;if(!w)return null;var P,I=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,l=n.label,u=n.value,d=f===i,h=a?void 0:function(){return t.onOptionHover(i)},m=a?void 0:function(){return t.selectOption(i)},y="".concat(t.getElementId("option"),"-").concat(r),b={id:y,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1};return e.default.createElement(c,Re({},p,{innerProps:b,data:i,isDisabled:a,isSelected:s,key:y,label:l,type:o,value:u,isFocused:d,innerRef:d?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map(function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,l="".concat(t.getElementId("group"),"-").concat(s),u="".concat(l,"-heading");return e.default.createElement(r,Re({},p,{key:l,data:i,options:a,Heading:o,headingProps:{id:u,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map(function(e){return I(e,"".concat(s,"-").concat(e.index))}))}if("option"===n.type)return I(n,"".concat(n.index))});else if(y){var k=b({inputValue:m});if(null===k)return null;P=e.default.createElement(l,p,k)}else{var T=C({inputValue:m});if(null===T)return null;P=e.default.createElement(u,p,T)}var D={minMenuHeight:g,maxMenuHeight:v,menuPlacement:A,menuPosition:S,menuShouldScrollIntoView:x},R=e.default.createElement(Zn,Re({},p,D),function(n){var r=n.ref,o=n.placerProps,s=o.placement,l=o.maxHeight;return e.default.createElement(i,Re({},p,D,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:y,placement:s}),e.default.createElement(qr,{captureEnabled:h,onTopArrive:M,onBottomArrive:j,lockEnabled:E},function(n){return e.default.createElement(a,Re({},p,{innerRef:function(e){t.getMenuListRef(e),n(e)},isLoading:y,maxHeight:l,focusedOption:f}),P)}))});return O||"fixed"===S?e.default.createElement(s,Re({},p,{appendTo:O,controlElement:this.controlRef,menuPlacement:A,menuPosition:S}),R):R}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=this.state.selectValue;if(a&&!o){if(i){if(r){var l=s.map(function(e){return t.getOptionValue(e)}).join(r);return e.default.createElement("input",{name:a,type:"hidden",value:l})}var u=s.length>0?s.map(function(n,r){return e.default.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:t.getOptionValue(n)})}):e.default.createElement("input",{name:a,type:"hidden"});return e.default.createElement("div",null,u)}var c=s[0]?this.getOptionValue(s[0]):"";return e.default.createElement("input",{name:a,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,l=this.getFocusableOptions();return e.default.createElement(Pr,Re({},t,{ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return e.default.createElement(o,Re({},f,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:p}),this.renderLiveRegion(),e.default.createElement(n,Re({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:p,menuIsOpen:c}),e.default.createElement(i,Re({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),e.default.createElement(r,Re({},f,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=e.options,a=e.value,s=e.menuIsOpen,l=e.inputValue,u={};if(n&&(a!==n.value||i!==n.options||s!==n.menuIsOpen||l!==n.inputValue)){var c=Bn(a),p=s?oo(ro(e,c)):[],f=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,c):null,d=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,p);u={selectValue:c,focusedOption:d,focusedValue:f,clearFocusValueOnUpdate:!1}}var h=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{};return In(In(In({},u),h),{},{prevProps:e})}}]),r}(e.Component);ho.defaultProps=to;var mo,yo,bo,go=(mo=ho,bo=yo=function(t){xn(r,t);var n=Tn(r);function r(){var e;wn(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return(e=n.call.apply(n,[this].concat(o))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return On(r,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var t=this,n=this.props;n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue;var r=bn(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return e.default.createElement(mo,Re({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),r}(e.Component),yo.defaultProps={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},bo);const vo=go;var wo=[{value:"assessing",label:"Assessing"},{value:"bookmarking",label:"Bookmarking"},{value:"classifying",label:"Classifying"},{value:"commenting",label:"Commenting"},{value:"describing",label:"Describing"},{value:"editing",label:"Editing"},{value:"highlighting",label:"Highlighting"},{value:"identifying",label:"Identifying"},{value:"linking",label:"Linking"},{value:"moderating",label:"Moderating"},{value:"questioning",label:"Questioning"},{value:"replying",label:"Replying"},{value:"supplementing",label:"Transcription"}];const Ao=function(t){var n=t.content?wo.find(function(e){return e.value===t.content}):null;return e.default.createElement("div",{className:"r6o-purposedropdown"},e.default.createElement(vo,{value:n,onChange:t.onChange,options:wo,isDisabled:!t.editable}))};var So=function(t){return e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 940",width:t.width},e.default.createElement("metadata",null,"IcoFont Icons"),e.default.createElement("title",null,"simple-down"),e.default.createElement("glyph",{glyphName:"simple-down",unicode:"",horizAdvX:"1000"}),e.default.createElement("path",{fill:"currentColor",d:"M200 392.6l300 300 300-300-85.10000000000002-85.10000000000002-214.89999999999998 214.79999999999995-214.89999999999998-214.89999999999998-85.10000000000002 85.20000000000005z"}))},Oo=function(t){return e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"180 150 700 800",width:t.width},e.default.createElement("metadata",null,"IcoFont Icons"),e.default.createElement("title",null,"close"),e.default.createElement("glyph",{glyphName:"close",unicode:"",horizAdvX:"1000"}),e.default.createElement("path",{fill:"currentColor",d:"M709.8 206.6c-64.39999999999998 65.50000000000003-128.89999999999998 131.20000000000002-194.19999999999993 197.6-8.600000000000023 8.699999999999989-22.400000000000034 8.800000000000011-31 0-65-66-129.70000000000005-131.8-194.5-197.6-8.600000000000023-8.699999999999989-22.400000000000034-8.599999999999994-30.900000000000034 0.09999999999999432-15.699999999999989 16.200000000000017-31.099999999999994 32.30000000000001-47.099999999999994 48.80000000000001-8.5 8.800000000000011-8.299999999999983 23 0.20000000000001705 31.69999999999999 63.099999999999966 64.19999999999999 127.89999999999998 130.10000000000002 193.59999999999997 197 8.600000000000023 8.699999999999989 8.5 22.80000000000001 0 31.599999999999966-65.19999999999999 66.40000000000009-130.2 132.5-194.7 198.10000000000002-8.5 8.700000000000045-8.5 22.800000000000068 0.20000000000001705 31.399999999999977l47.79999999999998 47.90000000000009c8.600000000000023 8.599999999999909 22.600000000000023 8.599999999999909 31.100000000000023-0.10000000000002274l194.2-197.30000000000007c8.600000000000023-8.699999999999932 22.399999999999977-8.699999999999932 31 0 64.70000000000005 65.80000000000007 129.20000000000005 131.4000000000001 194.20000000000005 197.5 8.599999999999909 8.700000000000045 22.5 8.800000000000068 31 0.10000000000002274 16-16.199999999999932 31.699999999999932-32.19999999999993 47.59999999999991-48.299999999999955 8.600000000000023-8.700000000000045 8.600000000000023-22.899999999999977 0.10000000000002274-31.600000000000023-63.799999999999955-65-128.5-130.89999999999998-194.19999999999993-197.79999999999995-8.600000000000023-8.700000000000045-8.600000000000023-22.900000000000034 0-31.600000000000023 65.19999999999993-66.40000000000003 130.0999999999999-132.5 194.5-198.20000000000005 8.599999999999909-8.699999999999989 8.5-22.799999999999955-0.10000000000002274-31.49999999999997l-47.80000000000007-48.099999999999994c-8.5-8.5-22.399999999999977-8.400000000000006-31 0.29999999999998295z"}))},Eo=function(t){return e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:t.width},e.default.createElement("path",{fill:"currentColor",d:"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"}))};function xo(e){return(xo="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 Co(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 Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Co(Object(n),!0).forEach(function(t){jo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Co(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jo(e,t,n){return r=function(e){if("object"!=xo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==xo(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}function Po(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Io(e,t);var n={}.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)?Io(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 Io(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const ko=function(t){var n=Po((0,e.useState)(!1),2),r=n[0],o=n[1],i=Po((0,e.useState)(!1),2),a=i[0],s=i[1],l=t.body.modified||t.body.created,u=t.body.creator&&e.default.createElement("div",{className:"r6o-lastmodified"},e.default.createElement("span",{className:"r6o-lastmodified-by"},t.body.creator.name||t.body.creator.id),t.body.created&&e.default.createElement("span",{className:"r6o-lastmodified-at"},e.default.createElement(C,{datetime:t.env.toClientTime(l),locale:Ee.locale()})));return t.readOnly?e.default.createElement("div",{className:"r6o-widget comment"},e.default.createElement("div",{className:"r6o-readonly-comment"},t.body.value),u):e.default.createElement("div",{className:r?"r6o-widget comment editable":"r6o-widget comment"},e.default.createElement(De,{editable:r,content:t.body.value,onChange:function(e){return t.onUpdate(t.body,Mo(Mo({},t.body),{},{value:e.target.value}))},onSaveAndClose:t.onSaveAndClose}),!r&&u,t.purposeSelector&&e.default.createElement(Ao,{editable:r,content:t.body.purpose,onChange:function(e){return t.onUpdate(t.body,Mo(Mo({},t.body),{},{purpose:e.value}))},onSaveAndClose:t.onSaveAndClose}),e.default.createElement("div",{className:a?"r6o-icon r6o-arrow-down r6o-menu-open":"r6o-icon r6o-arrow-down",onClick:function(){return s(!a)}},e.default.createElement(So,{width:12})),a&&e.default.createElement(xe,{onEdit:function(e){o(!0),s(!1)},onDelete:function(e){t.onDelete(t.body),s(!1)},onClickOutside:function(){return s(!1)}}))};function To(e){return(To="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 Do(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?Do(Object(n),!0).forEach(function(t){No(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Do(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function No(e,t,n){return r=function(e){if("object"!=To(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=To(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==To(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var Bo=wo.map(function(e){return e.value}),Lo=function(e,t){var n=t?Bo.indexOf(e.purpose)>-1:"commenting"==e.purpose||"replying"==e.purpose;return"TextualBody"===e.type&&(!Object.prototype.hasOwnProperty.call(e,"purpose")||n)},_o=function(e,t){if(!0===t.editable)return!1;if(!1===t.editable)return!0;if("MINE_ONLY"===t.editable){var n,r,o=null===(n=e.creator)||void 0===n?void 0:n.id;return(null===(r=t.env.user)||void 0===r?void 0:r.id)!==o}return t.readOnly},Go=function(t){var n,r,o=t.annotation?t.annotation.bodies.filter(function(e){return Lo(e,t.purposeSelector)}):[],i=(n=o.find(function(e){return 1==e.draft}),r=o.length>1,n||{type:"TextualBody",value:"",purpose:r?"replying":"commenting",draft:!0}),a=o.filter(function(e){return e!=i}),s=!t.readOnly&&t.annotation,l=0===a.length||!t.disableReply;return e.default.createElement(e.default.Fragment,null,a.map(function(n,r){return e.default.createElement(ko,{key:r,env:t.env,purposeSelector:t.purposeSelector,readOnly:_o(n,t),body:n,onUpdate:t.onUpdateBody,onDelete:t.onRemoveBody,onSaveAndClose:t.onSaveAndClose})}),s&&l&&e.default.createElement("div",{className:"r6o-widget comment editable"},e.default.createElement(De,{focus:t.focus,content:i.value,editable:!0,placeholder:a.length>0?Ee.t("Add a reply..."):t.textPlaceHolder||Ee.t("Add a comment..."),onChange:function(e){var n=i.value,r=e.target.value;0===n.length&&r.length>0?t.onAppendBody(Ro(Ro({},i),{},{value:r})):n.length>0&&0===r.length?t.onRemoveBody(i):t.onUpdateBody(i,Ro(Ro({},i),{},{value:r}))},onSaveAndClose:function(){return t.onSaveAndClose()}}),t.purposeSelector&&i.value.length>0&&e.default.createElement(Ao,{editable:!0,content:i.purpose,onChange:function(e){return t.onUpdateBody(i,Ro(Ro({},i),{},{purpose:e.value}))},onSaveAndClose:function(){return t.onSaveAndClose()}})))};Go.disableDelete=function(e,t){return e.bodies.filter(function(e){return Lo(e,t.purposeSelector)}).some(function(e){return _o(e,t)})};const Ho=Go;function Fo(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,En(e,t)}function Uo(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const zo=e.default.createContext(null);var Yo=function(e){return e.scrollTop},Vo="unmounted",Qo="exited",Jo="entering",Wo="entered",Zo="exiting",Xo=function(t){function n(e,n){var r;r=t.call(this,e,n)||this;var o,i=n&&!n.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?i?(o=Qo,r.appearStatus=Jo):o=Wo:o=e.unmountOnExit||e.mountOnEnter?Vo:Qo,r.state={status:o},r.nextCallback=null,r}Fo(n,t),n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Vo?{status:Qo}:null};var r=n.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Jo&&n!==Wo&&(t=Jo):n!==Jo&&n!==Wo||(t=Zo)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.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}},r.updateStatus=function(t,n){if(void 0===t&&(t=!1),null!==n)if(this.cancelNextCallback(),n===Jo){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:e.default.findDOMNode(this);r&&Yo(r)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qo&&this.setState({status:Vo})},r.performEnter=function(t){var n=this,r=this.props.enter,o=this.context?this.context.isMounting:t,i=this.props.nodeRef?[o]:[e.default.findDOMNode(this),o],a=i[0],s=i[1],l=this.getTimeouts(),u=o?l.appear:l.enter;t||r?(this.props.onEnter(a,s),this.safeSetState({status:Jo},function(){n.props.onEntering(a,s),n.onTransitionEnd(u,function(){n.safeSetState({status:Wo},function(){n.props.onEntered(a,s)})})})):this.safeSetState({status:Wo},function(){n.props.onEntered(a)})},r.performExit=function(){var t=this,n=this.props.exit,r=this.getTimeouts(),o=this.props.nodeRef?void 0:e.default.findDOMNode(this);n?(this.props.onExit(o),this.safeSetState({status:Zo},function(){t.props.onExiting(o),t.onTransitionEnd(r.exit,function(){t.safeSetState({status:Qo},function(){t.props.onExited(o)})})})):this.safeSetState({status:Qo},function(){t.props.onExited(o)})},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.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},r.onTransitionEnd=function(t,n){this.setNextCallback(n);var r=this.props.nodeRef?this.props.nodeRef.current:e.default.findDOMNode(this),o=null==t&&!this.props.addEndListener;if(r&&!o){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],a=i[0],s=i[1];this.props.addEndListener(a,s)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},r.render=function(){var t=this.state.status;if(t===Vo)return null;var n=this.props,r=n.children,o=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,yn(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e.default.createElement(zo.Provider,{value:null},"function"==typeof r?r(t,o):e.default.cloneElement(e.default.Children.only(r),o))},n}(e.default.Component);function Ko(){}Xo.contextType=zo,Xo.propTypes={},Xo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ko,onEntering:Ko,onEntered:Ko,onExit:Ko,onExiting:Ko,onExited:Ko},Xo.UNMOUNTED=Vo,Xo.EXITED=Qo,Xo.ENTERING=Jo,Xo.ENTERED=Wo,Xo.EXITING=Zo;const qo=Xo;var $o=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Uo(n.className,r):n.setAttribute("class",Uo(n.className&&n.className.baseVal||"",r)));var n,r})},ei=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var r=e.resolveArguments(t,n),o=r[0],i=r[1];e.removeClasses(o,"exit"),e.addClass(o,i?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var r=e.resolveArguments(t,n),o=r[0],i=r[1]?"appear":"enter";e.addClass(o,i,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var r=e.resolveArguments(t,n),o=r[0],i=r[1]?"appear":"enter";e.removeClasses(o,i),e.addClass(o,i,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+t:n[t];return{baseClassName:o,activeClassName:r?o+"-active":n[t+"Active"],doneClassName:r?o+"-done":n[t+"Done"]}},e}Fo(n,t);var r=n.prototype;return r.addClass=function(e,t,n){var r,o,i=this.getClassNames(t)[n+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&a&&(i+=" "+a),"active"===n&&e&&Yo(e),i&&(this.appliedClasses[t][n]=i,o=i,(r=e)&&o&&o.split(" ").forEach(function(e){return i=e,void((o=r).classList?o.classList.add(i):(t=o,n=i,(t.classList?!!n&&t.classList.contains(n):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+n+" "))||("string"==typeof o.className?o.className=o.className+" "+i:o.setAttribute("class",(o.className&&o.className.baseVal||"")+" "+i))));var t,n,o,i}))},r.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&$o(e,r),o&&$o(e,o),i&&$o(e,i)},r.render=function(){var t=this.props,n=(t.classNames,yn(t,["classNames"]));return e.default.createElement(qo,Re({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(e.default.Component);ei.defaultProps={classNames:""},ei.propTypes={};const ti=ei;function ni(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ri(e,t);var n={}.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)?ri(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 ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const oi=function(t){var n=(0,e.useRef)(),r=ni((0,e.useState)(t.initialValue||""),2),o=r[0],i=r[1],a=ni((0,e.useState)([]),2),s=a[0],l=a[1],u=ni((0,e.useState)(null),2),c=u[0],p=u[1];(0,e.useEffect)(function(){t.focus&&n.current.querySelector("input").focus({preventScroll:!0})},[]),(0,e.useEffect)(function(){t.onChange&&t.onChange(o)},[o]);var f=function(){if(null!==c)t.onSubmit(s[c]);else{var e=o.trim();if(e){var n=Array.isArray(t.vocabulary)?t.vocabulary.find(function(t){return(t.label||t).toLowerCase()===e.toLowerCase()}):null;n?t.onSubmit(n):t.onSubmit(e)}}i(""),l([]),p(null)};return e.default.createElement("div",{ref:n,className:"r6o-autocomplete"},e.default.createElement("div",null,e.default.createElement("input",{onKeyDown:function(e){if(13===e.which)f();else if(27===e.which)t.onCancel&&t.onCancel();else if(s.length>0){if(38===e.which)if(null===c)p(0);else{var n=Math.max(0,c-1);p(n)}else if(40===e.which)if(null===c)p(0);else{var r=Math.min(s.length-1,c+1);p(r)}}else 40===e.which&&Array.isArray(t.vocabulary)&&l(t.vocabulary)},onChange:function(e){var n=e.target.value;i(n),p(null),n?function(e){if("function"==typeof t.vocabulary){var n=(i=e,(0,t.vocabulary)(i));n.then?n.then(l):l(n)}else{var r=(o=e,t.vocabulary.filter(function(e){return(e.label?e.label:e).toLowerCase().startsWith(o.toLowerCase())}));l(r)}var o,i}(n):l([])},value:o,placeholder:t.placeholder})),e.default.createElement("ul",null,s.length>0&&s.map(function(t,n){return e.default.createElement("li",{key:"".concat(t.label?t.label:t).concat(n),onClick:f,onMouseEnter:function(){return p(n)},style:c===n?{backgroundColor:"#bde4ff"}:{}},t.label?t.label:t)})))};function ii(e){return(ii="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 ai(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 si(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ai(Object(n),!0).forEach(function(t){li(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function li(e,t,n){return r=function(e){if("object"!=ii(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ii(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==ii(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}function ui(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const ci=function(t){var n=t.annotation?t.annotation.bodies.filter(function(e){return"tagging"===e.purpose}):[],r=n.slice().reverse().find(function(e){return e.draft})||{type:"TextualBody",value:"",purpose:"tagging",draft:!0},o=n.filter(function(e){return e!=r}),i=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return ui(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ui(e,2):void 0}}(e)||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.")}()}((0,e.useState)(!1)),a=i[0],s=i[1],l=function(e){return function(t){s(a!==e&&e)}},u=function(e){return function(n){n.stopPropagation(),t.onRemoveBody(e)}},c=function(e){return e.value||e.source.label};return e.default.createElement("div",{className:"r6o-widget r6o-tag"},o.length>0&&e.default.createElement("ul",{className:"r6o-taglist"},o.map(function(n){return e.default.createElement("li",{key:c(n),onClick:l(n)},e.default.createElement("span",{className:"r6o-label"},c(n)),!t.readOnly&&e.default.createElement(ti,{in:a===n,timeout:200,classNames:"r6o-delete"},e.default.createElement("span",{className:"r6o-delete-wrapper",onClick:u(n)},e.default.createElement("span",{className:"r6o-delete"},e.default.createElement(Oo,{width:12})))))})),!t.readOnly&&e.default.createElement(oi,{focus:t.focus,placeholder:t.textPlaceHolder||Ee.t("Add tag..."),vocabulary:t.vocabulary||[],onChange:function(e){var n=r.value.trim(),o=e.trim();0===n.length&&o.length>0?t.onAppendBody(si(si({},r),{},{value:o})):n.length>0&&0===o.length?t.onRemoveBody(r):n!==o&&t.onUpdateBody(r,si(si({},r),{},{value:o}))},onSubmit:function(e){var n=e.uri?{type:"SpecificResource",purpose:"tagging",source:{id:e.uri,label:e.label}}:{type:"TextualBody",purpose:"tagging",value:e.label||e};0===r.value.trim().length?t.onAppendBody(n):t.onUpdateBody(r,n)}}))};function pi(e){return(pi="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 fi(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 di(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fi(Object(n),!0).forEach(function(t){hi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hi(e,t,n){return(t=mi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mi(e){var t=function(e){if("object"!=pi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pi(t)?t:t+""}function yi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(yi=function(){return!!e})()}function bi(e){return(bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gi(e,t){return(gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var vi=function(t){function n(t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=function(e,t,n){return t=bi(t),function(e,t){if(t&&("object"==pi(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)}(e,yi()?Reflect.construct(t,n||[],bi(e).constructor):t.apply(e,n))}(this,n,[t])).element=e.default.createRef(),r}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gi(e,t)}(n,t),function(e,t){return t&&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,mi(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"renderWidget",value:function(e){for(var t=this.props.widget(di(di({annotation:e.annotation,readOnly:e.readOnly},e.config),{},{onAppendBody:function(t,n){return e.onAppendBody(t,n)},onUpdateBody:function(t,n,r){return e.onUpdateBody(t,n,r)},onUpsertBody:function(t,n,r){return e.onUpsertBody(t,n,r)},onRemoveBody:function(t,n){return e.onRemoveBody(t,n)},onBatchModify:function(t,n){return e.onBatchModify(t,n)},onSetProperty:function(t,n){return e.onSetProperty(t,n)},onAddContext:function(t){return e.onAddContext(t)},onSaveAndClose:function(){return e.onSaveAndClose()}}));this.element.current.firstChild;)this.element.current.removeChild(this.element.current.lastChild);this.element.current.appendChild(t)}},{key:"componentDidMount",value:function(){this.renderWidget(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.element.current&&this.props.annotation!==e.annotation&&this.renderWidget(e)}},{key:"render",value:function(){return e.default.createElement("div",{ref:this.element,className:"widget"})}}])}(e.Component),wi=["widget","force"];window.React=e.default,window.ReactDOM=e.default;var Ai={COMMENT:Ho,TAG:ci},Si=[e.default.createElement(Ho,null),e.default.createElement(ci,null)],Oi=function(t){var n=function(t,n,r){if("string"==typeof t||t instanceof String)return e.default.createElement(Ai[t],n);if("react"===(null==r?void 0:r.toLowerCase()))return e.default.createElement(t,n);if("plainjs"===(null==r?void 0:r.toLowerCase()))return e.default.createElement(vi,{widget:t,config:n});if(function(e){var t;return"function"==typeof e&&!(null===(t=e.prototype)||void 0===t||!t.isReactComponent)}(o=t)||function(e){return"function"==typeof e&&(String(e).match(/return .+\(['|"].+['|"],\s*\{/g)||String(e).match(/return .+preact_compat/)||String(e).match(/return .+\.createElement/g))}(o))return e.default.createElement(t,n);if("function"==typeof t||t instanceof Function)return e.default.createElement(vi,{widget:t,config:n});throw"".concat(t," is not a valid plugin");var o};if(t.widget){var r=t.widget,o=t.force,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,wi);return n(r,i,o)}return n(t)};const Ei=function(e,t,n,r){var o=e.getBoundingClientRect();t.className="r6o-editor r6o-arrow-top r6o-arrow-left";var i=n.getBoundingClientRect(),a=i.left,s=i.top,l=i.right,u=i.bottom;if(t.style.top="".concat(u-o.top+14,"px"),t.style.left="".concat(a-o.left,"px"),r){var c=t.children[1].getBoundingClientRect(),p=e.ownerDocument.defaultView,f=p.innerWidth,d=p.innerHeight;if(c.right>f&&(t.classList.remove("r6o-arrow-left"),t.classList.add("r6o-arrow-right"),t.style.left="".concat(l-c.width-o.left,"px")),c.bottom>d){t.classList.remove("r6o-arrow-top"),t.classList.add("r6o-arrow-bottom");var h=t.children[1].getBoundingClientRect().height;t.style.top="".concat(s-o.top-h-14,"px")}var m=t.children[1].getBoundingClientRect();if(m.top<0){t.classList.add("pushed","down"),t.style.top="".concat(-o.top,"px");var y=u-o.top;m.height-o.top>y&&t.classList.remove("r6o-arrow-bottom")}m.left<0&&(t.classList.add("pushed","right"),t.style.left="".concat(-o.left,"px")),requestAnimationFrame(function(){return t.style.opacity=1})}};var xi=["draft"];function Ci(e){return(Ci="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 Mi(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 ji(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mi(Object(n),!0).forEach(function(t){Ri(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pi(e){return function(e){if(Array.isArray(e))return Ii(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){if("string"==typeof e)return Ii(e,t);var n={}.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)?Ii(e,t):void 0}}(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 Ii(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ki(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ki=function(){return!!e})()}function Ti(e){return(Ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Di(e,t){return(Di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ri(e,t,n){return(t=Ni(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ni(e){var t=function(e){if("object"!=Ci(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ci(t)?t:t+""}var Bi,Li=function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.left,o=t.width,i=t.height;return"".concat(n,", ").concat(r,", ").concat(o,", ").concat(i)},_i=function(t){function n(t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),Ri(r=function(e,t,n){return t=Ti(t),function(e,t){if(t&&("object"==Ci(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)}(e,ki()?Reflect.construct(t,n||[],Ti(e).constructor):t.apply(e,n))}(this,n,[t]),"initResizeObserver",function(){var e,t=void 0===r.props.autoPosition||r.props.autoPosition;if(null!==(e=window)&&void 0!==e&&e.ResizeObserver){var n=new ResizeObserver(function(){r.state.dragged||Ei(r.props.wrapperEl,r.element.current,r.props.selectedElement,t)});return n.observe(r.props.wrapperEl),function(){return n.disconnect()}}r.state.dragged||Ei(r.props.wrapperEl,r.element.current,r.props.selectedElement,t)}),Ri(r,"creationMeta",function(e){var t={},n=r.props.env.user;return n&&(t.creator={},n.id&&(t.creator.id=n.id),n.displayName&&(t.creator.name=n.displayName),t[e.created?"modified":"created"]=r.props.env.getCurrentTimeAdjusted()),t}),Ri(r,"getCurrentAnnotation",function(){return r.state.currentAnnotation.clone()}),Ri(r,"hasChanges",function(){var e;return!(null!==(e=r.props.annotation)&&void 0!==e&&e.isEqual(r.state.currentAnnotation))}),Ri(r,"updateCurrentAnnotation",function(e,t){r.setState({currentAnnotation:r.state.currentAnnotation.clone(e)},function(){t?r.onOk():r.props.onChanged&&r.props.onChanged()})}),Ri(r,"onAppendBody",function(e,t){return r.updateCurrentAnnotation({body:[].concat(Pi(r.state.currentAnnotation.bodies),[ji(ji({},e),r.creationMeta(e))])},t)}),Ri(r,"onUpdateBody",function(e,t,n){return r.updateCurrentAnnotation({body:r.state.currentAnnotation.bodies.map(function(n){return n===e?ji(ji({},t),r.creationMeta(t)):n})},n)}),Ri(r,"onRemoveBody",function(e,t){return r.updateCurrentAnnotation({body:r.state.currentAnnotation.bodies.filter(function(t){return t!==e})},t)}),Ri(r,"onUpsertBody",function(e,t,n){if(null==e&&null!=t)r.onAppendBody(t,n);else if(null!=e&&null!=t)r.onUpdateBody(e,t,n);else if(null!=e&&null==t){var o=r.state.currentAnnotation.bodies.find(function(t){return t.purpose===e.purpose});o?r.onUpdateBody(o,e,n):r.onAppendBody(e,n)}}),Ri(r,"onBatchModify",function(e,t){var n=e.filter(function(e){return"upsert"===e.action&&e.body}).map(function(e){return{previous:r.state.currentAnnotation.bodies.find(function(t){return t.purpose===e.body.purpose}),updated:ji(ji({},e.body),r.creationMeta(e.body))}}),o=e.filter(function(e){return"remove"===e.action}).map(function(e){return e.body}),i=[].concat(Pi(e.filter(function(e){return"append"===e.action||"upsert"===e.action&&e.updated&&!e.previous}).map(function(e){return ji(ji({},e.body),r.creationMeta(e.body))})),Pi(n.filter(function(e){return!e.previous}).map(function(e){return e.updated}))),a=[].concat(Pi(e.filter(function(e){return"update"===e.action||"upsert"===e.action&&e.updated&&e.previous}).map(function(e){return{previous:e.previous,updated:ji(ji({},e.updated),r.creationMeta(e.updated))}})),Pi(n.filter(function(e){return e.previous}))),s=[].concat(Pi(r.state.currentAnnotation.bodies.filter(function(e){return!o.includes(e)}).map(function(e){var t=a.find(function(t){return t.previous===e});return t?t.updated:e})),Pi(i));r.updateCurrentAnnotation({body:s},t)}),Ri(r,"onSetProperty",function(e,t){if(["@context","id","type","body","target"].includes(e))throw new Exception("Cannot set ".concat(e," - not allowed"));if(t)r.updateCurrentAnnotation(Ri({},e,t));else{var n=r.currentAnnotation.clone();delete n[e],r.setState({currentAnnotation:n})}}),Ri(r,"onAddContext",function(e){var t=r.state.currentAnnotation,n=Array.isArray(t.context)?t.context:[t.context];n.indexOf(e)<0&&(n.push(e),r.updateCurrentAnnotation({"@context":n}))}),Ri(r,"onCancel",function(){return r.props.onCancel(r.props.annotation)}),Ri(r,"onOk",function(){var e=function(e){return e.clone({body:e.bodies.map(function(e){return e.draft,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,xi)})})},t=r.state.currentAnnotation;0!==t.bodies.length||r.props.allowEmpty?t.isSelection?r.props.onAnnotationCreated(e(t).toAnnotation()):r.props.onAnnotationUpdated(e(t),r.props.annotation):t.isSelection?r.onCancel():r.props.onAnnotationDeleted(r.props.annotation)}),Ri(r,"onDelete",function(){return r.props.onAnnotationDeleted(r.props.annotation)}),r.element=e.default.createRef(),r.state={currentAnnotation:t.annotation,dragged:!1,selectionBounds:Li(t.selectedElement)},r}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Di(e,t)}(n,t),function(e,t){return t&&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,Ni(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"componentWillReceiveProps",value:function(e){var t,n=this.state.selectionBounds,r=Li(e.selectedElement);null!==(t=this.props.annotation)&&void 0!==t&&t.isEqual(e.annotation)?this.setState({selectionBounds:r}):this.setState({currentAnnotation:e.annotation,selectionBounds:r}),this.props.modifiedTarget!=e.modifiedTarget&&this.state.currentAnnotation&&this.updateCurrentAnnotation({target:this.props.modifiedTarget}),n!=r&&this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}},{key:"componentDidMount",value:function(){var e=this;this.removeObserver=this.initResizeObserver(),new MutationObserver(function(){e.element.current&&(e.removeObserver&&e.removeObserver(),e.removeObserver=e.initResizeObserver())}).observe(this.element.current,{childList:!0,subtree:!0})}},{key:"componentWillUnmount",value:function(){this.removeObserver&&this.removeObserver()}},{key:"render",value:function(){var t=this,n=this.state.currentAnnotation,r=this.props.widgets?this.props.widgets.map(Oi):Si,o=n&&(n.bodies.length>0||this.props.allowEmpty)&&!this.props.readOnly&&!n.isSelection&&!r.some(function(e){return!!e.type.disableDelete&&e.type.disableDelete(n,ji(ji({},e.props),{},{readOnly:t.props.readOnly,env:t.props.env}))});return e.default.createElement(a(),{disabled:!this.props.detachable,handle:".r6o-draggable",cancel:".r6o-btn, .r6o-btn *",onDrag:function(){return t.setState({dragged:!0})}},e.default.createElement("div",{ref:this.element,className:this.state.dragged?"r6o-editor dragged":"r6o-editor"},e.default.createElement("div",{className:"r6o-arrow"}),e.default.createElement("div",{className:"r6o-editor-inner"},r.map(function(r,o){return e.default.cloneElement(r,{key:"".concat(o),focus:0===o,annotation:n,readOnly:t.props.readOnly,env:t.props.env,onAppendBody:t.onAppendBody,onUpdateBody:t.onUpdateBody,onRemoveBody:t.onRemoveBody,onUpsertBody:t.onUpsertBody,onBatchModify:t.onBatchModify,onSetProperty:t.onSetProperty,onAddContext:t.onAddContext,onSaveAndClose:t.onOk})}),this.props.readOnly?e.default.createElement("div",{className:"r6o-footer"},e.default.createElement("button",{className:"r6o-btn",onClick:this.onCancel},Ee.t("Close"))):e.default.createElement("div",{className:this.props.detachable?"r6o-footer r6o-draggable":"r6o-footer"},o&&e.default.createElement("button",{className:"r6o-btn left delete-annotation",title:Ee.t("Delete"),onClick:this.onDelete},e.default.createElement(Eo,{width:12})),e.default.createElement("button",{className:"r6o-btn outline",onClick:this.onCancel},Ee.t("Cancel")),e.default.createElement("button",{className:"r6o-btn ",onClick:this.onOk},Ee.t("Ok"))))))}}])}(e.Component),Gi=r(8202),Hi=r.n(Gi),Fi="http://www.w3.org/2000/svg",Ui=function(e){var t=e.getAttribute("class");return t?new Set(t.split(" ")):new Set},zi=function(e,t){var n=Ui(e);n.add(t),e.setAttribute("class",Array.from(n).join(" "))},Yi=function(e,t){var n=Ui(e);n.delete(t),0===n.size?e.removeAttribute("class"):e.setAttribute("class",Array.from(n).join(" "))},Vi=function(e,t){return Ui(e).has(t)},Qi=new Uint8Array(16);function Ji(){if(!Bi&&!(Bi="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 Bi(Qi)}const Wi=/^(?:[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;for(var Zi=[],Xi=0;Xi<256;++Xi)Zi.push((Xi+256).toString(16).substr(1));const Ki=function(e,t,n){var r=(e=e||{}).random||(e.rng||Ji)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Zi[e[n+0]]+Zi[e[n+1]]+Zi[e[n+2]]+Zi[e[n+3]]+"-"+Zi[e[n+4]]+Zi[e[n+5]]+"-"+Zi[e[n+6]]+Zi[e[n+7]]+"-"+Zi[e[n+8]]+Zi[e[n+9]]+"-"+Zi[e[n+10]]+Zi[e[n+11]]+Zi[e[n+12]]+Zi[e[n+13]]+Zi[e[n+14]]+Zi[e[n+15]]).toLowerCase();if("string"!=typeof(t=r)||!Wi.test(t))throw TypeError("Stringified UUID is invalid");return r}(r)};var qi,$i=r(2495),ea=r.n($i);function ta(e){return(ta="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 na(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 ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?na(Object(n),!0).forEach(function(t){oa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):na(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oa(e,t,n){return(t=ia(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ia(e){var t=function(e){if("object"!=ta(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ta(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ta(t)?t:t+""}var aa=function(e,t){return t&&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,ia(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),oa(this,"clone",function(t,n){return new e(ra(ra({},r.underlying),t),ra(ra({},r.opts),n))}),oa(this,"selector",function(e){var t=r.underlying.target;if(t.selector)return(Array.isArray(t.selector)?t.selector:[t.selector]).find(function(t){return t.type===e})}),this.underlying=t,this.opts=n},[{key:"isEqual",value:function(e){return"Annotation"===(null==e?void 0:e.type)&&(this.underlying===e.underlying||!(!this.underlying.id||!e.underlying.id)&&ea()(this.underlying,e.underlying))}},{key:"readOnly",get:function(){var e;return null===(e=this.opts)||void 0===e?void 0:e.readOnly}},{key:"id",get:function(){return this.underlying.id}},{key:"context",get:function(){return this.underlying["@context"]}},{key:"type",get:function(){return this.underlying.type}},{key:"motivation",get:function(){return this.underlying.motivation}},{key:"body",get:function(){return this.underlying.body}},{key:"target",get:function(){return this.underlying.target}},{key:"bodies",get:function(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]},set:function(e){this.underlying.body=e}},{key:"targets",get:function(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}},{key:"quote",get:function(){var e;return null===(e=this.selector("TextQuoteSelector"))||void 0===e?void 0:e.exact}},{key:"start",get:function(){var e;return null===(e=this.selector("TextPositionSelector"))||void 0===e?void 0:e.start}},{key:"end",get:function(){var e;return null===(e=this.selector("TextPositionSelector"))||void 0===e?void 0:e.end}}]);function sa(e){return(sa="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 la(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 ua(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?la(Object(n),!0).forEach(function(t){ca(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):la(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ca(e,t,n){return(t=pa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pa(e){var t=function(e){if("object"!=sa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sa(t)?t:t+""}qi=aa,oa(aa,"create",function(e){var t={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:"#".concat(Ki()),body:[]};return new qi(ra(ra({},t),e))});var fa=function(e,t){return t&&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,pa(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),ca(this,"clone",function(t){var n=new e;return n.underlying=JSON.parse(JSON.stringify(r.underlying)),t&&(n.underlying=ua(ua({},n.underlying),t)),n}),ca(this,"selector",function(e){var t=r.underlying.target;if(t.selector)return(Array.isArray(t.selector)?t.selector:[t.selector]).find(function(t){return t.type===e})}),ca(this,"toAnnotation",function(){var e=Object.assign({},r.underlying,{type:"Annotation",id:"#".concat(Ki())});return new aa(e)}),this.underlying={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Selection",body:n||[],target:t}},[{key:"context",get:function(){return this.underlying["@context"]}},{key:"type",get:function(){return this.underlying.type}},{key:"body",get:function(){return this.underlying.body}},{key:"target",get:function(){return this.underlying.target}},{key:"targets",get:function(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}},{key:"isEqual",value:function(e){return!!e&&ea()(this.underlying,e.underlying)}},{key:"bodies",get:function(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}},{key:"quote",get:function(){var e;return null===(e=this.selector("TextQuoteSelector"))||void 0===e?void 0:e.exact}},{key:"isSelection",get:function(){return!0}}]);function da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ha=function(e,t){var n,r=e.selector("FragmentSelector");if(null!=r&&r.conformsTo.startsWith("http://www.w3.org/TR/media-frags")){var o=r.value,i=o.includes(":")?o.substring(o.indexOf("=")+1,o.indexOf(":")):"pixel",a=function(e){if(Array.isArray(e))return e}(n=(o.includes(":")?o.substring(o.indexOf(":")+1):o.substring(o.indexOf("=")+1)).split(",").map(parseFloat))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),4!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return da(e,4);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?da(e,4):void 0}}(n)||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.")}(),s=a[0],l=a[1],u=a[2],c=a[3];return"percent"===i.toLowerCase()&&(s=s*t.naturalWidth/100,l=l*t.naturalHeight/100,u=u*t.naturalWidth/100,c=c*t.naturalHeight/100),{x:s,y:l,w:u,h:c}}},ma=function(e,t,n,r,o,i,a){return"percent"===(null==i?void 0:i.toLowerCase())?(s=t,l=n,u=r,p=a,f=e/(c=o).naturalWidth*100,d=s/c.naturalHeight*100,h=l/c.naturalWidth*100,m=u/c.naturalHeight*100,{source:c.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:"xywh=percent:".concat(f,",").concat(d,",").concat(h,",").concat(m)},color:p,renderedVia:{name:"rect"}}):function(e,t,n,r,o,i){return{source:null==o?void 0:o.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:"xywh=pixel:".concat(e,",").concat(t,",").concat(n,",").concat(r)},color:i,renderedVia:{name:"rect"}}}(e,t,n,r,o,a);var s,l,u,c,p,f,d,h,m},ya=function(e,t,n,r,o){e.setAttribute("x",t),e.setAttribute("y",n),e.setAttribute("width",r),e.setAttribute("height",o)},ba=function(e,t,n){e.setAttribute("cx",t),e.setAttribute("cy",n),e.setAttribute("r",7)},ga=function(e,t,n,r,o){var i=document.createElementNS(Fi,"path");i.setAttribute("fill-rule","evenodd");var a=e.naturalWidth,s=e.naturalHeight;return i.setAttribute("d","M0 0 h".concat(a," v").concat(s," h-").concat(a," z M").concat(t," ").concat(n," h").concat(r," v").concat(o," h-").concat(r," z")),i},va=function(e,t,n,r,o,i){var a=t.naturalWidth,s=t.naturalHeight;e.setAttribute("d","M0 0 h".concat(a," v").concat(s," h-").concat(a," z M").concat(n," ").concat(r," h").concat(o," v").concat(i," h-").concat(o," z"))},wa=function(e,t,n,r){var o="Annotation"===e.type||"Selection"===e.type?ha(e,t):{x:e,y:t,w:n,h:r},i=o.x,a=o.y,s=o.w,l=o.h,u=document.createElementNS(Fi,"g");if(0===s&&0===l){var c;zi(u,"a9s-point"),zi(u,"a9s-non-scaling"),u.setAttribute("transform-origin","".concat(i," ").concat(a));var p=document.createElementNS(Fi,"circle"),f=document.createElementNS(Fi,"circle");f.setAttribute("class","a9s-inner"),ba(f,i,a),p.setAttribute("class","a9s-outer"),ba(p,i,a),null!==(c=e.target)&&void 0!==c&&c.color&&(f.setAttribute("style","stroke: ".concat(e.target.color,";fill: none;")),p.setAttribute("style","stroke: ".concat(e.target.color,";fill: none;"))),u.appendChild(p),u.appendChild(f)}else{var d,h=document.createElementNS(Fi,"rect"),m=document.createElementNS(Fi,"rect");m.setAttribute("class","a9s-inner"),ya(m,i,a,s,l),h.setAttribute("class","a9s-outer"),ya(h,i,a,s,l),null!==(d=e.target)&&void 0!==d&&d.color&&(m.setAttribute("style","stroke: ".concat(e.target.color,";")),h.setAttribute("style","stroke: ".concat(e.target.color,";"))),u.appendChild(h),u.appendChild(m)}return u},Aa=function(e){var t=e.querySelector(".a9s-outer");return"rect"===t.nodeName?{x:parseFloat(t.getAttribute("x")),y:parseFloat(t.getAttribute("y")),w:parseFloat(t.getAttribute("width")),h:parseFloat(t.getAttribute("height"))}:{x:parseFloat(t.getAttribute("cx")),y:parseFloat(t.getAttribute("cy")),w:0,h:0}},Sa=function(e,t,n,r,o){var i=e.querySelector(".a9s-inner"),a=e.querySelector(".a9s-outer");"rect"===a.nodeName?(ya(i,t,n,r,o),ya(a,t,n,r,o)):(ba(i,t,n),ba(a,t,n))};function Oa(e){return(Oa="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 Ea(e,t,n){return(t=xa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e){var t=function(e){if("object"!=Oa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Oa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oa(t)?t:t+""}var Ca=function(e,t){return t&&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,xa(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o,i,a){var s=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ea(this,"dragTo",function(e,t){s.group.style.display=null,s.opposite=[e,t];var n=s.bbox,r=n.x,o=n.y,i=n.w,a=n.h;va(s.mask,s.env.image,r,o,i,a),Sa(s.rect,r,o,i,a)}),Ea(this,"getBoundingClientRect",function(){return s.rect.getBoundingClientRect()}),Ea(this,"toSelection",function(){var e=s.bbox,t=e.x,n=e.y,r=e.w,o=e.h;return new fa(ma(t,n,r,o,s.env.image,s.config.fragmentUnit,s.color))}),Ea(this,"destroy",function(){s.group.parentNode.removeChild(s.group),s.mask=null,s.rect=null,s.group=null}),this.anchor=[t,n],this.opposite=[t,n],this.config=o,this.env=i,this.color=a,this.group=document.createElementNS(Fi,"g"),this.mask=ga(i.image,t,n,2,2),this.mask.setAttribute("class","a9s-selection-mask"),this.rect=wa(t,n,2,2),this.rect.setAttribute("class","a9s-selection"),a&&(this.rect.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(a,";")),this.rect.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(a,";"))),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask),this.group.appendChild(this.rect),r.appendChild(this.group)},[{key:"bbox",get:function(){var e=this.opposite[0]-this.anchor[0],t=this.opposite[1]-this.anchor[1];return{x:e>0?this.anchor[0]:this.opposite[0],y:t>0?this.anchor[1]:this.opposite[1],w:Math.max(1,Math.abs(e)),h:Math.max(1,Math.abs(t))}}},{key:"element",get:function(){return this.rect}}]),Ma={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},ja=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0};function Pa(e){return(Pa="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 Ia(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ka(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,Ga(r.key),r)}}function Ta(e,t,n){return t&&ka(e.prototype,t),n&&ka(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Da(e,t,n){return t=Na(t),function(e,t){if(t&&("object"==Pa(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)}(e,Ra()?Reflect.construct(t,n||[],Na(e).constructor):t.apply(e,n))}function Ra(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ra=function(){return!!e})()}function Na(e){return(Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ba(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&&La(e,t)}function La(e,t){return(La=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _a(e,t,n){return(t=Ga(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ga(e){var t=function(e){if("object"!=Pa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pa(t)?t:t+""}var Ha="An implementation is missing",Fa=ja(),Ua=function(e){function t(e,n,r,o){var i;Ia(this,t),_a(i=Da(this,t),"enableResponsive",function(){window.ResizeObserver&&(i.resizeObserver=new ResizeObserver(function(){var e=i.svg.getBoundingClientRect(),t=i.svg.viewBox.baseVal,n=t.width,r=t.height;i.scale=Math.max(n/e.width,r/e.height),i.onScaleChanged&&i.onScaleChanged(i.scale)}),i.resizeObserver.observe(i.svg.parentNode))}),_a(i,"getSVGPoint",function(e){var t=i.svg.createSVGPoint();if(Fa){var n=i.svg.getBoundingClientRect(),r=e.clientX-n.x,o=e.clientY-n.y,a=i.svg.getBoundingClientRect(),s=a.left,l=a.top;return t.x=r+s,t.y=o+l,t.matrixTransform(i.g.getScreenCTM().inverse())}return t.x=e.offsetX,t.y=e.offsetY,t.matrixTransform(i.g.getCTM().inverse())}),_a(i,"drawHandle",function(e,t){var n=document.createElementNS(Fi,"g");n.setAttribute("class","a9s-handle");var r=document.createElementNS(Fi,"g"),o=function(n){var r=document.createElementNS(Fi,"circle");return r.setAttribute("cx",e),r.setAttribute("cy",t),r.setAttribute("r",n),r.setAttribute("transform-origin","".concat(e," ").concat(t)),r},a=i.config.handleRadius||6,s=o(a);s.setAttribute("class","a9s-handle-inner");var l=o(a+1);return l.setAttribute("class","a9s-handle-outer"),r.appendChild(l),r.appendChild(s),n.appendChild(r),n}),_a(i,"setHandleXY",function(e,t,n){var r=e.querySelector(".a9s-handle-inner");r.setAttribute("cx",t),r.setAttribute("cy",n),r.setAttribute("transform-origin","".concat(t," ").concat(n));var o=e.querySelector(".a9s-handle-outer");o.setAttribute("cx",t),o.setAttribute("cy",n),o.setAttribute("transform-origin","".concat(t," ").concat(n))}),_a(i,"getHandleXY",function(e){var t=e.querySelector(".a9s-handle-outer");return{x:parseFloat(t.getAttribute("cx")),y:parseFloat(t.getAttribute("cy"))}}),_a(i,"scaleHandle",function(e){var t=e.querySelector(".a9s-handle-inner"),n=e.querySelector(".a9s-handle-outer"),r=i.scale*(i.config.handleRadius||6);t.setAttribute("r",r),n.setAttribute("r",r)}),i.svg=e.closest("svg"),i.g=e,i.config=n,i.env=r,i.color=o,i.scale=1;var a=r.image;return(a instanceof Element||a instanceof HTMLDocument)&&i.enableResponsive(),i}return Ba(t,e),Ta(t,[{key:"destroy",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null}}])}(n()),za=function(e){function t(e,n,r,o){var i;return Ia(this,t),_a(i=Da(this,t,[e,n,r,o]),"attachListeners",function(e){var t=e.mouseMove,n=e.mouseUp,r=e.dblClick;t&&(i.mouseMove=function(e){var n=i.getSVGPoint(e),r=n.x,o=n.y;i.started||(i.emit("startSelection",{x:r,y:o}),i.started=!0),t(r,o,e)},i.svg.addEventListener("mousemove",i.mouseMove)),n&&(i.mouseUp=function(e){if(0===e.button){var t=i.getSVGPoint(e),r=t.x,o=t.y;n(r,o,e)}},document.addEventListener("mouseup",i.mouseUp)),r&&(i.dblClick=function(e){var t=i.getSVGPoint(e),n=t.x,o=t.y;r(n,o,e)},document.addEventListener("dblclick",i.dblClick))}),_a(i,"detachListeners",function(){i.mouseMove&&i.svg.removeEventListener("mousemove",i.mouseMove),i.mouseUp&&document.removeEventListener("mouseup",i.mouseUp),i.dblClick&&document.removeEventListener("dblclick",i.dblClick)}),_a(i,"start",function(e,t){var n=i.getSVGPoint(e),r=n.x,o=n.y,a=i.env.image,s=a.naturalWidth,l=a.naturalHeight,u=r<0?0:r>s?s:r,c=o<0?0:o>l?l:o;i.startDrawing(u,c,t,e)}),_a(i,"startDrawing",function(e){throw new Error(Ha)}),_a(i,"createEditableShape",function(e,t){throw new Error(Ha)}),i.started=!1,i}return Ba(t,e),Ta(t,[{key:"isDrawing",get:function(){throw new Error(Ha)}}])}(Ua);function Ya(e){return(Ya="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 Va(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Va=function(){return!!e})()}function Qa(e){return(Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ja(e,t){return(Ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wa(e){var t=function(e){if("object"!=Ya(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ya(t)?t:t+""}za.supports=function(e){throw new Error(Ha)};var Za="An implementation is missing",Xa=function(e){function t(e,n,r,o,i){var a,s,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){(t=Wa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}((s=this,u=[n,r,o,i],l=Qa(l=t),a=function(e,t){if(t&&("object"==Ya(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)}(s,Va()?Reflect.construct(l,u||[],Qa(s).constructor):l.apply(s,u))),"updateState",function(e){throw new Error(Za)}),a.annotation=e,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ja(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){throw new Error(Za)}}])&&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,Wa(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ua);function Ka(e){return function(e){if(Array.isArray(e))return qa(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){if("string"==typeof e)return qa(e,t);var n={}.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)?qa(e,t):void 0}}(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 qa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var $a=/firefox/i.test(navigator.userAgent),es=function(e,t,n,r,o){e.setAttribute("width",r),e.setAttribute("height",o),$a?(e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("transform","translate(".concat(t,", ").concat(n,")"))):(e.setAttribute("x",t),e.setAttribute("y",n))},ts=function(e,t,n){if(!n)return e;Array.isArray(n)||(n=[n]);var r=n.reduce(function(e,n){var r=n(t);if(!r)return e;if("string"==typeof r||r instanceof String)e.className=e.className?"".concat(e.className," ").concat(r):r;else if(r.nodeType===Node.ELEMENT_NODE)e.elements=e.elements?[].concat(Ka(e.elements),[r]):[r];else{var o=r.className,i=r.style,a=r.element;o&&(e.className=e.className?"".concat(e.className," ").concat(o):o),i&&(e.style=e.style?"".concat(e.style," ").concat(i):i),a&&(e.elements=e.elements?[].concat(Ka(e.elements),[a]):[a])}for(var s in r)r.hasOwnProperty(s)&&s.startsWith("data-")&&(e[s]=r[s]);return e},{}),o=r.className,i=r.style,a=r.elements;if(o&&zi(e,o),i){var s=e.querySelector(".a9s-outer"),l=e.querySelector(".a9s-inner");s&&l?(s.setAttribute("style","display:none"),l.setAttribute("style",i)):e.setAttribute("style",i)}for(var u in a&&a.forEach(function(t){return function(e,t){var n=t.getBBox(),r=n.x,o=n.y,i=n.width,a=n.height,s=document.createElementNS(Fi,"svg");s.setAttribute("class","a9s-formatter-el"),es(s,r,o,i,a);var l=document.createElementNS(Fi,"g");l.appendChild(e),s.appendChild(l),t.append(s)}(t,e)}),r)r.hasOwnProperty(u)&&u.startsWith("data-")&&e.setAttribute(u,r[u])},ns=function(e,t,n,r,o){var i=e.querySelector(".a9s-formatter-el");i&&es(i,t,n,r,o)};function rs(e){return(rs="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 os(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return is(e,t);var n={}.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)?is(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 is(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function as(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(as=function(){return!!e})()}function ss(){return ss="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ls(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ss.apply(null,arguments)}function ls(e){return(ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function us(e,t){return(us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cs(e,t,n){return(t=ps(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ps(e){var t=function(e){if("object"!=rs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rs(t)?t:t+""}var fs="corner",ds="edge",hs=function(e){function t(e,n,r,o,i){var a,s,l,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),cs((s=this,u=[e,n,r,o,i],l=ls(l=t),a=function(e,t){if(t&&("object"==rs(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)}(s,as()?Reflect.construct(l,u||[],ls(s).constructor):l.apply(s,u))),"onScaleChanged",function(){return a.handles.map(a.scaleHandle)}),cs(a,"setSize",function(e,t,n,r){Sa(a.rectangle,e,t,n,r),va(a.mask,a.env.image,e,t,n,r),ns(a.elementGroup,e,t,n,r);var o=os(a.handles,8),i=o[0],s=o[1],l=o[2],u=o[3],c=o[4],p=o[5],f=o[6],d=o[7];a.setHandleXY(i,e,t),a.setHandleXY(s,e+n,t),a.setHandleXY(l,e+n,t+r),a.setHandleXY(u,e,t+r),a.enableEdgeControls&&(a.setHandleXY(c,e+n/2,t),a.setHandleXY(p,e+n,t+r/2),a.setHandleXY(f,e+n/2,t+r),a.setHandleXY(d,e,t+r/2))}),cs(a,"stretchCorners",function(e,t,n){var r=a.getHandleXY(t),o=n.x-r.x,i=n.y-r.y,s=o>0?r.x:n.x,l=i>0?r.y:n.y,u=Math.abs(o),c=Math.abs(i);return a.setSize(s,l,u,c),{x:s,y:l,w:u,h:c}}),cs(a,"stretchEdge",function(e,t,n){var r=a.getHandleXY(t),o=Aa(a.rectangle),i=e%2==0,s=i?o.w:n.x-r.x,l=i?n.y-r.y:o.h,u=i?o.x:s>0?r.x:n.x,c=i?l>0?r.y:n.y:o.y,p=Math.abs(s),f=Math.abs(l);return a.setSize(u,c,p,f),{x:u,y:c,w:p,h:f}}),cs(a,"onGrab",function(e,t){return function(n){if(0===n.button){a.grabbedElem=e,a.grabbedType=t;var r=a.getSVGPoint(n),o=Aa(a.rectangle),i=o.x,s=o.y;a.mouseOffset={x:r.x-i,y:r.y-s}}}}),cs(a,"onMouseMove",function(e){if(0===e.button){var t=function(e,t){return e<0?0:e>t?t:e};if(a.grabbedElem){var n=a.getSVGPoint(e);if(a.grabbedElem===a.rectangle){var r,o,i=Aa(a.rectangle),s=i.w,l=i.h,u=a.env.image,c=u.naturalWidth,p=u.naturalHeight,f=t(n.x-a.mouseOffset.x,c-s),d=t(n.y-a.mouseOffset.y,p-l);a.setSize(f,d,s,l);var h=null!==(r=a.annotation.target)&&void 0!==r&&r.color?null===(o=a.annotation.target)||void 0===o?void 0:o.color:a.color?a.color:null;a.emit("update",ma(f,d,s,l,a.env.image,a.config.fragmentUnit,h))}else{var m,y,b=a.handles.indexOf(a.grabbedElem),g=a.handles[2^b],v=a.grabbedType===fs?a.stretchCorners(b,g,n):a.stretchEdge(b,g,n),w=v.x,A=v.y,S=v.w,O=v.h,E=null!==(m=a.annotation.target)&&void 0!==m&&m.color?null===(y=a.annotation.target)||void 0===y?void 0:y.color:a.color?a.color:null;a.emit("update",ma(w,A,S,O,a.env.image,a.config.fragmentUnit,E))}}}}),cs(a,"onMouseUp",function(e){a.grabbedElem=null,a.grabbedType=null,a.mouseOffset=null}),cs(a,"updateState",function(e){var t=ha(e,a.env.image),n=t.x,r=t.y,o=t.w,i=t.h;a.setSize(n,r,o,i)}),a.svg.addEventListener("mousemove",a.onMouseMove),a.svg.addEventListener("mouseup",a.onMouseUp);var c=ha(e,o.image),p=c.x,f=c.y,d=c.w,h=c.h;a.containerGroup=document.createElementNS(Fi,"g"),a.mask=ga(o.image,p,f,d,h),a.mask.setAttribute("class","a9s-selection-mask"),a.containerGroup.appendChild(a.mask),a.elementGroup=document.createElementNS(Fi,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.rectangle=wa(p,f,d,h),a.rectangle.querySelector(".a9s-inner").addEventListener("mousedown",a.onGrab(a.rectangle)),e.target.color?(a.rectangle.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(e.target.color,";")),a.rectangle.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(e.target.color,";"))):i&&(a.rectangle.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(i,";")),a.rectangle.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(i,";"))),a.elementGroup.appendChild(a.rectangle),a.enableEdgeControls=r.enableEdgeControls;var m=a.enableEdgeControls?[[p+d/2,f,ds],[p+d,f+h/2,ds],[p+d/2,f+h,ds],[p,f+h/2,ds]]:[];return a.handles=[[p,f,fs],[p+d,f,fs],[p+d,f+h,fs],[p,f+h,fs]].concat(m).map(function(e){var t=os(e,3),n=t[0],r=t[1],o=t[2],i=a.drawHandle(n,r);return i.addEventListener("mousedown",a.onGrab(i,o)),a.elementGroup.appendChild(i),i}),a.containerGroup.appendChild(a.elementGroup),n.appendChild(a.containerGroup),ts(a.rectangle,e,r.formatter),a.grabbedElem=null,a.grabbedType=null,a.mouseOffset=null,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&us(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}},{key:"destroy",value:function(){var e,n;this.containerGroup.parentNode.removeChild(this.containerGroup),(e=this,"function"==typeof(n=ss(ls(t.prototype),"destroy",e))?function(t){return n.apply(e,t)}:n)([])}}])&&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,ps(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function ms(e){return(ms="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 ys(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 bs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ys(Object(n),!0).forEach(function(t){As(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gs=function(){return!!e})()}function vs(e){return(vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ws(e,t){return(ws=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function As(e,t,n){return(t=Ss(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ss(e){var t=function(e){if("object"!=ms(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ms(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ms(t)?t:t+""}var Os=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),As((a=this,l=[e,n,r,o],s=vs(s=t),i=function(e,t){if(t&&("object"==ms(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)}(a,gs()?Reflect.construct(s,l||[],vs(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i.isDrawing||(i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new Ca(e,t,i.g,i.config,i.env,i.color))}),As(i,"stop",function(){i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),As(i,"onMouseMove",function(e,t){var n=i.env.image,r=n.naturalWidth,o=n.naturalHeight,a=Math.min(Math.max(e,0),r),s=Math.min(Math.max(t,0),o);i.rubberband.dragTo(a,s)}),As(i,"onMouseUp",function(){i.detachListeners(),i.started=!1;var e=i.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=i.config.minSelectionWidth||4,o=i.config.minSelectionHeight||4;if(t>=r&&n>=o){var a=i.rubberband.element;a.annotation=i.rubberband.toSelection(),i.emit("complete",a)}else i.emit("cancel");i.stop()}),As(i,"createEditableShape",function(e,t){return new hs(e,i.g,bs(bs({},i.config),{},{formatters:t}),i.env,i.color)}),i.rubberband=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ws(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return null!=this.rubberband}}])&&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,Ss(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function Es(e){return function(e){if(Array.isArray(e))return Ms(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Cs(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 xs(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Cs(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Cs(e,t){if(e){if("string"==typeof e)return Ms(e,t);var n={}.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)?Ms(e,t):void 0}}function Ms(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Os.identifier="rect",Os.supports=function(e){var t=e.selector("FragmentSelector");return null==t?void 0:t.conformsTo.startsWith("http://www.w3.org/TR/media-frags")};var js=function(e){for(var t=0,n=e.length-1,r=0;r<e.length;r++)t+=(e[n][0]+e[r][0])*(e[n][1]-e[r][1]),n=r;return Math.abs(.5*t)},Ps=function(e,t){for(var n=e[0],r=e[1],o=!1,i=0,a=t.length-1;i<t.length;a=i++){var s=t[i][0],l=t[i][1],u=t[a][0],c=t[a][1];l>r!=c>r&&n<(u-s)*(r-l)/(c-l)+s&&(o=!o)}return o},Is=function(e){var t,n=[],r=[],o=xs(e.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(function(e){return e.trim()}));try{for(o.s();!(t=o.n()).done;){var i=t.value,a=i.substring(0,1);if("z"===a.toLowerCase())n.push(Es(r)),r=[];else{var s=i.substring(1).split(" ").map(function(e){return parseFloat(e.trim())}),l=a===a.toUpperCase(),u=l?s[0]:s[0]+r[r.length-1][0],c=l?s[1]:s[1]+r[r.length-1][1];r.push([u,c])}}}catch(p){o.e(p)}finally{o.f()}return r.length>0&&n.push(Es(r)),n};function ks(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ts=function(e){var t=function(e){Array.from(e.attributes).forEach(function(t){t.name.startsWith("on")&&e.removeAttribute(t.name)})},n=e.getElementsByTagName("script");return Array.from(n).reverse().forEach(function(e){return e.parentNode.removeChild(e)}),t(e),Array.from(e.querySelectorAll("*")).forEach(t),e},Ds=function(e){var t,n,r=e.selector("SvgSelector");if(r){var o=new DOMParser,i=r.value,a=o.parseFromString(i,"image/svg+xml"),s=a.lookupPrefix(Fi),l=a.lookupNamespaceURI(null);return s||l?Ts(a).firstChild:Ts((t=a,n=(new XMLSerializer).serializeToString(t.documentElement).replace("<svg>",'<svg xmlns="'.concat(Fi,'">')),(new DOMParser).parseFromString(n,"image/svg+xml").documentElement)).firstChild}},Rs=function(e){var t=Ds(e),n=document.createElementNS(Fi,"g"),r=t.cloneNode(!0);r.setAttribute("class","a9s-inner");var o=t.cloneNode(!0);return o.setAttribute("class","a9s-outer"),e.target.color&&(r.setAttribute("style","stroke: ".concat(e.target.color,";")),o.setAttribute("style","stroke: ".concat(e.target.color,";"))),n.appendChild(o),n.appendChild(r),n},Ns=function(e,t){var n=e.querySelector(".a9s-inner").cloneNode(!0);n.removeAttribute("class"),n.removeAttribute("xmlns");var r=n.outerHTML||(new XMLSerializer).serializeToString(n);return r=r.replace(' xmlns="'.concat(Fi,'"'),""),{source:null==t?void 0:t.src,selector:{type:"SvgSelector",value:"<svg>".concat(r,"</svg>")}}};function Bs(e){return(Bs="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 Ls(e,t,n){return(t=_s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _s(e){var t=function(e){if("object"!=Bs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bs(t)?t:t+""}var Gs=function(e,t){return t&&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,_s(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),Ls(this,"redraw",function(){r.mask.setAttribute("d","M0 0 h".concat(r.w," v").concat(r.h," h-").concat(r.w," z M").concat(r.polygon.getAttribute("points")," z"))}),Ls(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.polygon=n,this.mask=document.createElementNS(Fi,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d","M0 0 h".concat(this.w," v").concat(this.h," h-").concat(this.w," z M").concat(this.polygon.getAttribute("points")," z"))},[{key:"element",get:function(){return this.mask}}]);function Hs(e){return(Hs="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 Fs(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 Us(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fs(Object(n),!0).forEach(function(t){Qs(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zs(e){return function(e){if(Array.isArray(e))return Vs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ys(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 Ys(e,t){if(e){if("string"==typeof e)return Vs(e,t);var n={}.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)?Vs(e,t):void 0}}function Vs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qs(e,t,n){return(t=Js(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e){var t=function(e){if("object"!=Hs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hs(t)?t:t+""}var Ws=function(e,t){return t&&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,Js(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qs(this,"setPoints",function(e){var t=e.map(function(e){return"".concat(e[0],",").concat(e[1])}).join(" ");i.outer.setAttribute("points",t),i.inner.setAttribute("points",t)}),Qs(this,"getBoundingClientRect",function(){return i.outer.getBoundingClientRect()}),Qs(this,"dragTo",function(e){i.group.style.display=null,i.mousepos=e;var t=[].concat(zs(i.points),[e]);i.setPoints(t),i.mask.redraw()}),Qs(this,"addPoint",function(){var e,t=function(e){if(Array.isArray(e))return e}(e=i.mousepos)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||Ys(e,2)||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.")}(),n=t[0],r=t[1],o=i.points[i.points.length-1];Math.pow(n-o[0],2)+Math.pow(r-o[1],2)>4&&(i.points=[].concat(zs(i.points),[i.mousepos]),i.setPoints(i.points),i.mask.redraw())}),Qs(this,"destroy",function(){i.group.parentNode.removeChild(i.group),i.polygon=null,i.group=null}),Qs(this,"toSelection",function(){return new fa(Us(Us({},Ns(i.group,i.env.image)),{},{renderedVia:{name:"polygon"}}))}),this.points=[t],this.env=r,this.mousepos=t,this.group=document.createElementNS(Fi,"g"),this.polygon=document.createElementNS(Fi,"g"),this.polygon.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Fi,"polygon"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Fi,"polygon"),this.inner.setAttribute("class","a9s-inner"),o&&(this.outer.setAttribute("style","stroke: ".concat(o,";")),this.inner.setAttribute("style","stroke: ".concat(o,";"))),this.setPoints(this.points),this.mask=new Gs(r.image,this.inner),this.polygon.appendChild(this.outer),this.polygon.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.polygon),n.appendChild(this.group)},[{key:"element",get:function(){return this.polygon}}]);function Zs(e){return(Zs="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 Xs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ks(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ks=function(){return!!e})()}function qs(e,t){return(qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $s(){return $s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=el(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},$s.apply(null,arguments)}function el(e){return(el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tl(e,t,n){return(t=nl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nl(e){var t=function(e){if("object"!=Zs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zs(t)?t:t+""}var rl=function(e){for(var t=e.querySelector(".a9s-inner").points,n=[],r=0;r<t.numberOfItems;r++)n.push(t.getItem(r));return n},ol=function(e){function t(e,n,r,o,i){var a,s,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),tl((s=this,u=[e,n,r,o,i],l=el(l=t),a=function(e,t){if(t&&("object"==Zs(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)}(s,Ks()?Reflect.construct(l,u||[],el(s).constructor):l.apply(s,u))),"onScaleChanged",function(){return a.handles.map(a.scaleHandle)}),tl(a,"setPoints",function(e){var t=function(e){return Math.round(10*e)/10},n=e.map(function(e){return"".concat(t(e.x),",").concat(t(e.y))}).join(" ");a.shape.querySelector(".a9s-inner").setAttribute("points",n);var r=a.shape.querySelector(".a9s-outer");r.setAttribute("points",n),a.mask.redraw();var o=r.getBBox(),i=o.x,s=o.y,l=o.width,u=o.height;ns(a.elementGroup,i,s,l,u)}),tl(a,"onGrab",function(e){return function(t){0===t.button&&(a.grabbedElem=e,a.grabbedAt=a.getSVGPoint(t))}}),tl(a,"onMouseMove",function(e){var t=function(e,t,n){return e+t<0?-e:e+t>n?n-e:t};if(a.grabbedElem){var n=a.getSVGPoint(e);if(a.grabbedElem===a.shape){var r=a.shape.querySelector(".a9s-inner").getBBox(),o=r.x,i=r.y,s=r.width,l=r.height,u=a.env.image,c=u.naturalWidth,p=u.naturalHeight,f=t(o,n.x-a.grabbedAt.x,c-s),d=t(i,n.y-a.grabbedAt.y,p-l),h=rl(a.shape).map(function(e){return{x:e.x+f,y:e.y+d}});a.grabbedAt=n,a.setPoints(h),h.forEach(function(e,t){return a.setHandleXY(a.handles[t],e.x,e.y)}),a.emit("update",Ns(a.shape,a.env.image))}else{var m=a.handles.indexOf(a.grabbedElem),y=rl(a.shape).map(function(e,t){return t===m?n:e});a.setPoints(y),a.setHandleXY(a.handles[m],n.x,n.y),a.emit("update",Ns(a.shape,a.env.image))}}}),tl(a,"onMouseUp",function(e){a.grabbedElem=null,a.grabbedAt=null}),tl(a,"updateState",function(e){var t=Ds(e).getAttribute("points").split(" ").map(function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(",").map(function(e){return parseFloat(e.trim())}))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return Xs(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Xs(e,2):void 0}}(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.")}();return{x:n[0],y:n[1]}});a.setPoints(t),t.forEach(function(e,t){return a.setHandleXY(a.handles[t],e.x,e.y)})}),tl(a,"destroy",function(){a.containerGroup.parentNode.removeChild(a.containerGroup),function(e,t,n){var r=$s(el(e.prototype),"destroy",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,a)([])}),a.svg.addEventListener("mousemove",a.onMouseMove),a.svg.addEventListener("mouseup",a.onMouseUp),a.containerGroup=document.createElementNS(Fi,"g"),a.shape=Rs(e),a.shape.querySelector(".a9s-inner").addEventListener("mousedown",a.onGrab(a.shape)),a.mask=new Gs(o.image,a.shape.querySelector(".a9s-inner")),a.containerGroup.appendChild(a.mask.element),a.elementGroup=document.createElementNS(Fi,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.elementGroup.appendChild(a.shape),a.handles=rl(a.shape).map(function(e){var t=a.drawHandle(e.x,e.y);return t.addEventListener("mousedown",a.onGrab(t)),a.elementGroup.appendChild(t),t}),a.containerGroup.appendChild(a.elementGroup),n.appendChild(a.containerGroup),ts(a.shape,e,r.formatters),a.grabbedElem=null,a.grabbedAt=null,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qs(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}}])&&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,nl(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function il(e){return(il="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 al(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 sl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?al(Object(n),!0).forEach(function(t){pl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):al(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ll(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ll=function(){return!!e})()}function ul(e){return(ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cl(e,t){return(cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pl(e,t,n){return(t=fl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fl(e){var t=function(e){if("object"!=il(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=il(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==il(t)?t:t+""}var dl=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),pl((a=this,l=[e,n,r,o],s=ul(s=t),i=function(e,t){if(t&&("object"==il(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)}(a,ll()?Reflect.construct(s,l||[],ul(a).constructor):s.apply(a,l))),"startDrawing",function(e,t,n){i._isDrawing=!0,i._startOnSingleClick=n,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp,dblClick:i.onDblClick}),i.rubberband=new Ws([e,t],i.g,i.env,i.color)}),pl(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),pl(i,"onMouseMove",function(e,t){return i.rubberband.dragTo([e,t])}),pl(i,"onMouseUp",function(){var e=i.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=i.config.minSelectionWidth||4,o=i.config.minSelectionHeight||4;t>=r||n>=o?i.rubberband.addPoint():i._startOnSingleClick||(i.emit("cancel"),i.stop())}),pl(i,"onDblClick",function(){i._isDrawing=!1;var e=i.rubberband.element;e.annotation=i.rubberband.toSelection(),i.emit("complete",e),i.stop()}),pl(i,"createEditableShape",function(e,t){return new ol(e,i.g,sl(sl({},i.config),{},{formatters:t}),i.env,i.color)}),i._isDrawing=!1,i._startOnSingleClick=!1,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cl(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return this._isDrawing}}])&&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,fl(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function hl(e){return(hl="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 ml(e,t,n){return(t=yl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yl(e){var t=function(e){if("object"!=hl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hl(t)?t:t+""}dl.identifier="polygon",dl.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<polygon/g)};var bl=function(e,t){return t&&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,yl(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),ml(this,"redraw",function(){r.mask.setAttribute("d","M0 0 h".concat(r.w," v").concat(r.h," h-").concat(r.w," z M").concat(r.line.getAttribute("x1")," ").concat(r.line.getAttribute("y1")," ").concat(r.line.getAttribute("x2")," ").concat(r.line.getAttribute("y2"),"z"))}),ml(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.line=n,this.mask=document.createElementNS(Fi,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d","M0 0 h".concat(this.w," v").concat(this.h," h-").concat(this.w," z M").concat(this.line.getAttribute("x1")," ").concat(this.line.getAttribute("y1")," z"))},[{key:"element",get:function(){return this.mask}}]);function gl(e){return(gl="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 vl(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 wl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vl(Object(n),!0).forEach(function(t){Sl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Al(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sl(e,t,n){return(t=Ol(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ol(e){var t=function(e){if("object"!=gl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gl(t)?t:t+""}var El=function(e,t){return t&&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,Ol(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Sl(this,"setPoints",function(e){var t=e;i.outer.setAttribute("x1",t[0]),i.inner.setAttribute("x1",t[0]),i.outer.setAttribute("y1",t[1]),i.inner.setAttribute("y1",t[1]),t.length>2&&(i.outer.setAttribute("x2",t[2]),i.inner.setAttribute("x2",t[2]),i.outer.setAttribute("y2",t[3]),i.inner.setAttribute("y2",t[3]))}),Sl(this,"getBoundingClientRect",function(){return i.outer.getBoundingClientRect()}),Sl(this,"dragTo",function(e){i.group.style.display=null,i.mousepos=e;var t,n=[].concat(function(e){if(Array.isArray(e))return Al(e)}(t=i.points)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Al(e,t);var n={}.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)?Al(e,t):void 0}}(t)||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.")}(),[e[0],e[1]]);i.setPoints(n),i.mask.redraw()}),Sl(this,"addPoint",function(e){i.points.length<=2&&(i.points[2]=e[0],i.points[3]=e[1],i.setPoints(i.points))}),Sl(this,"undo",function(){i.points[i.points.length-1].length>2?i.points[i.points.length-1].pop():i.points.length>1&&i.points.pop()}),Sl(this,"newPart",function(){i.points.push([])}),Sl(this,"destroy",function(){i.group.parentNode.removeChild(i.group),i.Line=null,i.group=null}),Sl(this,"toSelection",function(){return new fa(wl(wl({},Ns(i.group,i.env.image)),{},{renderedVia:{name:"line"}}))}),this.points=t,this.env=r,this.group=document.createElementNS(Fi,"g"),this.Line=document.createElementNS(Fi,"g"),this.Line.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Fi,"line"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Fi,"line"),this.inner.setAttribute("class","a9s-inner"),o&&(this.outer.setAttribute("style","stroke: ".concat(o,";")),this.inner.setAttribute("style","stroke: ".concat(o,";"))),this.setPoints(this.points),this.mask=new bl(r.image,this.inner),this.Line.appendChild(this.outer),this.Line.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.Line),n.appendChild(this.group)},[{key:"element",get:function(){return this.Line}}]);function xl(e){return(xl="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 Cl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ml(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ml=function(){return!!e})()}function jl(e,t){return(jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Pl(){return Pl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Il(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Pl.apply(null,arguments)}function Il(e){return(Il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kl(e,t,n){return(t=Tl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tl(e){var t=function(e){if("object"!=xl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xl(t)?t:t+""}var Dl=function(e){var t=e.querySelector(".a9s-inner");return[[t.x1.baseVal,t.y1.baseVal],[t.x2.baseVal,t.y2.baseVal]]},Rl=function(e){function t(e,n,r,o,i){var a,s,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),kl((s=this,u=[e,n,r,o,i],l=Il(l=t),a=function(e,t){if(t&&("object"==xl(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)}(s,Ml()?Reflect.construct(l,u||[],Il(s).constructor):l.apply(s,u))),"onScaleChanged",function(){return a.handles.map(a.scaleHandle)}),kl(a,"setPoints",function(e){var t=e[0].x,n=e[0].y,r=e[1].x,o=e[1].y,i=a.shape.querySelector(".a9s-inner");i.setAttribute("x1",t),i.setAttribute("y1",n),i.setAttribute("x2",r),i.setAttribute("y2",o);var s=a.shape.querySelector(".a9s-outer");s.setAttribute("x1",t),s.setAttribute("y1",n),s.setAttribute("x2",r),s.setAttribute("y2",o),a.mask.redraw();var l=s.getBBox(),u=l.x,c=l.y,p=l.width,f=l.height;ns(a.elementGroup,u,c,p,f)}),kl(a,"onGrab",function(e){return function(t){0===t.button&&(a.grabbedElem=e,a.grabbedAt=a.getSVGPoint(t))}}),kl(a,"onMouseMove",function(e){var t=function(e,t,n){return e+t<0?-e:e+t>n?n-e:t};if(a.grabbedElem){var n=a.getSVGPoint(e);if(a.grabbedElem===a.shape){var r=a.shape.querySelector(".a9s-inner").getBBox(),o=r.x,i=r.y,s=r.width,l=r.height,u=a.env.image,c=u.naturalWidth,p=u.naturalHeight,f=t(o,n.x-a.grabbedAt.x,c-s),d=t(i,n.y-a.grabbedAt.y,p-l),h=Dl(a.shape).map(function(e){return{x:e[0].value+f,y:e[1].value+d}});a.grabbedAt=n,a.setPoints(h),h.forEach(function(e,t){return a.setHandleXY(a.handles[t],e.x,e.y)}),a.emit("update",Ns(a.shape,a.env.image))}else{var m=a.handles.indexOf(a.grabbedElem),y=Dl(a.shape).map(function(e,t){return t===m?n:{x:e[0].value,y:e[1].value}});a.setPoints(y),a.setHandleXY(a.handles[m],n.x,n.y),console.log("执行了EditableLine的onMouseMove方法 ",Ns(a.shape,a.env.image)),a.emit("update",Ns(a.shape,a.env.image))}}}),kl(a,"onMouseUp",function(e){a.grabbedElem=null,a.grabbedAt=null}),kl(a,"updateState",function(e){var t=Ds(e).getAttribute("points").split(" ").map(function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(",").map(function(e){return parseFloat(e.trim())}))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return Cl(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Cl(e,2):void 0}}(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.")}();return{x:n[0],y:n[1]}});a.setPoints(t),t.forEach(function(e,t){return a.setHandleXY(a.handles[t],e.x,e.y)})}),kl(a,"destroy",function(){a.containerGroup.parentNode.removeChild(a.containerGroup),function(e,t,n){var r=Pl(Il(e.prototype),"destroy",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,a)([])}),a.svg.addEventListener("mousemove",a.onMouseMove),a.svg.addEventListener("mouseup",a.onMouseUp),a.containerGroup=document.createElementNS(Fi,"g"),a.shape=Rs(e),a.shape.querySelector(".a9s-inner").addEventListener("mousedown",a.onGrab(a.shape)),a.mask=new bl(o.image,a.shape.querySelector(".a9s-inner")),a.containerGroup.appendChild(a.mask.element),a.elementGroup=document.createElementNS(Fi,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.elementGroup.appendChild(a.shape),a.handles=Dl(a.shape).map(function(e){var t=a.drawHandle(e[0].value,e[1].value);return t.addEventListener("mousedown",a.onGrab(t)),a.elementGroup.appendChild(t),t}),a.containerGroup.appendChild(a.elementGroup),n.appendChild(a.containerGroup),ts(a.shape,e,r.formatter),a.grabbedElem=null,a.grabbedAt=null,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jl(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}}])&&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,Tl(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function Nl(e){return(Nl="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 Bl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Bl=function(){return!!e})()}function Ll(e){return(Ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _l(e,t){return(_l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Gl(e,t,n){return(t=Hl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hl(e){var t=function(e){if("object"!=Nl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Nl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nl(t)?t:t+""}var Fl=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gl((a=this,l=[e,n,r,o],s=Ll(s=t),i=function(e,t){if(t&&("object"==Nl(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)}(a,Bl()?Reflect.construct(s,l||[],Ll(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i._isDrawing=!0,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new El([e,t],i.g,i.env,i.color)}),Gl(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),Gl(i,"undo",function(){i.rubberband&&i.rubberband.undo()}),Gl(i,"newPart",function(){i.rubberband&&i.rubberband.newPart()}),Gl(i,"onMouseMove",function(e,t){return i.rubberband.dragTo([e,t])}),Gl(i,"onMouseUp",function(e,t,n){if(n.altKey)i.onDblClick(n);else if(n.ctrlKey)i.rubberband.undo();else if(2==i.rubberband.points.length)if(i.rubberband.addPoint([e,t]),i.rubberband.points[0]==i.rubberband.points[2]&&i.rubberband.points[1]==i.rubberband.points[3])i.emit("cancel"),i.stop();else{i._isDrawing=!1;var r=i.rubberband.element;r.annotation=i.rubberband.toSelection(),i.emit("complete",r),i.stop()}}),Gl(i,"createEditableShape",function(e){return new Rl(e,i.g,i.config,i.env,i.color)}),i._isDrawing=!1,document.addEventListener("keydown",function(e){"z"==e.key&&e.ctrlKey&&i.undo(),"n"==e.key&&i.newPart()}),i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_l(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return this._isDrawing}}])&&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,Hl(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function Ul(e){return(Ul="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 zl(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 Yl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zl(Object(n),!0).forEach(function(t){Vl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vl(e,t,n){return r=function(e){if("object"!=Ul(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ul(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==Ul(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}Fl.identifier="line",Fl.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<line/g)};var Ql=function(e,t,n,r,o){return Yl(Yl({},ma(e,t,0,0,n,r)),{},{color:o,renderedVia:{name:"point"}})};function Jl(e){return(Jl="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 Wl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wl=function(){return!!e})()}function Zl(){return Zl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Xl(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Zl.apply(null,arguments)}function Xl(e){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kl(e,t){return(Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ql(e,t,n){return(t=$l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $l(e){var t=function(e){if("object"!=Jl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jl(t)?t:t+""}var eu=function(e){function t(e,n,r,o,i){var a,s,l,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ql((s=this,u=[e,n,r,o,i],l=Xl(l=t),a=function(e,t){if(t&&("object"==Jl(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)}(s,Wl()?Reflect.construct(l,u||[],Xl(s).constructor):l.apply(s,u))),"onScaleChanged",function(){return a.scaleHandle(a.point)}),ql(a,"onGrab",function(){a.isGrabbed=!0}),ql(a,"onMouseMove",function(e){if(0===e.button&&a.isGrabbed){var t,n,r=a.getSVGPoint(e),o=r.x,i=r.y;a.setHandleXY(a.point,o,i);var s=null!==(t=a.annotation.target)&&void 0!==t&&t.color?null===(n=a.annotation.target)||void 0===n?void 0:n.color:a.color?a.color:null,l=Ql(o,i,a.env.image,a.config.fragmentUnit,s);a.emit("update",l)}}),ql(a,"onMouseUp",function(){a.isGrabbed=!1}),ql(a,"updateState",function(e){var t=ha(e,a.env.image),n=t.x,r=t.y;a.setHandleXY(a.point,n,r)}),a.svg.addEventListener("mousemove",a.onMouseMove),a.svg.addEventListener("mouseup",a.onMouseUp);var c=ha(e,o.image),p=c.x,f=c.y;return a.container=document.createElementNS(Fi,"g"),a.elementGroup=document.createElementNS(Fi,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.point=a.drawHandle(p,f),a.point.addEventListener("mousedown",a.onGrab),i&&(a.point.querySelector(".a9s-handle-inner").setAttribute("style","stroke: ".concat(i,";")),a.point.querySelector(".a9s-handle-outer").setAttribute("style","stroke: ".concat(i,";"))),a.elementGroup.appendChild(a.point),a.container.appendChild(a.elementGroup),n.appendChild(a.container),a.isGrabbed=!1,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kl(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}},{key:"destroy",value:function(){var e,n;this.svg.removeEventListener("mousemove",this.onMouseMove),this.svg.removeEventListener("mouseup",this.onMouseUp),this.container.parentNode.removeChild(this.container),(e=this,"function"==typeof(n=Zl(Xl(t.prototype),"destroy",e))?function(t){return n.apply(e,t)}:n)([])}}])&&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,$l(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function tu(e){return(tu="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 nu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(nu=function(){return!!e})()}function ru(e){return(ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ou(e,t){return(ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function iu(e,t,n){return(t=au(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function au(e){var t=function(e){if("object"!=tu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tu(t)?t:t+""}var su=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),iu((a=this,l=[e,n,r,o],s=ru(s=t),i=function(e,t){if(t&&("object"==tu(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)}(a,nu()?Reflect.construct(s,l||[],ru(a).constructor):s.apply(a,l))),"startDrawing",function(e,t,n,r){var o,a,s=null===(o=r.target.closest(".a9s-annotation"))||void 0===o?void 0:o.annotation;if(s&&"point"===(null===(a=s.target.renderedVia)||void 0===a?void 0:a.name))i.emit("cancel");else{var l=i.drawHandle(e,t);i.scaleHandle(l),i.g.appendChild(l),l.annotation=new fa(Ql(e,t,i.env.image,i.config.fragmentUnit,i.color)),i.emit("complete",l)}}),iu(i,"stop",function(){}),iu(i,"createEditableShape",function(e){return new eu(e,i.g,i.config,i.env,i.color)}),i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ou(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return!1}}])&&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,au(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);su.identifier="point",su.supports=function(e){return!1};var lu=function(e,t,n,r){e.setAttribute("cx",t),e.setAttribute("cy",n),e.setAttribute("r",r)},uu=function(e,t,n,r){var o=e.querySelector(".a9s-inner"),i=e.querySelector(".a9s-outer");lu(o,t,n,r),lu(i,t,n,r)},cu=function(e){var t=e.querySelector(".a9s-outer");return{cx:parseFloat(t.getAttribute("cx")),cy:parseFloat(t.getAttribute("cy")),r:parseFloat(t.getAttribute("r"))}};function pu(e){return(pu="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 fu(e,t,n){return(t=du(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function du(e){var t=function(e){if("object"!=pu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pu(t)?t:t+""}var hu=function(e,t){return t&&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,du(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),fu(this,"redraw",function(){var e=cu(r.circle),t=e.cx,n=e.cy,o=e.r,i=t+o>r.w?r.w-o:t,a=n+o>r.h?r.h-o:n+o;r.mask.setAttribute("d","M0 0 h".concat(r.w," v").concat(r.h," h-").concat(r.w," z M").concat(i," ").concat(a," a ").concat(o," ").concat(o," 0 1 1 1 0"))}),fu(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.circle=n;var o=cu(this.circle),i=o.cx,a=o.cy,s=o.r,l=i+s>this.w?this.w-s:i,u=a+s>this.h?this.h-s:a+s;this.mask=document.createElementNS(Fi,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d","M0 0 h".concat(this.w," v").concat(this.h," h-").concat(this.w," z M").concat(l," ").concat(u," a ").concat(s," ").concat(s," 0 1 1 1 0"))},[{key:"element",get:function(){return this.mask}}]);function mu(e){return(mu="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 yu(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 bu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(n),!0).forEach(function(t){gu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gu(e,t,n){return(t=vu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vu(e){var t=function(e){if("object"!=mu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mu(t)?t:t+""}var wu=function(e,t){return t&&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,vu(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o,i){var a,s,l,u,c,p=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),gu(this,"dragTo",function(e,t){var n=p.env.image,r=n.naturalWidth,o=n.naturalHeight;p.group.style.display=null;var i=e-p.anchor[0],a=t-p.anchor[1],s=Math.max(1,Math.pow(Math.pow(i,2)+Math.pow(a,2),.5)/2),l=p.anchor[0]+i/2,u=p.anchor[1]+a/2;l-s<0||l+s>r||u-s<0||u+s>o||(uu(p.circle,l,u,s),p.mask.redraw())}),gu(this,"getBoundingClientRect",function(){return p.circle.getBoundingClientRect()}),gu(this,"toSelection",function(){return new fa(bu(bu({},Ns(p.group,p.env.image)),{},{renderedVia:{name:"circle"}}))}),gu(this,"destroy",function(){p.group.parentNode.removeChild(p.group),p.mask=null,p.circle=null,p.group=null}),this.anchor=[t,n],this.env=o,this.group=document.createElementNS(Fi,"g"),this.circle=(a=t,s=n,l=document.createElementNS(Fi,"g"),u=document.createElementNS(Fi,"circle"),(c=document.createElementNS(Fi,"circle")).setAttribute("class","a9s-inner"),lu(c,a,s,2),u.setAttribute("class","a9s-outer"),lu(u,a,s,2),l.appendChild(u),l.appendChild(c),l),this.circle.setAttribute("class","a9s-selection"),i&&(this.circle.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(i,";")),this.circle.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(i,";"))),this.mask=new hu(o.image,this.circle),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.circle),r.appendChild(this.group)},[{key:"element",get:function(){return this.circle}}]);function Au(e){return(Au="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 Su(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ou(e,t);var n={}.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)?Ou(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 Ou(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Eu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Eu=function(){return!!e})()}function xu(){return xu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Cu(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},xu.apply(null,arguments)}function Cu(e){return(Cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Mu(e,t){return(Mu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ju(e,t,n){return(t=Pu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pu(e){var t=function(e){if("object"!=Au(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Au(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Au(t)?t:t+""}var Iu=function(e){function t(e,n,r,o){var i,a,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ju((a=this,l=[e,n,r,o],s=Cu(s=t),i=function(e,t){if(t&&("object"==Au(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)}(a,Eu()?Reflect.construct(s,l||[],Cu(a).constructor):s.apply(a,l))),"setSize",function(e,t,n){uu(i.circle,e,t,n),i.mask.redraw(),ns(i.elementGroup,e,t,n,n);var r=Su(i.handles,4),o=r[0],a=r[1],s=r[2],l=r[3];i.setHandleXY(o,e,t-n),i.setHandleXY(a,e+n,t),i.setHandleXY(s,e,t+n),i.setHandleXY(l,e-n,t)}),ju(i,"stretchCorners",function(e,t,n){var r,o=i.getHandleXY(t),a=n.x,s=n.y,l=0,u=0;0==e||2==e?(a=o.x,u=s-o.y,r=Math.abs(u)/2):(s=o.y,l=a-o.x,r=Math.abs(l)/2);var c=l>0?o.x:a,p=u>0?o.y:s,f=c+Math.abs(l)/2,d=p+Math.abs(u)/2;if(uu(i.circle,f,d,r),i.mask.redraw(),ns(i.elementGroup,f,d,r,r),0==e||2==e){var h=0,m=2;(0==e&&u>0||2==e&&u<0)&&(h=2,m=0),i.setHandleXY(i.handles[h],f,d-r),i.setHandleXY(i.handles[m],f,d+r),i.setHandleXY(i.handles[1],f+r,d),i.setHandleXY(i.handles[3],f-r,d)}else{var y=3,b=1;(1==e&&l>0||3==e&&l<0)&&(y=1,b=3),i.setHandleXY(i.handles[y],f+r,d),i.setHandleXY(i.handles[b],f-r,d),i.setHandleXY(i.handles[0],f,d-r),i.setHandleXY(i.handles[2],f,d+r)}}),ju(i,"onGrab",function(e){return function(t){i.grabbedElem=e;var n=i.getSVGPoint(t),r=cu(i.circle),o=r.cx,a=r.cy;i.grabbedAt={x:n.x-o,y:n.y-a}}}),ju(i,"onMouseMove",function(e){var t=function(e,t){return e<0?0:e>t?t:e};if(i.grabbedElem){var n=i.getSVGPoint(e);if(i.grabbedElem===i.circle){var r=cu(i.circle).r,o=i.env.image,a=o.naturalWidth,s=o.naturalHeight,l=Math.max(t(n.x-i.grabbedAt.x,a-r),r),u=Math.max(t(n.y-i.grabbedAt.y,s-r),r);i.setSize(l,u,r),i.emit("update",Ns(i.circle,i.env.image))}else{var c=i.handles.indexOf(i.grabbedElem),p=c<2?i.handles[c+2]:i.handles[c-2];i.stretchCorners(c,p,n),i.emit("update",Ns(i.circle,i.env.image))}}}),ju(i,"onMouseUp",function(){i.grabbedElem=null,i.grabbedAt=null}),ju(i,"onScaleChanged",function(e){return i.handles.map(i.scaleHandle)}),ju(i,"updateState",function(e){var t=Ds(e),n=parseFloat(t.getAttribute("cx")),r=parseFloat(t.getAttribute("cy")),o=parseFloat(t.getAttribute("r"));i.setSize(n,r,o)}),i.svg.addEventListener("mousemove",i.onMouseMove),i.svg.addEventListener("mouseup",i.onMouseUp),i.containerGroup=document.createElementNS(Fi,"g"),i.circle=Rs(e),i.circle.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.circle)),i.mask=new hu(o.image,i.circle),i.containerGroup.appendChild(i.mask.element),i.elementGroup=document.createElementNS(Fi,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.circle);var u=cu(i.circle),c=u.cx,p=u.cy,f=u.r;return i.handles=[[c,p-f],[c+f,p],[c,p+f],[c-f,p]].map(function(e){var t=Su(e,2),n=t[0],r=t[1],o=i.drawHandle(n,r);return o.addEventListener("mousedown",i.onGrab(o)),i.elementGroup.appendChild(o),o}),i.containerGroup.appendChild(i.elementGroup),n.appendChild(i.containerGroup),ts(i.circle,e,r.formatter),i.grabbedElem=null,i.grabbedAt=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mu(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}},{key:"destroy",value:function(){var e,n;this.containerGroup.parentNode.removeChild(this.containerGroup),(e=this,"function"==typeof(n=xu(Cu(t.prototype),"destroy",e))?function(t){return n.apply(e,t)}:n)([])}}])&&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,Pu(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function ku(e){return(ku="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 Tu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Tu=function(){return!!e})()}function Du(e){return(Du=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ru(e,t){return(Ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Nu(e,t,n){return(t=Bu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bu(e){var t=function(e){if("object"!=ku(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ku(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ku(t)?t:t+""}var Lu=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Nu((a=this,l=[e,n,r,o],s=Du(s=t),i=function(e,t){if(t&&("object"==ku(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)}(a,Tu()?Reflect.construct(s,l||[],Du(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new wu(e,t,i.g,i.env,i.color)}),Nu(i,"stop",function(){i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),Nu(i,"onMouseMove",function(e,t){return i.rubberband.dragTo(e,t)}),Nu(i,"onMouseUp",function(){i.detachListeners(),i.started=!1;var e=i.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=i.config.minSelectionWidth||4,o=i.config.minSelectionHeight||4;if(t>=r&&n>=o){var a=i.rubberband.element;a.annotation=i.rubberband.toSelection(),i.emit("complete",a)}else i.emit("cancel");i.stop()}),Nu(i,"createEditableShape",function(e){return new Iu(e,i.g,i.config,i.env,i.color)}),i.rubberband=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ru(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return null!=this.rubberband}}])&&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,Bu(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);Lu.identifier="circle",Lu.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<circle/g)};var _u=function(e,t,n,r,o){e.setAttribute("cx",t),e.setAttribute("cy",n),e.setAttribute("rx",r),e.setAttribute("ry",o)},Gu=function(e,t,n,r,o){var i=e.querySelector(".a9s-inner"),a=e.querySelector(".a9s-outer");_u(i,t,n,r,o),_u(a,t,n,r,o)},Hu=function(e){var t=e.querySelector(".a9s-outer");return{cx:parseFloat(t.getAttribute("cx")),cy:parseFloat(t.getAttribute("cy")),rx:parseFloat(t.getAttribute("rx")),ry:parseFloat(t.getAttribute("ry"))}};function Fu(e){return(Fu="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 Uu(e,t,n){return(t=zu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zu(e){var t=function(e){if("object"!=Fu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fu(t)?t:t+""}var Yu=function(e,t){return t&&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,zu(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),Uu(this,"redraw",function(){var e=Hu(r.ellipse),t=e.cx,n=e.cy,o=e.rx,i=e.ry,a=n+i;r.mask.setAttribute("d","M0 0 h".concat(r.w," v").concat(r.h," h-").concat(r.w," z M").concat(t," ").concat(a," a ").concat(o," ").concat(i," 0 1 1 1 0"))}),Uu(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.ellipse=n;var o=Hu(this.ellipse),i=o.cx,a=o.cy,s=o.rx,l=o.ry,u=a+l;this.mask=document.createElementNS(Fi,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d","M0 0 h".concat(this.w," v").concat(this.h," h-").concat(this.w," z M").concat(i," ").concat(u," a ").concat(s," ").concat(l," 0 1 1 1 0"))},[{key:"element",get:function(){return this.mask}}]);function Vu(e){return(Vu="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 Qu(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 Ju(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qu(Object(n),!0).forEach(function(t){Wu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wu(e,t,n){return(t=Zu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zu(e){var t=function(e){if("object"!=Vu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vu(t)?t:t+""}var Xu=function(e,t){return t&&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,Zu(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o,i){var a,s,l,u,c,p=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Wu(this,"dragTo",function(e,t){p.group.style.display=null;var n=e-p.anchor[0],r=t-p.anchor[1],o=n>0?p.anchor[0]+n/2:e+n/2,i=r>0?p.anchor[1]+r/2:t+r/2,a=Math.abs(n/2),s=Math.abs(r/2);Gu(p.ellipse,o,i,a,s),p.mask.redraw()}),Wu(this,"getBoundingClientRect",function(){return p.ellipse.getBoundingClientRect()}),Wu(this,"toSelection",function(){return new fa(Ju(Ju({},Ns(p.group,p.env.image)),{},{renderedVia:{name:"ellipse"}}))}),Wu(this,"destroy",function(){p.group.parentNode.removeChild(p.group),p.mask=null,p.ellipse=null,p.group=null}),this.anchor=[t,n],this.env=o,this.group=document.createElementNS(Fi,"g"),this.ellipse=(a=t,s=n,l=document.createElementNS(Fi,"g"),u=document.createElementNS(Fi,"ellipse"),c=document.createElementNS(Fi,"ellipse"),u.setAttribute("class","a9s-inner"),_u(u,a,s,2,2),c.setAttribute("class","a9s-outer"),_u(c,a,s,2,2),l.appendChild(c),l.appendChild(u),l),this.ellipse.setAttribute("class","a9s-selection"),i&&(this.ellipse.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(i,";")),this.ellipse.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(i,";"))),this.mask=new Yu(o.image,this.ellipse),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.ellipse),r.appendChild(this.group)},[{key:"element",get:function(){return this.ellipse}}]);function Ku(e){return(Ku="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 qu(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $u(e,t);var n={}.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}}(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=Array(t);n<t;n++)r[n]=e[n];return r}function ec(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ec=function(){return!!e})()}function tc(){return tc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=nc(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},tc.apply(null,arguments)}function nc(e){return(nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rc(e,t){return(rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oc(e,t,n){return(t=ic(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ic(e){var t=function(e){if("object"!=Ku(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ku(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ku(t)?t:t+""}var ac=function(e){function t(e,n,r,o){var i,a,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),oc((a=this,l=[e,n,r,o],s=nc(s=t),i=function(e,t){if(t&&("object"==Ku(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)}(a,ec()?Reflect.construct(s,l||[],nc(a).constructor):s.apply(a,l))),"setSize",function(e,t,n,r){Gu(i.ellipse,e,t,n,r),i.mask.redraw(),ns(i.elementGroup,e,t,n,r);var o=qu(i.handles,4),a=o[0],s=o[1],l=o[2],u=o[3];i.setHandleXY(a,e,t-r),i.setHandleXY(s,e+n,t),i.setHandleXY(l,e,t+r),i.setHandleXY(u,e-n,t)}),oc(i,"stretchCorners",function(e,t,n,r){var o=i.getHandleXY(t),a=i.getHandleXY(n),s=r.x,l=r.y,u=0,c=0;0==e||2==e?s=o.x:l=o.y;var p=s-o.x,f=l-o.y,d=p>0?o.x:s,h=f>0?o.y:l,m=Math.abs(p),y=Math.abs(f),b=d+m/2,g=h+y/2;if(u=m/2,c=y/2,0==e||2==e?u=Math.abs(o.x-a.x):c=Math.abs(o.y-a.y),Gu(i.ellipse,b,g,u,c),i.mask.redraw(),ns(i.elementGroup,b,g,u,c),0==e||2==e){var v=0,w=2;(0==e&&f>0||2==e&&f<0)&&(v=2,w=0),i.setHandleXY(i.handles[v],b,g-c),i.setHandleXY(i.handles[w],b,g+c),i.setHandleXY(i.handles[1],b+u,g),i.setHandleXY(i.handles[3],b-u,g)}else{var A=3,S=1;(1==e&&p>0||3==e&&p<0)&&(A=1,S=3),i.setHandleXY(i.handles[A],b+u,g),i.setHandleXY(i.handles[S],b-u,g),i.setHandleXY(i.handles[0],b,g-c),i.setHandleXY(i.handles[2],b,g+c)}}),oc(i,"onGrab",function(e){return function(t){i.grabbedElem=e;var n=i.getSVGPoint(t),r=Hu(i.ellipse),o=r.cx,a=r.cy;i.grabbedAt={x:n.x-o,y:n.y-a}}}),oc(i,"onMouseMove",function(e){var t=function(e,t){return e<0?0:e>t?t:e};if(i.grabbedElem){var n=i.getSVGPoint(e);if(i.grabbedElem===i.ellipse){var r=Hu(i.ellipse),o=r.rx,a=r.ry,s=i.env.image,l=s.naturalWidth,u=s.naturalHeight,c=t(n.x-i.grabbedAt.x,l-o),p=t(n.y-i.grabbedAt.y,u-a);i.setSize(c,p,o,a),i.emit("update",Ns(i.ellipse,i.env.image))}else{var f=i.handles.indexOf(i.grabbedElem),d=f<2?i.handles[f+2]:i.handles[f-2],h=i.handles[(f+3)%4];i.stretchCorners(f,d,h,n),i.emit("update",Ns(i.ellipse,i.env.image))}}}),oc(i,"onMouseUp",function(){i.grabbedElem=null,i.grabbedAt=null}),oc(i,"onScaleChanged",function(e){return i.handles.map(i.scaleHandle)}),oc(i,"updateState",function(e){var t=Ds(e),n=parseFloat(t.getAttribute("cx")),r=parseFloat(t.getAttribute("cy")),o=parseFloat(t.getAttribute("rx")),a=parseFloat(t.getAttribute("ry"));i.setSize(n,r,o,a)}),i.svg.addEventListener("mousemove",i.onMouseMove),i.svg.addEventListener("mouseup",i.onMouseUp),i.containerGroup=document.createElementNS(Fi,"g"),i.ellipse=Rs(e),i.ellipse.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.ellipse)),i.mask=new Yu(o.image,i.ellipse),i.containerGroup.appendChild(i.mask.element),i.elementGroup=document.createElementNS(Fi,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.ellipse);var u=Hu(i.ellipse),c=u.cx,p=u.cy,f=u.rx,d=u.ry;return i.handles=[[c,p-d],[c+f,p],[c,p+d],[c-f,p]].map(function(e){var t=qu(e,2),n=t[0],r=t[1],o=i.drawHandle(n,r);return o.addEventListener("mousedown",i.onGrab(o)),i.elementGroup.appendChild(o),o}),i.containerGroup.appendChild(i.elementGroup),n.appendChild(i.containerGroup),ts(i.ellipse,e,r.formatter),i.grabbedElem=null,i.grabbedAt=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rc(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}},{key:"destroy",value:function(){var e,n;this.containerGroup.parentNode.removeChild(this.containerGroup),(e=this,"function"==typeof(n=tc(nc(t.prototype),"destroy",e))?function(t){return n.apply(e,t)}:n)([])}}])&&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,ic(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function sc(e){return(sc="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 lc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(lc=function(){return!!e})()}function uc(e){return(uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cc(e,t){return(cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pc(e,t,n){return(t=fc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fc(e){var t=function(e){if("object"!=sc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sc(t)?t:t+""}var dc=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),pc((a=this,l=[e,n,r,o],s=uc(s=t),i=function(e,t){if(t&&("object"==sc(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)}(a,lc()?Reflect.construct(s,l||[],uc(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new Xu(e,t,i.g,i.env,i.color)}),pc(i,"stop",function(){i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),pc(i,"onMouseMove",function(e,t){return i.rubberband.dragTo(e,t)}),pc(i,"onMouseUp",function(){i.detachListeners(),i.started=!1;var e=i.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=i.config.minSelectionWidth||4,o=i.config.minSelectionHeight||4;if(t>=r&&n>=o){var a=i.rubberband.element;a.annotation=i.rubberband.toSelection(),i.emit("complete",a)}else i.emit("cancel");i.stop()}),pc(i,"createEditableShape",function(e){return new ac(e,i.g,i.config,i.env,i.color)}),i.rubberband=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cc(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return null!=this.rubberband}}])&&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,fc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function hc(e){return(hc="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 mc(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 yc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mc(Object(n),!0).forEach(function(t){gc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gc(e,t,n){return(t=vc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vc(e){var t=function(e){if("object"!=hc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hc(t)?t:t+""}dc.identifier="ellipse",dc.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<ellipse/g)};var wc=function(e,t){return t&&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,vc(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),gc(this,"setPoints",function(e){var t=e.map(function(e){return"L".concat(e[0]," ").concat(e[1])}).join(" ");t="M"+t.substring(1),i.outer.setAttribute("d",t),i.inner.setAttribute("d",t)}),gc(this,"getBoundingClientRect",function(){return i.outer.getBoundingClientRect()}),gc(this,"dragTo",function(e){i.group.style.display=null,i.addPoint(e)}),gc(this,"addPoint",function(e){var t;i.points=[].concat(function(e){if(Array.isArray(e))return bc(e)}(t=i.points)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return bc(e,t);var n={}.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)?bc(e,t):void 0}}(t)||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.")}(),[e]),i.setPoints(i.points)}),gc(this,"destroy",function(){i.group.parentNode.removeChild(i.group),i.freehand=null,i.group=null}),gc(this,"toSelection",function(){return new fa(yc(yc({},Ns(i.group,i.env.image)),{},{renderedVia:{name:"freehand"}}))}),this.points=[t],this.env=r,this.group=document.createElementNS(Fi,"g"),this.freehand=document.createElementNS(Fi,"g"),this.freehand.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Fi,"path"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Fi,"path"),this.inner.setAttribute("class","a9s-inner"),o&&(this.outer.setAttribute("style","stroke: ".concat(o,";")),this.inner.setAttribute("style","stroke: ".concat(o,";"))),this.setPoints(this.points),this.freehand.appendChild(this.outer),this.freehand.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.freehand),n.appendChild(this.group)},[{key:"element",get:function(){return this.freehand}}]);function Ac(e){return(Ac="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 Sc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Sc=function(){return!!e})()}function Oc(e,t){return(Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ec(){return Ec="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xc(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Ec.apply(null,arguments)}function xc(e){return(xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Cc(e,t,n){return(t=Mc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mc(e){var t=function(e){if("object"!=Ac(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ac(t)?t:t+""}var jc=function(e){var t=e.getAttribute("d").split("L"),n=[];if(t.length>0){var r=t[0].substring(1).trim().split(" ");n.push({x:parseFloat(r[0]),y:parseFloat(r[1])});for(var o=1;o<t.length;o++)r=t[o].trim().split(" "),n.push({x:parseFloat(r[0]),y:parseFloat(r[1])})}return n},Pc=function(e){return e.querySelector(".a9s-inner").getBBox()},Ic=function(e){function t(e,n,r,o){var i,a,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Cc((a=this,l=[e,n,r,o],s=xc(s=t),i=function(e,t){if(t&&("object"==Ac(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)}(a,Sc()?Reflect.construct(s,l||[],xc(a).constructor):s.apply(a,l))),"setPoints",function(e){var t=function(e){return Math.round(10*e)/10},n=e.map(function(e){return"L".concat(t(e.x)," ").concat(t(e.y))}).join(" ");n="M"+n.substring(1),i.shape.querySelector(".a9s-inner").setAttribute("d",n);var r=i.shape.querySelector(".a9s-outer");r.setAttribute("d",n);var o=r.getBBox(),a=o.x,s=o.y,l=o.width,u=o.height;ns(i.elementGroup,a,s,l,u)}),Cc(i,"onGrab",function(e){return function(t){i.grabbedElem=e;var n=i.getSVGPoint(t);i.grabbedAt={x:n.x,y:n.y}}}),Cc(i,"onMouseMove",function(e){var t=function(e,t,n){return e+t<0?-e:e+t>n?n-e:t};if(i.grabbedElem){var n=i.getSVGPoint(e),r=Pc(i.shape),o=r.x,a=r.y,s=r.width,l=r.height;if(i.grabbedElem===i.shape){var u=i.env.image,c=u.naturalWidth,p=u.naturalHeight,f=t(o,n.x-i.grabbedAt.x,c-s),d=t(a,n.y-i.grabbedAt.y,p-l),h=i.shape.querySelector(".a9s-inner"),m=jc(h).map(function(e){return{x:e.x+f,y:e.y+d}});i.grabbedAt=n,i.setPoints(m),i.emit("update",Ns(i.shape,i.env.image))}}}),Cc(i,"onMouseUp",function(e){i.grabbedElem=null,i.grabbedAt=null}),Cc(i,"updateState",function(e){var t=jc(Ds(e));i.setPoints(t)}),Cc(i,"destroy",function(){i.containerGroup.parentNode.removeChild(i.containerGroup),function(e,t,n){var r=Ec(xc(e.prototype),"destroy",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,i)([])}),i.svg.addEventListener("mousemove",i.onMouseMove),i.svg.addEventListener("mouseup",i.onMouseUp),i.containerGroup=document.createElementNS(Fi,"g"),i.shape=Rs(e),i.elementGroup=document.createElementNS(Fi,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.shape),i.containerGroup.appendChild(i.elementGroup),n.appendChild(i.containerGroup),ts(i.shape,e,r.formatter),i.shape.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.shape));var u=Pc(i.shape);return u.x,u.y,u.width,u.height,i.grabbedElem=null,i.grabbedAt=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oc(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}}])&&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,Mc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function kc(e){return(kc="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 Tc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Tc=function(){return!!e})()}function Dc(e){return(Dc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rc(e,t){return(Rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Nc(e,t,n){return(t=Bc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bc(e){var t=function(e){if("object"!=kc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kc(t)?t:t+""}var Lc=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Nc((a=this,l=[e,n,r,o],s=Dc(s=t),i=function(e,t){if(t&&("object"==kc(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)}(a,Tc()?Reflect.construct(s,l||[],Dc(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i._isDrawing=!0,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp,dblClick:i.onDblClick}),i.rubberband=new wc([e,t],i.g,i.env,i.color)}),Nc(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),Nc(i,"onMouseMove",function(e,t){return i.rubberband.dragTo([e,t])}),Nc(i,"onMouseUp",function(e,t){i.onDblClick(e,t)}),Nc(i,"onDblClick",function(e,t){i._isDrawing=!1,i.rubberband.addPoint([e,t]),i.detachListeners();var n=i.rubberband.getBoundingClientRect(),r=n.width,o=n.height,a=i.config.minSelectionWidth||4,s=i.config.minSelectionHeight||4;if(r>=a||o>=s){var l=i.rubberband.element;l.annotation=i.rubberband.toSelection(),i.emit("complete",l)}else i.emit("cancel");i.stop()}),Nc(i,"createEditableShape",function(e){return new Ic(e,i.g,i.config,i.env,i.color)}),i._isDrawing=!1,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rc(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return this._isDrawing}}])&&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,Bc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function _c(e){return(_c="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 Gc(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 Hc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gc(Object(n),!0).forEach(function(t){Wc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fc(e){return function(e){if(Array.isArray(e))return Yc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||zc(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 Uc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=zc(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function zc(e,t){if(e){if("string"==typeof e)return Yc(e,t);var n={}.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)?Yc(e,t):void 0}}function Yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Vc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Vc=function(){return!!e})()}function Qc(e){return(Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jc(e,t){return(Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wc(e,t,n){return(t=Zc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zc(e){var t=function(e){if("object"!=_c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_c(t)?t:t+""}Lc.identifier="freehand",Lc.supports=function(e){var t=e.selector("SvgSelector");if(t)return t.value.match(/^<svg.*<path*/g)&&!t.value.toUpperCase().includes("Z")};var Xc=function(e){function t(e,n,r,o,i){var a,s,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Wc((s=this,u=[n,r,o,i],l=Qc(l=t),a=function(e,t){if(t&&("object"==_c(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)}(s,Vc()?Reflect.construct(l,u||[],Qc(s).constructor):l.apply(s,u))),"setPoints",function(e){var t,n="",r=Uc(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,i="";if(o.length>0){var s,l=Uc(o);try{for(l.s();!(s=l.n()).done;){var u=s.value;u&&(i+=""===i?"M".concat(u[0],",").concat(u[1]):" L".concat(u[0],",").concat(u[1]))}}catch(c){l.e(c)}finally{l.f()}n+=i}}}catch(c){r.e(c)}finally{r.f()}n+=" Z",a.outer.setAttribute("d",n),a.inner.setAttribute("d",n)}),Wc(a,"close",function(){var e=new e(Ns(a.points,a.env.image));a.emit("close",{shape:a.multipolygon,multipolygon:e})}),Wc(a,"getBoundingClientRect",function(){return a.outer.getBoundingClientRect()}),Wc(a,"dragTo",function(e){a.group.style.display=null,a.mousepos=e;var t=a.points[a.points.length-1].slice(0,a.points[a.points.length-1].length-1),n=a.points.slice(0,-1),r=[].concat(Fc(t),[e,t[0]]);n.push(r),a.setPoints(n)}),Wc(a,"onScaleChanged",function(e){a.scale=e;var t=a.closeHandle.querySelector(".a9s-handle-inner"),n=a.closeHandle.querySelector(".a9s-handle-outer"),r=e*(a.config.handleRadius||6);t.setAttribute("r",r),n.setAttribute("r",r)}),Wc(a,"addPoint",function(e){if(a.points[a.points.length-1].length>0){var t=a.points[a.points.length-1].slice(0,a.points[a.points.length-1].length-1),n=t[t.length-1];Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2)>4&&(a.points[a.points.length-1]=[].concat(Fc(t),[e,t[0]]),a.setPoints(a.points))}else a.points[a.points.length-1]=[e,e],a.setPoints(a.points)}),Wc(a,"undo",function(){a.pop()}),Wc(a,"isClosable",function(){return a.getDistanceToStart()<6*a.scale}),Wc(a,"pop",function(){a.points[a.points.length-1].length>2?a.points[a.points.length-1].pop():a.points.length>1&&a.points.pop(),a.setPoints(a.points)}),Wc(a,"newPart",function(){a.points.push([])}),Wc(a,"getDistanceToStart",function(){if(a.points[a.points.length-1].length<3)return 1/0;var e=Math.abs(a.mousepos[0]-a.points[a.points.length-1][0][0]),t=Math.abs(a.mousepos[1]-a.points[a.points.length-1][0][1]);return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))/a.scale}),Wc(a,"destroy",function(){a.group.parentNode.removeChild(a.group),a.multipolygon=null,a.group=null}),Wc(a,"toSelection",function(){return new fa(Hc(Hc({},Ns(a.group,a.env.image)),{},{renderedVia:{name:"multipolygon"}}))}),a.points=[],a.points.push([e,e]),a.mousepos=e,a.env=o,a.scale=1,a.group=document.createElementNS(Fi,"g"),a.multipolygon=document.createElementNS(Fi,"g"),a.multipolygon.setAttribute("class","a9s-selection a9s-multipolygon improved-polygon"),a.rubberband=document.createElementNS(Fi,"polygon"),a.rubberband.setAttribute("class","a9s-rubberband"),a.closeHandle=a.drawHandle(e[0],e[1]),a.closeHandle.style.display="none",a.outer=document.createElementNS(Fi,"path"),a.outer.setAttribute("class","a9s-outer"),a.inner=document.createElementNS(Fi,"path"),a.inner.setAttribute("class","a9s-inner"),i&&(a.outer.setAttribute("style","stroke: ".concat(i,";")),a.inner.setAttribute("style","stroke: ".concat(i,";"))),a.setPoints(a.points),a.multipolygon.appendChild(a.rubberband),a.multipolygon.appendChild(a.outer),a.multipolygon.appendChild(a.inner),a.multipolygon.appendChild(a.closeHandle),a.group.style.display="none",a.group.appendChild(a.multipolygon),n.appendChild(a.group),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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.multipolygon}}])&&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,Zc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ua);function Kc(e){return(Kc="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 qc(e){return function(e){if(Array.isArray(e))return sp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ap(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(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return($c=function(){return!!e})()}function ep(e,t){return(ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tp(){return tp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=np(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},tp.apply(null,arguments)}function np(e){return(np=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rp(e,t,n){return(t=op(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function op(e){var t=function(e){if("object"!=Kc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kc(t)?t:t+""}function ip(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ap(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function ap(e,t){if(e){if("string"==typeof e)return sp(e,t);var n={}.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)?sp(e,t):void 0}}function sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var lp=function(e){var t=e.split("M"),n=[];return t.forEach(function(e,t){if(e.length>0){var r=[];(e=(e=(e=(e=(e=e.replace(/ Z/g,"Z")).replace(/Z /g,"Z")).replace(/Z/g,"")).replace(/L /g,"L")).replace(/ L/g,"L")).split("L").forEach(function(e,t){r.push([parseFloat(e.split(",")[0]).toFixed(2).toString(),parseFloat(e.split(",")[1]).toFixed(2).toString()])}),r[0][0]!==r[r.length-1][0]&&r[0][1]!==r[r.length-1][1]&&r.push(r[0]),n.push(r)}}),n},up=function(e){var t,n=[],r=ip(lp(e.querySelector(".a9s-inner").attributes.d.nodeValue));try{for(r.s();!(t=r.n()).done;){var o,i=t.value,a=[],s=ip(i);try{for(s.s();!(o=s.n()).done;){var l=o.value,u={x:parseFloat(l[0]),y:parseFloat(l[1])};a.push(u)}}catch(c){s.e(c)}finally{s.f()}n.push(a)}}catch(c){r.e(c)}finally{r.f()}return n},cp=function(e){var t,n=Ds(e);t=Ds(e).getAttribute("d"),lp(t);var r=document.createElementNS(Fi,"g"),o=n.cloneNode(!0);o.setAttribute("class","a9s-inner");var i=n.cloneNode(!0);return i.setAttribute("class","a9s-outer"),r.appendChild(i),r.appendChild(o),r},pp=function(e){function t(e,n,r,o){var i,a,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),rp((a=this,l=[e,n,r,o],s=np(s=t),i=function(e,t){if(t&&("object"==Kc(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)}(a,$c()?Reflect.construct(s,l||[],np(a).constructor):s.apply(a,l))),"createCornerHandle",function(e){var t=i.drawHandle(e.x,e.y);return t.addEventListener("mousedown",i.onGrab(t)),t.addEventListener("click",i.onSelectCorner(t)),i.scaleHandle(t),i.elementGroup.appendChild(t),t}),rp(i,"createMidpoint",function(e,t){var n=e[t],r=t===e.length-1?e[0]:e[t+1],o=(n.x+r.x)/2,a=(n.y+r.y)/2,s=i.drawMidpoint(o,a);return s.addEventListener("mousedown",i.onGrab(s)),i.shape.appendChild(s),s}),rp(i,"deleteSelected",function(){var e=up(i.shape);if(i.selected.length>0){var t,n=-1,r=[],o=[],a=ip(i.midpoints);try{for(a.s();!(t=a.n()).done;){var s=t.value,l=s.filter(function(e,t){return-1===i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)});s.filter(function(e,t){return i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)>-1}).forEach(function(e){return e.parentNode.removeChild(e)}),l.length>2&&o.push(l)}}catch(v){a.e(v)}finally{a.f()}var u,c=ip(e);try{for(c.s();!(u=c.n()).done;){var p=u.value;n+=1;var f=p.filter(function(e,t){return-1===i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)});f.length>2&&r.push(f)}}catch(v){c.e(v)}finally{c.f()}n=-1;var d,h=[],m=ip(i.cornerHandles);try{for(m.s();!(d=m.n()).done;){var y=d.value;n+=1;var b=y.filter(function(e,t){return-1!==i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)}),g=y.filter(function(e,t){return-1===i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)});g.length>2&&h.push(g),b.forEach(function(e){return e.parentNode.removeChild(e)})}}catch(v){m.e(v)}finally{m.f()}i.midpoints=o,i.cornerHandles=h,i.selected=[],i.setPoints(r)}}),rp(i,"deselectCorners",function(){return i.cornerHandles.forEach(function(e){return Yi(e,"selected")})}),rp(i,"destroy",function(){i.container.parentNode.removeChild(i.container),i.svg.removeEventListener("mousemove",i.onMouseMove),i.svg.removeEventListener("mouseup",i.onMouseUp),document.body.removeEventListener("keydown",i.onKeyDown),function(e,t,n){var r=tp(np(e.prototype),"destroy",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,i)([])}),rp(i,"drawMidpoint",function(e,t){var n=document.createElementNS(Fi,"circle");return n.setAttribute("class","a9s-midpoint"),n.setAttribute("cx",e),n.setAttribute("cy",t),n.setAttribute("r",5*i.scale),n}),rp(i,"onAddPoint",function(e){var t,n=up(i.shape),r=-1,o=-1,a=ip(i.midpoints);try{for(a.s();!(t=a.n()).done;){var s=t.value;if(o+=1,(r=s.indexOf(i.grabbedElement))>-1)break}}catch(A){a.e(A)}finally{a.f()}var l,u=[],c=-1,p=null,f=null,d=ip(n);try{for(d.s();!(l=d.n()).done;){var h=l.value;if((c+=1)===o){var m,y=[],b=-1,g=ip(h);try{for(g.s();!(m=g.n()).done;){var v=m.value;b+=1,y.push(v),b===r&&(y.push(e),p=i.createMidpoint(h,b-1),f=i.createMidpoint(h,b))}}catch(A){g.e(A)}finally{g.f()}u.push(y)}else u.push(h)}}catch(A){d.e(A)}finally{d.f()}var w=i.createCornerHandle(e);i.cornerHandles[o]=[].concat(qc(i.cornerHandles[o].slice(0,r+1)),[w],qc(i.cornerHandles[o].slice(r+1))),i.midpoints[o]=[].concat(qc(i.midpoints[o].slice(0,r)),[p,f],qc(i.midpoints[o].slice(r+1))),i.grabbedElement.parentNode.removeChild(i.grabbedElement),i.grabbedElement=w,i.setPoints(u)}),rp(i,"onGrab",function(e){return function(t){0===t.button&&(t.stopPropagation(),i.grabbedElement=e,i.grabbedAt=i.getSVGPoint(t),i.lastMouseDown=(new Date).getTime())}}),rp(i,"onKeyDown",function(e){46===e.which&&i.deleteSelected()}),rp(i,"onMoveShape",function(e){var t,n=function(e,t,n){return e+t<0?-e:e+t>n?n-e:t},r=i.shape.querySelector(".a9s-inner").getBBox(),o=r.x,a=r.y,s=r.width,l=r.height,u=i.env.image,c=u.naturalWidth,p=u.naturalHeight,f=n(o,e.x-i.grabbedAt.x,c-s),d=n(a,e.y-i.grabbedAt.y,p-l),h=[],m=ip(up(i.shape));try{for(m.s();!(t=m.n()).done;){var y=t.value,b=y.map(function(e){return[e.x,e.y]});Ps([i.grabbedAt.x,i.grabbedAt.y],b)?h.push(y.map(function(e){return{x:e.x+f,y:e.y+d}})):h.push(y)}}catch(g){m.e(g)}finally{m.f()}i.grabbedAt=e,i.setPoints(h)}),rp(i,"onMoveCornerHandle",function(e,t){var n,r=-1,o=0,a=ip(i.cornerHandles);try{for(a.s();!(n=a.n()).done;){var s=n.value;if((r=s.indexOf(i.grabbedElement))>-1)break;o+=1}}catch(y){a.e(y)}finally{a.f()}t.ctrlKey?i.selected=Array.from(new Set([].concat(qc(i.selected),[r]))):i.selected.includes(r)||(i.selected=[r]);var l,u=up(i.shape),c=i.selected.map(function(e){var t=u[o][r],n=u[o][e];return{index:e,dx:n.x-t.x,dy:n.y-t.y}}),p=0,f=[],d=ip(up(i.shape));try{for(d.s();!(l=d.n()).done;){var h=l.value;if(p===o){var m=h.map(function(t,n){if(n===r)return e;if(i.selected.includes(n)){var o=c.find(function(e){return e.index===n}),a=o.dx,s=o.dy;return{x:e.x+a,y:e.y+s}}return t});f.push(m)}else f.push(h);p+=1}}catch(y){d.e(y)}finally{d.f()}i.setPoints(f)}),rp(i,"onMouseMove",function(e){if(i.grabbedElement){var t=i.getSVGPoint(e);i.grabbedElement===i.shape?i.onMoveShape(t):Vi(i.grabbedElement,"a9s-handle")?i.onMoveCornerHandle(t,e):Vi(i.grabbedElement,"a9s-midpoint")&&i.onAddPoint(t),i.emit("update",Ap(up(i.shape),i.env.image))}}),rp(i,"onMouseUp",function(e){i.grabbedElement=null,i.grabbedAt=null}),rp(i,"onScaleChanged",function(e){var t,n=ip(i.cornerHandles);try{for(n.s();!(t=n.n()).done;)t.value.map(i.scaleHandle)}catch(a){n.e(a)}finally{n.f()}var r,o=ip(i.midpoints);try{for(o.s();!(r=o.n()).done;)r.value.map(function(e){e.setAttribute("r",5*i.scale)})}catch(a){o.e(a)}finally{o.f()}}),rp(i,"onSelectCorner",function(e){return function(t){if(!((new Date).getTime()-i.lastMouseDown>250)){var n,r=-1,o=-1,a=ip(i.cornerHandles);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(r+=1,(o=s.indexOf(e))>0)break}}catch(l){a.e(l)}finally{a.f()}null!=t&&t.ctrlKey?i.selected.map(function(e){return e[0]===r&&e[1]===o}).indexOf(!0)>-1?i.selected=i.selected.filter(function(e){return!(e[1]===o&&e[0]===r)}):i.selected=[].concat(qc(i.selected),[[r,o]]):1===i.selected.length&&i.selected[0][1]===o&&i.selected[0][0]===r?i.selected=[]:i.selected=[[r,o]],i.setPoints(up(i.shape))}}}),rp(i,"setPoints",function(e){var t=wp(e);i.shape.querySelector(".a9s-inner").setAttribute("d",t);var n=i.shape.querySelector(".a9s-outer");n.setAttribute("d",t);var r,o=0,a=ip(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;s.forEach(function(e,t){i.setHandleXY(i.cornerHandles[o][t],e.x,e.y)});for(var l=0;l<s.length;l++){var u=s[l],c=l===s.length-1?s[0]:s[l+1],p=(u.x+c.x)/2,f=(u.y+c.y)/2,d=i.midpoints[o][l];d.setAttribute("cx",p),d.setAttribute("cy",f)}o+=1}}catch(O){a.e(O)}finally{a.f()}var h,m=-1,y=ip(i.cornerHandles);try{for(y.s();!(h=y.n()).done;){var b=h.value;m+=1,b.forEach(function(e,t){var n=i.selected.map(function(e){return e[0]===m&&e[1]===t}).indexOf(!0)>-1;n&&!Vi(e,"selectedCorner")?zi(e,"selectedCorner"):!n&&Vi(e,"selectedCorner")&&Yi(e,"selectedCorner")})}}catch(O){y.e(O)}finally{y.f()}var g=n.getBBox(),v=g.x,w=g.y,A=g.width,S=g.height;ns(i.shape,v,w,A,S)}),rp(i,"updateState",function(e){var t=cp(e),n=up(t);i.setPoints(n)}),i.svg.addEventListener("mousemove",i.onMouseMove),i.svg.addEventListener("mouseup",i.onMouseUp),document.body.addEventListener("keydown",i.onKeyDown),i.container=document.createElementNS(Fi,"g"),i.shape=cp(e),i.shape.setAttribute("class","a9s-annotation editable selected improved-polygon"),i.elementGroup=document.createElementNS(Fi,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.shape);var u=up(i.shape);i.cornerHandles=[],i.midpoints=[];var c,p=ip(u);try{var f=function(){var e=c.value,t=[];i.cornerHandles.push(e.map(function(n,r){return t.push(i.createMidpoint(e,r)),i.createCornerHandle(n)})),i.midpoints.push(t)};for(p.s();!(c=p.n()).done;)f()}catch(a){p.e(a)}finally{p.f()}return i.container.appendChild(i.elementGroup),n.appendChild(i.container),ts(i.shape,e,r.formatter),i.shape.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.shape)),i.grabbedElement=null,i.grabbedAt=null,i.selected=[],i.lastMouseDown=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ep(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}}])&&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,op(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function fp(e){return(fp="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 dp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(dp=function(){return!!e})()}function hp(e){return(hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mp(e,t){return(mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yp(e,t,n){return(t=bp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bp(e){var t=function(e){if("object"!=fp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fp(t)?t:t+""}function gp(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return vp(e,t);var n={}.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)?vp(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function vp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wp=function(e){var t,n=function(e){return Math.round(10*e)/10},r="",o=gp(e);try{for(o.s();!(t=o.n()).done;){var i=t.value;r+="M";var a,s=!0,l=gp(i);try{for(l.s();!(a=l.n()).done;){var u=a.value;s?(s=!1,r+=n(u.x).toString()+","+n(u.y).toString()):r+=" L"+n(u.x).toString()+","+n(u.y).toString()}}catch(c){l.e(c)}finally{l.f()}r+=" Z"}}catch(c){o.e(c)}finally{o.f()}return r},Ap=function(e,t){return{source:null==t?void 0:t.src,selector:{type:"SvgSelector",value:'<svg><path d="'.concat(wp(e),'" /></svg>')}}},Sp=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),yp((a=this,l=[e,n,r,o],s=hp(s=t),i=function(e,t){if(t&&("object"==fp(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)}(a,dp()?Reflect.construct(s,l||[],hp(a).constructor):s.apply(a,l))),"startDrawing",function(e,t,n,r){i._isDrawing=!0,i._startOnSingleClick=n||!1,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp,dblClick:i.onDblClick}),i.rubberband=new Xc([e,t],i.g,i.config,i.env,i.color),i.rubberband.on("close",function(e){var t=e.shape,n=e.selection;t.annotation=n,i.emit("complete",t),i.stop()})}),yp(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),yp(i,"undo",function(){i.rubberband&&i.rubberband.undo()}),yp(i,"newPart",function(){i.rubberband&&i.rubberband.newPart()}),yp(i,"onMouseMove",function(e,t,n){i.rubberband.dragTo([e,t])}),yp(i,"onMouseUp",function(e,t,n){if(n.altKey)i.complete(e,t);else if(n.ctrlKey)i.rubberband.undo();else if(n.shiftKey&&i.rubberband.points.length>2)i.newPart();else{var r=i.rubberband.getBoundingClientRect(),o=r.width,a=r.height,s=i.config.minSelectionWidth||4,l=i.config.minSelectionHeight||4;o>=s||a>=l?i.rubberband.addPoint([e,t]):(i.emit("cancel"),i.stop())}}),yp(i,"onScaleChanged",function(e){i.rubberband&&i.rubberband.onScaleChanged(e)}),yp(i,"onDblClick",function(e,t){i.config.completeWithDoubleClick&&i.complete(e,t)}),yp(i,"complete",function(e,t){i._isDrawing=!1,i.rubberband.addPoint([e,t]);var n=i.rubberband.element;n.annotation=i.rubberband.toSelection(),i.emit("complete",n),i.stop()}),yp(i,"createEditableShape",function(e){return new pp(e,i.g,i.config,i.env,i.color)}),i._isDrawing=!1,i.viewer=null,window.addEventListener("keydown",function(e){"z"===e.key&&e.ctrlKey?i.undo():"n"!==e.key&&"p"!==e.key||i.newPart()},!0),i._startOnSingleClick=!1,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mp(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return this._isDrawing}}])&&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,bp(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function Op(e){return(Op="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 Ep(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(xp=function(){return!!e})()}function Cp(e){return(Cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Mp(e,t){return(Mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function jp(e,t,n){return(t=Pp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pp(e){var t=function(e){if("object"!=Op(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Op(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Op(t)?t:t+""}Sp.identifier="multipolygon",Sp.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<path d=/g)};var Ip=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),jp((a=this,s=Cp(s=t),i=function(e,t){if(t&&("object"==Op(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)}(a,xp()?Reflect.construct(s,[],Cp(a).constructor):s.apply(a,l))),"listTools",function(){return i._registered.map(function(e){return e.identifier})}),jp(i,"registerTool",function(e){var t=e.identifier;i.listTools().includes(t)&&i.unregisterTool(t),i._registered.unshift(e)}),jp(i,"unregisterTool",function(e){return i._registered=i._registered.filter(function(t){return t.identifier!==e})}),jp(i,"setCurrent",function(e,t){i._current&&i._current.destroy(),i._color=t;var n="string"==typeof e||e instanceof String?i._registered.find(function(t){return t.identifier===e}):e;i._current=new n(i._g,i._config,i._env,t),i._current.on("startSelection",function(e){return i.emit("startSelection",e)}),i._current.on("complete",function(e){return i.emit("complete",e)}),i._current.on("cancel",function(e){return i.emit("cancel",e)})}),jp(i,"forAnnotation",function(e){var t,n,r=function(e){if(Array.isArray(e))return e}(n=e.targets)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Ep(e,t);var n={}.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)?Ep(e,t):void 0}}(n)||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.")}(),o=r[0],a=(Ep(r).slice(1),null===(t=o.renderedVia)||void 0===t?void 0:t.name),s=a?i._registered.find(function(e){return e.identifier===a}):i._registered.find(function(t){return t.supports(e)});return s?new s(i._g,i._config,i._env,i._color):null}),i._g=e,i._config=n,i._env=r,i._color=o,i._registered=[Os,dl,Fl,su,Lu,dc,Lc,Sp],i.setCurrent(Os,i._color),i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mp(e,t)}(t,e),n=t,(r=[{key:"current",get:function(){return this._current}}])&&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,Pp(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(n()),kp={FragmentSelector:wa,SvgSelector:Rs},Tp={FragmentSelector:function(e,t){var n=ha(e,t);return n.w*n.h},SvgSelector:function(e){var t,n,r,o=Ds(e),i=o.nodeName.toLowerCase();if("polygon"===i)return t=o.getAttribute("points").trim().split(" ").map(function(e){return e.split(",").map(function(e){return parseFloat(e.trim())})}),js(t);if("circle"===i)return(n=o.getAttribute("r"))*n*Math.PI;if("ellipse"===i)return(r=o).getAttribute("rx")*r.getAttribute("ry")*Math.PI;if("path"==i)return function(e){var t=Is(e);if(1==t.length)return js(t[0]);var n,r=function(e){return t.find(function(t){if(e!==t)return function(e,t){var n,r=xs(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(!Ps(o,t))return!1}}catch(i){r.e(i)}finally{r.f()}return!0}(e,t)})},o=0,i=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return ks(e,t);var n={}.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)?ks(e,t):void 0}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}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,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;r(a)?o-=js(a):o+=js(a)}}catch(s){i.e(s)}finally{i.f()}return o}(o);if("line"==i)return 0;throw"Unsupported SVG shape type: ".concat(i)}},Dp=function(e){var t=e.targets[0];if(t)return Array.isArray(t.selector)?t.selector[0]:t.selector},Rp=function(e,t){return kp[Dp(e).type](e,t)},Np=function(e,t){return Tp[Dp(e).type](e,t)};function Bp(e){return(Bp="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 Lp(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,_p(r.key),r)}}function _p(e){var t=function(e){if("object"!=Bp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bp(t)?t:t+""}var Gp=function(e,t,n){return t&&Lp(e.prototype,t),n&&Lp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=document.createElementNS(Fi,"svg");n.setAttribute("class","a9s-osd-crosshair-container");var r=document.createElementNS(Fi,"g");r.setAttribute("class","a9s-crosshair"),n.appendChild(r);var o=document.createElementNS(Fi,"line"),i=document.createElementNS(Fi,"line");r.appendChild(o),r.appendChild(i),t.parentElement.appendChild(n);var a=function(e){var n=e.offsetX,r=e.offsetY,a=t.parentElement.offsetWidth,s=t.parentElement.offsetHeight;o.setAttribute("x1",0),o.setAttribute("y1",r),o.setAttribute("x2",a),o.setAttribute("y2",r),i.setAttribute("x1",n),i.setAttribute("y1",0),i.setAttribute("x2",n),i.setAttribute("y2",s)};t.addEventListener("pointermove",a),t.parentElement.addEventListener("pointermove",a)}),Hp=r(7295),Fp=r.n(Hp);function Up(e){return(Up="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 zp(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 Yp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zp(Object(n),!0).forEach(function(t){Qp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vp(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,Jp(r.key),r)}}function Qp(e,t,n){return(t=Jp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jp(e){var t=function(e){if("object"!=Up(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Up(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Up(t)?t:t+""}var Wp=function(e,t){if("FragmentSelector"===e.targets[0].selector.type){var n=ha(e,t),r=n.x,o=n.y;return{minX:r,minY:o,maxX:r+n.w,maxY:o+n.h}}var i=Rp(e,t),a=document.createElementNS(Fi,"svg");a.style.position="absolute",a.style.opacity=0,a.style.top=0,a.style.left=0,a.appendChild(i),document.body.appendChild(a);var s=i.getBBox(),l=s.x,u=s.y,c=s.width,p=s.height;return document.body.removeChild(a),{minX:l,minY:u,maxX:l+c,maxY:u+p}},Zp=function(e,t,n){return t&&Vp(e.prototype,t),n&&Vp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),Qp(this,"clear",function(){return n.spatial_index.clear()}),Qp(this,"getAnnotationAt",function(e,t,r){var o=r?5/r:5,i=n.spatial_index.search({minX:e-o,minY:t-o,maxX:e+o,maxY:t+o}).map(function(e){return e.annotation}).filter(function(n){var r,i,a=(i=n.targets[0],Array.isArray(i.selector)?i.selector[0].type:null===(r=i.selector)||void 0===r?void 0:r.type);if("FragmentSelector"===a)return!0;if("SvgSelector"===a)return function(e,t,n,r){var o,i,a,s,l=Ds(n),u=l.nodeName.toLowerCase(),c=[e,t];if("polygon"===u){var p=Array.from(l.points).map(function(e){return[e.x,e.y]});return Ps(c,p)}if("circle"===u){var f=l.getAttribute("cx"),d=l.getAttribute("cy"),h=l.getAttribute("r");return i=h,a=(o=c)[0]-f,s=o[1]-d,Math.sqrt(a*a+s*s)<=i}if("ellipse"===u){var m=l.getAttribute("cx"),y=l.getAttribute("cy"),b=l.getAttribute("rx"),g=l.getAttribute("ry");return function(e,t,n,r,o){var i=Math.cos(0),a=Math.sin(0),s=e[0]-t,l=e[1]-n,u=i*s+a*l,c=a*s-i*l;return u*u/(r*r)+c*c/(o*o)<=1}(c,m,y,b,g)}if("path"===u)return Is(l).find(function(e){return Ps(c,e)});if("line"===u){var v=parseInt(l.getAttribute("x1")),w=parseInt(l.getAttribute("y1")),A=parseInt(l.getAttribute("x2")),S=parseInt(l.getAttribute("y2"));return function(e,t,n,r,o,i){var a=e[0],s=e[1],l=r-t,u=o-n,c=Math.sqrt(l*l+u*u);return Math.abs((a-t)*u-(s-n)*l)/c<=i}(c,v,w,A,S,r)}throw"Unsupported SVG shape type: ".concat(u)}(e,t,n,o);throw"Unsupported selector type: ".concat(a)});if(i.length>0)return i.sort(function(e,t){return Np(e,n.env.image)-Np(t,n.env.image)}),i[0]}),Qp(this,"getAnnotationsIntersecting",function(e){var t=e.minX,r=t?e:Wp(e,n.env.image),o=n.spatial_index.search(r).map(function(e){return e.annotation});return t?o:o.filter(function(t){return!t.isEqual(e)})}),Qp(this,"insert",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){n.spatial_index.insert(Yp(Yp({},Wp(e,n.env.image)),{},{annotation:e}))})}),Qp(this,"getBounds",function(e){return n.getBounds(e,n.env.image)}),Qp(this,"remove",function(e){var t=Yp(Yp({},Wp(e,n.env.image)),{},{annotation:e});n.spatial_index.remove(t,function(e,t){return e.annotation.id===t.annotation.id})}),this.env=t,t.store=this,this.spatial_index=new(Fp())}),Xp=function(e,t){var n=(Vi(t,".a9s-annotation")?t:t.closest(".a9s-annotation")).querySelector(".a9s-outer").getBoundingClientRect(),r=e.drawer.canvas,o=r.getBoundingClientRect(),i=r.width/o.width,a=r.height/o.height,s=n.x-o.x,l=n.y-o.y,u=n.width,c=n.height,p=document.createElement("CANVAS"),f=p.getContext("2d");p.width=u,p.height=c,f.drawImage(r,s*i,l*a,u*i,c*a,0,0,u,c);var d=e.viewport.viewerElementToImageCoordinates(new(Hi().Point)(s,l)),h=e.viewport.viewportToImageZoom(e.viewport.getZoom());return{snippet:p,transform:function(e){return[d.x+e[0]/i/h,d.y+e[1]/a/h]}}};function Kp(e){return(Kp="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 qp(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,lf(r.key),r)}}function ef(e,t,n){return t&&$p(e.prototype,t),n&&$p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tf(e,t,n){return t=rf(t),function(e,t){if(t&&("object"==Kp(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)}(e,nf()?Reflect.construct(t,n||[],rf(e).constructor):t.apply(e,n))}function nf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(nf=function(){return!!e})()}function rf(e){return(rf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function of(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&&af(e,t)}function af(e,t){return(af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sf(e,t,n){return(t=lf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lf(e){var t=function(e){if("object"!=Kp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kp(t)?t:t+""}var uf=ja(),cf=function(e){function t(e){var n,r,o,i,a;qp(this,t),sf(n=tf(this,t),"_getShapeAt",function(e){var t=function(e){var t=n.svg.createSVGPoint();if(window.TouchEvent&&e instanceof TouchEvent){var r=n.svg.getBoundingClientRect(),o=e.touches[0],i=o.clientX-r.x,a=o.clientY-r.y,s=n.svg.getBoundingClientRect(),l=s.left,u=s.top;return t.x=i+l,t.y=a+u,t.matrixTransform(n.g.getScreenCTM().inverse())}return t.x=e.offsetX,t.y=e.offsetY,t.matrixTransform(n.g.getCTM().inverse())}(e),r=t.x,o=t.y,i=n.store.getAnnotationAt(r,o,n.currentScale());if(i)return n.findShape(i)}),sf(n,"_initDrawingTools",function(e){var t,r=!1,o=!1,i=!1;n.tools=new Ip(n.g,n.config,n.env),n.tools.on("complete",function(e){o=!1,n.onDrawingComplete(e)}),n.mouseTracker=new(Hi().MouseTracker)({element:n.svg,preProcessEventHandler:function(e){n.mouseTracker.enabled||(e.preventDefault=!1,e.preventGesture=!0),n.selectedShape&&"wheel"===e.eventType&&(e.preventDefault=!1,n.viewer.canvas.dispatchEvent(new e.originalEvent.constructor(e.eventType,e.originalEvent)))},pressHandler:function(t){n.tools.current.isDrawing||(n.tools.current.start(t.originalEvent,n.drawOnSingleClick&&!n.hoveredShape),e||n.scaleTool(n.tools.current))},moveHandler:function(e){if(n.tools.current.isDrawing){var t=n.tools.current.getSVGPoint(e.originalEvent),a=t.x,s=t.y;o||e.originalEvent.stopPropagation(),n.tools.current.onMouseMove(a,s,e.originalEvent),r||(n.emit("startSelection",{x:a,y:s}),r=!0),!i&&n.tools.current.onDragStart&&(n.tools.current.onDragStart(a,s,e.originalEvent),i=!0)}},releaseHandler:function(e){if(n.tools.current.isDrawing){var t=n.tools.current.getSVGPoint(e.originalEvent),a=t.x,s=t.y;r&&(n.emit("endSelection",{x:a,y:s}),o=!0),n.tools.current.onMouseUp(a,s,e.originalEvent),i&&n.tools.current.onDragEnd&&n.tools.current.onDragEnd()}r=!1,i=!1}});var a=n.config.hotkey?n.config.hotkey.key?n.config.hotkey.key.toLowerCase():n.config.hotkey.toLowerCase():"shift",s=null===(t=n.config.hotkey)||void 0===t?void 0:t.inverted;n.mouseTracker.enabled=s,n.onKeyDown&&document.removeEventListener("keydown",n.onKeyDown),n.onKeyUp&&document.removeEventListener("keydown",n.onKeyDown),n.onKeyDown=function(e){if(e.key.toLowerCase()===a&&!n.selectedShape){var t=!n.readOnly&&!s;n.mouseTracker.enabled=t,n.tools.current.enabled=t}},n.onKeyUp=function(e){e.key.toLowerCase()!==a||n.tools.current.isDrawing||(n.mouseTracker.enabled=s,n.tools.current.enabled=s,o=!1)},document.addEventListener("keydown",n.onKeyDown),document.addEventListener("keyup",n.onKeyUp)}),sf(n,"_initMouseEvents",function(){n.svg.addEventListener("mousemove",function(e){var t;if(!(null!==(t=n.tools)&&void 0!==t&&t.current.isDrawing||e.target.closest(".a9s-annotation.editable.selected"))){var r,o=n._getShapeAt(e);if((null==o?void 0:o.annotation)!==(null===(r=n.hoveredShape)||void 0===r?void 0:r.annotation)){if(n.hoveredShape){var i=n.hoveredShape.element||n.hoveredShape;Yi(i,"hover"),n.emit("mouseLeaveAnnotation",n.hoveredShape.annotation,n.hoveredShape)}o&&(zi(o,"hover"),n.emit("mouseEnterAnnotation",o.annotation,o))}n.hoveredShape=o}}),n.svg.parentElement.addEventListener("mouseleave",function(){n.hoveredShape&&(Yi(n.hoveredShape,"hover"),n.emit("mouseLeaveAnnotation",n.hoveredShape.annotation,n.hoveredShape),n.hoveredShape=null)});var e=null;n.viewer.addHandler("canvas-press",function(){return e=(new Date).getTime()}),n.viewer.addHandler("canvas-click",function(t){var r,o=t.originalEvent;if(!(null!==(r=n.tools.current)&&void 0!==r&&r.isDrawing||n.disableSelect)&&(new Date).getTime()-e<250){var i=o.target.closest(".a9s-annotation.editable.selected")?n.selectedShape:n._getShapeAt(o);i?(t.preventDefaultAction=!0,n.selectShape(i)):i||(n.deselect(),n.emit("select",{}))}n.disableSelect&&n.hoveredShape&&n.emit("clickAnnotation",n.hoveredShape.annotation,n.hoveredShape)})}),sf(n,"_lazy",function(e){if(n.viewer.world.getItemAt(0))e();else{var t=function(){e(),n.viewer.removeHandler("open",t),n.viewer.world.removeHandler("add-item",t)};n.viewer.addHandler("open",t),n.viewer.world.addHandler("add-item",t)}}),sf(n,"_refreshNonScalingAnnotations",function(){var e=n.currentScale();Array.from(n.svg.querySelectorAll(".a9s-non-scaling")).forEach(function(t){return t.setAttribute("transform","scale(".concat(1/e,")"))})}),sf(n,"addAnnotation",function(e,t){var r=t||n.g,o=Rp(e,n.env.image);return zi(o,"a9s-annotation"),o.setAttribute("data-id",e.id),o.annotation=e,r.appendChild(o),ts(o,e,n.formatters),n.scaleFormatterElements(o),o}),sf(n,"addDrawingTool",function(e){return n.tools.registerTool(e)}),sf(n,"addOrUpdateAnnotation",function(e,t){var r,o=null===(r=n.selectedShape)||void 0===r?void 0:r.annotation;(o===e||null!=o&&o.isSelection||o==t)&&n.deselect(),t&&n.removeAnnotation(e),n.removeAnnotation(e);var i=n.addAnnotation(e);Vi(i,"a9s-non-scaling")&&i.setAttribute("transform","scale(".concat(1/n.currentScale(),")")),n.store.insert(e)}),sf(n,"currentScale",function(){var e=n.viewer.viewport.getContainerSize().x;return n.viewer.viewport.getZoom(!0)*e/n.viewer.world.getContentFactor()}),sf(n,"deselect",function(){var e;if(null===(e=n.tools)||void 0===e||e.current.stop(),n.selectedShape){var t=n.selectedShape.annotation;if(n.selectedShape.destroy){if(n.selectedShape.mouseTracker.destroy(),n.selectedShape.destroy(),!t.isSelection){var r=n.addAnnotation(t);Vi(r,"a9s-non-scaling")&&r.setAttribute("transform","scale(".concat(1/n.currentScale(),")"))}}else Yi(n.selectedShape,"selected");n.selectedShape=null}}),sf(n,"destroy",function(){n.deselect(),n.svg.parentNode.removeChild(n.svg)}),sf(n,"findShape",function(e){var t=null!=e&&e.id?e.id:e;return n.g.querySelector('.a9s-annotation[data-id="'.concat(t,'"]'))}),sf(n,"_fit",function(e,t,r){var o=n.findShape(e);if(o){var i=!!t&&("boolean"==typeof t?t:t.immediately),a=(null==t?void 0:t.padding)||0,s=n.viewer.container.getBoundingClientRect(),l=Math.min(2*a/s.width,2*a/s.height),u=o.getBBox(),c=u.x,p=u.y,f=u.width,d=u.height,h=c-l*f,m=p-l*d,y=f+2*l*f,b=d+2*l*d,g=n.viewer.viewport.imageToViewportRectangle(h,m,y,b);n.viewer.viewport[r](g,i)}}),sf(n,"fitBounds",function(e,t){return n._fit(e,t,"fitBounds")}),sf(n,"fitBoundsWithConstraints",function(e,t){return n._fit(e,t,"fitBoundsWithConstraints")}),sf(n,"getAnnotations",function(){return Array.from(n.g.querySelectorAll(".a9s-annotation")).map(function(e){return e.annotation})}),sf(n,"getAnnotationsIntersecting",function(e){var t=e.id?e:n.findShape(e).annotation;return n.store.getAnnotationsIntersecting(t)}),sf(n,"getImageSnippetById",function(e){var t=n.findShape(e);if(t)return Xp(n.viewer,t)}),sf(n,"getSelectedImageSnippet",function(){if(n.selectedShape){var e,t=null!==(e=n.selectedShape.element)&&void 0!==e?e:n.selectedShape;return Xp(n.viewer,t)}}),sf(n,"init",function(e){n.deselect(),Array.from(n.g.querySelectorAll(".a9s-annotation")).forEach(function(e){return n.g.removeChild(e)}),n.store.clear(),n._lazy(function(){console.time("Took"),console.log("Drawing..."),n.loaded||(n.g.style.display="none"),e.forEach(function(e){return n.addAnnotation(e)}),console.log("Indexing..."),n.store.insert(e),console.timeEnd("Took"),n.resize()})}),sf(n,"listDrawingTools",function(){return n.tools.listTools()}),sf(n,"overrideId",function(e,t){var r=n.findShape(e);r.setAttribute("data-id",t);var o=r.annotation,i=o.clone({id:t});return r.annotation=i,n.store.remove(o),n.store.insert(i),i}),sf(n,"panTo",function(e,t){var r=n.findShape(e);if(r){var o=r.getBoundingClientRect(),i=o.top,a=o.left,s=o.width,l=o.height,u=a+s/2+window.scrollX,c=i+l/2+window.scrollY,p=n.viewer.viewport.windowToViewportCoordinates(new(Hi().Point)(u,c));n.viewer.viewport.panTo(p,t)}}),sf(n,"removeAnnotation",function(e){var t,r=e.type?e.id:e;(null===(t=n.selectedShape)||void 0===t?void 0:t.annotation.id)===r&&n.deselect();var o=n.findShape(e);if(o){var i,a=o.annotation;(null===(i=n.selectedShape)||void 0===i?void 0:i.annotation)===a&&n.deselect(),o.parentNode.removeChild(o),n.store.remove(a)}}),sf(n,"removeDrawingTool",function(e){var t;return null===(t=n.tools)||void 0===t?void 0:t.unregisterTool(e)}),sf(n,"scaleFormatterElements",function(e){var t=1/n.currentScale();if(e){var r=e.querySelector(".a9s-annotation:not(.a9s-non-scaling) .a9s-formatter-el");r&&r.firstChild.setAttribute("transform","scale(".concat(t,")"))}else Array.from(n.g.querySelectorAll(".a9s-annotation:not(.a9s-non-scaling) .a9s-formatter-el")).forEach(function(e){return e.firstChild.setAttribute("transform","scale(".concat(t,")"))})}),sf(n,"scaleTool",function(e){if(e){var t=1/n.currentScale();e.scale=t,e.onScaleChanged&&e.onScaleChanged(t)}}),sf(n,"selectAnnotation",function(e,t){n.selectedShape&&n.deselect();var r=n.findShape(e);if(r){n.selectShape(r,t);var o=n.selectedShape.element?n.selectedShape.element:n.selectedShape;return{annotation:r.annotation,element:o}}n.deselect()}),sf(n,"selectShape",function(e,t){var r;if(t||e.annotation.isSelection||n.emit("clickAnnotation",e.annotation,e),(null===(r=n.selectedShape)||void 0===r?void 0:r.annotation)!==e.annotation){n.selectedShape&&n.selectedShape.annotation!==e.annotation&&n.deselect();var o=e.annotation;if(n.readOnly||o.readOnly||n.headless)n.selectedShape=e,zi(e,"selected"),t||n.emit("select",{annotation:o,element:e,skipEvent:t});else{var i=n.tools.forAnnotation(o);if(i){setTimeout(function(){e.parentNode.removeChild(e),t||n.emit("select",{annotation:o,element:n.selectedShape.element})},1),n.selectedShape=i.createEditableShape(o,n.formatters),n.scaleTool(n.selectedShape),n.scaleFormatterElements(n.selectedShape.element),n.selectedShape.element.annotation=o;var a=new(Hi().MouseTracker)({element:n.svg,preProcessEventHandler:function(e){e.stopPropagation="wheel"!==e.eventType,e.preventDefault=!1,e.preventGesture=!0}}).setTracking(!1);n.selectedShape.element.addEventListener("mouseenter",function(){n.hoveredShape=n.selectedShape,a.setTracking(!0)}),n.selectedShape.element.addEventListener("mouseleave",function(){n.hoveredShape=null,a.setTracking(!1)}),n.selectedShape.mouseTracker=a,n.selectedShape.on("update",function(e){return n.emit("updateTarget",n.selectedShape.element,e)})}else n.selectedShape=e,t||n.emit("select",{annotation:o,element:n.selectedShape})}}}),sf(n,"setDrawingEnabled",function(e){if(n.mouseTracker){var t=e&&!n.readOnly;n.mouseTracker.enabled=t,n.mouseTracker.setTracking(t),n.tools.current&&(n.tools.current.enabled=t)}}),sf(n,"setDrawingTool",function(e,t){var r;n.tools&&(null===(r=n.tools.current)||void 0===r||r.stop(),n.tools.setCurrent(e,t))}),sf(n,"setVisible",function(e){e?n.svg.style.display=null:(n.deselect(),n.svg.style.display="none")}),sf(n,"stopDrawing",function(){var e;null!==(e=n.tools)&&void 0!==e&&e.current&&(n.tools.current.isDrawing&&n.tools.current.stop(),n.mouseTracker.enabled=!1,n.tools.current.enabled=!1)}),n.viewer=e.viewer,n.config=e.config,n.env=e.env,n.readOnly=e.config.readOnly,n.headless=e.config.headless,e.config.formatter?n.formatters=[e.config.formatter]:e.config.formatters&&(n.formatters=Array.isArray(e.config.formatters)?e.config.formatters:[e.config.formatters]),n.disableSelect=e.config.disableSelect,n.drawOnSingleClick=e.config.drawOnSingleClick,n.svg=document.createElementNS(Fi,"svg"),uf?(n.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer touch"),r=n.svg,o=null,i=function(e,t){return new MouseEvent(e,{screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,bubbles:!0})},a=function(e){var t=e.changedTouches[0],n=i(Ma[e.type],t);t.target.dispatchEvent(n),e.preventDefault(),"touchstart"!==e.type&&"touchmove"!==e.type||(o&&clearTimeout(o),o=setTimeout(function(){var e=i("dblclick",t);t.target.dispatchEvent(e)},800)),"touchend"===e.type&&o&&clearTimeout(o)},r.addEventListener("touchstart",a,!0),r.addEventListener("touchmove",a,!0),r.addEventListener("touchend",a,!0),r.addEventListener("touchcancel",a,!0)):n.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer"),n.g=document.createElementNS(Fi,"g"),n.svg.appendChild(n.g),n.viewer.canvas.appendChild(n.svg),n.viewer.addHandler("animation",function(){return n.resize()}),n.viewer.addHandler("rotate",function(){return n.resize()}),n.viewer.addHandler("resize",function(){return n.resize()}),n.viewer.addHandler("flip",function(){return n.resize()}),n.loaded=!1;var s=function(){var t=n.viewer.world.getItemAt(0).source.dimensions,r=t.x,o=t.y,i=n.viewer.world.getItemAt(0).source["@id"]||new URL(n.viewer.world.getItemAt(0).source.url,document.baseURI).href;n.env.image={src:i,naturalWidth:r,naturalHeight:o},e.config.crosshair&&(n.crosshair||(n.crosshair=new Gp(n.svg),zi(n.svg,"no-cursor"))),n.loaded||n.emit("load",i),n.loaded=!0,n.g.style.display="inline",n.resize()};return n.viewer.addHandler("open",s),n.viewer.world.addHandler("add-item",s),n.viewer.world.getItemAt(0)&&s(),n.store=new Zp(n.env),n.selectedShape=null,n.hoveredShape=null,n._initMouseEvents(),n}return of(t,e),ef(t,[{key:"resize",value:function(){var e,t=this.viewer.viewport.getFlip(),n=this.viewer.viewport.pixelFromPoint(new(Hi().Point)(0,0),!0);t&&(n.x=this.viewer.viewport._containerInnerSize.x-n.x);var r=this.currentScale(),o=t?-r:r,i=this.viewer.viewport.getRotation();this.g.setAttribute("transform","translate(".concat(n.x,", ").concat(n.y,") scale(").concat(o,", ").concat(r,") rotate(").concat(i,")")),this._refreshNonScalingAnnotations(),this.scaleFormatterElements(),this.selectedShape&&(this.selectedShape.element?(this.scaleTool(this.selectedShape),this.emit("viewportChange",this.selectedShape.element)):this.emit("viewportChange",this.selectedShape)),null!==(e=this.tools)&&void 0!==e&&e.current&&this.scaleTool(this.tools.current)}}])}(n()),pf=function(e){function t(e){var n;return qp(this,t),sf(n=tf(this,t,[e]),"onDrawingComplete",function(e){var t;n.mouseTracker.enabled=null===(t=n.config.hotkey)||void 0===t?void 0:t.inverted,n.selectShape(e),n.emit("createSelection",e.annotation)}),n._initDrawingTools(),n}return of(t,e),ef(t)}(cf);function ff(e){return(ff="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 df(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 hf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?df(Object(n),!0).forEach(function(t){mf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):df(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mf(e,t,n){return r=function(e){if("object"!=ff(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ff(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==ff(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var yf=function(e){var t=e.viewport.viewportToImageRectangle(e.viewport.getBounds(!0)),n=e.viewport.getContainerSize().x;return{extent:t,scale:e.viewport.getZoom(!0)*n/e.world.getContentFactor()}},bf=function(e,t){var n=yf(e),r=n.extent,o=n.scale,i=t.selector,a=aa.create({target:t});if("SvgSelector"===i.type){var s=Ds(a),l=s.nodeName.toLowerCase(),u=null;if("polygon"===l)u=gf(s,r,o);else if("circle"===l)u=vf(s,r,o);else if("ellipse"===l)u=wf(s,r,o);else{if("path"!==l)throw"Unsupported SVG shape type: ".concat(l);u=Af(s,r,o)}var c=u.outerHTML||(new XMLSerializer).serializeToString(u);return c=c.replace(' xmlns="'.concat(Fi,'"'),""),hf(hf({},t),{},{selector:{type:"SvgSelector",value:"<svg>".concat(c,"</svg>")}})}if("FragmentSelector"===i.type){var p=ha(a),f=p.x,d=p.y,h=p.w,m=p.h,y=r.x+f/o,b=r.y+d/o,g=h/o,v=m/o;return 0===h&&0===m?hf(hf({},ma(y,b,g,v)),{},{renderedVia:{name:"point"}}):ma(y,b,g,v)}throw"Unsupported selector type: ".concat(i.type)},gf=function(e,t,n){var r=Array.from(e.points).map(function(e){return t.x+e.x/n+","+(t.y+e.y/n)}).join(" ");return e.setAttribute("points",r),e},vf=function(e,t,n){var r=parseFloat(e.getAttribute("cx")),o=parseFloat(e.getAttribute("cy")),i=parseFloat(e.getAttribute("r"));return e.setAttribute("cx",t.x+r/n),e.setAttribute("cy",t.y+o/n),e.setAttribute("r",i/n),e},wf=function(e,t,n){var r=parseFloat(e.getAttribute("cx")),o=parseFloat(e.getAttribute("cy")),i=parseFloat(e.getAttribute("rx")),a=parseFloat(e.getAttribute("ry"));return e.setAttribute("cx",t.x+r/n),e.setAttribute("cy",t.y+o/n),e.setAttribute("rx",i/n),e.setAttribute("ry",a/n),e},Af=function(e,t,n){var r=e.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(function(e){return e.trim()}).map(function(e){var r=e.substring(0,1);if("z"===r.toLowerCase())return r;var o=e.substring(1).split(" ").map(function(e){return parseFloat(e.trim())}),i=r===r.toUpperCase();return r+" "+(i?t.x+o[0]/n:o[0]/n)+" "+(i?t.y+o[1]/n:o[1]/n)}).join(" ");return e.setAttribute("d",r),e},Sf=function(e,t){var n=yf(e),r=n.extent,o=n.scale,i=t.selector("FragmentSelector");if(t.selector("SvgSelector")){var a=Ds(t),s=a.nodeName.toLowerCase(),l=null;if("polygon"===s)l=Of(a,r,o);else if("circle"===s)l=Ef(a,r,o);else if("ellipse"===s)l=xf(a,r,o);else{if("path"!==s)throw"Unsupported SVG shape type: ".concat(s);l=Cf(a,r,o)}var u=l.outerHTML||(new XMLSerializer).serializeToString(l);u=u.replace(' xmlns="'.concat(Fi,'"'),"");var c={selector:{type:"SvgSelector",value:"<svg>".concat(u,"</svg>")}};return t.clone({target:c})}if(i){var p=ha(t),f=p.x,d=p.y,h=p.w,m=p.h,y=(f-r.x)*o,b=(d-r.y)*o,g=ma(y,b,h*o,m*o);return t.clone({target:g})}},Of=function(e,t,n){var r=Array.from(e.points).map(function(e){return n*(e.x-t.x)+","+n*(e.y-t.y)}).join(" ");return e.setAttribute("points",r),e},Ef=function(e,t,n){var r=e.getAttribute("cx"),o=e.getAttribute("cy"),i=e.getAttribute("r");return e.setAttribute("cx",n*(r-t.x)),e.setAttribute("cy",n*(o-t.y)),e.setAttribute("r",i*n),e},xf=function(e,t,n){var r=e.getAttribute("cx"),o=e.getAttribute("cy"),i=e.getAttribute("rx"),a=e.getAttribute("ry");return e.setAttribute("cx",n*(r-t.x)),e.setAttribute("cy",n*(o-t.y)),e.setAttribute("rx",i*n),e.setAttribute("ry",a*n),e},Cf=function(e,t,n){var r=e.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(function(e){return e.trim()}).map(function(e){var r=e.substring(0,1);if("z"===r.toLowerCase())return r;var o=e.substring(1).split(" ").filter(function(e){return e}).map(function(e){return parseFloat(e.trim())}),i=r===r.toUpperCase();return r+" "+(i?n*(o[0]-t.x):n*o[0])+" "+(i?n*(o[1]-t.y):n*o[1])}).join(" ");return e.setAttribute("d",r),e},Mf=function(e,t){var n,r,o=yf(e),i=o.extent,a=o.scale,s=(r=t.annotation.targets[0])?Array.isArray(r.selector)?r.selector[0].type:null===(n=r.selector)||void 0===n?void 0:n.type:null;if("FragmentSelector"===s)jf(t,i,a);else{if("SvgSelector"!==s)throw"Unsupported selector type type: ".concat(s);Pf(t,i,a)}var l=t.querySelector(".a9s-formatter-el");if(l){var u=t.querySelector(".a9s-inner").getBBox(),c=u.x,p=u.y;l.setAttribute("x",c),l.setAttribute("y",p)}},jf=function(e,t,n){var r=ha(e.annotation),o=r.x,i=r.y,a=r.w,s=r.h,l=e.querySelector(".a9s-outer"),u=e.querySelector(".a9s-inner"),c=n*(o-t.x),p=n*(i-t.y);[l,u].forEach(0===a&&0===s?function(e){e.setAttribute("cx",c),e.setAttribute("cy",p)}:function(e){e.setAttribute("x",c),e.setAttribute("y",p),e.setAttribute("width",a*n),e.setAttribute("height",s*n)})},Pf=function(e,t,n){var r=Ds(e.annotation),o=r.nodeName.toLowerCase();if("polygon"===o)If(e,r,t,n);else if("circle"===o)kf(e,r,t,n);else if("ellipse"===o)Tf(e,r,t,n);else{if("path"!==o)throw"Unsupported SVG shape type: ".concat(o);Df(e,r,t,n)}},If=function(e,t,n,r){var o=Array.from(t.points).map(function(e){return r*(e.x-n.x)+","+r*(e.y-n.y)}).join(" ");e.querySelector(".a9s-outer").setAttribute("points",o),e.querySelector(".a9s-inner").setAttribute("points",o)},kf=function(e,t,n,r){var o=r*(t.getAttribute("cx")-n.x),i=r*(t.getAttribute("cy")-n.y),a=r*t.getAttribute("r"),s=e.querySelector(".a9s-outer");s.setAttribute("cx",o),s.setAttribute("cy",i),s.setAttribute("r",a);var l=e.querySelector(".a9s-inner");l.setAttribute("cx",o),l.setAttribute("cy",i),l.setAttribute("r",a)},Tf=function(e,t,n,r){var o=r*(t.getAttribute("cx")-n.x),i=r*(t.getAttribute("cy")-n.y),a=r*t.getAttribute("rx"),s=r*t.getAttribute("ry"),l=e.querySelector(".a9s-outer");l.setAttribute("cx",o),l.setAttribute("cy",i),l.setAttribute("rx",a),l.setAttribute("ry",s);var u=e.querySelector(".a9s-inner");u.setAttribute("cx",o),u.setAttribute("cy",i),u.setAttribute("rx",a),u.setAttribute("ry",s)},Df=function(e,t,n,r){var o=t.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(function(e){return e.trim()}).map(function(e){var t=e.substring(0,1);if("z"===t.toLowerCase())return t;var o=e.substring(1).split(" ").filter(function(e){return e}).map(function(e){return parseFloat(e.trim())}),i=t===t.toUpperCase();return t+" "+(i?r*(o[0]-n.x):r*o[0])+" "+(i?r*(o[1]-n.y):r*o[1])}).join(" ");e.querySelector(".a9s-inner").setAttribute("d",o),e.querySelector(".a9s-outer").setAttribute("d",o)};function Rf(e){return(Rf="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 Nf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Nf=function(){return!!e})()}function Bf(e){return(Bf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Lf(e,t){return(Lf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _f(e,t,n){return(t=Gf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gf(e){var t=function(e){if("object"!=Rf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rf(t)?t:t+""}var Hf=ja(),Ff=function(e){function t(e){var n,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_f((r=this,i=[e],o=Bf(o=t),n=function(e,t){if(t&&("object"==Rf(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)}(r,Nf()?Reflect.construct(o,i||[],Bf(r).constructor):o.apply(r,i))),"_fit",function(e,t,r){var o=!!t&&("boolean"==typeof t?t:t.immediately),i=(null==t?void 0:t.padding)||0,a=n.findShape(e);if(a){var s=n.viewer.container.getBoundingClientRect(),l=a.getBoundingClientRect(),u=l.x-s.x-i,c=l.y-s.y-i,p=l.width+2*i,f=l.height+2*i,d=n.viewer.viewport.viewerElementToViewportRectangle(new(Hi().Rect)(u,c,p,f));n.viewer.viewport[r](d,o)}}),_f(n,"_getShapeAt",function(e){var t=n.viewer.viewport.viewerElementToViewportCoordinates(function(e){if(Hf){var t=n.svg.getBoundingClientRect(),r=e.clientX-t.x,o=e.clientY-t.y;return new(Hi().Point)(r,o)}return new(Hi().Point)(e.offsetX,e.offsetY)}(e)),r=n.viewer.viewport.viewportToImageCoordinates(t.x,t.y),o=r.x,i=r.y,a=n.store.getAnnotationAt(o,i,n.currentScale());if(a)return n.findShape(a)}),_f(n,"_refreshNonScalingAnnotations",function(){}),_f(n,"addAnnotation",function(e,t){var r=t||n.g,o=Rp(e,n.env.image);return zi(o,"a9s-annotation"),o.setAttribute("data-id",e.id),o.annotation=e,Mf(n.viewer,o),r.appendChild(o),ts(o,e,n.formatters),o}),_f(n,"addOrUpdateAnnotation",function(e,t){var r,o=null===(r=n.selectedShape)||void 0===r?void 0:r.annotation;(o===e||null!=o&&o.isSelection||o==t)&&n.deselect(),t&&n.removeAnnotation(e),n.removeAnnotation(e),n.addAnnotation(e),n.store.insert(e)}),_f(n,"deselect",function(){var e;if(null===(e=n.tools)||void 0===e||e.current.stop(),n.selectedShape){var t=n.selectedShape.annotation;n.selectedShape.destroy?(n.selectedShape.mouseTracker.destroy(),n.selectedShape.destroy(),t.isSelection||n.addAnnotation(t)):Yi(n.selectedShape,"selected"),n.selectedShape=null}}),_f(n,"onDrawingComplete",function(e){var t=e.annotation.clone({target:bf(n.viewer,e.annotation.target)});e.annotation=t,n.selectShape(e),n.emit("createSelection",e.annotation),n.mouseTracker.enabled=!1}),_f(n,"selectShape",function(e,t){var r;if(t||e.annotation.isSelection||n.emit("clickAnnotation",e.annotation,e),(null===(r=n.selectedShape)||void 0===r?void 0:r.annotation)!==e.annotation){n.selectedShape&&n.selectedShape.annotation!==e.annotation&&n.deselect(!0);var o=e.annotation;if(n.readOnly||o.readOnly||n.headless)n.selectedShape=e,zi(e,"selected"),t||n.emit("select",{annotation:o,element:e,skipEvent:t});else{setTimeout(function(){e.parentNode.removeChild(e),t||n.emit("select",{annotation:o,element:n.selectedShape.element})},1);var i=n.tools.forAnnotation(o);n.selectedShape=i.createEditableShape(o),n.selectedShape.element.annotation=o;var a=Sf(n.viewer,o);n.selectedShape.updateState(a);var s=new(Hi().MouseTracker)({element:n.svg,preProcessEventHandler:function(e){e.stopPropagation=!0,e.preventDefault=!1,e.preventGesture=!0}}).setTracking(!1);n.selectedShape.element.addEventListener("mouseenter",function(){n.hoveredShape=n.selectedShape,s.setTracking(!0)}),n.selectedShape.element.addEventListener("mouseleave",function(){n.hoveredShape=null,s.setTracking(!1)}),n.selectedShape.mouseTracker=s,n.selectedShape.on("update",function(e){var t=bf(n.viewer,e);n.selectedShape.element.annotation=n.selectedShape.annotation.clone({target:t}),n.emit("updateTarget",n.selectedShape.element,t)})}}}),n._initDrawingTools(!0),n}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lf(e,t)}(t,e),n=t,r=[{key:"resize",value:function(){var e=this;if(this.store&&(Array.from(this.g.querySelectorAll(".a9s-annotation:not(.selected)")).forEach(function(t){return Mf(e.viewer,t)}),this.selectedShape))if(this.selectedShape.element){var t=Sf(this.viewer,this.selectedShape.element.annotation);this.selectedShape.updateState&&this.selectedShape.updateState(t),this.emit("viewportChange",this.selectedShape.element)}else this.emit("viewportChange",this.selectedShape)}}],r&&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,Gf(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(cf);function Uf(e){return(Uf="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 zf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(zf=function(){return!!e})()}function Yf(e){return(Yf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vf(e,t){return(Vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qf(e,t,n){return(t=Jf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jf(e){var t=function(e){if("object"!=Uf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Uf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Uf(t)?t:t+""}var Wf=function(t){function n(t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),Qf(r=function(e,t,n){return t=Yf(t),function(e,t){if(t&&("object"==Uf(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)}(e,zf()?Reflect.construct(t,n||[],Yf(e).constructor):t.apply(e,n))}(this,n,[t]),"clearState",function(e){return r.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,beforeHeadlessModify:null},e)}),Qf(r,"forwardEvent",function(e,t){r.annotationLayer.on(e,function(e,n){r.props[t](e.clone(),n)})}),Qf(r,"onKeyUp",function(e){if(27===e.which){r.annotationLayer.stopDrawing();var t=r.state.selectedAnnotation;t&&(r.cancelSelected(),r.props.onCancelSelected(t))}else if(46===e.which&&!r.props.config.disableDeleteKey){var n=r.state.selectedAnnotation;n&&(n.isSelection?r.onCancelAnnotation(n):r.onDeleteAnnotation(n))}}),Qf(r,"handleStartSelect",function(e){return r.props.onSelectionStarted(e)}),Qf(r,"handleEndSelect",function(e){return r.props.onSelectionEnded(e)}),Qf(r,"handleSelect",function(e,t){r.state.editorDisabled?r.onHeadlessSelect(e,t):r.onNormalSelect(e,t)}),Qf(r,"onNormalSelect",function(e,t){var n=e.annotation,o=e.element;if(n){var i=function(){r.setState({selectedAnnotation:n,selectedDOMElement:o,modifiedTarget:null},function(){t||(n.isSelection?r.props.onSelectionCreated(n.clone()):r.props.onAnnotationSelected(n.clone(),o))})},a=r.state.selectedAnnotation;a&&!a.isEqual(n)?r.clearState(function(){r.props.onCancelSelected(a),i()}):i()}else{var s=r.state.selectedAnnotation;s?r.clearState(function(){return r.props.onCancelSelected(s)}):r.clearState()}}),Qf(r,"onHeadlessSelect",function(e,t){r.saveSelected().then(function(){r.onNormalSelect(e,t)})}),Qf(r,"handleUpdateTarget",function(e,t){r.setState({selectedDOMElement:e,modifiedTarget:t});var n=JSON.parse(JSON.stringify(t));r.props.onSelectionTargetChanged(n)}),Qf(r,"handleViewportChange",function(e){return r.setState({selectedDOMElement:e})}),Qf(r,"overrideAnnotationId",function(e){return function(t){var n=e.id;r.state.selectedAnnotation?r.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null},function(){r.annotationLayer.overrideId(n,t)}):r.annotationLayer.overrideId(n,t)}}),Qf(r,"onCreateOrUpdateAnnotation",function(e,t){return function(n,o){var i=n.isSelection?n.toAnnotation():n;i=r.state.modifiedTarget?i.clone({target:r.state.modifiedTarget}):i.clone(),r.clearState(function(){r.annotationLayer.addOrUpdateAnnotation(i,o),o?r.props[e](i,o.clone()):r.props[e](i,r.overrideAnnotationId(i)),t&&t()})}}),Qf(r,"onDeleteAnnotation",function(e){r.clearState(),r.annotationLayer.removeAnnotation(e),r.props.onAnnotationDeleted(e)}),Qf(r,"onCancelAnnotation",function(e,t){r.state.editorDisabled||r.annotationLayer.deselect(),r.props.onCancelSelected(e),r.clearState(t)}),Qf(r,"addAnnotation",function(e){var t;e.id===(null===(t=r.state.selectedAnnotation)||void 0===t?void 0:t.id)&&(r.annotationLayer.deselect(),r.clearState()),r.annotationLayer.addOrUpdateAnnotation(e.clone())}),Qf(r,"addDrawingTool",function(e){return r.annotationLayer.addDrawingTool(e)}),Qf(r,"cancelSelected",function(){return new Promise(function(e){r.annotationLayer.deselect(),r.state.selectedAnnotation?r.clearState(e):e()})}),Qf(r,"fitBounds",function(e,t){return r.annotationLayer.fitBounds(e,t)}),Qf(r,"fitBoundsWithConstraints",function(e,t){return r.annotationLayer.fitBoundsWithConstraints(e,t)}),Qf(r,"getAnnotationById",function(e){var t;return null===(t=r.annotationLayer.findShape(e))||void 0===t?void 0:t.annotation}),Qf(r,"getAnnotations",function(){return r.annotationLayer.getAnnotations().map(function(e){return e.clone()})}),Qf(r,"getAnnotationsIntersecting",function(e){return r.annotationLayer.getAnnotationsIntersecting(e)}),Qf(r,"getImageSnippetById",function(e){return r.annotationLayer.getImageSnippetById(e)}),Qf(r,"getSelected",function(){var e;if(r.state.selectedAnnotation)return r.state.editorDisabled?r.state.selectedAnnotation:null===(e=r._editor.current)||void 0===e?void 0:e.getCurrentAnnotation()}),Qf(r,"getSelectedImageSnippet",function(){return r.annotationLayer.getSelectedImageSnippet()}),Qf(r,"listDrawingTools",function(){return r.annotationLayer.listDrawingTools()}),Qf(r,"panTo",function(e,t){return r.annotationLayer.panTo(e,t)}),Qf(r,"removeAnnotation",function(e){return r.annotationLayer.removeAnnotation(e)}),Qf(r,"removeDrawingTool",function(e){return r.annotationLayer.removeDrawingTool(e)}),Qf(r,"saveSelected",function(){return new Promise(function(e){var t=r.state.selectedAnnotation;if(t)if(r._editor.current)r._editor.current.onOk(),e();else if(t.isSelection)t.bodies.length>0||r.props.config.allowEmpty?r.onCreateOrUpdateAnnotation("onAnnotationCreated",e)(t):(r.annotationLayer.deselect(),e());else{var n=r.state,o=n.beforeHeadlessModify,i=n.modifiedTarget;o?r.onCreateOrUpdateAnnotation("onAnnotationUpdated",e)(t,o):i?r.onCreateOrUpdateAnnotation("onAnnotationUpdated",e)(t,t):r.onCancelAnnotation(t,e)}else e()})}),Qf(r,"selectAnnotation",function(e){var t=r.annotationLayer.selectAnnotation(e,!0);if(t)return r.handleSelect(t,!0),t.annotation.clone();r.clearState()}),Qf(r,"setAnnotations",function(e){return r.annotationLayer.init(e.map(function(e){return e.clone()}))}),Qf(r,"setDrawingEnabled",function(e){return r.annotationLayer.setDrawingEnabled(e)}),Qf(r,"setDrawingTool",function(e,t){r.state.color=t,r.annotationLayer.setDrawingTool(e,t)}),Qf(r,"setVisible",function(e){r.annotationLayer.setVisible(e),e||r.clearState()}),Qf(r,"updateSelected",function(e,t){return new Promise(function(n){r.state.selectedAnnotation&&(t?r.state.selectedAnnotation.isSelection?r.onCreateOrUpdateAnnotation("onAnnotationCreated",n)(e):r.onCreateOrUpdateAnnotation("onAnnotationUpdated",n)(e,r.state.selectedAnnotation):r.setState({selectedAnnotation:e,beforeHeadlessModify:r.state.beforeHeadlessModify||r.state.selectedAnnotation},n))})}),r.state={selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,readOnly:t.config.readOnly,editorDisabled:t.config.disableEditor,widgets:t.config.widgets,beforeHeadlessModify:null},r._editor=e.default.createRef(),r}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vf(e,t)}(n,t),function(e,t){return t&&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,Jf(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"componentDidMount",value:function(){this.annotationLayer=this.props.config.gigapixelMode?new Ff(this.props):new pf(this.props),this.annotationLayer.on("load",this.props.onLoad),this.annotationLayer.on("startSelection",this.handleStartSelect),this.annotationLayer.on("endSelection",this.handleEndSelect),this.annotationLayer.on("select",this.handleSelect),this.annotationLayer.on("updateTarget",this.handleUpdateTarget),this.annotationLayer.on("viewportChange",this.handleViewportChange),this.forwardEvent("clickAnnotation","onClickAnnotation"),this.forwardEvent("mouseEnterAnnotation","onMouseEnterAnnotation"),this.forwardEvent("mouseLeaveAnnotation","onMouseLeaveAnnotation"),document.addEventListener("keyup",this.onKeyUp)}},{key:"componentWillUnmount",value:function(){this.annotationLayer.destroy(),document.removeEventListener("keyup",this.onKeyUp)}},{key:"disableEditor",get:function(){return this.state.editorDisabled},set:function(e){this.setState({editorDisabled:e})}},{key:"disableSelect",get:function(){return this.annotationLayer.disableSelect},set:function(e){this.annotationLayer.disableSelect=e}},{key:"formatters",get:function(){return this.annotationLayer.formatters},set:function(e){this.annotationLayer.formatters=e}},{key:"readOnly",get:function(){return this.state.readOnly},set:function(e){this.annotationLayer.readOnly=e,this.setState({readOnly:e})}},{key:"widgets",get:function(){return this.state.widgets},set:function(e){this.setState({widgets:e})}},{key:"render",value:function(){var t,n=this.state.selectedAnnotation&&!this.state.editorDisabled,r=this.state.readOnly||(null===(t=this.state.selectedAnnotation)||void 0===t?void 0:t.readOnly);return n&&e.default.createElement(_i,{ref:this._editor,detachable:!0,wrapperEl:this.props.wrapperEl,annotation:this.state.selectedAnnotation,modifiedTarget:this.state.modifiedTarget,selectedElement:this.state.selectedDOMElement,readOnly:r,allowEmpty:this.props.config.allowEmpty,widgets:this.state.widgets,env:this.props.env,onAnnotationCreated:this.onCreateOrUpdateAnnotation("onAnnotationCreated"),onAnnotationUpdated:this.onCreateOrUpdateAnnotation("onAnnotationUpdated"),onAnnotationDeleted:this.onDeleteAnnotation,onCancel:this.onCancelAnnotation})}}])}(e.Component),Zf=0;function Xf(e){return(Xf="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 Kf(e,t,n){return(t=qf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qf(e){var t=function(e){if("object"!=Xf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xf(t)?t:t+""}var $f=function(e,t){return t&&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,qf(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function t(r,o){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Kf(this,"handleAnnotationCreated",function(e,t){return i._emitter.emit("createAnnotation",e.underlying,t)}),Kf(this,"handleAnnotationDeleted",function(e){return i._emitter.emit("deleteAnnotation",e.underlying)}),Kf(this,"handleAnnotationSelected",function(e,t){return i._emitter.emit("selectAnnotation",e.underlying,t)}),Kf(this,"handleAnnotationUpdated",function(e,t){return i._emitter.emit("updateAnnotation",e.underlying,t.underlying)}),Kf(this,"handleCancelSelected",function(e){return i._emitter.emit("cancelSelected",e.underlying)}),Kf(this,"handleClickAnnotation",function(e,t){return i._emitter.emit("clickAnnotation",e.underlying,t)}),Kf(this,"handleLoad",function(e){return i._emitter.emit("load",e)}),Kf(this,"handleSelectionCreated",function(e){return i._emitter.emit("createSelection",e.underlying)}),Kf(this,"handleSelectionStarted",function(e){return i._emitter.emit("startSelection",e)}),Kf(this,"handleSelectionEnded",function(e){return i._emitter.emit("endSelection",e)}),Kf(this,"handleSelectionTargetChanged",function(e){return i._emitter.emit("changeSelectionTarget",e)}),Kf(this,"handleMouseEnterAnnotation",function(e,t){return i._emitter.emit("mouseEnterAnnotation",e.underlying,t)}),Kf(this,"handleMouseLeaveAnnotation",function(e,t){return i._emitter.emit("mouseLeaveAnnotation",e.underlying,t)}),Kf(this,"_wrap",function(e){return"Annotation"===(null==e?void 0:e.type)?new aa(e):e}),Kf(this,"addAnnotation",function(e){return i._app.current.addAnnotation(new aa(e))}),Kf(this,"addDrawingTool",function(e){return i._app.current.addDrawingTool(e)}),Kf(this,"cancelSelected",function(){return i._app.current.cancelSelected()}),Kf(this,"clearAnnotations",function(){return i.setAnnotations([])}),Kf(this,"clearAuthInfo",function(){return i._env.user=null}),Kf(this,"destroy",function(){return e.default.unmountComponentAtNode(i.appContainerEl)}),Kf(this,"fitBounds",function(e,t){return i._app.current.fitBounds(i._wrap(e),t)}),Kf(this,"fitBoundsWithConstraints",function(e,t){return i._app.current.fitBoundsWithConstraints(i._wrap(e),t)}),Kf(this,"getAnnotationById",function(e){var t=i._app.current.getAnnotationById(e);return null==t?void 0:t.underlying}),Kf(this,"getAnnotations",function(){return i._app.current.getAnnotations().map(function(e){return e.underlying})}),Kf(this,"getAnnotationsIntersecting",function(e){return i._app.current.getAnnotationsIntersecting(i._wrap(e))}),Kf(this,"getImageSnippetById",function(e){return i._app.current.getImageSnippetById(e)}),Kf(this,"getSelected",function(){var e=i._app.current.getSelected();return null==e?void 0:e.underlying}),Kf(this,"getSelectedImageSnippet",function(){return i._app.current.getSelectedImageSnippet()}),Kf(this,"listDrawingTools",function(){return i._app.current.listDrawingTools()}),Kf(this,"loadAnnotations",function(e){return fetch(e).then(function(e){return e.json()}).then(function(e){return i.setAnnotations(e),e})}),Kf(this,"off",function(e,t){return i._emitter.off(e,t)}),Kf(this,"on",function(e,t){return i._emitter.on(e,t)}),Kf(this,"once",function(e,t){return i._emitter.once(e,t)}),Kf(this,"panTo",function(e,t){return i._app.current.panTo(i._wrap(e),t)}),Kf(this,"removeAnnotation",function(e){return i._app.current.removeAnnotation(i._wrap(e))}),Kf(this,"removeDrawingTool",function(e){return i._app.current.removeDrawingTool(e)}),Kf(this,"saveSelected",function(){return i._app.current.saveSelected()}),Kf(this,"selectAnnotation",function(e){var t=i._app.current.selectAnnotation(i._wrap(e));return null==t?void 0:t.underlying}),Kf(this,"setAnnotations",function(e){var t=(e||[]).map(function(e){return new aa(e)});i._app.current.setAnnotations(t)}),Kf(this,"setAuthInfo",function(e){return i._env.user=e}),Kf(this,"setDrawingEnabled",function(e){return i._app.current.setDrawingEnabled(e)}),Kf(this,"setDrawingTool",function(e,t){i._color=t,i._app.current.setDrawingTool(e,t)}),Kf(this,"setServerTime",function(e){return i._env.setServerTime(e)}),Kf(this,"setVisible",function(e){return i._app.current.setVisible(e)}),Kf(this,"updateSelected",function(e,t){var n=null;"Annotation"===e.type?n=new aa(e):"Selection"===e.type&&(n=new fa(e.target,e.body)),n&&i._app.current.updateSelected(n,t)});var a=o||{};this._app=e.default.createRef(),this._emitter=new(n()),this._env={setServerTime:function(e){var t=Date.now();Zf=e-t},getCurrentTimeAdjusted:function(){return new Date(Date.now()+Zf).toISOString()},toClientTime:function(e){return Date.parse(e)-Zf}},this._element=r.element,"static"===window.getComputedStyle(this._element).getPropertyValue("position")&&(this._element.style.position="relative"),function(e,t){if(e){var n="auto"===e?window.navigator.userLanguage||window.navigator.language:e,r=n.split("-")[0].toLowerCase(),o=[n,r].find(function(e){return Se.includes(e)});o||console.warn("Unsupported locale '".concat(n,"'. Falling back to default en.")),Ee.init(o,t)}else Ee.init(null,t)}(a.locale,a.messages),this.appContainerEl=document.createElement("DIV"),this._element.appendChild(this.appContainerEl),e.default.render(e.default.createElement(Wf,{ref:this._app,viewer:r,wrapperEl:this._element,config:a,env:this._env,onSelectionStarted:this.handleSelectionStarted,onSelectionEnded:this.handleSelectionEnded,onSelectionCreated:this.handleSelectionCreated,onSelectionTargetChanged:this.handleSelectionTargetChanged,onAnnotationCreated:this.handleAnnotationCreated,onAnnotationSelected:this.handleAnnotationSelected,onAnnotationUpdated:this.handleAnnotationUpdated,onAnnotationDeleted:this.handleAnnotationDeleted,onCancelSelected:this.handleCancelSelected,onClickAnnotation:this.handleClickAnnotation,onLoad:this.handleLoad,onMouseEnterAnnotation:this.handleMouseEnterAnnotation,onMouseLeaveAnnotation:this.handleMouseLeaveAnnotation}),this.appContainerEl)},[{key:"disableEditor",get:function(){return this._app.current.disableEditor},set:function(e){this._app.current.disableEditor=e}},{key:"disableSelect",get:function(){return this._app.current.disableSelect},set:function(e){this._app.current.disableSelect=e}},{key:"formatters",get:function(){return this._app.current.formatters||[]},set:function(e){if(e){var t=Array.isArray(e)?e:[e];this._app.current.formatters=t}else this._app.current.formatters=null}},{key:"readOnly",get:function(){return this._app.current.readOnly},set:function(e){this._app.current.readOnly=e}},{key:"widgets",get:function(){return this._app.current.widgets},set:function(e){this._app.current.widgets=e}}]);const ed=function(e,t){return new $f(e,t)}})(),o.default})(),u.exports=l(t);const c=s(u.exports);class p{constructor(e){__publicField(this,"engine"),__publicField(this,"isEnabled",!1),this.engine=e}}class f extends p{constructor(e,t={}){super(e),__publicField(this,"anno"),this.anno=c(this.engine.viewer,{...t}),this.injectStyles(),this.initEvents()}setEnabled(e){this.anno.setDrawingEnabled(e)}setTool(e,t){e?(this.anno.setDrawingTool(e,t),this.setEnabled(!0)):this.setEnabled(!1)}getAnnotations(){return this.anno.getAnnotations()}setAnnotations(e){this.anno.setAnnotations(e)}clear(){this.anno.clearAnnotations()}destroy(){this.anno.destroy()}initEvents(){this.anno.on("createAnnotation",e=>{console.log("新标注已创建:",e)})}injectStyles(){const e="med-anno-v2-7-17-overrides";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.innerHTML="\n .a9s-handle .a9s-handle-inner {\n stroke: #FFEB3B;\n fill: #FF9800;\n }\n .a9s-handle .a9s-handle-outer {\n stroke: #000;\n fill: #fff;\n }",document.head.appendChild(t)}}!function(){var e=window.OpenSeadragon;if(!e&&!(e=t))throw new Error("OpenSeadragon is missing.");if(!e.version||e.version.major<2||2===e.version.major&&e.version.minor<1)throw new Error("Filtering plugin requires OpenSeadragon version >= 2.1");function n(t,n){var i=(n=n||{}).filters;t.filters=i?e.isArray(i)?i:[i]:[];for(var a=0;a<t.filters.length;a++){if(!(l=t.filters[a]).processors)throw new Error("Filter processors must be specified.");l.processors=e.isArray(l.processors)?l.processors:[l.processors]}if(t.filterIncrement++,"sync"===n.loadMode)t.viewer.forceRedraw();else{var s=[];for(a=0;a<t.filters.length;a++){var l;if(!(l=t.filters[a]).items){s=o(t.viewer.world);break}if(e.isArray(l.items))for(var u=0;u<l.items.length;u++)r(l.items[u],s);else r(l.items,s)}for(a=0;a<s.length;a++)s[a].reset()}}function r(e,t){if(t.indexOf(e)>=0)throw new Error("An item can not have filters assigned multiple times.");t.push(e)}function o(e){for(var t=[],n=0;n<e.getItemCount();n++)t.push(e.getItemAt(n));return t}function i(t,n){if(0===t.filters.length)return[];for(var r=null,o=0;o<t.filters.length;o++){var i=t.filters[o];if(i.items){if(i.items===n||e.isArray(i.items)&&i.items.indexOf(n)>=0)return i.processors}else r=i.processors}return r||[]}e.Viewer.prototype.setFilterOptions=function(t){this.filterPluginInstance?n(this.filterPluginInstance,t):((t=t||{}).viewer=this,this.filterPluginInstance=new e.FilterPlugin(t))},e.FilterPlugin=function(e){if(!(e=e||{}).viewer)throw new Error("A viewer must be specified.");var t=this;function r(e,n,r){if(r){for(var o=t.filterIncrement,i=[],a=0;a<n.length-1;a++)(function(r){i[r]=function(){t.filterIncrement===o&&n[r+1](e,i[r+1])}})(a);i[n.length-1]=function(){t.filterIncrement===o&&r()},n[0](e,i[0])}else for(a=0;a<n.length;a++)n[a](e,function(){})}this.viewer=e.viewer,this.viewer.addHandler("tile-loaded",function(e){var n=i(t,e.tiledImage);if(0===n.length)return;var o=e.tile,a=e.image;if(null!=a){var s=window.document.createElement("canvas");s.width=a.width,s.height=a.height;var l=s.getContext("2d");l.drawImage(a,0,0),o._renderedContext=l,r(l,n,e.getCompletionCallback()),o._filterIncrement=t.filterIncrement}}),this.viewer.addHandler("tile-drawing",function(e){var n=e.tile,o=e.rendered;if(o._filterIncrement===t.filterIncrement)return;var a=i(t,e.tiledImage);if(0===a.length)return o._originalImageData&&(o.putImageData(o._originalImageData,0,0),delete o._originalImageData),void(o._filterIncrement=t.filterIncrement);o._originalImageData?o.putImageData(o._originalImageData,0,0):o._originalImageData=o.getImageData(0,0,o.canvas.width,o.canvas.height);if(n._renderedContext){if(n._filterIncrement===t.filterIncrement){var s=n._renderedContext.getImageData(0,0,n._renderedContext.canvas.width,n._renderedContext.canvas.height);return o.putImageData(s,0,0),delete n._renderedContext,delete n._filterIncrement,void(o._filterIncrement=t.filterIncrement)}delete n._renderedContext,delete n._filterIncrement}r(o,a),o._filterIncrement=t.filterIncrement}),this.filterIncrement=0,n(this,e)},e.Filters={THRESHOLDING:function(e){if(e<0||e>255)throw new Error("Threshold must be between 0 and 255.");return function(t,n){for(var r=t.getImageData(0,0,t.canvas.width,t.canvas.height),o=r.data,i=0;i<o.length;i+=4){var a=(o[i]+o[i+1]+o[i+2])/3;o[i]=o[i+1]=o[i+2]=a<e?0:255}t.putImageData(r,0,0),n()}},BRIGHTNESS:function(e){if(e<-255||e>255)throw new Error("Brightness adjustment must be between -255 and 255.");for(var t=[],n=0;n<256;n++)t[n]=n+e;return function(e,n){for(var r=e.getImageData(0,0,e.canvas.width,e.canvas.height),o=r.data,i=0;i<o.length;i+=4)o[i]=t[o[i]],o[i+1]=t[o[i+1]],o[i+2]=t[o[i+2]];e.putImageData(r,0,0),n()}},CONTRAST:function(e){if(e<0)throw new Error("Contrast adjustment must be positive.");for(var t=[],n=0;n<256;n++)t[n]=n*e;return function(e,n){for(var r=e.getImageData(0,0,e.canvas.width,e.canvas.height),o=r.data,i=0;i<o.length;i+=4)o[i]=t[o[i]],o[i+1]=t[o[i+1]],o[i+2]=t[o[i+2]];e.putImageData(r,0,0),n()}},GAMMA:function(e){if(e<0)throw new Error("Gamma adjustment must be positive.");for(var t=[],n=0;n<256;n++)t[n]=255*Math.pow(n/255,e);return function(e,n){for(var r=e.getImageData(0,0,e.canvas.width,e.canvas.height),o=r.data,i=0;i<o.length;i+=4)o[i]=t[o[i]],o[i+1]=t[o[i+1]],o[i+2]=t[o[i+2]];e.putImageData(r,0,0),n()}},GREYSCALE:function(){return function(e,t){for(var n=e.getImageData(0,0,e.canvas.width,e.canvas.height),r=n.data,o=0;o<r.length;o+=4){var i=(r[o]+r[o+1]+r[o+2])/3;r[o]=i,r[o+1]=i,r[o+2]=i}e.putImageData(n,0,0),t()}},INVERT:function(){for(var e=[],t=0;t<256;t++)e[t]=255-t;return function(t,n){for(var r=t.getImageData(0,0,t.canvas.width,t.canvas.height),o=r.data,i=0;i<o.length;i+=4)o[i]=e[o[i]],o[i+1]=e[o[i+1]],o[i+2]=e[o[i+2]];t.putImageData(r,0,0),n()}},MORPHOLOGICAL_OPERATION:function(e,t){if(e%2==0)throw new Error("The kernel size must be an odd number.");var n=Math.floor(e/2);if(!t)throw new Error("A comparator must be defined.");return function(r,o){for(var i,a=r.canvas.width,s=r.canvas.height,l=r.getImageData(0,0,a,s),u=r.getImageData(0,0,a,s).data,c=0;c<s;c++)for(var p=0;p<a;p++){for(var f=u[i=4*(c*a+p)],d=u[i+1],h=u[i+2],m=0;m<e;m++)for(var y=0;y<e;y++){var b=p+y-n,g=c+m-n;b>=0&&b<a&&g>=0&&g<s&&(f=t(u[i=4*(g*a+b)],f),d=t(u[i+1],d),h=t(u[i+2],h))}l.data[i]=f,l.data[i+1]=d,l.data[i+2]=h}r.putImageData(l,0,0),o()}},CONVOLUTION:function(t){if(!e.isArray(t))throw new Error("The kernel must be an array.");var n=Math.sqrt(t.length);if((n+1)%2!=0)throw new Error("The kernel must be a square matrix with oddwidth and height.");var r=(n-1)/2;return function(e,o){for(var i,a=e.canvas.width,s=e.canvas.height,l=e.getImageData(0,0,a,s),u=e.getImageData(0,0,a,s).data,c=0;c<s;c++)for(var p=0;p<a;p++){for(var f=0,d=0,h=0,m=0;m<n;m++)for(var y=0;y<n;y++){var b=p+y-r,g=c+m-r;if(b>=0&&b<a&&g>=0&&g<s){i=4*(g*a+b);var v=t[m*n+y];f+=u[i]*v,d+=u[i+1]*v,h+=u[i+2]*v}}i=4*(c*a+p),l.data[i]=f,l.data[i+1]=d,l.data[i+2]=h}e.putImageData(l,0,0),o()}},COLORMAP:function(e,t){for(var n=e.slice(0),r=255-t,o=0;o<256;o++){var i=0;i=o>t?0|Math.min((o-t)/r*128+128,255):0|Math.max(0,o/(t/128)),n[o]=e[i]}return function(e,t){for(var r=e.getImageData(0,0,e.canvas.width,e.canvas.height),o=r.data,i=0;i<o.length;i+=4){var a=(o[i]+o[i+1]+o[i+2])/3|0,s=n[a];o[i]=s[0],o[i+1]=s[1],o[i+2]=s[2]}e.putImageData(r,0,0),t()}}}}();class d{constructor(e,t){__publicField(this,"viewer"),__publicField(this,"_adjustments"),__publicField(this,"options"),__publicField(this,"lut",new Uint8ClampedArray(256)),__publicField(this,"needUpdate",!0),__publicField(this,"debounceTimer",null),__publicField(this,"combinedProcessor",(e,t)=>{setTimeout(()=>{const{width:n,height:r}=e.canvas;if(n<=0||r<=0)return void t();this.needUpdate&&this.updateLut();const o=e.getImageData(0,0,n,r),i=o.data,a=i.length,s=this.lut,{hue:l=0,saturation:u=1,greyscale:c,sepia:p}=this._adjustments;if(c)for(let e=0;e<a;e+=4){const t=.2126*s[i[e]]+.7152*s[i[e+1]]+.0722*s[i[e+2]];i[e]=i[e+1]=i[e+2]=t}else if(p)for(let e=0;e<a;e+=4){const t=s[i[e]],n=s[i[e+1]],r=s[i[e+2]];i[e]=.393*t+.769*n+.189*r,i[e+1]=.349*t+.686*n+.168*r,i[e+2]=.272*t+.534*n+.131*r}else{const e=0!==l,t=1!==u,n=l*(Math.PI/180),r=Math.cos(n),o=Math.sin(n),c=r+(1-r)/3,p=1/3*(1-r)-Math.sqrt(1/3)*o,f=1/3*(1-r)+Math.sqrt(1/3)*o,d=1/3*(1-r)+Math.sqrt(1/3)*o,h=r+(1-r)/3,m=1/3*(1-r)-Math.sqrt(1/3)*o,y=1/3*(1-r)-Math.sqrt(1/3)*o,b=1/3*(1-r)+Math.sqrt(1/3)*o,g=r+(1-r)/3;for(let l=0;l<a;l+=4){let n=s[i[l]],r=s[i[l+1]],o=s[i[l+2]];if(e){const e=n*p+r*h+o*b,t=n*f+r*m+o*g;n=n*c+r*d+o*y,r=e,o=t}if(t){const e=.2989*n+.587*r+.114*o;n=e+(n-e)*u,r=e+(r-e)*u,o=e+(o-e)*u}i[l]=n,i[l+1]=r,i[l+2]=o}}e.putImageData(o,0,0),t()},0)}),this.viewer=e.viewer||e,this.options={adjustments:{brightness:1,contrast:1,saturation:1,gamma:1,hue:0,invert:!1,sepia:!1,greyscale:!1},debounceMs:60,loadMode:"async",...t},this._adjustments={...this.options.adjustments},this.viewer.addHandler("open",()=>this.apply()),this.viewer.isOpen()&&this.apply()}updateLut(){const e=this._adjustments,t=1/(e.gamma||1),{brightness:n=1,contrast:r=1,invert:o,gamma:i}=e;for(let a=0;a<256;a++){let e=a;o&&(e=255-e),1!==n&&(e*=n),1!==r&&(e=(e-128)*r+128),1!==i&&(e=255*Math.pow(e/255,t)),this.lut[a]=e}this.needUpdate=!1}apply(){this.viewer.setFilterOptions&&(this.needUpdate=!0,this.viewer.setFilterOptions({filters:{processors:this.combinedProcessor},loadMode:this.options.loadMode}),this.viewer.world.draw())}setAdjustments(e){this._adjustments={...this._adjustments,...e},this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.apply(),this.debounceTimer=null},this.options.debounceMs)}get adjustments(){return this._adjustments}reset(){this._adjustments={...this.options.adjustments},this.apply()}destroy(){var e;this.debounceTimer&&clearTimeout(this.debounceTimer),(null==(e=this.viewer)?void 0:e.setFilterOptions)&&this.viewer.setFilterOptions({filters:{processors:[]}}),this.viewer=null}}var h=Object.defineProperty,m=(e,t)=>h(e,"name",{value:t,configurable:!0}),y={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},b=/([astvzqmhlc])([^astvzqmhlc]*)/gi,g=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,v=m(e=>{const t=(e&&e.length>0?e:"M0,0").match(b);if(!t)throw new Error(`No path elements found in string ${e}`);return t.reduce((e,t)=>{let n=t.charAt(0),r=n.toLowerCase(),o=w(t.substring(1));if("m"===r&&o.length>2&&(e.push([n,...o.splice(0,2)]),r="l",n="m"===n?"l":"L"),"a"===r.toLowerCase()&&(5===o.length||6===o.length)){const e=t.substring(1).trim().split(" ");o=[Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3].charAt(0)),Number(e[3].charAt(1)),Number(e[3].substring(2)),Number(e[4])]}for(;o.length>=0;){if(o.length===y[r]){e.push([n,...o.splice(0,y[r])]);break}if(o.length<y[r])throw new Error(`Malformed path data: "${n}" must have ${y[r]} elements and has ${o.length}: ${t}`);e.push([n,...o.splice(0,y[r])])}return e},[])},"default"),w=m(e=>{const t=e.match(g);return t?t.map(Number):[]},"parseValues"),A=(n=class{constructor(e,t,n,r){__publicField(this,"x0"),__publicField(this,"x1"),__publicField(this,"y0"),__publicField(this,"y1"),__publicField(this,"getTotalLength",m(()=>Math.hypot(this.x1-this.x0,this.y1-this.y0),"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>{let t=e/Math.hypot(this.x1-this.x0,this.y1-this.y0);t=Number.isNaN(t)?1:t;const n=(this.x1-this.x0)*t,r=(this.y1-this.y0)*t;return{x:this.x0+n,y:this.y0+r}},"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>{const t=Math.hypot(this.x1-this.x0,this.y1-this.y0);return{x:(this.x1-this.x0)/t,y:(this.y1-this.y0)/t}},"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>{const t=this.getPointAtLength(e),n=this.getTangentAtLength(e);return{x:t.x,y:t.y,tangentX:n.x,tangentY:n.y}},"getPropertiesAtLength")),this.x0=e,this.x1=t,this.y0=n,this.y1=r}},m(n,"LinearPosition"),n),S=(r=class{constructor(e,t,n,r,o,i,a,s,l){__publicField(this,"x0"),__publicField(this,"y0"),__publicField(this,"rx"),__publicField(this,"ry"),__publicField(this,"xAxisRotate"),__publicField(this,"LargeArcFlag"),__publicField(this,"SweepFlag"),__publicField(this,"x1"),__publicField(this,"y1"),__publicField(this,"length"),__publicField(this,"getTotalLength",m(()=>this.length,"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=O({x:this.x0,y:this.y0},this.rx,this.ry,this.xAxisRotate,this.LargeArcFlag,this.SweepFlag,{x:this.x1,y:this.y1},e/this.length);return{x:t.x,y:t.y}},"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=.05,n=this.getPointAtLength(e);let r;r=e<this.length-t?this.getPointAtLength(e+t):this.getPointAtLength(e-t);const o=r.x-n.x,i=r.y-n.y,a=Math.hypot(o,i);return e<this.length-t?{x:-o/a,y:-i/a}:{x:o/a,y:i/a}},"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>{const t=this.getTangentAtLength(e),n=this.getPointAtLength(e);return{x:n.x,y:n.y,tangentX:t.x,tangentY:t.y}},"getPropertiesAtLength")),this.x0=e,this.y0=t,this.rx=n,this.ry=r,this.xAxisRotate=o,this.LargeArcFlag=i,this.SweepFlag=a,this.x1=s,this.y1=l;const u=E(300,function(u){return O({x:e,y:t},n,r,o,i,a,{x:s,y:l},u)});this.length=u.arcLength}},m(r,"Arc"),r),O=m((e,t,n,r,o,i,a,s)=>{t=Math.abs(t),n=Math.abs(n),r=x(r,360);const l=C(r);if(e.x===a.x&&e.y===a.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(0===t||0===n)return{x:0,y:0,ellipticalArcAngle:0};const u=(e.x-a.x)/2,c=(e.y-a.y)/2,p={x:Math.cos(l)*u+Math.sin(l)*c,y:-Math.sin(l)*u+Math.cos(l)*c},f=Math.pow(p.x,2)/Math.pow(t,2)+Math.pow(p.y,2)/Math.pow(n,2);f>1&&(t=Math.sqrt(f)*t,n=Math.sqrt(f)*n);let d=(Math.pow(t,2)*Math.pow(n,2)-Math.pow(t,2)*Math.pow(p.y,2)-Math.pow(n,2)*Math.pow(p.x,2))/(Math.pow(t,2)*Math.pow(p.y,2)+Math.pow(n,2)*Math.pow(p.x,2));d=d<0?0:d;const h=(o!==i?1:-1)*Math.sqrt(d),m=h*(t*p.y/n),y=h*(-n*p.x/t),b={x:Math.cos(l)*m-Math.sin(l)*y+(e.x+a.x)/2,y:Math.sin(l)*m+Math.cos(l)*y+(e.y+a.y)/2},g={x:(p.x-m)/t,y:(p.y-y)/n},v=P({x:1,y:0},g);let w=P(g,{x:(-p.x-m)/t,y:(-p.y-y)/n});!i&&w>0?w-=2*Math.PI:i&&w<0&&(w+=2*Math.PI),w%=2*Math.PI;const A=v+w*s,S=t*Math.cos(A),O=n*Math.sin(A);return{x:Math.cos(l)*S-Math.sin(l)*O+b.x,y:Math.sin(l)*S+Math.cos(l)*O+b.y,ellipticalArcStartAngle:v,ellipticalArcEndAngle:v+w,ellipticalArcAngle:A,ellipticalArcCenter:b,resultantRx:t,resultantRy:n}},"pointOnEllipticalArc"),E=m((e,t)=>{e=e??500;let n=0;const r=[],o=[];let i,a=t(0);for(let s=0;s<e;s++){const l=j(s*(1/e),0,1);i=t(l),n+=M(a,i),o.push([a,i]),r.push({t:l,arcLength:n}),a=i}return i=t(1),o.push([a,i]),n+=M(a,i),r.push({t:1,arcLength:n}),{arcLength:n,arcLengthMap:r,approximationLines:o}},"approximateArcLengthOfCurve"),x=m((e,t)=>(e%t+t)%t,"mod"),C=m(e=>e*(Math.PI/180),"toRadians"),M=m((e,t)=>Math.hypot(t.x-e.x,t.y-e.y),"distance"),j=m((e,t,n)=>Math.min(Math.max(e,t),n),"clamp"),P=m((e,t)=>{const n=e.x*t.x+e.y*t.y,r=Math.hypot(e.x,e.y)*Math.hypot(t.x,t.y);return(e.x*t.y-e.y*t.x<0?-1:1)*Math.acos(n/r)},"angleBetween"),I=[[],[],[-.5773502691896257,.5773502691896258],[0,-.7745966692414833,.7745966692414833],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],k=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],T=[[1],[1,1],[1,2,1],[1,3,3,1]],D=m((e,t,n)=>({x:(1-n)*(1-n)*(1-n)*e[0]+3*(1-n)*(1-n)*n*e[1]+3*(1-n)*n*n*e[2]+n*n*n*e[3],y:(1-n)*(1-n)*(1-n)*t[0]+3*(1-n)*(1-n)*n*t[1]+3*(1-n)*n*n*t[2]+n*n*n*t[3]}),"cubicPoint"),R=m((e,t,n)=>B([3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],[3*(t[1]-t[0]),3*(t[2]-t[1]),3*(t[3]-t[2])],n),"cubicDerivative"),N=m((e,t,n)=>{let r,o;const i=n/2;r=0;for(let a=0;a<20;a++)o=i*I[20][a]+i,r+=k[20][a]*G(e,t,o);return i*r},"getCubicArcLength"),B=m((e,t,n)=>({x:(1-n)*(1-n)*e[0]+2*(1-n)*n*e[1]+n*n*e[2],y:(1-n)*(1-n)*t[0]+2*(1-n)*n*t[1]+n*n*t[2]}),"quadraticPoint"),L=m((e,t,n)=>{const r=e[0]-2*e[1]+e[2],o=t[0]-2*t[1]+t[2],i=2*e[1]-2*e[0],a=2*t[1]-2*t[0],s=4*(r*r+o*o),l=4*(r*i+o*a),u=i*i+a*a;if(0===s)return n*Math.hypot(e[2]-e[0],t[2]-t[0]);const c=l/(2*s),p=n+c,f=u/s-c*c,d=p*p+f>0?Math.sqrt(p*p+f):0,h=c*c+f>0?Math.sqrt(c*c+f):0,m=c+Math.sqrt(c*c+f)!==0&&(p+d)/(c+h)!==0?f*Math.log(Math.abs((p+d)/(c+h))):0;return Math.sqrt(s)/2*(p*d-c*h+m)},"getQuadraticArcLength"),_=m((e,t,n)=>({x:2*(1-n)*(e[1]-e[0])+2*n*(e[2]-e[1]),y:2*(1-n)*(t[1]-t[0])+2*n*(t[2]-t[1])}),"quadraticDerivative");function G(e,t,n){const r=H(1,n,e),o=H(1,n,t),i=r*r+o*o;return Math.sqrt(i)}m(G,"BFunc");var H=m((e,t,n)=>{const r=n.length-1;let o,i;if(0===r)return 0;if(0===e){i=0;for(let e=0;e<=r;e++)i+=T[r][e]*Math.pow(1-t,r-e)*Math.pow(t,e)*n[e];return i}o=new Array(r);for(let a=0;a<r;a++)o[a]=r*(n[a+1]-n[a]);return H(e-1,t,o)},"getDerivative"),F=m((e,t,n)=>{let r=1,o=e/t,i=(e-n(o))/t,a=0;for(;r>.001;){const s=n(o+i),l=Math.abs(e-s)/t;if(l<r)r=l,o+=i;else{const a=n(o-i),s=Math.abs(e-a)/t;s<r?(r=s,o-=i):i/=2}if(a++,a>500)break}return o},"t2length"),U=(o=class{constructor(e,t,n,r,o,i,a,s){__publicField(this,"a"),__publicField(this,"b"),__publicField(this,"c"),__publicField(this,"d"),__publicField(this,"length"),__publicField(this,"getArcLength"),__publicField(this,"getPoint"),__publicField(this,"getDerivative"),__publicField(this,"normalizeTangent",m(e=>{const t=Math.hypot(e.x,e.y);return t>0?{x:e.x/t,y:e.y/t}:{x:0,y:0}},"normalizeTangent")),__publicField(this,"getTotalLength",m(()=>this.length,"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],n=[this.a.y,this.b.y,this.c.y,this.d.y],r=F(e,this.length,e=>this.getArcLength(t,n,e));return this.getPoint(t,n,r)},"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],n=[this.a.y,this.b.y,this.c.y,this.d.y],r=F(e,this.length,e=>this.getArcLength(t,n,e)),o=this.getDerivative(t,n,r);return this.normalizeTangent(o)},"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],n=[this.a.y,this.b.y,this.c.y,this.d.y],r=F(e,this.length,e=>this.getArcLength(t,n,e)),o=this.getDerivative(t,n,r),i=this.normalizeTangent(o),a=this.getPoint(t,n,r);return{x:a.x,y:a.y,tangentX:i.x,tangentY:i.y}},"getPropertiesAtLength")),__publicField(this,"getC",m(()=>this.c,"getC")),__publicField(this,"getD",m(()=>this.d,"getD")),this.a={x:e,y:t},this.b={x:n,y:r},this.c={x:o,y:i},void 0!==a&&void 0!==s?(this.getArcLength=N,this.getPoint=D,this.getDerivative=R,this.d={x:a,y:s}):(this.getArcLength=L,this.getPoint=B,this.getDerivative=_,this.d={x:0,y:0}),this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],1)}},m(o,"Bezier"),o),z=(i=class{constructor(e){__publicField(this,"length",0),__publicField(this,"partial_lengths",[]),__publicField(this,"functions",[]),__publicField(this,"initial_point",null),__publicField(this,"getPartAtLength",m(e=>{e<0?e=0:e>this.length&&(e=this.length);let t=this.partial_lengths.length-1;for(;this.partial_lengths[t]>=e&&t>0;)t--;return t++,{fraction:e-this.partial_lengths[t-1],i:t}},"getPartAtLength")),__publicField(this,"getTotalLength",m(()=>this.length,"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>{const t=this.getPartAtLength(e),n=this.functions[t.i];if(n)return n.getPointAtLength(t.fraction);if(this.initial_point)return this.initial_point;throw new Error("Wrong function at this part.")},"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>{const t=this.getPartAtLength(e),n=this.functions[t.i];if(n)return n.getTangentAtLength(t.fraction);if(this.initial_point)return{x:0,y:0};throw new Error("Wrong function at this part.")},"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>{const t=this.getPartAtLength(e),n=this.functions[t.i];if(n)return n.getPropertiesAtLength(t.fraction);if(this.initial_point)return{x:this.initial_point.x,y:this.initial_point.y,tangentX:0,tangentY:0};throw new Error("Wrong function at this part.")},"getPropertiesAtLength")),__publicField(this,"getParts",m(()=>{const e=[];for(let t=0;t<this.functions.length;t++)if(null!==this.functions[t]){this.functions[t]=this.functions[t];const n={start:this.functions[t].getPointAtLength(0),end:this.functions[t].getPointAtLength(this.partial_lengths[t]-this.partial_lengths[t-1]),length:this.partial_lengths[t]-this.partial_lengths[t-1],getPointAtLength:this.functions[t].getPointAtLength,getTangentAtLength:this.functions[t].getTangentAtLength,getPropertiesAtLength:this.functions[t].getPropertiesAtLength};e.push(n)}return e},"getParts"));const t=Array.isArray(e)?e:v(e);let n,r=[0,0],o=[0,0],i=[0,0];for(let a=0;a<t.length;a++){if("M"===t[a][0])r=[t[a][1],t[a][2]],i=[r[0],r[1]],this.functions.push(null),0===a&&(this.initial_point={x:t[a][1],y:t[a][2]});else if("m"===t[a][0])r=[t[a][1]+r[0],t[a][2]+r[1]],i=[r[0],r[1]],this.functions.push(null);else if("L"===t[a][0])this.length+=Math.hypot(r[0]-t[a][1],r[1]-t[a][2]),this.functions.push(new A(r[0],t[a][1],r[1],t[a][2])),r=[t[a][1],t[a][2]];else if("l"===t[a][0])this.length+=Math.hypot(t[a][1],t[a][2]),this.functions.push(new A(r[0],t[a][1]+r[0],r[1],t[a][2]+r[1])),r=[t[a][1]+r[0],t[a][2]+r[1]];else if("H"===t[a][0])this.length+=Math.abs(r[0]-t[a][1]),this.functions.push(new A(r[0],t[a][1],r[1],r[1])),r[0]=t[a][1];else if("h"===t[a][0])this.length+=Math.abs(t[a][1]),this.functions.push(new A(r[0],r[0]+t[a][1],r[1],r[1])),r[0]=t[a][1]+r[0];else if("V"===t[a][0])this.length+=Math.abs(r[1]-t[a][1]),this.functions.push(new A(r[0],r[0],r[1],t[a][1])),r[1]=t[a][1];else if("v"===t[a][0])this.length+=Math.abs(t[a][1]),this.functions.push(new A(r[0],r[0],r[1],r[1]+t[a][1])),r[1]=t[a][1]+r[1];else if("z"===t[a][0]||"Z"===t[a][0])this.length+=Math.hypot(i[0]-r[0],i[1]-r[1]),this.functions.push(new A(r[0],i[0],r[1],i[1])),r=[i[0],i[1]];else if("C"===t[a][0])n=new U(r[0],r[1],t[a][1],t[a][2],t[a][3],t[a][4],t[a][5],t[a][6]),this.length+=n.getTotalLength(),r=[t[a][5],t[a][6]],this.functions.push(n);else if("c"===t[a][0])n=new U(r[0],r[1],r[0]+t[a][1],r[1]+t[a][2],r[0]+t[a][3],r[1]+t[a][4],r[0]+t[a][5],r[1]+t[a][6]),n.getTotalLength()>0?(this.length+=n.getTotalLength(),this.functions.push(n),r=[t[a][5]+r[0],t[a][6]+r[1]]):this.functions.push(new A(r[0],r[0],r[1],r[1]));else if("S"===t[a][0]){if(a>0&&["C","c","S","s"].indexOf(t[a-1][0])>-1){if(n){const e=n.getC();n=new U(r[0],r[1],2*r[0]-e.x,2*r[1]-e.y,t[a][1],t[a][2],t[a][3],t[a][4])}}else n=new U(r[0],r[1],r[0],r[1],t[a][1],t[a][2],t[a][3],t[a][4]);n&&(this.length+=n.getTotalLength(),r=[t[a][3],t[a][4]],this.functions.push(n))}else if("s"===t[a][0]){if(a>0&&["C","c","S","s"].indexOf(t[a-1][0])>-1){if(n){const e=n.getC(),o=n.getD();n=new U(r[0],r[1],r[0]+o.x-e.x,r[1]+o.y-e.y,r[0]+t[a][1],r[1]+t[a][2],r[0]+t[a][3],r[1]+t[a][4])}}else n=new U(r[0],r[1],r[0],r[1],r[0]+t[a][1],r[1]+t[a][2],r[0]+t[a][3],r[1]+t[a][4]);n&&(this.length+=n.getTotalLength(),r=[t[a][3]+r[0],t[a][4]+r[1]],this.functions.push(n))}else if("Q"===t[a][0]){if(r[0]===t[a][1]&&r[1]===t[a][2]){const e=new A(t[a][1],t[a][3],t[a][2],t[a][4]);this.length+=e.getTotalLength(),this.functions.push(e)}else n=new U(r[0],r[1],t[a][1],t[a][2],t[a][3],t[a][4],void 0,void 0),this.length+=n.getTotalLength(),this.functions.push(n);r=[t[a][3],t[a][4]],o=[t[a][1],t[a][2]]}else if("q"===t[a][0]){if(0!==t[a][1]||0!==t[a][2])n=new U(r[0],r[1],r[0]+t[a][1],r[1]+t[a][2],r[0]+t[a][3],r[1]+t[a][4],void 0,void 0),this.length+=n.getTotalLength(),this.functions.push(n);else{const e=new A(r[0]+t[a][1],r[0]+t[a][3],r[1]+t[a][2],r[1]+t[a][4]);this.length+=e.getTotalLength(),this.functions.push(e)}o=[r[0]+t[a][1],r[1]+t[a][2]],r=[t[a][3]+r[0],t[a][4]+r[1]]}else if("T"===t[a][0]){if(a>0&&["Q","q","T","t"].indexOf(t[a-1][0])>-1)n=new U(r[0],r[1],2*r[0]-o[0],2*r[1]-o[1],t[a][1],t[a][2],void 0,void 0),this.functions.push(n),this.length+=n.getTotalLength();else{const e=new A(r[0],t[a][1],r[1],t[a][2]);this.functions.push(e),this.length+=e.getTotalLength()}o=[2*r[0]-o[0],2*r[1]-o[1]],r=[t[a][1],t[a][2]]}else if("t"===t[a][0]){if(a>0&&["Q","q","T","t"].indexOf(t[a-1][0])>-1)n=new U(r[0],r[1],2*r[0]-o[0],2*r[1]-o[1],r[0]+t[a][1],r[1]+t[a][2],void 0,void 0),this.length+=n.getTotalLength(),this.functions.push(n);else{const e=new A(r[0],r[0]+t[a][1],r[1],r[1]+t[a][2]);this.length+=e.getTotalLength(),this.functions.push(e)}o=[2*r[0]-o[0],2*r[1]-o[1]],r=[t[a][1]+r[0],t[a][2]+r[1]]}else if("A"===t[a][0]){const e=new S(r[0],r[1],t[a][1],t[a][2],t[a][3],1===t[a][4],1===t[a][5],t[a][6],t[a][7]);this.length+=e.getTotalLength(),r=[t[a][6],t[a][7]],this.functions.push(e)}else if("a"===t[a][0]){const e=new S(r[0],r[1],t[a][1],t[a][2],t[a][3],1===t[a][4],1===t[a][5],r[0]+t[a][6],r[1]+t[a][7]);this.length+=e.getTotalLength(),r=[r[0]+t[a][6],r[1]+t[a][7]],this.functions.push(e)}this.partial_lengths.push(this.length)}}},m(i,"SVGPathProperties"),i),Y=(a=class{constructor(e){if(__publicField(this,"inst"),__publicField(this,"getTotalLength",m(()=>this.inst.getTotalLength(),"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>this.inst.getPointAtLength(e),"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>this.inst.getTangentAtLength(e),"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>this.inst.getPropertiesAtLength(e),"getPropertiesAtLength")),__publicField(this,"getParts",m(()=>this.inst.getParts(),"getParts")),this.inst=new z(e),!(this instanceof Y))return new Y(e)}},m(a,"_svgPathProperties"),a);const V={"zh-CN":{toolbar:{annoColor:"标注颜色",annoShape:"标注形状",rect:"矩形",polygon:"多边形",circle:"圆形",ellipse:"椭圆",line:"线段",freehand:"手绘",reset:"重置",annoSettings:"标注",colorAdjust:"颜色调整",screenshot:"截图",brightness:"亮度",contrast:"对比度",saturation:"饱和度",gamma:"伽马",hue:"色相",invert:"反色",sepia:"怀旧",greyscale:"灰度"},selection:{toggle:"切换选择",confirm:"确认选择",cancel:"取消选择"},annotation:{length:"长度",width:"宽度",height:"高度",area:"面积",perimeter:"周长",remark:"备注",radius:"半径",majorAxis:"长轴",minorAxis:"短轴"}},"en-US":{toolbar:{annoColor:"Annotation Color",annoShape:"Annotation Shape",rect:"Rectangle",polygon:"Polygon",circle:"Circle",ellipse:"Ellipse",line:"Line",freehand:"Freehand",reset:"Reset",annoSettings:"Annotation",colorAdjust:"Color Adjust",screenshot:"Screenshot",brightness:"Brightness",contrast:"Contrast",saturation:"Saturation",gamma:"Gamma",hue:"Hue",invert:"Invert",sepia:"Sepia",greyscale:"Greyscale"},selection:{toggle:"Toggle Selection",confirm:"Confirm Selection",cancel:"Cancel Selection"},annotation:{length:"Length",width:"Width",height:"Height",area:"Area",perimeter:"Perimeter",remark:"Remark",radius:"Radius",majorAxis:"Major Axis",minorAxis:"Minor Axis"}}};let Q="zh-CN";function J(e){const t=e.split(".");let n=V[Q];for(const r of t)if(n=null==n?void 0:n[r],!n)return e;return"string"==typeof n?n:e}function W(e,t){return e.toFixed(2)+"μ"+t}function Z(e,t){return 1e6*(e/t)}var X=(e=>(e.TOP_LEFT="TOP_LEFT",e.TOP_CENTER="TOP_CENTER",e.TOP_RIGHT="TOP_RIGHT",e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_CENTER="BOTTOM_CENTER",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.MIDDLE_LEFT="MIDDLE_LEFT",e.MIDDLE_RIGHT="MIDDLE_RIGHT",e))(X||{}),K=(e=>(e.LD="LD",e.OSD="OSD",e))(K||{});class q{constructor(e,t={}){__publicField(this,"viewer"),__publicField(this,"options"),__publicField(this,"magnificationElement",null),__publicField(this,"magnificationDisplay",null),__publicField(this,"updateMagnificationDisplay",()=>{var e,t;if("LD"===this.options.type){const t=this.viewer.world.getItemAt(0);if(!this.magnificationDisplay||!t)return;const n=this.viewer.source,r=n.width;n.height;const o=20*.0011*(this.options.pixelsPerMeter||(null==(e=this.viewer.scalebarInstance)?void 0:e.pixelsPerMeter)||96)/r*this.viewer.viewport.getZoom();this.magnificationDisplay.innerHTML=`<span>${o.toFixed(2)}X</span>`}else{const e=this.viewer.world.getItemAt(0);if(!this.magnificationDisplay||!e)return;const n=this.viewer.viewport.viewportToImageZoom(this.viewer.viewport.getZoom())*((null==(t=this.viewer.source)?void 0:t.max_magnification)||40);this.magnificationDisplay.innerHTML=`<span>${n.toFixed(2)}X</span>`}}),this.viewer=e,this.options=t,this.init()}init(){this.injectStyles(),this.magnificationElement=document.createElement("div"),this.magnificationElement.className=`med-magnification med-magnification--${this.options.position||"MIDDLE_LEFT"}`,this.magnificationDisplay=document.createElement("div"),this.magnificationDisplay.className="med-magnification-display",this.magnificationDisplay.innerHTML="<span>-</span>",this.magnificationElement.appendChild(this.magnificationDisplay);const e=document.createElement("div");e.className="med-magnification-buttons",this.magnificationElement.appendChild(e);[40,20,10,4].forEach(t=>{const n=this.createButton(`${t}X`,()=>this.setMagnification(t));e.appendChild(n)});const t=this.createButton("Fit",()=>this.fitToScreen());e.appendChild(t),this.viewer.element.appendChild(this.magnificationElement),this.viewer.addHandler("animation",this.updateMagnificationDisplay),this.viewer.addHandler("animation-finish",this.updateMagnificationDisplay),this.viewer.addHandler("open",this.updateMagnificationDisplay),this.updateMagnificationDisplay()}createButton(e,t){const n=document.createElement("button");return n.className="med-magnification-btn",n.textContent=e,n.onclick=t,n}getMagnification(){var e,t;if(!this.viewer.world.getItemAt(0))return 0;if("LD"===this.options.type){const t=this.viewer.source,n=null==t?void 0:t.width;return 20*.0011*(this.options.pixelsPerMeter||(null==(e=this.viewer.scalebarInstance)?void 0:e.pixelsPerMeter)||96)/n*this.viewer.viewport.getZoom()}return this.viewer.viewport.viewportToImageZoom(this.viewer.viewport.getZoom())*((null==(t=this.viewer.source)?void 0:t.max_magnification)||40)}async setMagnification(e){var t,n;if("LD"===this.options.type){const n=this.viewer.world.getItemAt(0);if(!this.magnificationDisplay||!n)return;const r=this.viewer.source,o=r.width;r.height;const i=this.options.pixelsPerMeter||(null==(t=this.viewer.scalebarInstance)?void 0:t.pixelsPerMeter)||96;this.viewer.viewport.getZoom();const a=e/(20*.0011*i/o);await this.viewer.viewport.zoomTo(a,this.viewer.viewport.getCenter(),!1),this.updateMagnificationDisplay()}else{if(!this.viewer.world.getItemAt(0))return;const t=e/((null==(n=this.viewer.source)?void 0:n.max_magnification)||40),r=this.viewer.viewport.imageToViewportZoom(t);await this.viewer.viewport.zoomTo(r,this.viewer.viewport.getCenter(),!1),this.updateMagnificationDisplay()}}fitToScreen(){this.viewer.viewport.fitVertically(!0),this.viewer.viewport.fitHorizontally(!0),this.viewer.viewport.goHome()}refresh(){this.updateMagnificationDisplay()}destroy(){this.magnificationElement&&(this.magnificationElement.remove(),this.magnificationElement=null),this.magnificationDisplay&&(this.magnificationDisplay=null),this.viewer.removeHandler("animation",this.updateMagnificationDisplay),this.viewer.removeHandler("animation-finish",this.updateMagnificationDisplay),this.viewer.removeHandler("open",this.updateMagnificationDisplay),this.viewer=null}injectStyles(){const e="med-magnification-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent=`\n .med-magnification {\n position: absolute;\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 10px;\n z-index: 100;\n background: rgba(24, 28, 36, 0.85);\n border-radius: 12px;\n backdrop-filter: blur(10px);\n border: 1px solid rgba(255,255,255,0.1);\n box-shadow: 0 8px 32px rgba(0,0,0,0.3);\n }\n .med-magnification--TOP_LEFT { top: calc(18px + ${this.options.offsetY||0}px); left: calc(18px + ${this.options.offsetX||0}px); }\n .med-magnification--TOP_CENTER { top: calc(18px + ${this.options.offsetY||0}px); left: 50%; transform: translateX(-50%) translateX(${this.options.offsetX||0}px); }\n .med-magnification--TOP_RIGHT { top: calc(18px + ${this.options.offsetY||0}px); right: calc(18px - ${this.options.offsetX||0}px); }\n .med-magnification--BOTTOM_LEFT { bottom: calc(18px - ${this.options.offsetY||0}px); left: calc(18px + ${this.options.offsetX||0}px); }\n .med-magnification--BOTTOM_CENTER { bottom: calc(18px - ${this.options.offsetY||0}px); left: 50%; transform: translateX(-50%) translateX(${this.options.offsetX||0}px); }\n .med-magnification--BOTTOM_RIGHT { bottom: calc(18px - ${this.options.offsetY||0}px); right: calc(18px - ${this.options.offsetX||0}px); }\n .med-magnification--MIDDLE_LEFT { top: 50%; left: calc(18px + ${this.options.offsetX||0}px); transform: translateY(-50%) translateY(${this.options.offsetY||0}px); }\n .med-magnification--MIDDLE_RIGHT { top: 50%; right: calc(18px - ${this.options.offsetX||0}px); transform: translateY(-50%) translateY(${this.options.offsetY||0}px); }\n\n .med-magnification-display {\n background: rgba(255,255,255,0.08);\n color: #f2f5f8;\n font-size: 14px;\n border: 1px dashed rgba(255,255,255,0.3);\n padding: 8px 0px;\n border-radius: 8px;\n text-align: center;\n font-weight: bold;\n min-width: 60px;\n }\n .med-magnification-buttons {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n .med-magnification-btn {\n background: rgba(49, 208, 170, 0.15);\n color: #f2f5f8;\n border: none;\n padding: 8px 16px;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n font-weight: bold;\n }\n .med-magnification-btn:hover {\n background: rgba(49, 208, 170, 0.3);\n }\n .med-magnification-btn:active {\n transform: scale(0.95);\n }\n `,document.head.appendChild(t)}}!function(e){if(!e.version||e.version.major<2)throw new Error("This version of OpenSeadragonScalebar requires OpenSeadragon version 2.0.0+");function t(e,t,n,o,a){a=void 0===a?" ":a;var s=r(e,t),l=i(s/e*t,3);return{size:s*t,text:l+a+n+(o&&l>1?"s":"")}}function n(e,t,n){var o=r(e,t),a=o*t,s=function(e,t){if(e<1e-6)return 1e9*e+" n"+t;if(e<.001)return 1e6*e+" μ"+t;if(e<1)return 1e3*e+" m"+t;if(e>=1e3)return e/1e3+" k"+t;return e+" "+t}(i(o/e*t,3),n);return{size:a,text:s}}function r(e,t){var n=o(e),r=o(t),i=o(n/r);return i>=5&&(i/=5),i>=4&&(i/=4),i>=2&&(i/=2),i}function o(e){return e*Math.pow(10,Math.ceil(-a(e)))}function i(e,t){var n=t- -Math.ceil(-a(e)),r=e*Math.pow(10,n);return n<0?Math.round(r)*Math.pow(10,-n):Math.round(r)/Math.pow(10,n)}function a(e){return Math.log(e)/Math.log(10)}function s(e){return void 0!==e}e.Viewer.prototype.scalebar=function(t){this.scalebarInstance?this.scalebarInstance.refresh(t):((t=t||{}).viewer=this,this.scalebarInstance=new e.Scalebar(t))},e.ScalebarType={NONE:0,MICROSCOPY:1,MAP:2},e.ScalebarLocation={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4},e.Scalebar=function(t){if(!(t=t||{}).viewer)throw new Error("A viewer must be specified.");this.viewer=t.viewer,this.divElt=document.createElement("div"),this.viewer.container.appendChild(this.divElt),this.divElt.style.position="relative",this.divElt.style.margin="0",this.divElt.style.pointerEvents="none",this.setMinWidth(t.minWidth||"150px"),this.setDrawScalebarFunction(t.type||e.ScalebarType.MICROSCOPY),this.color=t.color||"black",this.fontColor=t.fontColor||"black",this.backgroundColor=t.backgroundColor||"none",this.fontSize=t.fontSize||"",this.fontFamily=t.fontFamily||"",this.barThickness=t.barThickness||2,this.pixelsPerMeter=t.pixelsPerMeter||null,this.referenceItemIdx=t.referenceItemIdx||0,this.location=t.location||e.ScalebarLocation.BOTTOM_LEFT,this.xOffset=t.xOffset||5,this.yOffset=t.yOffset||5,this.stayInsideImage=!s(t.stayInsideImage)||t.stayInsideImage,this.sizeAndTextRenderer=t.sizeAndTextRenderer||e.ScalebarSizeAndTextRenderer.METRIC_LENGTH;var n=this;this.viewer.addHandler("open",function(){n.refresh()}),this.viewer.addHandler("animation",function(){n.refresh()}),this.viewer.addHandler("resize",function(){n.refresh()})},e.Scalebar.prototype={updateOptions:function(e){e&&(s(e.type)&&this.setDrawScalebarFunction(e.type),s(e.minWidth)&&this.setMinWidth(e.minWidth),s(e.color)&&(this.color=e.color),s(e.fontColor)&&(this.fontColor=e.fontColor),s(e.backgroundColor)&&(this.backgroundColor=e.backgroundColor),s(e.fontSize)&&(this.fontSize=e.fontSize),s(e.fontFamily)&&(this.fontFamily=e.fontFamily),s(e.barThickness)&&(this.barThickness=e.barThickness),s(e.pixelsPerMeter)&&(this.pixelsPerMeter=e.pixelsPerMeter),s(e.referenceItemIdx)&&(this.referenceItemIdx=e.referenceItemIdx),s(e.location)&&(this.location=e.location),s(e.xOffset)&&(this.xOffset=e.xOffset),s(e.yOffset)&&(this.yOffset=e.yOffset),s(e.stayInsideImage)&&(this.stayInsideImage=e.stayInsideImage),s(e.sizeAndTextRenderer)&&(this.sizeAndTextRenderer=e.sizeAndTextRenderer))},setDrawScalebarFunction:function(t){t?t===e.ScalebarType.MAP?this.drawScalebar=this.drawMapScalebar:this.drawScalebar=this.drawMicroscopyScalebar:this.drawScalebar=null},setMinWidth:function(e){this.divElt.style.width=e,this.divElt.style.display="",this.minWidth=this.divElt.offsetWidth},refresh:function(e){if(this.updateOptions(e),this.viewer.isOpen()&&this.drawScalebar&&this.pixelsPerMeter&&this.location){this.divElt.style.display="";var t=this.viewer.viewport,n=function(e,t){var n=e._scaleSpring.current.value*e.viewport._containerInnerSize.x/e.source.dimensions.x;return n*t}(this.viewer.world.getItemAt(this.referenceItemIdx),t.getZoom(!0)),r=n*this.pixelsPerMeter,o=this.sizeAndTextRenderer(r,this.minWidth);this.drawScalebar(o.size,o.text);var i=this.getScalebarLocation();this.divElt.style.left=i.x+"px",this.divElt.style.top=i.y+"px"}else this.divElt.style.display="none"},drawMicroscopyScalebar:function(e,t){this.divElt.style.fontSize=this.fontSize,this.divElt.style.fontFamily=this.fontFamily,this.divElt.style.textAlign="center",this.divElt.style.color=this.fontColor,this.divElt.style.border="none",this.divElt.style.borderBottom=this.barThickness+"px solid "+this.color,this.divElt.style.backgroundColor=this.backgroundColor,this.divElt.innerHTML=t,this.divElt.style.width=e+"px"},drawMapScalebar:function(e,t){this.divElt.style.fontSize=this.fontSize,this.divElt.style.fontFamily=this.fontFamily,this.divElt.style.textAlign="center",this.divElt.style.color=this.fontColor,this.divElt.style.border=this.barThickness+"px solid "+this.color,this.divElt.style.borderTop="none",this.divElt.style.backgroundColor=this.backgroundColor,this.divElt.innerHTML=t,this.divElt.style.width=e+"px"},getScalebarLocation:function(){if(this.location===e.ScalebarLocation.TOP_LEFT){var t=0,n=0;if(this.stayInsideImage){var r=this.viewer.viewport.pixelFromPoint(new e.Point(0,0),!0);this.viewer.wrapHorizontal||(t=Math.max(r.x,0)),this.viewer.wrapVertical||(n=Math.max(r.y,0))}return new e.Point(t+this.xOffset,n+this.yOffset)}if(this.location===e.ScalebarLocation.TOP_RIGHT){var o=this.divElt.offsetWidth;t=(a=this.viewer.container).offsetWidth-o,n=0;if(this.stayInsideImage){r=this.viewer.viewport.pixelFromPoint(new e.Point(1,0),!0);this.viewer.wrapHorizontal||(t=Math.min(t,r.x-o)),this.viewer.wrapVertical||(n=Math.max(n,r.y))}return new e.Point(t-this.xOffset,n+this.yOffset)}if(this.location===e.ScalebarLocation.BOTTOM_RIGHT){o=this.divElt.offsetWidth;var i=this.divElt.offsetHeight;t=(a=this.viewer.container).offsetWidth-o,n=a.offsetHeight-i;if(this.stayInsideImage){r=this.viewer.viewport.pixelFromPoint(new e.Point(1,1/this.viewer.source.aspectRatio),!0);this.viewer.wrapHorizontal||(t=Math.min(t,r.x-o)),this.viewer.wrapVertical||(n=Math.min(n,r.y-i))}return new e.Point(t-this.xOffset,n-this.yOffset)}if(this.location===e.ScalebarLocation.BOTTOM_LEFT){var a;i=this.divElt.offsetHeight,t=0,n=(a=this.viewer.container).offsetHeight-i;if(this.stayInsideImage){r=this.viewer.viewport.pixelFromPoint(new e.Point(0,1/this.viewer.source.aspectRatio),!0);this.viewer.wrapHorizontal||(t=Math.max(t,r.x)),this.viewer.wrapVertical||(n=Math.min(n,r.y-i))}return new e.Point(t+this.xOffset,n-this.yOffset)}},getAsCanvas:function(){var e=document.createElement("canvas");e.width=this.divElt.offsetWidth,e.height=this.divElt.offsetHeight;var t=e.getContext("2d");t.fillStyle=this.backgroundColor,t.fillRect(0,0,e.width,e.height),t.fillStyle=this.color,t.fillRect(0,e.height-this.barThickness,e.width,e.height),this.drawScalebar===this.drawMapScalebar&&(t.fillRect(0,0,this.barThickness,e.height),t.fillRect(e.width-this.barThickness,0,this.barThickness,e.height)),t.font=window.getComputedStyle(this.divElt).font,t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor;var n=e.width/2,r=e.height/2;return t.fillText(this.divElt.textContent,n,r),e},getImageWithScalebarAsCanvas:function(){var e=this.viewer.drawer.canvas,t=document.createElement("canvas");t.width=e.width,t.height=e.height;var n=t.getContext("2d");n.drawImage(e,0,0);var r=this.getAsCanvas(),o=this.getScalebarLocation();return n.drawImage(r,o.x,o.y),t}},e.ScalebarSizeAndTextRenderer={METRIC_LENGTH:function(e,t){return n(e,t,"m")},IMPERIAL_LENGTH:function(e,n){var r=2*n,o=.0254*e;if(r<12*o)return r<o?t(o/1e3,n,"th"):t(o,n,"in");var i=12*o;return r<2e3*i?t(i,n,"ft"):t(5280*i,n,"mi")},ASTRONOMY:function(e,n){var r=2*n;if(r<60*e)return t(e,n,'"',!1,"");var o=60*e;return r<60*o?t(o,n,"'",!1,""):t(60*o,n,"°",!1,"")},STANDARD_TIME:function(e,r){var o=2*r;if(o<60*e)return n(e,r,"s");var i=60*e;if(o<60*i)return t(i,r,"minute",!0);var a=60*i;if(o<24*a)return t(a,r,"hour",!0);var s=24*a;return o<365.25*s?t(s,r,"day",!0):t(365.25*s,r,"year",!0)},METRIC_GENERIC:n}}(t);var $=(e=>(e[e.NONE=0]="NONE",e[e.MICROSCOPY=1]="MICROSCOPY",e[e.MAP=2]="MAP",e))($||{}),ee=(e=>(e[e.NONE=0]="NONE",e[e.TOP_LEFT=1]="TOP_LEFT",e[e.TOP_RIGHT=2]="TOP_RIGHT",e[e.BOTTOM_RIGHT=3]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=4]="BOTTOM_LEFT",e))(ee||{});class te{constructor(e,t={}){__publicField(this,"viewer"),__publicField(this,"options"),__publicField(this,"scalebar"),this.viewer=e,"string"==typeof t.type&&(t.type=$[t.type]),"string"==typeof t.location&&(t.location=ee[t.location]),this.options={type:2,pixelsPerMeter:1,xOffset:10,yOffset:10,stayInsideImage:!0,color:"rgb(0, 0, 0)",fontColor:"rgb(0, 0, 0)",fontSize:"14px",fontFamily:"sans-serif",barThickness:1.5,minWidth:"75px",location:0,referenceItemIdx:0,...t},this.init()}init(){this.viewer.scalebar(this.options),this.scalebar=this.viewer.scalebarInstance}destroy(){this.scalebar&&"function"==typeof this.scalebar.destroy&&this.scalebar.destroy(),this.scalebar=null}}!function(e){e.SelectionOverlay=function(t,n){e.Overlay.apply(this,arguments),e.isPlainObject(t)?this.rotation=t.location.rotation||0:this.rotation=n.rotation||0},e.SelectionOverlay.prototype=e.extend(Object.create(e.Overlay.prototype),{drawHTML:function(){e.Overlay.prototype.drawHTML.apply(this,arguments),this.style.transform=this.style.transform.replace(/ ?rotate\(.+rad\)/,"")+" rotate("+this.rotation+"rad)"},update:function(t){e.Overlay.prototype.update.apply(this,arguments),this.rotation=t.rotation||0}})}(t),function(e){e.SelectionRect=function(t,n,r,o,i){e.Rect.apply(this,[t,n,r,o]),this.rotation=i||0},e.SelectionRect.fromRect=function(t){return new e.SelectionRect(t.x,t.y,t.width,t.height)},e.SelectionRect.prototype=e.extend(Object.create(e.Rect.prototype),{clone:function(){return new e.SelectionRect(this.x,this.y,this.width,this.height,this.rotation)},equals:function(t){return e.Rect.prototype.equals.apply(this,[t])&&this.rotation===t.rotation},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.rotation)/100+"]"},swapWidthHeight:function(){let e=this.clone();return e.width=this.height,e.height=this.width,e.x+=(this.width-this.height)/2,e.y+=(this.height-this.width)/2,e},getDegreeRotation:function(){return this.rotation*(180/Math.PI)},getAngleFromCenter:function(e){let t=e.minus(this.getCenter());return Math.atan2(t.x,t.y)},round:function(){return new e.SelectionRect(Math.round(this.x),Math.round(this.y),Math.round(this.width),Math.round(this.height),this.rotation)},normalize:function(){let e=this.clone();return e.width<0&&(e.x+=e.width,e.width*=-1),e.height<0&&(e.y+=e.height,e.height*=-1),e.rotation%=Math.PI,e},fitsIn:function(e){let t=this.normalize(),n=[t.getTopLeft(),t.getTopRight(),t.getBottomRight(),t.getBottomLeft()],r=t.getCenter(),o=t.getDegreeRotation(),i=e.getBottomRight();for(let a=0;a<4;a++)if(n[a]=n[a].rotate(o,r),n[a].x<e.x||n[a].x>i.x||n[a].y<e.y||n[a].y>i.y)return!1;return!0},reduceRotation:function(){let e;return this.rotation<Math.PI/-4?(e=this.swapWidthHeight(),e.rotation+=Math.PI/2):this.rotation>Math.PI/4?(e=this.swapWidthHeight(),e.rotation-=Math.PI/2):e=this.clone(),e}})}(t),function(e){if(!e.version||e.version.major<3)throw new Error("This version of OpenSeadragonSelection requires OpenSeadragon version 2.0.0+");function t(e){if(!0===e.cropMinimumSize){let t=e.viewer.viewport.imageToViewportCoordinates(e.cropMinimumWidth,e.cropMinimumHeight);e.rect.width=e.rect.width<t.x?t.x:e.rect.width,e.rect.height=e.rect.height<t.y?t.y:e.rect.height}}function n(n){if(n.preventDefaultAction=this.isSelecting&&(null===this.rect||!this.rectDone||this.allowRotation),!this.isSelecting)return;let r=this.viewer.viewport.deltaPointsFromPixels(n.delta,!0),o=this.viewer.viewport.pointFromPixel(n.position,!0),i=new e.Point(o.x-r.x,o.y-r.y);if(this.rect){let t;if((this.restrictToImage||this.cropMinimumSize)&&(t=this.rect.clone()),this.rectDone){if(this.allowRotation){let e=this.rect.getAngleFromCenter(i),t=this.rect.getAngleFromCenter(o);this.rect.rotation=(this.rect.rotation+e-t)%Math.PI}}else this.startRotated?this.rect=c(this.rotatedStartPoint,o,this.startRotatedHeight):(this.rect.width+=r.x,this.rect.height+=r.y);let n=this.viewer.world.getHomeBounds();this.restrictToImage&&!this.rect.fitsIn(new e.Rect(0,0,n.width,n.height))&&(this.rect=t)}else{if(this.restrictToImage){if(!function(e,t){let n=e.viewer.world.getHomeBounds();return t.x>=0&&t.x<=n.width&&t.y>=0&&t.y<=n.height}(this,i))return;!function(e,t){let n;for(let r in{x:0,y:0})n=t[r]-e[r],n<1&&n>0&&(t[r]>1?(e[r]-=t[r]-1,t[r]=1):t[r]<0&&(e[r]-=t[r],t[r]=0))}(r,o)}this.startRotated?(this.rotatedStartPoint=i,this.rect=c(i,o,this.startRotatedHeight)):this.rect=new e.SelectionRect(i.x,i.y,r.x,r.y),this.rectDone=!1}t(this),this.draw()}function r(){null!==this.rect&&(this.rect.width<0&&(this.rect.x+=this.rect.width,this.rect.width=Math.abs(this.rect.width)),this.rect.height<0&&(this.rect.y+=this.rect.height,this.rect.height=Math.abs(this.rect.height)),this.viewer.setMouseNavEnabled(!0),this.rectDone=!0)}function o(){this.viewer.canvas.focus()}function i(n){e.addClass(this.element,"dragging");let r=this.viewer.viewport.deltaPointsFromPixels(n.delta,!0);this.rect.x+=r.x,this.rect.y+=r.y;let o=this.viewer.world.getHomeBounds();this.restrictToImage&&!this.rect.fitsIn(new e.Rect(0,0,o.width,o.height))&&(this.rect.x-=r.x,this.rect.y-=r.y),t(this),this.draw()}function a(){e.removeClass(this.element,"dragging")}function s(n,r){let o,i=this.rect.getDegreeRotation(),a=this.restrictToImage||this.cropMinimumSize?this.rect.clone():null,s=r.delta;switch(0!==i&&(s=s.rotate(-1*i,new e.Point(0,0)),o=this.rect.getCenter()),s=this.viewer.viewport.deltaPointsFromPixels(s,!0),n){case 0:this.rect.y+=s.y,this.rect.height-=s.y;break;case 1:this.rect.width+=s.x;break;case 2:this.rect.height+=s.y;break;case 3:this.rect.x+=s.x,this.rect.width-=s.x;break;case.5:this.rect.y+=s.y,this.rect.height-=s.y,this.rect.x+=s.x,this.rect.width-=s.x;break;case 1.5:this.rect.y+=s.y,this.rect.height-=s.y,this.rect.width+=s.x;break;case 2.5:this.rect.width+=s.x,this.rect.height+=s.y;break;case 3.5:this.rect.height+=s.y,this.rect.x+=s.x,this.rect.width-=s.x}if(0!==i){let e=this.rect.getCenter();s=e.rotate(i,o).minus(e),this.rect.x+=s.x,this.rect.y+=s.y}let l=this.viewer.world.getHomeBounds();this.restrictToImage&&!this.rect.fitsIn(new e.Rect(0,0,l.width,l.height))&&(this.rect=a),t(this),this.draw()}function l(){this.rect.width<0&&(this.rect.x+=this.rect.width,this.rect.width=Math.abs(this.rect.width)),this.rect.height<0&&(this.rect.y+=this.rect.height,this.rect.height=Math.abs(this.rect.height))}function u(e){let t=e.keyCode?e.keyCode:e.charCode;13===t?this.confirm():String.fromCharCode(t)===this.keyboardShortcut&&this.toggleState()}function c(t,n,r){if(t.x>n.x){let e=t;t=n,n=e}let o=n.minus(t),i=t.distanceTo(n),a=-1*Math.atan2(o.x,o.y)+Math.PI/2,s=new e.Point(o.x/2+t.x,o.y/2+t.y),l=new e.SelectionRect(s.x-i/2,s.y-r/2,i,r,a),u=new e.Point(0,r);return u=u.rotate(l.getDegreeRotation(),new e.Point(0,0)),l.x+=u.x/2,l.y+=u.y/2,l}e.Viewer.prototype.selection=function(t){return(!this.selectionInstance||t)&&((t=t||{}).viewer=this,this.selectionInstance=new e.Selection(t)),this.selectionInstance},e.Selection=function(t){e.extend(!0,this,{viewer:null,isSelecting:!1,buttonActiveImg:!1,rectDone:!0,element:null,toggleButton:null,showSelectionControl:!0,showConfirmDenyButtons:!0,styleConfirmDenyButtons:!0,returnPixelCoordinates:!0,keyboardShortcut:"c",rect:null,allowRotation:!0,startRotated:!1,startRotatedHeight:.1,restrictToImage:!1,cropMinimumSize:!1,cropMinimumWidth:0,cropMinimumHeight:0,onSelection:null,onSelectionCanceled:null,onSelectionChange:null,onSelectionToggled:null,prefixUrl:null,navImages:{selection:{REST:"selection_rest.png",GROUP:"selection_grouphover.png",HOVER:"selection_hover.png",DOWN:"selection_pressed.png"},selectionConfirm:{REST:"selection_confirm_rest.png",GROUP:"selection_confirm_grouphover.png",HOVER:"selection_confirm_hover.png",DOWN:"selection_confirm_pressed.png"},selectionCancel:{REST:"selection_cancel_rest.png",GROUP:"selection_cancel_grouphover.png",HOVER:"selection_cancel_hover.png",DOWN:"selection_cancel_pressed.png"}},borderStyle:{width:"1px",color:"#fff"},handleStyle:{top:"50%",left:"50%",width:"6px",height:"6px",margin:"-4px 0 0 -4px",background:"#000",border:"1px solid #ccc"},cornersStyle:{width:"6px",height:"6px",background:"#000",border:"1px solid #ccc"}},t),e.extend(!0,this.navImages,this.viewer.navImages),this.element||(this.element=e.makeNeutralElement("div"),this.element.style.background="rgba(0, 0, 0, 0.1)",this.element.className="selection-box"),this.borders=this.borders||[];let c,p=[];for(let n=0;n<4;n++)this.borders[n]||(this.borders[n]=e.makeNeutralElement("div"),this.borders[n].className="border-"+n,this.borders[n].style.position="absolute",this.borders[n].style.width=this.borderStyle.width,this.borders[n].style.height=this.borderStyle.width,this.borders[n].style.background=this.borderStyle.color),c=e.makeNeutralElement("div"),c.className="border-"+n+"-handle",c.style.position="absolute",c.style.top=this.handleStyle.top,c.style.left=this.handleStyle.left,c.style.width=this.handleStyle.width,c.style.height=this.handleStyle.height,c.style.margin=this.handleStyle.margin,c.style.background=this.handleStyle.background,c.style.border=this.handleStyle.border,new e.MouseTracker({element:this.borders[n],dragHandler:s.bind(this,n),dragEndHandler:l.bind(this,n)}),p[n]=e.makeNeutralElement("div"),p[n].className="corner-"+n+"-handle",p[n].style.position="absolute",p[n].style.width=this.cornersStyle.width,p[n].style.height=this.cornersStyle.height,p[n].style.background=this.cornersStyle.background,p[n].style.border=this.cornersStyle.border,new e.MouseTracker({element:p[n],dragHandler:s.bind(this,n+.5),dragEndHandler:l.bind(this,n)}),this.borders[n].appendChild(c),this.element.appendChild(this.borders[n]),setTimeout(this.element.appendChild.bind(this.element,p[n]),0);this.borders[0].style.top=0,this.borders[0].style.width="100%",this.borders[1].style.right=0,this.borders[1].style.height="100%",this.borders[2].style.bottom=0,this.borders[2].style.width="100%",this.borders[3].style.left=0,this.borders[3].style.height="100%",p[0].style.top="-3px",p[0].style.left="-3px",p[1].style.top="-3px",p[1].style.right="-3px",p[2].style.bottom="-3px",p[2].style.right="-3px",p[3].style.bottom="-3px",p[3].style.left="-3px",this.overlay||(this.overlay=new e.SelectionOverlay(this.element,this.rect||new e.SelectionRect)),this.innerTracker=new e.MouseTracker({element:this.element,clickTimeThreshold:this.viewer.clickTimeThreshold,clickDistThreshold:this.viewer.clickDistThreshold,dragHandler:e.delegate(this,i),dragEndHandler:e.delegate(this,a),clickHandler:e.delegate(this,o)}),this.viewer.addHandler("canvas-click",o.bind(this)),this.viewer.addHandler("canvas-drag",n.bind(this)),this.viewer.addHandler("canvas-drag-end",r.bind(this)),this.keyboardShortcut&&e.addEvent(this.viewer.container,"keypress",e.delegate(this,u),!1);let f=this.prefixUrl||this.viewer.prefixUrl||"",d=this.viewer.buttons&&this.viewer.buttonGroup.buttons,h=d?this.viewer.buttonGroup.buttons[0]:null,m=h?h.onFocus:null,y=h?h.onBlur:null;if(this.showSelectionControl&&(this.toggleButton=new e.Button({element:this.toggleButton?e.getElement(this.toggleButton):null,clickTimeThreshold:this.viewer.clickTimeThreshold,clickDistThreshold:this.viewer.clickDistThreshold,tooltip:e.getString("Tooltips.SelectionToggle")||"Toggle selection",srcRest:f+this.navImages.selection.REST,srcGroup:f+this.navImages.selection.GROUP,srcHover:f+this.navImages.selection.HOVER,srcDown:f+this.navImages.selection.DOWN,onRelease:this.toggleState.bind(this),onFocus:m,onBlur:y}),d&&(this.viewer.buttonGroup.buttons.push(this.toggleButton),this.viewer.buttonGroup.element.appendChild(this.toggleButton.element)),this.toggleButton.imgDown&&(this.buttonActiveImg=this.toggleButton.imgDown.cloneNode(!0),this.toggleButton.element.appendChild(this.buttonActiveImg))),this.showConfirmDenyButtons){this.confirmButton=new e.Button({element:this.confirmButton?e.getElement(this.confirmButton):null,clickTimeThreshold:this.viewer.clickTimeThreshold,clickDistThreshold:this.viewer.clickDistThreshold,tooltip:e.getString("Tooltips.SelectionConfirm")||"Confirm selection",srcRest:f+this.navImages.selectionConfirm.REST,srcGroup:f+this.navImages.selectionConfirm.GROUP,srcHover:f+this.navImages.selectionConfirm.HOVER,srcDown:f+this.navImages.selectionConfirm.DOWN,onRelease:this.confirm.bind(this),onFocus:m,onBlur:y});let t=this.confirmButton.element;t.classList.add("confirm-button"),this.element.appendChild(t),this.cancelButton=new e.Button({element:this.cancelButton?e.getElement(this.cancelButton):null,clickTimeThreshold:this.viewer.clickTimeThreshold,clickDistThreshold:this.viewer.clickDistThreshold,tooltip:e.getString("Tooltips.SelectionCancel")||"Cancel selection",srcRest:f+this.navImages.selectionCancel.REST,srcGroup:f+this.navImages.selectionCancel.GROUP,srcHover:f+this.navImages.selectionCancel.HOVER,srcDown:f+this.navImages.selectionCancel.DOWN,onRelease:this.cancel.bind(this),onFocus:m,onBlur:y});let n=this.cancelButton.element;n.classList.add("cancel-button"),this.element.appendChild(n),this.styleConfirmDenyButtons&&(t.style.position="absolute",t.style.top="50%",t.style.left="50%",t.style.transform="translate(-100%, -50%)",n.style.position="absolute",n.style.top="50%",n.style.left="50%",n.style.transform="translate(0, -50%)")}this.viewer.addHandler("selection",this.onSelection),this.viewer.addHandler("selection_cancel",this.onSelectionCanceled),this.viewer.addHandler("selection_change",this.onSelectionChange),this.viewer.addHandler("selection_toggle",this.onSelectionToggled),this.viewer.addHandler("open",this.draw.bind(this)),this.viewer.addHandler("animation",this.draw.bind(this)),this.viewer.addHandler("resize",this.draw.bind(this)),this.viewer.addHandler("rotate",this.draw.bind(this))},e.extend(e.Selection.prototype,e.ControlDock.prototype,{toggleState:function(){return this.setState(!this.isSelecting)},setState:function(e){return this.isSelecting=e,e?this.draw():this.undraw(),this.buttonActiveImg&&(this.buttonActiveImg.style.visibility=e?"visible":"hidden"),this.viewer.raiseEvent("selection_toggle",{enabled:e}),this},setAllowRotation:function(e){this.allowRotation=e},enable:function(){return this.setState(!0)},disable:function(){return this.setState(!1)},draw:function(){return this.rect&&(this.overlay.update(this.rect.normalize()),this.overlay.drawHTML(this.viewer.drawer.container,this.viewer.viewport),this.viewer.raiseEvent("selection_change",this.getCurrentRect())),this},undraw:function(){return this.overlay.destroy(),this.rect=null,this},confirm:function(){return this.rect&&(this.viewer.raiseEvent("selection",this.getCurrentRect()),this.undraw()),this},getCurrentRect:function(){let t=this.rect.normalize();if(this.returnPixelCoordinates){let n=this.viewer.viewport.viewportToImageRectangle(t);n=e.SelectionRect.fromRect(n).round(),n.rotation=t.rotation,t=n}return t},cancel:function(){return this.viewer.raiseEvent("selection_cancel",!1),this.undraw()}})}(t);t.setString("Tooltips.SelectionToggle",J("selection.toggle")),t.setString("Tooltips.SelectionConfirm",J("selection.confirm")),t.setString("Tooltips.SelectionCancel",J("selection.cancel"));class ne{constructor(e,t={}){__publicField(this,"viewer"),__publicField(this,"selection"),__publicField(this,"options"),this.viewer=e,this.options={showSelectionControl:!0,showConfirmDenyButtons:!0,styleConfirmDenyButtons:!0,returnPixelCoordinates:!0,keyboardShortcut:"c",allowRotation:!0,startRotated:!1,restrictToImage:!1,prefixUrl:"",navImages:{selection:{REST:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAiCAYAAADVhWD8AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODIyQUM5QkUyMDFBMkEwRiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2RUVDRTY4NDczRjExMUU1OEFDRDgxN0E3MzVCRjJGOSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2RUVDRTY4MzczRjExMUU1OEFDRDgxN0E3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ZZ+YfiINkap47y1rBsoVxVwJVrRN1ZRdsMmGAw+ERRDnlxrfLWBsYclWZ1ra1XlbdGdXlbDWQWGJfLNQuIk6q+OJAaxT+pulLMquL/mSCeAAPeMvM14FkfJJ7xSeSJ27/GJ5JnP47TP++Dn3eB/wswAJT1A7Jy8nfmAAAAAElFTkSuQmCC"}},borderStyle:{width:"2px",color:"#4CAF50"},handleStyle:{top:"50%",left:"50%",width:"10px",height:"10px",margin:"-6px 0 0 -6px",background:"#4CAF50",border:"2px solid #4CAF50"},cornersStyle:{width:"12px",height:"12px",background:"#4CAF50",border:"2px solid #4CAF50"},...t},this.init()}init(){this.viewer.addOnceHandler("open",()=>{this.setupSelection()})}setupSelection(){try{if("function"!=typeof this.viewer.selection)return void console.warn("OpenSeadragonSelection plugin not found. Please include openseadragonselection.js");this.selection=this.viewer.selection(this.options)}catch(e){console.error("[SelectionPlugin] Failed to initialize selection plugin:",e)}}enable(){this.selection&&this.selection.enable()}disable(){this.selection&&this.selection.disable()}toggleState(){this.selection&&this.selection.toggleState()}getSelection(){return this.selection?this.selection.getSelection():null}setSelection(e){this.selection&&this.selection.setSelection(e)}clearSelection(){this.selection&&this.selection.clearSelection()}isEnabled(){return!!this.selection&&this.selection.isEnabled()}destroy(){this.selection&&(this.selection=null)}}var re=(e=>(e.TOP_LEFT="TOP_LEFT",e.TOP_CENTER="TOP_CENTER",e.TOP_RIGHT="TOP_RIGHT",e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_CENTER="BOTTOM_CENTER",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.MIDDLE_LEFT="MIDDLE_LEFT",e.MIDDLE_RIGHT="MIDDLE_RIGHT",e))(re||{});const oe=[{id:"reset",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AeydCbx9U9nHrzcaNWqk+a000aTJUCoavaVZc6RQkSjRINJEMkUhQ6IyFEIRJVIaDP9KGoxFoRQlTZ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EMhHj813k3hMB6SMxBmE+Xl4CYwqnwDo0fTlsHMbjWNhi2It4XEkiIANkxmDI3nbvhtsE2BRaw6cGH4K+8r3Tgcj3hvaSzsCf5bCn8VzlKQFAKtdkVIMYnF2wx2AbaU2fGvwW+v4J9jzs5VEDEeAJAhJAdDaZjgIEJJ2xYqQBFCAgAURnk+koQEDSGStGGkCBvAEJIDibTEsBApLWeDHaihUgIBULzubSUoCApDVejLZiBQhIxYKzubQUICCexovV1kOB/wMAAP//fe+fTAAAAAZJREFUAwDKtMkYZJHHkQAAAABJRU5ErkJggg==",dropdownContent:(e,t)=>{const n=document.createElement("div");n.className="med-toolbar-dropdown-inner";let r="#ff0000";const o=document.createElement("div");o.innerHTML=`<div class="med-toolbar-section-title">${J("toolbar.annoColor")}</div>`;const i=document.createElement("div");i.className="med-color-grid";["#ff0000","#00ff00","#0000ff","#ffff00","#00ffff","#ffffff"].forEach(e=>{const t=document.createElement("div");t.className="med-color-item",t.style.backgroundColor=e,t.onclick=()=>{r=e,i.querySelectorAll(".med-color-item").forEach(e=>e.classList.remove("active")),t.classList.add("active")},i.appendChild(t)}),o.appendChild(i),n.appendChild(o);const a=document.createElement("div");a.innerHTML=`<div class="med-toolbar-section-title">${J("toolbar.annoShape")}</div>`;const s=document.createElement("div");s.className="med-tool-grid";return[{id:"rect",label:J("toolbar.rect")},{id:"polygon",label:J("toolbar.polygon")},{id:"circle",label:J("toolbar.circle")},{id:"ellipse",label:J("toolbar.ellipse")},{id:"line",label:J("toolbar.line")},{id:"freehand",label:J("toolbar.freehand")}].forEach(n=>{const o=document.createElement("button");o.className="med-tool-item",o.textContent=n.label,o.onclick=()=>{e.anno&&e.anno.setTool(n.id,r),t()},s.appendChild(o)}),a.appendChild(s),n.appendChild(a),n},label:J("toolbar.annoSettings")},{id:"colorAdjust",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AeydCdx1U73HH5ei+lyaNdeNEmUIe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5zjh3SQCZIhyori9q8BjJBatJ5TnY6NPD/AAAA//9GzLATAAAABklEQVQDAFYq/BjGu87BAAAAAElFTkSuQmCC",dropdownContent:(e,t)=>{var n;const r=document.createElement("div");r.className="med-toolbar-dropdown-inner med-color-adjust-dropdown";const o=(e,t,n,r,o,i,a)=>{const s=document.createElement("div");s.className="med-toolbar-section",s.innerHTML=`<div class="med-toolbar-section-title">${e}</div>`;const l=document.createElement("input");l.type="range",l.id=t,l.min=String(n),l.max=String(r),l.step=String(o),l.value=String(i);const u=document.createElement("span");u.className="med-slider-value",u.textContent=String(i);const c=((e,t)=>{let n=null;return(...r)=>{n&&clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}})(a,200);return l.oninput=e=>{const t=parseFloat(e.target.value);u.textContent=t.toFixed(2),c(t)},s.appendChild(l),s.appendChild(u),s},i=(e,t,n,r)=>{const o=document.createElement("div");o.className="med-toolbar-section med-checkbox-section";const i=document.createElement("label");i.htmlFor=t,i.textContent=e;const a=document.createElement("input");return a.type="checkbox",a.id=t,a.checked=n,a.onchange=e=>r(e.target.checked),o.appendChild(i),o.appendChild(a),o},a=(null==(n=e.colorAdjust)?void 0:n.adjustments)||{brightness:1,contrast:1,saturation:1,gamma:1,hue:0,invert:!1,sepia:!1,greyscale:!1};r.appendChild(o(J("toolbar.brightness"),"brightness-slider",0,2,.01,a.brightness||1,t=>{var n;return null==(n=e.colorAdjust)?void 0:n.setAdjustments({brightness:t})})),r.appendChild(o(J("toolbar.contrast"),"contrast-slider",0,2,.01,a.contrast||1,t=>{var n;return null==(n=e.colorAdjust)?void 0:n.setAdjustments({contrast:t})})),r.appendChild(o(J("toolbar.saturation"),"saturation-slider",0,3,.01,a.saturation||1,t=>{var n;null==(n=e.colorAdjust)||n.setAdjustments({saturation:t,sepia:!1,greyscale:!1}),r.querySelector("#sepia-checkbox").checked=!1,r.querySelector("#greyscale-checkbox").checked=!1})),r.appendChild(o(J("toolbar.hue"),"hue-slider",0,360,1,a.hue||0,t=>{var n;null==(n=e.colorAdjust)||n.setAdjustments({hue:t,sepia:!1,greyscale:!1}),r.querySelector("#sepia-checkbox").checked=!1,r.querySelector("#greyscale-checkbox").checked=!1})),r.appendChild(o(J("toolbar.gamma"),"gamma-slider",.1,3,.01,a.gamma||1,t=>{var n;return null==(n=e.colorAdjust)?void 0:n.setAdjustments({gamma:t})})),r.appendChild(i(J("toolbar.invert"),"invert-checkbox",a.invert||!1,t=>{var n;return null==(n=e.colorAdjust)?void 0:n.setAdjustments({invert:t})})),r.appendChild(i(J("toolbar.sepia"),"sepia-checkbox",a.sepia||!1,t=>{var n,o;t?(null==(n=e.colorAdjust)||n.setAdjustments({sepia:!0,greyscale:!1,saturation:1,hue:0}),r.querySelector("#saturation-slider").value="1.0",r.querySelector("#hue-slider").value="0",r.querySelector("#greyscale-checkbox").checked=!1):null==(o=e.colorAdjust)||o.setAdjustments({sepia:!1})})),r.appendChild(i(J("toolbar.greyscale"),"greyscale-checkbox",a.greyscale||!1,t=>{var n,o;t?(null==(n=e.colorAdjust)||n.setAdjustments({greyscale:!0,sepia:!1,saturation:1,hue:0}),r.querySelector("#saturation-slider").value="1.0",r.querySelector("#hue-slider").value="0",r.querySelector("#sepia-checkbox").checked=!1):null==(o=e.colorAdjust)||o.setAdjustments({greyscale:!1})}));const s=document.createElement("button");return s.className="med-main-btn med-reset-btn",s.textContent=J("toolbar.reset"),s.onclick=()=>{var t;null==(t=e.colorAdjust)||t.reset(),r.querySelector("#brightness-slider").value="1.0",r.querySelector("#contrast-slider").value="1.0",r.querySelector("#saturation-slider").value="1.0",r.querySelector("#hue-slider").value="0",r.querySelector("#gamma-slider").value="1.0",r.querySelector("#invert-checkbox").checked=!1,r.querySelector("#sepia-checkbox").checked=!1,r.querySelector("#greyscale-checkbox").checked=!1,r.querySelectorAll(".med-slider-value").forEach(e=>{const t=e.previousElementSibling.id;"brightness-slider"===t||"contrast-slider"===t||"saturation-slider"===t||"gamma-slider"===t?e.textContent="1.00":"hue-slider"===t&&(e.textContent="0")})},r.appendChild(s),r},label:J("toolbar.colorAdjust")},{id:"selection",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AeydDbRtVVXH7y1L0AzKSJAKzMheKE8yUniiIAgPEITk+8OgIBDFeiKaQ4hHouMlqARqgBIIPLIHqKCoKAUxQAFH+YqPGEpqRgxL86OsbIwaz9//vn3uO/fec+7+mmvttfaed8x51z57rzXXnP+5/nufsz/W/pEZ/3MEHIGpCDhBpkLjGxyBmRkniI8CR2AZBJwgy4DjmxwBJ4iPAUdgGQQCEmSZXn2TI5AJAk6QTBLlbnaDgBOkG9y910wQcIJkkih3sxsEnCDd4O69ZoJAngTJBFx3M38EnCD559AjCIiAEyQguG46fwScIPnn0CMIiIATJCC4bjp/BJwgi3LoHx2BcQScIONo+LIjsAgBJ8giQPyjIzCOgBNkHA1fdgQWIeAEWQSIf3QExhFwgoyjEXbZrWeIgBMkw6S5y/EQcILEw9p7yhABJ0iGSXOX4yHgBImHtfeUIQKdEWTTpk1HouvQL6AurRDobWONDY2RI7viVnSCkMqV6D0EfCP6ZvTXURdHYBICGhsaIzdqzKArJ1UKuS4qQQjwfILZiK5CXRyBOghozGxkDK2t06ht3WgEIbBfwNmowdGfS/8QOL8YS1Eii0YQolmHujgCFghEG0tRCALjjwGV41CX3BBI09/jijEV3LsoBCGKvVEXR8ASgShjyglimTK3FROBXhFkt5jIeV+DQCDKmIp1BBlExjzI/iHgBOlfTrOJKAdHnSA5ZMl97AwBJ0hn0HvHOSDgBMkhS+5jZwg4QTqD3jvOAQEnSA5Zch/rImBWPxeC3EXErjMzfcNgJvW/XAgyMzs7u++sa28wSJ0YI/+yIcjIYS8dgZgIOEFiou19ZYeAEyS7lLnDMRFYSpCYvXtfjkDiCDhBEk+Qu9ctAk6QbvH33hNHwAmSeILcvW4RcIJ0i7/3njgCUQmSOBbuniOwBAEnyBJIfIUjsAUBJ8gWLHzJEViCgBNkCSS+whH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1LkEFjJEUROAdRD6JEsn4Hq1hSKZETXb/bDP90NkIxTyzlS+LofdeQ7RTLyf3jyFvw7DE2OHPg2kyRB5JgU0K6g1Asrre9axWxt0Snptfh0AGp++3ptb2o2kM+o7pO6gKaKhaJT0VFDO5p1nXox3vmE5aQJIn9J6lfQU1lejepOUYroIoLuiR8aXNE7t+yQGNZib09UMVFEFxHjUPzQUSP0/Xitg0ueIKMIAfR2VCQRWfRjfrQpVKkb5PSwz2r6PRVN8itAk+AVCyoched12Gg9Xxc2lhP9/rmGCofQr4hh+YQhZsNJNgQZQQDAV6E6c6TnDTTHksiiq66jKm3KJ2gsUpxIuQv9nIh2ddTChbCi2NBX04tubdfTlHpo7FE+W8l9GNKJjOfSzynoJ/mclWRHkBG6gP0YehkqsuzAep35uoRSSamyRxSpNBhuoc05qL5C7Yg9kUI3yOkIwur+CzH/N3oL+jpUD5vtTtRrUN1GL4yEFR+XFWEu7C+j1jGosBSmOhWu50VYlZ9kS5BxqEnqd9GPoWtQJUWE0fxLSva+1B1Xff/egXpboyvQw9GLUSWXqi5gsRG9BD0CFUbCUpgKu3EstSyMhaUwFfavp80GVEfj7MG0IkhyQJCgH6CPonct0vv4rL1dcj6n7JAwQ4XdYjyFcZUjTMrhTfWttwSZGrFvcARqIOAEqQGWVx0eAk6Q4eXcI66BgBOkBlhedXgIZECQ4SXFI04HASdIOrlwTxJEwAmSYFLcpXQQcIKkkwv3JEEEnCAJJsVdSgeBYRMknTy4J4ki4ARJNDHuVhoIOEHSyIN7kSgCTpBEE+NupYGAEySNPLgXiSLgBAmUGDfbDwR+CAAA//984SgBAAAABklEQVQDAOpfFBhVguy8AAAAAElFTkSuQmCC",label:J("toolbar.screenshot"),onClick:(e,t)=>{var n;null==(n=e.selection)||n.toggleState(),t()}}],ie="med-toolbar-styles";class ae{constructor(e,t={}){__publicField(this,"engine"),__publicField(this,"options"),__publicField(this,"element"),__publicField(this,"dropdownElement",null),__publicField(this,"outsideClickHandler",null),this.engine=e,this.options=t,this.element=document.createElement("div"),this.element.className=this.getClassName(),this.injectStyles(),this.render(),this.mount()}destroy(){this.closeDropdown(!0),this.element.remove(),this.engine=null}render(){let e;if(this.element.innerHTML="",this.options.buttons&&this.options.buttons.length>0){const t=new Map(oe.map(e=>[e.id,e]));e=this.options.buttons.map(e=>{const n=t.get(e.id);return n?{...n,...e}:e})}else e=oe;e.forEach(e=>{const t=document.createElement("div");t.className="med-toolbar-item-wrapper";const n=document.createElement("button");if(n.className="med-main-btn",e.icon){const t=document.createElement("img");t.src=e.icon,t.alt=e.label||e.id,n.appendChild(t)}else e.label&&(n.textContent=e.label);if(n.onclick=n=>{n.stopPropagation(),this.dropdownElement&&this.dropdownElement.parentElement===t?this.closeDropdown():(this.closeDropdown(),e.onClick?e.onClick(this.engine,()=>this.closeDropdown()):e.dropdownContent&&this.showDropdown(t,e))},t.appendChild(n),e.label){const n=document.createElement("div");n.className="med-tooltip",n.textContent=e.label,t.appendChild(n)}this.element.appendChild(t)})}showDropdown(e,t){this.dropdownElement=document.createElement("div"),this.dropdownElement.className="med-toolbar-dropdown";const n=t.dropdownContent(this.engine,()=>this.closeDropdown());this.dropdownElement.appendChild(n),e.appendChild(this.dropdownElement),this.adjustDropdownPosition(),requestAnimationFrame(()=>{var e;null==(e=this.dropdownElement)||e.classList.add("show")}),this.outsideClickHandler=e=>{this.dropdownElement&&!this.dropdownElement.contains(e.target)&&this.closeDropdown()},setTimeout(()=>document.addEventListener("click",this.outsideClickHandler),0)}adjustDropdownPosition(){if(!this.dropdownElement)return;const e=this.dropdownElement.getBoundingClientRect(),t=window.innerWidth;e.right>t?(this.dropdownElement.style.left="auto",this.dropdownElement.style.right="0",this.dropdownElement.style.transform="translateX(0) translateY(10px)",this.dropdownElement.setAttribute("data-adjusted","true")):e.left<0&&(this.dropdownElement.style.left="0",this.dropdownElement.style.transform="translateX(0) translateY(10px)",this.dropdownElement.setAttribute("data-adjusted","true"));if((this.options.position||"").includes("TOP")){const e=this.dropdownElement.style.transform;this.dropdownElement.style.transform=e.replace("translateY(10px)","translateY(-10px)")}}closeDropdown(e=!1){if(this.dropdownElement){const t=this.dropdownElement;this.dropdownElement=null,e?t.remove():(t.classList.remove("show"),setTimeout(()=>t.remove(),200))}this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler),this.outsideClickHandler=null)}mount(){var e;const t=null==(e=this.engine.viewer)?void 0:e.element;t&&t.appendChild(this.element)}getClassName(){return`med-toolbar med-toolbar--${this.options.position||"BOTTOM_CENTER"}`}injectStyles(){if(document.getElementById(ie))return;const e=document.createElement("style");e.id=ie,e.textContent='\n .med-toolbar {\n position: absolute;\n display: flex;\n gap: 12px;\n padding: 10px;\n z-index: 100;\n background: rgba(24, 28, 36, 0.85);\n border-radius: 12px;\n backdrop-filter: blur(10px);\n border: 1px solid rgba(255,255,255,0.1);\n box-shadow: 0 8px 32px rgba(0,0,0,0.3);\n }\n\n /* 定位 */\n .med-toolbar--TOP_LEFT { top: 18px; left: 18px; }\n .med-toolbar--TOP_CENTER { top: 18px; left: 50%; transform: translateX(-50%); }\n .med-toolbar--TOP_RIGHT { top: 18px; right: 18px; }\n .med-toolbar--BOTTOM_LEFT { bottom: 18px; left: 18px; }\n .med-toolbar--BOTTOM_CENTER { bottom: 18px; left: 50%; transform: translateX(-50%); }\n .med-toolbar--BOTTOM_RIGHT { bottom: 18px; right: 18px; }\n .med-toolbar--MIDDLE_LEFT { top: 50%; left: 18px; transform: translateY(-50%); flex-direction: column; }\n .med-toolbar--MIDDLE_RIGHT { top: 50%; right: 18px; transform: translateY(-50%); flex-direction: column; }\n\n .med-toolbar-item-wrapper { position: relative; }\n \n /* 按钮及动画 */\n .med-main-btn {\n background: rgba(255,255,255,0.08);\n color: #f2f5f8;\n border: none;\n padding: 8px 16px;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .med-main-btn:hover { background: rgba(49, 208, 170, 0.2); }\n .med-main-btn:active { transform: scale(0.9); }\n .med-main-btn img { width: 24px; height: 24px; }\n\n /* 下拉框基础及进场动画 */\n .med-toolbar-dropdown {\n position: absolute;\n bottom: calc(100% + 12px); \n left: 50%;\n background: #181c24;\n border: 1px solid rgba(255,255,255,0.1);\n border-radius: 12px;\n padding: 16px;\n box-shadow: 0 10px 40px rgba(0,0,0,0.5);\n min-width: 220px;\n z-index: 101;\n \n /* 初始动画状态 */\n opacity: 0;\n pointer-events: none;\n transform: translateX(-50%) translateY(10px);\n transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n\n /* 动画显示状态 */\n .med-toolbar-dropdown.show {\n opacity: 1;\n pointer-events: auto;\n transform: translateX(-50%) translateY(0) !important;\n }\n \n /* 边界修正后的显示状态 */\n .med-toolbar-dropdown[data-adjusted="true"].show {\n transform: translateX(0) translateY(0) !important;\n }\n\n /* 顶部位置下拉动画修正 */\n [class*="med-toolbar--TOP"] .med-toolbar-dropdown {\n bottom: auto;\n top: calc(100% + 12px);\n transform: translateX(-50%) translateY(-10px);\n }\n\n /* 侧边位置逻辑 */\n .med-toolbar--MIDDLE_LEFT .med-toolbar-dropdown {\n left: calc(100% + 12px); top: 0; bottom: auto; transform: translateX(-10px);\n }\n .med-toolbar--MIDDLE_LEFT .med-toolbar-dropdown.show { transform: translateX(0) !important; }\n\n .med-toolbar--MIDDLE_RIGHT .med-toolbar-dropdown {\n left: auto; right: calc(100% + 12px); top: 0; bottom: auto; transform: translateX(10px);\n }\n .med-toolbar--MIDDLE_RIGHT .med-toolbar-dropdown.show { transform: translateX(0) !important; }\n\n /* Tooltip styles */\n .med-tooltip {\n position: absolute;\n padding: 6px 10px;\n background: rgba(0, 0, 0, 0.75);\n color: #fff;\n border-radius: 6px;\n font-size: 12px;\n white-space: nowrap;\n z-index: 102;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease, transform 0.2s ease;\n }\n\n .med-toolbar-item-wrapper:hover .med-tooltip {\n opacity: 1;\n pointer-events: auto;\n }\n\n /* Tooltip directions based on toolbar position */\n\n /* Default: bottom tooltip (for top toolbars) */\n .med-toolbar-item-wrapper .med-tooltip {\n top: calc(100% + 12px); /* Position below the button */\n left: 50%;\n transform: translateX(-50%) translateY(0px);\n }\n .med-toolbar-item-wrapper:hover .med-tooltip {\n transform: translateX(-50%) translateY(0);\n }\n\n\n /* Top tooltip (for bottom toolbars) */\n [class*="med-toolbar--BOTTOM"] .med-toolbar-item-wrapper .med-tooltip {\n bottom: calc(100% + 12px); /* Position above the button */\n top: auto;\n left: 50%;\n transform: translateX(-50%) translateY(0px);\n }\n [class*="med-toolbar--BOTTOM"] .med-toolbar-item-wrapper:hover .med-tooltip {\n transform: translateX(-50%) translateY(0);\n }\n\n /* Right tooltip (for middle-left toolbars) */\n [class*="med-toolbar--MIDDLE_LEFT"] .med-toolbar-item-wrapper .med-tooltip {\n left: calc(100% + 12px); /* Position to the right of the button */\n top: 50%;\n transform: translateY(-50%) translateX(0px);\n }\n [class*="med-toolbar--MIDDLE_LEFT"] .med-toolbar-item-wrapper:hover .med-tooltip {\n transform: translateY(-50%) translateX(0);\n }\n\n /* Left tooltip (for middle-right toolbars) */\n [class*="med-toolbar--MIDDLE_RIGHT"] .med-toolbar-item-wrapper .med-tooltip {\n right: calc(100% + 12px); /* Position to the left of the button */\n top: 50%;\n left: auto;\n transform: translateY(-50%) translateX(0px);\n }\n [class*="med-toolbar--MIDDLE_RIGHT"] .med-toolbar-item-wrapper:hover .med-tooltip {\n transform: translateY(-50%) translateX(0);\n }\n\n /* 内容样式 */\n .med-toolbar-section-title { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 10px; letter-spacing: 1px; }\n .med-color-grid { display: flex; gap: 10px; margin-bottom: 20px; }\n .med-color-item { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: 0.2s; }\n .med-color-item.active { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 10px rgba(255,255,255,0.3); }\n .med-tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }\n .med-tool-item { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05); color: #fff; padding: 8px 4px; border-radius: 6px; cursor: pointer; font-size: 12px; transition: 0.2s; }\n .med-tool-item:hover { background: rgba(49, 208, 170, 0.2); border-color: rgba(49, 208, 170, 0.4); }\n\n /* 颜色调整下拉框样式 */\n .med-color-adjust-dropdown {\n min-width: 280px;\n }\n\n .med-toolbar-section {\n margin-bottom: 15px;\n display: flex;\n flex-direction: column;\n }\n\n .med-toolbar-section-title {\n margin-bottom: 8px;\n font-size: 13px;\n color: #f2f5f8;\n }\n\n .med-toolbar-section input[type="range"] {\n width: 100%;\n -webkit-appearance: none;\n height: 4px;\n background: rgba(255,255,255,0.2);\n border-radius: 2px;\n outline: none;\n margin-top: 5px;\n margin-bottom: 5px;\n }\n\n .med-toolbar-section input[type="range"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #31d0aa;\n cursor: pointer;\n border: 2px solid #181c24;\n transition: background 0.15s ease-in-out;\n }\n\n .med-toolbar-section input[type="range"]::-webkit-slider-thumb:hover {\n background: #25a084;\n }\n\n .med-slider-value {\n font-size: 12px;\n color: rgba(255,255,255,0.7);\n align-self: flex-end;\n }\n\n .med-checkbox-section {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 10px;\n }\n\n .med-checkbox-section label {\n font-size: 13px;\n color: #f2f5f8;\n cursor: pointer;\n }\n\n .med-checkbox-section input[type="checkbox"] {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n border: 1px solid rgba(255,255,255,0.4);\n border-radius: 4px;\n background-color: transparent;\n cursor: pointer;\n position: relative;\n transition: all 0.2s ease;\n }\n\n .med-checkbox-section input[type="checkbox"]:checked {\n background-color: #31d0aa;\n border-color: #31d0aa;\n }\n\n .med-checkbox-section input[type="checkbox"]:checked::after {\n content: \'\';\n position: absolute;\n left: 5px;\n top: 2px;\n width: 4px;\n height: 9px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n .med-reset-btn {\n width: 100%;\n margin-top: 15px;\n background: rgba(200, 50, 50, 0.1);\n color: #ff6b6b;\n border: 1px solid rgba(255, 100, 100, 0.2);\n }\n .med-reset-btn:hover {\n background: rgba(200, 50, 50, 0.3);\n }\n ',document.head.appendChild(e)}}class se{constructor(e){var n,r;if(__publicField(this,"viewer"),__publicField(this,"anno",null),__publicField(this,"toolbar",null),__publicField(this,"colorAdjust",null),__publicField(this,"selection",null),__publicField(this,"scalebar",null),__publicField(this,"magnification",null),__publicField(this,"options"),__publicField(this,"events",new Map),!e.osdOptions)throw new Error("osdOptions is required");e.locale&&(r=e.locale,Q=r);const o={id:"osd-container",crossOriginPolicy:"Anonymous",prefixUrl:(null==(n=e.osdOptions)?void 0:n.prefixUrl)||"",opacity:1,preload:!1,immediateRender:!1,defaultZoomLevel:0,degrees:0,flipped:!1,minZoomImageRatio:.9,maxZoomPixelRatio:2,smoothTileEdgesMinZoom:1.1,animationTime:.8,springStiffness:10,pixelsPerWheelLine:120,minScrollDeltaTime:20,panHorizontal:!0,panVertical:!0,constrainDuringPan:!0,visibilityRatio:.2,wrapHorizontal:!1,wrapVertical:!1,showNavigator:!0,navigatorSizeRatio:.15,navigatorPosition:"TOP_RIGHT",navigatorAutoFade:!1,navigatorOpacity:.8,navigatorBackground:"#fff",navigatorBorderColor:"#aaa",navigatorDisplayRegionColor:"#f21616",showNavigationControl:!1,maxImageCacheCount:100,gestureSettingsMouse:{dragToPan:!0,clickToZoom:!1,dblClickToZoom:!1},gestureSettingsTouch:{flickEnabled:!1,pinchToZoom:!0},...e.osdOptions};e.osdOptions=o,this.options=e,this.viewer=t(o),this.viewer.addOnceHandler("open",()=>{this.viewer.viewport.goHome(),this.emit("ready"),console.log("[MedViewerEngine] First tile loaded, refreshing viewer layout.")}),this.initPlugins()}initPlugins(){var e,t,n,r,o;const{plugins:i}=this.options;if(i){if(i.scalebar){const e="object"==typeof i.scalebar?i.scalebar:{};this.scalebar=new te(this.viewer,e),console.log("[MedEngine] Scalebar plugin initialized.")}if(i.annotorious){const a="object"==typeof i.annotorious?i.annotorious:{};if(a.locale||(a.locale=this.options.locale||"zh-CN"),"object"==typeof(null==(e=a.options)?void 0:e.formatter)){const e=(null==(n=null==(t=a.options)?void 0:t.formatter)?void 0:n.pixelsPerMeter)||1,i=(null==(o=null==(r=a.options)?void 0:r.formatter)?void 0:o.showMeasure)||!1;(()=>{const e="med-anno-default-shapeLabelsFormatter-overrides";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.innerHTML="\n \n.a9s-annotationlayer .a9s-formatter-el,\n.a9s-annotationlayer .a9s-formatter-el foreignObject {\n overflow: visible;\n pointer-events: none;\n}\n\n.a9s-annotationlayer .a9s-formatter-el foreignObject .a9s-shape-label-wrapper {\n position: relative;\n transform: translateY(-100%);\n padding-bottom: 4px;\n}\n\n.a9s-annotationlayer\n .a9s-formatter-el\n foreignObject\n .a9s-shape-label-wrapper\n .a9s-shape-label {\n display: inline-block;\n max-width: 24vw !important;\n color: #000;\n /* min-width: 10vw !important; */\n\n word-wrap: break-word;\n word-break: keep-all;\n /* white-space: nowrap; */\n\n padding: 3px 5px;\n margin-bottom: 2px;\n background-color: rgba(255, 255, 255, 0.85);\n border-radius: 3px;\n font-size: 14px;\n}\n\n.a9s-annotationlayer\n .a9s-formatter-el\n foreignObject\n .a9s-shape-label-wrapper\n .a9s-shape-label\n p {\n margin: 5px !important;\n}\n ",document.head.appendChild(t)})(),a.formatter=((e,t)=>n=>{var r;const o=Array.isArray(n.body)?n.body:[n.body];let i=null==(r=n.target.renderedVia)?void 0:r.name;t||(i=null);const a=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");a.setAttribute("width","1px"),a.setAttribute("height","1px");const s=o.find(e=>"commenting"==e.purpose);switch(i){case"line":console.log("line",n.target.selector.value);let t=document.createElement("div");t.innerHTML=n.target.selector.value;let r=t.getElementsByTagName("line")[0],o=Z(Number(r.getAttribute("x1")),e),i=Z(Number(r.getAttribute("y1")),e),l=Z(Number(r.getAttribute("x2")),e),u=Z(Number(r.getAttribute("y2")),e),c=Math.sqrt(Math.pow(l-o,2)+Math.pow(u-i,2));a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n<div class="a9s-shape-label" >\n <p >\n ${J("annotation.length")}: ${W(c,"m")} </p> <p >\n ${J("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n\n <div class="a9s-shape-label" >\n <p>\n ${J("annotation.length")}: ${W(c,"m")} \n </p>\n </div>\n </div>`;break;case"rect":let p=new RegExp("xywh=pixel:","g"),f=n.target.selector.value.replace(p,"").split(",");const d=Z(Number(f[2]),e),h=Z(Number(f[3]),e),m=2*(d+h),y=d*h;a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n\n <div class="a9s-shape-label">\n <p>\n ${J("annotation.width")}: ${W(d,"m")} </p> <p>\n\n\n ${J("annotation.height")}: ${W(h,"m")} </p> <p>\n ${J("annotation.perimeter")}: ${W(m,"m")} </p> <p>\n ${J("annotation.area")}: ${W(y,"m²")} </p> <p>\n ${J("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p >\n ${J("annotation.width")}: ${W(d,"m")} </p> <p>\n ${J("annotation.height")}: ${W(h,"m")} </p> <p>\n ${J("annotation.perimeter")}: ${W(m,"m")} </p> <p>\n ${J("annotation.area")}: ${W(y,"m²")} \n </p>\n </div>\n </div>`;break;case"circle":let b=document.createElement("div");console.log(n),b.innerHTML=n.target.selector.value;let g=b.getElementsByTagName("circle")[0];const v=Z(Number(g.getAttribute("r")),e),w=2*Math.PI*v,A=Math.PI*Math.pow(v,2);a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n\n <div class="a9s-shape-label">\n <p>\n ${J("annotation.radius")}: ${W(v,"m")} </p><p>\n ${J("annotation.perimeter")}: ${W(w,"m")} </p><p>\n ${J("annotation.area")}: ${W(A,"m²")} </p><p>\n ${J("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label"> \n <p>\n ${J("annotation.radius")}: ${W(v,"m")} </p><p>\n ${J("annotation.perimeter")}: ${W(w,"m")} </p><p>\n ${J("annotation.area")}: ${W(A,"m²")} \n \n </p>\n </div>\n </div>`;break;case"ellipse":let S=document.createElement("div");S.innerHTML=n.target.selector.value;let O=S.getElementsByTagName("ellipse")[0],E=Z(Number(O.getAttribute("rx")),e),x=Z(Number(O.getAttribute("ry")),e),C=null,M=null;E>=x?(C=E,M=x):(C=x,M=E);const j=Math.PI*(3*(E+x)-Math.sqrt((3*E+x)*(E+3*x))),P=Math.PI*E*x;a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>\n ${J("annotation.majorAxis")}: ${W(C,"m")} </p> <p>\n\n ${J("annotation.minorAxis")}: ${W(M,"m")} </p> <p>\n ${J("annotation.perimeter")}: ${W(j,"m")} </p> <p>\n ${J("annotation.area")}: ${W(P,"m²")} </p> <p>\n ${J("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>\n ${J("annotation.majorAxis")}: ${W(C,"m")} </p><p>\n \n ${J("annotation.minorAxis")}: ${W(M,"m")} </p><p>\n ${J("annotation.perimeter")}: ${W(j,"m")} </p><p>\n ${J("annotation.area")}: ${W(P,"m²")} \n </p>\n </div>\n </div>`;break;case"polygon":let I=document.createElement("div");I.innerHTML=n.target.selector.value;const k=I.getElementsByTagName("polygon")[0].getAttribute("points").split(" ").map(t=>{const[n,r]=t.split(",").map(parseFloat);return{x:Z(n,e),y:Z(r,e)}});let T=0;for(let e=0;e<k.length;e++){const t=k[e],n=k[(e+1)%k.length],r=n.x-t.x,o=n.y-t.y;T+=Math.sqrt(r*r+o*o)}let D=0;for(let e=0;e<k.length;e++){const t=k[e],n=k[(e+1)%k.length];D+=t.x*n.y-n.x*t.y}D=Math.abs(D)/2,a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>\n ${J("annotation.perimeter")}: ${W(T,"m")} </p> <p>\n ${J("annotation.area")}: ${W(D,"m²")} </p> <p>\n ${J("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n\n <div class="a9s-shape-label">\n <p>\n ${J("annotation.perimeter")}: ${W(T,"m")} </p><p>\n ${J("annotation.area")}: ${W(D,"m²")} \n </p>\n </div>\n </div>`;break;case"freehand":let R=function(e){let t=0;for(let n=0;n<e.length-1;n++){const[r,o]=e[n],[i,a]=e[n+1];t+=r*a-i*o}return Math.abs(t/2)},N=document.createElement("div");N.innerHTML=n.target.selector.value;let B=N.getElementsByTagName("path")[0].getAttribute("d");const L=new Y(B);let _=L.getTotalLength(),G=300,H=[];for(let e=0;e<=G;e++){let t=L.getPointAtLength(e/G*_);H.push([t.x,t.y])}let F=R(H),U=Z(_,e),z=Z(1,e),V=F*z*z;a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>${J("annotation.length")}: ${W(U,"m")}</p>\n <p>${J("annotation.area")}: ${W(V,"m²")}</p>\n <p>${J("annotation.remark")}: ${s.value}</p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>${J("annotation.length")}: ${W(U,"m")}</p>\n <p>${J("annotation.area")}: ${W(V,"m²")}</p>\n </div>\n </div>`;break;default:s&&(a.innerHTML=`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>\n ${J("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`)}return{element:a}})(e,i)}this.viewer.isOpen()?(console.log("[MedEngine] Viewer is already open, mounting Annotorious.",a),this.mountAnnotorious(a)):this.viewer.addOnceHandler("open",()=>{console.log("[MedEngine] Viewer is already open, mounting Annotorious.",a),this.mountAnnotorious(a)})}if(i.toolbar){const e="object"==typeof i.toolbar?i.toolbar:{};this.toolbar=new ae(this,e),console.log("[MedEngine] Toolbar plugin initialized.")}if(i.selection){const e="object"==typeof i.selection?i.selection:{};this.selection=new ne(this.viewer,e),console.log("[MedEngine] Selection plugin initialized.")}if(i.colorAdjust){const e="object"==typeof i.colorAdjust?i.colorAdjust:{};this.colorAdjust=new d(this.viewer,e),console.log("[MedEngine] ColorAdjust plugin initialized.")}if(i.magnification){const e="object"==typeof i.magnification?i.magnification:{};this.magnification=new q(this.viewer,e),console.log("[MedEngine] Magnification plugin initialized.")}}}mountAnnotorious(e){try{this.anno=new f(this,e),console.log("[MedEngine] Annotorious plugin initialized. version: 2.7.17")}catch(t){console.error("[MedEngine] Failed to initialize Annotorious:",t)}}loadAIMarks(e=[],n=!1){this.clearAIMarks();this.viewer.world.getItemAt(0)&&e.forEach(e=>{var r=document.createElement("div");if(r.classList.add("ld-ai-box"),e.style&&Object.assign(r.style,e.style),n){let t=document.createElement("div");t.className="celltext",t.style.position="absolute",t.style.right="102%",t.style.top="0",t.style.color="#333",t.style.background="#F5F5F5",t.style.opacity="0.7",t.style.width="max-content",t.style.padding="5px",t.style.borderRadius="8px",e.labels.forEach(e=>{const n=e.style||{};t.innerHTML+=`<div style="${Object.entries(n).map(([e,t])=>`${e}:${t}`).join(";")}">${e.label} : ${e.value}</div>`}),r.appendChild(t)}const o=new t.Rect(e.x,e.y,e.width,e.height),i=this.viewer.viewport.imageToViewportRectangle(o);this.viewer.addOverlay({element:r,location:i,checkResize:!0})})}updateAIMarks(e=[],t=!1){this.loadAIMarks(e,t)}clearAIMarks(){Array.from(document.getElementsByClassName("ld-ai-box")).forEach(e=>{this.viewer.removeOverlay(e)})}loadSelectionBox(e=[]){Array.from(document.getElementsByClassName("ld-selection-box")).forEach(e=>{this.viewer.removeOverlay(e)}),e.forEach(e=>{let n=document.createElement("div");n.classList.add("ld-selection-box"),e.style&&Object.assign(n.style,e.style);const r=this.viewer.world.getItemAt(0).getContentSize(),o=e.x/r.x,i=e.y/r.y,a=e.width/r.x,s=e.height/r.y;this.viewer.addOverlay({element:n,location:new t.Rect(o,i,a,s)})})}addHandler(e,t){this.events.has(e)||this.events.set(e,new Set),this.events.get(e).add(t)}addOnceHandler(e,t){const n=(...r)=>{t(...r),this.removeHandler(e,n)};this.addHandler(e,n)}removeHandler(e,t){var n;null==(n=this.events.get(e))||n.delete(t)}emit(e,t){var n;null==(n=this.events.get(e))||n.forEach(e=>e(t))}destroy(){var e,t,n,r,o;null==(e=this.anno)||e.destroy(),null==(t=this.toolbar)||t.destroy(),null==(n=this.selection)||n.destroy(),null==(r=this.scalebar)||r.destroy(),null==(o=this.colorAdjust)||o.destroy(),this.viewer.destroy()}}"undefined"!=typeof window&&(window.MedViewerSDK={MedViewerEngine:se,AnnoAnnotator:f,MedToolbar:ae,SelectionPlugin:ne,ColorAdjustPlugin:d,MagnificationPlugin:q}),e.AnnoAnnotator=f,e.ColorAdjustPlugin=d,e.MagnificationPlugin=q,e.MagnificationPosition=X,e.MagnificationType=K,e.MedToolbar=ae,e.MedViewerEngine=se,e.ScalebarLocation=ee,e.ScalebarType=$,e.SelectionPlugin=ne,e.ToolbarPosition=re,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
2
|
+
/*! For license information please see openseadragon-annotorious.min.js.LICENSE.txt */self,l=e=>(()=>{var t={15(e){e.exports=EvalError},98(e,t,n){var r=n(1953);e.exports=function(e){if(null==e)throw new r(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}},157(e){e.exports=Error},223(e,t){t.A=function(e,t){var n=0;return(1==t||3==t||5==t||7==t||9==t||11==t||13==t)&&e>=5&&(n=1),[[["právě teď","právě teď"]],[["před %s vteřinami","za %s vteřiny"],["před %s vteřinami","za %s vteřin"]],[["před minutou","za minutu"]],[["před %s minutami","za %s minuty"],["před %s minutami","za %s minut"]],[["před hodinou","za hodinu"]],[["před %s hodinami","za %s hodiny"],["před %s hodinami","za %s hodin"]],[["včera","zítra"]],[["před %s dny","za %s dny"],["před %s dny","za %s dnů"]],[["minulý týden","příští týden"]],[["před %s týdny","za %s týdny"],["před %s týdny","za %s týdnů"]],[["minulý měsíc","přístí měsíc"]],[["před %s měsíci","za %s měsíce"],["před %s měsíci","za %s měsíců"]],[["před rokem","přístí rok"]],[["před %s lety","za %s roky"],["před %s lety","za %s let"]]][t][n]}},309(e,t){t.A=function(e,t){return[["à l'instant","dans un instant"],["il y a %s secondes","dans %s secondes"],["il y a 1 minute","dans 1 minute"],["il y a %s minutes","dans %s minutes"],["il y a 1 heure","dans 1 heure"],["il y a %s heures","dans %s heures"],["il y a 1 jour","dans 1 jour"],["il y a %s jours","dans %s jours"],["il y a 1 semaine","dans 1 semaine"],["il y a %s semaines","dans %s semaines"],["il y a 1 mois","dans 1 mois"],["il y a %s mois","dans %s mois"],["il y a 1 an","dans 1 an"],["il y a %s ans","dans %s ans"]][t]}},377(e,t,n){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)}var o="undefined"!=typeof Symbol&&Symbol,i=n(4379);e.exports=function(){return"function"==typeof o&&"function"==typeof Symbol&&"symbol"===r(o("foo"))&&"symbol"===r(Symbol("bar"))&&i()}},404(e,t){t.A=function(e,t){return[["just nu","om en stund"],["%s sekunder sedan","om %s sekunder"],["1 minut sedan","om 1 minut"],["%s minuter sedan","om %s minuter"],["1 timme sedan","om 1 timme"],["%s timmar sedan","om %s timmar"],["1 dag sedan","om 1 dag"],["%s dagar sedan","om %s dagar"],["1 vecka sedan","om 1 vecka"],["%s veckor sedan","om %s veckor"],["1 månad sedan","om 1 månad"],["%s månader sedan","om %s månader"],["1 år sedan","om 1 år"],["%s år sedan","om %s år"]][t]}},658(e,t){Object.defineProperty(t,"__esModule",{value:!0}),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."))},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.int=function(e){return parseInt(e,10)},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)}},688(e,t){t.A=function(e,t){return[["μόλις τώρα","σε λίγο"],["%s δευτερόλεπτα πριν","σε %s δευτερόλεπτα"],["1 λεπτό πριν","σε 1 λεπτό"],["%s λεπτά πριν","σε %s λεπτά"],["1 ώρα πριν","σε 1 ώρα"],["%s ώρες πριν","σε %s ώρες"],["1 μέρα πριν","σε 1 μέρα"],["%s μέρες πριν","σε %s μέρες"],["1 εβδομάδα πριν","σε 1 εβδομάδα"],["%s εβδομάδες πριν","σε %s εβδομάδες"],["1 μήνα πριν","σε 1 μήνα"],["%s μήνες πριν","σε %s μήνες"],["1 χρόνο πριν","σε 1 χρόνο"],["%s χρόνια πριν","σε %s χρόνια"]][t]}},830(e,t,n){var r,o=this&&this.__extends||(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])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a=this&&this.__rest||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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var s=n(6512),l=n(5762),u=n(7858),c=n(7405),p="autosize:resized",f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:c(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout(function(){return e.textarea&&u(e.textarea)}):this.textarea&&u(this.textarea),this.textarea&&this.textarea.addEventListener(p,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(p,this.onResize),u.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),l=a(t,["onResize","maxRows","onChange","style","innerRef","children"]),u=this.state.lineHeight,c=n&&u?u*n:null;return s.createElement("textarea",i({},l,{onChange:this.onChange,style:c?i({},r,{maxHeight:c}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&u.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef(function(e,t){return s.createElement(f,i({},e,{innerRef:t}))})},863(e,t,n){var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(5465);e.exports=i.call(r,o)},889(e,t,n){var r=n(8087),o=n(986);e.exports=function(){var e=r();return o(Object,{entries:e},{entries:function(){return Object.entries!==e}}),e}},973(e,t){t.A=function(e,t){return[["justo ahora","en un rato"],["hace %s segundos","en %s segundos"],["hace 1 minuto","en 1 minuto"],["hace %s minutos","en %s minutos"],["hace 1 hora","en 1 hora"],["hace %s horas","en %s horas"],["hace 1 día","en 1 día"],["hace %s días","en %s días"],["hace 1 semana","en 1 semana"],["hace %s semanas","en %s semanas"],["hace 1 mes","en 1 mes"],["hace %s meses","en %s meses"],["hace 1 año","en 1 año"],["hace %s años","en %s años"]][t]}},986(e,t,n){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)}var o=n(4491),i="function"==typeof Symbol&&"symbol"===r(Symbol("foo")),a=Object.prototype.toString,s=Array.prototype.concat,l=n(3423),u=n(6698)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==a.call(o)||!r())return;var o;u?l(e,t,n,!0):l(e,t,n)},p=function(e,t){var n=arguments.length>2?arguments[2]:{},r=o(t);i&&(r=s.call(r,Object.getOwnPropertySymbols(t)));for(var a=0;a<r.length;a+=1)c(e,r[a],t[r[a]],n[r[a]])};p.supportsDescriptors=!!u,e.exports=p},1026(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){}},1226(e){e.exports=SyntaxError},1622(e){e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},1730(e,t,n){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)}var 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},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}}(),a=n(6512),s=u(a),l=u(n(5762));function u(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},p=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],f=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},d=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),h=function(){return d?"_"+Math.random().toString(36).substr(2,12):void 0},m=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"!==r(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||h(),prevId:e.id},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(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,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||h(),prevId:n}:null}}]),i(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(f(e,this.sizer),this.placeHolderSizer&&f(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return d&&e?s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce(function(e,t){return null!=e?e:t}),t=o({},this.props.style);t.display||(t.display="inline-block");var n,r=o({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=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}(this.props,[]);return n=i,p.forEach(function(e){return delete n[e]}),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=r,s.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),s.default.createElement("input",o({},i,{ref:this.inputRef})),s.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?s.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(a.Component);m.propTypes={className:l.default.string,defaultValue:l.default.any,extraWidth:l.default.oneOfType([l.default.number,l.default.string]),id:l.default.string,injectStyles:l.default.bool,inputClassName:l.default.string,inputRef:l.default.func,inputStyle:l.default.object,minWidth:l.default.oneOfType([l.default.number,l.default.string]),onAutosize:l.default.func,onChange:l.default.func,placeholder:l.default.string,placeholderIsMinWidth:l.default.bool,style:l.default.object,value:l.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.A=m},1742(e,t,n){var r=n(986),o=n(8953),i=n(9990),a=n(8087),s=n(889),l=o(a(),Object);r(l,{getPolyfill:a,implementation:i,shim:s}),e.exports=l},1851(e,t,n){var r=n(5465),o=n(7052),i=n(1978);e.exports=function(){return i(r,o,arguments)}},1953(e){e.exports=TypeError},1978(e,t,n){var r=n(5465),o=n(7052),i=n(5118),a=n(2069);e.exports=a||r.call(i,o)},2069(e){e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},2104(e){e.exports=RangeError},2411(e,t){t.A=function(e,t){return[["방금","곧"],["%s초 전","%s초 후"],["1분 전","1분 후"],["%s분 전","%s분 후"],["1시간 전","1시간 후"],["%s시간 전","%s시간 후"],["1일 전","1일 후"],["%s일 전","%s일 후"],["1주일 전","1주일 후"],["%s주일 전","%s주일 후"],["1개월 전","1개월 후"],["%s개월 전","%s개월 후"],["1년 전","1년 후"],["%s년 전","%s년 후"]][t]}},2493(e,t){function n(e){return(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)}var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,A=r?Symbol.for("react.scope"):60119;function S(e){if("object"===n(e)&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case f:case a:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case d:case b:case y:case u:return e;default:return t}}case i:return t}}}function O(e){return S(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=u,t.Element=o,t.ForwardRef=d,t.Fragment=a,t.Lazy=b,t.Memo=y,t.Portal=i,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||S(e)===p},t.isConcurrentMode=O,t.isContextConsumer=function(e){return S(e)===c},t.isContextProvider=function(e){return S(e)===u},t.isElement=function(e){return"object"===n(e)&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return S(e)===d},t.isFragment=function(e){return S(e)===a},t.isLazy=function(e){return S(e)===b},t.isMemo=function(e){return S(e)===y},t.isPortal=function(e){return S(e)===i},t.isProfiler=function(e){return S(e)===l},t.isStrictMode=function(e){return S(e)===s},t.isSuspense=function(e){return S(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===l||e===s||e===h||e===m||"object"===n(e)&&null!==e&&(e.$$typeof===b||e.$$typeof===y||e.$$typeof===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===v||e.$$typeof===w||e.$$typeof===A||e.$$typeof===g)},t.typeOf=S},2495(e){function t(e){return(t="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)}e.exports=function e(n,r){if(n===r)return!0;if(n&&r&&"object"==t(n)&&"object"==t(r)){if(n.constructor!==r.constructor)return!1;var o,i,a;if(Array.isArray(n)){if((o=n.length)!=r.length)return!1;for(i=o;0!==i--;)if(!e(n[i],r[i]))return!1;return!0}if(n.constructor===RegExp)return n.source===r.source&&n.flags===r.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===r.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===r.toString();if((o=(a=Object.keys(n)).length)!==Object.keys(r).length)return!1;for(i=o;0!==i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=o;0!==i--;){var s=a[i];if(!e(n[s],r[s]))return!1}return!0}return n!=n&&r!=r}},2503(e,t,n){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 o(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){i(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 i(e,t,n){return r=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==a(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}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)}Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=d,t.addEvent=function(e,t,n,r){if(e){var i=o({capture:!0},r);e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}},t.addUserSelectStyles=function(e){if(e){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&&d(e.body,"react-draggable-transparent-selection")}},t.createCSSTransform=function(e,t){var n=p(e,t,"px");return i({},(0,l.browserPrefixToKey)("transform",l.default),n)},t.createSVGTransform=function(e,t){return p(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,s.findInArray)(e.targetTouches,function(e){return t===e.identifier})||e.changedTouches&&(0,s.findInArray)(e.changedTouches,function(e){return t===e.identifier})},t.getTouchIdentifier=function(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0},t.getTranslation=p,t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=(0,s.int)(n.paddingTop))-(0,s.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=(0,s.int)(n.paddingLeft))-(0,s.int)(n.paddingRight)},t.matchesSelector=c,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(c(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t+=(0,s.int)(n.borderTopWidth))+(0,s.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t+=(0,s.int)(n.borderLeftWidth))+(0,s.int)(n.borderRightWidth)},t.removeClassName=h,t.removeEvent=function(e,t,n,r){if(e){var i=o({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}},t.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame(function(){f(e)}):f(e)};var s=n(658),l=function(e){if("function"==typeof WeakMap)var t=new WeakMap;return function(e){if(e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=a(e)&&"function"!=typeof e)return o;if(n=t){if(n.has(e))return n.get(e);n.set(e,o)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?n(o,i,r):o[i]=e[i]);return o}(e)}(n(5080)),u="";function c(e,t){return u||(u=(0,s.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,s.isFunction)(e[t])})),!!(0,s.isFunction)(e[u])&&e[u](t)}function p(e,t,n){var r=e.x,o=e.y,i="translate(".concat(r).concat(n,",").concat(o).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);i="translate(".concat(a,", ").concat(s,")")+i}return i}function f(e){if(e)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(n){}}function d(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"),"")}},2703(e){var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e){for(var t=[],n=1,r=0;n<e.length;n+=1,r+=1)t[r]=e[n];return t}(arguments),s=n(0,o.length-a.length),l=[],u=0;u<s;u++)l[u]="$"+u;if(i=Function("binder","return function ("+function(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=",");return t}(l)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(e,r(a,arguments))}),o.prototype){var c=function(){};c.prototype=o.prototype,i.prototype=new c,c.prototype=null}return i}},2948(e,t,n){var r=n(8643);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,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,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},3190(e,t,n){var r=n(8299),o=n(9472),i=o([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o([n]):n}},3423(e,t,n){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)}var o=n(5049),i=n(1226),a=n(1953),s=n(3581);e.exports=function(e,t,n){if(!e||"object"!==r(e)&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!==r(t))throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,p=arguments.length>6&&arguments[6],f=!!s&&s(e,t);if(o)o(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===l&&f?f.enumerable:!l,value:n,writable:null===u&&f?f.writable:!u});else{if(!p&&(l||u||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},3424(e,t,n){var r=n(8813),o=r.default,i=r.DraggableCore;e.exports=o,e.exports.default=o,e.exports.DraggableCore=i},3581(e,t,n){var r=n(5759);if(r)try{r([],"length")}catch(o){r=null}e.exports=r},3847(e,t){t.A=function(e,t){return[["az önce","şimdi"],["%s saniye önce","%s saniye içinde"],["1 dakika önce","1 dakika içinde"],["%s dakika önce","%s dakika içinde"],["1 saat önce","1 saat içinde"],["%s saat önce","%s saat içinde"],["1 gün önce","1 gün içinde"],["%s gün önce","%s gün içinde"],["1 hafta önce","1 hafta içinde"],["%s hafta önce","%s hafta içinde"],["1 ay önce","1 ay içinde"],["%s ay önce","%s ay içinde"],["1 yıl önce","1 yıl içinde"],["%s yıl önce","%s yıl içinde"]][t]}},3940(e,t){t.A=function(e,t){return[["poco fa","fra poco"],["%s secondi fa","fra %s secondi"],["un minuto fa","fra un minuto"],["%s minuti fa","fra %s minuti"],["un'ora fa","fra un'ora"],["%s ore fa","fra %s ore"],["un giorno fa","fra un giorno"],["%s giorni fa","fra %s giorni"],["una settimana fa","fra una settimana"],["%s settimane fa","fra %s settimane"],["un mese fa","fra un mese"],["%s mesi fa","fra %s mesi"],["un anno fa","fra un anno"],["%s anni fa","fra %s anni"]][t]}},4038(e,t){t.A=function(e,t){return[["gerade eben","vor einer Weile"],["vor %s Sekunden","in %s Sekunden"],["vor 1 Minute","in 1 Minute"],["vor %s Minuten","in %s Minuten"],["vor 1 Stunde","in 1 Stunde"],["vor %s Stunden","in %s Stunden"],["vor 1 Tag","in 1 Tag"],["vor %s Tagen","in %s Tagen"],["vor 1 Woche","in 1 Woche"],["vor %s Wochen","in %s Wochen"],["vor 1 Monat","in 1 Monat"],["vor %s Monaten","in %s Monaten"],["vor 1 Jahr","in 1 Jahr"],["vor %s Jahren","in %s Jahren"]][t]}},4218(e){e.exports=Math.floor},4379(e){function t(e){return(t="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)}e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===t(Symbol.iterator))return!0;var e={},n=Symbol("test"),r=Object(n);if("string"==typeof n)return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var o in e[n]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==n)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,n);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},4491(e,t,n){var r=Array.prototype.slice,o=n(9267),i=Object.keys,a=i?function(e){return i(e)}:n(4717),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?s(r.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},4688(e,t){t.A=function(e,t){return[["すこし前","すぐに"],["%s秒前","%s秒以内"],["1分前","1分以内"],["%s分前","%s分以内"],["1時間前","1時間以内"],["%s時間前","%s時間以内"],["1日前","1日以内"],["%s日前","%s日以内"],["1週間前","1週間以内"],["%s週間前","%s週間以内"],["1ヶ月前","1ヶ月以内"],["%sヶ月前","%sヶ月以内"],["1年前","1年以内"],["%s年前","%s年以内"]][t]}},4717(e,t,n){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)}var o;if(!Object.keys){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=n(9267),l=Object.prototype.propertyIsEnumerable,u=!l.call({toString:null},"toString"),c=l.call(function(){},"prototype"),p=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"===r(window[e]))try{f(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();o=function(e){var t=null!==e&&"object"===r(e),n="[object Function]"===a.call(e),o=s(e),l=t&&"[object String]"===a.call(e),d=[];if(!t&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var m=c&&n;if(l&&e.length>0&&!i.call(e,0))for(var y=0;y<e.length;++y)d.push(String(y));if(o&&e.length>0)for(var b=0;b<e.length;++b)d.push(String(b));else for(var g in e)m&&"prototype"===g||!i.call(e,g)||d.push(String(g));if(u)for(var v=function(e){if("undefined"==typeof window||!h)return f(e);try{return f(e)}catch(t){return!1}}(e),w=0;w<p.length;++w)v&&"constructor"===p[w]||!i.call(e,p[w])||d.push(p[w]);return d}}e.exports=o},4940(e){e.exports=Math.abs},5049(e){var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(n){t=!1}e.exports=t},5080(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.browserPrefixToKey=o,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0,t.getPrefix=r;var n=["Moz","Webkit","O","ms"];function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";var r=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!r)return"";if(t in r)return"";for(var i=0;i<n.length;i++)if(o(t,n[i])in r)return n[i];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}t.default=r()},5086(e,t,n){function r(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.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)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function a(e,t,n){return t=l(t),function(e,t){if(t&&("object"==c(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)}(e,s()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!e})()}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c="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.default=void 0;var p=function(e){if("function"==typeof WeakMap)var t=new WeakMap;return function(e){if(e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=c(e)&&"function"!=typeof e)return o;if(n=t){if(n.has(e))return n.get(e);n.set(e,o)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?n(o,i,r):o[i]=e[i]);return o}(e)}(n(6512)),f=g(n(5762)),d=g(n(6512)),h=n(2503),m=n(6500),y=n(658),b=g(n(1026));function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return r=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==c(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var w={start:"touchstart",move:"touchmove",stop:"touchend"},A={start:"mousedown",move:"mousemove",stop:"mouseup"},S=A,O=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),v(e=a(this,t,arguments),"dragging",!1),v(e,"lastX",NaN),v(e,"lastY",NaN),v(e,"touchIdentifier",null),v(e,"mounted",!1),v(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,h.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,h.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"!==t.type||e.props.allowMobileScroll||t.preventDefault();var o=(0,h.getTouchIdentifier)(t);e.touchIdentifier=o;var i=(0,m.getControlPosition)(t,o,e);if(null!=i){var a=i.x,s=i.y,l=(0,m.createCoreData)(e,a,s);(0,b.default)("DraggableCore: handleDragStart: %j",l),(0,b.default)("calling",e.props.onStart),!1!==e.props.onStart(t,l)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,h.addUserSelectStyles)(r),e.dragging=!0,e.lastX=a,e.lastY=s,(0,h.addEvent)(r,S.move,e.handleDrag),(0,h.addEvent)(r,S.stop,e.handleDragStop))}}}),v(e,"handleDrag",function(t){var n=(0,m.getControlPosition)(t,e.touchIdentifier,e);if(null!=n){var o=n.x,i=n.y;if(Array.isArray(e.props.grid)){var a=o-e.lastX,s=i-e.lastY,l=r((0,m.snapToGrid)(e.props.grid,a,s),2);if(a=l[0],s=l[1],!a&&!s)return;o=e.lastX+a,i=e.lastY+s}var u=(0,m.createCoreData)(e,o,i);if((0,b.default)("DraggableCore: handleDrag: %j",u),!1!==e.props.onDrag(t,u)&&!1!==e.mounted)e.lastX=o,e.lastY=i;else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(p){var c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(c)}}}),v(e,"handleDragStop",function(t){if(e.dragging){var n=(0,m.getControlPosition)(t,e.touchIdentifier,e);if(null!=n){var o=n.x,i=n.y;if(Array.isArray(e.props.grid)){var a=o-e.lastX||0,s=i-e.lastY||0,l=r((0,m.snapToGrid)(e.props.grid,a,s),2);a=l[0],s=l[1],o=e.lastX+a,i=e.lastY+s}var u=(0,m.createCoreData)(e,o,i);if(!1===e.props.onStop(t,u)||!1===e.mounted)return!1;var c=e.findDOMNode();c&&e.props.enableUserSelectHack&&(0,h.scheduleRemoveUserSelectStyles)(c.ownerDocument),(0,b.default)("DraggableCore: handleDragStop: %j",u),e.dragging=!1,e.lastX=NaN,e.lastY=NaN,c&&((0,b.default)("DraggableCore: Removing handlers"),(0,h.removeEvent)(c.ownerDocument,S.move,e.handleDrag),(0,h.removeEvent)(c.ownerDocument,S.stop,e.handleDragStop))}}}),v(e,"onMouseDown",function(t){return S=A,e.handleDragStart(t)}),v(e,"onMouseUp",function(t){return S=A,e.handleDragStop(t)}),v(e,"onTouchStart",function(t){return S=w,e.handleDragStart(t)}),v(e,"onTouchEnd",function(t){return S=w,e.handleDragStop(t)}),e}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),n=t,(o=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,h.addEvent)(e,w.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,h.removeEvent)(t,A.move,this.handleDrag),(0,h.removeEvent)(t,w.move,this.handleDrag),(0,h.removeEvent)(t,A.stop,this.handleDragStop),(0,h.removeEvent)(t,w.stop,this.handleDragStop),(0,h.removeEvent)(e,w.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,h.scheduleRemoveUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:d.default.findDOMNode(this)}},{key:"render",value:function(){return p.cloneElement(p.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&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,i(r.key),r)}}(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(p.Component);t.default=O,v(O,"displayName","DraggableCore"),v(O,"propTypes",{allowAnyClick:f.default.bool,allowMobileScroll:f.default.bool,children:f.default.node.isRequired,disabled:f.default.bool,enableUserSelectHack:f.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:f.default.arrayOf(f.default.number),handle:f.default.string,cancel:f.default.string,nodeRef:f.default.object,onStart:f.default.func,onDrag:f.default.func,onStop:f.default.func,onMouseDown:f.default.func,scale:f.default.number,className:y.dontSetMe,style:y.dontSetMe,transform:y.dontSetMe}),v(O,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},5118(e){e.exports=Function.prototype.call},5197(e){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]}},5409(e,t,n){e.exports=n(2493)},5416(e,t,n){var r=n(5409),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={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 l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=d(n);o&&o!==h&&e(t,o,r)}var a=c(n);p&&(a=a.concat(p(n)));for(var s=l(t),m=l(n),y=0;y<a.length;++y){var b=a[y];if(!(i[b]||r&&r[b]||m&&m[b]||s&&s[b])){var g=f(n,b);try{u(t,b,g)}catch(v){}}}}return t}},5419(e,t){t.A=function(e,t){return[["剛剛","片刻後"],["%s 秒前","%s 秒後"],["1 分鐘前","1 分鐘後"],["%s 分鐘前","%s 分鐘後"],["1 小時前","1 小時後"],["%s 小時前","%s 小時後"],["1 天前","1 天後"],["%s 天前","%s 天後"],["1 週前","1 週後"],["%s 週前","%s 週後"],["1 個月前","1 個月後"],["%s 個月前","%s 個月後"],["1 年前","1 年後"],["%s 年前","%s 年後"]][t]}},5465(e,t,n){var r=n(2703);e.exports=Function.prototype.bind||r},5586(e,t,n){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)}var o=n(1622),i=n(9302),a=n(8950);e.exports=o?function(e){return o(e)}:i?function(e){if(!e||"object"!==r(e)&&"function"!=typeof e)throw new TypeError("getProto: not an object");return i(e)}:a?function(e){return a(e)}:null},5617(e,t){t.A=function(e,t){return[["เมื่อสักครู่นี้","อีกสักครู่"],["%s วินาทีที่แล้ว","ใน %s วินาที"],["1 นาทีที่แล้ว","ใน 1 นาที"],["%s นาทีที่แล้ว","ใน %s นาที"],["1 ชั่วโมงที่แล้ว","ใน 1 ชั่วโมง"],["%s ชั่วโมงที่แล้ว","ใน %s ชั่วโมง"],["1 วันที่แล้ว","ใน 1 วัน"],["%s วันที่แล้ว","ใน %s วัน"],["1 อาทิตย์ที่แล้ว","ใน 1 อาทิตย์"],["%s อาทิตย์ที่แล้ว","ใน %s อาทิตย์"],["1 เดือนที่แล้ว","ใน 1 เดือน"],["%s เดือนที่แล้ว","ใน %s เดือน"],["1 ปีที่แล้ว","ใน 1 ปี"],["%s ปีที่แล้ว","ใน %s ปี"]][t]}},5690(e,t){var n=[["ثانية","ثانيتين","%s ثوان","%s ثانية"],["دقيقة","دقيقتين","%s دقائق","%s دقيقة"],["ساعة","ساعتين","%s ساعات","%s ساعة"],["يوم","يومين","%s أيام","%s يوماً"],["أسبوع","أسبوعين","%s أسابيع","%s أسبوعاً"],["شهر","شهرين","%s أشهر","%s شهراً"],["عام","عامين","%s أعوام","%s عاماً"]];t.A=function(e,t){if(0===t)return["منذ لحظات","بعد لحظات"];var r,o,i=(r=Math.floor(t/2),(o=e)<3?n[r][o-1]:o>=3&&o<=10?n[r][2]:n[r][3]);return["منذ "+i,"بعد "+i]}},5759(e){e.exports=Object.getOwnPropertyDescriptor},5762(e,t,n){e.exports=n(2948)()},5773(e){e.exports=function(){}},5810(e,t){t.A=function(e,t){return[["अभी","कुछ समय"],["%s सेकंड पहले","%s सेकंड में"],["1 मिनट पहले","1 मिनट में"],["%s मिनट पहले","%s मिनट में"],["1 घंटे पहले","1 घंटे में"],["%s घंटे पहले","%s घंटे में"],["1 दिन पहले","1 दिन में"],["%s दिन पहले","%s दिनों में"],["1 सप्ताह पहले","1 सप्ताह में"],["%s हफ्ते पहले","%s हफ्तों में"],["1 महीने पहले","1 महीने में"],["%s महीने पहले","%s महीनों में"],["1 साल पहले","1 साल में"],["%s साल पहले","%s साल में"]][t]}},5887(e,t,n){var r=n(8299),o=n(3423),i=n(6698)(),a=n(3581),s=n(1953),l=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,u=!0;if("length"in e&&a){var c=a(e,"length");c&&!c.configurable&&(r=!1),c&&!c.writable&&(u=!1)}return(r||u||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},6076(e){e.exports=ReferenceError},6114(e){e.exports=Math.pow},6436(e,t){t.A=function(e,t){return[["juuri äsken","juuri nyt"],["%s sekuntia sitten","%s sekunnin päästä"],["minuutti sitten","minuutin päästä"],["%s minuuttia sitten","%s minuutin päästä"],["tunti sitten","tunnin päästä"],["%s tuntia sitten","%s tunnin päästä"],["päivä sitten","päivän päästä"],["%s päivää sitten","%s päivän päästä"],["viikko sitten","viikon päästä"],["%s viikkoa sitten","%s viikon päästä"],["kuukausi sitten","kuukauden päästä"],["%s kuukautta sitten","%s kuukauden päästä"],["vuosi sitten","vuoden päästä"],["%s vuotta sitten","%s vuoden päästä"]][t]}},6500(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),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.createCoreData=function(e,t,n){var o=!(0,r.isNum)(e.lastX),a=i(e);return o?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:a,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.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}},t.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var a,s=e.props.bounds;s="string"==typeof s?s:{left:(a=s).left,top:a.top,right:a.right,bottom:a.bottom};var l=i(e);if("string"==typeof s){var u,c=l.ownerDocument.defaultView;if(!((u="parent"===s?l.parentNode:l.getRootNode().querySelector(s))instanceof c.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');var p=u,f=c.getComputedStyle(l),d=c.getComputedStyle(p);s={left:-l.offsetLeft+(0,r.int)(d.paddingLeft)+(0,r.int)(f.marginLeft),top:-l.offsetTop+(0,r.int)(d.paddingTop)+(0,r.int)(f.marginTop),right:(0,o.innerWidth)(p)-(0,o.outerWidth)(l)-l.offsetLeft+(0,r.int)(d.paddingRight)-(0,r.int)(f.marginRight),bottom:(0,o.innerHeight)(p)-(0,o.outerHeight)(l)-l.offsetTop+(0,r.int)(d.paddingBottom)-(0,r.int)(f.marginBottom)}}return(0,r.isNum)(s.right)&&(t=Math.min(t,s.right)),(0,r.isNum)(s.bottom)&&(n=Math.min(n,s.bottom)),(0,r.isNum)(s.left)&&(t=Math.max(t,s.left)),(0,r.isNum)(s.top)&&(n=Math.max(n,s.top)),[t,n]},t.getControlPosition=function(e,t,n){var r="number"==typeof t?(0,o.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;var a=i(n),s=n.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,o.offsetXYFromParent)(r||e,s,n.props.scale)},t.snapToGrid=function(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]};var r=n(658),o=n(2503);function i(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}},6512(e,t,n){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.r(t),n.d(t,{Children:()=>ze,Component:()=>C,Fragment:()=>x,PureComponent:()=>Be,StrictMode:()=>It,Suspense:()=>We,SuspenseList:()=>Ke,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>vt,cloneElement:()=>xt,createContext:()=>W,createElement:()=>S,createFactory:()=>At,createPortal:()=>tt,createRef:()=>E,default:()=>Tt,findDOMNode:()=>Mt,flushSync:()=>Pt,forwardRef:()=>Fe,hydrate:()=>ut,isElement:()=>kt,isFragment:()=>Ot,isMemo:()=>Et,isValidElement:()=>St,lazy:()=>Xe,memo:()=>_e,render:()=>lt,startTransition:()=>De,unmountComponentAtNode:()=>Ct,unstable_batchedUpdates:()=>jt,useCallback:()=>ye,useContext:()=>be,useDebugValue:()=>ge,useDeferredValue:()=>Re,useEffect:()=>pe,useErrorBoundary:()=>ve,useId:()=>we,useImperativeHandle:()=>he,useInsertionEffect:()=>Le,useLayoutEffect:()=>fe,useMemo:()=>me,useReducer:()=>ce,useRef:()=>de,useState:()=>ue,useSyncExternalStore:()=>ke,useTransition:()=>Ne,version:()=>wt});var o,i,a,s,l,u,c,p,f,d,h,m,y={},b=[],g=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function A(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function S(e,t,n){var r,i,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?i=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return O(e,s,r,i,null)}function O(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++a:o,__i:-1,__u:0};return null==o&&null!=i.vnode&&i.vnode(s),s}function E(){return{current:null}}function x(e){return e.children}function C(e,t){this.props=e,this.context=t}function M(e,t){if(null==t)return e.__?M(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?M(e):null}function j(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return j(e)}}function P(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!I.__r++||l!=i.debounceRendering)&&((l=i.debounceRendering)||u)(I)}function I(){for(var e,t,n,r,o,a,l,u=1;s.length;)s.length>u&&s.sort(c),e=s.shift(),u=s.length,e.__d&&(n=void 0,r=void 0,o=(r=(t=e).__v).__e,a=[],l=[],t.__P&&((n=w({},r)).__v=r.__v+1,i.vnode&&i.vnode(n),_(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,null==o?M(r):o,!!(32&r.__u),l),n.__v=r.__v,n.__.__k[n.__i]=n,H(a,n,l),r.__e=r.__=null,n.__e!=o&&j(n)));I.__r=0}function k(e,t,n,r,o,i,a,s,l,u,c){var p,f,d,h,m,g,w,A=r&&r.__k||b,S=t.length;for(l=function(e,t,n,r,o){var i,a,s,l,u,c=n.length,p=c,f=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[i]=O(null,a,null,null,null):v(a)?a=e.__k[i]=O(x,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[i]=O(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,l=i+f,a.__=e,a.__b=e.__b+1,s=null,-1!=(u=a.__i=R(a,n,l,p))&&(p--,(s=n[u])&&(s.__u|=2)),null==s||null==s.__v?(-1==u&&(o>c?f--:o<c&&f++),"function"!=typeof a.type&&(a.__u|=4)):u!=l&&(u==l-1?f--:u==l+1?f++:(u>l?f--:f++,a.__u|=4))):e.__k[i]=null;if(p)for(i=0;i<c;i++)null!=(s=n[i])&&!(2&s.__u)&&(s.__e==r&&(r=M(s)),z(s,s));return r}(n,t,A,l,S),p=0;p<S;p++)null!=(d=n.__k[p])&&(f=-1==d.__i?y:A[d.__i]||y,d.__i=p,g=_(e,d,f,o,i,a,s,l,u,c),h=d.__e,d.ref&&f.ref!=d.ref&&(f.ref&&U(f.ref,null,d),c.push(d.ref,d.__c||h,d)),null==m&&null!=h&&(m=h),(w=!!(4&d.__u))||f.__k===d.__k?l=T(d,l,e,w):"function"==typeof d.type&&void 0!==g?l=g:h&&(l=h.nextSibling),d.__u&=-7);return n.__e=m,l}function T(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=T(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=M(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function D(e,t){return t=t||[],null==e||"boolean"==typeof e||(v(e)?e.some(function(e){D(e,t)}):t.push(e)),t}function R(e,t,n,r){var o,i,a,s=e.key,l=e.type,u=t[n],c=null!=u&&!(2&u.__u);if(null===u&&null==s||c&&s==u.key&&l==u.type)return n;if(r>(c?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(u=t[a=o>=0?o--:i++])&&!(2&u.__u)&&s==u.key&&l==u.type)return a;return-1}function N(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||g.test(t)?n:n+"px"}function L(e,t,n,r,o){var i,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||N(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||N(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(p,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=f,e.addEventListener(t,i?h:d,i)):e.removeEventListener(t,i?h:d,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function B(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=f++;else if(t.t<n.u)return;return n(i.event?i.event(t):t)}}}function _(e,t,n,r,a,s,l,u,c,p){var f,d,h,m,b,g,S,O,E,j,P,I,T,D,R,N,B,_=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),s=[u=t.__e=n.__e]),(f=i.__b)&&f(t);e:if("function"==typeof _)try{if(O=t.props,E="prototype"in _&&_.prototype.render,j=(f=_.contextType)&&r[f.__c],P=f?j?j.props.value:f.__:r,n.__c?S=(d=t.__c=n.__c).__=d.__E:(E?t.__c=d=new _(O,P):(t.__c=d=new C(O,P),d.constructor=_,d.render=Y),j&&j.sub(d),d.state||(d.state={}),d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),E&&null==d.__s&&(d.__s=d.state),E&&null!=_.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=w({},d.__s)),w(d.__s,_.getDerivedStateFromProps(O,d.__s))),m=d.props,b=d.state,d.__v=t,h)E&&null==_.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),E&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(E&&null==_.getDerivedStateFromProps&&O!==m&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(O,P),t.__v==n.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(O,d.__s,P)){for(t.__v!=n.__v&&(d.props=O,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[],d.__h.length&&l.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(O,d.__s,P),E&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(m,b,g)})}if(d.context=P,d.props=O,d.__P=e,d.__e=!1,T=i.__r,D=0,E){for(d.state=d.__s,d.__d=!1,T&&T(t),f=d.render(d.props,d.state,d.context),R=0;R<d._sb.length;R++)d.__h.push(d._sb[R]);d._sb=[]}else do{d.__d=!1,T&&T(t),f=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++D<25);d.state=d.__s,null!=d.getChildContext&&(r=w(w({},r),d.getChildContext())),E&&!h&&null!=d.getSnapshotBeforeUpdate&&(g=d.getSnapshotBeforeUpdate(m,b)),N=f,null!=f&&f.type===x&&null==f.key&&(N=F(f.props.children)),u=k(e,v(N)?N:[N],t,n,r,a,s,l,u,c,p),d.base=t.__e,t.__u&=-161,d.__h.length&&l.push(d),S&&(d.__E=d.__=null)}catch(H){if(t.__v=null,c||null!=s)if(H.then){for(t.__u|=c?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;s[s.indexOf(u)]=null,t.__e=u}else{for(B=s.length;B--;)A(s[B]);G(t)}else t.__e=n.__e,t.__k=n.__k,H.then||G(t);i.__e(H,t,n)}else null==s&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):u=t.__e=function(e,t,n,r,a,s,l,u,c){var p,f,d,h,m,b,g,w=n.props||y,S=t.props,O=t.type;if("svg"==O?a="http://www.w3.org/2000/svg":"math"==O?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=s)for(p=0;p<s.length;p++)if((m=s[p])&&"setAttribute"in m==!!O&&(O?m.localName==O:3==m.nodeType)){e=m,s[p]=null;break}if(null==e){if(null==O)return document.createTextNode(S);e=document.createElementNS(a,O,S.is&&S),u&&(i.__m&&i.__m(t,s),u=!1),s=null}if(null==O)w===S||u&&e.data==S||(e.data=S);else{if(s=s&&o.call(e.childNodes),!u&&null!=s)for(w={},p=0;p<e.attributes.length;p++)w[(m=e.attributes[p]).name]=m.value;for(p in w)if(m=w[p],"children"==p);else if("dangerouslySetInnerHTML"==p)d=m;else if(!(p in S)){if("value"==p&&"defaultValue"in S||"checked"==p&&"defaultChecked"in S)continue;L(e,p,null,m,a)}for(p in S)m=S[p],"children"==p?h=m:"dangerouslySetInnerHTML"==p?f=m:"value"==p?b=m:"checked"==p?g=m:u&&"function"!=typeof m||w[p]===m||L(e,p,m,w[p],a);if(f)u||d&&(f.__html==d.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(d&&(e.innerHTML=""),k("template"==t.type?e.content:e,v(h)?h:[h],t,n,r,"foreignObject"==O?"http://www.w3.org/1999/xhtml":a,s,l,s?s[0]:n.__k&&M(n,0),u,c),null!=s)for(p=s.length;p--;)A(s[p]);u||(p="value","progress"==O&&null==b?e.removeAttribute("value"):null!=b&&(b!==e[p]||"progress"==O&&!b||"option"==O&&b!=w[p])&&L(e,p,b,w[p],a),p="checked",null!=g&&g!=e[p]&&L(e,p,g,w[p],a))}return e}(n.__e,t,n,r,a,s,l,c,p);return(f=i.diffed)&&f(t),128&t.__u?void 0:u}function G(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(G)}function H(e,t,n){for(var r=0;r<n.length;r++)U(n[r],n[++r],n[++r]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(n){i.__e(n,t.__v)}})}function F(e){return"object"!=r(e)||null==e||e.__b&&e.__b>0?e:v(e)?e.map(F):w({},e)}function U(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(o){i.__e(o,n)}}function z(e,t,n){var r,o;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||U(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){i.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&z(r[o],t,n||"function"!=typeof e.type);n||A(e.__e),e.__c=e.__=e.__e=void 0}function Y(e,t,n){return this.constructor(e,n)}function V(e,t,n){var r,a,s,l;t==document&&(t=document.documentElement),i.__&&i.__(e,t),a=(r="function"==typeof n)?null:n&&n.__k||t.__k,s=[],l=[],_(t,e=(!r&&n||t).__k=S(x,null,[e]),a||y,y,t.namespaceURI,!r&&n?[n]:a?null:t.firstChild?o.call(t.childNodes):null,s,!r&&n?n:a?a.__e:t.firstChild,r,l),H(s,e,l)}function Q(e,t){V(e,t,Q)}function J(e,t,n){var r,i,a,s,l=w({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==a?r=t[a]:"ref"==a?i=t[a]:l[a]=void 0===t[a]&&null!=s?s[a]:t[a];return arguments.length>2&&(l.children=arguments.length>3?o.call(arguments,2):n),O(e.type,l,r||e.key,i||e.ref,null)}function W(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,P(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+m++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}o=b.slice,i={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},a=0,C.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},C.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},C.prototype.render=x,s=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},I.__r=0,p=/(PointerCapture)$|Capture$/i,f=0,d=B(!1),h=B(!0),m=0;var Z,X,K,q,$=0,ee=[],te=i,ne=te.__b,re=te.__r,oe=te.diffed,ie=te.__c,ae=te.unmount,se=te.__;function le(e,t){te.__h&&te.__h(X,e,$||t),$=0;var n=X.__H||(X.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ue(e){return $=1,ce(Me,e)}function ce(e,t,n){var r=le(Z++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Me(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=X,!X.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(e){return!!e.__c});if(o.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var a=r.__c.props!==e;return o.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),i&&i.call(this,e,t,n)||a};X.__f=!0;var i=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},X.shouldComponentUpdate=o}return r.__N||r.__}function pe(e,t){var n=le(Z++,3);!te.__s&&Ce(n.__H,t)&&(n.__=e,n.u=t,X.__H.__h.push(n))}function fe(e,t){var n=le(Z++,4);!te.__s&&Ce(n.__H,t)&&(n.__=e,n.u=t,X.__h.push(n))}function de(e){return $=5,me(function(){return{current:e}},[])}function he(e,t,n){$=6,fe(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function me(e,t){var n=le(Z++,7);return Ce(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ye(e,t){return $=8,me(function(){return e},t)}function be(e){var t=X.context[e.__c],n=le(Z++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(X)),t.props.value):e.__}function ge(e,t){te.useDebugValue&&te.useDebugValue(t?t(e):e)}function ve(e){var t=le(Z++,10),n=ue();return t.__=e,X.componentDidCatch||(X.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function we(){var e=le(Z++,11);if(!e.__){for(var t=X.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ae(){for(var e;e=ee.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ee),e.__H.__h.forEach(xe),e.__H.__h=[]}catch(t){e.__H.__h=[],te.__e(t,e.__v)}}te.__b=function(e){X=null,ne&&ne(e)},te.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),se&&se(e,t)},te.__r=function(e){re&&re(e),Z=0;var t=(X=e.__c).__H;t&&(K===X?(t.__h=[],X.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Ee),t.__h.forEach(xe),t.__h=[],Z=0)),K=X},te.diffed=function(e){oe&&oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ee.push(t)&&q===te.requestAnimationFrame||((q=te.requestAnimationFrame)||Oe)(Ae)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),K=X=null},te.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Ee),e.__h=e.__h.filter(function(e){return!e.__||xe(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],te.__e(n,e.__v)}}),ie&&ie(e,t)},te.unmount=function(e){ae&&ae(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Ee(e)}catch(n){t=n}}),n.__H=void 0,t&&te.__e(t,n.__v))};var Se="function"==typeof requestAnimationFrame;function Oe(e){var t,n=function(){clearTimeout(r),Se&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Se&&(t=requestAnimationFrame(n))}function Ee(e){var t=X,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),X=t}function xe(e){var t=X;e.__c=e.__(),X=t}function Ce(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Me(e,t){return"function"==typeof t?t(e):t}function je(e){return(je="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 Pe(e,t){for(var n in t)e[n]=t[n];return e}function Ie(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function ke(e,t){var n=t(),r=ue({t:{__:n,u:t}}),o=r[0].t,i=r[1];return fe(function(){o.__=n,o.u=t,Te(o)&&i({t:o})},[e,n,t]),pe(function(){return Te(o)&&i({t:o}),e(function(){Te(o)&&i({t:o})})},[e]),n}function Te(e){var t,n,r=e.u,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(a){return!0}}function De(e){e()}function Re(e){return e}function Ne(){return[!1,De]}var Le=fe;function Be(e,t){this.props=e,this.context=t}function _e(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Ie(this.props,e)}function r(t){return this.shouldComponentUpdate=n,S(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Be.prototype=new C).isPureReactComponent=!0,Be.prototype.shouldComponentUpdate=function(e,t){return Ie(this.props,e)||Ie(this.state,t)};var Ge=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ge&&Ge(e)};var He="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fe(e){function t(t){var n=Pe({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=He,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ue=function(e,t){return null==e?null:D(D(e).map(t))},ze={map:Ue,forEach:Ue,count:function(e){return e?D(e).length:0},only:function(e){var t=D(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:D},Ye=i.__e;i.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Ye(e,t,n,r)};var Ve=i.unmount;function Qe(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Pe({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Qe(e,t,n)})),e}function Je(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Je(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function We(){this.__u=0,this.o=null,this.__b=null}function Ze(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Xe(e){var t,n,r,o=null;function i(i){if(t||(t=e()).then(function(e){e&&(o=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return o?S(o,i):null}return i.displayName="Lazy",i.__f=!0,i}function Ke(){this.i=null,this.l=null}i.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ve&&Ve(e)},(We.prototype=new C).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=Ze(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Je(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},We.prototype.componentWillUnmount=function(){this.o=[]},We.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Qe(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&S(x,null,e.fallback);return o&&(o.__u&=-33),[S(x,null,t.__a?null:e.children),o]};var qe=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function $e(e){return this.getChildContext=function(){return e.context},e.children}function et(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){V(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}V(S($e,{context:t.context},e.__v),t.v)}function tt(e,t){var n=S(et,{__v:e,h:t});return n.containerInfo=t,n}(Ke.prototype=new C).__a=function(e){var t=this,n=Ze(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),qe(t,e,r)):o()};n?n(i):i()}},Ke.prototype.render=function(e){this.i=null,this.l=new Map;var t=D(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ke.prototype.componentDidUpdate=Ke.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){qe(e,n,t)})};var nt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,rt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ot=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,it=/[A-Z0-9]/g,at="undefined"!=typeof document,st=function(e){return("undefined"!=typeof Symbol&&"symbol"==je(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};function lt(e,t,n){return null==t.__k&&(t.textContent=""),V(e,t),"function"==typeof n&&n(),e?e.__c:null}function ut(e,t,n){return Q(e,t),"function"==typeof n&&n(),e?e.__c:null}C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(C.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ct=i.event;function pt(){}function ft(){return this.cancelBubble}function dt(){return this.defaultPrevented}i.event=function(e){return ct&&(e=ct(e)),e.persist=pt,e.isPropagationStopped=ft,e.isDefaultPrevented=dt,e.nativeEvent=e};var ht,mt={enumerable:!1,configurable:!0,get:function(){return this.class}},yt=i.vnode;i.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var a=t[i];if(!("value"===i&&"defaultValue"in t&&null==a||at&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===a?a="":"translate"===s&&"no"===a?a=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||st(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":ot.test(i)&&(i=s):s=i="oninput":o&&rt.test(i)?i=i.replace(it,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===s&&r[i=s]&&(i="oninputCapture"),r[i]=a}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=D(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=D(t.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",mt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=nt,yt&&yt(e)};var bt=i.__r;i.__r=function(e){bt&&bt(e),ht=e.__c};var gt=i.diffed;i.diffed=function(e){gt&>(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),ht=null};var vt={ReactCurrentDispatcher:{current:{readContext:function(e){return ht.__n[e.__c].props.value},useCallback:ye,useContext:be,useDebugValue:ge,useDeferredValue:Re,useEffect:pe,useId:we,useImperativeHandle:he,useInsertionEffect:Le,useLayoutEffect:fe,useMemo:me,useReducer:ce,useRef:de,useState:ue,useSyncExternalStore:ke,useTransition:Ne}}},wt="18.3.1";function At(e){return S.bind(null,e)}function St(e){return!!e&&e.$$typeof===nt}function Ot(e){return St(e)&&e.type===x}function Et(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function xt(e){return St(e)?J.apply(null,arguments):e}function Ct(e){return!!e.__k&&(V(null,e),!0)}function Mt(e){return e&&(e.base||1===e.nodeType&&e)||null}var jt=function(e,t){return e(t)},Pt=function(e,t){return e(t)},It=x,kt=St,Tt={useState:ue,useId:we,useReducer:ce,useEffect:pe,useLayoutEffect:fe,useInsertionEffect:Le,useTransition:Ne,useDeferredValue:Re,useSyncExternalStore:ke,startTransition:De,useRef:de,useImperativeHandle:he,useMemo:me,useCallback:ye,useContext:be,useDebugValue:ge,version:"18.3.1",Children:ze,render:lt,hydrate:ut,unmountComponentAtNode:Ct,createPortal:tt,createElement:S,createContext:W,createFactory:At,cloneElement:xt,createRef:E,Fragment:x,isValidElement:St,isElement:St,isFragment:Ot,isMemo:Et,findDOMNode:Mt,Component:C,PureComponent:Be,memo:_e,forwardRef:Fe,flushSync:Pt,unstable_batchedUpdates:jt,StrictMode:x,Suspense:We,SuspenseList:Ke,lazy:Xe,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:vt}},6681(e){e.exports=Number.isNaN||function(e){return e!=e}},6698(e,t,n){var r=n(5049),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},6740(e,t){function n(e,t,n,r,o){var i=o%10,a=r;return 1===o?a=e:1===i&&o>20?a=t:i>1&&i<5&&(o>20||o<10)&&(a=n),a}var r=n.bind(null,"секунду","%s секунду","%s секунды","%s секунд"),o=n.bind(null,"минуту","%s минуту","%s минуты","%s минут"),i=n.bind(null,"час","%s час","%s часа","%s часов"),a=n.bind(null,"день","%s день","%s дня","%s дней"),s=n.bind(null,"неделю","%s неделю","%s недели","%s недель"),l=n.bind(null,"месяц","%s месяц","%s месяца","%s месяцев"),u=n.bind(null,"год","%s год","%s года","%s лет");t.A=function(e,t){switch(t){case 0:return["только что","через несколько секунд"];case 1:return[r(e)+" назад","через "+r(e)];case 2:case 3:return[o(e)+" назад","через "+o(e)];case 4:case 5:return[i(e)+" назад","через "+i(e)];case 6:return["вчера","завтра"];case 7:return[a(e)+" назад","через "+a(e)];case 8:case 9:return[s(e)+" назад","через "+s(e)];case 10:case 11:return[l(e)+" назад","через "+l(e)];case 12:case 13:return[u(e)+" назад","через "+u(e)];default:return["",""]}}},6748(e,t,n){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)}var o=n(1742),i=n(5773),a=n(863),s=function(e){i(!1,e)},l=String.prototype.replace,u=String.prototype.split,c="||||",p=function(e){var t=e%100,n=t%10;return 11!==t&&1===n?0:2<=n&&n<=4&&!(t>=12&&t<=14)?1:2},f={pluralTypes:{arabic:function(e){if(e<3)return e;var t=e%100;return t>=3&&t<=10?3:t>=11?4:5},bosnian_serbian:p,chinese:function(){return 0},croatian:p,french:function(e){return e>=2?1:0},german:function(e){return 1!==e?1:0},russian:p,lithuanian:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?1:2},czech:function(e){return 1===e?0:e>=2&&e<=4?1:2},polish:function(e){if(1===e)return 0;var t=e%10;return 2<=t&&t<=4&&(e%100<10||e%100>=20)?1:2},icelandic:function(e){return e%10!=1||e%100==11?1:0},slovenian:function(e){var t=e%100;return 1===t?0:2===t?1:3===t||4===t?2:3},romanian:function(e){if(1===e)return 0;var t=e%100;return 0===e||t>=2&&t<=19?1:2},ukrainian:p},pluralTypeToLanguages:{arabic:["ar"],bosnian_serbian:["bs-Latn-BA","bs-Cyrl-BA","srl-RS","sr-RS"],chinese:["id","id-ID","ja","ko","ko-KR","lo","ms","th","th-TH","zh"],croatian:["hr","hr-HR"],german:["fa","da","de","en","es","fi","el","he","hi-IN","hu","hu-HU","it","nl","no","pt","sv","tr"],french:["fr","tl","pt-br"],russian:["ru","ru-RU"],lithuanian:["lt"],czech:["cs","cs-CZ","sk"],polish:["pl"],icelandic:["is","mk"],slovenian:["sl-SL"],romanian:["ro"],ukrainian:["uk","ua"]}};function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var h,m=(h={},function(e,t){var n,r,i=h[t];return i&&!e.pluralTypes[i]&&(i=null,h[t]=i),i||(n=t,(i=(r=function(e){for(var t={},n=o(e),r=0;r<n.length;r+=1)for(var i=n[r][0],a=n[r][1],s=0;s<a.length;s+=1)t[a[s]]=i;return t}(e.pluralTypeToLanguages))[n]||r[u.call(n,/-/,1)[0]]||r.en)&&(h[t]=i)),i}),y=/%\{(.*?)\}/g;function b(e,t,n,r,o,i){if("string"!=typeof e)throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string");if(null==t)return e;var s,p,d,h=e,b=r||y,g=i||l,v="number"==typeof t?{smart_count:t}:t;if(null!=v.smart_count&&e){var w=o||f,A=u.call(e,c),S=(s=w,p=m(w,n||"en"),d=v.smart_count,s.pluralTypes[p](d));h=l.call(A[S]||A[0],/^[^\S]*|[^\S]*$/g,"")}return g.call(h,b,function(e,t){return a(v,t)&&null!=v[t]?v[t]:e})}function g(e){var t=e||{};this.phrases={},this.extend(t.phrases||{}),this.currentLocale=t.locale||"en";var n=t.allowMissing?b:null;this.onMissingKey="function"==typeof t.onMissingKey?t.onMissingKey:n,this.warn=t.warn||s,this.replaceImplementation=t.replace||l,this.tokenRegex=function(e){var t=e&&e.prefix||"%{",n=e&&e.suffix||"}";if(t===c||n===c)throw new RangeError('"||||" token is reserved for pluralization');return new RegExp(d(t)+"(.*?)"+d(n),"g")}(t.interpolation),this.pluralRules=t.pluralRules||f}g.prototype.locale=function(e){return e&&(this.currentLocale=e),this.currentLocale},g.prototype.extend=function(e,t){for(var n=o(e||{}),i=0;i<n.length;i+=1){var a=n[i][0],s=n[i][1],l=t?t+"."+a:a;"object"===r(s)?this.extend(s,l):this.phrases[l]=s}},g.prototype.unset=function(e,t){if("string"==typeof e)delete this.phrases[e];else for(var n=o(e||{}),i=0;i<n.length;i+=1){var a=n[i][0],s=n[i][1],l=t?t+"."+a:a;"object"===r(s)?this.unset(s,l):delete this.phrases[l]}},g.prototype.clear=function(){this.phrases={}},g.prototype.replace=function(e){this.clear(),this.extend(e)},g.prototype.t=function(e,t){var n,r,o=null==t?{}:t;return"string"==typeof this.phrases[e]?n=this.phrases[e]:"string"==typeof o._?n=o._:this.onMissingKey?r=(0,this.onMissingKey)(e,o,this.currentLocale,this.tokenRegex,this.pluralRules,this.replaceImplementation):(this.warn('Missing translation for key: "'+e+'"'),r=e),"string"==typeof n&&(r=b(n,o,this.currentLocale,this.tokenRegex,this.pluralRules,this.replaceImplementation)),r},g.prototype.has=function(e){return a(this.phrases,e)},g.transformPhrase=function(e,t,n){return b(e,t,n)},e.exports=g},6763(e,t){var n=["秒","分钟","小时","天","周","个月","年"];t.A=function(e,t){if(0===t)return["刚刚","片刻后"];var r=n[~~(t/2)];return[e+" "+r+"前",e+" "+r+"后"]}},7047(e){e.exports=URIError},7052(e){e.exports=Function.prototype.apply},7154(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t},7295(e,t,n){var r,o,i;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)}i=function(){function e(e,r,o,i,a){!function e(n,r,o,i,a){for(;i>o;){if(i-o>600){var s=i-o+1,l=r-o+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(n,r,Math.max(o,Math.floor(r-l*c/s+p)),Math.min(i,Math.floor(r+(s-l)*c/s+p)),a)}var f=n[r],d=o,h=i;for(t(n,o,r),a(n[i],f)>0&&t(n,o,i);d<h;){for(t(n,d,h),d++,h--;a(n[d],f)<0;)d++;for(;a(n[h],f)>0;)h--}0===a(n[o],f)?t(n,o,h):t(n,++h,i),h<=r&&(o=h+1),r<=h&&(i=h-1)}}(e,r,o||0,i||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function i(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,o){o||(o=h(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var i=t;i<n;i++){var a=e.children[i];s(o,e.leaf?r(a):a)}return o}function s(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function d(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function h(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(t,n,r,o,i){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=o)){var s=n+Math.ceil((r-n)/o/2)*o;e(t,s,n,r,i),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!d(e,t))return n;for(var r=this.toBBox,o=[];t;){for(var i=0;i<t.children.length;i++){var a=t.children[i],s=t.leaf?r(a):a;d(e,s)&&(t.leaf?n.push(a):f(e,s)?this._all(a,n):o.push(a))}t=o.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!d(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var o=t.children[r],i=t.leaf?this.toBBox(o):o;if(d(e,i)){if(t.leaf||f(e,i))return!0;n.push(o)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=h([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,i,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),r=l[l.length-1],n=u.pop(),i=!0),a.leaf){var c=o(e,a.children,t);if(-1!==c)return a.children.splice(c,1),l.push(a),this._condense(l),this}i||a.leaf||!f(a,s)?r?(n++,a=r.children[n],i=!1):a=null:(l.push(a),u.push(n),n=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},r.prototype._build=function(e,t,n,r){var o,a=n-t+1,s=this._maxEntries;if(a<=s)return i(o=h(e.slice(t,n+1)),this.toBBox),o;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(o=h([])).leaf=!1,o.height=r;var l=Math.ceil(a/s),u=l*Math.ceil(Math.sqrt(s));m(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var p=Math.min(c+u-1,n);m(e,c,p,l,this.compareMinY);for(var f=c;f<=p;f+=l){var d=Math.min(f+l-1,p);o.children.push(this._build(e,f,d,r-1))}}return i(o,this.toBBox),o},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var o=1/0,i=1/0,a=void 0,s=0;s<t.children.length;s++){var l=t.children[s],u=c(l),p=(f=e,d=l,(Math.max(d.maxX,f.maxX)-Math.min(d.minX,f.minX))*(Math.max(d.maxY,f.maxY)-Math.min(d.minY,f.minY))-u);p<i?(i=p,o=u<o?u:o,a=l):p===i&&u<o&&(o=u,a=l)}t=a||t.children[0]}var f,d;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),o=[],i=this._chooseSubtree(r,this.data,t,o);for(i.children.push(e),s(i,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);var a=this._chooseSplitIndex(n,o,r),s=h(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,i(n,this.toBBox),i(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(e,t){this.data=h([e,t]),this.data.height=e.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,o,i,s,l,u,p,f=1/0,d=1/0,h=t;h<=n-t;h++){var m=a(e,0,h,this.toBBox),y=a(e,h,n,this.toBBox),b=(o=m,i=y,s=Math.max(o.minX,i.minX),l=Math.max(o.minY,i.minY),u=Math.min(o.maxX,i.maxX),p=Math.min(o.maxY,i.maxY),Math.max(0,u-s)*Math.max(0,p-l)),g=c(m)+c(y);b<f?(f=b,r=h,d=g<d?g:d):b===f&&g<d&&(d=g,r=h)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:l,o=e.leaf?this.compareMinY:u;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,o)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var o=this.toBBox,i=a(e,0,t,o),l=a(e,n-t,n,o),u=p(i)+p(l),c=t;c<n-t;c++){var f=e.children[c];s(i,e.leaf?o(f):f),u+=p(i)}for(var d=n-t-1;d>=t;d--){var h=e.children[d];s(l,e.leaf?o(h):h),u+=p(l)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)s(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():i(e[t],this.toBBox)},r},"object"==a(t)?e.exports=i():void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o)},7405(e,t,n){var r=n(5197);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,a=document.createElement(i);a.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&a.setAttribute("rows","1");var s=r(e,"font-size");a.style.fontSize=s,a.style.padding="0px",a.style.border="0px";var l=document.body;l.appendChild(a),n=a.offsetHeight,l.removeChild(a)}return n}},7463(e,t){t.A=function(e,t){return[["recent","binnenkort"],["%s seconden geleden","binnen %s seconden"],["1 minuut geleden","binnen 1 minuut"],["%s minuten geleden","binnen %s minuten"],["1 uur geleden","binnen 1 uur"],["%s uur geleden","binnen %s uur"],["1 dag geleden","binnen 1 dag"],["%s dagen geleden","binnen %s dagen"],["1 week geleden","binnen 1 week"],["%s weken geleden","binnen %s weken"],["1 maand geleden","binnen 1 maand"],["%s maanden geleden","binnen %s maanden"],["1 jaar geleden","binnen 1 jaar"],["%s jaar geleden","binnen %s jaar"]][t]}},7548(e){e.exports=Math.round},7858(e,t){var n;void 0===(n=function(e,t){var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(u){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function a(e){var t=o.get(e);t&&t.destroy()}function s(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!o.has(t)){var n=null,r=null,a=null,s=function(){t.clientWidth!==r&&f()},l=function(e){window.removeEventListener("resize",s,!1),t.removeEventListener("input",f,!1),t.removeEventListener("keyup",f,!1),t.removeEventListener("autosize:destroy",l,!1),t.removeEventListener("autosize:update",f,!1),Object.keys(e).forEach(function(n){t.style[n]=e[n]}),o.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",f,!1),window.addEventListener("resize",s,!1),t.addEventListener("input",f,!1),t.addEventListener("autosize:update",f,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",o.set(t,{destroy:l,update:f}),"vertical"===(u=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===u.resize&&(t.style.resize="horizontal"),n="content-box"===u.boxSizing?-(parseFloat(u.paddingTop)+parseFloat(u.paddingBottom)):parseFloat(u.borderTopWidth)+parseFloat(u.borderBottomWidth),isNaN(n)&&(n=0),f()}var u;function c(e){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,t.style.overflowY=e}function p(){if(0!==t.scrollHeight){var e=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",r=t.clientWidth,e.forEach(function(e){e.node.scrollTop=e.scrollTop}),o&&(document.documentElement.scrollTop=o)}}function f(){p();var n=Math.round(parseFloat(t.style.height)),r=window.getComputedStyle(t,null),o="content-box"===r.boxSizing?Math.round(parseFloat(r.height)):t.offsetHeight;if(o<n?"hidden"===r.overflowY&&(c("scroll"),p(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==r.overflowY&&(c("hidden"),p(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),a!==o){a=o;var s=i("autosize:resized");try{t.dispatchEvent(s)}catch(e){}}}}(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=l,e.exports=t.default}.apply(t,[e,t]))||(e.exports=n)},8087(e,t,n){var r=n(9990);e.exports=function(){return"function"==typeof Object.entries?Object.entries:r}},8202(t){t.exports=e},8299(e,t,n){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)}var o,i=n(9142),a=n(157),s=n(15),l=n(2104),u=n(6076),c=n(1226),p=n(1953),f=n(7047),d=n(4940),h=n(4218),m=n(9406),y=n(8624),b=n(6114),g=n(7548),v=n(9063),w=Function,A=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(t){}},S=n(3581),O=n(5049),E=function(){throw new p},x=S?function(){try{return E}catch(e){try{return S(arguments,"callee").get}catch(t){return E}}}():E,C=n(377)(),M=n(5586),j=n(9302),P=n(1622),I=n(7052),k=n(5118),T={},D="undefined"!=typeof Uint8Array&&M?M(Uint8Array):o,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?o:ArrayBuffer,"%ArrayIteratorPrototype%":C&&M?M([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":"undefined"==typeof Atomics?o:Atomics,"%BigInt%":"undefined"==typeof BigInt?o:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?o:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?o:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?o:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?o:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?o:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":T,"%Int8Array%":"undefined"==typeof Int8Array?o:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?o:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&M?M(M([][Symbol.iterator]())):o,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":r(JSON))?JSON:o,"%Map%":"undefined"==typeof Map?o:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&C&&M?M((new Map)[Symbol.iterator]()):o,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?o:Promise,"%Proxy%":"undefined"==typeof Proxy?o:Proxy,"%RangeError%":l,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?o:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?o:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&C&&M?M((new Set)[Symbol.iterator]()):o,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&M?M(""[Symbol.iterator]()):o,"%Symbol%":C?Symbol:o,"%SyntaxError%":c,"%ThrowTypeError%":x,"%TypedArray%":D,"%TypeError%":p,"%Uint8Array%":"undefined"==typeof Uint8Array?o:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?o:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?o:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?o:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?o:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?o:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?o:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":I,"%Object.defineProperty%":O,"%Object.getPrototypeOf%":j,"%Math.abs%":d,"%Math.floor%":h,"%Math.max%":m,"%Math.min%":y,"%Math.pow%":b,"%Math.round%":g,"%Math.sign%":v,"%Reflect.getPrototypeOf%":P};if(M)try{null.error}catch(W){var N=M(M(W));R["%Error.prototype%"]=N}var L=function e(t){var n;if("%AsyncFunction%"===t)n=A("async function () {}");else if("%GeneratorFunction%"===t)n=A("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=A("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&M&&(n=M(o.prototype))}return R[t]=n,n},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_=n(5465),G=n(863),H=_.call(k,Array.prototype.concat),F=_.call(I,Array.prototype.splice),U=_.call(k,String.prototype.replace),z=_.call(k,String.prototype.slice),Y=_.call(k,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,J=function(e,t){var n,r=e;if(G(B,r)&&(r="%"+(n=B[r])[0]+"%"),G(R,r)){var o=R[r];if(o===T&&(o=L(r)),void 0===o&&!t)throw new p("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new p('"allowMissing" argument must be a boolean');if(null===Y(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=z(e,0,1),n=z(e,-1);if("%"===t&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return U(e,V,function(e,t,n,o){r[r.length]=n?U(o,Q,"$1"):t||e}),r}(e),r=n.length>0?n[0]:"",o=J("%"+r+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(r=l[0],F(n,H([0,1],l)));for(var u=1,f=!0;u<n.length;u+=1){var d=n[u],h=z(d,0,1),m=z(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===m||"'"===m||"`"===m)&&h!==m)throw new c("property names with quotes must have matching quotes");if("constructor"!==d&&f||(s=!0),G(R,i="%"+(r+="."+d)+"%"))a=R[i];else if(null!=a){if(!(d in a)){if(!t)throw new p("base intrinsic for "+e+" exists, but the property is not available.");return}if(S&&u+1>=n.length){var y=S(a,d);a=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[d]}else f=G(a,d),a=a[d];f&&!s&&(R[i]=a)}}return a}},8474(e){function t(e){return(t="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 n(e){var r,o,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==t(e))if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(o=n(e[r]))&&(i&&(i+=" "),i+=o)}else for(o in e)e[o]&&(i&&(i+=" "),i+=o);return i}function r(){for(var e,t,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=n(e))&&(o&&(o+=" "),o+=t);return o}e.exports=r,e.exports.clsx=r},8624(e){e.exports=Math.min},8643(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8813(e,t,n){var r=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];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 i(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){a(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 a(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}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,u(r.key),r)}}function u(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function c(e,t,n){return t=f(t),function(e,t){if(t&&("object"==h(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)}(e,p()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!e})()}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}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)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return S.default}}),t.default=void 0;var m=function(e){if("function"==typeof WeakMap)var t=new WeakMap;return function(e){if(e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=h(e)&&"function"!=typeof e)return o;if(n=t){if(n.has(e))return n.get(e);n.set(e,o)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?n(o,i,r):o[i]=e[i]);return o}(e)}(n(6512)),y=E(n(5762)),b=E(n(6512)),g=n(8474),v=n(2503),w=n(6500),A=n(658),S=E(n(5086)),O=E(n(1026));function E(e){return e&&e.__esModule?e:{default:e}}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(null,arguments)}function C(e,t,n){return r=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==h(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var M=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),C(n=c(this,t,[e]),"onDragStart",function(e,t){if((0,O.default)("Draggable: onDragStart: %j",t),!1===n.props.onStart(e,(0,w.createDraggableData)(n,t)))return!1;n.setState({dragging:!0,dragged:!0})}),C(n,"onDrag",function(e,t){if(!n.state.dragging)return!1;(0,O.default)("Draggable: onDrag: %j",t);var r,o=(0,w.createDraggableData)(n,t),i={x:o.x,y:o.y,slackX:0,slackY:0};if(n.props.bounds){var a=i.x,l=i.y;i.x+=n.state.slackX,i.y+=n.state.slackY;var u=function(e){if(Array.isArray(e))return e}(r=(0,w.getBoundPosition)(n,i.x,i.y))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(r)||function(e){if(e){if("string"==typeof e)return s(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(e,2):void 0}}(r)||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.")}(),c=u[0],p=u[1];i.x=c,i.y=p,i.slackX=n.state.slackX+(a-i.x),i.slackY=n.state.slackY+(l-i.y),o.x=i.x,o.y=i.y,o.deltaX=i.x-n.state.x,o.deltaY=i.y-n.state.y}if(!1===n.props.onDrag(e,o))return!1;n.setState(i)}),C(n,"onDragStop",function(e,t){if(!n.state.dragging)return!1;if(!1===n.props.onStop(e,(0,w.createDraggableData)(n,t)))return!1;(0,O.default)("Draggable: onDragStop: %j",t);var r={dragging:!1,slackX:0,slackY:0};if(Boolean(n.props.position)){var o=n.props.position,i=o.x,a=o.y;r.x=i,r.y=a}n.setState(r)}),n.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:i({},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."),n}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,u=[{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,O.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:i({},n)})}}],(o=[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.state.dragging&&this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:b.default.findDOMNode(this)}},{key:"render",value:function(){var e=this.props,t=(e.axis,e.bounds,e.children),n=e.defaultPosition,o=e.defaultClassName,s=e.defaultClassNameDragging,l=e.defaultClassNameDragged,u=e.position,c=e.positionOffset,p=(e.scale,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,r)),f={},d=null,h=!Boolean(u)||this.state.dragging,y=u||n,b={x:(0,w.canDragX)(this)&&h?this.state.x:y.x,y:(0,w.canDragY)(this)&&h?this.state.y:y.y};this.state.isElementSVG?d=(0,v.createSVGTransform)(b,c):f=(0,v.createCSSTransform)(b,c);var A=(0,g.clsx)(t.props.className||"",o,a(a({},s,this.state.dragging),l,this.state.dragged));return m.createElement(S.default,x({},p,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),m.cloneElement(m.Children.only(t),{className:A,style:i(i({},t.props.style),f),transform:d}))}}])&&l(n.prototype,o),u&&l(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,u}(m.Component);t.default=M,C(M,"displayName","Draggable"),C(M,"propTypes",i(i({},S.default.propTypes),{},{axis:y.default.oneOf(["both","x","y","none"]),bounds:y.default.oneOfType([y.default.shape({left:y.default.number,right:y.default.number,top:y.default.number,bottom:y.default.number}),y.default.string,y.default.oneOf([!1])]),defaultClassName:y.default.string,defaultClassNameDragging:y.default.string,defaultClassNameDragged:y.default.string,defaultPosition:y.default.shape({x:y.default.number,y:y.default.number}),positionOffset:y.default.shape({x:y.default.oneOfType([y.default.number,y.default.string]),y:y.default.oneOfType([y.default.number,y.default.string])}),position:y.default.shape({x:y.default.number,y:y.default.number}),className:A.dontSetMe,style:A.dontSetMe,transform:A.dontSetMe})),C(M,"defaultProps",i(i({},S.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},8950(e,t,n){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)}var o,i=n(9472),a=n(3581);try{o=[].__proto__===Array.prototype}catch(c){if(!c||"object"!==r(c)||!("code"in c)||"ERR_PROTO_ACCESS"!==c.code)throw c}var s=!!o&&a&&a(Object.prototype,"__proto__"),l=Object,u=l.getPrototypeOf;e.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof u&&function(e){return u(null==e?e:l(e))}},8953(e,t,n){var r=n(5887),o=n(5049),i=n(9472),a=n(1851);e.exports=function(e){var t=i(arguments),n=e.length-(arguments.length-1);return r(t,1+(n>0?n:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},9032(e,t){t.A=function(e,t){return[["agora mesmo","agora"],["há %s segundos","em %s segundos"],["há um minuto","em um minuto"],["há %s minutos","em %s minutos"],["há uma hora","em uma hora"],["há %s horas","em %s horas"],["há um dia","em um dia"],["há %s dias","em %s dias"],["há uma semana","em uma semana"],["há %s semanas","em %s semanas"],["há um mês","em um mês"],["há %s meses","em %s meses"],["há um ano","em um ano"],["há %s anos","em %s anos"]][t]}},9063(e,t,n){var r=n(6681);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},9142(e){e.exports=Object},9267(e){function t(e){return(t="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)}var n=Object.prototype.toString;e.exports=function(e){var r=n.call(e),o="[object Arguments]"===r;return o||(o="[object Array]"!==r&&null!==e&&"object"===t(e)&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===n.call(e.callee)),o}},9268(e,t,n){var r=n(830);t.A=r.TextareaAutosize},9302(e,t,n){var r=n(9142);e.exports=r.getPrototypeOf||null},9406(e){e.exports=Math.max},9472(e,t,n){var r=n(5465),o=n(1953),i=n(5118),a=n(1978);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(r,i,e)}},9874(e,t){t.A=function(e,t){return[["xusto agora","daquí a un pouco"],["hai %s segundos","en %s segundos"],["hai 1 minuto","nun minuto"],["hai %s minutos","en %s minutos"],["hai 1 hora","nunha hora"],["hai %s horas","en %s horas"],["hai 1 día","nun día"],["hai %s días","en %s días"],["hai 1 semana","nunha semana"],["hai %s semanas","en %s semanas"],["hai 1 mes","nun mes"],["hai %s meses","en %s meses"],["hai 1 ano","nun ano"],["hai %s anos","en %s anos"]][t]}},9990(e,t,n){var r=n(98),o=n(3190),i=o("Object.prototype.propertyIsEnumerable"),a=o("Array.prototype.push");e.exports=function(e){var t=r(e),n=[];for(var o in t)i(t,o)&&a(n,[o,t[o]]);return n}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{r.d(o,{default:()=>ed});var e=r(6512),t=r(7154),n=r.n(t),i=r(3424),a=r.n(i),s=["second","minute","hour","day","week","month","year"],l=["秒","分钟","小时","天","周","个月","年"],u={},c=function(e,t){u[e]=t},p=function(e){return u[e]||u.en_US},f=[60,60,24,7,365/7/12,12];function d(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function h(e,t){for(var n=e<0?1:0,r=e=Math.abs(e),o=0;e>=f[o]&&o<f.length;o++)e/=f[o];return(e=Math.floor(e))>(0==(o*=2)?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function m(e,t){return(+(t?d(t):new Date)-+d(e))/1e3}var y="timeago-id";function b(e){return parseInt(e.getAttribute(y))}var g={},v=function(e){clearTimeout(e),delete g[e]};function w(e,t,n,r){v(b(e));var o=r.relativeDate,i=r.minInterval,a=m(t,o);e.innerText=h(a,n);var s,l=setTimeout(function(){w(e,t,n,r)},Math.min(1e3*Math.max(function(e){for(var t=1,n=0,r=Math.abs(e);e>=f[n]&&n<f.length;n++)e/=f[n],t*=f[n];return r=(r%=t)?t-r:t,Math.ceil(r)}(a),i||1),2147483647));g[l]=0,s=l,e.setAttribute(y,s)}function A(e){e?v(b(e)):Object.keys(g).forEach(v)}c("en_US",function(e,t){if(0===t)return["just now","right now"];var n=s[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}),c("zh_CN",function(e,t){if(0===t)return["刚刚","片刻后"];var n=l[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]});var S,O=(S=function(e,t){return(S=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){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),E=function(){return E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},E.apply(this,arguments)},x=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.dom=null,e}return O(n,t),n.prototype.componentDidMount=function(){this.renderTimeAgo()},n.prototype.componentDidUpdate=function(){this.renderTimeAgo()},n.prototype.renderTimeAgo=function(){var e,t,n,r,o=this.props,i=o.live,a=o.datetime,s=o.locale,l=o.opts;A(this.dom),!1!==i&&(this.dom.setAttribute("datetime",""+((e=a)instanceof Date?e.getTime():e)),t=this.dom,n=s,r=l,(t.length?t:[t]).forEach(function(e){w(e,e.getAttribute("datetime"),p(n),r||{})}))},n.prototype.componentWillUnmount=function(){A(this.dom)},n.prototype.render=function(){var t,n,r=this,o=this.props,i=o.datetime,a=(o.live,o.locale),s=o.opts,l=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(o,["datetime","live","locale","opts"]);return e.createElement("time",E({ref:function(e){r.dom=e}},l),(t=a,h(m(i,(n=s)&&n.relativeDate),p(t))))},n.defaultProps={live:!0,className:""},n}(e.PureComponent);const C=x;var M=r(6748),j=r.n(M);const P=JSON.parse('{"Add a comment...":"إضافة تعليق","Add a reply...":"إضافة رد","Add tag...":"إضافة علامة","Cancel":"إلغاء","Close":"إغلاق","Edit":"Edit","Delete":"Delete","Ok":"تم"}'),I=JSON.parse('{"Add a comment...":"Napsat komentář...","Add a reply...":"Odpovědět...","Add tag...":"Přidat štítek...","Cancel":"Zrušit","Close":"Zavřít","Edit":"Upravit","Delete":"Smazat","Ok":"Ok"}'),k=JSON.parse('{"Add a comment...":"Kommentar schreiben...","Add a reply...":"Antwort schreiben...","Add tag...":"Tag...","Cancel":"Abbrechen","Close":"Schliessen","Edit":"Bearbeiten","Delete":"Löschen","Ok":"Ok"}'),T=JSON.parse('{"Add a comment...":"Σχολίασε...","Add a reply...":"Απάντησε...","Add tag...":"Πρόσθεσε tag...","Cancel":"Άκυρο","Close":"Κλείσιμο","Edit":"Επεξεργασία","Delete":"Διαγραφή","Ok":"Ok"}'),D=JSON.parse('{"Add a comment...":"Agregar un comentario...","Add a reply...":"Agregar una respuesta...","Add tag...":"Etiquetar...","Cancel":"Cancelar","Close":"Cerrar","Edit":"Editar","Delete":"Eliminar","Ok":"Ok"}'),R=JSON.parse('{"Add a comment...":"Lisää kommentti","Add a reply...":"Lisää vastaus","Add tag...":"Lisää tunniste","Cancel":"Peruuta","Close":"Sulje","Edit":"Muokkaa","Delete":"Poista","Ok":"Ok"}'),N=JSON.parse('{"Add a comment...":"Ajouter un commentaire...","Add a reply...":"Ajouter une réponse...","Add tag...":"Ajouter une étiquette...","Cancel":"Annuler","Close":"Fermer","Edit":"Éditer","Delete":"Supprimer","Ok":"Ok"}'),L=JSON.parse('{"Add a comment...":"Engadir un comentario...","Add a reply...":"Engadir unha resposta...","Add tag...":"Etiquetar...","Cancel":"Cancelar","Close":"Pechar","Edit":"Edit","Delete":"Delete","Ok":"Ok"}'),B=JSON.parse('{"Add a comment...":"टिप्पणी जोड़ें","Add a reply...":"जवाब दें","Add tag...":"टैग लगाएँ","Cancel":"रद्द करें","Close":"बंद करें","Edit":"संपादित करें","Delete":"हटाएँ","Ok":"ठीक है"}'),_=JSON.parse('{"Add a comment...":"Commenta...","Add a reply...":"Rispondi...","Add tag...":"Aggiungi tag...","Cancel":"Annulla","Close":"Chiudi","Edit":"Edit","Delete":"Delete","Ok":"Ok"}'),G=JSON.parse('{"Add a comment...":"コメントを追加する...","Add a reply...":"返信する...","Add tag...":"タグを追加する...","Cancel":"キャンセル","Close":"閉じる","Edit":"編集","Delete":"削除","Ok":"Ok"}'),H=JSON.parse('{"Add a comment...":"댓글 추가","Add a reply...":"답글 추가","Add tag...":"태그 추가","Cancel":"취소","Close":"닫기","Edit":"수정","Delete":"삭제","Ok":"확인"}'),F=JSON.parse('{"Add a comment...":"Commentaar toevoegen...","Add a reply...":"Antwoord toevoegen...","Add tag...":"Tag toevoegen...","Cancel":"Afbreken","Close":"Sluiten","Edit":"Bewerken","Delete":"Verwijderen","Ok":"Ok"}'),U=JSON.parse('{"Add a comment...":"Adicionar um comentário...","Add a reply...":"Adicionar uma resposta...","Add tag...":"Etiquetar...","Cancel":"Cancelar","Close":"Fechar","Edit":"Editar","Delete":"Apagar","Ok":"Ok"}'),z=JSON.parse('{"Add a comment...":"Добавить комментарий...","Add a reply...":"Добавить ответ...","Add tag...":"Добавить тэг...","Cancel":"Отмена","Close":"Закрыть","Edit":"Редактировать","Delete":"Удалить","Ok":"Ок"}'),Y=JSON.parse('{"Add a comment...":"Skriv en kommentar...","Add a reply...":"Skriv ett svar...","Add tag...":"Tagg...","Cancel":"Cancel","Close":"Stäng","Edit":"Edit","Delete":"Delete","Ok":"Ok"}'),V=JSON.parse('{"Add a comment...":"เพิ่มคอมเมนต์...","Add a reply...":"ตอบกลับ...","Add tag...":"เพิ่มแท็ก...","Cancel":"ยกเลิก","Close":"ปิด","Edit":"แก้ไข","Delete":"ลบ","Ok":"ตกลง"}'),Q=JSON.parse('{"Add a comment...":"Yorum ekle...","Add a reply...":"Cevap ekle...","Add tag...":"Tag Ekle...","Cancel":"İptal","Close":"Kapat","Edit":"Düzenle","Delete":"Sil","Ok":"Tamam"}'),J=JSON.parse('{"Add a comment...":"تبصرہ کریں","Add a reply...":"جواب دیں","Add tag...":"ٹیگ لگائیں","Cancel":"منسوخ کریں","Close":"بند کریں","Edit":"ترمیم کریں","Delete":"ہٹائیں","Ok":"ٹھیک ہے"}'),W=JSON.parse('{"Add a comment...":"添加注释...","Add a reply...":"添加回复...","Add tag...":"标签...","Cancel":"取消","Close":"关闭","Edit":"编辑","Delete":"删除","Ok":"确认"}'),Z=JSON.parse('{"Add a comment...":"添加评论...","Add a reply...":"添加回复...","Add tag...":"添加标签...","Cancel":"取消","Close":"关闭","Edit":"编辑","Delete":"删除","Ok":"确认"}'),X=JSON.parse('{"Add a comment...":"添加評論...","Add a reply...":"添加回覆...","Add tag...":"添加標籤...","Cancel":"取消","Close":"關閉","Edit":"編輯","Delete":"刪除","Ok":"確認"}');var K=r(5690),q=r(223),$=r(4038),ee=r(688),te=r(973),ne=r(6436),re=r(309),oe=r(9874),ie=r(5810),ae=r(3940),se=r(4688),le=r(2411),ue=r(7463),ce=r(9032),pe=r(6740),fe=r(404),de=r(5617),he=r(3847),me=r(6763),ye=r(5419);function be(e){return(be="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 ge(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 ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach(function(t){we(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function we(e,t,n){return r=function(e){if("object"!=be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==be(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var Ae={ar:P,cs:I,de:k,el:T,es:D,fi:R,fr:N,gl:L,hi:B,it:_,ja:G,ko:H,nl:F,pt:U,ru:z,sv:Y,th:V,tr:Q,ur:J,zh:W,"zh-CN":Z,"zh-TW":X},Se=Object.keys(Ae),Oe=new(j())({allowMissing:!0});Oe.init=function(e,t){Oe.clear(),e&&(Oe.locale(e),Oe.extend(Ae[e])),t&&Oe.extend(t)},c("ar",K.A),c("cs",q.A),c("de",$.A),c("el",ee.A),c("es",te.A),c("fi",ne.A),c("fr",re.A),c("gl",oe.A),c("hi",ie.A),c("it",ae.A),c("ja",se.A),c("ko",le.A),c("nl",ue.A),c("pt",ce.A),c("ru",pe.A),c("sv",fe.A),c("th",de.A),c("tr",he.A),c("zh",me.A),c("zh-CN",me.A),c("zh-TW",ye.A),Oe.registerMessages=function(e,t){Ae[e]?Ae[e]=ve(ve({},Ae[e]),t):Ae[e]=t};const Ee=Oe,xe=function(t){var n,r,o=(0,e.useRef)();return n=o,r=function(e){n.current&&!n.current.contains(event.target)&&t.onClickOutside()},(0,e.useEffect)(function(){return document.addEventListener("mousedown",r),function(){return document.removeEventListener("mousedown",r)}}),e.default.createElement("ul",{ref:o,className:"r6o-comment-dropdown-menu"},e.default.createElement("li",{onClick:t.onEdit},Ee.t("Edit")),e.default.createElement("li",{onClick:t.onDelete},Ee.t("Delete")))};var Ce=r(9268);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 je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(je=function(){return!!e})()}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ie(e,t){return(Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ke(e,t,n){return(t=Te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Te(e){var t=function(e){if("object"!=Me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Me(t)?t:t+""}var De=function(t){function n(t){var r,o,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),ke((o=this,a=[t],i=Pe(i=n),r=function(e,t){if(t&&("object"==Me(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)}(o,je()?Reflect.construct(i,a||[],Pe(o).constructor):i.apply(o,a))),"onKeyDown",function(e){13===e.which&&e.ctrlKey&&r.props.onSaveAndClose()}),ke(r,"onKeyUp",function(e){46===e.which&&e.stopPropagation()}),r.element=(0,e.createRef)(),r}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ie(e,t)}(n,t),r=n,(o=[{key:"componentDidMount",value:function(){this.props.focus&&this.element.current&&this.element.current.focus({preventScroll:!0})}},{key:"render",value:function(){return e.default.createElement(Ce.A,{ref:this.element,className:"r6o-editable-text",value:this.props.content,placeholder:this.props.placeholder||Ee.t("Add a comment..."),disabled:!this.props.editable,onChange:this.props.onChange,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown})}}])&&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,Te(r.key),r)}}(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(e.Component);function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Re.apply(null,arguments)}var Ne=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){var t,n;this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag((t=this,(n=document.createElement("style")).setAttribute("data-emotion",t.key),void 0!==t.nonce&&n.setAttribute("nonce",t.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{o.insertRule(e,o.cssRules.length)}catch(t){}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Le=Math.abs,Be=String.fromCharCode,_e=Object.assign;function Ge(e){return e.trim()}function He(e,t,n){return e.replace(t,n)}function Fe(e,t){return e.indexOf(t)}function Ue(e,t){return 0|e.charCodeAt(t)}function ze(e,t,n){return e.slice(t,n)}function Ye(e){return e.length}function Ve(e){return e.length}function Qe(e,t){return t.push(e),e}var Je=1,We=1,Ze=0,Xe=0,Ke=0,qe="";function $e(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Je,column:We,length:a,return:""}}function et(e,t){return _e($e("",null,null,"",null,null,0),e,{length:-e.length},t)}function tt(){return Ke=Xe>0?Ue(qe,--Xe):0,We--,10===Ke&&(We=1,Je--),Ke}function nt(){return Ke=Xe<Ze?Ue(qe,Xe++):0,We++,10===Ke&&(We=1,Je++),Ke}function rt(){return Ue(qe,Xe)}function ot(){return Xe}function it(e,t){return ze(qe,e,t)}function at(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function st(e){return Je=We=1,Ze=Ye(qe=e),Xe=0,[]}function lt(e){return qe="",e}function ut(e){return Ge(it(Xe-1,ft(91===e?e+2:40===e?e+1:e)))}function ct(e){for(;(Ke=rt())&&Ke<33;)nt();return at(e)>2||at(Ke)>3?"":" "}function pt(e,t){for(;--t&&nt()&&!(Ke<48||Ke>102||Ke>57&&Ke<65||Ke>70&&Ke<97););return it(e,ot()+(t<6&&32==rt()&&32==nt()))}function ft(e){for(;nt();)switch(Ke){case e:return Xe;case 34:case 39:34!==e&&39!==e&&ft(Ke);break;case 40:41===e&&ft(e);break;case 92:nt()}return Xe}function dt(e,t){for(;nt()&&e+Ke!==57&&(e+Ke!==84||47!==rt()););return"/*"+it(t,Xe-1)+"*"+Be(47===e?e:nt())}function ht(e){for(;!at(rt());)nt();return it(e,Xe)}var mt="-ms-",yt="-moz-",bt="-webkit-",gt="comm",vt="rule",wt="decl",At="@keyframes";function St(e,t){for(var n="",r=Ve(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ot(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case wt:return e.return=e.return||e.value;case gt:return"";case At:return e.return=e.value+"{"+St(e.children,r)+"}";case vt:e.value=e.props.join(",")}return Ye(n=St(e.children,r))?e.return=e.value+"{"+n+"}":""}function Et(e){return lt(xt("",null,null,null,[""],e=st(e),0,[0],e))}function xt(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,p=a,f=0,d=0,h=0,m=1,y=1,b=1,g=0,v="",w=o,A=i,S=r,O=v;y;)switch(h=g,g=nt()){case 40:if(108!=h&&58==Ue(O,p-1)){-1!=Fe(O+=He(ut(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:O+=ut(g);break;case 9:case 10:case 13:case 32:O+=ct(h);break;case 92:O+=pt(ot()-1,7);continue;case 47:switch(rt()){case 42:case 47:Qe(Mt(dt(nt(),ot()),t,n),l);break;default:O+="/"}break;case 123*m:s[u++]=Ye(O)*b;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+c:-1==b&&(O=He(O,/\f/g,"")),d>0&&Ye(O)-p&&Qe(d>32?jt(O+";",r,n,p-1):jt(He(O," ","")+";",r,n,p-2),l);break;case 59:O+=";";default:if(Qe(S=Ct(O,t,n,u,c,o,s,v,w=[],A=[],p),i),123===g)if(0===c)xt(O,t,S,S,w,i,p,s,A);else switch(99===f&&110===Ue(O,3)?100:f){case 100:case 108:case 109:case 115:xt(e,S,S,r&&Qe(Ct(e,S,S,0,0,o,s,v,o,w=[],p),A),o,A,p,s,r?w:A);break;default:xt(O,S,S,S,[""],A,0,s,A)}}u=c=d=0,m=b=1,v=O="",p=a;break;case 58:p=1+Ye(O),d=h;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==tt())continue;switch(O+=Be(g),g*m){case 38:b=c>0?1:(O+="\f",-1);break;case 44:s[u++]=(Ye(O)-1)*b,b=1;break;case 64:45===rt()&&(O+=ut(nt())),f=rt(),c=p=Ye(v=O+=ht(ot())),g++;break;case 45:45===h&&2==Ye(O)&&(m=0)}}return i}function Ct(e,t,n,r,o,i,a,s,l,u,c){for(var p=o-1,f=0===o?i:[""],d=Ve(f),h=0,m=0,y=0;h<r;++h)for(var b=0,g=ze(e,p+1,p=Le(m=a[h])),v=e;b<d;++b)(v=Ge(m>0?f[b]+" "+g:He(g,/&\f/g,f[b])))&&(l[y++]=v);return $e(e,t,n,0===o?vt:s,l,u,c)}function Mt(e,t,n){return $e(e,t,n,gt,Be(Ke),ze(e,2,-2),0)}function jt(e,t,n,r){return $e(e,t,n,wt,ze(e,0,r),ze(e,r+1,-1),r)}var Pt=function(e,t,n){for(var r=0,o=0;r=o,o=rt(),38===r&&12===o&&(t[n]=1),!at(o);)nt();return it(e,Xe)},It=new WeakMap,kt=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||It.get(n))&&!r){It.set(e,!0);for(var o=[],i=(c=o,lt(function(e,t){var n=-1,r=44;do{switch(at(r)){case 0:38===r&&12===rt()&&(t[n]=1),e[n]+=Pt(Xe-1,t,n);break;case 2:e[n]+=ut(r);break;case 4:if(44===r){e[++n]=58===rt()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Be(r)}}while(r=nt());return e}(st(t),c))),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}var c},Tt=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Dt(e,t){switch(r=t,45^Ue(n=e,0)?(((r<<2^Ue(n,0))<<2^Ue(n,1))<<2^Ue(n,2))<<2^Ue(n,3):0){case 5103:return bt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return bt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return bt+e+yt+e+mt+e+e;case 6828:case 4268:return bt+e+mt+e+e;case 6165:return bt+e+mt+"flex-"+e+e;case 5187:return bt+e+He(e,/(\w+).+(:[^]+)/,bt+"box-$1$2"+mt+"flex-$1$2")+e;case 5443:return bt+e+mt+"flex-item-"+He(e,/flex-|-self/,"")+e;case 4675:return bt+e+mt+"flex-line-pack"+He(e,/align-content|flex-|-self/,"")+e;case 5548:return bt+e+mt+He(e,"shrink","negative")+e;case 5292:return bt+e+mt+He(e,"basis","preferred-size")+e;case 6060:return bt+"box-"+He(e,"-grow","")+bt+e+mt+He(e,"grow","positive")+e;case 4554:return bt+He(e,/([^-])(transform)/g,"$1"+bt+"$2")+e;case 6187:return He(He(He(e,/(zoom-|grab)/,bt+"$1"),/(image-set)/,bt+"$1"),e,"")+e;case 5495:case 3959:return He(e,/(image-set\([^]*)/,bt+"$1$`$1");case 4968:return He(He(e,/(.+:)(flex-)?(.*)/,bt+"box-pack:$3"+mt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+bt+e+e;case 4095:case 3583:case 4068:case 2532:return He(e,/(.+)-inline(.+)/,bt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ye(e)-1-t>6)switch(Ue(e,t+1)){case 109:if(45!==Ue(e,t+4))break;case 102:return He(e,/(.+:)(.+)-([^]+)/,"$1"+bt+"$2-$3$1"+yt+(108==Ue(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Fe(e,"stretch")?Dt(He(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ue(e,t+1))break;case 6444:switch(Ue(e,Ye(e)-3-(~Fe(e,"!important")&&10))){case 107:return He(e,":",":"+bt)+e;case 101:return He(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+bt+(45===Ue(e,14)?"inline-":"")+"box$3$1"+bt+"$2$3$1"+mt+"$2box$3")+e}break;case 5936:switch(Ue(e,t+11)){case 114:return bt+e+mt+He(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return bt+e+mt+He(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return bt+e+mt+He(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return bt+e+mt+e+e}var n,r;return e}var Rt=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case wt:e.return=Dt(e.value,e.length);break;case At:return St([et(e,{value:He(e.value,"@","@"+bt)})],r);case vt:if(e.length)return e.props.map(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return St([et(e,{props:[He(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return St([et(e,{props:[He(t,/:(plac\w+)/,":"+bt+"input-$1")]}),et(e,{props:[He(t,/:(plac\w+)/,":-moz-$1")]}),et(e,{props:[He(t,/:(plac\w+)/,mt+"input-$1")]})],r)}return""}).join("")}}];function Nt(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Lt=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Bt=function(e,t,n){Lt(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},_t={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Gt(e){return(Gt="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)}var Ht,Ft,Ut=/[A-Z]|^ms/g,zt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yt=function(e){return 45===e.charCodeAt(1)},Vt=function(e){return null!=e&&"boolean"!=typeof e},Qt=(Ht=function(e){return Yt(e)?e:e.replace(Ut,"-$&").toLowerCase()},Ft=Object.create(null),function(e){return void 0===Ft[e]&&(Ft[e]=Ht(e)),Ft[e]}),Jt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(zt,function(e,t,n){return Zt={name:t,styles:n,next:Zt},t})}return 1===_t[e]||Yt(e)||"number"!=typeof t||0===t?t:t+"px"};function Wt(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(Gt(n)){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Zt={name:o.name,styles:o.styles,next:Zt},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Zt={name:a.name,styles:a.styles,next:Zt},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Wt(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!==Gt(a)){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":Vt(s)&&(r+=Qt(i)+":"+Jt(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=Wt(e,t,a);switch(i){case"animation":case"animationName":r+=Qt(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var u=0;u<a.length;u++)Vt(a[u])&&(r+=Qt(i)+":"+Jt(i,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=Zt,l=n(e);return Zt=s,Wt(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var Zt,Xt=/label:\s*([^\s;{]+)\s*(;|$)/g;function Kt(e,t,n){if(1===e.length&&"object"===Gt(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Zt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Wt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Wt(n,t,e[a]),r&&(o+=i[a]);Xt.lastIndex=0;for(var s,l="";null!==(s=Xt.exec(o));)l+="-"+s[1];return{name:function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l,styles:o,next:Zt}}var qt=!!e.useInsertionEffect&&e.useInsertionEffect,$t=qt||function(e){return e()},en=(qt||e.useLayoutEffect,e.createContext("undefined"!=typeof HTMLElement?function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Rt,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,u,c,p,f=[Ot,(p=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],d=(u=[kt,Tt].concat(i,f),c=Ve(u),function(e,t,n,r){for(var o="",i=0;i<c;i++)o+=u[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,St(Et(e?e+"{"+t.styles+"}":t.styles),d),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new Ne({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return h.sheet.hydrate(s),h}({key:"css"}):null)),tn=(en.Provider,function(t){return(0,e.forwardRef)(function(n,r){var o=(0,e.useContext)(en);return t(n,o,r)})}),nn=e.createContext({}),rn={}.hasOwnProperty,on="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",an=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Lt(t,n,r),$t(function(){return Bt(t,n,r)}),null},sn=tn(function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[on],a=[o],s="";"string"==typeof t.className?s=Nt(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=Kt(a,void 0,e.useContext(nn));s+=n.key+"-"+l.name;var u={};for(var c in t)rn.call(t,c)&&"css"!==c&&c!==on&&(u[c]=t[c]);return u.className=s,r&&(u.ref=r),e.createElement(e.Fragment,null,e.createElement(an,{cache:n,serialized:l,isStringTag:"string"==typeof i}),e.createElement(i,u))});function ln(e){return(ln="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)}r(5416);var un,cn,pn=function(t,n){var r=arguments;if(null==n||!rn.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=sn,i[1]=function(e,t){var n={};for(var r in t)rn.call(t,r)&&(n[r]=t[r]);return n[on]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)};function fn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Kt(t)}un=pn||(pn={}),cn||(cn=un.JSX||(un.JSX={}));var dn=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(ln(i)){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o},hn=function(e){var t=e.cache,n=e.serializedArr;return $t(function(){for(var e=0;e<n.length;e++)Bt(t,n[e],!1)}),null},mn=tn(function(t,n){var r=[],o=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=Kt(t,n.registered);return r.push(i),Lt(n,i,!1),n.key+"-"+i.name},i={css:o,cx:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i=n.registered,a=o,s=dn(t),u=Nt(i,l=[],s),l.length<2?s:u+a(l);var i,a,s,l,u},theme:e.useContext(nn)},a=t.children(i);return e.createElement(e.Fragment,null,e.createElement(hn,{cache:n,serializedArr:r}),a)});function yn(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function bn(e,t){if(null==e)return{};var n,r,o=yn(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function gn(e){return(gn="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)}var vn=r(1730);function wn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function An(e){var t=function(e){if("object"!=gn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gn(t)?t:t+""}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,An(r.key),r)}}function On(e,t,n){return t&&Sn(e.prototype,t),n&&Sn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xn(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&&En(e,t)}function Cn(e,t,n){return(t=An(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mn(e){return(Mn="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 jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pn(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 In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pn(Object(n),!0).forEach(function(t){jn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kn(e){return(kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tn(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,o,i=kn(e);if(t){var a=kn(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return r=this,!(o=n)||"object"!==Mn(o)&&"function"!=typeof o?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r):o}}var Dn=function(){};function Rn(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Nn(e,t,n){var r=[n];if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&r.push("".concat(Rn(e,o)));return r.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var Ln=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===gn(e)&&null!==e?[e]:[]},Bn=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,In({},bn(e,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]))};function _n(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Gn(e){return _n(e)?window.pageYOffset:e.scrollTop}function Hn(e,t){_n(e)?window.scrollTo(0,t):e.scrollTop=t}function Fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Dn,o=Gn(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;Hn(e,l),a<n?window.requestAnimationFrame(t):r(e)}()}function Un(){try{return document.createEvent("TouchEvent"),!0}catch(Ht){return!1}}var zn=!1,Yn={get passive(){return zn=!0}},Vn="undefined"!=typeof window?window:{};Vn.addEventListener&&Vn.removeEventListener&&(Vn.addEventListener("p",Dn,Yn),Vn.removeEventListener("p",Dn,!1));var Qn=zn,Jn=function(e){return"auto"===e?"bottom":e},Wn=(0,e.createContext)({getPortalPlacement:null}),Zn=function(e){xn(n,e);var t=Tn(n);function n(){var e;wn(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,o=n.maxMenuHeight,i=n.menuPlacement,a=n.menuPosition,s=n.menuShouldScrollIntoView,l=n.theme;if(t){var u="fixed"===a,c=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.theme.spacing,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,d=p.height,h=p.top,m=n.offsetParent.getBoundingClientRect().top,y=window.innerHeight,b=Gn(l),g=parseInt(getComputedStyle(n).marginBottom,10),v=parseInt(getComputedStyle(n).marginTop,10),w=m-v,A=y-h,S=w+b,O=c-b-h,E=f-y+b+g,x=b+h-v,C=160;switch(o){case"auto":case"bottom":if(A>=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!a)return i&&Fn(l,E,C),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&A>=r)return i&&Fn(l,E,C),{placement:"bottom",maxHeight:a?A-g:O-g};if("auto"===o||a){var M=t,j=a?w:S;return j>=r&&(M=Math.min(j-g-s.controlHeight,t)),{placement:"top",maxHeight:M}}if("bottom"===o)return i&&Hn(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(S>=d&&!a)return i&&Fn(l,x,C),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&w>=r){var P=t;return(!a&&S>=r||a&&w>=r)&&(P=a?w-v:S-v),i&&Fn(l,x,C),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}({maxHeight:o,menuEl:t,minHeight:r,placement:i,shouldScroll:s&&!u,isFixedPosition:u,theme:l}),p=e.context.getPortalPlacement;p&&p(c),e.setState(c)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||Jn(t);return In(In({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return On(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(e.Component);Zn.contextType=Wn;var Xn=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},Kn=Xn,qn=Xn,$n=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};$n.defaultProps={children:"No options"};var er=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};er.defaultProps={children:"Loading..."};var tr,nr,rr,or=function(t){xn(r,t);var n=Tn(r);function r(){var e;wn(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return(e=n.call.apply(n,[this].concat(o))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==Jn(e.props.menuPlacement)&&e.setState({placement:n})},e}return On(r,[{key:"render",value:function(){var t=this.props,n=t.appendTo,r=t.children,o=t.className,i=t.controlElement,a=t.cx,s=t.innerProps,l=t.menuPlacement,u=t.menuPosition,c=t.getStyles,p="fixed"===u;if(!n&&!p||!i)return null;var f=this.state.placement||Jn(l),d=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),h=p?0:window.pageYOffset,m=d[f]+h,y=pn("div",Re({css:c("menuPortal",{offset:m,position:u,rect:d}),className:a({"menu-portal":!0},o)},s),r);return pn(Wn.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},n?(0,e.createPortal)(y,n):y)}}]),r}(e.Component),ir={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},ar=function(e){var t=e.size,n=bn(e,["size"]);return pn("svg",Re({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ir},n))},sr=function(e){return pn(ar,Re({size:20},e),pn("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},lr=function(e){return pn(ar,Re({size:20},e),pn("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},ur=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},cr=ur,pr=ur,fr=function(){var e=fn.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(tr||(nr=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],rr||(rr=nr.slice(0)),tr=Object.freeze(Object.defineProperties(nr,{raw:{value:Object.freeze(rr)}})))),dr=function(e){var t=e.delay,n=e.offset;return pn("span",{css:fn({animation:"".concat(fr," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},hr=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isRtl;return pn("div",Re({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},o),pn(dr,{delay:0,offset:i}),pn(dr,{delay:160,offset:!0}),pn(dr,{delay:320,offset:!i}))};hr.defaultProps={size:4};var mr=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},yr=function(e){var t=e.children,n=e.innerProps;return pn("div",n,t)},br=yr,gr=yr,vr=function(e){var t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,s=e.innerProps,l=e.isDisabled,u=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove;return pn(mn,null,function(r){var h=r.css,m=r.cx;return pn(p,{data:i,innerProps:In({className:m(h(a("multiValue",e)),o({"multi-value":!0,"multi-value--is-disabled":l},n))},s),selectProps:c},pn(f,{data:i,innerProps:{className:m(h(a("multiValueLabel",e)),o({"multi-value__label":!0},n))},selectProps:c},t),pn(d,{data:i,innerProps:In({className:m(h(a("multiValueRemove",e)),o({"multi-value__remove":!0},n))},u),selectProps:c}))})};vr.defaultProps={cropWithEllipsis:!0};var wr={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},i),t||pn(sr,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,s=e.innerRef,l=e.innerProps,u=e.menuIsOpen;return pn("div",Re({ref:s,css:r("control",e),className:n({control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":u},o)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},i),t||pn(lr,null))},DownChevron:lr,CrossIcon:sr,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return pn("div",Re({css:o("group",e),className:r({group:!0},n)},s),pn(i,Re({},a,{selectProps:c,theme:u,getStyles:o,cx:r}),l),pn("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,r=e.className,o=Bn(e);o.data;var i=bn(o,["data"]);return pn("div",Re({css:t("groupHeading",e),className:n({"group-heading":!0},r)},i))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.innerProps,i=e.getStyles;return pn("div",Re({css:i("indicatorsContainer",e),className:r({indicators:!0},n)},o),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return pn("span",Re({},o,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=Bn(e),i=o.innerRef,a=o.isDisabled,s=o.isHidden,l=bn(o,["innerRef","isDisabled","isHidden"]);return pn("div",{css:r("input",e)},pn(vn.A,Re({className:n({input:!0},t),inputRef:i,inputStyle:mr(s),disabled:a},l)))},LoadingIndicator:hr,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps;return pn("div",Re({css:o("menu",e),className:r({menu:!0},n),ref:i},a),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.innerRef,s=e.isMulti;return pn("div",Re({css:o("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":s},n),ref:a},i),t)},MenuPortal:or,LoadingMessage:er,NoOptionsMessage:$n,MultiValue:vr,MultiValueContainer:br,MultiValueLabel:gr,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return pn("div",n,t||pn(sr,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,s=e.isSelected,l=e.innerRef,u=e.innerProps;return pn("div",Re({css:o("option",e),className:r({option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":s},n),ref:l},u),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return pn("div",Re({css:o("placeholder",e),className:r({placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,s=e.isRtl;return pn("div",Re({css:o("container",e),className:r({"--is-disabled":a,"--is-rtl":s},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return pn("div",Re({css:o("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":i},n)},a),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.innerProps,i=e.isMulti,a=e.getStyles,s=e.hasValue;return pn("div",Re({css:a("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s},n)},o),t)}};function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sr(e){return function(e){if(Array.isArray(e))return Ar(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){if("string"==typeof e)return Ar(e,t);var n={}.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)?Ar(e,t):void 0}}(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.")}()}var Or=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Er(e,t){return e===t||!(!Or(e)||!Or(t))}function xr(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}for(var Cr={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Mr=function(e){return pn("span",Re({css:Cr},e))},jr={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,o=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"select-option":return"option ".concat(r,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=void 0===n?{}:n,o=e.options,i=e.label,a=void 0===i?"":i,s=e.selectValue,l=e.isDisabled,u=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(a," focused, ").concat(c(s,r),".");if("menu"===t){var p=l?" disabled":"",f="".concat(u?"selected":"focused").concat(p);return"option ".concat(a," ").concat(f,", ").concat(c(o,r),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Pr=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,u=l.ariaLiveMessages,c=l.getOptionLabel,p=l.inputValue,f=l.isMulti,d=l.isOptionDisabled,h=l.isSearchable,m=l.menuIsOpen,y=l.options,b=l.screenReaderStatus,g=l.tabSelectsValue,v=l["aria-label"],w=l["aria-live"],A=(0,e.useMemo)(function(){return In(In({},jr),u||{})},[u]),S=(0,e.useMemo)(function(){var e,t="";if(n&&A.onChange){var r=n.option,o=n.removedValue,i=n.value,a=o||r||(e=i,Array.isArray(e)?null:e),s=In({isDisabled:a&&d(a),label:a?c(a):""},n);t=A.onChange(s)}return t},[n,d,c,A]),O=(0,e.useMemo)(function(){var e="",t=r||o,n=!!(r&&s&&s.includes(r));if(t&&A.onFocus){var i={focused:t,label:c(t),isDisabled:d(t),isSelected:n,options:y,context:t===r?"menu":"value",selectValue:s};e=A.onFocus(i)}return e},[r,o,c,d,A,y,s]),E=(0,e.useMemo)(function(){var e="";if(m&&y.length&&A.onFilter){var t=b({count:i.length});e=A.onFilter({inputValue:p,resultsMessage:t})}return e},[i,p,m,A,y,b]),x=(0,e.useMemo)(function(){var e="";if(A.guidance){var t=o?"value":m?"menu":"input";e=A.guidance({"aria-label":v,context:t,isDisabled:r&&d(r),isMulti:f,isSearchable:h,tabSelectsValue:g})}return e},[v,r,o,f,d,h,m,A,g]),C="".concat(O," ").concat(E," ").concat(x);return pn(Mr,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},a&&pn(e.default.Fragment,null,pn("span",{id:"aria-selection"},S),pn("span",{id:"aria-context"},C)))},Ir=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],kr=new RegExp("["+Ir.map(function(e){return e.letters}).join("")+"]","g"),Tr={},Dr=0;Dr<Ir.length;Dr++)for(var Rr=Ir[Dr],Nr=0;Nr<Rr.letters.length;Nr++)Tr[Rr.letters[Nr]]=Rr.base;var Lr=function(e){return e.replace(kr,function(e){return Tr[e]})},Br=function(e,t){var n;void 0===t&&(t=xr);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(Lr),_r=function(e){return e.replace(/^\s+|\s+$/g,"")},Gr=function(e){return"".concat(e.label," ").concat(e.value)};function Hr(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef;e.emotion;var n=bn(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return pn("input",Re({ref:t},n,{css:fn({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var Fr=["boxSizing","height","overflow","paddingRight","position"],Ur={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function zr(e){e.preventDefault()}function Yr(e){e.stopPropagation()}function Vr(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Qr(){return"ontouchstart"in window||navigator.maxTouchPoints}var Jr=!("undefined"==typeof window||!window.document||!window.document.createElement),Wr=0,Zr={capture:!1,passive:!1},Xr=function(){return document.activeElement&&document.activeElement.blur()},Kr={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function qr(t){var n,r,o,i,a,s,l,u,c,p,f,d,h,m,y,b,g=t.children,v=t.lockEnabled,w=t.captureEnabled,A=(n={isEnabled:void 0===w||w,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave},r=n.isEnabled,o=n.onBottomArrive,i=n.onBottomLeave,a=n.onTopArrive,s=n.onTopLeave,l=(0,e.useRef)(!1),u=(0,e.useRef)(!1),c=(0,e.useRef)(0),p=(0,e.useRef)(null),f=(0,e.useCallback)(function(e,t){if(null!==p.current){var n=p.current,r=n.scrollTop,c=n.scrollHeight,f=n.clientHeight,d=p.current,h=t>0,m=c-f-r,y=!1;m>t&&l.current&&(i&&i(e),l.current=!1),h&&u.current&&(s&&s(e),u.current=!1),h&&t>m?(o&&!l.current&&o(e),d.scrollTop=c,y=!0,l.current=!0):!h&&-t>r&&(a&&!u.current&&a(e),d.scrollTop=0,y=!0,u.current=!0),y&&((b=e).preventDefault(),b.stopPropagation())}var b},[]),d=(0,e.useCallback)(function(e){f(e,e.deltaY)},[f]),h=(0,e.useCallback)(function(e){c.current=e.changedTouches[0].clientY},[]),m=(0,e.useCallback)(function(e){var t=c.current-e.changedTouches[0].clientY;f(e,t)},[f]),y=(0,e.useCallback)(function(e){if(e){var t=!!Qn&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",d,t),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",h,t),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",m,t)}},[m,h,d]),b=(0,e.useCallback)(function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",d,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",h,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",m,!1))},[m,h,d]),(0,e.useEffect)(function(){if(r){var e=p.current;return y(e),function(){b(e)}}},[r,y,b]),function(e){p.current=e}),S=function(t){var n=t.isEnabled,r=t.accountForScrollbars,o=void 0===r||r,i=(0,e.useRef)({}),a=(0,e.useRef)(null),s=(0,e.useCallback)(function(e){if(Jr){var t=document.body,n=t&&t.style;if(o&&Fr.forEach(function(e){var t=n&&n[e];i.current[e]=t}),o&&Wr<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(Ur).forEach(function(e){var t=Ur[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&Qr()&&(t.addEventListener("touchmove",zr,Zr),e&&(e.addEventListener("touchstart",Vr,Zr),e.addEventListener("touchmove",Yr,Zr))),Wr+=1}},[]),l=(0,e.useCallback)(function(e){if(Jr){var t=document.body,n=t&&t.style;Wr=Math.max(Wr-1,0),o&&Wr<1&&Fr.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&Qr()&&(t.removeEventListener("touchmove",zr,Zr),e&&(e.removeEventListener("touchstart",Vr,Zr),e.removeEventListener("touchmove",Yr,Zr)))}},[]);return(0,e.useEffect)(function(){if(n){var e=a.current;return s(e),function(){l(e)}}},[n,s,l]),function(e){a.current=e}}({isEnabled:v});return pn(e.default.Fragment,null,v&&pn("div",{onClick:Xr,css:Kr}),g(function(e){A(e),S(e)}))}var $r={clearIndicator:pr,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:cr,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:qn,menu:function(e){var t,n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return Cn(t={label:"menu"},(n=r)?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),Cn(t,"backgroundColor",s.neutral0),Cn(t,"borderRadius",i),Cn(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Cn(t,"marginBottom",a.menuGutter),Cn(t,"marginTop",a.menuGutter),Cn(t,"position","absolute"),Cn(t,"width","100%"),Cn(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Kn,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},eo={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},to={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Un(),captureMenuScroll:!Un(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=In({ignoreCase:!0,ignoreAccents:!0,stringify:Gr,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?_r(t):t,u=a?_r(i(e)):i(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=Br(l),u=Lr(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(Ht){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function no(e,t,n,r){return{type:"option",data:t,isDisabled:lo(e,t,n),isSelected:uo(e,t,n),label:ao(e,t),value:so(e,t),index:r}}function ro(e,t){return e.options.map(function(n,r){if(n.options){var o=n.options.map(function(n,r){return no(e,n,t,r)}).filter(function(t){return io(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=no(e,n,t,r);return io(e,i)?i:void 0}).filter(function(e){return!!e})}function oo(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,Sr(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function io(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!po(e)||!i)&&co(e,{label:a,value:s,data:o},r)}var ao=function(e,t){return e.getOptionLabel(t)},so=function(e,t){return e.getOptionValue(t)};function lo(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function uo(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=so(e,t);return n.some(function(t){return so(e,t)===r})}function co(e,t,n){return!e.filterOption||e.filterOption(t,n)}var po=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},fo=1,ho=function(t){xn(r,t);var n=Tn(r);function r(e){var t;return wn(this,r),(t=n.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;n.name=i,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,o=t.props,i=o.closeMenuOnSelect,a=o.isMulti;t.onInputChange("",{action:"set-value"}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=n.name,a=t.state.selectValue,s=o&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var u=t.getOptionValue(e);t.setValue(a.filter(function(e){return t.getOptionValue(e)!==u}),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",name:i});o?t.setValue([].concat(Sr(a),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),i=r.filter(function(e){return t.getOptionValue(e)!==o}),a=n?i:i[0]||null;t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(t.props.isMulti?[]:null,{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),i=e?o:o[0]||null;t.onChange(i,{action:"pop-value",removedValue:r})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Nn.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return ao(t.props,e)},t.getOptionValue=function(e){return so(t.props,e)},t.getStyles=function(e,n){var r=$r[e](n);r.boxSizing="border-box";var o=t.props.styles[e];return o?o(r,n):r},t.getElementId=function(e){return"".concat(t.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,In(In({},wr),e.components);var e},t.buildCategorizedOptions=function(){return ro(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return oo(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:In({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,r=n.isMulti,o=n.menuIsOpen;t.focusInput(),o?(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()):t.openMenu("first"),e.preventDefault(),e.stopPropagation()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.stopPropagation(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout(function(){return t.focusInput()}))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&_n(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var o=Math.abs(r.clientX-t.initialTouchX),i=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=o>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(n,{action:"input-change"}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur"}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return po(t.props)},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,u=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=t.state,h=d.focusedOption,m=d.focusedValue,y=d.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!u||!p||!h||f&&t.isOptionSelected(h,y))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":u?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close"}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!u){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":u?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":u?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!u)return;t.focusOption("pageup");break;case"PageDown":if(!u)return;t.focusOption("pagedown");break;case"Home":if(!u)return;t.focusOption("first");break;case"End":if(!u)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++fo),t.state.selectValue=Ln(e.value),t}return On(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,i,a=this.props,s=a.isDisabled,l=a.menuIsOpen,u=this.state.isFocused;(u&&!s&&e.isDisabled||u&&l&&!e.menuIsOpen)&&this.focusInput(),u&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=n.offsetHeight/3,o.bottom+i>r.bottom?Hn(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+i,t.scrollHeight)):o.top-i<r.top&&Hn(t,Math.max(n.offsetTop-i,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a]},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(eo):In(In({},eo),this.props.theme):eo}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.selectOption,i=this.setValue,a=this.props,s=a.isMulti,l=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:u,selectOption:o,selectProps:a,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return lo(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return uo(this.props,e,t)}},{key:"filterOption",value:function(e,t){return co(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,n=t.isDisabled,r=t.isSearchable,o=t.inputId,i=t.inputValue,a=t.tabIndex,s=t.form,l=this.getComponents().Input,u=this.state.inputIsHidden,c=this.commonProps,p=o||this.getElementId("input"),f={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return r?e.default.createElement(l,Re({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:n,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},f)):e.default.createElement(Hr,Re({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Dn,onFocus:this.onInputFocus,readOnly:!0,disabled:n,tabIndex:a,form:s,value:""},f))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,l=n.Placeholder,u=this.commonProps,c=this.props,p=c.controlShouldRenderValue,f=c.isDisabled,d=c.isMulti,h=c.inputValue,m=c.placeholder,y=this.state,b=y.selectValue,g=y.focusedValue,v=y.isFocused;if(!this.hasValue()||!p)return h?null:e.default.createElement(l,Re({},u,{key:"placeholder",isDisabled:f,isFocused:v}),m);if(d){var w=b.map(function(n,s){var l=n===g;return e.default.createElement(r,Re({},u,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:f,key:"".concat(t.getOptionValue(n)).concat(s),index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:n}),t.formatOptionLabel(n,"value"))});return w}if(h)return null;var A=b[0];return e.default.createElement(s,Re({},u,{data:A,isDisabled:f}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.default.createElement(t,Re({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;return t&&i?e.default.createElement(t,Re({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,r=t.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.default.createElement(r,Re({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.default.createElement(t,Re({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,l=n.LoadingMessage,u=n.NoOptionsMessage,c=n.Option,p=this.commonProps,f=this.state.focusedOption,d=this.props,h=d.captureMenuScroll,m=d.inputValue,y=d.isLoading,b=d.loadingMessage,g=d.minMenuHeight,v=d.maxMenuHeight,w=d.menuIsOpen,A=d.menuPlacement,S=d.menuPosition,O=d.menuPortalTarget,E=d.menuShouldBlockScroll,x=d.menuShouldScrollIntoView,C=d.noOptionsMessage,M=d.onMenuScrollToTop,j=d.onMenuScrollToBottom;if(!w)return null;var P,I=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,l=n.label,u=n.value,d=f===i,h=a?void 0:function(){return t.onOptionHover(i)},m=a?void 0:function(){return t.selectOption(i)},y="".concat(t.getElementId("option"),"-").concat(r),b={id:y,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1};return e.default.createElement(c,Re({},p,{innerProps:b,data:i,isDisabled:a,isSelected:s,key:y,label:l,type:o,value:u,isFocused:d,innerRef:d?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map(function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,l="".concat(t.getElementId("group"),"-").concat(s),u="".concat(l,"-heading");return e.default.createElement(r,Re({},p,{key:l,data:i,options:a,Heading:o,headingProps:{id:u,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map(function(e){return I(e,"".concat(s,"-").concat(e.index))}))}if("option"===n.type)return I(n,"".concat(n.index))});else if(y){var k=b({inputValue:m});if(null===k)return null;P=e.default.createElement(l,p,k)}else{var T=C({inputValue:m});if(null===T)return null;P=e.default.createElement(u,p,T)}var D={minMenuHeight:g,maxMenuHeight:v,menuPlacement:A,menuPosition:S,menuShouldScrollIntoView:x},R=e.default.createElement(Zn,Re({},p,D),function(n){var r=n.ref,o=n.placerProps,s=o.placement,l=o.maxHeight;return e.default.createElement(i,Re({},p,D,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:y,placement:s}),e.default.createElement(qr,{captureEnabled:h,onTopArrive:M,onBottomArrive:j,lockEnabled:E},function(n){return e.default.createElement(a,Re({},p,{innerRef:function(e){t.getMenuListRef(e),n(e)},isLoading:y,maxHeight:l,focusedOption:f}),P)}))});return O||"fixed"===S?e.default.createElement(s,Re({},p,{appendTo:O,controlElement:this.controlRef,menuPlacement:A,menuPosition:S}),R):R}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=this.state.selectValue;if(a&&!o){if(i){if(r){var l=s.map(function(e){return t.getOptionValue(e)}).join(r);return e.default.createElement("input",{name:a,type:"hidden",value:l})}var u=s.length>0?s.map(function(n,r){return e.default.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:t.getOptionValue(n)})}):e.default.createElement("input",{name:a,type:"hidden"});return e.default.createElement("div",null,u)}var c=s[0]?this.getOptionValue(s[0]):"";return e.default.createElement("input",{name:a,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,l=this.getFocusableOptions();return e.default.createElement(Pr,Re({},t,{ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return e.default.createElement(o,Re({},f,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:p}),this.renderLiveRegion(),e.default.createElement(n,Re({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:p,menuIsOpen:c}),e.default.createElement(i,Re({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),e.default.createElement(r,Re({},f,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=e.options,a=e.value,s=e.menuIsOpen,l=e.inputValue,u={};if(n&&(a!==n.value||i!==n.options||s!==n.menuIsOpen||l!==n.inputValue)){var c=Ln(a),p=s?oo(ro(e,c)):[],f=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,c):null,d=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,p);u={selectValue:c,focusedOption:d,focusedValue:f,clearFocusValueOnUpdate:!1}}var h=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{};return In(In(In({},u),h),{},{prevProps:e})}}]),r}(e.Component);ho.defaultProps=to;var mo,yo,bo,go=(mo=ho,bo=yo=function(t){xn(r,t);var n=Tn(r);function r(){var e;wn(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return(e=n.call.apply(n,[this].concat(o))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return On(r,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var t=this,n=this.props;n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue;var r=bn(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return e.default.createElement(mo,Re({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),r}(e.Component),yo.defaultProps={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},bo);const vo=go;var wo=[{value:"assessing",label:"Assessing"},{value:"bookmarking",label:"Bookmarking"},{value:"classifying",label:"Classifying"},{value:"commenting",label:"Commenting"},{value:"describing",label:"Describing"},{value:"editing",label:"Editing"},{value:"highlighting",label:"Highlighting"},{value:"identifying",label:"Identifying"},{value:"linking",label:"Linking"},{value:"moderating",label:"Moderating"},{value:"questioning",label:"Questioning"},{value:"replying",label:"Replying"},{value:"supplementing",label:"Transcription"}];const Ao=function(t){var n=t.content?wo.find(function(e){return e.value===t.content}):null;return e.default.createElement("div",{className:"r6o-purposedropdown"},e.default.createElement(vo,{value:n,onChange:t.onChange,options:wo,isDisabled:!t.editable}))};var So=function(t){return e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 940",width:t.width},e.default.createElement("metadata",null,"IcoFont Icons"),e.default.createElement("title",null,"simple-down"),e.default.createElement("glyph",{glyphName:"simple-down",unicode:"",horizAdvX:"1000"}),e.default.createElement("path",{fill:"currentColor",d:"M200 392.6l300 300 300-300-85.10000000000002-85.10000000000002-214.89999999999998 214.79999999999995-214.89999999999998-214.89999999999998-85.10000000000002 85.20000000000005z"}))},Oo=function(t){return e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"180 150 700 800",width:t.width},e.default.createElement("metadata",null,"IcoFont Icons"),e.default.createElement("title",null,"close"),e.default.createElement("glyph",{glyphName:"close",unicode:"",horizAdvX:"1000"}),e.default.createElement("path",{fill:"currentColor",d:"M709.8 206.6c-64.39999999999998 65.50000000000003-128.89999999999998 131.20000000000002-194.19999999999993 197.6-8.600000000000023 8.699999999999989-22.400000000000034 8.800000000000011-31 0-65-66-129.70000000000005-131.8-194.5-197.6-8.600000000000023-8.699999999999989-22.400000000000034-8.599999999999994-30.900000000000034 0.09999999999999432-15.699999999999989 16.200000000000017-31.099999999999994 32.30000000000001-47.099999999999994 48.80000000000001-8.5 8.800000000000011-8.299999999999983 23 0.20000000000001705 31.69999999999999 63.099999999999966 64.19999999999999 127.89999999999998 130.10000000000002 193.59999999999997 197 8.600000000000023 8.699999999999989 8.5 22.80000000000001 0 31.599999999999966-65.19999999999999 66.40000000000009-130.2 132.5-194.7 198.10000000000002-8.5 8.700000000000045-8.5 22.800000000000068 0.20000000000001705 31.399999999999977l47.79999999999998 47.90000000000009c8.600000000000023 8.599999999999909 22.600000000000023 8.599999999999909 31.100000000000023-0.10000000000002274l194.2-197.30000000000007c8.600000000000023-8.699999999999932 22.399999999999977-8.699999999999932 31 0 64.70000000000005 65.80000000000007 129.20000000000005 131.4000000000001 194.20000000000005 197.5 8.599999999999909 8.700000000000045 22.5 8.800000000000068 31 0.10000000000002274 16-16.199999999999932 31.699999999999932-32.19999999999993 47.59999999999991-48.299999999999955 8.600000000000023-8.700000000000045 8.600000000000023-22.899999999999977 0.10000000000002274-31.600000000000023-63.799999999999955-65-128.5-130.89999999999998-194.19999999999993-197.79999999999995-8.600000000000023-8.700000000000045-8.600000000000023-22.900000000000034 0-31.600000000000023 65.19999999999993-66.40000000000003 130.0999999999999-132.5 194.5-198.20000000000005 8.599999999999909-8.699999999999989 8.5-22.799999999999955-0.10000000000002274-31.49999999999997l-47.80000000000007-48.099999999999994c-8.5-8.5-22.399999999999977-8.400000000000006-31 0.29999999999998295z"}))},Eo=function(t){return e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:t.width},e.default.createElement("path",{fill:"currentColor",d:"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"}))};function xo(e){return(xo="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 Co(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 Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Co(Object(n),!0).forEach(function(t){jo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Co(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jo(e,t,n){return r=function(e){if("object"!=xo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==xo(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}function Po(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Io(e,t);var n={}.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)?Io(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 Io(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const ko=function(t){var n=Po((0,e.useState)(!1),2),r=n[0],o=n[1],i=Po((0,e.useState)(!1),2),a=i[0],s=i[1],l=t.body.modified||t.body.created,u=t.body.creator&&e.default.createElement("div",{className:"r6o-lastmodified"},e.default.createElement("span",{className:"r6o-lastmodified-by"},t.body.creator.name||t.body.creator.id),t.body.created&&e.default.createElement("span",{className:"r6o-lastmodified-at"},e.default.createElement(C,{datetime:t.env.toClientTime(l),locale:Ee.locale()})));return t.readOnly?e.default.createElement("div",{className:"r6o-widget comment"},e.default.createElement("div",{className:"r6o-readonly-comment"},t.body.value),u):e.default.createElement("div",{className:r?"r6o-widget comment editable":"r6o-widget comment"},e.default.createElement(De,{editable:r,content:t.body.value,onChange:function(e){return t.onUpdate(t.body,Mo(Mo({},t.body),{},{value:e.target.value}))},onSaveAndClose:t.onSaveAndClose}),!r&&u,t.purposeSelector&&e.default.createElement(Ao,{editable:r,content:t.body.purpose,onChange:function(e){return t.onUpdate(t.body,Mo(Mo({},t.body),{},{purpose:e.value}))},onSaveAndClose:t.onSaveAndClose}),e.default.createElement("div",{className:a?"r6o-icon r6o-arrow-down r6o-menu-open":"r6o-icon r6o-arrow-down",onClick:function(){return s(!a)}},e.default.createElement(So,{width:12})),a&&e.default.createElement(xe,{onEdit:function(e){o(!0),s(!1)},onDelete:function(e){t.onDelete(t.body),s(!1)},onClickOutside:function(){return s(!1)}}))};function To(e){return(To="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 Do(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?Do(Object(n),!0).forEach(function(t){No(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Do(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function No(e,t,n){return r=function(e){if("object"!=To(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=To(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==To(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var Lo=wo.map(function(e){return e.value}),Bo=function(e,t){var n=t?Lo.indexOf(e.purpose)>-1:"commenting"==e.purpose||"replying"==e.purpose;return"TextualBody"===e.type&&(!Object.prototype.hasOwnProperty.call(e,"purpose")||n)},_o=function(e,t){if(!0===t.editable)return!1;if(!1===t.editable)return!0;if("MINE_ONLY"===t.editable){var n,r,o=null===(n=e.creator)||void 0===n?void 0:n.id;return(null===(r=t.env.user)||void 0===r?void 0:r.id)!==o}return t.readOnly},Go=function(t){var n,r,o=t.annotation?t.annotation.bodies.filter(function(e){return Bo(e,t.purposeSelector)}):[],i=(n=o.find(function(e){return 1==e.draft}),r=o.length>1,n||{type:"TextualBody",value:"",purpose:r?"replying":"commenting",draft:!0}),a=o.filter(function(e){return e!=i}),s=!t.readOnly&&t.annotation,l=0===a.length||!t.disableReply;return e.default.createElement(e.default.Fragment,null,a.map(function(n,r){return e.default.createElement(ko,{key:r,env:t.env,purposeSelector:t.purposeSelector,readOnly:_o(n,t),body:n,onUpdate:t.onUpdateBody,onDelete:t.onRemoveBody,onSaveAndClose:t.onSaveAndClose})}),s&&l&&e.default.createElement("div",{className:"r6o-widget comment editable"},e.default.createElement(De,{focus:t.focus,content:i.value,editable:!0,placeholder:a.length>0?Ee.t("Add a reply..."):t.textPlaceHolder||Ee.t("Add a comment..."),onChange:function(e){var n=i.value,r=e.target.value;0===n.length&&r.length>0?t.onAppendBody(Ro(Ro({},i),{},{value:r})):n.length>0&&0===r.length?t.onRemoveBody(i):t.onUpdateBody(i,Ro(Ro({},i),{},{value:r}))},onSaveAndClose:function(){return t.onSaveAndClose()}}),t.purposeSelector&&i.value.length>0&&e.default.createElement(Ao,{editable:!0,content:i.purpose,onChange:function(e){return t.onUpdateBody(i,Ro(Ro({},i),{},{purpose:e.value}))},onSaveAndClose:function(){return t.onSaveAndClose()}})))};Go.disableDelete=function(e,t){return e.bodies.filter(function(e){return Bo(e,t.purposeSelector)}).some(function(e){return _o(e,t)})};const Ho=Go;function Fo(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,En(e,t)}function Uo(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const zo=e.default.createContext(null);var Yo=function(e){return e.scrollTop},Vo="unmounted",Qo="exited",Jo="entering",Wo="entered",Zo="exiting",Xo=function(t){function n(e,n){var r;r=t.call(this,e,n)||this;var o,i=n&&!n.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?i?(o=Qo,r.appearStatus=Jo):o=Wo:o=e.unmountOnExit||e.mountOnEnter?Vo:Qo,r.state={status:o},r.nextCallback=null,r}Fo(n,t),n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Vo?{status:Qo}:null};var r=n.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Jo&&n!==Wo&&(t=Jo):n!==Jo&&n!==Wo||(t=Zo)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.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}},r.updateStatus=function(t,n){if(void 0===t&&(t=!1),null!==n)if(this.cancelNextCallback(),n===Jo){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:e.default.findDOMNode(this);r&&Yo(r)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qo&&this.setState({status:Vo})},r.performEnter=function(t){var n=this,r=this.props.enter,o=this.context?this.context.isMounting:t,i=this.props.nodeRef?[o]:[e.default.findDOMNode(this),o],a=i[0],s=i[1],l=this.getTimeouts(),u=o?l.appear:l.enter;t||r?(this.props.onEnter(a,s),this.safeSetState({status:Jo},function(){n.props.onEntering(a,s),n.onTransitionEnd(u,function(){n.safeSetState({status:Wo},function(){n.props.onEntered(a,s)})})})):this.safeSetState({status:Wo},function(){n.props.onEntered(a)})},r.performExit=function(){var t=this,n=this.props.exit,r=this.getTimeouts(),o=this.props.nodeRef?void 0:e.default.findDOMNode(this);n?(this.props.onExit(o),this.safeSetState({status:Zo},function(){t.props.onExiting(o),t.onTransitionEnd(r.exit,function(){t.safeSetState({status:Qo},function(){t.props.onExited(o)})})})):this.safeSetState({status:Qo},function(){t.props.onExited(o)})},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.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},r.onTransitionEnd=function(t,n){this.setNextCallback(n);var r=this.props.nodeRef?this.props.nodeRef.current:e.default.findDOMNode(this),o=null==t&&!this.props.addEndListener;if(r&&!o){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],a=i[0],s=i[1];this.props.addEndListener(a,s)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},r.render=function(){var t=this.state.status;if(t===Vo)return null;var n=this.props,r=n.children,o=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,yn(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e.default.createElement(zo.Provider,{value:null},"function"==typeof r?r(t,o):e.default.cloneElement(e.default.Children.only(r),o))},n}(e.default.Component);function Ko(){}Xo.contextType=zo,Xo.propTypes={},Xo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ko,onEntering:Ko,onEntered:Ko,onExit:Ko,onExiting:Ko,onExited:Ko},Xo.UNMOUNTED=Vo,Xo.EXITED=Qo,Xo.ENTERING=Jo,Xo.ENTERED=Wo,Xo.EXITING=Zo;const qo=Xo;var $o=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Uo(n.className,r):n.setAttribute("class",Uo(n.className&&n.className.baseVal||"",r)));var n,r})},ei=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var r=e.resolveArguments(t,n),o=r[0],i=r[1];e.removeClasses(o,"exit"),e.addClass(o,i?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var r=e.resolveArguments(t,n),o=r[0],i=r[1]?"appear":"enter";e.addClass(o,i,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var r=e.resolveArguments(t,n),o=r[0],i=r[1]?"appear":"enter";e.removeClasses(o,i),e.addClass(o,i,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+t:n[t];return{baseClassName:o,activeClassName:r?o+"-active":n[t+"Active"],doneClassName:r?o+"-done":n[t+"Done"]}},e}Fo(n,t);var r=n.prototype;return r.addClass=function(e,t,n){var r,o,i=this.getClassNames(t)[n+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&a&&(i+=" "+a),"active"===n&&e&&Yo(e),i&&(this.appliedClasses[t][n]=i,o=i,(r=e)&&o&&o.split(" ").forEach(function(e){return i=e,void((o=r).classList?o.classList.add(i):(t=o,n=i,(t.classList?!!n&&t.classList.contains(n):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+n+" "))||("string"==typeof o.className?o.className=o.className+" "+i:o.setAttribute("class",(o.className&&o.className.baseVal||"")+" "+i))));var t,n,o,i}))},r.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&$o(e,r),o&&$o(e,o),i&&$o(e,i)},r.render=function(){var t=this.props,n=(t.classNames,yn(t,["classNames"]));return e.default.createElement(qo,Re({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(e.default.Component);ei.defaultProps={classNames:""},ei.propTypes={};const ti=ei;function ni(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ri(e,t);var n={}.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)?ri(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 ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const oi=function(t){var n=(0,e.useRef)(),r=ni((0,e.useState)(t.initialValue||""),2),o=r[0],i=r[1],a=ni((0,e.useState)([]),2),s=a[0],l=a[1],u=ni((0,e.useState)(null),2),c=u[0],p=u[1];(0,e.useEffect)(function(){t.focus&&n.current.querySelector("input").focus({preventScroll:!0})},[]),(0,e.useEffect)(function(){t.onChange&&t.onChange(o)},[o]);var f=function(){if(null!==c)t.onSubmit(s[c]);else{var e=o.trim();if(e){var n=Array.isArray(t.vocabulary)?t.vocabulary.find(function(t){return(t.label||t).toLowerCase()===e.toLowerCase()}):null;n?t.onSubmit(n):t.onSubmit(e)}}i(""),l([]),p(null)};return e.default.createElement("div",{ref:n,className:"r6o-autocomplete"},e.default.createElement("div",null,e.default.createElement("input",{onKeyDown:function(e){if(13===e.which)f();else if(27===e.which)t.onCancel&&t.onCancel();else if(s.length>0){if(38===e.which)if(null===c)p(0);else{var n=Math.max(0,c-1);p(n)}else if(40===e.which)if(null===c)p(0);else{var r=Math.min(s.length-1,c+1);p(r)}}else 40===e.which&&Array.isArray(t.vocabulary)&&l(t.vocabulary)},onChange:function(e){var n=e.target.value;i(n),p(null),n?function(e){if("function"==typeof t.vocabulary){var n=(i=e,(0,t.vocabulary)(i));n.then?n.then(l):l(n)}else{var r=(o=e,t.vocabulary.filter(function(e){return(e.label?e.label:e).toLowerCase().startsWith(o.toLowerCase())}));l(r)}var o,i}(n):l([])},value:o,placeholder:t.placeholder})),e.default.createElement("ul",null,s.length>0&&s.map(function(t,n){return e.default.createElement("li",{key:"".concat(t.label?t.label:t).concat(n),onClick:f,onMouseEnter:function(){return p(n)},style:c===n?{backgroundColor:"#bde4ff"}:{}},t.label?t.label:t)})))};function ii(e){return(ii="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 ai(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 si(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ai(Object(n),!0).forEach(function(t){li(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function li(e,t,n){return r=function(e){if("object"!=ii(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ii(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==ii(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}function ui(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const ci=function(t){var n=t.annotation?t.annotation.bodies.filter(function(e){return"tagging"===e.purpose}):[],r=n.slice().reverse().find(function(e){return e.draft})||{type:"TextualBody",value:"",purpose:"tagging",draft:!0},o=n.filter(function(e){return e!=r}),i=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return ui(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ui(e,2):void 0}}(e)||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.")}()}((0,e.useState)(!1)),a=i[0],s=i[1],l=function(e){return function(t){s(a!==e&&e)}},u=function(e){return function(n){n.stopPropagation(),t.onRemoveBody(e)}},c=function(e){return e.value||e.source.label};return e.default.createElement("div",{className:"r6o-widget r6o-tag"},o.length>0&&e.default.createElement("ul",{className:"r6o-taglist"},o.map(function(n){return e.default.createElement("li",{key:c(n),onClick:l(n)},e.default.createElement("span",{className:"r6o-label"},c(n)),!t.readOnly&&e.default.createElement(ti,{in:a===n,timeout:200,classNames:"r6o-delete"},e.default.createElement("span",{className:"r6o-delete-wrapper",onClick:u(n)},e.default.createElement("span",{className:"r6o-delete"},e.default.createElement(Oo,{width:12})))))})),!t.readOnly&&e.default.createElement(oi,{focus:t.focus,placeholder:t.textPlaceHolder||Ee.t("Add tag..."),vocabulary:t.vocabulary||[],onChange:function(e){var n=r.value.trim(),o=e.trim();0===n.length&&o.length>0?t.onAppendBody(si(si({},r),{},{value:o})):n.length>0&&0===o.length?t.onRemoveBody(r):n!==o&&t.onUpdateBody(r,si(si({},r),{},{value:o}))},onSubmit:function(e){var n=e.uri?{type:"SpecificResource",purpose:"tagging",source:{id:e.uri,label:e.label}}:{type:"TextualBody",purpose:"tagging",value:e.label||e};0===r.value.trim().length?t.onAppendBody(n):t.onUpdateBody(r,n)}}))};function pi(e){return(pi="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 fi(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 di(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fi(Object(n),!0).forEach(function(t){hi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hi(e,t,n){return(t=mi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mi(e){var t=function(e){if("object"!=pi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pi(t)?t:t+""}function yi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(yi=function(){return!!e})()}function bi(e){return(bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gi(e,t){return(gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var vi=function(t){function n(t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=function(e,t,n){return t=bi(t),function(e,t){if(t&&("object"==pi(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)}(e,yi()?Reflect.construct(t,n||[],bi(e).constructor):t.apply(e,n))}(this,n,[t])).element=e.default.createRef(),r}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gi(e,t)}(n,t),function(e,t){return t&&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,mi(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"renderWidget",value:function(e){for(var t=this.props.widget(di(di({annotation:e.annotation,readOnly:e.readOnly},e.config),{},{onAppendBody:function(t,n){return e.onAppendBody(t,n)},onUpdateBody:function(t,n,r){return e.onUpdateBody(t,n,r)},onUpsertBody:function(t,n,r){return e.onUpsertBody(t,n,r)},onRemoveBody:function(t,n){return e.onRemoveBody(t,n)},onBatchModify:function(t,n){return e.onBatchModify(t,n)},onSetProperty:function(t,n){return e.onSetProperty(t,n)},onAddContext:function(t){return e.onAddContext(t)},onSaveAndClose:function(){return e.onSaveAndClose()}}));this.element.current.firstChild;)this.element.current.removeChild(this.element.current.lastChild);this.element.current.appendChild(t)}},{key:"componentDidMount",value:function(){this.renderWidget(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.element.current&&this.props.annotation!==e.annotation&&this.renderWidget(e)}},{key:"render",value:function(){return e.default.createElement("div",{ref:this.element,className:"widget"})}}])}(e.Component),wi=["widget","force"];window.React=e.default,window.ReactDOM=e.default;var Ai={COMMENT:Ho,TAG:ci},Si=[e.default.createElement(Ho,null),e.default.createElement(ci,null)],Oi=function(t){var n=function(t,n,r){if("string"==typeof t||t instanceof String)return e.default.createElement(Ai[t],n);if("react"===(null==r?void 0:r.toLowerCase()))return e.default.createElement(t,n);if("plainjs"===(null==r?void 0:r.toLowerCase()))return e.default.createElement(vi,{widget:t,config:n});if(function(e){var t;return"function"==typeof e&&!(null===(t=e.prototype)||void 0===t||!t.isReactComponent)}(o=t)||function(e){return"function"==typeof e&&(String(e).match(/return .+\(['|"].+['|"],\s*\{/g)||String(e).match(/return .+preact_compat/)||String(e).match(/return .+\.createElement/g))}(o))return e.default.createElement(t,n);if("function"==typeof t||t instanceof Function)return e.default.createElement(vi,{widget:t,config:n});throw"".concat(t," is not a valid plugin");var o};if(t.widget){var r=t.widget,o=t.force,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,wi);return n(r,i,o)}return n(t)};const Ei=function(e,t,n,r){var o=e.getBoundingClientRect();t.className="r6o-editor r6o-arrow-top r6o-arrow-left";var i=n.getBoundingClientRect(),a=i.left,s=i.top,l=i.right,u=i.bottom;if(t.style.top="".concat(u-o.top+14,"px"),t.style.left="".concat(a-o.left,"px"),r){var c=t.children[1].getBoundingClientRect(),p=e.ownerDocument.defaultView,f=p.innerWidth,d=p.innerHeight;if(c.right>f&&(t.classList.remove("r6o-arrow-left"),t.classList.add("r6o-arrow-right"),t.style.left="".concat(l-c.width-o.left,"px")),c.bottom>d){t.classList.remove("r6o-arrow-top"),t.classList.add("r6o-arrow-bottom");var h=t.children[1].getBoundingClientRect().height;t.style.top="".concat(s-o.top-h-14,"px")}var m=t.children[1].getBoundingClientRect();if(m.top<0){t.classList.add("pushed","down"),t.style.top="".concat(-o.top,"px");var y=u-o.top;m.height-o.top>y&&t.classList.remove("r6o-arrow-bottom")}m.left<0&&(t.classList.add("pushed","right"),t.style.left="".concat(-o.left,"px")),requestAnimationFrame(function(){return t.style.opacity=1})}};var xi=["draft"];function Ci(e){return(Ci="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 Mi(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 ji(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mi(Object(n),!0).forEach(function(t){Ri(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pi(e){return function(e){if(Array.isArray(e))return Ii(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){if("string"==typeof e)return Ii(e,t);var n={}.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)?Ii(e,t):void 0}}(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 Ii(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ki(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ki=function(){return!!e})()}function Ti(e){return(Ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Di(e,t){return(Di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ri(e,t,n){return(t=Ni(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ni(e){var t=function(e){if("object"!=Ci(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ci(t)?t:t+""}var Li,Bi=function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.left,o=t.width,i=t.height;return"".concat(n,", ").concat(r,", ").concat(o,", ").concat(i)},_i=function(t){function n(t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),Ri(r=function(e,t,n){return t=Ti(t),function(e,t){if(t&&("object"==Ci(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)}(e,ki()?Reflect.construct(t,n||[],Ti(e).constructor):t.apply(e,n))}(this,n,[t]),"initResizeObserver",function(){var e,t=void 0===r.props.autoPosition||r.props.autoPosition;if(null!==(e=window)&&void 0!==e&&e.ResizeObserver){var n=new ResizeObserver(function(){r.state.dragged||Ei(r.props.wrapperEl,r.element.current,r.props.selectedElement,t)});return n.observe(r.props.wrapperEl),function(){return n.disconnect()}}r.state.dragged||Ei(r.props.wrapperEl,r.element.current,r.props.selectedElement,t)}),Ri(r,"creationMeta",function(e){var t={},n=r.props.env.user;return n&&(t.creator={},n.id&&(t.creator.id=n.id),n.displayName&&(t.creator.name=n.displayName),t[e.created?"modified":"created"]=r.props.env.getCurrentTimeAdjusted()),t}),Ri(r,"getCurrentAnnotation",function(){return r.state.currentAnnotation.clone()}),Ri(r,"hasChanges",function(){var e;return!(null!==(e=r.props.annotation)&&void 0!==e&&e.isEqual(r.state.currentAnnotation))}),Ri(r,"updateCurrentAnnotation",function(e,t){r.setState({currentAnnotation:r.state.currentAnnotation.clone(e)},function(){t?r.onOk():r.props.onChanged&&r.props.onChanged()})}),Ri(r,"onAppendBody",function(e,t){return r.updateCurrentAnnotation({body:[].concat(Pi(r.state.currentAnnotation.bodies),[ji(ji({},e),r.creationMeta(e))])},t)}),Ri(r,"onUpdateBody",function(e,t,n){return r.updateCurrentAnnotation({body:r.state.currentAnnotation.bodies.map(function(n){return n===e?ji(ji({},t),r.creationMeta(t)):n})},n)}),Ri(r,"onRemoveBody",function(e,t){return r.updateCurrentAnnotation({body:r.state.currentAnnotation.bodies.filter(function(t){return t!==e})},t)}),Ri(r,"onUpsertBody",function(e,t,n){if(null==e&&null!=t)r.onAppendBody(t,n);else if(null!=e&&null!=t)r.onUpdateBody(e,t,n);else if(null!=e&&null==t){var o=r.state.currentAnnotation.bodies.find(function(t){return t.purpose===e.purpose});o?r.onUpdateBody(o,e,n):r.onAppendBody(e,n)}}),Ri(r,"onBatchModify",function(e,t){var n=e.filter(function(e){return"upsert"===e.action&&e.body}).map(function(e){return{previous:r.state.currentAnnotation.bodies.find(function(t){return t.purpose===e.body.purpose}),updated:ji(ji({},e.body),r.creationMeta(e.body))}}),o=e.filter(function(e){return"remove"===e.action}).map(function(e){return e.body}),i=[].concat(Pi(e.filter(function(e){return"append"===e.action||"upsert"===e.action&&e.updated&&!e.previous}).map(function(e){return ji(ji({},e.body),r.creationMeta(e.body))})),Pi(n.filter(function(e){return!e.previous}).map(function(e){return e.updated}))),a=[].concat(Pi(e.filter(function(e){return"update"===e.action||"upsert"===e.action&&e.updated&&e.previous}).map(function(e){return{previous:e.previous,updated:ji(ji({},e.updated),r.creationMeta(e.updated))}})),Pi(n.filter(function(e){return e.previous}))),s=[].concat(Pi(r.state.currentAnnotation.bodies.filter(function(e){return!o.includes(e)}).map(function(e){var t=a.find(function(t){return t.previous===e});return t?t.updated:e})),Pi(i));r.updateCurrentAnnotation({body:s},t)}),Ri(r,"onSetProperty",function(e,t){if(["@context","id","type","body","target"].includes(e))throw new Exception("Cannot set ".concat(e," - not allowed"));if(t)r.updateCurrentAnnotation(Ri({},e,t));else{var n=r.currentAnnotation.clone();delete n[e],r.setState({currentAnnotation:n})}}),Ri(r,"onAddContext",function(e){var t=r.state.currentAnnotation,n=Array.isArray(t.context)?t.context:[t.context];n.indexOf(e)<0&&(n.push(e),r.updateCurrentAnnotation({"@context":n}))}),Ri(r,"onCancel",function(){return r.props.onCancel(r.props.annotation)}),Ri(r,"onOk",function(){var e=function(e){return e.clone({body:e.bodies.map(function(e){return e.draft,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,xi)})})},t=r.state.currentAnnotation;0!==t.bodies.length||r.props.allowEmpty?t.isSelection?r.props.onAnnotationCreated(e(t).toAnnotation()):r.props.onAnnotationUpdated(e(t),r.props.annotation):t.isSelection?r.onCancel():r.props.onAnnotationDeleted(r.props.annotation)}),Ri(r,"onDelete",function(){return r.props.onAnnotationDeleted(r.props.annotation)}),r.element=e.default.createRef(),r.state={currentAnnotation:t.annotation,dragged:!1,selectionBounds:Bi(t.selectedElement)},r}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Di(e,t)}(n,t),function(e,t){return t&&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,Ni(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"componentWillReceiveProps",value:function(e){var t,n=this.state.selectionBounds,r=Bi(e.selectedElement);null!==(t=this.props.annotation)&&void 0!==t&&t.isEqual(e.annotation)?this.setState({selectionBounds:r}):this.setState({currentAnnotation:e.annotation,selectionBounds:r}),this.props.modifiedTarget!=e.modifiedTarget&&this.state.currentAnnotation&&this.updateCurrentAnnotation({target:this.props.modifiedTarget}),n!=r&&this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}},{key:"componentDidMount",value:function(){var e=this;this.removeObserver=this.initResizeObserver(),new MutationObserver(function(){e.element.current&&(e.removeObserver&&e.removeObserver(),e.removeObserver=e.initResizeObserver())}).observe(this.element.current,{childList:!0,subtree:!0})}},{key:"componentWillUnmount",value:function(){this.removeObserver&&this.removeObserver()}},{key:"render",value:function(){var t=this,n=this.state.currentAnnotation,r=this.props.widgets?this.props.widgets.map(Oi):Si,o=n&&(n.bodies.length>0||this.props.allowEmpty)&&!this.props.readOnly&&!n.isSelection&&!r.some(function(e){return!!e.type.disableDelete&&e.type.disableDelete(n,ji(ji({},e.props),{},{readOnly:t.props.readOnly,env:t.props.env}))});return e.default.createElement(a(),{disabled:!this.props.detachable,handle:".r6o-draggable",cancel:".r6o-btn, .r6o-btn *",onDrag:function(){return t.setState({dragged:!0})}},e.default.createElement("div",{ref:this.element,className:this.state.dragged?"r6o-editor dragged":"r6o-editor"},e.default.createElement("div",{className:"r6o-arrow"}),e.default.createElement("div",{className:"r6o-editor-inner"},r.map(function(r,o){return e.default.cloneElement(r,{key:"".concat(o),focus:0===o,annotation:n,readOnly:t.props.readOnly,env:t.props.env,onAppendBody:t.onAppendBody,onUpdateBody:t.onUpdateBody,onRemoveBody:t.onRemoveBody,onUpsertBody:t.onUpsertBody,onBatchModify:t.onBatchModify,onSetProperty:t.onSetProperty,onAddContext:t.onAddContext,onSaveAndClose:t.onOk})}),this.props.readOnly?e.default.createElement("div",{className:"r6o-footer"},e.default.createElement("button",{className:"r6o-btn",onClick:this.onCancel},Ee.t("Close"))):e.default.createElement("div",{className:this.props.detachable?"r6o-footer r6o-draggable":"r6o-footer"},o&&e.default.createElement("button",{className:"r6o-btn left delete-annotation",title:Ee.t("Delete"),onClick:this.onDelete},e.default.createElement(Eo,{width:12})),e.default.createElement("button",{className:"r6o-btn outline",onClick:this.onCancel},Ee.t("Cancel")),e.default.createElement("button",{className:"r6o-btn ",onClick:this.onOk},Ee.t("Ok"))))))}}])}(e.Component),Gi=r(8202),Hi=r.n(Gi),Fi="http://www.w3.org/2000/svg",Ui=function(e){var t=e.getAttribute("class");return t?new Set(t.split(" ")):new Set},zi=function(e,t){var n=Ui(e);n.add(t),e.setAttribute("class",Array.from(n).join(" "))},Yi=function(e,t){var n=Ui(e);n.delete(t),0===n.size?e.removeAttribute("class"):e.setAttribute("class",Array.from(n).join(" "))},Vi=function(e,t){return Ui(e).has(t)},Qi=new Uint8Array(16);function Ji(){if(!Li&&!(Li="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 Li(Qi)}const Wi=/^(?:[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;for(var Zi=[],Xi=0;Xi<256;++Xi)Zi.push((Xi+256).toString(16).substr(1));const Ki=function(e,t,n){var r=(e=e||{}).random||(e.rng||Ji)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Zi[e[n+0]]+Zi[e[n+1]]+Zi[e[n+2]]+Zi[e[n+3]]+"-"+Zi[e[n+4]]+Zi[e[n+5]]+"-"+Zi[e[n+6]]+Zi[e[n+7]]+"-"+Zi[e[n+8]]+Zi[e[n+9]]+"-"+Zi[e[n+10]]+Zi[e[n+11]]+Zi[e[n+12]]+Zi[e[n+13]]+Zi[e[n+14]]+Zi[e[n+15]]).toLowerCase();if("string"!=typeof(t=r)||!Wi.test(t))throw TypeError("Stringified UUID is invalid");return r}(r)};var qi,$i=r(2495),ea=r.n($i);function ta(e){return(ta="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 na(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 ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?na(Object(n),!0).forEach(function(t){oa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):na(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oa(e,t,n){return(t=ia(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ia(e){var t=function(e){if("object"!=ta(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ta(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ta(t)?t:t+""}var aa=function(e,t){return t&&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,ia(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),oa(this,"clone",function(t,n){return new e(ra(ra({},r.underlying),t),ra(ra({},r.opts),n))}),oa(this,"selector",function(e){var t=r.underlying.target;if(t.selector)return(Array.isArray(t.selector)?t.selector:[t.selector]).find(function(t){return t.type===e})}),this.underlying=t,this.opts=n},[{key:"isEqual",value:function(e){return"Annotation"===(null==e?void 0:e.type)&&(this.underlying===e.underlying||!(!this.underlying.id||!e.underlying.id)&&ea()(this.underlying,e.underlying))}},{key:"readOnly",get:function(){var e;return null===(e=this.opts)||void 0===e?void 0:e.readOnly}},{key:"id",get:function(){return this.underlying.id}},{key:"context",get:function(){return this.underlying["@context"]}},{key:"type",get:function(){return this.underlying.type}},{key:"motivation",get:function(){return this.underlying.motivation}},{key:"body",get:function(){return this.underlying.body}},{key:"target",get:function(){return this.underlying.target}},{key:"bodies",get:function(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]},set:function(e){this.underlying.body=e}},{key:"targets",get:function(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}},{key:"quote",get:function(){var e;return null===(e=this.selector("TextQuoteSelector"))||void 0===e?void 0:e.exact}},{key:"start",get:function(){var e;return null===(e=this.selector("TextPositionSelector"))||void 0===e?void 0:e.start}},{key:"end",get:function(){var e;return null===(e=this.selector("TextPositionSelector"))||void 0===e?void 0:e.end}}]);function sa(e){return(sa="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 la(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 ua(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?la(Object(n),!0).forEach(function(t){ca(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):la(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ca(e,t,n){return(t=pa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pa(e){var t=function(e){if("object"!=sa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sa(t)?t:t+""}qi=aa,oa(aa,"create",function(e){var t={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:"#".concat(Ki()),body:[]};return new qi(ra(ra({},t),e))});var fa=function(e,t){return t&&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,pa(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),ca(this,"clone",function(t){var n=new e;return n.underlying=JSON.parse(JSON.stringify(r.underlying)),t&&(n.underlying=ua(ua({},n.underlying),t)),n}),ca(this,"selector",function(e){var t=r.underlying.target;if(t.selector)return(Array.isArray(t.selector)?t.selector:[t.selector]).find(function(t){return t.type===e})}),ca(this,"toAnnotation",function(){var e=Object.assign({},r.underlying,{type:"Annotation",id:"#".concat(Ki())});return new aa(e)}),this.underlying={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Selection",body:n||[],target:t}},[{key:"context",get:function(){return this.underlying["@context"]}},{key:"type",get:function(){return this.underlying.type}},{key:"body",get:function(){return this.underlying.body}},{key:"target",get:function(){return this.underlying.target}},{key:"targets",get:function(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}},{key:"isEqual",value:function(e){return!!e&&ea()(this.underlying,e.underlying)}},{key:"bodies",get:function(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}},{key:"quote",get:function(){var e;return null===(e=this.selector("TextQuoteSelector"))||void 0===e?void 0:e.exact}},{key:"isSelection",get:function(){return!0}}]);function da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ha=function(e,t){var n,r=e.selector("FragmentSelector");if(null!=r&&r.conformsTo.startsWith("http://www.w3.org/TR/media-frags")){var o=r.value,i=o.includes(":")?o.substring(o.indexOf("=")+1,o.indexOf(":")):"pixel",a=function(e){if(Array.isArray(e))return e}(n=(o.includes(":")?o.substring(o.indexOf(":")+1):o.substring(o.indexOf("=")+1)).split(",").map(parseFloat))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),4!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return da(e,4);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?da(e,4):void 0}}(n)||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.")}(),s=a[0],l=a[1],u=a[2],c=a[3];return"percent"===i.toLowerCase()&&(s=s*t.naturalWidth/100,l=l*t.naturalHeight/100,u=u*t.naturalWidth/100,c=c*t.naturalHeight/100),{x:s,y:l,w:u,h:c}}},ma=function(e,t,n,r,o,i,a){return"percent"===(null==i?void 0:i.toLowerCase())?(s=t,l=n,u=r,p=a,f=e/(c=o).naturalWidth*100,d=s/c.naturalHeight*100,h=l/c.naturalWidth*100,m=u/c.naturalHeight*100,{source:c.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:"xywh=percent:".concat(f,",").concat(d,",").concat(h,",").concat(m)},color:p,renderedVia:{name:"rect"}}):function(e,t,n,r,o,i){return{source:null==o?void 0:o.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:"xywh=pixel:".concat(e,",").concat(t,",").concat(n,",").concat(r)},color:i,renderedVia:{name:"rect"}}}(e,t,n,r,o,a);var s,l,u,c,p,f,d,h,m},ya=function(e,t,n,r,o){e.setAttribute("x",t),e.setAttribute("y",n),e.setAttribute("width",r),e.setAttribute("height",o)},ba=function(e,t,n){e.setAttribute("cx",t),e.setAttribute("cy",n),e.setAttribute("r",7)},ga=function(e,t,n,r,o){var i=document.createElementNS(Fi,"path");i.setAttribute("fill-rule","evenodd");var a=e.naturalWidth,s=e.naturalHeight;return i.setAttribute("d","M0 0 h".concat(a," v").concat(s," h-").concat(a," z M").concat(t," ").concat(n," h").concat(r," v").concat(o," h-").concat(r," z")),i},va=function(e,t,n,r,o,i){var a=t.naturalWidth,s=t.naturalHeight;e.setAttribute("d","M0 0 h".concat(a," v").concat(s," h-").concat(a," z M").concat(n," ").concat(r," h").concat(o," v").concat(i," h-").concat(o," z"))},wa=function(e,t,n,r){var o="Annotation"===e.type||"Selection"===e.type?ha(e,t):{x:e,y:t,w:n,h:r},i=o.x,a=o.y,s=o.w,l=o.h,u=document.createElementNS(Fi,"g");if(0===s&&0===l){var c;zi(u,"a9s-point"),zi(u,"a9s-non-scaling"),u.setAttribute("transform-origin","".concat(i," ").concat(a));var p=document.createElementNS(Fi,"circle"),f=document.createElementNS(Fi,"circle");f.setAttribute("class","a9s-inner"),ba(f,i,a),p.setAttribute("class","a9s-outer"),ba(p,i,a),null!==(c=e.target)&&void 0!==c&&c.color&&(f.setAttribute("style","stroke: ".concat(e.target.color,";fill: none;")),p.setAttribute("style","stroke: ".concat(e.target.color,";fill: none;"))),u.appendChild(p),u.appendChild(f)}else{var d,h=document.createElementNS(Fi,"rect"),m=document.createElementNS(Fi,"rect");m.setAttribute("class","a9s-inner"),ya(m,i,a,s,l),h.setAttribute("class","a9s-outer"),ya(h,i,a,s,l),null!==(d=e.target)&&void 0!==d&&d.color&&(m.setAttribute("style","stroke: ".concat(e.target.color,";")),h.setAttribute("style","stroke: ".concat(e.target.color,";"))),u.appendChild(h),u.appendChild(m)}return u},Aa=function(e){var t=e.querySelector(".a9s-outer");return"rect"===t.nodeName?{x:parseFloat(t.getAttribute("x")),y:parseFloat(t.getAttribute("y")),w:parseFloat(t.getAttribute("width")),h:parseFloat(t.getAttribute("height"))}:{x:parseFloat(t.getAttribute("cx")),y:parseFloat(t.getAttribute("cy")),w:0,h:0}},Sa=function(e,t,n,r,o){var i=e.querySelector(".a9s-inner"),a=e.querySelector(".a9s-outer");"rect"===a.nodeName?(ya(i,t,n,r,o),ya(a,t,n,r,o)):(ba(i,t,n),ba(a,t,n))};function Oa(e){return(Oa="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 Ea(e,t,n){return(t=xa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e){var t=function(e){if("object"!=Oa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Oa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oa(t)?t:t+""}var Ca=function(e,t){return t&&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,xa(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o,i,a){var s=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ea(this,"dragTo",function(e,t){s.group.style.display=null,s.opposite=[e,t];var n=s.bbox,r=n.x,o=n.y,i=n.w,a=n.h;va(s.mask,s.env.image,r,o,i,a),Sa(s.rect,r,o,i,a)}),Ea(this,"getBoundingClientRect",function(){return s.rect.getBoundingClientRect()}),Ea(this,"toSelection",function(){var e=s.bbox,t=e.x,n=e.y,r=e.w,o=e.h;return new fa(ma(t,n,r,o,s.env.image,s.config.fragmentUnit,s.color))}),Ea(this,"destroy",function(){s.group.parentNode.removeChild(s.group),s.mask=null,s.rect=null,s.group=null}),this.anchor=[t,n],this.opposite=[t,n],this.config=o,this.env=i,this.color=a,this.group=document.createElementNS(Fi,"g"),this.mask=ga(i.image,t,n,2,2),this.mask.setAttribute("class","a9s-selection-mask"),this.rect=wa(t,n,2,2),this.rect.setAttribute("class","a9s-selection"),a&&(this.rect.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(a,";")),this.rect.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(a,";"))),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask),this.group.appendChild(this.rect),r.appendChild(this.group)},[{key:"bbox",get:function(){var e=this.opposite[0]-this.anchor[0],t=this.opposite[1]-this.anchor[1];return{x:e>0?this.anchor[0]:this.opposite[0],y:t>0?this.anchor[1]:this.opposite[1],w:Math.max(1,Math.abs(e)),h:Math.max(1,Math.abs(t))}}},{key:"element",get:function(){return this.rect}}]),Ma={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},ja=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0};function Pa(e){return(Pa="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 Ia(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ka(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,Ga(r.key),r)}}function Ta(e,t,n){return t&&ka(e.prototype,t),n&&ka(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Da(e,t,n){return t=Na(t),function(e,t){if(t&&("object"==Pa(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)}(e,Ra()?Reflect.construct(t,n||[],Na(e).constructor):t.apply(e,n))}function Ra(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ra=function(){return!!e})()}function Na(e){return(Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function La(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&&Ba(e,t)}function Ba(e,t){return(Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _a(e,t,n){return(t=Ga(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ga(e){var t=function(e){if("object"!=Pa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pa(t)?t:t+""}var Ha="An implementation is missing",Fa=ja(),Ua=function(e){function t(e,n,r,o){var i;Ia(this,t),_a(i=Da(this,t),"enableResponsive",function(){window.ResizeObserver&&(i.resizeObserver=new ResizeObserver(function(){var e=i.svg.getBoundingClientRect(),t=i.svg.viewBox.baseVal,n=t.width,r=t.height;i.scale=Math.max(n/e.width,r/e.height),i.onScaleChanged&&i.onScaleChanged(i.scale)}),i.resizeObserver.observe(i.svg.parentNode))}),_a(i,"getSVGPoint",function(e){var t=i.svg.createSVGPoint();if(Fa){var n=i.svg.getBoundingClientRect(),r=e.clientX-n.x,o=e.clientY-n.y,a=i.svg.getBoundingClientRect(),s=a.left,l=a.top;return t.x=r+s,t.y=o+l,t.matrixTransform(i.g.getScreenCTM().inverse())}return t.x=e.offsetX,t.y=e.offsetY,t.matrixTransform(i.g.getCTM().inverse())}),_a(i,"drawHandle",function(e,t){var n=document.createElementNS(Fi,"g");n.setAttribute("class","a9s-handle");var r=document.createElementNS(Fi,"g"),o=function(n){var r=document.createElementNS(Fi,"circle");return r.setAttribute("cx",e),r.setAttribute("cy",t),r.setAttribute("r",n),r.setAttribute("transform-origin","".concat(e," ").concat(t)),r},a=i.config.handleRadius||6,s=o(a);s.setAttribute("class","a9s-handle-inner");var l=o(a+1);return l.setAttribute("class","a9s-handle-outer"),r.appendChild(l),r.appendChild(s),n.appendChild(r),n}),_a(i,"setHandleXY",function(e,t,n){var r=e.querySelector(".a9s-handle-inner");r.setAttribute("cx",t),r.setAttribute("cy",n),r.setAttribute("transform-origin","".concat(t," ").concat(n));var o=e.querySelector(".a9s-handle-outer");o.setAttribute("cx",t),o.setAttribute("cy",n),o.setAttribute("transform-origin","".concat(t," ").concat(n))}),_a(i,"getHandleXY",function(e){var t=e.querySelector(".a9s-handle-outer");return{x:parseFloat(t.getAttribute("cx")),y:parseFloat(t.getAttribute("cy"))}}),_a(i,"scaleHandle",function(e){var t=e.querySelector(".a9s-handle-inner"),n=e.querySelector(".a9s-handle-outer"),r=i.scale*(i.config.handleRadius||6);t.setAttribute("r",r),n.setAttribute("r",r)}),i.svg=e.closest("svg"),i.g=e,i.config=n,i.env=r,i.color=o,i.scale=1;var a=r.image;return(a instanceof Element||a instanceof HTMLDocument)&&i.enableResponsive(),i}return La(t,e),Ta(t,[{key:"destroy",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null}}])}(n()),za=function(e){function t(e,n,r,o){var i;return Ia(this,t),_a(i=Da(this,t,[e,n,r,o]),"attachListeners",function(e){var t=e.mouseMove,n=e.mouseUp,r=e.dblClick;t&&(i.mouseMove=function(e){var n=i.getSVGPoint(e),r=n.x,o=n.y;i.started||(i.emit("startSelection",{x:r,y:o}),i.started=!0),t(r,o,e)},i.svg.addEventListener("mousemove",i.mouseMove)),n&&(i.mouseUp=function(e){if(0===e.button){var t=i.getSVGPoint(e),r=t.x,o=t.y;n(r,o,e)}},document.addEventListener("mouseup",i.mouseUp)),r&&(i.dblClick=function(e){var t=i.getSVGPoint(e),n=t.x,o=t.y;r(n,o,e)},document.addEventListener("dblclick",i.dblClick))}),_a(i,"detachListeners",function(){i.mouseMove&&i.svg.removeEventListener("mousemove",i.mouseMove),i.mouseUp&&document.removeEventListener("mouseup",i.mouseUp),i.dblClick&&document.removeEventListener("dblclick",i.dblClick)}),_a(i,"start",function(e,t){var n=i.getSVGPoint(e),r=n.x,o=n.y,a=i.env.image,s=a.naturalWidth,l=a.naturalHeight,u=r<0?0:r>s?s:r,c=o<0?0:o>l?l:o;i.startDrawing(u,c,t,e)}),_a(i,"startDrawing",function(e){throw new Error(Ha)}),_a(i,"createEditableShape",function(e,t){throw new Error(Ha)}),i.started=!1,i}return La(t,e),Ta(t,[{key:"isDrawing",get:function(){throw new Error(Ha)}}])}(Ua);function Ya(e){return(Ya="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 Va(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Va=function(){return!!e})()}function Qa(e){return(Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ja(e,t){return(Ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wa(e){var t=function(e){if("object"!=Ya(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ya(t)?t:t+""}za.supports=function(e){throw new Error(Ha)};var Za="An implementation is missing",Xa=function(e){function t(e,n,r,o,i){var a,s,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){(t=Wa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}((s=this,u=[n,r,o,i],l=Qa(l=t),a=function(e,t){if(t&&("object"==Ya(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)}(s,Va()?Reflect.construct(l,u||[],Qa(s).constructor):l.apply(s,u))),"updateState",function(e){throw new Error(Za)}),a.annotation=e,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ja(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){throw new Error(Za)}}])&&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,Wa(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ua);function Ka(e){return function(e){if(Array.isArray(e))return qa(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){if("string"==typeof e)return qa(e,t);var n={}.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)?qa(e,t):void 0}}(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 qa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var $a=/firefox/i.test(navigator.userAgent),es=function(e,t,n,r,o){e.setAttribute("width",r),e.setAttribute("height",o),$a?(e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("transform","translate(".concat(t,", ").concat(n,")"))):(e.setAttribute("x",t),e.setAttribute("y",n))},ts=function(e,t,n){if(!n)return e;Array.isArray(n)||(n=[n]);var r=n.reduce(function(e,n){var r=n(t);if(!r)return e;if("string"==typeof r||r instanceof String)e.className=e.className?"".concat(e.className," ").concat(r):r;else if(r.nodeType===Node.ELEMENT_NODE)e.elements=e.elements?[].concat(Ka(e.elements),[r]):[r];else{var o=r.className,i=r.style,a=r.element;o&&(e.className=e.className?"".concat(e.className," ").concat(o):o),i&&(e.style=e.style?"".concat(e.style," ").concat(i):i),a&&(e.elements=e.elements?[].concat(Ka(e.elements),[a]):[a])}for(var s in r)r.hasOwnProperty(s)&&s.startsWith("data-")&&(e[s]=r[s]);return e},{}),o=r.className,i=r.style,a=r.elements;if(o&&zi(e,o),i){var s=e.querySelector(".a9s-outer"),l=e.querySelector(".a9s-inner");s&&l?(s.setAttribute("style","display:none"),l.setAttribute("style",i)):e.setAttribute("style",i)}for(var u in a&&a.forEach(function(t){return function(e,t){var n=t.getBBox(),r=n.x,o=n.y,i=n.width,a=n.height,s=document.createElementNS(Fi,"svg");s.setAttribute("class","a9s-formatter-el"),es(s,r,o,i,a);var l=document.createElementNS(Fi,"g");l.appendChild(e),s.appendChild(l),t.append(s)}(t,e)}),r)r.hasOwnProperty(u)&&u.startsWith("data-")&&e.setAttribute(u,r[u])},ns=function(e,t,n,r,o){var i=e.querySelector(".a9s-formatter-el");i&&es(i,t,n,r,o)};function rs(e){return(rs="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 os(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return is(e,t);var n={}.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)?is(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 is(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function as(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(as=function(){return!!e})()}function ss(){return ss="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ls(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ss.apply(null,arguments)}function ls(e){return(ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function us(e,t){return(us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cs(e,t,n){return(t=ps(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ps(e){var t=function(e){if("object"!=rs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rs(t)?t:t+""}var fs="corner",ds="edge",hs=function(e){function t(e,n,r,o,i){var a,s,l,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),cs((s=this,u=[e,n,r,o,i],l=ls(l=t),a=function(e,t){if(t&&("object"==rs(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)}(s,as()?Reflect.construct(l,u||[],ls(s).constructor):l.apply(s,u))),"onScaleChanged",function(){return a.handles.map(a.scaleHandle)}),cs(a,"setSize",function(e,t,n,r){Sa(a.rectangle,e,t,n,r),va(a.mask,a.env.image,e,t,n,r),ns(a.elementGroup,e,t,n,r);var o=os(a.handles,8),i=o[0],s=o[1],l=o[2],u=o[3],c=o[4],p=o[5],f=o[6],d=o[7];a.setHandleXY(i,e,t),a.setHandleXY(s,e+n,t),a.setHandleXY(l,e+n,t+r),a.setHandleXY(u,e,t+r),a.enableEdgeControls&&(a.setHandleXY(c,e+n/2,t),a.setHandleXY(p,e+n,t+r/2),a.setHandleXY(f,e+n/2,t+r),a.setHandleXY(d,e,t+r/2))}),cs(a,"stretchCorners",function(e,t,n){var r=a.getHandleXY(t),o=n.x-r.x,i=n.y-r.y,s=o>0?r.x:n.x,l=i>0?r.y:n.y,u=Math.abs(o),c=Math.abs(i);return a.setSize(s,l,u,c),{x:s,y:l,w:u,h:c}}),cs(a,"stretchEdge",function(e,t,n){var r=a.getHandleXY(t),o=Aa(a.rectangle),i=e%2==0,s=i?o.w:n.x-r.x,l=i?n.y-r.y:o.h,u=i?o.x:s>0?r.x:n.x,c=i?l>0?r.y:n.y:o.y,p=Math.abs(s),f=Math.abs(l);return a.setSize(u,c,p,f),{x:u,y:c,w:p,h:f}}),cs(a,"onGrab",function(e,t){return function(n){if(0===n.button){a.grabbedElem=e,a.grabbedType=t;var r=a.getSVGPoint(n),o=Aa(a.rectangle),i=o.x,s=o.y;a.mouseOffset={x:r.x-i,y:r.y-s}}}}),cs(a,"onMouseMove",function(e){if(0===e.button){var t=function(e,t){return e<0?0:e>t?t:e};if(a.grabbedElem){var n=a.getSVGPoint(e);if(a.grabbedElem===a.rectangle){var r,o,i=Aa(a.rectangle),s=i.w,l=i.h,u=a.env.image,c=u.naturalWidth,p=u.naturalHeight,f=t(n.x-a.mouseOffset.x,c-s),d=t(n.y-a.mouseOffset.y,p-l);a.setSize(f,d,s,l);var h=null!==(r=a.annotation.target)&&void 0!==r&&r.color?null===(o=a.annotation.target)||void 0===o?void 0:o.color:a.color?a.color:null;a.emit("update",ma(f,d,s,l,a.env.image,a.config.fragmentUnit,h))}else{var m,y,b=a.handles.indexOf(a.grabbedElem),g=a.handles[2^b],v=a.grabbedType===fs?a.stretchCorners(b,g,n):a.stretchEdge(b,g,n),w=v.x,A=v.y,S=v.w,O=v.h,E=null!==(m=a.annotation.target)&&void 0!==m&&m.color?null===(y=a.annotation.target)||void 0===y?void 0:y.color:a.color?a.color:null;a.emit("update",ma(w,A,S,O,a.env.image,a.config.fragmentUnit,E))}}}}),cs(a,"onMouseUp",function(e){a.grabbedElem=null,a.grabbedType=null,a.mouseOffset=null}),cs(a,"updateState",function(e){var t=ha(e,a.env.image),n=t.x,r=t.y,o=t.w,i=t.h;a.setSize(n,r,o,i)}),a.svg.addEventListener("mousemove",a.onMouseMove),a.svg.addEventListener("mouseup",a.onMouseUp);var c=ha(e,o.image),p=c.x,f=c.y,d=c.w,h=c.h;a.containerGroup=document.createElementNS(Fi,"g"),a.mask=ga(o.image,p,f,d,h),a.mask.setAttribute("class","a9s-selection-mask"),a.containerGroup.appendChild(a.mask),a.elementGroup=document.createElementNS(Fi,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.rectangle=wa(p,f,d,h),a.rectangle.querySelector(".a9s-inner").addEventListener("mousedown",a.onGrab(a.rectangle)),e.target.color?(a.rectangle.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(e.target.color,";")),a.rectangle.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(e.target.color,";"))):i&&(a.rectangle.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(i,";")),a.rectangle.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(i,";"))),a.elementGroup.appendChild(a.rectangle),a.enableEdgeControls=r.enableEdgeControls;var m=a.enableEdgeControls?[[p+d/2,f,ds],[p+d,f+h/2,ds],[p+d/2,f+h,ds],[p,f+h/2,ds]]:[];return a.handles=[[p,f,fs],[p+d,f,fs],[p+d,f+h,fs],[p,f+h,fs]].concat(m).map(function(e){var t=os(e,3),n=t[0],r=t[1],o=t[2],i=a.drawHandle(n,r);return i.addEventListener("mousedown",a.onGrab(i,o)),a.elementGroup.appendChild(i),i}),a.containerGroup.appendChild(a.elementGroup),n.appendChild(a.containerGroup),ts(a.rectangle,e,r.formatter),a.grabbedElem=null,a.grabbedType=null,a.mouseOffset=null,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&us(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}},{key:"destroy",value:function(){var e,n;this.containerGroup.parentNode.removeChild(this.containerGroup),(e=this,"function"==typeof(n=ss(ls(t.prototype),"destroy",e))?function(t){return n.apply(e,t)}:n)([])}}])&&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,ps(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function ms(e){return(ms="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 ys(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 bs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ys(Object(n),!0).forEach(function(t){As(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gs=function(){return!!e})()}function vs(e){return(vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ws(e,t){return(ws=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function As(e,t,n){return(t=Ss(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ss(e){var t=function(e){if("object"!=ms(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ms(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ms(t)?t:t+""}var Os=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),As((a=this,l=[e,n,r,o],s=vs(s=t),i=function(e,t){if(t&&("object"==ms(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)}(a,gs()?Reflect.construct(s,l||[],vs(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i.isDrawing||(i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new Ca(e,t,i.g,i.config,i.env,i.color))}),As(i,"stop",function(){i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),As(i,"onMouseMove",function(e,t){var n=i.env.image,r=n.naturalWidth,o=n.naturalHeight,a=Math.min(Math.max(e,0),r),s=Math.min(Math.max(t,0),o);i.rubberband.dragTo(a,s)}),As(i,"onMouseUp",function(){i.detachListeners(),i.started=!1;var e=i.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=i.config.minSelectionWidth||4,o=i.config.minSelectionHeight||4;if(t>=r&&n>=o){var a=i.rubberband.element;a.annotation=i.rubberband.toSelection(),i.emit("complete",a)}else i.emit("cancel");i.stop()}),As(i,"createEditableShape",function(e,t){return new hs(e,i.g,bs(bs({},i.config),{},{formatters:t}),i.env,i.color)}),i.rubberband=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ws(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return null!=this.rubberband}}])&&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,Ss(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function Es(e){return function(e){if(Array.isArray(e))return Ms(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Cs(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 xs(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Cs(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Cs(e,t){if(e){if("string"==typeof e)return Ms(e,t);var n={}.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)?Ms(e,t):void 0}}function Ms(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Os.identifier="rect",Os.supports=function(e){var t=e.selector("FragmentSelector");return null==t?void 0:t.conformsTo.startsWith("http://www.w3.org/TR/media-frags")};var js=function(e){for(var t=0,n=e.length-1,r=0;r<e.length;r++)t+=(e[n][0]+e[r][0])*(e[n][1]-e[r][1]),n=r;return Math.abs(.5*t)},Ps=function(e,t){for(var n=e[0],r=e[1],o=!1,i=0,a=t.length-1;i<t.length;a=i++){var s=t[i][0],l=t[i][1],u=t[a][0],c=t[a][1];l>r!=c>r&&n<(u-s)*(r-l)/(c-l)+s&&(o=!o)}return o},Is=function(e){var t,n=[],r=[],o=xs(e.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(function(e){return e.trim()}));try{for(o.s();!(t=o.n()).done;){var i=t.value,a=i.substring(0,1);if("z"===a.toLowerCase())n.push(Es(r)),r=[];else{var s=i.substring(1).split(" ").map(function(e){return parseFloat(e.trim())}),l=a===a.toUpperCase(),u=l?s[0]:s[0]+r[r.length-1][0],c=l?s[1]:s[1]+r[r.length-1][1];r.push([u,c])}}}catch(p){o.e(p)}finally{o.f()}return r.length>0&&n.push(Es(r)),n};function ks(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ts=function(e){var t=function(e){Array.from(e.attributes).forEach(function(t){t.name.startsWith("on")&&e.removeAttribute(t.name)})},n=e.getElementsByTagName("script");return Array.from(n).reverse().forEach(function(e){return e.parentNode.removeChild(e)}),t(e),Array.from(e.querySelectorAll("*")).forEach(t),e},Ds=function(e){var t,n,r=e.selector("SvgSelector");if(r){var o=new DOMParser,i=r.value,a=o.parseFromString(i,"image/svg+xml"),s=a.lookupPrefix(Fi),l=a.lookupNamespaceURI(null);return s||l?Ts(a).firstChild:Ts((t=a,n=(new XMLSerializer).serializeToString(t.documentElement).replace("<svg>",'<svg xmlns="'.concat(Fi,'">')),(new DOMParser).parseFromString(n,"image/svg+xml").documentElement)).firstChild}},Rs=function(e){var t=Ds(e),n=document.createElementNS(Fi,"g"),r=t.cloneNode(!0);r.setAttribute("class","a9s-inner");var o=t.cloneNode(!0);return o.setAttribute("class","a9s-outer"),e.target.color&&(r.setAttribute("style","stroke: ".concat(e.target.color,";")),o.setAttribute("style","stroke: ".concat(e.target.color,";"))),n.appendChild(o),n.appendChild(r),n},Ns=function(e,t){var n=e.querySelector(".a9s-inner").cloneNode(!0);n.removeAttribute("class"),n.removeAttribute("xmlns");var r=n.outerHTML||(new XMLSerializer).serializeToString(n);return r=r.replace(' xmlns="'.concat(Fi,'"'),""),{source:null==t?void 0:t.src,selector:{type:"SvgSelector",value:"<svg>".concat(r,"</svg>")}}};function Ls(e){return(Ls="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 Bs(e,t,n){return(t=_s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _s(e){var t=function(e){if("object"!=Ls(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ls(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ls(t)?t:t+""}var Gs=function(e,t){return t&&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,_s(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),Bs(this,"redraw",function(){r.mask.setAttribute("d","M0 0 h".concat(r.w," v").concat(r.h," h-").concat(r.w," z M").concat(r.polygon.getAttribute("points")," z"))}),Bs(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.polygon=n,this.mask=document.createElementNS(Fi,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d","M0 0 h".concat(this.w," v").concat(this.h," h-").concat(this.w," z M").concat(this.polygon.getAttribute("points")," z"))},[{key:"element",get:function(){return this.mask}}]);function Hs(e){return(Hs="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 Fs(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 Us(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fs(Object(n),!0).forEach(function(t){Qs(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zs(e){return function(e){if(Array.isArray(e))return Vs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ys(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 Ys(e,t){if(e){if("string"==typeof e)return Vs(e,t);var n={}.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)?Vs(e,t):void 0}}function Vs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qs(e,t,n){return(t=Js(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e){var t=function(e){if("object"!=Hs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hs(t)?t:t+""}var Ws=function(e,t){return t&&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,Js(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qs(this,"setPoints",function(e){var t=e.map(function(e){return"".concat(e[0],",").concat(e[1])}).join(" ");i.outer.setAttribute("points",t),i.inner.setAttribute("points",t)}),Qs(this,"getBoundingClientRect",function(){return i.outer.getBoundingClientRect()}),Qs(this,"dragTo",function(e){i.group.style.display=null,i.mousepos=e;var t=[].concat(zs(i.points),[e]);i.setPoints(t),i.mask.redraw()}),Qs(this,"addPoint",function(){var e,t=function(e){if(Array.isArray(e))return e}(e=i.mousepos)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||Ys(e,2)||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.")}(),n=t[0],r=t[1],o=i.points[i.points.length-1];Math.pow(n-o[0],2)+Math.pow(r-o[1],2)>4&&(i.points=[].concat(zs(i.points),[i.mousepos]),i.setPoints(i.points),i.mask.redraw())}),Qs(this,"destroy",function(){i.group.parentNode.removeChild(i.group),i.polygon=null,i.group=null}),Qs(this,"toSelection",function(){return new fa(Us(Us({},Ns(i.group,i.env.image)),{},{renderedVia:{name:"polygon"}}))}),this.points=[t],this.env=r,this.mousepos=t,this.group=document.createElementNS(Fi,"g"),this.polygon=document.createElementNS(Fi,"g"),this.polygon.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Fi,"polygon"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Fi,"polygon"),this.inner.setAttribute("class","a9s-inner"),o&&(this.outer.setAttribute("style","stroke: ".concat(o,";")),this.inner.setAttribute("style","stroke: ".concat(o,";"))),this.setPoints(this.points),this.mask=new Gs(r.image,this.inner),this.polygon.appendChild(this.outer),this.polygon.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.polygon),n.appendChild(this.group)},[{key:"element",get:function(){return this.polygon}}]);function Zs(e){return(Zs="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 Xs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ks(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ks=function(){return!!e})()}function qs(e,t){return(qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $s(){return $s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=el(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},$s.apply(null,arguments)}function el(e){return(el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tl(e,t,n){return(t=nl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nl(e){var t=function(e){if("object"!=Zs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zs(t)?t:t+""}var rl=function(e){for(var t=e.querySelector(".a9s-inner").points,n=[],r=0;r<t.numberOfItems;r++)n.push(t.getItem(r));return n},ol=function(e){function t(e,n,r,o,i){var a,s,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),tl((s=this,u=[e,n,r,o,i],l=el(l=t),a=function(e,t){if(t&&("object"==Zs(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)}(s,Ks()?Reflect.construct(l,u||[],el(s).constructor):l.apply(s,u))),"onScaleChanged",function(){return a.handles.map(a.scaleHandle)}),tl(a,"setPoints",function(e){var t=function(e){return Math.round(10*e)/10},n=e.map(function(e){return"".concat(t(e.x),",").concat(t(e.y))}).join(" ");a.shape.querySelector(".a9s-inner").setAttribute("points",n);var r=a.shape.querySelector(".a9s-outer");r.setAttribute("points",n),a.mask.redraw();var o=r.getBBox(),i=o.x,s=o.y,l=o.width,u=o.height;ns(a.elementGroup,i,s,l,u)}),tl(a,"onGrab",function(e){return function(t){0===t.button&&(a.grabbedElem=e,a.grabbedAt=a.getSVGPoint(t))}}),tl(a,"onMouseMove",function(e){var t=function(e,t,n){return e+t<0?-e:e+t>n?n-e:t};if(a.grabbedElem){var n=a.getSVGPoint(e);if(a.grabbedElem===a.shape){var r=a.shape.querySelector(".a9s-inner").getBBox(),o=r.x,i=r.y,s=r.width,l=r.height,u=a.env.image,c=u.naturalWidth,p=u.naturalHeight,f=t(o,n.x-a.grabbedAt.x,c-s),d=t(i,n.y-a.grabbedAt.y,p-l),h=rl(a.shape).map(function(e){return{x:e.x+f,y:e.y+d}});a.grabbedAt=n,a.setPoints(h),h.forEach(function(e,t){return a.setHandleXY(a.handles[t],e.x,e.y)}),a.emit("update",Ns(a.shape,a.env.image))}else{var m=a.handles.indexOf(a.grabbedElem),y=rl(a.shape).map(function(e,t){return t===m?n:e});a.setPoints(y),a.setHandleXY(a.handles[m],n.x,n.y),a.emit("update",Ns(a.shape,a.env.image))}}}),tl(a,"onMouseUp",function(e){a.grabbedElem=null,a.grabbedAt=null}),tl(a,"updateState",function(e){var t=Ds(e).getAttribute("points").split(" ").map(function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(",").map(function(e){return parseFloat(e.trim())}))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return Xs(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Xs(e,2):void 0}}(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.")}();return{x:n[0],y:n[1]}});a.setPoints(t),t.forEach(function(e,t){return a.setHandleXY(a.handles[t],e.x,e.y)})}),tl(a,"destroy",function(){a.containerGroup.parentNode.removeChild(a.containerGroup),function(e,t,n){var r=$s(el(e.prototype),"destroy",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,a)([])}),a.svg.addEventListener("mousemove",a.onMouseMove),a.svg.addEventListener("mouseup",a.onMouseUp),a.containerGroup=document.createElementNS(Fi,"g"),a.shape=Rs(e),a.shape.querySelector(".a9s-inner").addEventListener("mousedown",a.onGrab(a.shape)),a.mask=new Gs(o.image,a.shape.querySelector(".a9s-inner")),a.containerGroup.appendChild(a.mask.element),a.elementGroup=document.createElementNS(Fi,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.elementGroup.appendChild(a.shape),a.handles=rl(a.shape).map(function(e){var t=a.drawHandle(e.x,e.y);return t.addEventListener("mousedown",a.onGrab(t)),a.elementGroup.appendChild(t),t}),a.containerGroup.appendChild(a.elementGroup),n.appendChild(a.containerGroup),ts(a.shape,e,r.formatters),a.grabbedElem=null,a.grabbedAt=null,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qs(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}}])&&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,nl(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function il(e){return(il="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 al(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 sl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?al(Object(n),!0).forEach(function(t){pl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):al(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ll(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ll=function(){return!!e})()}function ul(e){return(ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cl(e,t){return(cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pl(e,t,n){return(t=fl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fl(e){var t=function(e){if("object"!=il(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=il(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==il(t)?t:t+""}var dl=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),pl((a=this,l=[e,n,r,o],s=ul(s=t),i=function(e,t){if(t&&("object"==il(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)}(a,ll()?Reflect.construct(s,l||[],ul(a).constructor):s.apply(a,l))),"startDrawing",function(e,t,n){i._isDrawing=!0,i._startOnSingleClick=n,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp,dblClick:i.onDblClick}),i.rubberband=new Ws([e,t],i.g,i.env,i.color)}),pl(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),pl(i,"onMouseMove",function(e,t){return i.rubberband.dragTo([e,t])}),pl(i,"onMouseUp",function(){var e=i.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=i.config.minSelectionWidth||4,o=i.config.minSelectionHeight||4;t>=r||n>=o?i.rubberband.addPoint():i._startOnSingleClick||(i.emit("cancel"),i.stop())}),pl(i,"onDblClick",function(){i._isDrawing=!1;var e=i.rubberband.element;e.annotation=i.rubberband.toSelection(),i.emit("complete",e),i.stop()}),pl(i,"createEditableShape",function(e,t){return new ol(e,i.g,sl(sl({},i.config),{},{formatters:t}),i.env,i.color)}),i._isDrawing=!1,i._startOnSingleClick=!1,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cl(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return this._isDrawing}}])&&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,fl(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function hl(e){return(hl="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 ml(e,t,n){return(t=yl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yl(e){var t=function(e){if("object"!=hl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hl(t)?t:t+""}dl.identifier="polygon",dl.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<polygon/g)};var bl=function(e,t){return t&&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,yl(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),ml(this,"redraw",function(){r.mask.setAttribute("d","M0 0 h".concat(r.w," v").concat(r.h," h-").concat(r.w," z M").concat(r.line.getAttribute("x1")," ").concat(r.line.getAttribute("y1")," ").concat(r.line.getAttribute("x2")," ").concat(r.line.getAttribute("y2"),"z"))}),ml(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.line=n,this.mask=document.createElementNS(Fi,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d","M0 0 h".concat(this.w," v").concat(this.h," h-").concat(this.w," z M").concat(this.line.getAttribute("x1")," ").concat(this.line.getAttribute("y1")," z"))},[{key:"element",get:function(){return this.mask}}]);function gl(e){return(gl="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 vl(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 wl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vl(Object(n),!0).forEach(function(t){Sl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Al(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sl(e,t,n){return(t=Ol(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ol(e){var t=function(e){if("object"!=gl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gl(t)?t:t+""}var El=function(e,t){return t&&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,Ol(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Sl(this,"setPoints",function(e){var t=e;i.outer.setAttribute("x1",t[0]),i.inner.setAttribute("x1",t[0]),i.outer.setAttribute("y1",t[1]),i.inner.setAttribute("y1",t[1]),t.length>2&&(i.outer.setAttribute("x2",t[2]),i.inner.setAttribute("x2",t[2]),i.outer.setAttribute("y2",t[3]),i.inner.setAttribute("y2",t[3]))}),Sl(this,"getBoundingClientRect",function(){return i.outer.getBoundingClientRect()}),Sl(this,"dragTo",function(e){i.group.style.display=null,i.mousepos=e;var t,n=[].concat(function(e){if(Array.isArray(e))return Al(e)}(t=i.points)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Al(e,t);var n={}.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)?Al(e,t):void 0}}(t)||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.")}(),[e[0],e[1]]);i.setPoints(n),i.mask.redraw()}),Sl(this,"addPoint",function(e){i.points.length<=2&&(i.points[2]=e[0],i.points[3]=e[1],i.setPoints(i.points))}),Sl(this,"undo",function(){i.points[i.points.length-1].length>2?i.points[i.points.length-1].pop():i.points.length>1&&i.points.pop()}),Sl(this,"newPart",function(){i.points.push([])}),Sl(this,"destroy",function(){i.group.parentNode.removeChild(i.group),i.Line=null,i.group=null}),Sl(this,"toSelection",function(){return new fa(wl(wl({},Ns(i.group,i.env.image)),{},{renderedVia:{name:"line"}}))}),this.points=t,this.env=r,this.group=document.createElementNS(Fi,"g"),this.Line=document.createElementNS(Fi,"g"),this.Line.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Fi,"line"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Fi,"line"),this.inner.setAttribute("class","a9s-inner"),o&&(this.outer.setAttribute("style","stroke: ".concat(o,";")),this.inner.setAttribute("style","stroke: ".concat(o,";"))),this.setPoints(this.points),this.mask=new bl(r.image,this.inner),this.Line.appendChild(this.outer),this.Line.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.Line),n.appendChild(this.group)},[{key:"element",get:function(){return this.Line}}]);function xl(e){return(xl="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 Cl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ml(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ml=function(){return!!e})()}function jl(e,t){return(jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Pl(){return Pl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Il(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Pl.apply(null,arguments)}function Il(e){return(Il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kl(e,t,n){return(t=Tl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tl(e){var t=function(e){if("object"!=xl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xl(t)?t:t+""}var Dl=function(e){var t=e.querySelector(".a9s-inner");return[[t.x1.baseVal,t.y1.baseVal],[t.x2.baseVal,t.y2.baseVal]]},Rl=function(e){function t(e,n,r,o,i){var a,s,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),kl((s=this,u=[e,n,r,o,i],l=Il(l=t),a=function(e,t){if(t&&("object"==xl(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)}(s,Ml()?Reflect.construct(l,u||[],Il(s).constructor):l.apply(s,u))),"onScaleChanged",function(){return a.handles.map(a.scaleHandle)}),kl(a,"setPoints",function(e){var t=e[0].x,n=e[0].y,r=e[1].x,o=e[1].y,i=a.shape.querySelector(".a9s-inner");i.setAttribute("x1",t),i.setAttribute("y1",n),i.setAttribute("x2",r),i.setAttribute("y2",o);var s=a.shape.querySelector(".a9s-outer");s.setAttribute("x1",t),s.setAttribute("y1",n),s.setAttribute("x2",r),s.setAttribute("y2",o),a.mask.redraw();var l=s.getBBox(),u=l.x,c=l.y,p=l.width,f=l.height;ns(a.elementGroup,u,c,p,f)}),kl(a,"onGrab",function(e){return function(t){0===t.button&&(a.grabbedElem=e,a.grabbedAt=a.getSVGPoint(t))}}),kl(a,"onMouseMove",function(e){var t=function(e,t,n){return e+t<0?-e:e+t>n?n-e:t};if(a.grabbedElem){var n=a.getSVGPoint(e);if(a.grabbedElem===a.shape){var r=a.shape.querySelector(".a9s-inner").getBBox(),o=r.x,i=r.y,s=r.width,l=r.height,u=a.env.image,c=u.naturalWidth,p=u.naturalHeight,f=t(o,n.x-a.grabbedAt.x,c-s),d=t(i,n.y-a.grabbedAt.y,p-l),h=Dl(a.shape).map(function(e){return{x:e[0].value+f,y:e[1].value+d}});a.grabbedAt=n,a.setPoints(h),h.forEach(function(e,t){return a.setHandleXY(a.handles[t],e.x,e.y)}),a.emit("update",Ns(a.shape,a.env.image))}else{var m=a.handles.indexOf(a.grabbedElem),y=Dl(a.shape).map(function(e,t){return t===m?n:{x:e[0].value,y:e[1].value}});a.setPoints(y),a.setHandleXY(a.handles[m],n.x,n.y),console.log("执行了EditableLine的onMouseMove方法 ",Ns(a.shape,a.env.image)),a.emit("update",Ns(a.shape,a.env.image))}}}),kl(a,"onMouseUp",function(e){a.grabbedElem=null,a.grabbedAt=null}),kl(a,"updateState",function(e){var t=Ds(e).getAttribute("points").split(" ").map(function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(",").map(function(e){return parseFloat(e.trim())}))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(u){l=!0,r=u}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return Cl(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Cl(e,2):void 0}}(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.")}();return{x:n[0],y:n[1]}});a.setPoints(t),t.forEach(function(e,t){return a.setHandleXY(a.handles[t],e.x,e.y)})}),kl(a,"destroy",function(){a.containerGroup.parentNode.removeChild(a.containerGroup),function(e,t,n){var r=Pl(Il(e.prototype),"destroy",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,a)([])}),a.svg.addEventListener("mousemove",a.onMouseMove),a.svg.addEventListener("mouseup",a.onMouseUp),a.containerGroup=document.createElementNS(Fi,"g"),a.shape=Rs(e),a.shape.querySelector(".a9s-inner").addEventListener("mousedown",a.onGrab(a.shape)),a.mask=new bl(o.image,a.shape.querySelector(".a9s-inner")),a.containerGroup.appendChild(a.mask.element),a.elementGroup=document.createElementNS(Fi,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.elementGroup.appendChild(a.shape),a.handles=Dl(a.shape).map(function(e){var t=a.drawHandle(e[0].value,e[1].value);return t.addEventListener("mousedown",a.onGrab(t)),a.elementGroup.appendChild(t),t}),a.containerGroup.appendChild(a.elementGroup),n.appendChild(a.containerGroup),ts(a.shape,e,r.formatter),a.grabbedElem=null,a.grabbedAt=null,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jl(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}}])&&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,Tl(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function Nl(e){return(Nl="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 Ll(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ll=function(){return!!e})()}function Bl(e){return(Bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _l(e,t){return(_l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Gl(e,t,n){return(t=Hl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hl(e){var t=function(e){if("object"!=Nl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Nl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nl(t)?t:t+""}var Fl=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gl((a=this,l=[e,n,r,o],s=Bl(s=t),i=function(e,t){if(t&&("object"==Nl(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)}(a,Ll()?Reflect.construct(s,l||[],Bl(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i._isDrawing=!0,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new El([e,t],i.g,i.env,i.color)}),Gl(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),Gl(i,"undo",function(){i.rubberband&&i.rubberband.undo()}),Gl(i,"newPart",function(){i.rubberband&&i.rubberband.newPart()}),Gl(i,"onMouseMove",function(e,t){return i.rubberband.dragTo([e,t])}),Gl(i,"onMouseUp",function(e,t,n){if(n.altKey)i.onDblClick(n);else if(n.ctrlKey)i.rubberband.undo();else if(2==i.rubberband.points.length)if(i.rubberband.addPoint([e,t]),i.rubberband.points[0]==i.rubberband.points[2]&&i.rubberband.points[1]==i.rubberband.points[3])i.emit("cancel"),i.stop();else{i._isDrawing=!1;var r=i.rubberband.element;r.annotation=i.rubberband.toSelection(),i.emit("complete",r),i.stop()}}),Gl(i,"createEditableShape",function(e){return new Rl(e,i.g,i.config,i.env,i.color)}),i._isDrawing=!1,document.addEventListener("keydown",function(e){"z"==e.key&&e.ctrlKey&&i.undo(),"n"==e.key&&i.newPart()}),i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_l(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return this._isDrawing}}])&&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,Hl(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function Ul(e){return(Ul="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 zl(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 Yl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zl(Object(n),!0).forEach(function(t){Vl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vl(e,t,n){return r=function(e){if("object"!=Ul(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ul(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==Ul(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}Fl.identifier="line",Fl.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<line/g)};var Ql=function(e,t,n,r,o){return Yl(Yl({},ma(e,t,0,0,n,r)),{},{color:o,renderedVia:{name:"point"}})};function Jl(e){return(Jl="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 Wl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wl=function(){return!!e})()}function Zl(){return Zl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Xl(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Zl.apply(null,arguments)}function Xl(e){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kl(e,t){return(Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ql(e,t,n){return(t=$l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $l(e){var t=function(e){if("object"!=Jl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jl(t)?t:t+""}var eu=function(e){function t(e,n,r,o,i){var a,s,l,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ql((s=this,u=[e,n,r,o,i],l=Xl(l=t),a=function(e,t){if(t&&("object"==Jl(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)}(s,Wl()?Reflect.construct(l,u||[],Xl(s).constructor):l.apply(s,u))),"onScaleChanged",function(){return a.scaleHandle(a.point)}),ql(a,"onGrab",function(){a.isGrabbed=!0}),ql(a,"onMouseMove",function(e){if(0===e.button&&a.isGrabbed){var t,n,r=a.getSVGPoint(e),o=r.x,i=r.y;a.setHandleXY(a.point,o,i);var s=null!==(t=a.annotation.target)&&void 0!==t&&t.color?null===(n=a.annotation.target)||void 0===n?void 0:n.color:a.color?a.color:null,l=Ql(o,i,a.env.image,a.config.fragmentUnit,s);a.emit("update",l)}}),ql(a,"onMouseUp",function(){a.isGrabbed=!1}),ql(a,"updateState",function(e){var t=ha(e,a.env.image),n=t.x,r=t.y;a.setHandleXY(a.point,n,r)}),a.svg.addEventListener("mousemove",a.onMouseMove),a.svg.addEventListener("mouseup",a.onMouseUp);var c=ha(e,o.image),p=c.x,f=c.y;return a.container=document.createElementNS(Fi,"g"),a.elementGroup=document.createElementNS(Fi,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.point=a.drawHandle(p,f),a.point.addEventListener("mousedown",a.onGrab),i&&(a.point.querySelector(".a9s-handle-inner").setAttribute("style","stroke: ".concat(i,";")),a.point.querySelector(".a9s-handle-outer").setAttribute("style","stroke: ".concat(i,";"))),a.elementGroup.appendChild(a.point),a.container.appendChild(a.elementGroup),n.appendChild(a.container),a.isGrabbed=!1,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kl(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}},{key:"destroy",value:function(){var e,n;this.svg.removeEventListener("mousemove",this.onMouseMove),this.svg.removeEventListener("mouseup",this.onMouseUp),this.container.parentNode.removeChild(this.container),(e=this,"function"==typeof(n=Zl(Xl(t.prototype),"destroy",e))?function(t){return n.apply(e,t)}:n)([])}}])&&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,$l(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function tu(e){return(tu="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 nu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(nu=function(){return!!e})()}function ru(e){return(ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ou(e,t){return(ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function iu(e,t,n){return(t=au(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function au(e){var t=function(e){if("object"!=tu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tu(t)?t:t+""}var su=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),iu((a=this,l=[e,n,r,o],s=ru(s=t),i=function(e,t){if(t&&("object"==tu(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)}(a,nu()?Reflect.construct(s,l||[],ru(a).constructor):s.apply(a,l))),"startDrawing",function(e,t,n,r){var o,a,s=null===(o=r.target.closest(".a9s-annotation"))||void 0===o?void 0:o.annotation;if(s&&"point"===(null===(a=s.target.renderedVia)||void 0===a?void 0:a.name))i.emit("cancel");else{var l=i.drawHandle(e,t);i.scaleHandle(l),i.g.appendChild(l),l.annotation=new fa(Ql(e,t,i.env.image,i.config.fragmentUnit,i.color)),i.emit("complete",l)}}),iu(i,"stop",function(){}),iu(i,"createEditableShape",function(e){return new eu(e,i.g,i.config,i.env,i.color)}),i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ou(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return!1}}])&&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,au(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);su.identifier="point",su.supports=function(e){return!1};var lu=function(e,t,n,r){e.setAttribute("cx",t),e.setAttribute("cy",n),e.setAttribute("r",r)},uu=function(e,t,n,r){var o=e.querySelector(".a9s-inner"),i=e.querySelector(".a9s-outer");lu(o,t,n,r),lu(i,t,n,r)},cu=function(e){var t=e.querySelector(".a9s-outer");return{cx:parseFloat(t.getAttribute("cx")),cy:parseFloat(t.getAttribute("cy")),r:parseFloat(t.getAttribute("r"))}};function pu(e){return(pu="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 fu(e,t,n){return(t=du(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function du(e){var t=function(e){if("object"!=pu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pu(t)?t:t+""}var hu=function(e,t){return t&&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,du(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),fu(this,"redraw",function(){var e=cu(r.circle),t=e.cx,n=e.cy,o=e.r,i=t+o>r.w?r.w-o:t,a=n+o>r.h?r.h-o:n+o;r.mask.setAttribute("d","M0 0 h".concat(r.w," v").concat(r.h," h-").concat(r.w," z M").concat(i," ").concat(a," a ").concat(o," ").concat(o," 0 1 1 1 0"))}),fu(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.circle=n;var o=cu(this.circle),i=o.cx,a=o.cy,s=o.r,l=i+s>this.w?this.w-s:i,u=a+s>this.h?this.h-s:a+s;this.mask=document.createElementNS(Fi,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d","M0 0 h".concat(this.w," v").concat(this.h," h-").concat(this.w," z M").concat(l," ").concat(u," a ").concat(s," ").concat(s," 0 1 1 1 0"))},[{key:"element",get:function(){return this.mask}}]);function mu(e){return(mu="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 yu(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 bu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(n),!0).forEach(function(t){gu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gu(e,t,n){return(t=vu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vu(e){var t=function(e){if("object"!=mu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mu(t)?t:t+""}var wu=function(e,t){return t&&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,vu(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o,i){var a,s,l,u,c,p=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),gu(this,"dragTo",function(e,t){var n=p.env.image,r=n.naturalWidth,o=n.naturalHeight;p.group.style.display=null;var i=e-p.anchor[0],a=t-p.anchor[1],s=Math.max(1,Math.pow(Math.pow(i,2)+Math.pow(a,2),.5)/2),l=p.anchor[0]+i/2,u=p.anchor[1]+a/2;l-s<0||l+s>r||u-s<0||u+s>o||(uu(p.circle,l,u,s),p.mask.redraw())}),gu(this,"getBoundingClientRect",function(){return p.circle.getBoundingClientRect()}),gu(this,"toSelection",function(){return new fa(bu(bu({},Ns(p.group,p.env.image)),{},{renderedVia:{name:"circle"}}))}),gu(this,"destroy",function(){p.group.parentNode.removeChild(p.group),p.mask=null,p.circle=null,p.group=null}),this.anchor=[t,n],this.env=o,this.group=document.createElementNS(Fi,"g"),this.circle=(a=t,s=n,l=document.createElementNS(Fi,"g"),u=document.createElementNS(Fi,"circle"),(c=document.createElementNS(Fi,"circle")).setAttribute("class","a9s-inner"),lu(c,a,s,2),u.setAttribute("class","a9s-outer"),lu(u,a,s,2),l.appendChild(u),l.appendChild(c),l),this.circle.setAttribute("class","a9s-selection"),i&&(this.circle.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(i,";")),this.circle.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(i,";"))),this.mask=new hu(o.image,this.circle),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.circle),r.appendChild(this.group)},[{key:"element",get:function(){return this.circle}}]);function Au(e){return(Au="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 Su(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ou(e,t);var n={}.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)?Ou(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 Ou(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Eu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Eu=function(){return!!e})()}function xu(){return xu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Cu(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},xu.apply(null,arguments)}function Cu(e){return(Cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Mu(e,t){return(Mu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ju(e,t,n){return(t=Pu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pu(e){var t=function(e){if("object"!=Au(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Au(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Au(t)?t:t+""}var Iu=function(e){function t(e,n,r,o){var i,a,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ju((a=this,l=[e,n,r,o],s=Cu(s=t),i=function(e,t){if(t&&("object"==Au(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)}(a,Eu()?Reflect.construct(s,l||[],Cu(a).constructor):s.apply(a,l))),"setSize",function(e,t,n){uu(i.circle,e,t,n),i.mask.redraw(),ns(i.elementGroup,e,t,n,n);var r=Su(i.handles,4),o=r[0],a=r[1],s=r[2],l=r[3];i.setHandleXY(o,e,t-n),i.setHandleXY(a,e+n,t),i.setHandleXY(s,e,t+n),i.setHandleXY(l,e-n,t)}),ju(i,"stretchCorners",function(e,t,n){var r,o=i.getHandleXY(t),a=n.x,s=n.y,l=0,u=0;0==e||2==e?(a=o.x,u=s-o.y,r=Math.abs(u)/2):(s=o.y,l=a-o.x,r=Math.abs(l)/2);var c=l>0?o.x:a,p=u>0?o.y:s,f=c+Math.abs(l)/2,d=p+Math.abs(u)/2;if(uu(i.circle,f,d,r),i.mask.redraw(),ns(i.elementGroup,f,d,r,r),0==e||2==e){var h=0,m=2;(0==e&&u>0||2==e&&u<0)&&(h=2,m=0),i.setHandleXY(i.handles[h],f,d-r),i.setHandleXY(i.handles[m],f,d+r),i.setHandleXY(i.handles[1],f+r,d),i.setHandleXY(i.handles[3],f-r,d)}else{var y=3,b=1;(1==e&&l>0||3==e&&l<0)&&(y=1,b=3),i.setHandleXY(i.handles[y],f+r,d),i.setHandleXY(i.handles[b],f-r,d),i.setHandleXY(i.handles[0],f,d-r),i.setHandleXY(i.handles[2],f,d+r)}}),ju(i,"onGrab",function(e){return function(t){i.grabbedElem=e;var n=i.getSVGPoint(t),r=cu(i.circle),o=r.cx,a=r.cy;i.grabbedAt={x:n.x-o,y:n.y-a}}}),ju(i,"onMouseMove",function(e){var t=function(e,t){return e<0?0:e>t?t:e};if(i.grabbedElem){var n=i.getSVGPoint(e);if(i.grabbedElem===i.circle){var r=cu(i.circle).r,o=i.env.image,a=o.naturalWidth,s=o.naturalHeight,l=Math.max(t(n.x-i.grabbedAt.x,a-r),r),u=Math.max(t(n.y-i.grabbedAt.y,s-r),r);i.setSize(l,u,r),i.emit("update",Ns(i.circle,i.env.image))}else{var c=i.handles.indexOf(i.grabbedElem),p=c<2?i.handles[c+2]:i.handles[c-2];i.stretchCorners(c,p,n),i.emit("update",Ns(i.circle,i.env.image))}}}),ju(i,"onMouseUp",function(){i.grabbedElem=null,i.grabbedAt=null}),ju(i,"onScaleChanged",function(e){return i.handles.map(i.scaleHandle)}),ju(i,"updateState",function(e){var t=Ds(e),n=parseFloat(t.getAttribute("cx")),r=parseFloat(t.getAttribute("cy")),o=parseFloat(t.getAttribute("r"));i.setSize(n,r,o)}),i.svg.addEventListener("mousemove",i.onMouseMove),i.svg.addEventListener("mouseup",i.onMouseUp),i.containerGroup=document.createElementNS(Fi,"g"),i.circle=Rs(e),i.circle.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.circle)),i.mask=new hu(o.image,i.circle),i.containerGroup.appendChild(i.mask.element),i.elementGroup=document.createElementNS(Fi,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.circle);var u=cu(i.circle),c=u.cx,p=u.cy,f=u.r;return i.handles=[[c,p-f],[c+f,p],[c,p+f],[c-f,p]].map(function(e){var t=Su(e,2),n=t[0],r=t[1],o=i.drawHandle(n,r);return o.addEventListener("mousedown",i.onGrab(o)),i.elementGroup.appendChild(o),o}),i.containerGroup.appendChild(i.elementGroup),n.appendChild(i.containerGroup),ts(i.circle,e,r.formatter),i.grabbedElem=null,i.grabbedAt=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mu(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}},{key:"destroy",value:function(){var e,n;this.containerGroup.parentNode.removeChild(this.containerGroup),(e=this,"function"==typeof(n=xu(Cu(t.prototype),"destroy",e))?function(t){return n.apply(e,t)}:n)([])}}])&&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,Pu(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function ku(e){return(ku="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 Tu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Tu=function(){return!!e})()}function Du(e){return(Du=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ru(e,t){return(Ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Nu(e,t,n){return(t=Lu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lu(e){var t=function(e){if("object"!=ku(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ku(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ku(t)?t:t+""}var Bu=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Nu((a=this,l=[e,n,r,o],s=Du(s=t),i=function(e,t){if(t&&("object"==ku(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)}(a,Tu()?Reflect.construct(s,l||[],Du(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new wu(e,t,i.g,i.env,i.color)}),Nu(i,"stop",function(){i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),Nu(i,"onMouseMove",function(e,t){return i.rubberband.dragTo(e,t)}),Nu(i,"onMouseUp",function(){i.detachListeners(),i.started=!1;var e=i.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=i.config.minSelectionWidth||4,o=i.config.minSelectionHeight||4;if(t>=r&&n>=o){var a=i.rubberband.element;a.annotation=i.rubberband.toSelection(),i.emit("complete",a)}else i.emit("cancel");i.stop()}),Nu(i,"createEditableShape",function(e){return new Iu(e,i.g,i.config,i.env,i.color)}),i.rubberband=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ru(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return null!=this.rubberband}}])&&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,Lu(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);Bu.identifier="circle",Bu.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<circle/g)};var _u=function(e,t,n,r,o){e.setAttribute("cx",t),e.setAttribute("cy",n),e.setAttribute("rx",r),e.setAttribute("ry",o)},Gu=function(e,t,n,r,o){var i=e.querySelector(".a9s-inner"),a=e.querySelector(".a9s-outer");_u(i,t,n,r,o),_u(a,t,n,r,o)},Hu=function(e){var t=e.querySelector(".a9s-outer");return{cx:parseFloat(t.getAttribute("cx")),cy:parseFloat(t.getAttribute("cy")),rx:parseFloat(t.getAttribute("rx")),ry:parseFloat(t.getAttribute("ry"))}};function Fu(e){return(Fu="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 Uu(e,t,n){return(t=zu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zu(e){var t=function(e){if("object"!=Fu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fu(t)?t:t+""}var Yu=function(e,t){return t&&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,zu(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),Uu(this,"redraw",function(){var e=Hu(r.ellipse),t=e.cx,n=e.cy,o=e.rx,i=e.ry,a=n+i;r.mask.setAttribute("d","M0 0 h".concat(r.w," v").concat(r.h," h-").concat(r.w," z M").concat(t," ").concat(a," a ").concat(o," ").concat(i," 0 1 1 1 0"))}),Uu(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.ellipse=n;var o=Hu(this.ellipse),i=o.cx,a=o.cy,s=o.rx,l=o.ry,u=a+l;this.mask=document.createElementNS(Fi,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d","M0 0 h".concat(this.w," v").concat(this.h," h-").concat(this.w," z M").concat(i," ").concat(u," a ").concat(s," ").concat(l," 0 1 1 1 0"))},[{key:"element",get:function(){return this.mask}}]);function Vu(e){return(Vu="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 Qu(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 Ju(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qu(Object(n),!0).forEach(function(t){Wu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wu(e,t,n){return(t=Zu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zu(e){var t=function(e){if("object"!=Vu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vu(t)?t:t+""}var Xu=function(e,t){return t&&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,Zu(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o,i){var a,s,l,u,c,p=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Wu(this,"dragTo",function(e,t){p.group.style.display=null;var n=e-p.anchor[0],r=t-p.anchor[1],o=n>0?p.anchor[0]+n/2:e+n/2,i=r>0?p.anchor[1]+r/2:t+r/2,a=Math.abs(n/2),s=Math.abs(r/2);Gu(p.ellipse,o,i,a,s),p.mask.redraw()}),Wu(this,"getBoundingClientRect",function(){return p.ellipse.getBoundingClientRect()}),Wu(this,"toSelection",function(){return new fa(Ju(Ju({},Ns(p.group,p.env.image)),{},{renderedVia:{name:"ellipse"}}))}),Wu(this,"destroy",function(){p.group.parentNode.removeChild(p.group),p.mask=null,p.ellipse=null,p.group=null}),this.anchor=[t,n],this.env=o,this.group=document.createElementNS(Fi,"g"),this.ellipse=(a=t,s=n,l=document.createElementNS(Fi,"g"),u=document.createElementNS(Fi,"ellipse"),c=document.createElementNS(Fi,"ellipse"),u.setAttribute("class","a9s-inner"),_u(u,a,s,2,2),c.setAttribute("class","a9s-outer"),_u(c,a,s,2,2),l.appendChild(c),l.appendChild(u),l),this.ellipse.setAttribute("class","a9s-selection"),i&&(this.ellipse.querySelector(".a9s-inner").setAttribute("style","stroke: ".concat(i,";")),this.ellipse.querySelector(".a9s-outer").setAttribute("style","stroke: ".concat(i,";"))),this.mask=new Yu(o.image,this.ellipse),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.ellipse),r.appendChild(this.group)},[{key:"element",get:function(){return this.ellipse}}]);function Ku(e){return(Ku="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 qu(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){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $u(e,t);var n={}.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}}(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=Array(t);n<t;n++)r[n]=e[n];return r}function ec(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ec=function(){return!!e})()}function tc(){return tc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=nc(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},tc.apply(null,arguments)}function nc(e){return(nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rc(e,t){return(rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oc(e,t,n){return(t=ic(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ic(e){var t=function(e){if("object"!=Ku(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ku(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ku(t)?t:t+""}var ac=function(e){function t(e,n,r,o){var i,a,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),oc((a=this,l=[e,n,r,o],s=nc(s=t),i=function(e,t){if(t&&("object"==Ku(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)}(a,ec()?Reflect.construct(s,l||[],nc(a).constructor):s.apply(a,l))),"setSize",function(e,t,n,r){Gu(i.ellipse,e,t,n,r),i.mask.redraw(),ns(i.elementGroup,e,t,n,r);var o=qu(i.handles,4),a=o[0],s=o[1],l=o[2],u=o[3];i.setHandleXY(a,e,t-r),i.setHandleXY(s,e+n,t),i.setHandleXY(l,e,t+r),i.setHandleXY(u,e-n,t)}),oc(i,"stretchCorners",function(e,t,n,r){var o=i.getHandleXY(t),a=i.getHandleXY(n),s=r.x,l=r.y,u=0,c=0;0==e||2==e?s=o.x:l=o.y;var p=s-o.x,f=l-o.y,d=p>0?o.x:s,h=f>0?o.y:l,m=Math.abs(p),y=Math.abs(f),b=d+m/2,g=h+y/2;if(u=m/2,c=y/2,0==e||2==e?u=Math.abs(o.x-a.x):c=Math.abs(o.y-a.y),Gu(i.ellipse,b,g,u,c),i.mask.redraw(),ns(i.elementGroup,b,g,u,c),0==e||2==e){var v=0,w=2;(0==e&&f>0||2==e&&f<0)&&(v=2,w=0),i.setHandleXY(i.handles[v],b,g-c),i.setHandleXY(i.handles[w],b,g+c),i.setHandleXY(i.handles[1],b+u,g),i.setHandleXY(i.handles[3],b-u,g)}else{var A=3,S=1;(1==e&&p>0||3==e&&p<0)&&(A=1,S=3),i.setHandleXY(i.handles[A],b+u,g),i.setHandleXY(i.handles[S],b-u,g),i.setHandleXY(i.handles[0],b,g-c),i.setHandleXY(i.handles[2],b,g+c)}}),oc(i,"onGrab",function(e){return function(t){i.grabbedElem=e;var n=i.getSVGPoint(t),r=Hu(i.ellipse),o=r.cx,a=r.cy;i.grabbedAt={x:n.x-o,y:n.y-a}}}),oc(i,"onMouseMove",function(e){var t=function(e,t){return e<0?0:e>t?t:e};if(i.grabbedElem){var n=i.getSVGPoint(e);if(i.grabbedElem===i.ellipse){var r=Hu(i.ellipse),o=r.rx,a=r.ry,s=i.env.image,l=s.naturalWidth,u=s.naturalHeight,c=t(n.x-i.grabbedAt.x,l-o),p=t(n.y-i.grabbedAt.y,u-a);i.setSize(c,p,o,a),i.emit("update",Ns(i.ellipse,i.env.image))}else{var f=i.handles.indexOf(i.grabbedElem),d=f<2?i.handles[f+2]:i.handles[f-2],h=i.handles[(f+3)%4];i.stretchCorners(f,d,h,n),i.emit("update",Ns(i.ellipse,i.env.image))}}}),oc(i,"onMouseUp",function(){i.grabbedElem=null,i.grabbedAt=null}),oc(i,"onScaleChanged",function(e){return i.handles.map(i.scaleHandle)}),oc(i,"updateState",function(e){var t=Ds(e),n=parseFloat(t.getAttribute("cx")),r=parseFloat(t.getAttribute("cy")),o=parseFloat(t.getAttribute("rx")),a=parseFloat(t.getAttribute("ry"));i.setSize(n,r,o,a)}),i.svg.addEventListener("mousemove",i.onMouseMove),i.svg.addEventListener("mouseup",i.onMouseUp),i.containerGroup=document.createElementNS(Fi,"g"),i.ellipse=Rs(e),i.ellipse.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.ellipse)),i.mask=new Yu(o.image,i.ellipse),i.containerGroup.appendChild(i.mask.element),i.elementGroup=document.createElementNS(Fi,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.ellipse);var u=Hu(i.ellipse),c=u.cx,p=u.cy,f=u.rx,d=u.ry;return i.handles=[[c,p-d],[c+f,p],[c,p+d],[c-f,p]].map(function(e){var t=qu(e,2),n=t[0],r=t[1],o=i.drawHandle(n,r);return o.addEventListener("mousedown",i.onGrab(o)),i.elementGroup.appendChild(o),o}),i.containerGroup.appendChild(i.elementGroup),n.appendChild(i.containerGroup),ts(i.ellipse,e,r.formatter),i.grabbedElem=null,i.grabbedAt=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rc(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}},{key:"destroy",value:function(){var e,n;this.containerGroup.parentNode.removeChild(this.containerGroup),(e=this,"function"==typeof(n=tc(nc(t.prototype),"destroy",e))?function(t){return n.apply(e,t)}:n)([])}}])&&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,ic(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function sc(e){return(sc="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 lc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(lc=function(){return!!e})()}function uc(e){return(uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cc(e,t){return(cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pc(e,t,n){return(t=fc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fc(e){var t=function(e){if("object"!=sc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sc(t)?t:t+""}var dc=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),pc((a=this,l=[e,n,r,o],s=uc(s=t),i=function(e,t){if(t&&("object"==sc(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)}(a,lc()?Reflect.construct(s,l||[],uc(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new Xu(e,t,i.g,i.env,i.color)}),pc(i,"stop",function(){i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),pc(i,"onMouseMove",function(e,t){return i.rubberband.dragTo(e,t)}),pc(i,"onMouseUp",function(){i.detachListeners(),i.started=!1;var e=i.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=i.config.minSelectionWidth||4,o=i.config.minSelectionHeight||4;if(t>=r&&n>=o){var a=i.rubberband.element;a.annotation=i.rubberband.toSelection(),i.emit("complete",a)}else i.emit("cancel");i.stop()}),pc(i,"createEditableShape",function(e){return new ac(e,i.g,i.config,i.env,i.color)}),i.rubberband=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cc(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return null!=this.rubberband}}])&&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,fc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function hc(e){return(hc="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 mc(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 yc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mc(Object(n),!0).forEach(function(t){gc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gc(e,t,n){return(t=vc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vc(e){var t=function(e){if("object"!=hc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hc(t)?t:t+""}dc.identifier="ellipse",dc.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<ellipse/g)};var wc=function(e,t){return t&&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,vc(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),gc(this,"setPoints",function(e){var t=e.map(function(e){return"L".concat(e[0]," ").concat(e[1])}).join(" ");t="M"+t.substring(1),i.outer.setAttribute("d",t),i.inner.setAttribute("d",t)}),gc(this,"getBoundingClientRect",function(){return i.outer.getBoundingClientRect()}),gc(this,"dragTo",function(e){i.group.style.display=null,i.addPoint(e)}),gc(this,"addPoint",function(e){var t;i.points=[].concat(function(e){if(Array.isArray(e))return bc(e)}(t=i.points)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return bc(e,t);var n={}.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)?bc(e,t):void 0}}(t)||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.")}(),[e]),i.setPoints(i.points)}),gc(this,"destroy",function(){i.group.parentNode.removeChild(i.group),i.freehand=null,i.group=null}),gc(this,"toSelection",function(){return new fa(yc(yc({},Ns(i.group,i.env.image)),{},{renderedVia:{name:"freehand"}}))}),this.points=[t],this.env=r,this.group=document.createElementNS(Fi,"g"),this.freehand=document.createElementNS(Fi,"g"),this.freehand.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Fi,"path"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Fi,"path"),this.inner.setAttribute("class","a9s-inner"),o&&(this.outer.setAttribute("style","stroke: ".concat(o,";")),this.inner.setAttribute("style","stroke: ".concat(o,";"))),this.setPoints(this.points),this.freehand.appendChild(this.outer),this.freehand.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.freehand),n.appendChild(this.group)},[{key:"element",get:function(){return this.freehand}}]);function Ac(e){return(Ac="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 Sc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Sc=function(){return!!e})()}function Oc(e,t){return(Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ec(){return Ec="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xc(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Ec.apply(null,arguments)}function xc(e){return(xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Cc(e,t,n){return(t=Mc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mc(e){var t=function(e){if("object"!=Ac(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ac(t)?t:t+""}var jc=function(e){var t=e.getAttribute("d").split("L"),n=[];if(t.length>0){var r=t[0].substring(1).trim().split(" ");n.push({x:parseFloat(r[0]),y:parseFloat(r[1])});for(var o=1;o<t.length;o++)r=t[o].trim().split(" "),n.push({x:parseFloat(r[0]),y:parseFloat(r[1])})}return n},Pc=function(e){return e.querySelector(".a9s-inner").getBBox()},Ic=function(e){function t(e,n,r,o){var i,a,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Cc((a=this,l=[e,n,r,o],s=xc(s=t),i=function(e,t){if(t&&("object"==Ac(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)}(a,Sc()?Reflect.construct(s,l||[],xc(a).constructor):s.apply(a,l))),"setPoints",function(e){var t=function(e){return Math.round(10*e)/10},n=e.map(function(e){return"L".concat(t(e.x)," ").concat(t(e.y))}).join(" ");n="M"+n.substring(1),i.shape.querySelector(".a9s-inner").setAttribute("d",n);var r=i.shape.querySelector(".a9s-outer");r.setAttribute("d",n);var o=r.getBBox(),a=o.x,s=o.y,l=o.width,u=o.height;ns(i.elementGroup,a,s,l,u)}),Cc(i,"onGrab",function(e){return function(t){i.grabbedElem=e;var n=i.getSVGPoint(t);i.grabbedAt={x:n.x,y:n.y}}}),Cc(i,"onMouseMove",function(e){var t=function(e,t,n){return e+t<0?-e:e+t>n?n-e:t};if(i.grabbedElem){var n=i.getSVGPoint(e),r=Pc(i.shape),o=r.x,a=r.y,s=r.width,l=r.height;if(i.grabbedElem===i.shape){var u=i.env.image,c=u.naturalWidth,p=u.naturalHeight,f=t(o,n.x-i.grabbedAt.x,c-s),d=t(a,n.y-i.grabbedAt.y,p-l),h=i.shape.querySelector(".a9s-inner"),m=jc(h).map(function(e){return{x:e.x+f,y:e.y+d}});i.grabbedAt=n,i.setPoints(m),i.emit("update",Ns(i.shape,i.env.image))}}}),Cc(i,"onMouseUp",function(e){i.grabbedElem=null,i.grabbedAt=null}),Cc(i,"updateState",function(e){var t=jc(Ds(e));i.setPoints(t)}),Cc(i,"destroy",function(){i.containerGroup.parentNode.removeChild(i.containerGroup),function(e,t,n){var r=Ec(xc(e.prototype),"destroy",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,i)([])}),i.svg.addEventListener("mousemove",i.onMouseMove),i.svg.addEventListener("mouseup",i.onMouseUp),i.containerGroup=document.createElementNS(Fi,"g"),i.shape=Rs(e),i.elementGroup=document.createElementNS(Fi,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.shape),i.containerGroup.appendChild(i.elementGroup),n.appendChild(i.containerGroup),ts(i.shape,e,r.formatter),i.shape.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.shape));var u=Pc(i.shape);return u.x,u.y,u.width,u.height,i.grabbedElem=null,i.grabbedAt=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oc(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}}])&&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,Mc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function kc(e){return(kc="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 Tc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Tc=function(){return!!e})()}function Dc(e){return(Dc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rc(e,t){return(Rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Nc(e,t,n){return(t=Lc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lc(e){var t=function(e){if("object"!=kc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kc(t)?t:t+""}var Bc=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Nc((a=this,l=[e,n,r,o],s=Dc(s=t),i=function(e,t){if(t&&("object"==kc(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)}(a,Tc()?Reflect.construct(s,l||[],Dc(a).constructor):s.apply(a,l))),"startDrawing",function(e,t){i._isDrawing=!0,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp,dblClick:i.onDblClick}),i.rubberband=new wc([e,t],i.g,i.env,i.color)}),Nc(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),Nc(i,"onMouseMove",function(e,t){return i.rubberband.dragTo([e,t])}),Nc(i,"onMouseUp",function(e,t){i.onDblClick(e,t)}),Nc(i,"onDblClick",function(e,t){i._isDrawing=!1,i.rubberband.addPoint([e,t]),i.detachListeners();var n=i.rubberband.getBoundingClientRect(),r=n.width,o=n.height,a=i.config.minSelectionWidth||4,s=i.config.minSelectionHeight||4;if(r>=a||o>=s){var l=i.rubberband.element;l.annotation=i.rubberband.toSelection(),i.emit("complete",l)}else i.emit("cancel");i.stop()}),Nc(i,"createEditableShape",function(e){return new Ic(e,i.g,i.config,i.env,i.color)}),i._isDrawing=!1,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rc(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return this._isDrawing}}])&&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,Lc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function _c(e){return(_c="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 Gc(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 Hc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gc(Object(n),!0).forEach(function(t){Wc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fc(e){return function(e){if(Array.isArray(e))return Yc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||zc(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 Uc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=zc(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function zc(e,t){if(e){if("string"==typeof e)return Yc(e,t);var n={}.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)?Yc(e,t):void 0}}function Yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Vc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Vc=function(){return!!e})()}function Qc(e){return(Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jc(e,t){return(Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wc(e,t,n){return(t=Zc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zc(e){var t=function(e){if("object"!=_c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_c(t)?t:t+""}Bc.identifier="freehand",Bc.supports=function(e){var t=e.selector("SvgSelector");if(t)return t.value.match(/^<svg.*<path*/g)&&!t.value.toUpperCase().includes("Z")};var Xc=function(e){function t(e,n,r,o,i){var a,s,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Wc((s=this,u=[n,r,o,i],l=Qc(l=t),a=function(e,t){if(t&&("object"==_c(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)}(s,Vc()?Reflect.construct(l,u||[],Qc(s).constructor):l.apply(s,u))),"setPoints",function(e){var t,n="",r=Uc(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,i="";if(o.length>0){var s,l=Uc(o);try{for(l.s();!(s=l.n()).done;){var u=s.value;u&&(i+=""===i?"M".concat(u[0],",").concat(u[1]):" L".concat(u[0],",").concat(u[1]))}}catch(c){l.e(c)}finally{l.f()}n+=i}}}catch(c){r.e(c)}finally{r.f()}n+=" Z",a.outer.setAttribute("d",n),a.inner.setAttribute("d",n)}),Wc(a,"close",function(){var e=new e(Ns(a.points,a.env.image));a.emit("close",{shape:a.multipolygon,multipolygon:e})}),Wc(a,"getBoundingClientRect",function(){return a.outer.getBoundingClientRect()}),Wc(a,"dragTo",function(e){a.group.style.display=null,a.mousepos=e;var t=a.points[a.points.length-1].slice(0,a.points[a.points.length-1].length-1),n=a.points.slice(0,-1),r=[].concat(Fc(t),[e,t[0]]);n.push(r),a.setPoints(n)}),Wc(a,"onScaleChanged",function(e){a.scale=e;var t=a.closeHandle.querySelector(".a9s-handle-inner"),n=a.closeHandle.querySelector(".a9s-handle-outer"),r=e*(a.config.handleRadius||6);t.setAttribute("r",r),n.setAttribute("r",r)}),Wc(a,"addPoint",function(e){if(a.points[a.points.length-1].length>0){var t=a.points[a.points.length-1].slice(0,a.points[a.points.length-1].length-1),n=t[t.length-1];Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2)>4&&(a.points[a.points.length-1]=[].concat(Fc(t),[e,t[0]]),a.setPoints(a.points))}else a.points[a.points.length-1]=[e,e],a.setPoints(a.points)}),Wc(a,"undo",function(){a.pop()}),Wc(a,"isClosable",function(){return a.getDistanceToStart()<6*a.scale}),Wc(a,"pop",function(){a.points[a.points.length-1].length>2?a.points[a.points.length-1].pop():a.points.length>1&&a.points.pop(),a.setPoints(a.points)}),Wc(a,"newPart",function(){a.points.push([])}),Wc(a,"getDistanceToStart",function(){if(a.points[a.points.length-1].length<3)return 1/0;var e=Math.abs(a.mousepos[0]-a.points[a.points.length-1][0][0]),t=Math.abs(a.mousepos[1]-a.points[a.points.length-1][0][1]);return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))/a.scale}),Wc(a,"destroy",function(){a.group.parentNode.removeChild(a.group),a.multipolygon=null,a.group=null}),Wc(a,"toSelection",function(){return new fa(Hc(Hc({},Ns(a.group,a.env.image)),{},{renderedVia:{name:"multipolygon"}}))}),a.points=[],a.points.push([e,e]),a.mousepos=e,a.env=o,a.scale=1,a.group=document.createElementNS(Fi,"g"),a.multipolygon=document.createElementNS(Fi,"g"),a.multipolygon.setAttribute("class","a9s-selection a9s-multipolygon improved-polygon"),a.rubberband=document.createElementNS(Fi,"polygon"),a.rubberband.setAttribute("class","a9s-rubberband"),a.closeHandle=a.drawHandle(e[0],e[1]),a.closeHandle.style.display="none",a.outer=document.createElementNS(Fi,"path"),a.outer.setAttribute("class","a9s-outer"),a.inner=document.createElementNS(Fi,"path"),a.inner.setAttribute("class","a9s-inner"),i&&(a.outer.setAttribute("style","stroke: ".concat(i,";")),a.inner.setAttribute("style","stroke: ".concat(i,";"))),a.setPoints(a.points),a.multipolygon.appendChild(a.rubberband),a.multipolygon.appendChild(a.outer),a.multipolygon.appendChild(a.inner),a.multipolygon.appendChild(a.closeHandle),a.group.style.display="none",a.group.appendChild(a.multipolygon),n.appendChild(a.group),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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.multipolygon}}])&&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,Zc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ua);function Kc(e){return(Kc="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 qc(e){return function(e){if(Array.isArray(e))return sp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ap(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(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return($c=function(){return!!e})()}function ep(e,t){return(ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tp(){return tp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=np(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},tp.apply(null,arguments)}function np(e){return(np=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rp(e,t,n){return(t=op(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function op(e){var t=function(e){if("object"!=Kc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kc(t)?t:t+""}function ip(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ap(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function ap(e,t){if(e){if("string"==typeof e)return sp(e,t);var n={}.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)?sp(e,t):void 0}}function sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var lp=function(e){var t=e.split("M"),n=[];return t.forEach(function(e,t){if(e.length>0){var r=[];(e=(e=(e=(e=(e=e.replace(/ Z/g,"Z")).replace(/Z /g,"Z")).replace(/Z/g,"")).replace(/L /g,"L")).replace(/ L/g,"L")).split("L").forEach(function(e,t){r.push([parseFloat(e.split(",")[0]).toFixed(2).toString(),parseFloat(e.split(",")[1]).toFixed(2).toString()])}),r[0][0]!==r[r.length-1][0]&&r[0][1]!==r[r.length-1][1]&&r.push(r[0]),n.push(r)}}),n},up=function(e){var t,n=[],r=ip(lp(e.querySelector(".a9s-inner").attributes.d.nodeValue));try{for(r.s();!(t=r.n()).done;){var o,i=t.value,a=[],s=ip(i);try{for(s.s();!(o=s.n()).done;){var l=o.value,u={x:parseFloat(l[0]),y:parseFloat(l[1])};a.push(u)}}catch(c){s.e(c)}finally{s.f()}n.push(a)}}catch(c){r.e(c)}finally{r.f()}return n},cp=function(e){var t,n=Ds(e);t=Ds(e).getAttribute("d"),lp(t);var r=document.createElementNS(Fi,"g"),o=n.cloneNode(!0);o.setAttribute("class","a9s-inner");var i=n.cloneNode(!0);return i.setAttribute("class","a9s-outer"),r.appendChild(i),r.appendChild(o),r},pp=function(e){function t(e,n,r,o){var i,a,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),rp((a=this,l=[e,n,r,o],s=np(s=t),i=function(e,t){if(t&&("object"==Kc(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)}(a,$c()?Reflect.construct(s,l||[],np(a).constructor):s.apply(a,l))),"createCornerHandle",function(e){var t=i.drawHandle(e.x,e.y);return t.addEventListener("mousedown",i.onGrab(t)),t.addEventListener("click",i.onSelectCorner(t)),i.scaleHandle(t),i.elementGroup.appendChild(t),t}),rp(i,"createMidpoint",function(e,t){var n=e[t],r=t===e.length-1?e[0]:e[t+1],o=(n.x+r.x)/2,a=(n.y+r.y)/2,s=i.drawMidpoint(o,a);return s.addEventListener("mousedown",i.onGrab(s)),i.shape.appendChild(s),s}),rp(i,"deleteSelected",function(){var e=up(i.shape);if(i.selected.length>0){var t,n=-1,r=[],o=[],a=ip(i.midpoints);try{for(a.s();!(t=a.n()).done;){var s=t.value,l=s.filter(function(e,t){return-1===i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)});s.filter(function(e,t){return i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)>-1}).forEach(function(e){return e.parentNode.removeChild(e)}),l.length>2&&o.push(l)}}catch(v){a.e(v)}finally{a.f()}var u,c=ip(e);try{for(c.s();!(u=c.n()).done;){var p=u.value;n+=1;var f=p.filter(function(e,t){return-1===i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)});f.length>2&&r.push(f)}}catch(v){c.e(v)}finally{c.f()}n=-1;var d,h=[],m=ip(i.cornerHandles);try{for(m.s();!(d=m.n()).done;){var y=d.value;n+=1;var b=y.filter(function(e,t){return-1!==i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)}),g=y.filter(function(e,t){return-1===i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)});g.length>2&&h.push(g),b.forEach(function(e){return e.parentNode.removeChild(e)})}}catch(v){m.e(v)}finally{m.f()}i.midpoints=o,i.cornerHandles=h,i.selected=[],i.setPoints(r)}}),rp(i,"deselectCorners",function(){return i.cornerHandles.forEach(function(e){return Yi(e,"selected")})}),rp(i,"destroy",function(){i.container.parentNode.removeChild(i.container),i.svg.removeEventListener("mousemove",i.onMouseMove),i.svg.removeEventListener("mouseup",i.onMouseUp),document.body.removeEventListener("keydown",i.onKeyDown),function(e,t,n){var r=tp(np(e.prototype),"destroy",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,i)([])}),rp(i,"drawMidpoint",function(e,t){var n=document.createElementNS(Fi,"circle");return n.setAttribute("class","a9s-midpoint"),n.setAttribute("cx",e),n.setAttribute("cy",t),n.setAttribute("r",5*i.scale),n}),rp(i,"onAddPoint",function(e){var t,n=up(i.shape),r=-1,o=-1,a=ip(i.midpoints);try{for(a.s();!(t=a.n()).done;){var s=t.value;if(o+=1,(r=s.indexOf(i.grabbedElement))>-1)break}}catch(A){a.e(A)}finally{a.f()}var l,u=[],c=-1,p=null,f=null,d=ip(n);try{for(d.s();!(l=d.n()).done;){var h=l.value;if((c+=1)===o){var m,y=[],b=-1,g=ip(h);try{for(g.s();!(m=g.n()).done;){var v=m.value;b+=1,y.push(v),b===r&&(y.push(e),p=i.createMidpoint(h,b-1),f=i.createMidpoint(h,b))}}catch(A){g.e(A)}finally{g.f()}u.push(y)}else u.push(h)}}catch(A){d.e(A)}finally{d.f()}var w=i.createCornerHandle(e);i.cornerHandles[o]=[].concat(qc(i.cornerHandles[o].slice(0,r+1)),[w],qc(i.cornerHandles[o].slice(r+1))),i.midpoints[o]=[].concat(qc(i.midpoints[o].slice(0,r)),[p,f],qc(i.midpoints[o].slice(r+1))),i.grabbedElement.parentNode.removeChild(i.grabbedElement),i.grabbedElement=w,i.setPoints(u)}),rp(i,"onGrab",function(e){return function(t){0===t.button&&(t.stopPropagation(),i.grabbedElement=e,i.grabbedAt=i.getSVGPoint(t),i.lastMouseDown=(new Date).getTime())}}),rp(i,"onKeyDown",function(e){46===e.which&&i.deleteSelected()}),rp(i,"onMoveShape",function(e){var t,n=function(e,t,n){return e+t<0?-e:e+t>n?n-e:t},r=i.shape.querySelector(".a9s-inner").getBBox(),o=r.x,a=r.y,s=r.width,l=r.height,u=i.env.image,c=u.naturalWidth,p=u.naturalHeight,f=n(o,e.x-i.grabbedAt.x,c-s),d=n(a,e.y-i.grabbedAt.y,p-l),h=[],m=ip(up(i.shape));try{for(m.s();!(t=m.n()).done;){var y=t.value,b=y.map(function(e){return[e.x,e.y]});Ps([i.grabbedAt.x,i.grabbedAt.y],b)?h.push(y.map(function(e){return{x:e.x+f,y:e.y+d}})):h.push(y)}}catch(g){m.e(g)}finally{m.f()}i.grabbedAt=e,i.setPoints(h)}),rp(i,"onMoveCornerHandle",function(e,t){var n,r=-1,o=0,a=ip(i.cornerHandles);try{for(a.s();!(n=a.n()).done;){var s=n.value;if((r=s.indexOf(i.grabbedElement))>-1)break;o+=1}}catch(y){a.e(y)}finally{a.f()}t.ctrlKey?i.selected=Array.from(new Set([].concat(qc(i.selected),[r]))):i.selected.includes(r)||(i.selected=[r]);var l,u=up(i.shape),c=i.selected.map(function(e){var t=u[o][r],n=u[o][e];return{index:e,dx:n.x-t.x,dy:n.y-t.y}}),p=0,f=[],d=ip(up(i.shape));try{for(d.s();!(l=d.n()).done;){var h=l.value;if(p===o){var m=h.map(function(t,n){if(n===r)return e;if(i.selected.includes(n)){var o=c.find(function(e){return e.index===n}),a=o.dx,s=o.dy;return{x:e.x+a,y:e.y+s}}return t});f.push(m)}else f.push(h);p+=1}}catch(y){d.e(y)}finally{d.f()}i.setPoints(f)}),rp(i,"onMouseMove",function(e){if(i.grabbedElement){var t=i.getSVGPoint(e);i.grabbedElement===i.shape?i.onMoveShape(t):Vi(i.grabbedElement,"a9s-handle")?i.onMoveCornerHandle(t,e):Vi(i.grabbedElement,"a9s-midpoint")&&i.onAddPoint(t),i.emit("update",Ap(up(i.shape),i.env.image))}}),rp(i,"onMouseUp",function(e){i.grabbedElement=null,i.grabbedAt=null}),rp(i,"onScaleChanged",function(e){var t,n=ip(i.cornerHandles);try{for(n.s();!(t=n.n()).done;)t.value.map(i.scaleHandle)}catch(a){n.e(a)}finally{n.f()}var r,o=ip(i.midpoints);try{for(o.s();!(r=o.n()).done;)r.value.map(function(e){e.setAttribute("r",5*i.scale)})}catch(a){o.e(a)}finally{o.f()}}),rp(i,"onSelectCorner",function(e){return function(t){if(!((new Date).getTime()-i.lastMouseDown>250)){var n,r=-1,o=-1,a=ip(i.cornerHandles);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(r+=1,(o=s.indexOf(e))>0)break}}catch(l){a.e(l)}finally{a.f()}null!=t&&t.ctrlKey?i.selected.map(function(e){return e[0]===r&&e[1]===o}).indexOf(!0)>-1?i.selected=i.selected.filter(function(e){return!(e[1]===o&&e[0]===r)}):i.selected=[].concat(qc(i.selected),[[r,o]]):1===i.selected.length&&i.selected[0][1]===o&&i.selected[0][0]===r?i.selected=[]:i.selected=[[r,o]],i.setPoints(up(i.shape))}}}),rp(i,"setPoints",function(e){var t=wp(e);i.shape.querySelector(".a9s-inner").setAttribute("d",t);var n=i.shape.querySelector(".a9s-outer");n.setAttribute("d",t);var r,o=0,a=ip(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;s.forEach(function(e,t){i.setHandleXY(i.cornerHandles[o][t],e.x,e.y)});for(var l=0;l<s.length;l++){var u=s[l],c=l===s.length-1?s[0]:s[l+1],p=(u.x+c.x)/2,f=(u.y+c.y)/2,d=i.midpoints[o][l];d.setAttribute("cx",p),d.setAttribute("cy",f)}o+=1}}catch(O){a.e(O)}finally{a.f()}var h,m=-1,y=ip(i.cornerHandles);try{for(y.s();!(h=y.n()).done;){var b=h.value;m+=1,b.forEach(function(e,t){var n=i.selected.map(function(e){return e[0]===m&&e[1]===t}).indexOf(!0)>-1;n&&!Vi(e,"selectedCorner")?zi(e,"selectedCorner"):!n&&Vi(e,"selectedCorner")&&Yi(e,"selectedCorner")})}}catch(O){y.e(O)}finally{y.f()}var g=n.getBBox(),v=g.x,w=g.y,A=g.width,S=g.height;ns(i.shape,v,w,A,S)}),rp(i,"updateState",function(e){var t=cp(e),n=up(t);i.setPoints(n)}),i.svg.addEventListener("mousemove",i.onMouseMove),i.svg.addEventListener("mouseup",i.onMouseUp),document.body.addEventListener("keydown",i.onKeyDown),i.container=document.createElementNS(Fi,"g"),i.shape=cp(e),i.shape.setAttribute("class","a9s-annotation editable selected improved-polygon"),i.elementGroup=document.createElementNS(Fi,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.shape);var u=up(i.shape);i.cornerHandles=[],i.midpoints=[];var c,p=ip(u);try{var f=function(){var e=c.value,t=[];i.cornerHandles.push(e.map(function(n,r){return t.push(i.createMidpoint(e,r)),i.createCornerHandle(n)})),i.midpoints.push(t)};for(p.s();!(c=p.n()).done;)f()}catch(a){p.e(a)}finally{p.f()}return i.container.appendChild(i.elementGroup),n.appendChild(i.container),ts(i.shape,e,r.formatter),i.shape.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.shape)),i.grabbedElement=null,i.grabbedAt=null,i.selected=[],i.lastMouseDown=null,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ep(e,t)}(t,e),n=t,(r=[{key:"element",get:function(){return this.elementGroup}}])&&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,op(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function fp(e){return(fp="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 dp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(dp=function(){return!!e})()}function hp(e){return(hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mp(e,t){return(mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yp(e,t,n){return(t=bp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bp(e){var t=function(e){if("object"!=fp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fp(t)?t:t+""}function gp(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return vp(e,t);var n={}.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)?vp(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function vp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wp=function(e){var t,n=function(e){return Math.round(10*e)/10},r="",o=gp(e);try{for(o.s();!(t=o.n()).done;){var i=t.value;r+="M";var a,s=!0,l=gp(i);try{for(l.s();!(a=l.n()).done;){var u=a.value;s?(s=!1,r+=n(u.x).toString()+","+n(u.y).toString()):r+=" L"+n(u.x).toString()+","+n(u.y).toString()}}catch(c){l.e(c)}finally{l.f()}r+=" Z"}}catch(c){o.e(c)}finally{o.f()}return r},Ap=function(e,t){return{source:null==t?void 0:t.src,selector:{type:"SvgSelector",value:'<svg><path d="'.concat(wp(e),'" /></svg>')}}},Sp=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),yp((a=this,l=[e,n,r,o],s=hp(s=t),i=function(e,t){if(t&&("object"==fp(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)}(a,dp()?Reflect.construct(s,l||[],hp(a).constructor):s.apply(a,l))),"startDrawing",function(e,t,n,r){i._isDrawing=!0,i._startOnSingleClick=n||!1,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp,dblClick:i.onDblClick}),i.rubberband=new Xc([e,t],i.g,i.config,i.env,i.color),i.rubberband.on("close",function(e){var t=e.shape,n=e.selection;t.annotation=n,i.emit("complete",t),i.stop()})}),yp(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),yp(i,"undo",function(){i.rubberband&&i.rubberband.undo()}),yp(i,"newPart",function(){i.rubberband&&i.rubberband.newPart()}),yp(i,"onMouseMove",function(e,t,n){i.rubberband.dragTo([e,t])}),yp(i,"onMouseUp",function(e,t,n){if(n.altKey)i.complete(e,t);else if(n.ctrlKey)i.rubberband.undo();else if(n.shiftKey&&i.rubberband.points.length>2)i.newPart();else{var r=i.rubberband.getBoundingClientRect(),o=r.width,a=r.height,s=i.config.minSelectionWidth||4,l=i.config.minSelectionHeight||4;o>=s||a>=l?i.rubberband.addPoint([e,t]):(i.emit("cancel"),i.stop())}}),yp(i,"onScaleChanged",function(e){i.rubberband&&i.rubberband.onScaleChanged(e)}),yp(i,"onDblClick",function(e,t){i.config.completeWithDoubleClick&&i.complete(e,t)}),yp(i,"complete",function(e,t){i._isDrawing=!1,i.rubberband.addPoint([e,t]);var n=i.rubberband.element;n.annotation=i.rubberband.toSelection(),i.emit("complete",n),i.stop()}),yp(i,"createEditableShape",function(e){return new pp(e,i.g,i.config,i.env,i.color)}),i._isDrawing=!1,i.viewer=null,window.addEventListener("keydown",function(e){"z"===e.key&&e.ctrlKey?i.undo():"n"!==e.key&&"p"!==e.key||i.newPart()},!0),i._startOnSingleClick=!1,i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mp(e,t)}(t,e),n=t,(r=[{key:"isDrawing",get:function(){return this._isDrawing}}])&&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,bp(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function Op(e){return(Op="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 Ep(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(xp=function(){return!!e})()}function Cp(e){return(Cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Mp(e,t){return(Mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function jp(e,t,n){return(t=Pp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pp(e){var t=function(e){if("object"!=Op(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Op(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Op(t)?t:t+""}Sp.identifier="multipolygon",Sp.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null===(t=n.value)||void 0===t?void 0:t.match(/^<svg.*<path d=/g)};var Ip=function(e){function t(e,n,r,o){var i,a,s,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),jp((a=this,s=Cp(s=t),i=function(e,t){if(t&&("object"==Op(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)}(a,xp()?Reflect.construct(s,[],Cp(a).constructor):s.apply(a,l))),"listTools",function(){return i._registered.map(function(e){return e.identifier})}),jp(i,"registerTool",function(e){var t=e.identifier;i.listTools().includes(t)&&i.unregisterTool(t),i._registered.unshift(e)}),jp(i,"unregisterTool",function(e){return i._registered=i._registered.filter(function(t){return t.identifier!==e})}),jp(i,"setCurrent",function(e,t){i._current&&i._current.destroy(),i._color=t;var n="string"==typeof e||e instanceof String?i._registered.find(function(t){return t.identifier===e}):e;i._current=new n(i._g,i._config,i._env,t),i._current.on("startSelection",function(e){return i.emit("startSelection",e)}),i._current.on("complete",function(e){return i.emit("complete",e)}),i._current.on("cancel",function(e){return i.emit("cancel",e)})}),jp(i,"forAnnotation",function(e){var t,n,r=function(e){if(Array.isArray(e))return e}(n=e.targets)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Ep(e,t);var n={}.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)?Ep(e,t):void 0}}(n)||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.")}(),o=r[0],a=(Ep(r).slice(1),null===(t=o.renderedVia)||void 0===t?void 0:t.name),s=a?i._registered.find(function(e){return e.identifier===a}):i._registered.find(function(t){return t.supports(e)});return s?new s(i._g,i._config,i._env,i._color):null}),i._g=e,i._config=n,i._env=r,i._color=o,i._registered=[Os,dl,Fl,su,Bu,dc,Bc,Sp],i.setCurrent(Os,i._color),i}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mp(e,t)}(t,e),n=t,(r=[{key:"current",get:function(){return this._current}}])&&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,Pp(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(n()),kp={FragmentSelector:wa,SvgSelector:Rs},Tp={FragmentSelector:function(e,t){var n=ha(e,t);return n.w*n.h},SvgSelector:function(e){var t,n,r,o=Ds(e),i=o.nodeName.toLowerCase();if("polygon"===i)return t=o.getAttribute("points").trim().split(" ").map(function(e){return e.split(",").map(function(e){return parseFloat(e.trim())})}),js(t);if("circle"===i)return(n=o.getAttribute("r"))*n*Math.PI;if("ellipse"===i)return(r=o).getAttribute("rx")*r.getAttribute("ry")*Math.PI;if("path"==i)return function(e){var t=Is(e);if(1==t.length)return js(t[0]);var n,r=function(e){return t.find(function(t){if(e!==t)return function(e,t){var n,r=xs(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(!Ps(o,t))return!1}}catch(i){r.e(i)}finally{r.f()}return!0}(e,t)})},o=0,i=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return ks(e,t);var n={}.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)?ks(e,t):void 0}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}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,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;r(a)?o-=js(a):o+=js(a)}}catch(s){i.e(s)}finally{i.f()}return o}(o);if("line"==i)return 0;throw"Unsupported SVG shape type: ".concat(i)}},Dp=function(e){var t=e.targets[0];if(t)return Array.isArray(t.selector)?t.selector[0]:t.selector},Rp=function(e,t){return kp[Dp(e).type](e,t)},Np=function(e,t){return Tp[Dp(e).type](e,t)};function Lp(e){return(Lp="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 Bp(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,_p(r.key),r)}}function _p(e){var t=function(e){if("object"!=Lp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lp(t)?t:t+""}var Gp=function(e,t,n){return t&&Bp(e.prototype,t),n&&Bp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=document.createElementNS(Fi,"svg");n.setAttribute("class","a9s-osd-crosshair-container");var r=document.createElementNS(Fi,"g");r.setAttribute("class","a9s-crosshair"),n.appendChild(r);var o=document.createElementNS(Fi,"line"),i=document.createElementNS(Fi,"line");r.appendChild(o),r.appendChild(i),t.parentElement.appendChild(n);var a=function(e){var n=e.offsetX,r=e.offsetY,a=t.parentElement.offsetWidth,s=t.parentElement.offsetHeight;o.setAttribute("x1",0),o.setAttribute("y1",r),o.setAttribute("x2",a),o.setAttribute("y2",r),i.setAttribute("x1",n),i.setAttribute("y1",0),i.setAttribute("x2",n),i.setAttribute("y2",s)};t.addEventListener("pointermove",a),t.parentElement.addEventListener("pointermove",a)}),Hp=r(7295),Fp=r.n(Hp);function Up(e){return(Up="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 zp(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 Yp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zp(Object(n),!0).forEach(function(t){Qp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vp(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,Jp(r.key),r)}}function Qp(e,t,n){return(t=Jp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jp(e){var t=function(e){if("object"!=Up(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Up(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Up(t)?t:t+""}var Wp=function(e,t){if("FragmentSelector"===e.targets[0].selector.type){var n=ha(e,t),r=n.x,o=n.y;return{minX:r,minY:o,maxX:r+n.w,maxY:o+n.h}}var i=Rp(e,t),a=document.createElementNS(Fi,"svg");a.style.position="absolute",a.style.opacity=0,a.style.top=0,a.style.left=0,a.appendChild(i),document.body.appendChild(a);var s=i.getBBox(),l=s.x,u=s.y,c=s.width,p=s.height;return document.body.removeChild(a),{minX:l,minY:u,maxX:l+c,maxY:u+p}},Zp=function(e,t,n){return t&&Vp(e.prototype,t),n&&Vp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(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),Qp(this,"clear",function(){return n.spatial_index.clear()}),Qp(this,"getAnnotationAt",function(e,t,r){var o=r?5/r:5,i=n.spatial_index.search({minX:e-o,minY:t-o,maxX:e+o,maxY:t+o}).map(function(e){return e.annotation}).filter(function(n){var r,i,a=(i=n.targets[0],Array.isArray(i.selector)?i.selector[0].type:null===(r=i.selector)||void 0===r?void 0:r.type);if("FragmentSelector"===a)return!0;if("SvgSelector"===a)return function(e,t,n,r){var o,i,a,s,l=Ds(n),u=l.nodeName.toLowerCase(),c=[e,t];if("polygon"===u){var p=Array.from(l.points).map(function(e){return[e.x,e.y]});return Ps(c,p)}if("circle"===u){var f=l.getAttribute("cx"),d=l.getAttribute("cy"),h=l.getAttribute("r");return i=h,a=(o=c)[0]-f,s=o[1]-d,Math.sqrt(a*a+s*s)<=i}if("ellipse"===u){var m=l.getAttribute("cx"),y=l.getAttribute("cy"),b=l.getAttribute("rx"),g=l.getAttribute("ry");return function(e,t,n,r,o){var i=Math.cos(0),a=Math.sin(0),s=e[0]-t,l=e[1]-n,u=i*s+a*l,c=a*s-i*l;return u*u/(r*r)+c*c/(o*o)<=1}(c,m,y,b,g)}if("path"===u)return Is(l).find(function(e){return Ps(c,e)});if("line"===u){var v=parseInt(l.getAttribute("x1")),w=parseInt(l.getAttribute("y1")),A=parseInt(l.getAttribute("x2")),S=parseInt(l.getAttribute("y2"));return function(e,t,n,r,o,i){var a=e[0],s=e[1],l=r-t,u=o-n,c=Math.sqrt(l*l+u*u);return Math.abs((a-t)*u-(s-n)*l)/c<=i}(c,v,w,A,S,r)}throw"Unsupported SVG shape type: ".concat(u)}(e,t,n,o);throw"Unsupported selector type: ".concat(a)});if(i.length>0)return i.sort(function(e,t){return Np(e,n.env.image)-Np(t,n.env.image)}),i[0]}),Qp(this,"getAnnotationsIntersecting",function(e){var t=e.minX,r=t?e:Wp(e,n.env.image),o=n.spatial_index.search(r).map(function(e){return e.annotation});return t?o:o.filter(function(t){return!t.isEqual(e)})}),Qp(this,"insert",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){n.spatial_index.insert(Yp(Yp({},Wp(e,n.env.image)),{},{annotation:e}))})}),Qp(this,"getBounds",function(e){return n.getBounds(e,n.env.image)}),Qp(this,"remove",function(e){var t=Yp(Yp({},Wp(e,n.env.image)),{},{annotation:e});n.spatial_index.remove(t,function(e,t){return e.annotation.id===t.annotation.id})}),this.env=t,t.store=this,this.spatial_index=new(Fp())}),Xp=function(e,t){var n=(Vi(t,".a9s-annotation")?t:t.closest(".a9s-annotation")).querySelector(".a9s-outer").getBoundingClientRect(),r=e.drawer.canvas,o=r.getBoundingClientRect(),i=r.width/o.width,a=r.height/o.height,s=n.x-o.x,l=n.y-o.y,u=n.width,c=n.height,p=document.createElement("CANVAS"),f=p.getContext("2d");p.width=u,p.height=c,f.drawImage(r,s*i,l*a,u*i,c*a,0,0,u,c);var d=e.viewport.viewerElementToImageCoordinates(new(Hi().Point)(s,l)),h=e.viewport.viewportToImageZoom(e.viewport.getZoom());return{snippet:p,transform:function(e){return[d.x+e[0]/i/h,d.y+e[1]/a/h]}}};function Kp(e){return(Kp="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 qp(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,lf(r.key),r)}}function ef(e,t,n){return t&&$p(e.prototype,t),n&&$p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tf(e,t,n){return t=rf(t),function(e,t){if(t&&("object"==Kp(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)}(e,nf()?Reflect.construct(t,n||[],rf(e).constructor):t.apply(e,n))}function nf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(nf=function(){return!!e})()}function rf(e){return(rf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function of(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&&af(e,t)}function af(e,t){return(af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sf(e,t,n){return(t=lf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lf(e){var t=function(e){if("object"!=Kp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kp(t)?t:t+""}var uf=ja(),cf=function(e){function t(e){var n,r,o,i,a;qp(this,t),sf(n=tf(this,t),"_getShapeAt",function(e){var t=function(e){var t=n.svg.createSVGPoint();if(window.TouchEvent&&e instanceof TouchEvent){var r=n.svg.getBoundingClientRect(),o=e.touches[0],i=o.clientX-r.x,a=o.clientY-r.y,s=n.svg.getBoundingClientRect(),l=s.left,u=s.top;return t.x=i+l,t.y=a+u,t.matrixTransform(n.g.getScreenCTM().inverse())}return t.x=e.offsetX,t.y=e.offsetY,t.matrixTransform(n.g.getCTM().inverse())}(e),r=t.x,o=t.y,i=n.store.getAnnotationAt(r,o,n.currentScale());if(i)return n.findShape(i)}),sf(n,"_initDrawingTools",function(e){var t,r=!1,o=!1,i=!1;n.tools=new Ip(n.g,n.config,n.env),n.tools.on("complete",function(e){o=!1,n.onDrawingComplete(e)}),n.mouseTracker=new(Hi().MouseTracker)({element:n.svg,preProcessEventHandler:function(e){n.mouseTracker.enabled||(e.preventDefault=!1,e.preventGesture=!0),n.selectedShape&&"wheel"===e.eventType&&(e.preventDefault=!1,n.viewer.canvas.dispatchEvent(new e.originalEvent.constructor(e.eventType,e.originalEvent)))},pressHandler:function(t){n.tools.current.isDrawing||(n.tools.current.start(t.originalEvent,n.drawOnSingleClick&&!n.hoveredShape),e||n.scaleTool(n.tools.current))},moveHandler:function(e){if(n.tools.current.isDrawing){var t=n.tools.current.getSVGPoint(e.originalEvent),a=t.x,s=t.y;o||e.originalEvent.stopPropagation(),n.tools.current.onMouseMove(a,s,e.originalEvent),r||(n.emit("startSelection",{x:a,y:s}),r=!0),!i&&n.tools.current.onDragStart&&(n.tools.current.onDragStart(a,s,e.originalEvent),i=!0)}},releaseHandler:function(e){if(n.tools.current.isDrawing){var t=n.tools.current.getSVGPoint(e.originalEvent),a=t.x,s=t.y;r&&(n.emit("endSelection",{x:a,y:s}),o=!0),n.tools.current.onMouseUp(a,s,e.originalEvent),i&&n.tools.current.onDragEnd&&n.tools.current.onDragEnd()}r=!1,i=!1}});var a=n.config.hotkey?n.config.hotkey.key?n.config.hotkey.key.toLowerCase():n.config.hotkey.toLowerCase():"shift",s=null===(t=n.config.hotkey)||void 0===t?void 0:t.inverted;n.mouseTracker.enabled=s,n.onKeyDown&&document.removeEventListener("keydown",n.onKeyDown),n.onKeyUp&&document.removeEventListener("keydown",n.onKeyDown),n.onKeyDown=function(e){if(e.key.toLowerCase()===a&&!n.selectedShape){var t=!n.readOnly&&!s;n.mouseTracker.enabled=t,n.tools.current.enabled=t}},n.onKeyUp=function(e){e.key.toLowerCase()!==a||n.tools.current.isDrawing||(n.mouseTracker.enabled=s,n.tools.current.enabled=s,o=!1)},document.addEventListener("keydown",n.onKeyDown),document.addEventListener("keyup",n.onKeyUp)}),sf(n,"_initMouseEvents",function(){n.svg.addEventListener("mousemove",function(e){var t;if(!(null!==(t=n.tools)&&void 0!==t&&t.current.isDrawing||e.target.closest(".a9s-annotation.editable.selected"))){var r,o=n._getShapeAt(e);if((null==o?void 0:o.annotation)!==(null===(r=n.hoveredShape)||void 0===r?void 0:r.annotation)){if(n.hoveredShape){var i=n.hoveredShape.element||n.hoveredShape;Yi(i,"hover"),n.emit("mouseLeaveAnnotation",n.hoveredShape.annotation,n.hoveredShape)}o&&(zi(o,"hover"),n.emit("mouseEnterAnnotation",o.annotation,o))}n.hoveredShape=o}}),n.svg.parentElement.addEventListener("mouseleave",function(){n.hoveredShape&&(Yi(n.hoveredShape,"hover"),n.emit("mouseLeaveAnnotation",n.hoveredShape.annotation,n.hoveredShape),n.hoveredShape=null)});var e=null;n.viewer.addHandler("canvas-press",function(){return e=(new Date).getTime()}),n.viewer.addHandler("canvas-click",function(t){var r,o=t.originalEvent;if(!(null!==(r=n.tools.current)&&void 0!==r&&r.isDrawing||n.disableSelect)&&(new Date).getTime()-e<250){var i=o.target.closest(".a9s-annotation.editable.selected")?n.selectedShape:n._getShapeAt(o);i?(t.preventDefaultAction=!0,n.selectShape(i)):i||(n.deselect(),n.emit("select",{}))}n.disableSelect&&n.hoveredShape&&n.emit("clickAnnotation",n.hoveredShape.annotation,n.hoveredShape)})}),sf(n,"_lazy",function(e){if(n.viewer.world.getItemAt(0))e();else{var t=function(){e(),n.viewer.removeHandler("open",t),n.viewer.world.removeHandler("add-item",t)};n.viewer.addHandler("open",t),n.viewer.world.addHandler("add-item",t)}}),sf(n,"_refreshNonScalingAnnotations",function(){var e=n.currentScale();Array.from(n.svg.querySelectorAll(".a9s-non-scaling")).forEach(function(t){return t.setAttribute("transform","scale(".concat(1/e,")"))})}),sf(n,"addAnnotation",function(e,t){var r=t||n.g,o=Rp(e,n.env.image);return zi(o,"a9s-annotation"),o.setAttribute("data-id",e.id),o.annotation=e,r.appendChild(o),ts(o,e,n.formatters),n.scaleFormatterElements(o),o}),sf(n,"addDrawingTool",function(e){return n.tools.registerTool(e)}),sf(n,"addOrUpdateAnnotation",function(e,t){var r,o=null===(r=n.selectedShape)||void 0===r?void 0:r.annotation;(o===e||null!=o&&o.isSelection||o==t)&&n.deselect(),t&&n.removeAnnotation(e),n.removeAnnotation(e);var i=n.addAnnotation(e);Vi(i,"a9s-non-scaling")&&i.setAttribute("transform","scale(".concat(1/n.currentScale(),")")),n.store.insert(e)}),sf(n,"currentScale",function(){var e=n.viewer.viewport.getContainerSize().x;return n.viewer.viewport.getZoom(!0)*e/n.viewer.world.getContentFactor()}),sf(n,"deselect",function(){var e;if(null===(e=n.tools)||void 0===e||e.current.stop(),n.selectedShape){var t=n.selectedShape.annotation;if(n.selectedShape.destroy){if(n.selectedShape.mouseTracker.destroy(),n.selectedShape.destroy(),!t.isSelection){var r=n.addAnnotation(t);Vi(r,"a9s-non-scaling")&&r.setAttribute("transform","scale(".concat(1/n.currentScale(),")"))}}else Yi(n.selectedShape,"selected");n.selectedShape=null}}),sf(n,"destroy",function(){n.deselect(),n.svg.parentNode.removeChild(n.svg)}),sf(n,"findShape",function(e){var t=null!=e&&e.id?e.id:e;return n.g.querySelector('.a9s-annotation[data-id="'.concat(t,'"]'))}),sf(n,"_fit",function(e,t,r){var o=n.findShape(e);if(o){var i=!!t&&("boolean"==typeof t?t:t.immediately),a=(null==t?void 0:t.padding)||0,s=n.viewer.container.getBoundingClientRect(),l=Math.min(2*a/s.width,2*a/s.height),u=o.getBBox(),c=u.x,p=u.y,f=u.width,d=u.height,h=c-l*f,m=p-l*d,y=f+2*l*f,b=d+2*l*d,g=n.viewer.viewport.imageToViewportRectangle(h,m,y,b);n.viewer.viewport[r](g,i)}}),sf(n,"fitBounds",function(e,t){return n._fit(e,t,"fitBounds")}),sf(n,"fitBoundsWithConstraints",function(e,t){return n._fit(e,t,"fitBoundsWithConstraints")}),sf(n,"getAnnotations",function(){return Array.from(n.g.querySelectorAll(".a9s-annotation")).map(function(e){return e.annotation})}),sf(n,"getAnnotationsIntersecting",function(e){var t=e.id?e:n.findShape(e).annotation;return n.store.getAnnotationsIntersecting(t)}),sf(n,"getImageSnippetById",function(e){var t=n.findShape(e);if(t)return Xp(n.viewer,t)}),sf(n,"getSelectedImageSnippet",function(){if(n.selectedShape){var e,t=null!==(e=n.selectedShape.element)&&void 0!==e?e:n.selectedShape;return Xp(n.viewer,t)}}),sf(n,"init",function(e){n.deselect(),Array.from(n.g.querySelectorAll(".a9s-annotation")).forEach(function(e){return n.g.removeChild(e)}),n.store.clear(),n._lazy(function(){console.time("Took"),console.log("Drawing..."),n.loaded||(n.g.style.display="none"),e.forEach(function(e){return n.addAnnotation(e)}),console.log("Indexing..."),n.store.insert(e),console.timeEnd("Took"),n.resize()})}),sf(n,"listDrawingTools",function(){return n.tools.listTools()}),sf(n,"overrideId",function(e,t){var r=n.findShape(e);r.setAttribute("data-id",t);var o=r.annotation,i=o.clone({id:t});return r.annotation=i,n.store.remove(o),n.store.insert(i),i}),sf(n,"panTo",function(e,t){var r=n.findShape(e);if(r){var o=r.getBoundingClientRect(),i=o.top,a=o.left,s=o.width,l=o.height,u=a+s/2+window.scrollX,c=i+l/2+window.scrollY,p=n.viewer.viewport.windowToViewportCoordinates(new(Hi().Point)(u,c));n.viewer.viewport.panTo(p,t)}}),sf(n,"removeAnnotation",function(e){var t,r=e.type?e.id:e;(null===(t=n.selectedShape)||void 0===t?void 0:t.annotation.id)===r&&n.deselect();var o=n.findShape(e);if(o){var i,a=o.annotation;(null===(i=n.selectedShape)||void 0===i?void 0:i.annotation)===a&&n.deselect(),o.parentNode.removeChild(o),n.store.remove(a)}}),sf(n,"removeDrawingTool",function(e){var t;return null===(t=n.tools)||void 0===t?void 0:t.unregisterTool(e)}),sf(n,"scaleFormatterElements",function(e){var t=1/n.currentScale();if(e){var r=e.querySelector(".a9s-annotation:not(.a9s-non-scaling) .a9s-formatter-el");r&&r.firstChild.setAttribute("transform","scale(".concat(t,")"))}else Array.from(n.g.querySelectorAll(".a9s-annotation:not(.a9s-non-scaling) .a9s-formatter-el")).forEach(function(e){return e.firstChild.setAttribute("transform","scale(".concat(t,")"))})}),sf(n,"scaleTool",function(e){if(e){var t=1/n.currentScale();e.scale=t,e.onScaleChanged&&e.onScaleChanged(t)}}),sf(n,"selectAnnotation",function(e,t){n.selectedShape&&n.deselect();var r=n.findShape(e);if(r){n.selectShape(r,t);var o=n.selectedShape.element?n.selectedShape.element:n.selectedShape;return{annotation:r.annotation,element:o}}n.deselect()}),sf(n,"selectShape",function(e,t){var r;if(t||e.annotation.isSelection||n.emit("clickAnnotation",e.annotation,e),(null===(r=n.selectedShape)||void 0===r?void 0:r.annotation)!==e.annotation){n.selectedShape&&n.selectedShape.annotation!==e.annotation&&n.deselect();var o=e.annotation;if(n.readOnly||o.readOnly||n.headless)n.selectedShape=e,zi(e,"selected"),t||n.emit("select",{annotation:o,element:e,skipEvent:t});else{var i=n.tools.forAnnotation(o);if(i){setTimeout(function(){e.parentNode.removeChild(e),t||n.emit("select",{annotation:o,element:n.selectedShape.element})},1),n.selectedShape=i.createEditableShape(o,n.formatters),n.scaleTool(n.selectedShape),n.scaleFormatterElements(n.selectedShape.element),n.selectedShape.element.annotation=o;var a=new(Hi().MouseTracker)({element:n.svg,preProcessEventHandler:function(e){e.stopPropagation="wheel"!==e.eventType,e.preventDefault=!1,e.preventGesture=!0}}).setTracking(!1);n.selectedShape.element.addEventListener("mouseenter",function(){n.hoveredShape=n.selectedShape,a.setTracking(!0)}),n.selectedShape.element.addEventListener("mouseleave",function(){n.hoveredShape=null,a.setTracking(!1)}),n.selectedShape.mouseTracker=a,n.selectedShape.on("update",function(e){return n.emit("updateTarget",n.selectedShape.element,e)})}else n.selectedShape=e,t||n.emit("select",{annotation:o,element:n.selectedShape})}}}),sf(n,"setDrawingEnabled",function(e){if(n.mouseTracker){var t=e&&!n.readOnly;n.mouseTracker.enabled=t,n.mouseTracker.setTracking(t),n.tools.current&&(n.tools.current.enabled=t)}}),sf(n,"setDrawingTool",function(e,t){var r;n.tools&&(null===(r=n.tools.current)||void 0===r||r.stop(),n.tools.setCurrent(e,t))}),sf(n,"setVisible",function(e){e?n.svg.style.display=null:(n.deselect(),n.svg.style.display="none")}),sf(n,"stopDrawing",function(){var e;null!==(e=n.tools)&&void 0!==e&&e.current&&(n.tools.current.isDrawing&&n.tools.current.stop(),n.mouseTracker.enabled=!1,n.tools.current.enabled=!1)}),n.viewer=e.viewer,n.config=e.config,n.env=e.env,n.readOnly=e.config.readOnly,n.headless=e.config.headless,e.config.formatter?n.formatters=[e.config.formatter]:e.config.formatters&&(n.formatters=Array.isArray(e.config.formatters)?e.config.formatters:[e.config.formatters]),n.disableSelect=e.config.disableSelect,n.drawOnSingleClick=e.config.drawOnSingleClick,n.svg=document.createElementNS(Fi,"svg"),uf?(n.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer touch"),r=n.svg,o=null,i=function(e,t){return new MouseEvent(e,{screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,bubbles:!0})},a=function(e){var t=e.changedTouches[0],n=i(Ma[e.type],t);t.target.dispatchEvent(n),e.preventDefault(),"touchstart"!==e.type&&"touchmove"!==e.type||(o&&clearTimeout(o),o=setTimeout(function(){var e=i("dblclick",t);t.target.dispatchEvent(e)},800)),"touchend"===e.type&&o&&clearTimeout(o)},r.addEventListener("touchstart",a,!0),r.addEventListener("touchmove",a,!0),r.addEventListener("touchend",a,!0),r.addEventListener("touchcancel",a,!0)):n.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer"),n.g=document.createElementNS(Fi,"g"),n.svg.appendChild(n.g),n.viewer.canvas.appendChild(n.svg),n.viewer.addHandler("animation",function(){return n.resize()}),n.viewer.addHandler("rotate",function(){return n.resize()}),n.viewer.addHandler("resize",function(){return n.resize()}),n.viewer.addHandler("flip",function(){return n.resize()}),n.loaded=!1;var s=function(){var t=n.viewer.world.getItemAt(0).source.dimensions,r=t.x,o=t.y,i=n.viewer.world.getItemAt(0).source["@id"]||new URL(n.viewer.world.getItemAt(0).source.url,document.baseURI).href;n.env.image={src:i,naturalWidth:r,naturalHeight:o},e.config.crosshair&&(n.crosshair||(n.crosshair=new Gp(n.svg),zi(n.svg,"no-cursor"))),n.loaded||n.emit("load",i),n.loaded=!0,n.g.style.display="inline",n.resize()};return n.viewer.addHandler("open",s),n.viewer.world.addHandler("add-item",s),n.viewer.world.getItemAt(0)&&s(),n.store=new Zp(n.env),n.selectedShape=null,n.hoveredShape=null,n._initMouseEvents(),n}return of(t,e),ef(t,[{key:"resize",value:function(){var e,t=this.viewer.viewport.getFlip(),n=this.viewer.viewport.pixelFromPoint(new(Hi().Point)(0,0),!0);t&&(n.x=this.viewer.viewport._containerInnerSize.x-n.x);var r=this.currentScale(),o=t?-r:r,i=this.viewer.viewport.getRotation();this.g.setAttribute("transform","translate(".concat(n.x,", ").concat(n.y,") scale(").concat(o,", ").concat(r,") rotate(").concat(i,")")),this._refreshNonScalingAnnotations(),this.scaleFormatterElements(),this.selectedShape&&(this.selectedShape.element?(this.scaleTool(this.selectedShape),this.emit("viewportChange",this.selectedShape.element)):this.emit("viewportChange",this.selectedShape)),null!==(e=this.tools)&&void 0!==e&&e.current&&this.scaleTool(this.tools.current)}}])}(n()),pf=function(e){function t(e){var n;return qp(this,t),sf(n=tf(this,t,[e]),"onDrawingComplete",function(e){var t;n.mouseTracker.enabled=null===(t=n.config.hotkey)||void 0===t?void 0:t.inverted,n.selectShape(e),n.emit("createSelection",e.annotation)}),n._initDrawingTools(),n}return of(t,e),ef(t)}(cf);function ff(e){return(ff="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 df(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 hf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?df(Object(n),!0).forEach(function(t){mf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):df(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mf(e,t,n){return r=function(e){if("object"!=ff(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ff(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==ff(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var yf=function(e){var t=e.viewport.viewportToImageRectangle(e.viewport.getBounds(!0)),n=e.viewport.getContainerSize().x;return{extent:t,scale:e.viewport.getZoom(!0)*n/e.world.getContentFactor()}},bf=function(e,t){var n=yf(e),r=n.extent,o=n.scale,i=t.selector,a=aa.create({target:t});if("SvgSelector"===i.type){var s=Ds(a),l=s.nodeName.toLowerCase(),u=null;if("polygon"===l)u=gf(s,r,o);else if("circle"===l)u=vf(s,r,o);else if("ellipse"===l)u=wf(s,r,o);else{if("path"!==l)throw"Unsupported SVG shape type: ".concat(l);u=Af(s,r,o)}var c=u.outerHTML||(new XMLSerializer).serializeToString(u);return c=c.replace(' xmlns="'.concat(Fi,'"'),""),hf(hf({},t),{},{selector:{type:"SvgSelector",value:"<svg>".concat(c,"</svg>")}})}if("FragmentSelector"===i.type){var p=ha(a),f=p.x,d=p.y,h=p.w,m=p.h,y=r.x+f/o,b=r.y+d/o,g=h/o,v=m/o;return 0===h&&0===m?hf(hf({},ma(y,b,g,v)),{},{renderedVia:{name:"point"}}):ma(y,b,g,v)}throw"Unsupported selector type: ".concat(i.type)},gf=function(e,t,n){var r=Array.from(e.points).map(function(e){return t.x+e.x/n+","+(t.y+e.y/n)}).join(" ");return e.setAttribute("points",r),e},vf=function(e,t,n){var r=parseFloat(e.getAttribute("cx")),o=parseFloat(e.getAttribute("cy")),i=parseFloat(e.getAttribute("r"));return e.setAttribute("cx",t.x+r/n),e.setAttribute("cy",t.y+o/n),e.setAttribute("r",i/n),e},wf=function(e,t,n){var r=parseFloat(e.getAttribute("cx")),o=parseFloat(e.getAttribute("cy")),i=parseFloat(e.getAttribute("rx")),a=parseFloat(e.getAttribute("ry"));return e.setAttribute("cx",t.x+r/n),e.setAttribute("cy",t.y+o/n),e.setAttribute("rx",i/n),e.setAttribute("ry",a/n),e},Af=function(e,t,n){var r=e.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(function(e){return e.trim()}).map(function(e){var r=e.substring(0,1);if("z"===r.toLowerCase())return r;var o=e.substring(1).split(" ").map(function(e){return parseFloat(e.trim())}),i=r===r.toUpperCase();return r+" "+(i?t.x+o[0]/n:o[0]/n)+" "+(i?t.y+o[1]/n:o[1]/n)}).join(" ");return e.setAttribute("d",r),e},Sf=function(e,t){var n=yf(e),r=n.extent,o=n.scale,i=t.selector("FragmentSelector");if(t.selector("SvgSelector")){var a=Ds(t),s=a.nodeName.toLowerCase(),l=null;if("polygon"===s)l=Of(a,r,o);else if("circle"===s)l=Ef(a,r,o);else if("ellipse"===s)l=xf(a,r,o);else{if("path"!==s)throw"Unsupported SVG shape type: ".concat(s);l=Cf(a,r,o)}var u=l.outerHTML||(new XMLSerializer).serializeToString(l);u=u.replace(' xmlns="'.concat(Fi,'"'),"");var c={selector:{type:"SvgSelector",value:"<svg>".concat(u,"</svg>")}};return t.clone({target:c})}if(i){var p=ha(t),f=p.x,d=p.y,h=p.w,m=p.h,y=(f-r.x)*o,b=(d-r.y)*o,g=ma(y,b,h*o,m*o);return t.clone({target:g})}},Of=function(e,t,n){var r=Array.from(e.points).map(function(e){return n*(e.x-t.x)+","+n*(e.y-t.y)}).join(" ");return e.setAttribute("points",r),e},Ef=function(e,t,n){var r=e.getAttribute("cx"),o=e.getAttribute("cy"),i=e.getAttribute("r");return e.setAttribute("cx",n*(r-t.x)),e.setAttribute("cy",n*(o-t.y)),e.setAttribute("r",i*n),e},xf=function(e,t,n){var r=e.getAttribute("cx"),o=e.getAttribute("cy"),i=e.getAttribute("rx"),a=e.getAttribute("ry");return e.setAttribute("cx",n*(r-t.x)),e.setAttribute("cy",n*(o-t.y)),e.setAttribute("rx",i*n),e.setAttribute("ry",a*n),e},Cf=function(e,t,n){var r=e.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(function(e){return e.trim()}).map(function(e){var r=e.substring(0,1);if("z"===r.toLowerCase())return r;var o=e.substring(1).split(" ").filter(function(e){return e}).map(function(e){return parseFloat(e.trim())}),i=r===r.toUpperCase();return r+" "+(i?n*(o[0]-t.x):n*o[0])+" "+(i?n*(o[1]-t.y):n*o[1])}).join(" ");return e.setAttribute("d",r),e},Mf=function(e,t){var n,r,o=yf(e),i=o.extent,a=o.scale,s=(r=t.annotation.targets[0])?Array.isArray(r.selector)?r.selector[0].type:null===(n=r.selector)||void 0===n?void 0:n.type:null;if("FragmentSelector"===s)jf(t,i,a);else{if("SvgSelector"!==s)throw"Unsupported selector type type: ".concat(s);Pf(t,i,a)}var l=t.querySelector(".a9s-formatter-el");if(l){var u=t.querySelector(".a9s-inner").getBBox(),c=u.x,p=u.y;l.setAttribute("x",c),l.setAttribute("y",p)}},jf=function(e,t,n){var r=ha(e.annotation),o=r.x,i=r.y,a=r.w,s=r.h,l=e.querySelector(".a9s-outer"),u=e.querySelector(".a9s-inner"),c=n*(o-t.x),p=n*(i-t.y);[l,u].forEach(0===a&&0===s?function(e){e.setAttribute("cx",c),e.setAttribute("cy",p)}:function(e){e.setAttribute("x",c),e.setAttribute("y",p),e.setAttribute("width",a*n),e.setAttribute("height",s*n)})},Pf=function(e,t,n){var r=Ds(e.annotation),o=r.nodeName.toLowerCase();if("polygon"===o)If(e,r,t,n);else if("circle"===o)kf(e,r,t,n);else if("ellipse"===o)Tf(e,r,t,n);else{if("path"!==o)throw"Unsupported SVG shape type: ".concat(o);Df(e,r,t,n)}},If=function(e,t,n,r){var o=Array.from(t.points).map(function(e){return r*(e.x-n.x)+","+r*(e.y-n.y)}).join(" ");e.querySelector(".a9s-outer").setAttribute("points",o),e.querySelector(".a9s-inner").setAttribute("points",o)},kf=function(e,t,n,r){var o=r*(t.getAttribute("cx")-n.x),i=r*(t.getAttribute("cy")-n.y),a=r*t.getAttribute("r"),s=e.querySelector(".a9s-outer");s.setAttribute("cx",o),s.setAttribute("cy",i),s.setAttribute("r",a);var l=e.querySelector(".a9s-inner");l.setAttribute("cx",o),l.setAttribute("cy",i),l.setAttribute("r",a)},Tf=function(e,t,n,r){var o=r*(t.getAttribute("cx")-n.x),i=r*(t.getAttribute("cy")-n.y),a=r*t.getAttribute("rx"),s=r*t.getAttribute("ry"),l=e.querySelector(".a9s-outer");l.setAttribute("cx",o),l.setAttribute("cy",i),l.setAttribute("rx",a),l.setAttribute("ry",s);var u=e.querySelector(".a9s-inner");u.setAttribute("cx",o),u.setAttribute("cy",i),u.setAttribute("rx",a),u.setAttribute("ry",s)},Df=function(e,t,n,r){var o=t.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(function(e){return e.trim()}).map(function(e){var t=e.substring(0,1);if("z"===t.toLowerCase())return t;var o=e.substring(1).split(" ").filter(function(e){return e}).map(function(e){return parseFloat(e.trim())}),i=t===t.toUpperCase();return t+" "+(i?r*(o[0]-n.x):r*o[0])+" "+(i?r*(o[1]-n.y):r*o[1])}).join(" ");e.querySelector(".a9s-inner").setAttribute("d",o),e.querySelector(".a9s-outer").setAttribute("d",o)};function Rf(e){return(Rf="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 Nf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Nf=function(){return!!e})()}function Lf(e){return(Lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bf(e,t){return(Bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _f(e,t,n){return(t=Gf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gf(e){var t=function(e){if("object"!=Rf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rf(t)?t:t+""}var Hf=ja(),Ff=function(e){function t(e){var n,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_f((r=this,i=[e],o=Lf(o=t),n=function(e,t){if(t&&("object"==Rf(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)}(r,Nf()?Reflect.construct(o,i||[],Lf(r).constructor):o.apply(r,i))),"_fit",function(e,t,r){var o=!!t&&("boolean"==typeof t?t:t.immediately),i=(null==t?void 0:t.padding)||0,a=n.findShape(e);if(a){var s=n.viewer.container.getBoundingClientRect(),l=a.getBoundingClientRect(),u=l.x-s.x-i,c=l.y-s.y-i,p=l.width+2*i,f=l.height+2*i,d=n.viewer.viewport.viewerElementToViewportRectangle(new(Hi().Rect)(u,c,p,f));n.viewer.viewport[r](d,o)}}),_f(n,"_getShapeAt",function(e){var t=n.viewer.viewport.viewerElementToViewportCoordinates(function(e){if(Hf){var t=n.svg.getBoundingClientRect(),r=e.clientX-t.x,o=e.clientY-t.y;return new(Hi().Point)(r,o)}return new(Hi().Point)(e.offsetX,e.offsetY)}(e)),r=n.viewer.viewport.viewportToImageCoordinates(t.x,t.y),o=r.x,i=r.y,a=n.store.getAnnotationAt(o,i,n.currentScale());if(a)return n.findShape(a)}),_f(n,"_refreshNonScalingAnnotations",function(){}),_f(n,"addAnnotation",function(e,t){var r=t||n.g,o=Rp(e,n.env.image);return zi(o,"a9s-annotation"),o.setAttribute("data-id",e.id),o.annotation=e,Mf(n.viewer,o),r.appendChild(o),ts(o,e,n.formatters),o}),_f(n,"addOrUpdateAnnotation",function(e,t){var r,o=null===(r=n.selectedShape)||void 0===r?void 0:r.annotation;(o===e||null!=o&&o.isSelection||o==t)&&n.deselect(),t&&n.removeAnnotation(e),n.removeAnnotation(e),n.addAnnotation(e),n.store.insert(e)}),_f(n,"deselect",function(){var e;if(null===(e=n.tools)||void 0===e||e.current.stop(),n.selectedShape){var t=n.selectedShape.annotation;n.selectedShape.destroy?(n.selectedShape.mouseTracker.destroy(),n.selectedShape.destroy(),t.isSelection||n.addAnnotation(t)):Yi(n.selectedShape,"selected"),n.selectedShape=null}}),_f(n,"onDrawingComplete",function(e){var t=e.annotation.clone({target:bf(n.viewer,e.annotation.target)});e.annotation=t,n.selectShape(e),n.emit("createSelection",e.annotation),n.mouseTracker.enabled=!1}),_f(n,"selectShape",function(e,t){var r;if(t||e.annotation.isSelection||n.emit("clickAnnotation",e.annotation,e),(null===(r=n.selectedShape)||void 0===r?void 0:r.annotation)!==e.annotation){n.selectedShape&&n.selectedShape.annotation!==e.annotation&&n.deselect(!0);var o=e.annotation;if(n.readOnly||o.readOnly||n.headless)n.selectedShape=e,zi(e,"selected"),t||n.emit("select",{annotation:o,element:e,skipEvent:t});else{setTimeout(function(){e.parentNode.removeChild(e),t||n.emit("select",{annotation:o,element:n.selectedShape.element})},1);var i=n.tools.forAnnotation(o);n.selectedShape=i.createEditableShape(o),n.selectedShape.element.annotation=o;var a=Sf(n.viewer,o);n.selectedShape.updateState(a);var s=new(Hi().MouseTracker)({element:n.svg,preProcessEventHandler:function(e){e.stopPropagation=!0,e.preventDefault=!1,e.preventGesture=!0}}).setTracking(!1);n.selectedShape.element.addEventListener("mouseenter",function(){n.hoveredShape=n.selectedShape,s.setTracking(!0)}),n.selectedShape.element.addEventListener("mouseleave",function(){n.hoveredShape=null,s.setTracking(!1)}),n.selectedShape.mouseTracker=s,n.selectedShape.on("update",function(e){var t=bf(n.viewer,e);n.selectedShape.element.annotation=n.selectedShape.annotation.clone({target:t}),n.emit("updateTarget",n.selectedShape.element,t)})}}}),n._initDrawingTools(!0),n}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bf(e,t)}(t,e),n=t,r=[{key:"resize",value:function(){var e=this;if(this.store&&(Array.from(this.g.querySelectorAll(".a9s-annotation:not(.selected)")).forEach(function(t){return Mf(e.viewer,t)}),this.selectedShape))if(this.selectedShape.element){var t=Sf(this.viewer,this.selectedShape.element.annotation);this.selectedShape.updateState&&this.selectedShape.updateState(t),this.emit("viewportChange",this.selectedShape.element)}else this.emit("viewportChange",this.selectedShape)}}],r&&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,Gf(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(cf);function Uf(e){return(Uf="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 zf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(zf=function(){return!!e})()}function Yf(e){return(Yf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vf(e,t){return(Vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qf(e,t,n){return(t=Jf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jf(e){var t=function(e){if("object"!=Uf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Uf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Uf(t)?t:t+""}var Wf=function(t){function n(t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),Qf(r=function(e,t,n){return t=Yf(t),function(e,t){if(t&&("object"==Uf(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)}(e,zf()?Reflect.construct(t,n||[],Yf(e).constructor):t.apply(e,n))}(this,n,[t]),"clearState",function(e){return r.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,beforeHeadlessModify:null},e)}),Qf(r,"forwardEvent",function(e,t){r.annotationLayer.on(e,function(e,n){r.props[t](e.clone(),n)})}),Qf(r,"onKeyUp",function(e){if(27===e.which){r.annotationLayer.stopDrawing();var t=r.state.selectedAnnotation;t&&(r.cancelSelected(),r.props.onCancelSelected(t))}else if(46===e.which&&!r.props.config.disableDeleteKey){var n=r.state.selectedAnnotation;n&&(n.isSelection?r.onCancelAnnotation(n):r.onDeleteAnnotation(n))}}),Qf(r,"handleStartSelect",function(e){return r.props.onSelectionStarted(e)}),Qf(r,"handleEndSelect",function(e){return r.props.onSelectionEnded(e)}),Qf(r,"handleSelect",function(e,t){r.state.editorDisabled?r.onHeadlessSelect(e,t):r.onNormalSelect(e,t)}),Qf(r,"onNormalSelect",function(e,t){var n=e.annotation,o=e.element;if(n){var i=function(){r.setState({selectedAnnotation:n,selectedDOMElement:o,modifiedTarget:null},function(){t||(n.isSelection?r.props.onSelectionCreated(n.clone()):r.props.onAnnotationSelected(n.clone(),o))})},a=r.state.selectedAnnotation;a&&!a.isEqual(n)?r.clearState(function(){r.props.onCancelSelected(a),i()}):i()}else{var s=r.state.selectedAnnotation;s?r.clearState(function(){return r.props.onCancelSelected(s)}):r.clearState()}}),Qf(r,"onHeadlessSelect",function(e,t){r.saveSelected().then(function(){r.onNormalSelect(e,t)})}),Qf(r,"handleUpdateTarget",function(e,t){r.setState({selectedDOMElement:e,modifiedTarget:t});var n=JSON.parse(JSON.stringify(t));r.props.onSelectionTargetChanged(n)}),Qf(r,"handleViewportChange",function(e){return r.setState({selectedDOMElement:e})}),Qf(r,"overrideAnnotationId",function(e){return function(t){var n=e.id;r.state.selectedAnnotation?r.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null},function(){r.annotationLayer.overrideId(n,t)}):r.annotationLayer.overrideId(n,t)}}),Qf(r,"onCreateOrUpdateAnnotation",function(e,t){return function(n,o){var i=n.isSelection?n.toAnnotation():n;i=r.state.modifiedTarget?i.clone({target:r.state.modifiedTarget}):i.clone(),r.clearState(function(){r.annotationLayer.addOrUpdateAnnotation(i,o),o?r.props[e](i,o.clone()):r.props[e](i,r.overrideAnnotationId(i)),t&&t()})}}),Qf(r,"onDeleteAnnotation",function(e){r.clearState(),r.annotationLayer.removeAnnotation(e),r.props.onAnnotationDeleted(e)}),Qf(r,"onCancelAnnotation",function(e,t){r.state.editorDisabled||r.annotationLayer.deselect(),r.props.onCancelSelected(e),r.clearState(t)}),Qf(r,"addAnnotation",function(e){var t;e.id===(null===(t=r.state.selectedAnnotation)||void 0===t?void 0:t.id)&&(r.annotationLayer.deselect(),r.clearState()),r.annotationLayer.addOrUpdateAnnotation(e.clone())}),Qf(r,"addDrawingTool",function(e){return r.annotationLayer.addDrawingTool(e)}),Qf(r,"cancelSelected",function(){return new Promise(function(e){r.annotationLayer.deselect(),r.state.selectedAnnotation?r.clearState(e):e()})}),Qf(r,"fitBounds",function(e,t){return r.annotationLayer.fitBounds(e,t)}),Qf(r,"fitBoundsWithConstraints",function(e,t){return r.annotationLayer.fitBoundsWithConstraints(e,t)}),Qf(r,"getAnnotationById",function(e){var t;return null===(t=r.annotationLayer.findShape(e))||void 0===t?void 0:t.annotation}),Qf(r,"getAnnotations",function(){return r.annotationLayer.getAnnotations().map(function(e){return e.clone()})}),Qf(r,"getAnnotationsIntersecting",function(e){return r.annotationLayer.getAnnotationsIntersecting(e)}),Qf(r,"getImageSnippetById",function(e){return r.annotationLayer.getImageSnippetById(e)}),Qf(r,"getSelected",function(){var e;if(r.state.selectedAnnotation)return r.state.editorDisabled?r.state.selectedAnnotation:null===(e=r._editor.current)||void 0===e?void 0:e.getCurrentAnnotation()}),Qf(r,"getSelectedImageSnippet",function(){return r.annotationLayer.getSelectedImageSnippet()}),Qf(r,"listDrawingTools",function(){return r.annotationLayer.listDrawingTools()}),Qf(r,"panTo",function(e,t){return r.annotationLayer.panTo(e,t)}),Qf(r,"removeAnnotation",function(e){return r.annotationLayer.removeAnnotation(e)}),Qf(r,"removeDrawingTool",function(e){return r.annotationLayer.removeDrawingTool(e)}),Qf(r,"saveSelected",function(){return new Promise(function(e){var t=r.state.selectedAnnotation;if(t)if(r._editor.current)r._editor.current.onOk(),e();else if(t.isSelection)t.bodies.length>0||r.props.config.allowEmpty?r.onCreateOrUpdateAnnotation("onAnnotationCreated",e)(t):(r.annotationLayer.deselect(),e());else{var n=r.state,o=n.beforeHeadlessModify,i=n.modifiedTarget;o?r.onCreateOrUpdateAnnotation("onAnnotationUpdated",e)(t,o):i?r.onCreateOrUpdateAnnotation("onAnnotationUpdated",e)(t,t):r.onCancelAnnotation(t,e)}else e()})}),Qf(r,"selectAnnotation",function(e){var t=r.annotationLayer.selectAnnotation(e,!0);if(t)return r.handleSelect(t,!0),t.annotation.clone();r.clearState()}),Qf(r,"setAnnotations",function(e){return r.annotationLayer.init(e.map(function(e){return e.clone()}))}),Qf(r,"setDrawingEnabled",function(e){return r.annotationLayer.setDrawingEnabled(e)}),Qf(r,"setDrawingTool",function(e,t){r.state.color=t,r.annotationLayer.setDrawingTool(e,t)}),Qf(r,"setVisible",function(e){r.annotationLayer.setVisible(e),e||r.clearState()}),Qf(r,"updateSelected",function(e,t){return new Promise(function(n){r.state.selectedAnnotation&&(t?r.state.selectedAnnotation.isSelection?r.onCreateOrUpdateAnnotation("onAnnotationCreated",n)(e):r.onCreateOrUpdateAnnotation("onAnnotationUpdated",n)(e,r.state.selectedAnnotation):r.setState({selectedAnnotation:e,beforeHeadlessModify:r.state.beforeHeadlessModify||r.state.selectedAnnotation},n))})}),r.state={selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,readOnly:t.config.readOnly,editorDisabled:t.config.disableEditor,widgets:t.config.widgets,beforeHeadlessModify:null},r._editor=e.default.createRef(),r}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vf(e,t)}(n,t),function(e,t){return t&&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,Jf(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"componentDidMount",value:function(){this.annotationLayer=this.props.config.gigapixelMode?new Ff(this.props):new pf(this.props),this.annotationLayer.on("load",this.props.onLoad),this.annotationLayer.on("startSelection",this.handleStartSelect),this.annotationLayer.on("endSelection",this.handleEndSelect),this.annotationLayer.on("select",this.handleSelect),this.annotationLayer.on("updateTarget",this.handleUpdateTarget),this.annotationLayer.on("viewportChange",this.handleViewportChange),this.forwardEvent("clickAnnotation","onClickAnnotation"),this.forwardEvent("mouseEnterAnnotation","onMouseEnterAnnotation"),this.forwardEvent("mouseLeaveAnnotation","onMouseLeaveAnnotation"),document.addEventListener("keyup",this.onKeyUp)}},{key:"componentWillUnmount",value:function(){this.annotationLayer.destroy(),document.removeEventListener("keyup",this.onKeyUp)}},{key:"disableEditor",get:function(){return this.state.editorDisabled},set:function(e){this.setState({editorDisabled:e})}},{key:"disableSelect",get:function(){return this.annotationLayer.disableSelect},set:function(e){this.annotationLayer.disableSelect=e}},{key:"formatters",get:function(){return this.annotationLayer.formatters},set:function(e){this.annotationLayer.formatters=e}},{key:"readOnly",get:function(){return this.state.readOnly},set:function(e){this.annotationLayer.readOnly=e,this.setState({readOnly:e})}},{key:"widgets",get:function(){return this.state.widgets},set:function(e){this.setState({widgets:e})}},{key:"render",value:function(){var t,n=this.state.selectedAnnotation&&!this.state.editorDisabled,r=this.state.readOnly||(null===(t=this.state.selectedAnnotation)||void 0===t?void 0:t.readOnly);return n&&e.default.createElement(_i,{ref:this._editor,detachable:!0,wrapperEl:this.props.wrapperEl,annotation:this.state.selectedAnnotation,modifiedTarget:this.state.modifiedTarget,selectedElement:this.state.selectedDOMElement,readOnly:r,allowEmpty:this.props.config.allowEmpty,widgets:this.state.widgets,env:this.props.env,onAnnotationCreated:this.onCreateOrUpdateAnnotation("onAnnotationCreated"),onAnnotationUpdated:this.onCreateOrUpdateAnnotation("onAnnotationUpdated"),onAnnotationDeleted:this.onDeleteAnnotation,onCancel:this.onCancelAnnotation})}}])}(e.Component),Zf=0;function Xf(e){return(Xf="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 Kf(e,t,n){return(t=qf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qf(e){var t=function(e){if("object"!=Xf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xf(t)?t:t+""}var $f=function(e,t){return t&&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,qf(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function t(r,o){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Kf(this,"handleAnnotationCreated",function(e,t){return i._emitter.emit("createAnnotation",e.underlying,t)}),Kf(this,"handleAnnotationDeleted",function(e){return i._emitter.emit("deleteAnnotation",e.underlying)}),Kf(this,"handleAnnotationSelected",function(e,t){return i._emitter.emit("selectAnnotation",e.underlying,t)}),Kf(this,"handleAnnotationUpdated",function(e,t){return i._emitter.emit("updateAnnotation",e.underlying,t.underlying)}),Kf(this,"handleCancelSelected",function(e){return i._emitter.emit("cancelSelected",e.underlying)}),Kf(this,"handleClickAnnotation",function(e,t){return i._emitter.emit("clickAnnotation",e.underlying,t)}),Kf(this,"handleLoad",function(e){return i._emitter.emit("load",e)}),Kf(this,"handleSelectionCreated",function(e){return i._emitter.emit("createSelection",e.underlying)}),Kf(this,"handleSelectionStarted",function(e){return i._emitter.emit("startSelection",e)}),Kf(this,"handleSelectionEnded",function(e){return i._emitter.emit("endSelection",e)}),Kf(this,"handleSelectionTargetChanged",function(e){return i._emitter.emit("changeSelectionTarget",e)}),Kf(this,"handleMouseEnterAnnotation",function(e,t){return i._emitter.emit("mouseEnterAnnotation",e.underlying,t)}),Kf(this,"handleMouseLeaveAnnotation",function(e,t){return i._emitter.emit("mouseLeaveAnnotation",e.underlying,t)}),Kf(this,"_wrap",function(e){return"Annotation"===(null==e?void 0:e.type)?new aa(e):e}),Kf(this,"addAnnotation",function(e){return i._app.current.addAnnotation(new aa(e))}),Kf(this,"addDrawingTool",function(e){return i._app.current.addDrawingTool(e)}),Kf(this,"cancelSelected",function(){return i._app.current.cancelSelected()}),Kf(this,"clearAnnotations",function(){return i.setAnnotations([])}),Kf(this,"clearAuthInfo",function(){return i._env.user=null}),Kf(this,"destroy",function(){return e.default.unmountComponentAtNode(i.appContainerEl)}),Kf(this,"fitBounds",function(e,t){return i._app.current.fitBounds(i._wrap(e),t)}),Kf(this,"fitBoundsWithConstraints",function(e,t){return i._app.current.fitBoundsWithConstraints(i._wrap(e),t)}),Kf(this,"getAnnotationById",function(e){var t=i._app.current.getAnnotationById(e);return null==t?void 0:t.underlying}),Kf(this,"getAnnotations",function(){return i._app.current.getAnnotations().map(function(e){return e.underlying})}),Kf(this,"getAnnotationsIntersecting",function(e){return i._app.current.getAnnotationsIntersecting(i._wrap(e))}),Kf(this,"getImageSnippetById",function(e){return i._app.current.getImageSnippetById(e)}),Kf(this,"getSelected",function(){var e=i._app.current.getSelected();return null==e?void 0:e.underlying}),Kf(this,"getSelectedImageSnippet",function(){return i._app.current.getSelectedImageSnippet()}),Kf(this,"listDrawingTools",function(){return i._app.current.listDrawingTools()}),Kf(this,"loadAnnotations",function(e){return fetch(e).then(function(e){return e.json()}).then(function(e){return i.setAnnotations(e),e})}),Kf(this,"off",function(e,t){return i._emitter.off(e,t)}),Kf(this,"on",function(e,t){return i._emitter.on(e,t)}),Kf(this,"once",function(e,t){return i._emitter.once(e,t)}),Kf(this,"panTo",function(e,t){return i._app.current.panTo(i._wrap(e),t)}),Kf(this,"removeAnnotation",function(e){return i._app.current.removeAnnotation(i._wrap(e))}),Kf(this,"removeDrawingTool",function(e){return i._app.current.removeDrawingTool(e)}),Kf(this,"saveSelected",function(){return i._app.current.saveSelected()}),Kf(this,"selectAnnotation",function(e){var t=i._app.current.selectAnnotation(i._wrap(e));return null==t?void 0:t.underlying}),Kf(this,"setAnnotations",function(e){var t=(e||[]).map(function(e){return new aa(e)});i._app.current.setAnnotations(t)}),Kf(this,"setAuthInfo",function(e){return i._env.user=e}),Kf(this,"setDrawingEnabled",function(e){return i._app.current.setDrawingEnabled(e)}),Kf(this,"setDrawingTool",function(e,t){i._color=t,i._app.current.setDrawingTool(e,t)}),Kf(this,"setServerTime",function(e){return i._env.setServerTime(e)}),Kf(this,"setVisible",function(e){return i._app.current.setVisible(e)}),Kf(this,"updateSelected",function(e,t){var n=null;"Annotation"===e.type?n=new aa(e):"Selection"===e.type&&(n=new fa(e.target,e.body)),n&&i._app.current.updateSelected(n,t)});var a=o||{};this._app=e.default.createRef(),this._emitter=new(n()),this._env={setServerTime:function(e){var t=Date.now();Zf=e-t},getCurrentTimeAdjusted:function(){return new Date(Date.now()+Zf).toISOString()},toClientTime:function(e){return Date.parse(e)-Zf}},this._element=r.element,"static"===window.getComputedStyle(this._element).getPropertyValue("position")&&(this._element.style.position="relative"),function(e,t){if(e){var n="auto"===e?window.navigator.userLanguage||window.navigator.language:e,r=n.split("-")[0].toLowerCase(),o=[n,r].find(function(e){return Se.includes(e)});o||console.warn("Unsupported locale '".concat(n,"'. Falling back to default en.")),Ee.init(o,t)}else Ee.init(null,t)}(a.locale,a.messages),this.appContainerEl=document.createElement("DIV"),this._element.appendChild(this.appContainerEl),e.default.render(e.default.createElement(Wf,{ref:this._app,viewer:r,wrapperEl:this._element,config:a,env:this._env,onSelectionStarted:this.handleSelectionStarted,onSelectionEnded:this.handleSelectionEnded,onSelectionCreated:this.handleSelectionCreated,onSelectionTargetChanged:this.handleSelectionTargetChanged,onAnnotationCreated:this.handleAnnotationCreated,onAnnotationSelected:this.handleAnnotationSelected,onAnnotationUpdated:this.handleAnnotationUpdated,onAnnotationDeleted:this.handleAnnotationDeleted,onCancelSelected:this.handleCancelSelected,onClickAnnotation:this.handleClickAnnotation,onLoad:this.handleLoad,onMouseEnterAnnotation:this.handleMouseEnterAnnotation,onMouseLeaveAnnotation:this.handleMouseLeaveAnnotation}),this.appContainerEl)},[{key:"disableEditor",get:function(){return this._app.current.disableEditor},set:function(e){this._app.current.disableEditor=e}},{key:"disableSelect",get:function(){return this._app.current.disableSelect},set:function(e){this._app.current.disableSelect=e}},{key:"formatters",get:function(){return this._app.current.formatters||[]},set:function(e){if(e){var t=Array.isArray(e)?e:[e];this._app.current.formatters=t}else this._app.current.formatters=null}},{key:"readOnly",get:function(){return this._app.current.readOnly},set:function(e){this._app.current.readOnly=e}},{key:"widgets",get:function(){return this._app.current.widgets},set:function(e){this._app.current.widgets=e}}]);const ed=function(e,t){return new $f(e,t)}})(),o.default})(),u.exports=l(t);const c=s(u.exports);class p{constructor(e){__publicField(this,"engine"),__publicField(this,"isEnabled",!1),this.engine=e}}class f extends p{constructor(e,t={}){super(e),__publicField(this,"anno"),this.anno=c(this.engine.viewer,{...t}),this.injectStyles(),this.initEvents(t)}setEnabled(e){this.anno.setDrawingEnabled(e)}setTool(e,t){e?(this.anno.setDrawingTool(e,t),this.setEnabled(!0)):this.setEnabled(!1)}setLocale(e){var t;(null==(t=this.anno)?void 0:t.setLocale)&&this.anno.setLocale(e)}getAnnotations(){return this.anno.getAnnotations()}setAnnotations(e){this.anno.setAnnotations(e)}clear(){this.anno.clearAnnotations()}destroy(){this.anno.destroy()}initEvents(e){e.onCreateAnnotation&&this.anno.on("createAnnotation",t=>{e.onCreateAnnotation(t)}),e.onUpdateAnnotation&&this.anno.on("updateAnnotation",(t,n)=>{e.onUpdateAnnotation(t,n)}),e.onDeleteAnnotation&&this.anno.on("deleteAnnotation",t=>{e.onDeleteAnnotation(t)})}injectStyles(){const e="med-anno-v2-7-17-overrides";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.innerHTML="\n .a9s-handle .a9s-handle-inner {\n stroke: #FFEB3B;\n fill: #FF9800;\n }\n .a9s-handle .a9s-handle-outer {\n stroke: #000;\n fill: #fff;\n }",document.head.appendChild(t)}}!function(){var e=window.OpenSeadragon;if(!e&&!(e=t))throw new Error("OpenSeadragon is missing.");if(!e.version||e.version.major<2||2===e.version.major&&e.version.minor<1)throw new Error("Filtering plugin requires OpenSeadragon version >= 2.1");function n(t,n){var i=(n=n||{}).filters;t.filters=i?e.isArray(i)?i:[i]:[];for(var a=0;a<t.filters.length;a++){if(!(l=t.filters[a]).processors)throw new Error("Filter processors must be specified.");l.processors=e.isArray(l.processors)?l.processors:[l.processors]}if(t.filterIncrement++,"sync"===n.loadMode)t.viewer.forceRedraw();else{var s=[];for(a=0;a<t.filters.length;a++){var l;if(!(l=t.filters[a]).items){s=o(t.viewer.world);break}if(e.isArray(l.items))for(var u=0;u<l.items.length;u++)r(l.items[u],s);else r(l.items,s)}for(a=0;a<s.length;a++)s[a].reset()}}function r(e,t){if(t.indexOf(e)>=0)throw new Error("An item can not have filters assigned multiple times.");t.push(e)}function o(e){for(var t=[],n=0;n<e.getItemCount();n++)t.push(e.getItemAt(n));return t}function i(t,n){if(0===t.filters.length)return[];for(var r=null,o=0;o<t.filters.length;o++){var i=t.filters[o];if(i.items){if(i.items===n||e.isArray(i.items)&&i.items.indexOf(n)>=0)return i.processors}else r=i.processors}return r||[]}e.Viewer.prototype.setFilterOptions=function(t){this.filterPluginInstance?n(this.filterPluginInstance,t):((t=t||{}).viewer=this,this.filterPluginInstance=new e.FilterPlugin(t))},e.FilterPlugin=function(e){if(!(e=e||{}).viewer)throw new Error("A viewer must be specified.");var t=this;function r(e,n,r){if(r){for(var o=t.filterIncrement,i=[],a=0;a<n.length-1;a++)(function(r){i[r]=function(){t.filterIncrement===o&&n[r+1](e,i[r+1])}})(a);i[n.length-1]=function(){t.filterIncrement===o&&r()},n[0](e,i[0])}else for(a=0;a<n.length;a++)n[a](e,function(){})}this.viewer=e.viewer,this.viewer.addHandler("tile-loaded",function(e){var n=i(t,e.tiledImage);if(0===n.length)return;var o=e.tile,a=e.image;if(null!=a){var s=window.document.createElement("canvas");s.width=a.width,s.height=a.height;var l=s.getContext("2d");l.drawImage(a,0,0),o._renderedContext=l,r(l,n,e.getCompletionCallback()),o._filterIncrement=t.filterIncrement}}),this.viewer.addHandler("tile-drawing",function(e){var n=e.tile,o=e.rendered;if(o._filterIncrement===t.filterIncrement)return;var a=i(t,e.tiledImage);if(0===a.length)return o._originalImageData&&(o.putImageData(o._originalImageData,0,0),delete o._originalImageData),void(o._filterIncrement=t.filterIncrement);o._originalImageData?o.putImageData(o._originalImageData,0,0):o._originalImageData=o.getImageData(0,0,o.canvas.width,o.canvas.height);if(n._renderedContext){if(n._filterIncrement===t.filterIncrement){var s=n._renderedContext.getImageData(0,0,n._renderedContext.canvas.width,n._renderedContext.canvas.height);return o.putImageData(s,0,0),delete n._renderedContext,delete n._filterIncrement,void(o._filterIncrement=t.filterIncrement)}delete n._renderedContext,delete n._filterIncrement}r(o,a),o._filterIncrement=t.filterIncrement}),this.filterIncrement=0,n(this,e)},e.Filters={THRESHOLDING:function(e){if(e<0||e>255)throw new Error("Threshold must be between 0 and 255.");return function(t,n){for(var r=t.getImageData(0,0,t.canvas.width,t.canvas.height),o=r.data,i=0;i<o.length;i+=4){var a=(o[i]+o[i+1]+o[i+2])/3;o[i]=o[i+1]=o[i+2]=a<e?0:255}t.putImageData(r,0,0),n()}},BRIGHTNESS:function(e){if(e<-255||e>255)throw new Error("Brightness adjustment must be between -255 and 255.");for(var t=[],n=0;n<256;n++)t[n]=n+e;return function(e,n){for(var r=e.getImageData(0,0,e.canvas.width,e.canvas.height),o=r.data,i=0;i<o.length;i+=4)o[i]=t[o[i]],o[i+1]=t[o[i+1]],o[i+2]=t[o[i+2]];e.putImageData(r,0,0),n()}},CONTRAST:function(e){if(e<0)throw new Error("Contrast adjustment must be positive.");for(var t=[],n=0;n<256;n++)t[n]=n*e;return function(e,n){for(var r=e.getImageData(0,0,e.canvas.width,e.canvas.height),o=r.data,i=0;i<o.length;i+=4)o[i]=t[o[i]],o[i+1]=t[o[i+1]],o[i+2]=t[o[i+2]];e.putImageData(r,0,0),n()}},GAMMA:function(e){if(e<0)throw new Error("Gamma adjustment must be positive.");for(var t=[],n=0;n<256;n++)t[n]=255*Math.pow(n/255,e);return function(e,n){for(var r=e.getImageData(0,0,e.canvas.width,e.canvas.height),o=r.data,i=0;i<o.length;i+=4)o[i]=t[o[i]],o[i+1]=t[o[i+1]],o[i+2]=t[o[i+2]];e.putImageData(r,0,0),n()}},GREYSCALE:function(){return function(e,t){for(var n=e.getImageData(0,0,e.canvas.width,e.canvas.height),r=n.data,o=0;o<r.length;o+=4){var i=(r[o]+r[o+1]+r[o+2])/3;r[o]=i,r[o+1]=i,r[o+2]=i}e.putImageData(n,0,0),t()}},INVERT:function(){for(var e=[],t=0;t<256;t++)e[t]=255-t;return function(t,n){for(var r=t.getImageData(0,0,t.canvas.width,t.canvas.height),o=r.data,i=0;i<o.length;i+=4)o[i]=e[o[i]],o[i+1]=e[o[i+1]],o[i+2]=e[o[i+2]];t.putImageData(r,0,0),n()}},MORPHOLOGICAL_OPERATION:function(e,t){if(e%2==0)throw new Error("The kernel size must be an odd number.");var n=Math.floor(e/2);if(!t)throw new Error("A comparator must be defined.");return function(r,o){for(var i,a=r.canvas.width,s=r.canvas.height,l=r.getImageData(0,0,a,s),u=r.getImageData(0,0,a,s).data,c=0;c<s;c++)for(var p=0;p<a;p++){for(var f=u[i=4*(c*a+p)],d=u[i+1],h=u[i+2],m=0;m<e;m++)for(var y=0;y<e;y++){var b=p+y-n,g=c+m-n;b>=0&&b<a&&g>=0&&g<s&&(f=t(u[i=4*(g*a+b)],f),d=t(u[i+1],d),h=t(u[i+2],h))}l.data[i]=f,l.data[i+1]=d,l.data[i+2]=h}r.putImageData(l,0,0),o()}},CONVOLUTION:function(t){if(!e.isArray(t))throw new Error("The kernel must be an array.");var n=Math.sqrt(t.length);if((n+1)%2!=0)throw new Error("The kernel must be a square matrix with oddwidth and height.");var r=(n-1)/2;return function(e,o){for(var i,a=e.canvas.width,s=e.canvas.height,l=e.getImageData(0,0,a,s),u=e.getImageData(0,0,a,s).data,c=0;c<s;c++)for(var p=0;p<a;p++){for(var f=0,d=0,h=0,m=0;m<n;m++)for(var y=0;y<n;y++){var b=p+y-r,g=c+m-r;if(b>=0&&b<a&&g>=0&&g<s){i=4*(g*a+b);var v=t[m*n+y];f+=u[i]*v,d+=u[i+1]*v,h+=u[i+2]*v}}i=4*(c*a+p),l.data[i]=f,l.data[i+1]=d,l.data[i+2]=h}e.putImageData(l,0,0),o()}},COLORMAP:function(e,t){for(var n=e.slice(0),r=255-t,o=0;o<256;o++){var i=0;i=o>t?0|Math.min((o-t)/r*128+128,255):0|Math.max(0,o/(t/128)),n[o]=e[i]}return function(e,t){for(var r=e.getImageData(0,0,e.canvas.width,e.canvas.height),o=r.data,i=0;i<o.length;i+=4){var a=(o[i]+o[i+1]+o[i+2])/3|0,s=n[a];o[i]=s[0],o[i+1]=s[1],o[i+2]=s[2]}e.putImageData(r,0,0),t()}}}}();class d{constructor(e,t){__publicField(this,"viewer"),__publicField(this,"_adjustments"),__publicField(this,"options"),__publicField(this,"lut",new Uint8ClampedArray(256)),__publicField(this,"needUpdate",!0),__publicField(this,"debounceTimer",null),__publicField(this,"combinedProcessor",(e,t)=>{setTimeout(()=>{const{width:n,height:r}=e.canvas;if(n<=0||r<=0)return void t();this.needUpdate&&this.updateLut();const o=e.getImageData(0,0,n,r),i=o.data,a=i.length,s=this.lut,{hue:l=0,saturation:u=1,greyscale:c,sepia:p}=this._adjustments;if(c)for(let e=0;e<a;e+=4){const t=.2126*s[i[e]]+.7152*s[i[e+1]]+.0722*s[i[e+2]];i[e]=i[e+1]=i[e+2]=t}else if(p)for(let e=0;e<a;e+=4){const t=s[i[e]],n=s[i[e+1]],r=s[i[e+2]];i[e]=.393*t+.769*n+.189*r,i[e+1]=.349*t+.686*n+.168*r,i[e+2]=.272*t+.534*n+.131*r}else{const e=0!==l,t=1!==u,n=l*(Math.PI/180),r=Math.cos(n),o=Math.sin(n),c=r+(1-r)/3,p=1/3*(1-r)-Math.sqrt(1/3)*o,f=1/3*(1-r)+Math.sqrt(1/3)*o,d=1/3*(1-r)+Math.sqrt(1/3)*o,h=r+(1-r)/3,m=1/3*(1-r)-Math.sqrt(1/3)*o,y=1/3*(1-r)-Math.sqrt(1/3)*o,b=1/3*(1-r)+Math.sqrt(1/3)*o,g=r+(1-r)/3;for(let l=0;l<a;l+=4){let n=s[i[l]],r=s[i[l+1]],o=s[i[l+2]];if(e){const e=n*p+r*h+o*b,t=n*f+r*m+o*g;n=n*c+r*d+o*y,r=e,o=t}if(t){const e=.2989*n+.587*r+.114*o;n=e+(n-e)*u,r=e+(r-e)*u,o=e+(o-e)*u}i[l]=n,i[l+1]=r,i[l+2]=o}}e.putImageData(o,0,0),t()},0)}),this.viewer=e.viewer||e,this.options={adjustments:{brightness:1,contrast:1,saturation:1,gamma:1,hue:0,invert:!1,sepia:!1,greyscale:!1},debounceMs:60,loadMode:"async",onAdjustmentsChange:()=>{},...t},this._adjustments={...this.options.adjustments},this.viewer.addHandler("open",()=>this.apply()),this.viewer.isOpen()&&this.apply()}updateLut(){const e=this._adjustments,t=1/(e.gamma||1),{brightness:n=1,contrast:r=1,invert:o,gamma:i}=e;for(let a=0;a<256;a++){let e=a;o&&(e=255-e),1!==n&&(e*=n),1!==r&&(e=(e-128)*r+128),1!==i&&(e=255*Math.pow(e/255,t)),this.lut[a]=e}this.needUpdate=!1}apply(){this.viewer.setFilterOptions&&(this.needUpdate=!0,this.viewer.setFilterOptions({filters:{processors:this.combinedProcessor},loadMode:this.options.loadMode}),this.viewer.world.draw())}setAdjustments(e){this._adjustments={...this._adjustments,...e},this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.apply(),this.options.onAdjustmentsChange&&this.options.onAdjustmentsChange(this._adjustments),this.debounceTimer=null},this.options.debounceMs)}get adjustments(){return this._adjustments}reset(){this._adjustments={...this.options.adjustments},this.apply(),this.options.onAdjustmentsChange&&this.options.onAdjustmentsChange(this._adjustments)}destroy(){var e;this.debounceTimer&&clearTimeout(this.debounceTimer),(null==(e=this.viewer)?void 0:e.setFilterOptions)&&this.viewer.setFilterOptions({filters:{processors:[]}}),this.viewer=null}}var h=Object.defineProperty,m=(e,t)=>h(e,"name",{value:t,configurable:!0}),y={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},b=/([astvzqmhlc])([^astvzqmhlc]*)/gi,g=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,v=m(e=>{const t=(e&&e.length>0?e:"M0,0").match(b);if(!t)throw new Error(`No path elements found in string ${e}`);return t.reduce((e,t)=>{let n=t.charAt(0),r=n.toLowerCase(),o=w(t.substring(1));if("m"===r&&o.length>2&&(e.push([n,...o.splice(0,2)]),r="l",n="m"===n?"l":"L"),"a"===r.toLowerCase()&&(5===o.length||6===o.length)){const e=t.substring(1).trim().split(" ");o=[Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3].charAt(0)),Number(e[3].charAt(1)),Number(e[3].substring(2)),Number(e[4])]}for(;o.length>=0;){if(o.length===y[r]){e.push([n,...o.splice(0,y[r])]);break}if(o.length<y[r])throw new Error(`Malformed path data: "${n}" must have ${y[r]} elements and has ${o.length}: ${t}`);e.push([n,...o.splice(0,y[r])])}return e},[])},"default"),w=m(e=>{const t=e.match(g);return t?t.map(Number):[]},"parseValues"),A=(n=class{constructor(e,t,n,r){__publicField(this,"x0"),__publicField(this,"x1"),__publicField(this,"y0"),__publicField(this,"y1"),__publicField(this,"getTotalLength",m(()=>Math.hypot(this.x1-this.x0,this.y1-this.y0),"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>{let t=e/Math.hypot(this.x1-this.x0,this.y1-this.y0);t=Number.isNaN(t)?1:t;const n=(this.x1-this.x0)*t,r=(this.y1-this.y0)*t;return{x:this.x0+n,y:this.y0+r}},"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>{const t=Math.hypot(this.x1-this.x0,this.y1-this.y0);return{x:(this.x1-this.x0)/t,y:(this.y1-this.y0)/t}},"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>{const t=this.getPointAtLength(e),n=this.getTangentAtLength(e);return{x:t.x,y:t.y,tangentX:n.x,tangentY:n.y}},"getPropertiesAtLength")),this.x0=e,this.x1=t,this.y0=n,this.y1=r}},m(n,"LinearPosition"),n),S=(r=class{constructor(e,t,n,r,o,i,a,s,l){__publicField(this,"x0"),__publicField(this,"y0"),__publicField(this,"rx"),__publicField(this,"ry"),__publicField(this,"xAxisRotate"),__publicField(this,"LargeArcFlag"),__publicField(this,"SweepFlag"),__publicField(this,"x1"),__publicField(this,"y1"),__publicField(this,"length"),__publicField(this,"getTotalLength",m(()=>this.length,"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=O({x:this.x0,y:this.y0},this.rx,this.ry,this.xAxisRotate,this.LargeArcFlag,this.SweepFlag,{x:this.x1,y:this.y1},e/this.length);return{x:t.x,y:t.y}},"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=.05,n=this.getPointAtLength(e);let r;r=e<this.length-t?this.getPointAtLength(e+t):this.getPointAtLength(e-t);const o=r.x-n.x,i=r.y-n.y,a=Math.hypot(o,i);return e<this.length-t?{x:-o/a,y:-i/a}:{x:o/a,y:i/a}},"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>{const t=this.getTangentAtLength(e),n=this.getPointAtLength(e);return{x:n.x,y:n.y,tangentX:t.x,tangentY:t.y}},"getPropertiesAtLength")),this.x0=e,this.y0=t,this.rx=n,this.ry=r,this.xAxisRotate=o,this.LargeArcFlag=i,this.SweepFlag=a,this.x1=s,this.y1=l;const u=E(300,function(u){return O({x:e,y:t},n,r,o,i,a,{x:s,y:l},u)});this.length=u.arcLength}},m(r,"Arc"),r),O=m((e,t,n,r,o,i,a,s)=>{t=Math.abs(t),n=Math.abs(n),r=x(r,360);const l=C(r);if(e.x===a.x&&e.y===a.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(0===t||0===n)return{x:0,y:0,ellipticalArcAngle:0};const u=(e.x-a.x)/2,c=(e.y-a.y)/2,p={x:Math.cos(l)*u+Math.sin(l)*c,y:-Math.sin(l)*u+Math.cos(l)*c},f=Math.pow(p.x,2)/Math.pow(t,2)+Math.pow(p.y,2)/Math.pow(n,2);f>1&&(t=Math.sqrt(f)*t,n=Math.sqrt(f)*n);let d=(Math.pow(t,2)*Math.pow(n,2)-Math.pow(t,2)*Math.pow(p.y,2)-Math.pow(n,2)*Math.pow(p.x,2))/(Math.pow(t,2)*Math.pow(p.y,2)+Math.pow(n,2)*Math.pow(p.x,2));d=d<0?0:d;const h=(o!==i?1:-1)*Math.sqrt(d),m=h*(t*p.y/n),y=h*(-n*p.x/t),b={x:Math.cos(l)*m-Math.sin(l)*y+(e.x+a.x)/2,y:Math.sin(l)*m+Math.cos(l)*y+(e.y+a.y)/2},g={x:(p.x-m)/t,y:(p.y-y)/n},v=P({x:1,y:0},g);let w=P(g,{x:(-p.x-m)/t,y:(-p.y-y)/n});!i&&w>0?w-=2*Math.PI:i&&w<0&&(w+=2*Math.PI),w%=2*Math.PI;const A=v+w*s,S=t*Math.cos(A),O=n*Math.sin(A);return{x:Math.cos(l)*S-Math.sin(l)*O+b.x,y:Math.sin(l)*S+Math.cos(l)*O+b.y,ellipticalArcStartAngle:v,ellipticalArcEndAngle:v+w,ellipticalArcAngle:A,ellipticalArcCenter:b,resultantRx:t,resultantRy:n}},"pointOnEllipticalArc"),E=m((e,t)=>{e=e??500;let n=0;const r=[],o=[];let i,a=t(0);for(let s=0;s<e;s++){const l=j(s*(1/e),0,1);i=t(l),n+=M(a,i),o.push([a,i]),r.push({t:l,arcLength:n}),a=i}return i=t(1),o.push([a,i]),n+=M(a,i),r.push({t:1,arcLength:n}),{arcLength:n,arcLengthMap:r,approximationLines:o}},"approximateArcLengthOfCurve"),x=m((e,t)=>(e%t+t)%t,"mod"),C=m(e=>e*(Math.PI/180),"toRadians"),M=m((e,t)=>Math.hypot(t.x-e.x,t.y-e.y),"distance"),j=m((e,t,n)=>Math.min(Math.max(e,t),n),"clamp"),P=m((e,t)=>{const n=e.x*t.x+e.y*t.y,r=Math.hypot(e.x,e.y)*Math.hypot(t.x,t.y);return(e.x*t.y-e.y*t.x<0?-1:1)*Math.acos(n/r)},"angleBetween"),I=[[],[],[-.5773502691896257,.5773502691896258],[0,-.7745966692414833,.7745966692414833],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],k=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],T=[[1],[1,1],[1,2,1],[1,3,3,1]],D=m((e,t,n)=>({x:(1-n)*(1-n)*(1-n)*e[0]+3*(1-n)*(1-n)*n*e[1]+3*(1-n)*n*n*e[2]+n*n*n*e[3],y:(1-n)*(1-n)*(1-n)*t[0]+3*(1-n)*(1-n)*n*t[1]+3*(1-n)*n*n*t[2]+n*n*n*t[3]}),"cubicPoint"),R=m((e,t,n)=>L([3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],[3*(t[1]-t[0]),3*(t[2]-t[1]),3*(t[3]-t[2])],n),"cubicDerivative"),N=m((e,t,n)=>{let r,o;const i=n/2;r=0;for(let a=0;a<20;a++)o=i*I[20][a]+i,r+=k[20][a]*G(e,t,o);return i*r},"getCubicArcLength"),L=m((e,t,n)=>({x:(1-n)*(1-n)*e[0]+2*(1-n)*n*e[1]+n*n*e[2],y:(1-n)*(1-n)*t[0]+2*(1-n)*n*t[1]+n*n*t[2]}),"quadraticPoint"),B=m((e,t,n)=>{const r=e[0]-2*e[1]+e[2],o=t[0]-2*t[1]+t[2],i=2*e[1]-2*e[0],a=2*t[1]-2*t[0],s=4*(r*r+o*o),l=4*(r*i+o*a),u=i*i+a*a;if(0===s)return n*Math.hypot(e[2]-e[0],t[2]-t[0]);const c=l/(2*s),p=n+c,f=u/s-c*c,d=p*p+f>0?Math.sqrt(p*p+f):0,h=c*c+f>0?Math.sqrt(c*c+f):0,m=c+Math.sqrt(c*c+f)!==0&&(p+d)/(c+h)!==0?f*Math.log(Math.abs((p+d)/(c+h))):0;return Math.sqrt(s)/2*(p*d-c*h+m)},"getQuadraticArcLength"),_=m((e,t,n)=>({x:2*(1-n)*(e[1]-e[0])+2*n*(e[2]-e[1]),y:2*(1-n)*(t[1]-t[0])+2*n*(t[2]-t[1])}),"quadraticDerivative");function G(e,t,n){const r=H(1,n,e),o=H(1,n,t),i=r*r+o*o;return Math.sqrt(i)}m(G,"BFunc");var H=m((e,t,n)=>{const r=n.length-1;let o,i;if(0===r)return 0;if(0===e){i=0;for(let e=0;e<=r;e++)i+=T[r][e]*Math.pow(1-t,r-e)*Math.pow(t,e)*n[e];return i}o=new Array(r);for(let a=0;a<r;a++)o[a]=r*(n[a+1]-n[a]);return H(e-1,t,o)},"getDerivative"),F=m((e,t,n)=>{let r=1,o=e/t,i=(e-n(o))/t,a=0;for(;r>.001;){const s=n(o+i),l=Math.abs(e-s)/t;if(l<r)r=l,o+=i;else{const a=n(o-i),s=Math.abs(e-a)/t;s<r?(r=s,o-=i):i/=2}if(a++,a>500)break}return o},"t2length"),U=(o=class{constructor(e,t,n,r,o,i,a,s){__publicField(this,"a"),__publicField(this,"b"),__publicField(this,"c"),__publicField(this,"d"),__publicField(this,"length"),__publicField(this,"getArcLength"),__publicField(this,"getPoint"),__publicField(this,"getDerivative"),__publicField(this,"normalizeTangent",m(e=>{const t=Math.hypot(e.x,e.y);return t>0?{x:e.x/t,y:e.y/t}:{x:0,y:0}},"normalizeTangent")),__publicField(this,"getTotalLength",m(()=>this.length,"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],n=[this.a.y,this.b.y,this.c.y,this.d.y],r=F(e,this.length,e=>this.getArcLength(t,n,e));return this.getPoint(t,n,r)},"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],n=[this.a.y,this.b.y,this.c.y,this.d.y],r=F(e,this.length,e=>this.getArcLength(t,n,e)),o=this.getDerivative(t,n,r);return this.normalizeTangent(o)},"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],n=[this.a.y,this.b.y,this.c.y,this.d.y],r=F(e,this.length,e=>this.getArcLength(t,n,e)),o=this.getDerivative(t,n,r),i=this.normalizeTangent(o),a=this.getPoint(t,n,r);return{x:a.x,y:a.y,tangentX:i.x,tangentY:i.y}},"getPropertiesAtLength")),__publicField(this,"getC",m(()=>this.c,"getC")),__publicField(this,"getD",m(()=>this.d,"getD")),this.a={x:e,y:t},this.b={x:n,y:r},this.c={x:o,y:i},void 0!==a&&void 0!==s?(this.getArcLength=N,this.getPoint=D,this.getDerivative=R,this.d={x:a,y:s}):(this.getArcLength=B,this.getPoint=L,this.getDerivative=_,this.d={x:0,y:0}),this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],1)}},m(o,"Bezier"),o),z=(i=class{constructor(e){__publicField(this,"length",0),__publicField(this,"partial_lengths",[]),__publicField(this,"functions",[]),__publicField(this,"initial_point",null),__publicField(this,"getPartAtLength",m(e=>{e<0?e=0:e>this.length&&(e=this.length);let t=this.partial_lengths.length-1;for(;this.partial_lengths[t]>=e&&t>0;)t--;return t++,{fraction:e-this.partial_lengths[t-1],i:t}},"getPartAtLength")),__publicField(this,"getTotalLength",m(()=>this.length,"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>{const t=this.getPartAtLength(e),n=this.functions[t.i];if(n)return n.getPointAtLength(t.fraction);if(this.initial_point)return this.initial_point;throw new Error("Wrong function at this part.")},"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>{const t=this.getPartAtLength(e),n=this.functions[t.i];if(n)return n.getTangentAtLength(t.fraction);if(this.initial_point)return{x:0,y:0};throw new Error("Wrong function at this part.")},"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>{const t=this.getPartAtLength(e),n=this.functions[t.i];if(n)return n.getPropertiesAtLength(t.fraction);if(this.initial_point)return{x:this.initial_point.x,y:this.initial_point.y,tangentX:0,tangentY:0};throw new Error("Wrong function at this part.")},"getPropertiesAtLength")),__publicField(this,"getParts",m(()=>{const e=[];for(let t=0;t<this.functions.length;t++)if(null!==this.functions[t]){this.functions[t]=this.functions[t];const n={start:this.functions[t].getPointAtLength(0),end:this.functions[t].getPointAtLength(this.partial_lengths[t]-this.partial_lengths[t-1]),length:this.partial_lengths[t]-this.partial_lengths[t-1],getPointAtLength:this.functions[t].getPointAtLength,getTangentAtLength:this.functions[t].getTangentAtLength,getPropertiesAtLength:this.functions[t].getPropertiesAtLength};e.push(n)}return e},"getParts"));const t=Array.isArray(e)?e:v(e);let n,r=[0,0],o=[0,0],i=[0,0];for(let a=0;a<t.length;a++){if("M"===t[a][0])r=[t[a][1],t[a][2]],i=[r[0],r[1]],this.functions.push(null),0===a&&(this.initial_point={x:t[a][1],y:t[a][2]});else if("m"===t[a][0])r=[t[a][1]+r[0],t[a][2]+r[1]],i=[r[0],r[1]],this.functions.push(null);else if("L"===t[a][0])this.length+=Math.hypot(r[0]-t[a][1],r[1]-t[a][2]),this.functions.push(new A(r[0],t[a][1],r[1],t[a][2])),r=[t[a][1],t[a][2]];else if("l"===t[a][0])this.length+=Math.hypot(t[a][1],t[a][2]),this.functions.push(new A(r[0],t[a][1]+r[0],r[1],t[a][2]+r[1])),r=[t[a][1]+r[0],t[a][2]+r[1]];else if("H"===t[a][0])this.length+=Math.abs(r[0]-t[a][1]),this.functions.push(new A(r[0],t[a][1],r[1],r[1])),r[0]=t[a][1];else if("h"===t[a][0])this.length+=Math.abs(t[a][1]),this.functions.push(new A(r[0],r[0]+t[a][1],r[1],r[1])),r[0]=t[a][1]+r[0];else if("V"===t[a][0])this.length+=Math.abs(r[1]-t[a][1]),this.functions.push(new A(r[0],r[0],r[1],t[a][1])),r[1]=t[a][1];else if("v"===t[a][0])this.length+=Math.abs(t[a][1]),this.functions.push(new A(r[0],r[0],r[1],r[1]+t[a][1])),r[1]=t[a][1]+r[1];else if("z"===t[a][0]||"Z"===t[a][0])this.length+=Math.hypot(i[0]-r[0],i[1]-r[1]),this.functions.push(new A(r[0],i[0],r[1],i[1])),r=[i[0],i[1]];else if("C"===t[a][0])n=new U(r[0],r[1],t[a][1],t[a][2],t[a][3],t[a][4],t[a][5],t[a][6]),this.length+=n.getTotalLength(),r=[t[a][5],t[a][6]],this.functions.push(n);else if("c"===t[a][0])n=new U(r[0],r[1],r[0]+t[a][1],r[1]+t[a][2],r[0]+t[a][3],r[1]+t[a][4],r[0]+t[a][5],r[1]+t[a][6]),n.getTotalLength()>0?(this.length+=n.getTotalLength(),this.functions.push(n),r=[t[a][5]+r[0],t[a][6]+r[1]]):this.functions.push(new A(r[0],r[0],r[1],r[1]));else if("S"===t[a][0]){if(a>0&&["C","c","S","s"].indexOf(t[a-1][0])>-1){if(n){const e=n.getC();n=new U(r[0],r[1],2*r[0]-e.x,2*r[1]-e.y,t[a][1],t[a][2],t[a][3],t[a][4])}}else n=new U(r[0],r[1],r[0],r[1],t[a][1],t[a][2],t[a][3],t[a][4]);n&&(this.length+=n.getTotalLength(),r=[t[a][3],t[a][4]],this.functions.push(n))}else if("s"===t[a][0]){if(a>0&&["C","c","S","s"].indexOf(t[a-1][0])>-1){if(n){const e=n.getC(),o=n.getD();n=new U(r[0],r[1],r[0]+o.x-e.x,r[1]+o.y-e.y,r[0]+t[a][1],r[1]+t[a][2],r[0]+t[a][3],r[1]+t[a][4])}}else n=new U(r[0],r[1],r[0],r[1],r[0]+t[a][1],r[1]+t[a][2],r[0]+t[a][3],r[1]+t[a][4]);n&&(this.length+=n.getTotalLength(),r=[t[a][3]+r[0],t[a][4]+r[1]],this.functions.push(n))}else if("Q"===t[a][0]){if(r[0]===t[a][1]&&r[1]===t[a][2]){const e=new A(t[a][1],t[a][3],t[a][2],t[a][4]);this.length+=e.getTotalLength(),this.functions.push(e)}else n=new U(r[0],r[1],t[a][1],t[a][2],t[a][3],t[a][4],void 0,void 0),this.length+=n.getTotalLength(),this.functions.push(n);r=[t[a][3],t[a][4]],o=[t[a][1],t[a][2]]}else if("q"===t[a][0]){if(0!==t[a][1]||0!==t[a][2])n=new U(r[0],r[1],r[0]+t[a][1],r[1]+t[a][2],r[0]+t[a][3],r[1]+t[a][4],void 0,void 0),this.length+=n.getTotalLength(),this.functions.push(n);else{const e=new A(r[0]+t[a][1],r[0]+t[a][3],r[1]+t[a][2],r[1]+t[a][4]);this.length+=e.getTotalLength(),this.functions.push(e)}o=[r[0]+t[a][1],r[1]+t[a][2]],r=[t[a][3]+r[0],t[a][4]+r[1]]}else if("T"===t[a][0]){if(a>0&&["Q","q","T","t"].indexOf(t[a-1][0])>-1)n=new U(r[0],r[1],2*r[0]-o[0],2*r[1]-o[1],t[a][1],t[a][2],void 0,void 0),this.functions.push(n),this.length+=n.getTotalLength();else{const e=new A(r[0],t[a][1],r[1],t[a][2]);this.functions.push(e),this.length+=e.getTotalLength()}o=[2*r[0]-o[0],2*r[1]-o[1]],r=[t[a][1],t[a][2]]}else if("t"===t[a][0]){if(a>0&&["Q","q","T","t"].indexOf(t[a-1][0])>-1)n=new U(r[0],r[1],2*r[0]-o[0],2*r[1]-o[1],r[0]+t[a][1],r[1]+t[a][2],void 0,void 0),this.length+=n.getTotalLength(),this.functions.push(n);else{const e=new A(r[0],r[0]+t[a][1],r[1],r[1]+t[a][2]);this.length+=e.getTotalLength(),this.functions.push(e)}o=[2*r[0]-o[0],2*r[1]-o[1]],r=[t[a][1]+r[0],t[a][2]+r[1]]}else if("A"===t[a][0]){const e=new S(r[0],r[1],t[a][1],t[a][2],t[a][3],1===t[a][4],1===t[a][5],t[a][6],t[a][7]);this.length+=e.getTotalLength(),r=[t[a][6],t[a][7]],this.functions.push(e)}else if("a"===t[a][0]){const e=new S(r[0],r[1],t[a][1],t[a][2],t[a][3],1===t[a][4],1===t[a][5],r[0]+t[a][6],r[1]+t[a][7]);this.length+=e.getTotalLength(),r=[r[0]+t[a][6],r[1]+t[a][7]],this.functions.push(e)}this.partial_lengths.push(this.length)}}},m(i,"SVGPathProperties"),i),Y=(a=class{constructor(e){if(__publicField(this,"inst"),__publicField(this,"getTotalLength",m(()=>this.inst.getTotalLength(),"getTotalLength")),__publicField(this,"getPointAtLength",m(e=>this.inst.getPointAtLength(e),"getPointAtLength")),__publicField(this,"getTangentAtLength",m(e=>this.inst.getTangentAtLength(e),"getTangentAtLength")),__publicField(this,"getPropertiesAtLength",m(e=>this.inst.getPropertiesAtLength(e),"getPropertiesAtLength")),__publicField(this,"getParts",m(()=>this.inst.getParts(),"getParts")),this.inst=new z(e),!(this instanceof Y))return new Y(e)}},m(a,"_svgPathProperties"),a);const V={"zh-CN":{toolbar:{annoColor:"标注颜色",annoShape:"标注形状",rect:"矩形",polygon:"多边形",circle:"圆形",ellipse:"椭圆",line:"线段",freehand:"手绘",reset:"重置",annoSettings:"标注",colorAdjust:"颜色调整",screenshot:"截图",brightness:"亮度",contrast:"对比度",saturation:"饱和度",gamma:"伽马",hue:"色相",invert:"反色",sepia:"怀旧",greyscale:"灰度"},selection:{toggle:"切换选择",confirm:"确认选择",cancel:"取消选择"},annotation:{length:"长度",width:"宽度",height:"高度",area:"面积",perimeter:"周长",remark:"备注",radius:"半径",majorAxis:"长轴",minorAxis:"短轴"}},"en-US":{toolbar:{annoColor:"Annotation Color",annoShape:"Annotation Shape",rect:"Rectangle",polygon:"Polygon",circle:"Circle",ellipse:"Ellipse",line:"Line",freehand:"Freehand",reset:"Reset",annoSettings:"Annotation",colorAdjust:"Color Adjust",screenshot:"Screenshot",brightness:"Brightness",contrast:"Contrast",saturation:"Saturation",gamma:"Gamma",hue:"Hue",invert:"Invert",sepia:"Sepia",greyscale:"Greyscale"},selection:{toggle:"Toggle Selection",confirm:"Confirm Selection",cancel:"Cancel Selection"},annotation:{length:"Length",width:"Width",height:"Height",area:"Area",perimeter:"Perimeter",remark:"Remark",radius:"Radius",majorAxis:"Major Axis",minorAxis:"Minor Axis"}}};let Q="zh-CN";function J(e){Q=e}function W(e){const t=e.split(".");let n=V[Q];for(const r of t)if(n=null==n?void 0:n[r],!n)return e;return"string"==typeof n?n:e}function Z(e,t){return e.toFixed(2)+"μ"+t}function X(e,t){return 1e6*(e/t)}var K=(e=>(e.TOP_LEFT="TOP_LEFT",e.TOP_CENTER="TOP_CENTER",e.TOP_RIGHT="TOP_RIGHT",e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_CENTER="BOTTOM_CENTER",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.MIDDLE_LEFT="MIDDLE_LEFT",e.MIDDLE_RIGHT="MIDDLE_RIGHT",e))(K||{}),q=(e=>(e.LD="LD",e.OSD="OSD",e))(q||{});class ${constructor(e,t={}){__publicField(this,"viewer"),__publicField(this,"options"),__publicField(this,"magnificationElement",null),__publicField(this,"magnificationDisplay",null),__publicField(this,"updateMagnificationDisplay",()=>{var e,t;if("LD"===this.options.type){const t=this.viewer.world.getItemAt(0);if(!this.magnificationDisplay||!t)return;const n=this.viewer.source,r=n.width;n.height;const o=20*.0011*(this.options.pixelsPerMeter||(null==(e=this.viewer.scalebarInstance)?void 0:e.pixelsPerMeter)||96)/r*this.viewer.viewport.getZoom();this.magnificationDisplay.innerHTML=`<span>${o.toFixed(2)}X</span>`}else{const e=this.viewer.world.getItemAt(0);if(!this.magnificationDisplay||!e)return;const n=this.viewer.viewport.viewportToImageZoom(this.viewer.viewport.getZoom())*((null==(t=this.viewer.source)?void 0:t.max_magnification)||40);this.magnificationDisplay.innerHTML=`<span>${n.toFixed(2)}X</span>`}}),this.viewer=e,this.options=t,this.init()}init(){this.injectStyles(),this.magnificationElement=document.createElement("div"),this.magnificationElement.className=`med-magnification med-magnification--${this.options.position||"MIDDLE_LEFT"}`,this.magnificationDisplay=document.createElement("div"),this.magnificationDisplay.className="med-magnification-display",this.magnificationDisplay.innerHTML="<span>-</span>",this.magnificationElement.appendChild(this.magnificationDisplay);const e=document.createElement("div");e.className="med-magnification-buttons",this.magnificationElement.appendChild(e);[40,20,10,4].forEach(t=>{const n=this.createButton(`${t}X`,()=>this.setMagnification(t));e.appendChild(n)});const t=this.createButton("Fit",()=>this.fitToScreen());e.appendChild(t),this.viewer.element.appendChild(this.magnificationElement),this.viewer.addHandler("animation",this.updateMagnificationDisplay),this.viewer.addHandler("animation-finish",this.updateMagnificationDisplay),this.viewer.addHandler("open",this.updateMagnificationDisplay),this.updateMagnificationDisplay()}createButton(e,t){const n=document.createElement("button");return n.className="med-magnification-btn",n.textContent=e,n.onclick=t,n}getMagnification(){var e,t;if(!this.viewer.world.getItemAt(0))return 0;if("LD"===this.options.type){const t=this.viewer.source,n=null==t?void 0:t.width;return 20*.0011*(this.options.pixelsPerMeter||(null==(e=this.viewer.scalebarInstance)?void 0:e.pixelsPerMeter)||96)/n*this.viewer.viewport.getZoom()}return this.viewer.viewport.viewportToImageZoom(this.viewer.viewport.getZoom())*((null==(t=this.viewer.source)?void 0:t.max_magnification)||40)}async setMagnification(e,t=null){var n,r;let o=this.viewer.viewport.getCenter();if(t&&(o=this.viewer.viewport.imageToViewportCoordinates(t.x,t.y)),"LD"===this.options.type){const t=this.viewer.world.getItemAt(0);if(!this.magnificationDisplay||!t)return;const r=this.viewer.source,i=r.width;r.height;const a=this.options.pixelsPerMeter||(null==(n=this.viewer.scalebarInstance)?void 0:n.pixelsPerMeter)||96;this.viewer.viewport.getZoom();const s=e/(20*.0011*a/i);await this.viewer.viewport.zoomTo(s,o,!1),this.updateMagnificationDisplay()}else{if(!this.viewer.world.getItemAt(0))return;const t=e/((null==(r=this.viewer.source)?void 0:r.max_magnification)||40),n=this.viewer.viewport.imageToViewportZoom(t);await this.viewer.viewport.zoomTo(n,o,!1),this.updateMagnificationDisplay()}}fitToScreen(){this.viewer.viewport.fitVertically(!0),this.viewer.viewport.fitHorizontally(!0),this.viewer.viewport.goHome()}show(){this.magnificationElement&&(this.magnificationElement.style.display="flex")}hide(){this.magnificationElement&&(this.magnificationElement.style.display="none")}toggle(){this.magnificationElement&&(this.magnificationElement.style.display="none"===this.magnificationElement.style.display?"flex":"none")}isVisible(){return!!this.magnificationElement&&"none"!==this.magnificationElement.style.display}refresh(){this.updateMagnificationDisplay()}destroy(){this.magnificationElement&&(this.magnificationElement.remove(),this.magnificationElement=null),this.magnificationDisplay&&(this.magnificationDisplay=null),this.viewer.removeHandler("animation",this.updateMagnificationDisplay),this.viewer.removeHandler("animation-finish",this.updateMagnificationDisplay),this.viewer.removeHandler("open",this.updateMagnificationDisplay),this.viewer=null}injectStyles(){const e="med-magnification-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent=`\n .med-magnification {\n position: absolute;\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 10px;\n z-index: 100;\n background: rgba(24, 28, 36, 0.85);\n border-radius: 12px;\n backdrop-filter: blur(10px);\n border: 1px solid rgba(255,255,255,0.1);\n box-shadow: 0 8px 32px rgba(0,0,0,0.3);\n }\n .med-magnification--TOP_LEFT { top: calc(18px + ${this.options.offsetY||0}px); left: calc(18px + ${this.options.offsetX||0}px); }\n .med-magnification--TOP_CENTER { top: calc(18px + ${this.options.offsetY||0}px); left: 50%; transform: translateX(-50%) translateX(${this.options.offsetX||0}px); }\n .med-magnification--TOP_RIGHT { top: calc(18px + ${this.options.offsetY||0}px); right: calc(18px - ${this.options.offsetX||0}px); }\n .med-magnification--BOTTOM_LEFT { bottom: calc(18px - ${this.options.offsetY||0}px); left: calc(18px + ${this.options.offsetX||0}px); }\n .med-magnification--BOTTOM_CENTER { bottom: calc(18px - ${this.options.offsetY||0}px); left: 50%; transform: translateX(-50%) translateX(${this.options.offsetX||0}px); }\n .med-magnification--BOTTOM_RIGHT { bottom: calc(18px - ${this.options.offsetY||0}px); right: calc(18px - ${this.options.offsetX||0}px); }\n .med-magnification--MIDDLE_LEFT { top: 50%; left: calc(18px + ${this.options.offsetX||0}px); transform: translateY(-50%) translateY(${this.options.offsetY||0}px); }\n .med-magnification--MIDDLE_RIGHT { top: 50%; right: calc(18px - ${this.options.offsetX||0}px); transform: translateY(-50%) translateY(${this.options.offsetY||0}px); }\n\n .med-magnification-display {\n background: rgba(255,255,255,0.08);\n color: #f2f5f8;\n font-size: 14px;\n border: 1px dashed rgba(255,255,255,0.3);\n padding: 8px 0px;\n border-radius: 8px;\n text-align: center;\n font-weight: bold;\n min-width: 60px;\n }\n .med-magnification-buttons {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n .med-magnification-btn {\n background: rgba(49, 208, 170, 0.15);\n color: #f2f5f8;\n border: none;\n padding: 8px 16px;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n font-weight: bold;\n }\n .med-magnification-btn:hover {\n background: rgba(49, 208, 170, 0.3);\n }\n .med-magnification-btn:active {\n transform: scale(0.95);\n }\n `,document.head.appendChild(t)}}!function(e){if(!e.version||e.version.major<2)throw new Error("This version of OpenSeadragonScalebar requires OpenSeadragon version 2.0.0+");function t(e,t,n,o,a){a=void 0===a?" ":a;var s=r(e,t),l=i(s/e*t,3);return{size:s*t,text:l+a+n+(o&&l>1?"s":"")}}function n(e,t,n){var o=r(e,t),a=o*t,s=function(e,t){if(e<1e-6)return 1e9*e+" n"+t;if(e<.001)return 1e6*e+" μ"+t;if(e<1)return 1e3*e+" m"+t;if(e>=1e3)return e/1e3+" k"+t;return e+" "+t}(i(o/e*t,3),n);return{size:a,text:s}}function r(e,t){var n=o(e),r=o(t),i=o(n/r);return i>=5&&(i/=5),i>=4&&(i/=4),i>=2&&(i/=2),i}function o(e){return e*Math.pow(10,Math.ceil(-a(e)))}function i(e,t){var n=t- -Math.ceil(-a(e)),r=e*Math.pow(10,n);return n<0?Math.round(r)*Math.pow(10,-n):Math.round(r)/Math.pow(10,n)}function a(e){return Math.log(e)/Math.log(10)}function s(e){return void 0!==e}e.Viewer.prototype.scalebar=function(t){this.scalebarInstance?this.scalebarInstance.refresh(t):((t=t||{}).viewer=this,this.scalebarInstance=new e.Scalebar(t))},e.ScalebarType={NONE:0,MICROSCOPY:1,MAP:2},e.ScalebarLocation={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4},e.Scalebar=function(t){if(!(t=t||{}).viewer)throw new Error("A viewer must be specified.");this.viewer=t.viewer,this.divElt=document.createElement("div"),this.viewer.container.appendChild(this.divElt),this.divElt.style.position="relative",this.divElt.style.margin="0",this.divElt.style.pointerEvents="none",this.setMinWidth(t.minWidth||"150px"),this.setDrawScalebarFunction(t.type||e.ScalebarType.MICROSCOPY),this.color=t.color||"black",this.fontColor=t.fontColor||"black",this.backgroundColor=t.backgroundColor||"none",this.fontSize=t.fontSize||"",this.fontFamily=t.fontFamily||"",this.barThickness=t.barThickness||2,this.pixelsPerMeter=t.pixelsPerMeter||null,this.referenceItemIdx=t.referenceItemIdx||0,this.location=t.location||e.ScalebarLocation.BOTTOM_LEFT,this.xOffset=t.xOffset||5,this.yOffset=t.yOffset||5,this.stayInsideImage=!s(t.stayInsideImage)||t.stayInsideImage,this.sizeAndTextRenderer=t.sizeAndTextRenderer||e.ScalebarSizeAndTextRenderer.METRIC_LENGTH;var n=this;this.viewer.addHandler("open",function(){n.refresh()}),this.viewer.addHandler("animation",function(){n.refresh()}),this.viewer.addHandler("resize",function(){n.refresh()})},e.Scalebar.prototype={updateOptions:function(e){e&&(s(e.type)&&this.setDrawScalebarFunction(e.type),s(e.minWidth)&&this.setMinWidth(e.minWidth),s(e.color)&&(this.color=e.color),s(e.fontColor)&&(this.fontColor=e.fontColor),s(e.backgroundColor)&&(this.backgroundColor=e.backgroundColor),s(e.fontSize)&&(this.fontSize=e.fontSize),s(e.fontFamily)&&(this.fontFamily=e.fontFamily),s(e.barThickness)&&(this.barThickness=e.barThickness),s(e.pixelsPerMeter)&&(this.pixelsPerMeter=e.pixelsPerMeter),s(e.referenceItemIdx)&&(this.referenceItemIdx=e.referenceItemIdx),s(e.location)&&(this.location=e.location),s(e.xOffset)&&(this.xOffset=e.xOffset),s(e.yOffset)&&(this.yOffset=e.yOffset),s(e.stayInsideImage)&&(this.stayInsideImage=e.stayInsideImage),s(e.sizeAndTextRenderer)&&(this.sizeAndTextRenderer=e.sizeAndTextRenderer))},setDrawScalebarFunction:function(t){t?t===e.ScalebarType.MAP?this.drawScalebar=this.drawMapScalebar:this.drawScalebar=this.drawMicroscopyScalebar:this.drawScalebar=null},setMinWidth:function(e){this.divElt.style.width=e,this.divElt.style.display="",this.minWidth=this.divElt.offsetWidth},refresh:function(e){if(this.updateOptions(e),this.viewer.isOpen()&&this.drawScalebar&&this.pixelsPerMeter&&this.location){this.divElt.style.display="";var t=this.viewer.viewport,n=function(e,t){var n=e._scaleSpring.current.value*e.viewport._containerInnerSize.x/e.source.dimensions.x;return n*t}(this.viewer.world.getItemAt(this.referenceItemIdx),t.getZoom(!0)),r=n*this.pixelsPerMeter,o=this.sizeAndTextRenderer(r,this.minWidth);this.drawScalebar(o.size,o.text);var i=this.getScalebarLocation();this.divElt.style.left=i.x+"px",this.divElt.style.top=i.y+"px"}else this.divElt.style.display="none"},drawMicroscopyScalebar:function(e,t){this.divElt.style.fontSize=this.fontSize,this.divElt.style.fontFamily=this.fontFamily,this.divElt.style.textAlign="center",this.divElt.style.color=this.fontColor,this.divElt.style.border="none",this.divElt.style.borderBottom=this.barThickness+"px solid "+this.color,this.divElt.style.backgroundColor=this.backgroundColor,this.divElt.innerHTML=t,this.divElt.style.width=e+"px"},drawMapScalebar:function(e,t){this.divElt.style.fontSize=this.fontSize,this.divElt.style.fontFamily=this.fontFamily,this.divElt.style.textAlign="center",this.divElt.style.color=this.fontColor,this.divElt.style.border=this.barThickness+"px solid "+this.color,this.divElt.style.borderTop="none",this.divElt.style.backgroundColor=this.backgroundColor,this.divElt.innerHTML=t,this.divElt.style.width=e+"px"},getScalebarLocation:function(){if(this.location===e.ScalebarLocation.TOP_LEFT){var t=0,n=0;if(this.stayInsideImage){var r=this.viewer.viewport.pixelFromPoint(new e.Point(0,0),!0);this.viewer.wrapHorizontal||(t=Math.max(r.x,0)),this.viewer.wrapVertical||(n=Math.max(r.y,0))}return new e.Point(t+this.xOffset,n+this.yOffset)}if(this.location===e.ScalebarLocation.TOP_RIGHT){var o=this.divElt.offsetWidth;t=(a=this.viewer.container).offsetWidth-o,n=0;if(this.stayInsideImage){r=this.viewer.viewport.pixelFromPoint(new e.Point(1,0),!0);this.viewer.wrapHorizontal||(t=Math.min(t,r.x-o)),this.viewer.wrapVertical||(n=Math.max(n,r.y))}return new e.Point(t-this.xOffset,n+this.yOffset)}if(this.location===e.ScalebarLocation.BOTTOM_RIGHT){o=this.divElt.offsetWidth;var i=this.divElt.offsetHeight;t=(a=this.viewer.container).offsetWidth-o,n=a.offsetHeight-i;if(this.stayInsideImage){r=this.viewer.viewport.pixelFromPoint(new e.Point(1,1/this.viewer.source.aspectRatio),!0);this.viewer.wrapHorizontal||(t=Math.min(t,r.x-o)),this.viewer.wrapVertical||(n=Math.min(n,r.y-i))}return new e.Point(t-this.xOffset,n-this.yOffset)}if(this.location===e.ScalebarLocation.BOTTOM_LEFT){var a;i=this.divElt.offsetHeight,t=0,n=(a=this.viewer.container).offsetHeight-i;if(this.stayInsideImage){r=this.viewer.viewport.pixelFromPoint(new e.Point(0,1/this.viewer.source.aspectRatio),!0);this.viewer.wrapHorizontal||(t=Math.max(t,r.x)),this.viewer.wrapVertical||(n=Math.min(n,r.y-i))}return new e.Point(t+this.xOffset,n-this.yOffset)}},getAsCanvas:function(){var e=document.createElement("canvas");e.width=this.divElt.offsetWidth,e.height=this.divElt.offsetHeight;var t=e.getContext("2d");t.fillStyle=this.backgroundColor,t.fillRect(0,0,e.width,e.height),t.fillStyle=this.color,t.fillRect(0,e.height-this.barThickness,e.width,e.height),this.drawScalebar===this.drawMapScalebar&&(t.fillRect(0,0,this.barThickness,e.height),t.fillRect(e.width-this.barThickness,0,this.barThickness,e.height)),t.font=window.getComputedStyle(this.divElt).font,t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor;var n=e.width/2,r=e.height/2;return t.fillText(this.divElt.textContent,n,r),e},getImageWithScalebarAsCanvas:function(){var e=this.viewer.drawer.canvas,t=document.createElement("canvas");t.width=e.width,t.height=e.height;var n=t.getContext("2d");n.drawImage(e,0,0);var r=this.getAsCanvas(),o=this.getScalebarLocation();return n.drawImage(r,o.x,o.y),t}},e.ScalebarSizeAndTextRenderer={METRIC_LENGTH:function(e,t){return n(e,t,"m")},IMPERIAL_LENGTH:function(e,n){var r=2*n,o=.0254*e;if(r<12*o)return r<o?t(o/1e3,n,"th"):t(o,n,"in");var i=12*o;return r<2e3*i?t(i,n,"ft"):t(5280*i,n,"mi")},ASTRONOMY:function(e,n){var r=2*n;if(r<60*e)return t(e,n,'"',!1,"");var o=60*e;return r<60*o?t(o,n,"'",!1,""):t(60*o,n,"°",!1,"")},STANDARD_TIME:function(e,r){var o=2*r;if(o<60*e)return n(e,r,"s");var i=60*e;if(o<60*i)return t(i,r,"minute",!0);var a=60*i;if(o<24*a)return t(a,r,"hour",!0);var s=24*a;return o<365.25*s?t(s,r,"day",!0):t(365.25*s,r,"year",!0)},METRIC_GENERIC:n}}(t);var ee=(e=>(e[e.NONE=0]="NONE",e[e.MICROSCOPY=1]="MICROSCOPY",e[e.MAP=2]="MAP",e))(ee||{}),te=(e=>(e[e.NONE=0]="NONE",e[e.TOP_LEFT=1]="TOP_LEFT",e[e.TOP_RIGHT=2]="TOP_RIGHT",e[e.BOTTOM_RIGHT=3]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=4]="BOTTOM_LEFT",e))(te||{});class ne{constructor(e,t={}){__publicField(this,"viewer"),__publicField(this,"options"),__publicField(this,"scalebar"),this.viewer=e,"string"==typeof t.type&&(t.type=ee[t.type]),"string"==typeof t.location&&(t.location=te[t.location]),this.options={type:2,pixelsPerMeter:1,xOffset:10,yOffset:10,stayInsideImage:!0,color:"rgb(0, 0, 0)",fontColor:"rgb(0, 0, 0)",fontSize:"14px",fontFamily:"sans-serif",barThickness:1.5,minWidth:"75px",location:0,referenceItemIdx:0,...t},this.init()}init(){this.viewer.scalebar(this.options),this.scalebar=this.viewer.scalebarInstance}destroy(){this.scalebar&&"function"==typeof this.scalebar.destroy&&this.scalebar.destroy(),this.scalebar=null}}!function(e){e.SelectionOverlay=function(t,n){e.Overlay.apply(this,arguments),e.isPlainObject(t)?this.rotation=t.location.rotation||0:this.rotation=n.rotation||0},e.SelectionOverlay.prototype=e.extend(Object.create(e.Overlay.prototype),{drawHTML:function(){e.Overlay.prototype.drawHTML.apply(this,arguments),this.style.transform=this.style.transform.replace(/ ?rotate\(.+rad\)/,"")+" rotate("+this.rotation+"rad)"},update:function(t){e.Overlay.prototype.update.apply(this,arguments),this.rotation=t.rotation||0}})}(t),function(e){e.SelectionRect=function(t,n,r,o,i){e.Rect.apply(this,[t,n,r,o]),this.rotation=i||0},e.SelectionRect.fromRect=function(t){return new e.SelectionRect(t.x,t.y,t.width,t.height)},e.SelectionRect.prototype=e.extend(Object.create(e.Rect.prototype),{clone:function(){return new e.SelectionRect(this.x,this.y,this.width,this.height,this.rotation)},equals:function(t){return e.Rect.prototype.equals.apply(this,[t])&&this.rotation===t.rotation},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.rotation)/100+"]"},swapWidthHeight:function(){let e=this.clone();return e.width=this.height,e.height=this.width,e.x+=(this.width-this.height)/2,e.y+=(this.height-this.width)/2,e},getDegreeRotation:function(){return this.rotation*(180/Math.PI)},getAngleFromCenter:function(e){let t=e.minus(this.getCenter());return Math.atan2(t.x,t.y)},round:function(){return new e.SelectionRect(Math.round(this.x),Math.round(this.y),Math.round(this.width),Math.round(this.height),this.rotation)},normalize:function(){let e=this.clone();return e.width<0&&(e.x+=e.width,e.width*=-1),e.height<0&&(e.y+=e.height,e.height*=-1),e.rotation%=Math.PI,e},fitsIn:function(e){let t=this.normalize(),n=[t.getTopLeft(),t.getTopRight(),t.getBottomRight(),t.getBottomLeft()],r=t.getCenter(),o=t.getDegreeRotation(),i=e.getBottomRight();for(let a=0;a<4;a++)if(n[a]=n[a].rotate(o,r),n[a].x<e.x||n[a].x>i.x||n[a].y<e.y||n[a].y>i.y)return!1;return!0},reduceRotation:function(){let e;return this.rotation<Math.PI/-4?(e=this.swapWidthHeight(),e.rotation+=Math.PI/2):this.rotation>Math.PI/4?(e=this.swapWidthHeight(),e.rotation-=Math.PI/2):e=this.clone(),e}})}(t),function(e){if(!e.version||e.version.major<3)throw new Error("This version of OpenSeadragonSelection requires OpenSeadragon version 2.0.0+");function t(e){if(!0===e.cropMinimumSize){let t=e.viewer.viewport.imageToViewportCoordinates(e.cropMinimumWidth,e.cropMinimumHeight);e.rect.width=e.rect.width<t.x?t.x:e.rect.width,e.rect.height=e.rect.height<t.y?t.y:e.rect.height}}function n(n){if(n.preventDefaultAction=this.isSelecting&&(null===this.rect||!this.rectDone||this.allowRotation),!this.isSelecting)return;let r=this.viewer.viewport.deltaPointsFromPixels(n.delta,!0),o=this.viewer.viewport.pointFromPixel(n.position,!0),i=new e.Point(o.x-r.x,o.y-r.y);if(this.rect){let t;if((this.restrictToImage||this.cropMinimumSize)&&(t=this.rect.clone()),this.rectDone){if(this.allowRotation){let e=this.rect.getAngleFromCenter(i),t=this.rect.getAngleFromCenter(o);this.rect.rotation=(this.rect.rotation+e-t)%Math.PI}}else this.startRotated?this.rect=c(this.rotatedStartPoint,o,this.startRotatedHeight):(this.rect.width+=r.x,this.rect.height+=r.y);let n=this.viewer.world.getHomeBounds();this.restrictToImage&&!this.rect.fitsIn(new e.Rect(0,0,n.width,n.height))&&(this.rect=t)}else{if(this.restrictToImage){if(!function(e,t){let n=e.viewer.world.getHomeBounds();return t.x>=0&&t.x<=n.width&&t.y>=0&&t.y<=n.height}(this,i))return;!function(e,t){let n;for(let r in{x:0,y:0})n=t[r]-e[r],n<1&&n>0&&(t[r]>1?(e[r]-=t[r]-1,t[r]=1):t[r]<0&&(e[r]-=t[r],t[r]=0))}(r,o)}this.startRotated?(this.rotatedStartPoint=i,this.rect=c(i,o,this.startRotatedHeight)):this.rect=new e.SelectionRect(i.x,i.y,r.x,r.y),this.rectDone=!1}t(this),this.draw()}function r(){null!==this.rect&&(this.rect.width<0&&(this.rect.x+=this.rect.width,this.rect.width=Math.abs(this.rect.width)),this.rect.height<0&&(this.rect.y+=this.rect.height,this.rect.height=Math.abs(this.rect.height)),this.viewer.setMouseNavEnabled(!0),this.rectDone=!0)}function o(){this.viewer.canvas.focus()}function i(n){e.addClass(this.element,"dragging");let r=this.viewer.viewport.deltaPointsFromPixels(n.delta,!0);this.rect.x+=r.x,this.rect.y+=r.y;let o=this.viewer.world.getHomeBounds();this.restrictToImage&&!this.rect.fitsIn(new e.Rect(0,0,o.width,o.height))&&(this.rect.x-=r.x,this.rect.y-=r.y),t(this),this.draw()}function a(){e.removeClass(this.element,"dragging")}function s(n,r){let o,i=this.rect.getDegreeRotation(),a=this.restrictToImage||this.cropMinimumSize?this.rect.clone():null,s=r.delta;switch(0!==i&&(s=s.rotate(-1*i,new e.Point(0,0)),o=this.rect.getCenter()),s=this.viewer.viewport.deltaPointsFromPixels(s,!0),n){case 0:this.rect.y+=s.y,this.rect.height-=s.y;break;case 1:this.rect.width+=s.x;break;case 2:this.rect.height+=s.y;break;case 3:this.rect.x+=s.x,this.rect.width-=s.x;break;case.5:this.rect.y+=s.y,this.rect.height-=s.y,this.rect.x+=s.x,this.rect.width-=s.x;break;case 1.5:this.rect.y+=s.y,this.rect.height-=s.y,this.rect.width+=s.x;break;case 2.5:this.rect.width+=s.x,this.rect.height+=s.y;break;case 3.5:this.rect.height+=s.y,this.rect.x+=s.x,this.rect.width-=s.x}if(0!==i){let e=this.rect.getCenter();s=e.rotate(i,o).minus(e),this.rect.x+=s.x,this.rect.y+=s.y}let l=this.viewer.world.getHomeBounds();this.restrictToImage&&!this.rect.fitsIn(new e.Rect(0,0,l.width,l.height))&&(this.rect=a),t(this),this.draw()}function l(){this.rect.width<0&&(this.rect.x+=this.rect.width,this.rect.width=Math.abs(this.rect.width)),this.rect.height<0&&(this.rect.y+=this.rect.height,this.rect.height=Math.abs(this.rect.height))}function u(e){let t=e.keyCode?e.keyCode:e.charCode;13===t?this.confirm():String.fromCharCode(t)===this.keyboardShortcut&&this.toggleState()}function c(t,n,r){if(t.x>n.x){let e=t;t=n,n=e}let o=n.minus(t),i=t.distanceTo(n),a=-1*Math.atan2(o.x,o.y)+Math.PI/2,s=new e.Point(o.x/2+t.x,o.y/2+t.y),l=new e.SelectionRect(s.x-i/2,s.y-r/2,i,r,a),u=new e.Point(0,r);return u=u.rotate(l.getDegreeRotation(),new e.Point(0,0)),l.x+=u.x/2,l.y+=u.y/2,l}e.Viewer.prototype.selection=function(t){return(!this.selectionInstance||t)&&((t=t||{}).viewer=this,this.selectionInstance=new e.Selection(t)),this.selectionInstance},e.Selection=function(t){e.extend(!0,this,{viewer:null,isSelecting:!1,buttonActiveImg:!1,rectDone:!0,element:null,toggleButton:null,showSelectionControl:!0,showConfirmDenyButtons:!0,styleConfirmDenyButtons:!0,returnPixelCoordinates:!0,keyboardShortcut:"c",rect:null,allowRotation:!0,startRotated:!1,startRotatedHeight:.1,restrictToImage:!1,cropMinimumSize:!1,cropMinimumWidth:0,cropMinimumHeight:0,onSelection:null,onSelectionCanceled:null,onSelectionChange:null,onSelectionToggled:null,prefixUrl:null,navImages:{selection:{REST:"selection_rest.png",GROUP:"selection_grouphover.png",HOVER:"selection_hover.png",DOWN:"selection_pressed.png"},selectionConfirm:{REST:"selection_confirm_rest.png",GROUP:"selection_confirm_grouphover.png",HOVER:"selection_confirm_hover.png",DOWN:"selection_confirm_pressed.png"},selectionCancel:{REST:"selection_cancel_rest.png",GROUP:"selection_cancel_grouphover.png",HOVER:"selection_cancel_hover.png",DOWN:"selection_cancel_pressed.png"}},borderStyle:{width:"1px",color:"#fff"},handleStyle:{top:"50%",left:"50%",width:"6px",height:"6px",margin:"-4px 0 0 -4px",background:"#000",border:"1px solid #ccc"},cornersStyle:{width:"6px",height:"6px",background:"#000",border:"1px solid #ccc"}},t),e.extend(!0,this.navImages,this.viewer.navImages),this.element||(this.element=e.makeNeutralElement("div"),this.element.style.background="rgba(0, 0, 0, 0.1)",this.element.className="selection-box"),this.borders=this.borders||[];let c,p=[];for(let n=0;n<4;n++)this.borders[n]||(this.borders[n]=e.makeNeutralElement("div"),this.borders[n].className="border-"+n,this.borders[n].style.position="absolute",this.borders[n].style.width=this.borderStyle.width,this.borders[n].style.height=this.borderStyle.width,this.borders[n].style.background=this.borderStyle.color),c=e.makeNeutralElement("div"),c.className="border-"+n+"-handle",c.style.position="absolute",c.style.top=this.handleStyle.top,c.style.left=this.handleStyle.left,c.style.width=this.handleStyle.width,c.style.height=this.handleStyle.height,c.style.margin=this.handleStyle.margin,c.style.background=this.handleStyle.background,c.style.border=this.handleStyle.border,new e.MouseTracker({element:this.borders[n],dragHandler:s.bind(this,n),dragEndHandler:l.bind(this,n)}),p[n]=e.makeNeutralElement("div"),p[n].className="corner-"+n+"-handle",p[n].style.position="absolute",p[n].style.width=this.cornersStyle.width,p[n].style.height=this.cornersStyle.height,p[n].style.background=this.cornersStyle.background,p[n].style.border=this.cornersStyle.border,new e.MouseTracker({element:p[n],dragHandler:s.bind(this,n+.5),dragEndHandler:l.bind(this,n)}),this.borders[n].appendChild(c),this.element.appendChild(this.borders[n]),setTimeout(this.element.appendChild.bind(this.element,p[n]),0);this.borders[0].style.top=0,this.borders[0].style.width="100%",this.borders[1].style.right=0,this.borders[1].style.height="100%",this.borders[2].style.bottom=0,this.borders[2].style.width="100%",this.borders[3].style.left=0,this.borders[3].style.height="100%",p[0].style.top="-3px",p[0].style.left="-3px",p[1].style.top="-3px",p[1].style.right="-3px",p[2].style.bottom="-3px",p[2].style.right="-3px",p[3].style.bottom="-3px",p[3].style.left="-3px",this.overlay||(this.overlay=new e.SelectionOverlay(this.element,this.rect||new e.SelectionRect)),this.innerTracker=new e.MouseTracker({element:this.element,clickTimeThreshold:this.viewer.clickTimeThreshold,clickDistThreshold:this.viewer.clickDistThreshold,dragHandler:e.delegate(this,i),dragEndHandler:e.delegate(this,a),clickHandler:e.delegate(this,o)}),this.viewer.addHandler("canvas-click",o.bind(this)),this.viewer.addHandler("canvas-drag",n.bind(this)),this.viewer.addHandler("canvas-drag-end",r.bind(this)),this.keyboardShortcut&&e.addEvent(this.viewer.container,"keypress",e.delegate(this,u),!1);let f=this.prefixUrl||this.viewer.prefixUrl||"",d=this.viewer.buttons&&this.viewer.buttonGroup.buttons,h=d?this.viewer.buttonGroup.buttons[0]:null,m=h?h.onFocus:null,y=h?h.onBlur:null;if(this.showSelectionControl&&(this.toggleButton=new e.Button({element:this.toggleButton?e.getElement(this.toggleButton):null,clickTimeThreshold:this.viewer.clickTimeThreshold,clickDistThreshold:this.viewer.clickDistThreshold,tooltip:e.getString("Tooltips.SelectionToggle")||"Toggle selection",srcRest:f+this.navImages.selection.REST,srcGroup:f+this.navImages.selection.GROUP,srcHover:f+this.navImages.selection.HOVER,srcDown:f+this.navImages.selection.DOWN,onRelease:this.toggleState.bind(this),onFocus:m,onBlur:y}),d&&(this.viewer.buttonGroup.buttons.push(this.toggleButton),this.viewer.buttonGroup.element.appendChild(this.toggleButton.element)),this.toggleButton.imgDown&&(this.buttonActiveImg=this.toggleButton.imgDown.cloneNode(!0),this.toggleButton.element.appendChild(this.buttonActiveImg))),this.showConfirmDenyButtons){this.confirmButton=new e.Button({element:this.confirmButton?e.getElement(this.confirmButton):null,clickTimeThreshold:this.viewer.clickTimeThreshold,clickDistThreshold:this.viewer.clickDistThreshold,tooltip:e.getString("Tooltips.SelectionConfirm")||"Confirm selection",srcRest:f+this.navImages.selectionConfirm.REST,srcGroup:f+this.navImages.selectionConfirm.GROUP,srcHover:f+this.navImages.selectionConfirm.HOVER,srcDown:f+this.navImages.selectionConfirm.DOWN,onRelease:this.confirm.bind(this),onFocus:m,onBlur:y});let t=this.confirmButton.element;t.classList.add("confirm-button"),this.element.appendChild(t),this.cancelButton=new e.Button({element:this.cancelButton?e.getElement(this.cancelButton):null,clickTimeThreshold:this.viewer.clickTimeThreshold,clickDistThreshold:this.viewer.clickDistThreshold,tooltip:e.getString("Tooltips.SelectionCancel")||"Cancel selection",srcRest:f+this.navImages.selectionCancel.REST,srcGroup:f+this.navImages.selectionCancel.GROUP,srcHover:f+this.navImages.selectionCancel.HOVER,srcDown:f+this.navImages.selectionCancel.DOWN,onRelease:this.cancel.bind(this),onFocus:m,onBlur:y});let n=this.cancelButton.element;n.classList.add("cancel-button"),this.element.appendChild(n),this.styleConfirmDenyButtons&&(t.style.position="absolute",t.style.top="50%",t.style.left="50%",t.style.transform="translate(-100%, -50%)",n.style.position="absolute",n.style.top="50%",n.style.left="50%",n.style.transform="translate(0, -50%)")}this.viewer.addHandler("selection",this.onSelection),this.viewer.addHandler("selection_cancel",this.onSelectionCanceled),this.viewer.addHandler("selection_change",this.onSelectionChange),this.viewer.addHandler("selection_toggle",this.onSelectionToggled),this.viewer.addHandler("open",this.draw.bind(this)),this.viewer.addHandler("animation",this.draw.bind(this)),this.viewer.addHandler("resize",this.draw.bind(this)),this.viewer.addHandler("rotate",this.draw.bind(this))},e.extend(e.Selection.prototype,e.ControlDock.prototype,{toggleState:function(){return this.setState(!this.isSelecting)},setState:function(e){return this.isSelecting=e,e?this.draw():this.undraw(),this.buttonActiveImg&&(this.buttonActiveImg.style.visibility=e?"visible":"hidden"),this.viewer.raiseEvent("selection_toggle",{enabled:e}),this},setAllowRotation:function(e){this.allowRotation=e},enable:function(){return this.setState(!0)},disable:function(){return this.setState(!1)},draw:function(){return this.rect&&(this.overlay.update(this.rect.normalize()),this.overlay.drawHTML(this.viewer.drawer.container,this.viewer.viewport),this.viewer.raiseEvent("selection_change",this.getCurrentRect())),this},undraw:function(){return this.overlay.destroy(),this.rect=null,this},confirm:function(){return this.rect&&(this.viewer.raiseEvent("selection",this.getCurrentRect()),this.undraw()),this},getCurrentRect:function(){let t=this.rect.normalize();if(this.returnPixelCoordinates){let n=this.viewer.viewport.viewportToImageRectangle(t);n=e.SelectionRect.fromRect(n).round(),n.rotation=t.rotation,t=n}return t},cancel:function(){return this.viewer.raiseEvent("selection_cancel",!1),this.undraw()}})}(t);function re(){t.setString("Tooltips.SelectionToggle",W("selection.toggle")),t.setString("Tooltips.SelectionConfirm",W("selection.confirm")),t.setString("Tooltips.SelectionCancel",W("selection.cancel"))}class oe{constructor(e,n={}){__publicField(this,"viewer"),__publicField(this,"selection"),__publicField(this,"options"),this.viewer=e;const r=n.onSelection;n.onSelection&&delete n.onSelection,this.options={showSelectionControl:!0,showConfirmDenyButtons:!0,styleConfirmDenyButtons:!0,returnPixelCoordinates:!0,keyboardShortcut:"c",allowRotation:!0,startRotated:!1,restrictToImage:!1,prefixUrl:"",navImages:{selection:{REST:"data:image/png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++Dn3eB/wswAJT1A7Jy8nfmAAAAAElFTkSuQmCC"}},borderStyle:{width:"2px",color:"#4CAF50"},handleStyle:{top:"50%",left:"50%",width:"10px",height:"10px",margin:"-6px 0 0 -6px",background:"#4CAF50",border:"2px solid #4CAF50"},cornersStyle:{width:"12px",height:"12px",background:"#4CAF50",border:"2px solid #4CAF50"},...n,onSelection:e=>{if(r)try{const n=this.viewer.viewport.imageToViewportRectangle(e),o=this.viewer.viewport.viewportToViewerElementRectangle(n),i=t.pixelDensityRatio||1,{x:a,y:s,width:l,height:u}=o||{},{canvas:c}=this.viewer.drawer,p=document.createElement("canvas"),f=p.getContext("2d");if(!f)return void r(e,null);p.width=l*i,p.height=u*i,f.drawImage(c,a*i,s*i,l*i,u*i,0,0,l*i,u*i),p.toBlob(t=>{r(e,t)})}catch(n){console.error("[SelectionPlugin] Error creating blob from selection:",n),r(e,null)}}},this.init(),re()}updateLocale(){re()}init(){this.viewer.addOnceHandler("open",()=>{this.setupSelection()})}setupSelection(){try{if("function"!=typeof this.viewer.selection)return void console.warn("OpenSeadragonSelection plugin not found. Please include openseadragonselection.js");this.selection=this.viewer.selection(this.options)}catch(e){console.error("[SelectionPlugin] Failed to initialize selection plugin:",e)}}enable(){this.selection&&this.selection.enable()}disable(){this.selection&&this.selection.disable()}toggleState(){this.selection&&this.selection.toggleState()}getSelection(){return this.selection?this.selection.getSelection():null}setSelection(e){this.selection&&this.selection.setSelection(e)}clearSelection(){this.selection&&this.selection.clearSelection()}isEnabled(){return!!this.selection&&this.selection.isEnabled()}destroy(){this.selection&&(this.selection=null)}}var ie=(e=>(e.TOP_LEFT="TOP_LEFT",e.TOP_CENTER="TOP_CENTER",e.TOP_RIGHT="TOP_RIGHT",e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_CENTER="BOTTOM_CENTER",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.MIDDLE_LEFT="MIDDLE_LEFT",e.MIDDLE_RIGHT="MIDDLE_RIGHT",e))(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goHome(),e.selection&&e.selection.disable(),e.anno&&e.anno.setEnabled(!1),t()}},{id:"anno",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4Aeyde8xcRRnGdzVIMApo0XAxAQsVQ4kS6q0gpeV+h961QG2xQNQASoqJkmibKBGlNrYJClQKVihQLlqFAlrbaKGtVkwQDRUq/ENRi6KAMQHx83k/9mz267eXd+bMnJk58zTzfnN2952Zd545v87Z3bMzb2rwHxWgAj0VICA9peELVKDRICA8C6hAHwUISB9x+BIVICA8B6hAHwU8AtKnVb5EBRJRgIAkMlAMM4wCBCSM7mw1EQUISCIDxTDDKEBAwujOVhNRIE1AEhGXYaavAAFJfwyT7sHQ0NCesLGwyTDJ94ypQwQkptHILBYAMRldfhK2A7YBJvmTrefxMHwiIOHHIMsIWhAIFIfsJoA83tB6fbeXqn9IQKrXPPsWWye/wNFPiyggISC7DREf+lVACUcRRHBICEgxFMy9K2AIRxFPUEgISDEMzL0qYAlHEVMwSAhIMQTMvSlQEo4iriCQEJBCfuZeFHAERxFb5ZAQkEJ6/3l2LTiGo9CvUkgISCE7c6cKeIKjiLEySAhIITlzZwp4hqOIsxJICEghN3MnCpSAY41FAN4hISAWo8Ii3RUoA0ez2ZyFWqODhIBgVNJP4XvgAI5GjJAQkPDnVvIRuICjECE2SAhIMTLMrRRwCUcRQEyQEJBiVJgbK+ADjiKIWCAhIMWIMDdSwCccRSAxQEJAitFg3l2BLs9WAUfRbGhICEgxEsxVClQJRxFQSEgISDEKzAcqEAKOIqhQkBCQYgSY91UgJBxFYCEgISCF+sx7KhADHEVwJSE5oqhHmxMQrVKZ+vmEw1bSEpDchf7sYdIuATFRKzNfnEyybtWg1Ue6qbKmdRJ3e83Jc636Te/dGo/G94OpEwFRS5WXY8xwFCNhCcmYorwmJyAalTLzSQEOGRLEeRfymTCTxBnERC36jlQAJ120l1WdkSJOGziux6yzsbOeQcecQQYplNHrOOnqAke3UduFJ78FM0o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H3QVLgHpraSs+zq+98t8JUIFNgMO05Xf+3aDgPSWR3sDXO8a+EqVCiwDHCYrvqtiIyC9ZRrX+yW+EpkC1wAO2VzHeViuAHEeWAQValfriyDUbEP4FXo+A3DITYs4dJ8ISG9NH+79El8JrMB2tP9ZgDEJdg+OvSUC0kNaItogCQAAANhJREFUCH8LXhJDxhSJAvLdyCLEMhHj813k3hMB6SMxBmE+Xl4CYwqnwDo0fTlsHMbjWNhi2It4XEkiIANkxmDI3nbvhtsE2BRaw6cGH4K+8r3Tgcj3hvaSzsCf5bCn8VzlKQFAKtdkVIMYnF2wx2AbaU2fGvwW+v4J9jzs5VEDEeAJAhJAdDaZjgIEJJ2xYqQBFCAgAURnk+koQEDSGStGGkCBvAEJIDibTEsBApLWeDHaihUgIBULzubSUoCApDVejLZiBQhIxYKzubQUICCexovV1kOB/wMAAP//fe+fTAAAAAZJREFUAwDKtMkYZJHHkQAAAABJRU5ErkJggg==",dropdownContent:(e,t)=>{const n=document.createElement("div");n.className="med-toolbar-dropdown-inner";let r="#ff0000";const o=document.createElement("div");o.innerHTML=`<div class="med-toolbar-section-title">${W("toolbar.annoColor")}</div>`;const i=document.createElement("div");i.className="med-color-grid";["#ff0000","#00ff00","#0000ff","#ffff00","#00ffff","#ffffff"].forEach(e=>{const t=document.createElement("div");t.className="med-color-item",t.style.backgroundColor=e,t.onclick=()=>{r=e,i.querySelectorAll(".med-color-item").forEach(e=>e.classList.remove("active")),t.classList.add("active")},i.appendChild(t)}),o.appendChild(i),n.appendChild(o);const a=document.createElement("div");a.innerHTML=`<div class="med-toolbar-section-title">${W("toolbar.annoShape")}</div>`;const s=document.createElement("div");s.className="med-tool-grid";return[{id:"rect",label:W("toolbar.rect")},{id:"polygon",label:W("toolbar.polygon")},{id:"circle",label:W("toolbar.circle")},{id:"ellipse",label:W("toolbar.ellipse")},{id:"line",label:W("toolbar.line")},{id:"freehand",label:W("toolbar.freehand")}].forEach(n=>{const o=document.createElement("button");o.className="med-tool-item",o.textContent=n.label,o.onclick=()=>{e.selection&&e.selection.disable(),e.anno&&e.anno.setTool(n.id,r),t()},s.appendChild(o)}),a.appendChild(s),n.appendChild(a),n},label:W("toolbar.annoSettings")},{id:"colorAdjust",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AeydCdx1U73HH5ei+lyaNdeNEmUIeUVJhCsaRLm3ItJMI4XIUMmUXJWokKEkRULGlIQ0iZKUiuqWlKS6Q6jrfr8853Xe856zz15rr73P3ues97N+79pn7zX813+t37P2XsN//dNc/pc1kDUwUgOZICNVkx9kDczNZYLkVpA1UKCBTJAC5eRHWQOZILkNZA0UaKBGghTkmh9lDXREA5kgHamoLOZkNJAJMhm951w7ooFMkI5UVBZzMhrIBJmM3nOuHdFANwnSEeVmMbuvgUyQ7tdhLkGNGsgEqVG5OenuayATpPt1mEtQowYyQWpUbk66+xrIBBmow/wza6BfA5kg/drI11kDAxrIBBlQSP6ZNdCvgUyQfm3k66yBAQ1kggwoJP/MGujXQCZIvzbqvc6pd1ADmSAdrLQscnMayARpTtc5pw5qIBOkg5WWRW5OA5kgzek659RBDWSCdLDSFhc536lLA5kgdWk2pzsVGsgEmYpqzIWoSwOZIHVpNqc7FRrIBJmKasyFqEsDmSB1aXZa0p3xcmSCzHgDyMUv1kAmSLF+ant61113rQA2BluB7cHOYE/wAfBRcAI4HXwFXADOAl8AnwHHgaPA4eAgsD94LdgIPK42oWcw4UyQGiudxvoQsB7YERwIbPDX4N9Jtj8DXwGngxPAR8EHwJ5gZ7A92ApsDDYBW4KtwcvBjuAN4G1gd7AP+AS4CPyS9O8A1wJJJYl24XpzsDzPswvQQCZIgLKKgtL4JMNm+HuDM8BvCH8LuAwcB/YANvin4i8F6nT3IfGVgaSSRB/h+hzwO+S6EZwKdgObgkwaFDPKZYKM0syY+zSsBcC/zL7uXEVwyXAe/vvAi8CjQBvd4xHqpeBQcD6QNFdTlhPBm8GK3GvEdSGTTJCAWqL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AkyRCn5VtZATwOZID1NZD9rYIgGMkGGKCXfyhroaSAVQXrpZT9rYKo0kAkyVdWZC5NaA5kgqTWa05sqDWSCTFV15sKk1kAmSGqN5vSmSgMdIMhU6TsXpmMayATpWIVlcZvVQCZIs/rOuXVMA5kgHauwLG6zGsgEaVbfObeOaWC2CdKxysriNq+BTJDmdZ5z7JAGMkE6VFlZ1OY1kAnSvM5zjh3SQCZIhyori9q8BjJBatJ5TnY6NPD/AAAA//9GzLATAAAABklEQVQDAFYq/BjGu87BAAAAAElFTkSuQmCC",dropdownContent:(e,t)=>{var n;const r=document.createElement("div");r.className="med-toolbar-dropdown-inner med-color-adjust-dropdown",e.anno&&e.anno.setEnabled(!1),e.selection&&e.selection.disable();const o=(e,t,n,r,o,i,a)=>{const s=document.createElement("div");s.className="med-toolbar-section",s.innerHTML=`<div class="med-toolbar-section-title">${e}</div>`;const l=document.createElement("input");l.type="range",l.id=t,l.min=String(n),l.max=String(r),l.step=String(o),l.value=String(i);const u=document.createElement("span");u.className="med-slider-value",u.textContent=String(i);const c=((e,t)=>{let n=null;return(...r)=>{n&&clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}})(a,200);return l.oninput=e=>{const t=parseFloat(e.target.value);u.textContent=t.toFixed(2),c(t)},s.appendChild(l),s.appendChild(u),s},i=(e,t,n,r)=>{const o=document.createElement("div");o.className="med-toolbar-section med-checkbox-section";const i=document.createElement("label");i.htmlFor=t,i.textContent=e;const a=document.createElement("input");return a.type="checkbox",a.id=t,a.checked=n,a.onchange=e=>r(e.target.checked),o.appendChild(i),o.appendChild(a),o},a=(null==(n=e.colorAdjust)?void 0:n.adjustments)||{brightness:1,contrast:1,saturation:1,gamma:1,hue:0,invert:!1,sepia:!1,greyscale:!1};r.appendChild(o(W("toolbar.brightness"),"brightness-slider",0,2,.01,a.brightness||1,t=>{var n;return null==(n=e.colorAdjust)?void 0:n.setAdjustments({brightness:t})})),r.appendChild(o(W("toolbar.contrast"),"contrast-slider",0,2,.01,a.contrast||1,t=>{var n;return null==(n=e.colorAdjust)?void 0:n.setAdjustments({contrast:t})})),r.appendChild(o(W("toolbar.saturation"),"saturation-slider",0,3,.01,a.saturation||1,t=>{var n;null==(n=e.colorAdjust)||n.setAdjustments({saturation:t,sepia:!1,greyscale:!1}),r.querySelector("#sepia-checkbox").checked=!1,r.querySelector("#greyscale-checkbox").checked=!1})),r.appendChild(o(W("toolbar.hue"),"hue-slider",0,360,1,a.hue||0,t=>{var n;null==(n=e.colorAdjust)||n.setAdjustments({hue:t,sepia:!1,greyscale:!1}),r.querySelector("#sepia-checkbox").checked=!1,r.querySelector("#greyscale-checkbox").checked=!1})),r.appendChild(o(W("toolbar.gamma"),"gamma-slider",.1,3,.01,a.gamma||1,t=>{var n;return null==(n=e.colorAdjust)?void 0:n.setAdjustments({gamma:t})})),r.appendChild(i(W("toolbar.invert"),"invert-checkbox",a.invert||!1,t=>{var n;return null==(n=e.colorAdjust)?void 0:n.setAdjustments({invert:t})})),r.appendChild(i(W("toolbar.sepia"),"sepia-checkbox",a.sepia||!1,t=>{var n,o;t?(null==(n=e.colorAdjust)||n.setAdjustments({sepia:!0,greyscale:!1,saturation:1,hue:0}),r.querySelector("#saturation-slider").value="1.0",r.querySelector("#hue-slider").value="0",r.querySelector("#greyscale-checkbox").checked=!1):null==(o=e.colorAdjust)||o.setAdjustments({sepia:!1})})),r.appendChild(i(W("toolbar.greyscale"),"greyscale-checkbox",a.greyscale||!1,t=>{var n,o;t?(null==(n=e.colorAdjust)||n.setAdjustments({greyscale:!0,sepia:!1,saturation:1,hue:0}),r.querySelector("#saturation-slider").value="1.0",r.querySelector("#hue-slider").value="0",r.querySelector("#sepia-checkbox").checked=!1):null==(o=e.colorAdjust)||o.setAdjustments({greyscale:!1})}));const s=document.createElement("button");return s.className="med-main-btn med-reset-btn",s.textContent=W("toolbar.reset"),s.onclick=()=>{var t;null==(t=e.colorAdjust)||t.reset(),r.querySelector("#brightness-slider").value="1.0",r.querySelector("#contrast-slider").value="1.0",r.querySelector("#saturation-slider").value="1.0",r.querySelector("#hue-slider").value="0",r.querySelector("#gamma-slider").value="1.0",r.querySelector("#invert-checkbox").checked=!1,r.querySelector("#sepia-checkbox").checked=!1,r.querySelector("#greyscale-checkbox").checked=!1,r.querySelectorAll(".med-slider-value").forEach(e=>{const t=e.previousElementSibling.id;"brightness-slider"===t||"contrast-slider"===t||"saturation-slider"===t||"gamma-slider"===t?e.textContent="1.00":"hue-slider"===t&&(e.textContent="0")})},r.appendChild(s),r},label:W("toolbar.colorAdjust")},{id:"selection",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AeydDbRtVVXH7y1L0AzKSJAKzMheKE8yUniiIAgPEITk+8OgIBDFeiKaQ4hHouMlqARqgBIIPLIHqKCoKAUxQAFH+YqPGEpqRgxL86OsbIwaz9//vn3uO/fec+7+mmvttfaed8x51z57rzXXnP+5/nufsz/W/pEZ/3MEHIGpCDhBpkLjGxyBmRkniI8CR2AZBJwgy4DjmxwBJ4iPAUdgGQQCEmSZXn2TI5AJAk6QTBLlbnaDgBOkG9y910wQcIJkkih3sxsEnCDd4O69ZoJAngTJBFx3M38EnCD559AjCIiAEyQguG46fwScIPnn0CMIiIATJCC4bjp/BJwgi3LoHx2BcQScIONo+LIjsAgBJ8giQPyjIzCOgBNkHA1fdgQWIeAEWQSIf3QExhFwgoyjEXbZrWeIgBMkw6S5y/EQcILEw9p7yhABJ0iGSXOX4yHgBImHtfeUIQKdEWTTpk1HouvQL6AurRDobWONDY2RI7viVnSCkMqV6D0EfCP6ZvTXURdHYBICGhsaIzdqzKArJ1UKuS4qQQjwfILZiK5CXRyBOghozGxkDK2t06ht3WgEIbBfwNmowdGfS/8QOL8YS1Eii0YQolmHujgCFghEG0tRCALjjwGV41CX3BBI09/jijEV3LsoBCGKvVEXR8ASgShjyglimTK3FROBXhFkt5jIeV+DQCDKmIp1BBlExjzI/iHgBOlfTrOJKAdHnSA5ZM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EE+NupYGAEySNPLgXiSLgBAmUGDfbDwR+CAAA//984SgBAAAABklEQVQDAOpfFBhVguy8AAAAAElFTkSuQmCC",label:W("toolbar.screenshot"),onClick:(e,t)=>{var n;null==(n=e.selection)||n.toggleState(),e.anno&&e.anno.setEnabled(!1),t()}}],se="med-toolbar-styles";class le{constructor(e,t={}){__publicField(this,"engine"),__publicField(this,"options"),__publicField(this,"element"),__publicField(this,"dropdownElement",null),__publicField(this,"outsideClickHandler",null),this.engine=e,this.options=t,this.element=document.createElement("div"),this.element.className=this.getClassName(),this.injectStyles(),this.render(),this.mount()}show(){this.element.style.display="flex"}hide(){this.element.style.display="none"}toggle(){this.element.style.display="none"===this.element.style.display?"flex":"none"}isVisible(){return"none"!==this.element.style.display}destroy(){this.closeDropdown(!0),this.element.remove(),this.engine=null}render(){let e;if(this.element.innerHTML="",this.options.buttons&&this.options.buttons.length>0){const t=new Map(ae.map(e=>[e.id,e]));e=this.options.buttons.map(e=>{const n=t.get(e.id);return n?{...n,...e}:e})}else e=ae;e.forEach(e=>{const t=document.createElement("div");t.className="med-toolbar-item-wrapper";const n=document.createElement("button");if(n.className="med-main-btn",e.icon){const t=document.createElement("img");t.src=e.icon,t.alt=e.label||e.id,n.appendChild(t)}else e.label&&(n.textContent=e.label);if(n.onclick=n=>{n.stopPropagation(),this.dropdownElement&&this.dropdownElement.parentElement===t?this.closeDropdown():(this.closeDropdown(),e.onClick?e.onClick(this.engine,()=>this.closeDropdown()):e.dropdownContent&&this.showDropdown(t,e))},t.appendChild(n),e.label){const n=document.createElement("div");n.className="med-tooltip",n.textContent=e.label,t.appendChild(n)}this.element.appendChild(t)})}showDropdown(e,t){this.dropdownElement=document.createElement("div"),this.dropdownElement.className="med-toolbar-dropdown";const n=t.dropdownContent(this.engine,()=>this.closeDropdown());this.dropdownElement.appendChild(n),e.appendChild(this.dropdownElement),this.adjustDropdownPosition(),requestAnimationFrame(()=>{var e;null==(e=this.dropdownElement)||e.classList.add("show")}),this.outsideClickHandler=e=>{this.dropdownElement&&!this.dropdownElement.contains(e.target)&&this.closeDropdown()},setTimeout(()=>document.addEventListener("click",this.outsideClickHandler),0)}adjustDropdownPosition(){if(!this.dropdownElement)return;const e=this.dropdownElement.getBoundingClientRect(),t=window.innerWidth;e.right>t?(this.dropdownElement.style.left="auto",this.dropdownElement.style.right="0",this.dropdownElement.style.transform="translateX(0) translateY(10px)",this.dropdownElement.setAttribute("data-adjusted","true")):e.left<0&&(this.dropdownElement.style.left="0",this.dropdownElement.style.transform="translateX(0) translateY(10px)",this.dropdownElement.setAttribute("data-adjusted","true"));if((this.options.position||"").includes("TOP")){const e=this.dropdownElement.style.transform;this.dropdownElement.style.transform=e.replace("translateY(10px)","translateY(-10px)")}}closeDropdown(e=!1){if(this.dropdownElement){const t=this.dropdownElement;this.dropdownElement=null,e?t.remove():(t.classList.remove("show"),setTimeout(()=>t.remove(),200))}this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler),this.outsideClickHandler=null)}mount(){var e;const t=null==(e=this.engine.viewer)?void 0:e.element;t&&t.appendChild(this.element)}getClassName(){return`med-toolbar med-toolbar--${this.options.position||"BOTTOM_CENTER"}`}injectStyles(){if(document.getElementById(se))return;const e=document.createElement("style");e.id=se,e.textContent='\n .med-toolbar {\n position: absolute;\n display: flex;\n gap: 12px;\n padding: 10px;\n z-index: 100;\n background: rgba(24, 28, 36, 0.85);\n border-radius: 12px;\n backdrop-filter: blur(10px);\n border: 1px solid rgba(255,255,255,0.1);\n box-shadow: 0 8px 32px rgba(0,0,0,0.3);\n }\n\n /* 定位 */\n .med-toolbar--TOP_LEFT { top: 18px; left: 18px; }\n .med-toolbar--TOP_CENTER { top: 18px; left: 50%; transform: translateX(-50%); }\n .med-toolbar--TOP_RIGHT { top: 18px; right: 18px; }\n .med-toolbar--BOTTOM_LEFT { bottom: 18px; left: 18px; }\n .med-toolbar--BOTTOM_CENTER { bottom: 18px; left: 50%; transform: translateX(-50%); }\n .med-toolbar--BOTTOM_RIGHT { bottom: 18px; right: 18px; }\n .med-toolbar--MIDDLE_LEFT { top: 50%; left: 18px; transform: translateY(-50%); flex-direction: column; }\n .med-toolbar--MIDDLE_RIGHT { top: 50%; right: 18px; transform: translateY(-50%); flex-direction: column; }\n\n .med-toolbar-item-wrapper { position: relative; }\n \n /* 按钮及动画 */\n .med-main-btn {\n background: rgba(255,255,255,0.08);\n color: #f2f5f8;\n border: none;\n padding: 8px 16px;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .med-main-btn:hover { background: rgba(49, 208, 170, 0.2); }\n .med-main-btn:active { transform: scale(0.9); }\n .med-main-btn img { width: 24px; height: 24px; }\n\n /* 下拉框基础及进场动画 */\n .med-toolbar-dropdown {\n position: absolute;\n bottom: calc(100% + 12px); \n left: 50%;\n background: #181c24;\n border: 1px solid rgba(255,255,255,0.1);\n border-radius: 12px;\n padding: 16px;\n box-shadow: 0 10px 40px rgba(0,0,0,0.5);\n min-width: 220px;\n z-index: 101;\n \n /* 初始动画状态 */\n opacity: 0;\n pointer-events: none;\n transform: translateX(-50%) translateY(10px);\n transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n\n /* 动画显示状态 */\n .med-toolbar-dropdown.show {\n opacity: 1;\n pointer-events: auto;\n transform: translateX(-50%) translateY(0) !important;\n }\n \n /* 边界修正后的显示状态 */\n .med-toolbar-dropdown[data-adjusted="true"].show {\n transform: translateX(0) translateY(0) !important;\n }\n\n /* 顶部位置下拉动画修正 */\n [class*="med-toolbar--TOP"] .med-toolbar-dropdown {\n bottom: auto;\n top: calc(100% + 12px);\n transform: translateX(-50%) translateY(-10px);\n }\n\n /* 侧边位置逻辑 */\n .med-toolbar--MIDDLE_LEFT .med-toolbar-dropdown {\n left: calc(100% + 12px); top: 0; bottom: auto; transform: translateX(-10px);\n }\n .med-toolbar--MIDDLE_LEFT .med-toolbar-dropdown.show { transform: translateX(0) !important; }\n\n .med-toolbar--MIDDLE_RIGHT .med-toolbar-dropdown {\n left: auto; right: calc(100% + 12px); top: 0; bottom: auto; transform: translateX(10px);\n }\n .med-toolbar--MIDDLE_RIGHT .med-toolbar-dropdown.show { transform: translateX(0) !important; }\n\n /* Tooltip styles */\n .med-tooltip {\n position: absolute;\n padding: 6px 10px;\n background: rgba(0, 0, 0, 0.75);\n color: #fff;\n border-radius: 6px;\n font-size: 12px;\n white-space: nowrap;\n z-index: 102;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease, transform 0.2s ease;\n }\n\n .med-toolbar-item-wrapper:hover .med-tooltip {\n opacity: 1;\n pointer-events: auto;\n }\n\n /* Tooltip directions based on toolbar position */\n\n /* Default: bottom tooltip (for top toolbars) */\n .med-toolbar-item-wrapper .med-tooltip {\n top: calc(100% + 12px); /* Position below the button */\n left: 50%;\n transform: translateX(-50%) translateY(0px);\n }\n .med-toolbar-item-wrapper:hover .med-tooltip {\n transform: translateX(-50%) translateY(0);\n }\n\n\n /* Top tooltip (for bottom toolbars) */\n [class*="med-toolbar--BOTTOM"] .med-toolbar-item-wrapper .med-tooltip {\n bottom: calc(100% + 12px); /* Position above the button */\n top: auto;\n left: 50%;\n transform: translateX(-50%) translateY(0px);\n }\n [class*="med-toolbar--BOTTOM"] .med-toolbar-item-wrapper:hover .med-tooltip {\n transform: translateX(-50%) translateY(0);\n }\n\n /* Right tooltip (for middle-left toolbars) */\n [class*="med-toolbar--MIDDLE_LEFT"] .med-toolbar-item-wrapper .med-tooltip {\n left: calc(100% + 12px); /* Position to the right of the button */\n top: 50%;\n transform: translateY(-50%) translateX(0px);\n }\n [class*="med-toolbar--MIDDLE_LEFT"] .med-toolbar-item-wrapper:hover .med-tooltip {\n transform: translateY(-50%) translateX(0);\n }\n\n /* Left tooltip (for middle-right toolbars) */\n [class*="med-toolbar--MIDDLE_RIGHT"] .med-toolbar-item-wrapper .med-tooltip {\n right: calc(100% + 12px); /* Position to the left of the button */\n top: 50%;\n left: auto;\n transform: translateY(-50%) translateX(0px);\n }\n [class*="med-toolbar--MIDDLE_RIGHT"] .med-toolbar-item-wrapper:hover .med-tooltip {\n transform: translateY(-50%) translateX(0);\n }\n\n /* 内容样式 */\n .med-toolbar-section-title { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 10px; letter-spacing: 1px; }\n .med-color-grid { display: flex; gap: 10px; margin-bottom: 20px; }\n .med-color-item { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: 0.2s; }\n .med-color-item.active { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 10px rgba(255,255,255,0.3); }\n .med-tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }\n .med-tool-item { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05); color: #fff; padding: 8px 4px; border-radius: 6px; cursor: pointer; font-size: 12px; transition: 0.2s; }\n .med-tool-item:hover { background: rgba(49, 208, 170, 0.2); border-color: rgba(49, 208, 170, 0.4); }\n\n /* 颜色调整下拉框样式 */\n .med-color-adjust-dropdown {\n min-width: 280px;\n }\n\n .med-toolbar-section {\n margin-bottom: 15px;\n display: flex;\n flex-direction: column;\n }\n\n .med-toolbar-section-title {\n margin-bottom: 8px;\n font-size: 13px;\n color: #f2f5f8;\n }\n\n .med-toolbar-section input[type="range"] {\n width: 100%;\n -webkit-appearance: none;\n height: 4px;\n background: rgba(255,255,255,0.2);\n border-radius: 2px;\n outline: none;\n margin-top: 5px;\n margin-bottom: 5px;\n }\n\n .med-toolbar-section input[type="range"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #31d0aa;\n cursor: pointer;\n border: 2px solid #181c24;\n transition: background 0.15s ease-in-out;\n }\n\n .med-toolbar-section input[type="range"]::-webkit-slider-thumb:hover {\n background: #25a084;\n }\n\n .med-slider-value {\n font-size: 12px;\n color: rgba(255,255,255,0.7);\n align-self: flex-end;\n }\n\n .med-checkbox-section {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 10px;\n }\n\n .med-checkbox-section label {\n font-size: 13px;\n color: #f2f5f8;\n cursor: pointer;\n }\n\n .med-checkbox-section input[type="checkbox"] {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n border: 1px solid rgba(255,255,255,0.4);\n border-radius: 4px;\n background-color: transparent;\n cursor: pointer;\n position: relative;\n transition: all 0.2s ease;\n }\n\n .med-checkbox-section input[type="checkbox"]:checked {\n background-color: #31d0aa;\n border-color: #31d0aa;\n }\n\n .med-checkbox-section input[type="checkbox"]:checked::after {\n content: \'\';\n position: absolute;\n left: 5px;\n top: 2px;\n width: 4px;\n height: 9px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n .med-reset-btn {\n width: 100%;\n margin-top: 15px;\n background: rgba(200, 50, 50, 0.1);\n color: #ff6b6b;\n border: 1px solid rgba(255, 100, 100, 0.2);\n }\n .med-reset-btn:hover {\n background: rgba(200, 50, 50, 0.3);\n }\n ',document.head.appendChild(e)}}class ue{constructor(e){var n;if(__publicField(this,"viewer"),__publicField(this,"anno",null),__publicField(this,"toolbar",null),__publicField(this,"colorAdjust",null),__publicField(this,"selection",null),__publicField(this,"scalebar",null),__publicField(this,"magnification",null),__publicField(this,"options"),__publicField(this,"events",new Map),!e.osdOptions)throw new Error("osdOptions is required");e.locale&&J(e.locale);const r={id:"osd-container",crossOriginPolicy:"Anonymous",prefixUrl:(null==(n=e.osdOptions)?void 0:n.prefixUrl)||"",opacity:1,preload:!1,immediateRender:!1,defaultZoomLevel:0,degrees:0,flipped:!1,minZoomImageRatio:.9,maxZoomPixelRatio:2,smoothTileEdgesMinZoom:1.1,animationTime:.8,springStiffness:10,pixelsPerWheelLine:120,minScrollDeltaTime:20,panHorizontal:!0,panVertical:!0,constrainDuringPan:!0,visibilityRatio:.2,wrapHorizontal:!1,wrapVertical:!1,showNavigator:!0,navigatorSizeRatio:.15,navigatorPosition:"TOP_RIGHT",navigatorAutoFade:!1,navigatorOpacity:.8,navigatorBackground:"#fff",navigatorBorderColor:"#aaa",navigatorDisplayRegionColor:"#f21616",showNavigationControl:!1,maxImageCacheCount:100,gestureSettingsMouse:{dragToPan:!0,clickToZoom:!1,dblClickToZoom:!1},gestureSettingsTouch:{flickEnabled:!1,pinchToZoom:!0},...e.osdOptions};e.osdOptions=r,this.options=e,this.viewer=t(r),this.viewer.addOnceHandler("open",()=>{this.viewer.viewport.goHome(),this.emit("ready"),console.log("[MedViewerEngine] First tile loaded, refreshing viewer layout.")}),this.initPlugins()}initPlugins(){var e,t,n,r,o;const{plugins:i}=this.options;if(i){if(i.scalebar){const e="object"==typeof i.scalebar?i.scalebar:{};this.scalebar=new ne(this.viewer,e),console.log("[MedEngine] Scalebar plugin initialized.")}if(i.annotorious){const a="object"==typeof i.annotorious?i.annotorious:{};if(a.locale||(a.locale=this.options.locale||"zh-CN"),"object"==typeof(null==(e=a.options)?void 0:e.formatter)){const e=(null==(n=null==(t=a.options)?void 0:t.formatter)?void 0:n.pixelsPerMeter)||1,i=(null==(o=null==(r=a.options)?void 0:r.formatter)?void 0:o.showMeasure)||!1;(()=>{const e="med-anno-default-shapeLabelsFormatter-overrides";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.innerHTML="\n \n.a9s-annotationlayer .a9s-formatter-el,\n.a9s-annotationlayer .a9s-formatter-el foreignObject {\n overflow: visible;\n pointer-events: none;\n}\n\n.a9s-annotationlayer .a9s-formatter-el foreignObject .a9s-shape-label-wrapper {\n position: relative;\n transform: translateY(-100%);\n padding-bottom: 4px;\n}\n\n.a9s-annotationlayer\n .a9s-formatter-el\n foreignObject\n .a9s-shape-label-wrapper\n .a9s-shape-label {\n display: inline-block;\n max-width: 24vw !important;\n color: #000;\n /* min-width: 10vw !important; */\n\n word-wrap: break-word;\n word-break: keep-all;\n /* white-space: nowrap; */\n\n padding: 3px 5px;\n margin-bottom: 2px;\n background-color: rgba(255, 255, 255, 0.85);\n border-radius: 3px;\n font-size: 14px;\n}\n\n.a9s-annotationlayer\n .a9s-formatter-el\n foreignObject\n .a9s-shape-label-wrapper\n .a9s-shape-label\n p {\n margin: 5px !important;\n}\n ",document.head.appendChild(t)})(),a.formatter=((e,t)=>n=>{var r;const o=Array.isArray(n.body)?n.body:[n.body];let i=null==(r=n.target.renderedVia)?void 0:r.name;t||(i=null);const a=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");a.setAttribute("width","1px"),a.setAttribute("height","1px");const s=o.find(e=>"commenting"==e.purpose);switch(i){case"line":console.log("line",n.target.selector.value);let t=document.createElement("div");t.innerHTML=n.target.selector.value;let r=t.getElementsByTagName("line")[0],o=X(Number(r.getAttribute("x1")),e),i=X(Number(r.getAttribute("y1")),e),l=X(Number(r.getAttribute("x2")),e),u=X(Number(r.getAttribute("y2")),e),c=Math.sqrt(Math.pow(l-o,2)+Math.pow(u-i,2));a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n<div class="a9s-shape-label" >\n <p >\n ${W("annotation.length")}: ${Z(c,"m")} </p> <p >\n ${W("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n\n <div class="a9s-shape-label" >\n <p>\n ${W("annotation.length")}: ${Z(c,"m")} \n </p>\n </div>\n </div>`;break;case"rect":let p=new RegExp("xywh=pixel:","g"),f=n.target.selector.value.replace(p,"").split(",");const d=X(Number(f[2]),e),h=X(Number(f[3]),e),m=2*(d+h),y=d*h;a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n\n <div class="a9s-shape-label">\n <p>\n ${W("annotation.width")}: ${Z(d,"m")} </p> <p>\n\n\n ${W("annotation.height")}: ${Z(h,"m")} </p> <p>\n ${W("annotation.perimeter")}: ${Z(m,"m")} </p> <p>\n ${W("annotation.area")}: ${Z(y,"m²")} </p> <p>\n ${W("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p >\n ${W("annotation.width")}: ${Z(d,"m")} </p> <p>\n ${W("annotation.height")}: ${Z(h,"m")} </p> <p>\n ${W("annotation.perimeter")}: ${Z(m,"m")} </p> <p>\n ${W("annotation.area")}: ${Z(y,"m²")} \n </p>\n </div>\n </div>`;break;case"circle":let b=document.createElement("div");console.log(n),b.innerHTML=n.target.selector.value;let g=b.getElementsByTagName("circle")[0];const v=X(Number(g.getAttribute("r")),e),w=2*Math.PI*v,A=Math.PI*Math.pow(v,2);a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n\n <div class="a9s-shape-label">\n <p>\n ${W("annotation.radius")}: ${Z(v,"m")} </p><p>\n ${W("annotation.perimeter")}: ${Z(w,"m")} </p><p>\n ${W("annotation.area")}: ${Z(A,"m²")} </p><p>\n ${W("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label"> \n <p>\n ${W("annotation.radius")}: ${Z(v,"m")} </p><p>\n ${W("annotation.perimeter")}: ${Z(w,"m")} </p><p>\n ${W("annotation.area")}: ${Z(A,"m²")} \n \n </p>\n </div>\n </div>`;break;case"ellipse":let S=document.createElement("div");S.innerHTML=n.target.selector.value;let O=S.getElementsByTagName("ellipse")[0],E=X(Number(O.getAttribute("rx")),e),x=X(Number(O.getAttribute("ry")),e),C=null,M=null;E>=x?(C=E,M=x):(C=x,M=E);const j=Math.PI*(3*(E+x)-Math.sqrt((3*E+x)*(E+3*x))),P=Math.PI*E*x;a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>\n ${W("annotation.majorAxis")}: ${Z(C,"m")} </p> <p>\n\n ${W("annotation.minorAxis")}: ${Z(M,"m")} </p> <p>\n ${W("annotation.perimeter")}: ${Z(j,"m")} </p> <p>\n ${W("annotation.area")}: ${Z(P,"m²")} </p> <p>\n ${W("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>\n ${W("annotation.majorAxis")}: ${Z(C,"m")} </p><p>\n \n ${W("annotation.minorAxis")}: ${Z(M,"m")} </p><p>\n ${W("annotation.perimeter")}: ${Z(j,"m")} </p><p>\n ${W("annotation.area")}: ${Z(P,"m²")} \n </p>\n </div>\n </div>`;break;case"polygon":let I=document.createElement("div");I.innerHTML=n.target.selector.value;const k=I.getElementsByTagName("polygon")[0].getAttribute("points").split(" ").map(t=>{const[n,r]=t.split(",").map(parseFloat);return{x:X(n,e),y:X(r,e)}});let T=0;for(let e=0;e<k.length;e++){const t=k[e],n=k[(e+1)%k.length],r=n.x-t.x,o=n.y-t.y;T+=Math.sqrt(r*r+o*o)}let D=0;for(let e=0;e<k.length;e++){const t=k[e],n=k[(e+1)%k.length];D+=t.x*n.y-n.x*t.y}D=Math.abs(D)/2,a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>\n ${W("annotation.perimeter")}: ${Z(T,"m")} </p> <p>\n ${W("annotation.area")}: ${Z(D,"m²")} </p> <p>\n ${W("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n\n <div class="a9s-shape-label">\n <p>\n ${W("annotation.perimeter")}: ${Z(T,"m")} </p><p>\n ${W("annotation.area")}: ${Z(D,"m²")} \n </p>\n </div>\n </div>`;break;case"freehand":let R=function(e){let t=0;for(let n=0;n<e.length-1;n++){const[r,o]=e[n],[i,a]=e[n+1];t+=r*a-i*o}return Math.abs(t/2)},N=document.createElement("div");N.innerHTML=n.target.selector.value;let L=N.getElementsByTagName("path")[0].getAttribute("d");const B=new Y(L);let _=B.getTotalLength(),G=300,H=[];for(let e=0;e<=G;e++){let t=B.getPointAtLength(e/G*_);H.push([t.x,t.y])}let F=R(H),U=X(_,e),z=X(1,e),V=F*z*z;a.innerHTML=s?`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>${W("annotation.length")}: ${Z(U,"m")}</p>\n <p>${W("annotation.area")}: ${Z(V,"m²")}</p>\n <p>${W("annotation.remark")}: ${s.value}</p>\n </div>\n </div>`:`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>${W("annotation.length")}: ${Z(U,"m")}</p>\n <p>${W("annotation.area")}: ${Z(V,"m²")}</p>\n </div>\n </div>`;break;default:s&&(a.innerHTML=`\n <div xmlns="http://www.w3.org/1999/xhtml" class="a9s-shape-label-wrapper">\n <div class="a9s-shape-label">\n <p>\n ${W("annotation.remark")}: ${s.value} \n </p>\n </div>\n </div>`)}return{element:a}})(e,i)}this.viewer.isOpen()?(console.log("[MedEngine] Viewer is already open, mounting Annotorious.",a),this.mountAnnotorious(a)):this.viewer.addOnceHandler("open",()=>{console.log("[MedEngine] Viewer is already open, mounting Annotorious.",a),this.mountAnnotorious(a)})}if(i.toolbar){const e="object"==typeof i.toolbar?i.toolbar:{};this.toolbar=new le(this,e),console.log("[MedEngine] Toolbar plugin initialized.")}if(i.selection){const e="object"==typeof i.selection?i.selection:{};this.selection=new oe(this.viewer,e),console.log("[MedEngine] Selection plugin initialized.")}if(i.colorAdjust){const e="object"==typeof i.colorAdjust?i.colorAdjust:{};this.colorAdjust=new d(this.viewer,e),console.log("[MedEngine] ColorAdjust plugin initialized.")}if(i.magnification){const e="object"==typeof i.magnification?i.magnification:{};this.magnification=new $(this.viewer,e),console.log("[MedEngine] Magnification plugin initialized.")}}}mountAnnotorious(e){try{this.anno=new f(this,e),console.log("[MedEngine] Annotorious plugin initialized. version: 2.7.17")}catch(t){console.error("[MedEngine] Failed to initialize Annotorious:",t)}}loadAIMarks(e=[],n=!1){this.clearAIMarks();this.viewer.world.getItemAt(0)&&e.forEach(e=>{var r=document.createElement("div");if(r.classList.add("ld-ai-box"),e.style&&Object.assign(r.style,e.style),n){let t=document.createElement("div");t.className="celltext",t.style.position="absolute",t.style.right="102%",t.style.top="0",t.style.color="#333",t.style.background="#F5F5F5",t.style.opacity="0.7",t.style.width="max-content",t.style.padding="5px",t.style.borderRadius="8px",e.labels.forEach(e=>{const n=e.style||{};t.innerHTML+=`<div style="${Object.entries(n).map(([e,t])=>`${e}:${t}`).join(";")}">${e.label} : ${e.value}</div>`}),r.appendChild(t)}const o=new t.Rect(e.x,e.y,e.width,e.height),i=this.viewer.viewport.imageToViewportRectangle(o);this.viewer.addOverlay({element:r,location:i,checkResize:!0})})}updateAIMarks(e=[],t=!1){this.loadAIMarks(e,t)}clearAIMarks(){Array.from(document.getElementsByClassName("ld-ai-box")).forEach(e=>{this.viewer.removeOverlay(e)})}loadSelectionBox(e=[]){Array.from(document.getElementsByClassName("ld-selection-box")).forEach(e=>{this.viewer.removeOverlay(e)}),e.forEach(e=>{let n=document.createElement("div");n.classList.add("ld-selection-box"),e.style&&Object.assign(n.style,e.style);const r=this.viewer.world.getItemAt(0).getContentSize(),o=e.x/r.x,i=e.y/r.y,a=e.width/r.x,s=e.height/r.y;this.viewer.addOverlay({element:n,location:new t.Rect(o,i,a,s)})})}addHandler(e,t){this.events.has(e)||this.events.set(e,new Set),this.events.get(e).add(t)}addOnceHandler(e,t){const n=(...r)=>{t(...r),this.removeHandler(e,n)};this.addHandler(e,n)}removeHandler(e,t){var n;null==(n=this.events.get(e))||n.delete(t)}emit(e,t){var n;null==(n=this.events.get(e))||n.forEach(e=>e(t))}destroy(){var e,t,n,r,o;null==(e=this.anno)||e.destroy(),null==(t=this.toolbar)||t.destroy(),null==(n=this.selection)||n.destroy(),null==(r=this.scalebar)||r.destroy(),null==(o=this.colorAdjust)||o.destroy(),this.viewer.destroy()}setLocale(e){J(e),this.options.locale=e,this.anno&&this.anno.setLocale(e),this.selection&&this.selection.updateLocale(),this.toolbar,console.log(`[MedEngine] Locale changed to ${e}`)}}"undefined"!=typeof window&&(window.MedViewerSDK={MedViewerEngine:ue,AnnoAnnotator:f,MedToolbar:le,SelectionPlugin:oe,ColorAdjustPlugin:d,MagnificationPlugin:$}),e.AnnoAnnotator=f,e.ColorAdjustPlugin=d,e.MagnificationPlugin=$,e.MagnificationPosition=K,e.MagnificationType=q,e.MedToolbar=le,e.MedViewerEngine=ue,e.ScalebarLocation=te,e.ScalebarType=ee,e.SelectionPlugin=oe,e.ToolbarPosition=ie,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|