med-viewer-sdk 0.1.0
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/README.md +253 -0
- package/dist/adapters/vue/MedViewer.d.ts +17 -0
- package/dist/adapters/vue/index.d.ts +2 -0
- package/dist/core/AnnoAnnotator.d.ts +15 -0
- package/dist/core/BaseAnnotator.d.ts +33 -0
- package/dist/core/ColorAdjustPlugin.d.ts +29 -0
- package/dist/core/Coords.d.ts +6 -0
- package/dist/core/Engine.d.ts +57 -0
- package/dist/core/KonvaAnnotator.d.ts +36 -0
- package/dist/core/Scalebar.d.ts +42 -0
- package/dist/core/SelectionPlugin.d.ts +102 -0
- package/dist/core/Toolbar.d.ts +32 -0
- package/dist/med-viewer-sdk.d.ts +6 -0
- package/dist/med-viewer-sdk.mjs +14248 -0
- package/dist/med-viewer-sdk.umd.js +2 -0
- package/dist/style.css +1 -0
- package/package.json +34 -0
- package/src/adapters/vue/MedViewer.ts +37 -0
- package/src/adapters/vue/index.ts +4 -0
- package/src/assets/icons/button_grouphover.png +0 -0
- package/src/assets/icons/button_hover.png +0 -0
- package/src/assets/icons/button_pressed.png +0 -0
- package/src/assets/icons/button_rest.png +0 -0
- package/src/assets/icons/flip_grouphover.png +0 -0
- package/src/assets/icons/flip_hover.png +0 -0
- package/src/assets/icons/flip_pressed.png +0 -0
- package/src/assets/icons/flip_rest.png +0 -0
- package/src/assets/icons/fullpage_grouphover.png +0 -0
- package/src/assets/icons/fullpage_hover.png +0 -0
- package/src/assets/icons/fullpage_pressed.png +0 -0
- package/src/assets/icons/fullpage_rest.png +0 -0
- package/src/assets/icons/home_grouphover.png +0 -0
- package/src/assets/icons/home_hover.png +0 -0
- package/src/assets/icons/home_pressed.png +0 -0
- package/src/assets/icons/home_rest.png +0 -0
- package/src/assets/icons/next_grouphover.png +0 -0
- package/src/assets/icons/next_hover.png +0 -0
- package/src/assets/icons/next_pressed.png +0 -0
- package/src/assets/icons/next_rest.png +0 -0
- package/src/assets/icons/previous_grouphover.png +0 -0
- package/src/assets/icons/previous_hover.png +0 -0
- package/src/assets/icons/previous_pressed.png +0 -0
- package/src/assets/icons/previous_rest.png +0 -0
- package/src/assets/icons/rotateleft_grouphover.png +0 -0
- package/src/assets/icons/rotateleft_hover.png +0 -0
- package/src/assets/icons/rotateleft_pressed.png +0 -0
- package/src/assets/icons/rotateleft_rest.png +0 -0
- package/src/assets/icons/rotateright_grouphover.png +0 -0
- package/src/assets/icons/rotateright_hover.png +0 -0
- package/src/assets/icons/rotateright_pressed.png +0 -0
- package/src/assets/icons/rotateright_rest.png +0 -0
- package/src/assets/icons/selection_cancel_grouphover.png +0 -0
- package/src/assets/icons/selection_cancel_hover.png +0 -0
- package/src/assets/icons/selection_cancel_pressed.png +0 -0
- package/src/assets/icons/selection_cancel_rest.png +0 -0
- package/src/assets/icons/selection_confirm_grouphover.png +0 -0
- package/src/assets/icons/selection_confirm_hover.png +0 -0
- package/src/assets/icons/selection_confirm_pressed.png +0 -0
- package/src/assets/icons/selection_confirm_rest.png +0 -0
- package/src/assets/icons/selection_grouphover.png +0 -0
- package/src/assets/icons/selection_hover.png +0 -0
- package/src/assets/icons/selection_pressed.png +0 -0
- package/src/assets/icons/selection_rest.png +0 -0
- package/src/assets/icons/tool_anno.png +0 -0
- package/src/assets/icons/tool_selection.png +0 -0
- package/src/assets/icons/zoomin_grouphover.png +0 -0
- package/src/assets/icons/zoomin_hover.png +0 -0
- package/src/assets/icons/zoomin_pressed.png +0 -0
- package/src/assets/icons/zoomin_rest.png +0 -0
- package/src/assets/icons/zoomout_grouphover.png +0 -0
- package/src/assets/icons/zoomout_hover.png +0 -0
- package/src/assets/icons/zoomout_pressed.png +0 -0
- package/src/assets/icons/zoomout_rest.png +0 -0
- package/src/core/AnnoAnnotator.ts +102 -0
- package/src/core/BaseAnnotator.ts +43 -0
- package/src/core/ColorAdjustPlugin.ts +256 -0
- package/src/core/Coords.ts +9 -0
- package/src/core/Engine.ts +246 -0
- package/src/core/KonvaAnnotator.ts +185 -0
- package/src/core/Scalebar.ts +87 -0
- package/src/core/SelectionPlugin.ts +252 -0
- package/src/core/Toolbar.ts +370 -0
- package/src/index.ts +21 -0
- package/src/plugins/ShapeLabelsFormatter.js +435 -0
- package/src/plugins/openseadragon-scalebar.js +592 -0
- package/src/plugins/openseadragon-selection.js +657 -0
- package/src/types/type.d.ts +9 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("openseadragon"),require("konva")):"function"==typeof define&&define.amd?define(["exports","openseadragon","konva"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).MedViewerSDK={},e.OpenSeadragon,e.Konva)}(this,function(e,t,n){"use strict";var r=Object.defineProperty,o=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class i{constructor(e){o(this,"engine"),o(this,"isEnabled",!1),this.engine=e}}class a extends i{constructor(e){super(e),o(this,"stage"),o(this,"layer"),o(this,"overlay"),o(this,"isDrawing",!1),o(this,"currentShape",null),o(this,"currentTool",null),o(this,"startPoint",{x:0,y:0});const t=this.engine.viewer.element;this.overlay=document.createElement("div"),this.overlay.className="konva-annotator-overlay",this.overlay.style.cssText="\n position: absolute;\n top: 0; left: 0;\n width: 100%; height: 100%;\n pointer-events: none;\n z-index: 10;\n ",t.appendChild(this.overlay),this.stage=new n.Stage({container:this.overlay,width:t.clientWidth,height:t.clientHeight}),this.layer=new n.Layer,this.stage.add(this.layer),this.initDrawingEvents()}setEnabled(e){this.isEnabled=e,this.overlay.style.pointerEvents=e?"auto":"none",this.engine.viewer.setMouseNavEnabled(!e),e?this.stage.container().style.cursor="crosshair":(this.stage.container().style.cursor="default",this.setTool(null))}setTool(e){this.currentTool=e}initDrawingEvents(){this.stage.on("mousedown touchstart",e=>{if(!this.isEnabled||!this.currentTool)return;this.isDrawing=!0;const t=this.getRelativePointerPosition();this.startPoint=t,"rect"===this.currentTool&&(this.currentShape=new n.Rect({x:t.x,y:t.y,width:0,height:0,stroke:"#00ff00",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0})),this.currentShape&&this.layer.add(this.currentShape)}),this.stage.on("mousemove touchmove",()=>{if(!this.isDrawing||!this.currentShape)return;const e=this.getRelativePointerPosition();if("rect"===this.currentTool){const t=this.currentShape;t.width(e.x-this.startPoint.x),t.height(e.y-this.startPoint.y)}this.layer.batchDraw()}),this.stage.on("mouseup touchend",()=>{this.isDrawing=!1,this.currentShape=null})}getRelativePointerPosition(){const e=this.stage.getAbsoluteTransform().copy().invert(),t=this.stage.getPointerPosition()||{x:0,y:0};return e.point(t)}getAnnotations(){return this.layer.getChildren().map(e=>e.toObject())}setAnnotations(e){this.clear(),e.forEach(e=>{const t=n.Node.create(e);this.layer.add(t)}),this.layer.draw()}clear(){this.layer.destroyChildren(),this.layer.draw()}destroy(){this.stage.destroy(),this.overlay.remove()}}function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u,s={exports:{}};
|
|
2
|
+
/*! For license information please see openseadragon-annotorious.min.js.LICENSE.txt */self,u=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 l=n(6512),u=n(5762),s=n(7858),c=n(7405),f="autosize:resized",p=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&&s(e.textarea)}):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener(f,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(f,this.onResize),s.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),u=a(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,c=n&&s?s*n:null;return l.createElement("textarea",i({},u,{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&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:u.number,maxRows:u.number,onResize:u.func,innerRef:u.any,async:u.bool},t}(l.Component);t.TextareaAutosize=l.forwardRef(function(e,t){return l.createElement(p,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,l=Array.prototype.concat,u=n(3423),s=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;s?u(e,t,n,!0):u(e,t,n)},f=function(e,t){var n=arguments.length>2?arguments[2]:{},r=o(t);i&&(r=l.call(r,Object.getOwnPropertySymbols(t)));for(var a=0;a<r.length;a+=1)c(e,r[a],t[r[a]],n[r[a]])};f.supportsDescriptors=!!s,e.exports=f},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),l=s(a),u=s(n(5762));function s(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},f=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=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},y=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&&(p(e,this.sizer),this.placeHolderSizer&&p(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?l.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,f.forEach(function(e){return delete n[e]}),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=r,l.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),l.default.createElement("input",o({},i,{ref:this.inputRef})),l.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?l.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(a.Component);y.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},y.defaultProps={minWidth:1,injectStyles:!0},t.A=y},1742(e,t,n){var r=n(986),o=n(8953),i=n(9990),a=n(8087),l=n(889),u=o(a(),Object);r(u,{getPolyfill:a,implementation:i,shim:l}),e.exports=u},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,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,m=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,S=r?Symbol.for("react.scope"):60119;function A(e){if("object"===n(e)&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case p:case a:case u:case l:case h:return e;default:switch(e=e&&e.$$typeof){case c:case d:case b:case m:case s:return e;default:return t}}case i:return t}}}function O(e){return A(e)===p}t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=s,t.Element=o,t.ForwardRef=d,t.Fragment=a,t.Lazy=b,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=l,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||A(e)===f},t.isConcurrentMode=O,t.isContextConsumer=function(e){return A(e)===c},t.isContextProvider=function(e){return A(e)===s},t.isElement=function(e){return"object"===n(e)&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return A(e)===d},t.isFragment=function(e){return A(e)===a},t.isLazy=function(e){return A(e)===b},t.isMemo=function(e){return A(e)===m},t.isPortal=function(e){return A(e)===i},t.isProfiler=function(e){return A(e)===u},t.isStrictMode=function(e){return A(e)===l},t.isSuspense=function(e){return A(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===u||e===l||e===h||e===y||"object"===n(e)&&null!==e&&(e.$$typeof===b||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===v||e.$$typeof===w||e.$$typeof===S||e.$$typeof===g)},t.typeOf=A},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 l=a[i];if(!e(n[l],r[l]))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=f(e,t,"px");return i({},(0,u.browserPrefixToKey)("transform",u.default),n)},t.createSVGTransform=function(e,t){return f(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,l.findInArray)(e.targetTouches,function(e){return t===e.identifier})||e.changedTouches&&(0,l.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=f,t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=(0,l.int)(n.paddingTop))-(0,l.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=(0,l.int)(n.paddingLeft))-(0,l.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,l.int)(n.borderTopWidth))+(0,l.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t+=(0,l.int)(n.borderLeftWidth))+(0,l.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(){p(e)}):p(e)};var l=n(658),u=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)),s="";function c(e,t){return s||(s=(0,l.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,l.isFunction)(e[t])})),!!(0,l.isFunction)(e[s])&&e[s](t)}function f(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),l="".concat("string"==typeof t.y?t.y:t.y+n);i="translate(".concat(a,", ").concat(l,")")+i}return i}function p(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),l=n(0,o.length-a.length),u=[],s=0;s<l;s++)u[s]="$"+s;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}(u)+"){ 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 l=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 l.name="Invariant Violation",l}}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),l=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 u=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],p=!!l&&l(e,t);if(o)o(e,t,{configurable:null===c&&p?p.configurable:!c,enumerable:null===u&&p?p.enumerable:!u,value:n,writable:null===s&&p?p.writable:!s});else{if(!f&&(u||s||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),l=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)?l(r.call(e)):l(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,l=n(9267),u=Object.prototype.propertyIsEnumerable,s=!u.call({toString:null},"toString"),c=u.call(function(){},"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=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{p(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=l(e),u=t&&"[object String]"===a.call(e),d=[];if(!t&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var y=c&&n;if(u&&e.length>0&&!i.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(o&&e.length>0)for(var b=0;b<e.length;++b)d.push(String(b));else for(var g in e)y&&"prototype"===g||!i.call(e,g)||d.push(String(g));if(s)for(var v=function(e){if("undefined"==typeof window||!h)return p(e);try{return p(e)}catch(t){return!1}}(e),w=0;w<f.length;++w)v&&"constructor"===f[w]||!i.call(e,f[w])||d.push(f[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,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(c){s=!0,o=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(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=u(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,l()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!e})()}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=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 f=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)),p=g(n(5762)),d=g(n(6512)),h=n(2503),y=n(6500),m=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"},S={start:"mousedown",move:"mousemove",stop:"mouseup"},A=S,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,y.getControlPosition)(t,o,e);if(null!=i){var a=i.x,l=i.y,u=(0,y.createCoreData)(e,a,l);(0,b.default)("DraggableCore: handleDragStart: %j",u),(0,b.default)("calling",e.props.onStart),!1!==e.props.onStart(t,u)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,h.addUserSelectStyles)(r),e.dragging=!0,e.lastX=a,e.lastY=l,(0,h.addEvent)(r,A.move,e.handleDrag),(0,h.addEvent)(r,A.stop,e.handleDragStop))}}}),v(e,"handleDrag",function(t){var n=(0,y.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,l=i-e.lastY,u=r((0,y.snapToGrid)(e.props.grid,a,l),2);if(a=u[0],l=u[1],!a&&!l)return;o=e.lastX+a,i=e.lastY+l}var s=(0,y.createCoreData)(e,o,i);if((0,b.default)("DraggableCore: handleDrag: %j",s),!1!==e.props.onDrag(t,s)&&!1!==e.mounted)e.lastX=o,e.lastY=i;else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(f){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,y.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,l=i-e.lastY||0,u=r((0,y.snapToGrid)(e.props.grid,a,l),2);a=u[0],l=u[1],o=e.lastX+a,i=e.lastY+l}var s=(0,y.createCoreData)(e,o,i);if(!1===e.props.onStop(t,s)||!1===e.mounted)return!1;var c=e.findDOMNode();c&&e.props.enableUserSelectHack&&(0,h.scheduleRemoveUserSelectStyles)(c.ownerDocument),(0,b.default)("DraggableCore: handleDragStop: %j",s),e.dragging=!1,e.lastX=NaN,e.lastY=NaN,c&&((0,b.default)("DraggableCore: Removing handlers"),(0,h.removeEvent)(c.ownerDocument,A.move,e.handleDrag),(0,h.removeEvent)(c.ownerDocument,A.stop,e.handleDragStop))}}}),v(e,"onMouseDown",function(t){return A=S,e.handleDragStart(t)}),v(e,"onMouseUp",function(t){return A=S,e.handleDragStop(t)}),v(e,"onTouchStart",function(t){return A=w,e.handleDragStart(t)}),v(e,"onTouchEnd",function(t){return A=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&&s(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,S.move,this.handleDrag),(0,h.removeEvent)(t,w.move,this.handleDrag),(0,h.removeEvent)(t,S.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 f.cloneElement(f.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}(f.Component);t.default=O,v(O,"displayName","DraggableCore"),v(O,"propTypes",{allowAnyClick:p.default.bool,allowMobileScroll:p.default.bool,children:p.default.node.isRequired,disabled:p.default.bool,enableUserSelectHack:p.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:p.default.arrayOf(p.default.number),handle:p.default.string,cancel:p.default.string,nodeRef:p.default.object,onStart:p.default.func,onDrag:p.default.func,onStop:p.default.func,onMouseDown:p.default.func,scale:p.default.number,className:m.dontSetMe,style:m.dontSetMe,transform:m.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},l={};function u(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=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);f&&(a=a.concat(f(n)));for(var l=u(t),y=u(n),m=0;m<a.length;++m){var b=a[m];if(!(i[b]||r&&r[b]||y&&y[b]||l&&l[b])){var g=p(n,b);try{s(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),l=n(1953),u=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new l("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,s=!0;if("length"in e&&a){var c=a(e,"length");c&&!c.configurable&&(r=!1),c&&!c.writable&&(s=!1)}return(r||s||!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,l=e.props.bounds;l="string"==typeof l?l:{left:(a=l).left,top:a.top,right:a.right,bottom:a.bottom};var u=i(e);if("string"==typeof l){var s,c=u.ownerDocument.defaultView;if(!((s="parent"===l?u.parentNode:u.getRootNode().querySelector(l))instanceof c.HTMLElement))throw new Error('Bounds selector "'+l+'" could not find an element.');var f=s,p=c.getComputedStyle(u),d=c.getComputedStyle(f);l={left:-u.offsetLeft+(0,r.int)(d.paddingLeft)+(0,r.int)(p.marginLeft),top:-u.offsetTop+(0,r.int)(d.paddingTop)+(0,r.int)(p.marginTop),right:(0,o.innerWidth)(f)-(0,o.outerWidth)(u)-u.offsetLeft+(0,r.int)(d.paddingRight)-(0,r.int)(p.marginRight),bottom:(0,o.innerHeight)(f)-(0,o.outerHeight)(u)-u.offsetTop+(0,r.int)(d.paddingBottom)-(0,r.int)(p.marginBottom)}}return(0,r.isNum)(l.right)&&(t=Math.min(t,l.right)),(0,r.isNum)(l.bottom)&&(n=Math.min(n,l.bottom)),(0,r.isNum)(l.left)&&(t=Math.max(t,l.left)),(0,r.isNum)(l.top)&&(n=Math.max(n,l.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),l=n.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,o.offsetXYFromParent)(r||e,l,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:()=>Ye,Component:()=>C,Fragment:()=>x,PureComponent:()=>Ge,StrictMode:()=>kt,Suspense:()=>Qe,SuspenseList:()=>Ke,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>vt,cloneElement:()=>xt,createContext:()=>Q,createElement:()=>A,createFactory:()=>St,createPortal:()=>tt,createRef:()=>E,default:()=>Dt,findDOMNode:()=>jt,flushSync:()=>Pt,forwardRef:()=>Ue,hydrate:()=>st,isElement:()=>It,isFragment:()=>Ot,isMemo:()=>Et,isValidElement:()=>At,lazy:()=>Xe,memo:()=>Be,render:()=>ut,startTransition:()=>Re,unmountComponentAtNode:()=>Ct,unstable_batchedUpdates:()=>Mt,useCallback:()=>me,useContext:()=>be,useDebugValue:()=>ge,useDeferredValue:()=>Te,useEffect:()=>fe,useErrorBoundary:()=>ve,useId:()=>we,useImperativeHandle:()=>he,useInsertionEffect:()=>_e,useLayoutEffect:()=>pe,useMemo:()=>ye,useReducer:()=>ce,useRef:()=>de,useState:()=>se,useSyncExternalStore:()=>Ie,useTransition:()=>Ne,version:()=>wt});var o,i,a,l,u,s,c,f,p,d,h,y,m={},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 S(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function A(e,t,n){var r,i,a,l={};for(a in t)"key"==a?r=t[a]:"ref"==a?i=t[a]:l[a]=t[a];if(arguments.length>2&&(l.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===l[a]&&(l[a]=e.defaultProps[a]);return O(e,l,r,i,null)}function O(e,t,n,r,o){var l={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(l),l}function E(){return{current:null}}function x(e){return e.children}function C(e,t){this.props=e,this.context=t}function j(e,t){if(null==t)return e.__?j(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?j(e):null}function M(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 M(e)}}function P(e){(!e.__d&&(e.__d=!0)&&l.push(e)&&!k.__r++||u!=i.debounceRendering)&&((u=i.debounceRendering)||s)(k)}function k(){for(var e,t,n,r,o,a,u,s=1;l.length;)l.length>s&&l.sort(c),e=l.shift(),s=l.length,e.__d&&(n=void 0,r=void 0,o=(r=(t=e).__v).__e,a=[],u=[],t.__P&&((n=w({},r)).__v=r.__v+1,i.vnode&&i.vnode(n),B(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,null==o?j(r):o,!!(32&r.__u),u),n.__v=r.__v,n.__.__k[n.__i]=n,H(a,n,u),r.__e=r.__=null,n.__e!=o&&M(n)));k.__r=0}function I(e,t,n,r,o,i,a,l,u,s,c){var f,p,d,h,y,g,w,S=r&&r.__k||b,A=t.length;for(u=function(e,t,n,r,o){var i,a,l,u,s,c=n.length,f=c,p=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,u=i+p,a.__=e,a.__b=e.__b+1,l=null,-1!=(s=a.__i=T(a,n,u,f))&&(f--,(l=n[s])&&(l.__u|=2)),null==l||null==l.__v?(-1==s&&(o>c?p--:o<c&&p++),"function"!=typeof a.type&&(a.__u|=4)):s!=u&&(s==u-1?p--:s==u+1?p++:(s>u?p--:p++,a.__u|=4))):e.__k[i]=null;if(f)for(i=0;i<c;i++)null!=(l=n[i])&&!(2&l.__u)&&(l.__e==r&&(r=j(l)),Y(l,l));return r}(n,t,S,u,A),f=0;f<A;f++)null!=(d=n.__k[f])&&(p=-1==d.__i?m:S[d.__i]||m,d.__i=f,g=B(e,d,p,o,i,a,l,u,s,c),h=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&z(p.ref,null,d),c.push(d.ref,d.__c||h,d)),null==y&&null!=h&&(y=h),(w=!!(4&d.__u))||p.__k===d.__k?u=D(d,u,e,w):"function"==typeof d.type&&void 0!==g?u=g:h&&(u=h.nextSibling),d.__u&=-7);return n.__e=y,u}function D(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=D(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=j(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(v(e)?e.some(function(e){R(e,t)}):t.push(e)),t}function T(e,t,n,r){var o,i,a,l=e.key,u=e.type,s=t[n],c=null!=s&&!(2&s.__u);if(null===s&&null==l||c&&l==s.key&&u==s.type)return n;if(r>(c?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(s=t[a=o>=0?o--:i++])&&!(2&s.__u)&&l==s.key&&u==s.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 _(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(f,"$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=p,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(l){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function G(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=p++;else if(t.t<n.u)return;return n(i.event?i.event(t):t)}}}function B(e,t,n,r,a,l,u,s,c,f){var p,d,h,y,b,g,A,O,E,M,P,k,D,R,T,N,G,B=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),l=[s=t.__e=n.__e]),(p=i.__b)&&p(t);e:if("function"==typeof B)try{if(O=t.props,E="prototype"in B&&B.prototype.render,M=(p=B.contextType)&&r[p.__c],P=p?M?M.props.value:p.__:r,n.__c?A=(d=t.__c=n.__c).__=d.__E:(E?t.__c=d=new B(O,P):(t.__c=d=new C(O,P),d.constructor=B,d.render=F),M&&M.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!=B.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=w({},d.__s)),w(d.__s,B.getDerivedStateFromProps(O,d.__s))),y=d.props,b=d.state,d.__v=t,h)E&&null==B.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),E&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(E&&null==B.getDerivedStateFromProps&&O!==y&&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)}),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[],d.__h.length&&u.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(O,d.__s,P),E&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(y,b,g)})}if(d.context=P,d.props=O,d.__P=e,d.__e=!1,D=i.__r,R=0,E){for(d.state=d.__s,d.__d=!1,D&&D(t),p=d.render(d.props,d.state,d.context),T=0;T<d._sb.length;T++)d.__h.push(d._sb[T]);d._sb=[]}else do{d.__d=!1,D&&D(t),p=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++R<25);d.state=d.__s,null!=d.getChildContext&&(r=w(w({},r),d.getChildContext())),E&&!h&&null!=d.getSnapshotBeforeUpdate&&(g=d.getSnapshotBeforeUpdate(y,b)),N=p,null!=p&&p.type===x&&null==p.key&&(N=U(p.props.children)),s=I(e,v(N)?N:[N],t,n,r,a,l,u,s,c,f),d.base=t.__e,t.__u&=-161,d.__h.length&&u.push(d),A&&(d.__E=d.__=null)}catch(H){if(t.__v=null,c||null!=l)if(H.then){for(t.__u|=c?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;l[l.indexOf(s)]=null,t.__e=s}else{for(G=l.length;G--;)S(l[G]);L(t)}else t.__e=n.__e,t.__k=n.__k,H.then||L(t);i.__e(H,t,n)}else null==l&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=function(e,t,n,r,a,l,u,s,c){var f,p,d,h,y,b,g,w=n.props||m,A=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!=l)for(f=0;f<l.length;f++)if((y=l[f])&&"setAttribute"in y==!!O&&(O?y.localName==O:3==y.nodeType)){e=y,l[f]=null;break}if(null==e){if(null==O)return document.createTextNode(A);e=document.createElementNS(a,O,A.is&&A),s&&(i.__m&&i.__m(t,l),s=!1),l=null}if(null==O)w===A||s&&e.data==A||(e.data=A);else{if(l=l&&o.call(e.childNodes),!s&&null!=l)for(w={},f=0;f<e.attributes.length;f++)w[(y=e.attributes[f]).name]=y.value;for(f in w)if(y=w[f],"children"==f);else if("dangerouslySetInnerHTML"==f)d=y;else if(!(f in A)){if("value"==f&&"defaultValue"in A||"checked"==f&&"defaultChecked"in A)continue;_(e,f,null,y,a)}for(f in A)y=A[f],"children"==f?h=y:"dangerouslySetInnerHTML"==f?p=y:"value"==f?b=y:"checked"==f?g=y:s&&"function"!=typeof y||w[f]===y||_(e,f,y,w[f],a);if(p)s||d&&(p.__html==d.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(d&&(e.innerHTML=""),I("template"==t.type?e.content:e,v(h)?h:[h],t,n,r,"foreignObject"==O?"http://www.w3.org/1999/xhtml":a,l,u,l?l[0]:n.__k&&j(n,0),s,c),null!=l)for(f=l.length;f--;)S(l[f]);s||(f="value","progress"==O&&null==b?e.removeAttribute("value"):null!=b&&(b!==e[f]||"progress"==O&&!b||"option"==O&&b!=w[f])&&_(e,f,b,w[f],a),f="checked",null!=g&&g!=e[f]&&_(e,f,g,w[f],a))}return e}(n.__e,t,n,r,a,l,u,c,f);return(p=i.diffed)&&p(t),128&t.__u?void 0:s}function L(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(L)}function H(e,t,n){for(var r=0;r<n.length;r++)z(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 U(e){return"object"!=r(e)||null==e||e.__b&&e.__b>0?e:v(e)?e.map(U):w({},e)}function z(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 Y(e,t,n){var r,o;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||z(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]&&Y(r[o],t,n||"function"!=typeof e.type);n||S(e.__e),e.__c=e.__=e.__e=void 0}function F(e,t,n){return this.constructor(e,n)}function V(e,t,n){var r,a,l,u;t==document&&(t=document.documentElement),i.__&&i.__(e,t),a=(r="function"==typeof n)?null:n&&n.__k||t.__k,l=[],u=[],B(t,e=(!r&&n||t).__k=A(x,null,[e]),a||m,m,t.namespaceURI,!r&&n?[n]:a?null:t.firstChild?o.call(t.childNodes):null,l,!r&&n?n:a?a.__e:t.firstChild,r,u),H(l,e,u)}function W(e,t){V(e,t,W)}function J(e,t,n){var r,i,a,l,u=w({},e.props);for(a in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)"key"==a?r=t[a]:"ref"==a?i=t[a]:u[a]=void 0===t[a]&&null!=l?l[a]:t[a];return arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):n),O(e.type,u,r||e.key,i||e.ref,null)}function Q(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"+y++,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(l){e=l}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,l=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,f=/(PointerCapture)$|Capture$/i,p=0,d=G(!1),h=G(!0),y=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,le=te.__;function ue(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 se(e){return $=1,ce(je,e)}function ce(e,t,n){var r=ue(Z++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):je(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 fe(e,t){var n=ue(Z++,3);!te.__s&&Ce(n.__H,t)&&(n.__=e,n.u=t,X.__H.__h.push(n))}function pe(e,t){var n=ue(Z++,4);!te.__s&&Ce(n.__H,t)&&(n.__=e,n.u=t,X.__h.push(n))}function de(e){return $=5,ye(function(){return{current:e}},[])}function he(e,t,n){$=6,pe(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 ye(e,t){var n=ue(Z++,7);return Ce(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function me(e,t){return $=8,ye(function(){return e},t)}function be(e){var t=X.context[e.__c],n=ue(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=ue(Z++,10),n=se();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=ue(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 Se(){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),le&&le(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)(Se)),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 Ae="function"==typeof requestAnimationFrame;function Oe(e){var t,n=function(){clearTimeout(r),Ae&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ae&&(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 je(e,t){return"function"==typeof t?t(e):t}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 Pe(e,t){for(var n in t)e[n]=t[n];return e}function ke(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 Ie(e,t){var n=t(),r=se({t:{__:n,u:t}}),o=r[0].t,i=r[1];return pe(function(){o.__=n,o.u=t,De(o)&&i({t:o})},[e,n,t]),fe(function(){return De(o)&&i({t:o}),e(function(){De(o)&&i({t:o})})},[e]),n}function De(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 Re(e){e()}function Te(e){return e}function Ne(){return[!1,Re]}var _e=pe;function Ge(e,t){this.props=e,this.context=t}function Be(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:ke(this.props,e)}function r(t){return this.shouldComponentUpdate=n,A(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Ge.prototype=new C).isPureReactComponent=!0,Ge.prototype.shouldComponentUpdate=function(e,t){return ke(this.props,e)||ke(this.state,t)};var Le=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Le&&Le(e)};var He="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ue(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 ze=function(e,t){return null==e?null:R(R(e).map(t))},Ye={map:ze,forEach:ze,count:function(e){return e?R(e).length:0},only:function(e){var t=R(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:R},Fe=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);Fe(e,t,n,r)};var Ve=i.unmount;function We(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 We(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 Qe(){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?A(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)},(Qe.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(l):l())};n.__R=a;var l=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)},Qe.prototype.componentWillUnmount=function(){this.o=[]},Qe.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]=We(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&A(x,null,e.fallback);return o&&(o.__u&=-33),[A(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(A($e,{context:t.context},e.__v),t.v)}function tt(e,t){var n=A(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=R(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,lt=function(e){return("undefined"!=typeof Symbol&&"symbol"==Me(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};function ut(e,t,n){return null==t.__k&&(t.textContent=""),V(e,t),"function"==typeof n&&n(),e?e.__c:null}function st(e,t,n){return W(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 ft(){}function pt(){return this.cancelBubble}function dt(){return this.defaultPrevented}i.event=function(e){return ct&&(e=ct(e)),e.persist=ft,e.isPropagationStopped=pt,e.isDefaultPrevented=dt,e.nativeEvent=e};var ht,yt={enumerable:!1,configurable:!0,get:function(){return this.class}},mt=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 l=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===a?a="":"translate"===l&&"no"===a?a=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||lt(t.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":ot.test(i)&&(i=l):l=i="oninput":o&&rt.test(i)?i=i.replace(it,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===l&&r[i=l]&&(i="oninputCapture"),r[i]=a}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=R(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=R(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",yt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=nt,mt&&mt(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:me,useContext:be,useDebugValue:ge,useDeferredValue:Te,useEffect:fe,useId:we,useImperativeHandle:he,useInsertionEffect:_e,useLayoutEffect:pe,useMemo:ye,useReducer:ce,useRef:de,useState:se,useSyncExternalStore:Ie,useTransition:Ne}}},wt="18.3.1";function St(e){return A.bind(null,e)}function At(e){return!!e&&e.$$typeof===nt}function Ot(e){return At(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 At(e)?J.apply(null,arguments):e}function Ct(e){return!!e.__k&&(V(null,e),!0)}function jt(e){return e&&(e.base||1===e.nodeType&&e)||null}var Mt=function(e,t){return e(t)},Pt=function(e,t){return e(t)},kt=x,It=At,Dt={useState:se,useId:we,useReducer:ce,useEffect:fe,useLayoutEffect:pe,useInsertionEffect:_e,useTransition:Ne,useDeferredValue:Te,useSyncExternalStore:Ie,startTransition:Re,useRef:de,useImperativeHandle:he,useMemo:ye,useCallback:me,useContext:be,useDebugValue:ge,version:"18.3.1",Children:Ye,render:ut,hydrate:st,unmountComponentAtNode:Ct,createPortal:tt,createElement:A,createContext:Q,createFactory:St,cloneElement:xt,createRef:E,Fragment:x,isValidElement:At,isElement:At,isFragment:Ot,isMemo:Et,findDOMNode:jt,Component:C,PureComponent:Ge,memo:Be,forwardRef:Ue,flushSync:Pt,unstable_batchedUpdates:Mt,StrictMode:x,Suspense:Qe,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 дней"),l=n.bind(null,"неделю","%s неделю","%s недели","%s недель"),u=n.bind(null,"месяц","%s месяц","%s месяца","%s месяцев"),s=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[l(e)+" назад","через "+l(e)];case 10:case 11:return[u(e)+" назад","через "+u(e)];case 12:case 13:return[s(e)+" назад","через "+s(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),l=function(e){i(!1,e)},u=String.prototype.replace,s=String.prototype.split,c="||||",f=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},p={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:f,chinese:function(){return 0},croatian:f,french:function(e){return e>=2?1:0},german:function(e){return 1!==e?1:0},russian:f,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:f},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,y=(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],l=0;l<a.length;l+=1)t[a[l]]=i;return t}(e.pluralTypeToLanguages))[n]||r[s.call(n,/-/,1)[0]]||r.en)&&(h[t]=i)),i}),m=/%\{(.*?)\}/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 l,f,d,h=e,b=r||m,g=i||u,v="number"==typeof t?{smart_count:t}:t;if(null!=v.smart_count&&e){var w=o||p,S=s.call(e,c),A=(l=w,f=y(w,n||"en"),d=v.smart_count,l.pluralTypes[f](d));h=u.call(S[A]||S[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||l,this.replaceImplementation=t.replace||u,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||p}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],l=n[i][1],u=t?t+"."+a:a;"object"===r(l)?this.extend(l,u):this.phrases[u]=l}},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],l=n[i][1],u=t?t+"."+a:a;"object"===r(l)?this.unset(l,u):delete this.phrases[u]}},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 l=i-o+1,u=r-o+1,s=Math.log(l),c=.5*Math.exp(2*s/3),f=.5*Math.sqrt(s*c*(l-c)/l)*(u-l/2<0?-1:1);e(n,r,Math.max(o,Math.floor(r-u*c/l+f)),Math.min(i,Math.floor(r+(l-u)*c/l+f)),a)}var p=n[r],d=o,h=i;for(t(n,o,r),a(n[i],p)>0&&t(n,o,i);d<h;){for(t(n,d,h),d++,h--;a(n[d],p)<0;)d++;for(;a(n[h],p)>0;)h--}0===a(n[o],p)?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];l(o,e.leaf?r(a):a)}return o}function l(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 u(e,t){return e.minX-t.minX}function s(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(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 y(t,n,r,o,i){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=o)){var l=n+Math.ceil((r-n)/o/2)*o;e(t,l,n,r,i),a.push(n,l,l,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],l=t.leaf?r(a):a;d(e,l)&&(t.leaf?n.push(a):p(e,l)?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||p(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,l=this.toBBox(e),u=[],s=[];a||u.length;){if(a||(a=u.pop(),r=u[u.length-1],n=s.pop(),i=!0),a.leaf){var c=o(e,a.children,t);if(-1!==c)return a.children.splice(c,1),u.push(a),this._condense(u),this}i||a.leaf||!p(a,l)?r?(n++,a=r.children[n],i=!1):a=null:(u.push(a),s.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,l=this._maxEntries;if(a<=l)return i(o=h(e.slice(t,n+1)),this.toBBox),o;r||(r=Math.ceil(Math.log(a)/Math.log(l)),l=Math.ceil(a/Math.pow(l,r-1))),(o=h([])).leaf=!1,o.height=r;var u=Math.ceil(a/l),s=u*Math.ceil(Math.sqrt(l));y(e,t,n,s,this.compareMinX);for(var c=t;c<=n;c+=s){var f=Math.min(c+s-1,n);y(e,c,f,u,this.compareMinY);for(var p=c;p<=f;p+=u){var d=Math.min(p+u-1,f);o.children.push(this._build(e,p,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,l=0;l<t.children.length;l++){var u=t.children[l],s=c(u),f=(p=e,d=u,(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-s);f<i?(i=f,o=s<o?s:o,a=u):f===i&&s<o&&(o=s,a=u)}t=a||t.children[0]}var p,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),l(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),l=h(n.children.splice(a,n.children.length-a));l.height=n.height,l.leaf=n.leaf,i(n,this.toBBox),i(l,this.toBBox),t?e[t-1].children.push(l):this._splitRoot(n,l)},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,l,u,s,f,p=1/0,d=1/0,h=t;h<=n-t;h++){var y=a(e,0,h,this.toBBox),m=a(e,h,n,this.toBBox),b=(o=y,i=m,l=Math.max(o.minX,i.minX),u=Math.max(o.minY,i.minY),s=Math.min(o.maxX,i.maxX),f=Math.min(o.maxY,i.maxY),Math.max(0,s-l)*Math.max(0,f-u)),g=c(y)+c(m);b<p?(p=b,r=h,d=g<d?g:d):b===p&&g<d&&(d=g,r=h)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:u,o=e.leaf?this.compareMinY:s;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),u=a(e,n-t,n,o),s=f(i)+f(u),c=t;c<n-t;c++){var p=e.children[c];l(i,e.leaf?o(p):p),s+=f(i)}for(var d=n-t-1;d>=t;d--){var h=e.children[d];l(u,e.leaf?o(h):h),s+=f(u)}return s},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)l(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 l=r(e,"font-size");a.style.fontSize=l,a.style.padding="0px",a.style.border="0px";var u=document.body;u.appendChild(a),n=a.offsetHeight,u.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(s){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 l(e){var t=o.get(e);t&&t.update()}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((u=function(e){return e}).destroy=function(e){return e},u.update=function(e){return e}):((u=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,l=function(){t.clientWidth!==r&&p()},u=function(e){window.removeEventListener("resize",l,!1),t.removeEventListener("input",p,!1),t.removeEventListener("keyup",p,!1),t.removeEventListener("autosize:destroy",u,!1),t.removeEventListener("autosize:update",p,!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",u,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",p,!1),window.addEventListener("resize",l,!1),t.addEventListener("input",p,!1),t.addEventListener("autosize:update",p,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",o.set(t,{destroy:u,update:p}),"vertical"===(s=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===s.resize&&(t.style.resize="horizontal"),n="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(n)&&(n=0),p()}var s;function c(e){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,t.style.overflowY=e}function f(){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 p(){f();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"),f(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==r.overflowY&&(c("hidden"),f(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),a!==o){a=o;var l=i("autosize:resized");try{t.dispatchEvent(l)}catch(e){}}}}(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},u.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=u,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),l=n(15),u=n(2104),s=n(6076),c=n(1226),f=n(1953),p=n(7047),d=n(4940),h=n(4218),y=n(9406),m=n(8624),b=n(6114),g=n(7548),v=n(9063),w=Function,S=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(t){}},A=n(3581),O=n(5049),E=function(){throw new f},x=A?function(){try{return E}catch(e){try{return A(arguments,"callee").get}catch(t){return E}}}():E,C=n(377)(),j=n(5586),M=n(9302),P=n(1622),k=n(7052),I=n(5118),D={},R="undefined"!=typeof Uint8Array&&j?j(Uint8Array):o,T={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?o:ArrayBuffer,"%ArrayIteratorPrototype%":C&&j?j([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%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%":l,"%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%":D,"%Int8Array%":"undefined"==typeof Int8Array?o:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?o:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&j?j(j([][Symbol.iterator]())):o,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":r(JSON))?JSON:o,"%Map%":"undefined"==typeof Map?o:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&C&&j?j((new Map)[Symbol.iterator]()):o,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":A,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?o:Promise,"%Proxy%":"undefined"==typeof Proxy?o:Proxy,"%RangeError%":u,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?o:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?o:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&C&&j?j((new Set)[Symbol.iterator]()):o,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&j?j(""[Symbol.iterator]()):o,"%Symbol%":C?Symbol:o,"%SyntaxError%":c,"%ThrowTypeError%":x,"%TypedArray%":R,"%TypeError%":f,"%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%":p,"%WeakMap%":"undefined"==typeof WeakMap?o:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?o:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?o:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":k,"%Object.defineProperty%":O,"%Object.getPrototypeOf%":M,"%Math.abs%":d,"%Math.floor%":h,"%Math.max%":y,"%Math.min%":m,"%Math.pow%":b,"%Math.round%":g,"%Math.sign%":v,"%Reflect.getPrototypeOf%":P};if(j)try{null.error}catch(Q){var N=j(j(Q));T["%Error.prototype%"]=N}var _=function e(t){var n;if("%AsyncFunction%"===t)n=S("async function () {}");else if("%GeneratorFunction%"===t)n=S("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=S("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&j&&(n=j(o.prototype))}return T[t]=n,n},G={__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"]},B=n(5465),L=n(863),H=B.call(I,Array.prototype.concat),U=B.call(k,Array.prototype.splice),z=B.call(I,String.prototype.replace),Y=B.call(I,String.prototype.slice),F=B.call(I,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,J=function(e,t){var n,r=e;if(L(G,r)&&(r="%"+(n=G[r])[0]+"%"),L(T,r)){var o=T[r];if(o===D&&(o=_(r)),void 0===o&&!t)throw new f("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 f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new f('"allowMissing" argument must be a boolean');if(null===F(/^%?[^%]*%?$/,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=Y(e,0,1),n=Y(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 z(e,V,function(e,t,n,o){r[r.length]=n?z(o,W,"$1"):t||e}),r}(e),r=n.length>0?n[0]:"",o=J("%"+r+"%",t),i=o.name,a=o.value,l=!1,u=o.alias;u&&(r=u[0],U(n,H([0,1],u)));for(var s=1,p=!0;s<n.length;s+=1){var d=n[s],h=Y(d,0,1),y=Y(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===y||"'"===y||"`"===y)&&h!==y)throw new c("property names with quotes must have matching quotes");if("constructor"!==d&&p||(l=!0),L(T,i="%"+(r+="."+d)+"%"))a=T[i];else if(null!=a){if(!(d in a)){if(!t)throw new f("base intrinsic for "+e+" exists, but the property is not available.");return}if(A&&s+1>=n.length){var m=A(a,d);a=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[d]}else p=L(a,d),a=a[d];p&&!l&&(T[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=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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 u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(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=p(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,f()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!e})()}function p(e){return(p=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 A.default}}),t.default=void 0;var y=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)),m=E(n(5762)),b=E(n(6512)),g=n(8474),v=n(2503),w=n(6500),S=n(658),A=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 j=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,u=i.y;i.x+=n.state.slackX,i.y+=n.state.slackY;var s=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=[],l=!0,u=!1;try{for(o=(t=t.call(e)).next;!(l=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);l=!0);}catch(s){u=!0,r=s}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}(r)||function(e){if(e){if("string"==typeof e)return l(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)?l(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=s[0],f=s[1];i.x=c,i.y=f,i.slackX=n.state.slackX+(a-i.x),i.slackY=n.state.slackY+(u-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,s=[{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,l=e.defaultClassNameDragging,u=e.defaultClassNameDragged,s=e.position,c=e.positionOffset,f=(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)),p={},d=null,h=!Boolean(s)||this.state.dragging,m=s||n,b={x:(0,w.canDragX)(this)&&h?this.state.x:m.x,y:(0,w.canDragY)(this)&&h?this.state.y:m.y};this.state.isElementSVG?d=(0,v.createSVGTransform)(b,c):p=(0,v.createCSSTransform)(b,c);var S=(0,g.clsx)(t.props.className||"",o,a(a({},l,this.state.dragging),u,this.state.dragged));return y.createElement(A.default,x({},f,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),y.cloneElement(y.Children.only(t),{className:S,style:i(i({},t.props.style),p),transform:d}))}}])&&u(n.prototype,o),s&&u(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,s}(y.Component);t.default=j,C(j,"displayName","Draggable"),C(j,"propTypes",i(i({},A.default.propTypes),{},{axis:m.default.oneOf(["both","x","y","none"]),bounds:m.default.oneOfType([m.default.shape({left:m.default.number,right:m.default.number,top:m.default.number,bottom:m.default.number}),m.default.string,m.default.oneOf([!1])]),defaultClassName:m.default.string,defaultClassNameDragging:m.default.string,defaultClassNameDragged:m.default.string,defaultPosition:m.default.shape({x:m.default.number,y:m.default.number}),positionOffset:m.default.shape({x:m.default.oneOfType([m.default.number,m.default.string]),y:m.default.oneOfType([m.default.number,m.default.string])}),position:m.default.shape({x:m.default.number,y:m.default.number}),className:S.dontSetMe,style:S.dontSetMe,transform:S.dontSetMe})),C(j,"defaultProps",i(i({},A.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 l=!!o&&a&&a(Object.prototype,"__proto__"),u=Object,s=u.getPrototypeOf;e.exports=l&&"function"==typeof l.get?i([l.get]):"function"==typeof s&&function(e){return s(null==e?e:u(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:()=>Fp});var e=r(6512),t=r(7154),n=r.n(t),i=r(3424),a=r.n(i),l=["second","minute","hour","day","week","month","year"],u=["秒","分钟","小时","天","周","个月","年"],s={},c=function(e,t){s[e]=t},f=function(e){return s[e]||s.en_US},p=[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>=p[o]&&o<p.length;o++)e/=p[o];return(e=Math.floor(e))>(0==(o*=2)?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function y(e,t){return(+(t?d(t):new Date)-+d(e))/1e3}var m="timeago-id";function b(e){return parseInt(e.getAttribute(m))}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=y(t,o);e.innerText=h(a,n);var l,u=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>=p[n]&&n<p.length;n++)e/=p[n],t*=p[n];return r=(r%=t)?t-r:t,Math.ceil(r)}(a),i||1),2147483647));g[u]=0,l=u,e.setAttribute(m,l)}function S(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=l[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=u[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]});var A,O=(A=function(e,t){return(A=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}A(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,l=o.locale,u=o.opts;S(this.dom),!1!==i&&(this.dom.setAttribute("datetime",""+((e=a)instanceof Date?e.getTime():e)),t=this.dom,n=l,r=u,(t.length?t:[t]).forEach(function(e){w(e,e.getAttribute("datetime"),f(n),r||{})}))},n.prototype.componentWillUnmount=function(){S(this.dom)},n.prototype.render=function(){var t,n,r=this,o=this.props,i=o.datetime,a=(o.live,o.locale),l=o.opts,u=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}},u),(t=a,h(y(i,(n=l)&&n.relativeDate),f(t))))},n.defaultProps={live:!0,className:""},n}(e.PureComponent);const C=x;var j=r(6748),M=r.n(j);const P=JSON.parse('{"Add a comment...":"إضافة تعليق","Add a reply...":"إضافة رد","Add tag...":"إضافة علامة","Cancel":"إلغاء","Close":"إغلاق","Edit":"Edit","Delete":"Delete","Ok":"تم"}'),k=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"}'),I=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"}'),D=JSON.parse('{"Add a comment...":"Σχολίασε...","Add a reply...":"Απάντησε...","Add tag...":"Πρόσθεσε tag...","Cancel":"Άκυρο","Close":"Κλείσιμο","Edit":"Επεξεργασία","Delete":"Διαγραφή","Ok":"Ok"}'),R=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"}'),T=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"}'),_=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"}'),G=JSON.parse('{"Add a comment...":"टिप्पणी जोड़ें","Add a reply...":"जवाब दें","Add tag...":"टैग लगाएँ","Cancel":"रद्द करें","Close":"बंद करें","Edit":"संपादित करें","Delete":"हटाएँ","Ok":"ठीक है"}'),B=JSON.parse('{"Add a comment...":"Commenta...","Add a reply...":"Rispondi...","Add tag...":"Aggiungi tag...","Cancel":"Annulla","Close":"Chiudi","Edit":"Edit","Delete":"Delete","Ok":"Ok"}'),L=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":"확인"}'),U=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"}'),z=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"}'),Y=JSON.parse('{"Add a comment...":"Добавить комментарий...","Add a reply...":"Добавить ответ...","Add tag...":"Добавить тэг...","Cancel":"Отмена","Close":"Закрыть","Edit":"Редактировать","Delete":"Удалить","Ok":"Ок"}'),F=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":"ตกลง"}'),W=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":"ٹھیک ہے"}'),Q=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),le=r(4688),ue=r(2411),se=r(7463),ce=r(9032),fe=r(6740),pe=r(404),de=r(5617),he=r(3847),ye=r(6763),me=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 Se={ar:P,cs:k,de:I,el:D,es:R,fi:T,fr:N,gl:_,hi:G,it:B,ja:L,ko:H,nl:U,pt:z,ru:Y,sv:F,th:V,tr:W,ur:J,zh:Q,"zh-CN":Z,"zh-TW":X},Ae=Object.keys(Se),Oe=new(M())({allowMissing:!0});Oe.init=function(e,t){Oe.clear(),e&&(Oe.locale(e),Oe.extend(Se[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",le.A),c("ko",ue.A),c("nl",se.A),c("pt",ce.A),c("ru",fe.A),c("sv",pe.A),c("th",de.A),c("tr",he.A),c("zh",ye.A),c("zh-CN",ye.A),c("zh-TW",me.A),Oe.registerMessages=function(e,t){Se[e]?Se[e]=ve(ve({},Se[e]),t):Se[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 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 Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Me=function(){return!!e})()}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ke(e,t){return(ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ie(e,t,n){return(t=De(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function De(e){var t=function(e){if("object"!=je(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==je(t)?t:t+""}var Re=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),Ie((o=this,a=[t],i=Pe(i=n),r=function(e,t){if(t&&("object"==je(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,Me()?Reflect.construct(i,a||[],Pe(o).constructor):i.apply(o,a))),"onKeyDown",function(e){13===e.which&&e.ctrlKey&&r.props.onSaveAndClose()}),Ie(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&&ke(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,De(r.key),r)}}(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(e.Component);function Te(){return Te=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},Te.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}(),_e=Math.abs,Ge=String.fromCharCode,Be=Object.assign;function Le(e){return e.trim()}function He(e,t,n){return e.replace(t,n)}function Ue(e,t){return e.indexOf(t)}function ze(e,t){return 0|e.charCodeAt(t)}function Ye(e,t,n){return e.slice(t,n)}function Fe(e){return e.length}function Ve(e){return e.length}function We(e,t){return t.push(e),e}var Je=1,Qe=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:Qe,length:a,return:""}}function et(e,t){return Be($e("",null,null,"",null,null,0),e,{length:-e.length},t)}function tt(){return Ke=Xe>0?ze(qe,--Xe):0,Qe--,10===Ke&&(Qe=1,Je--),Ke}function nt(){return Ke=Xe<Ze?ze(qe,Xe++):0,Qe++,10===Ke&&(Qe=1,Je++),Ke}function rt(){return ze(qe,Xe)}function ot(){return Xe}function it(e,t){return Ye(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 lt(e){return Je=Qe=1,Ze=Fe(qe=e),Xe=0,[]}function ut(e){return qe="",e}function st(e){return Le(it(Xe-1,pt(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 ft(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 pt(e){for(;nt();)switch(Ke){case e:return Xe;case 34:case 39:34!==e&&39!==e&&pt(Ke);break;case 40:41===e&&pt(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)+"*"+Ge(47===e?e:nt())}function ht(e){for(;!at(rt());)nt();return it(e,Xe)}var yt="-ms-",mt="-moz-",bt="-webkit-",gt="comm",vt="rule",wt="decl",St="@keyframes";function At(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 St:return e.return=e.value+"{"+At(e.children,r)+"}";case vt:e.value=e.props.join(",")}return Fe(n=At(e.children,r))?e.return=e.value+"{"+n+"}":""}function Et(e){return ut(xt("",null,null,null,[""],e=lt(e),0,[0],e))}function xt(e,t,n,r,o,i,a,l,u){for(var s=0,c=0,f=a,p=0,d=0,h=0,y=1,m=1,b=1,g=0,v="",w=o,S=i,A=r,O=v;m;)switch(h=g,g=nt()){case 40:if(108!=h&&58==ze(O,f-1)){-1!=Ue(O+=He(st(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:O+=st(g);break;case 9:case 10:case 13:case 32:O+=ct(h);break;case 92:O+=ft(ot()-1,7);continue;case 47:switch(rt()){case 42:case 47:We(jt(dt(nt(),ot()),t,n),u);break;default:O+="/"}break;case 123*y:l[s++]=Fe(O)*b;case 125*y:case 59:case 0:switch(g){case 0:case 125:m=0;case 59+c:-1==b&&(O=He(O,/\f/g,"")),d>0&&Fe(O)-f&&We(d>32?Mt(O+";",r,n,f-1):Mt(He(O," ","")+";",r,n,f-2),u);break;case 59:O+=";";default:if(We(A=Ct(O,t,n,s,c,o,l,v,w=[],S=[],f),i),123===g)if(0===c)xt(O,t,A,A,w,i,f,l,S);else switch(99===p&&110===ze(O,3)?100:p){case 100:case 108:case 109:case 115:xt(e,A,A,r&&We(Ct(e,A,A,0,0,o,l,v,o,w=[],f),S),o,S,f,l,r?w:S);break;default:xt(O,A,A,A,[""],S,0,l,S)}}s=c=d=0,y=b=1,v=O="",f=a;break;case 58:f=1+Fe(O),d=h;default:if(y<1)if(123==g)--y;else if(125==g&&0==y++&&125==tt())continue;switch(O+=Ge(g),g*y){case 38:b=c>0?1:(O+="\f",-1);break;case 44:l[s++]=(Fe(O)-1)*b,b=1;break;case 64:45===rt()&&(O+=st(nt())),p=rt(),c=f=Fe(v=O+=ht(ot())),g++;break;case 45:45===h&&2==Fe(O)&&(y=0)}}return i}function Ct(e,t,n,r,o,i,a,l,u,s,c){for(var f=o-1,p=0===o?i:[""],d=Ve(p),h=0,y=0,m=0;h<r;++h)for(var b=0,g=Ye(e,f+1,f=_e(y=a[h])),v=e;b<d;++b)(v=Le(y>0?p[b]+" "+g:He(g,/&\f/g,p[b])))&&(u[m++]=v);return $e(e,t,n,0===o?vt:l,u,s,c)}function jt(e,t,n){return $e(e,t,n,gt,Ge(Ke),Ye(e,2,-2),0)}function Mt(e,t,n,r){return $e(e,t,n,wt,Ye(e,0,r),Ye(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)},kt=new WeakMap,It=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)||kt.get(n))&&!r){kt.set(e,!0);for(var o=[],i=(c=o,ut(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]+=st(r);break;case 4:if(44===r){e[++n]=58===rt()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Ge(r)}}while(r=nt());return e}(lt(t),c))),a=n.props,l=0,u=0;l<i.length;l++)for(var s=0;s<a.length;s++,u++)e.props[u]=o[l]?i[l].replace(/&\f/g,a[s]):a[s]+" "+i[l]}}var c},Dt=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Rt(e,t){switch(r=t,45^ze(n=e,0)?(((r<<2^ze(n,0))<<2^ze(n,1))<<2^ze(n,2))<<2^ze(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+mt+e+yt+e+e;case 6828:case 4268:return bt+e+yt+e+e;case 6165:return bt+e+yt+"flex-"+e+e;case 5187:return bt+e+He(e,/(\w+).+(:[^]+)/,bt+"box-$1$2"+yt+"flex-$1$2")+e;case 5443:return bt+e+yt+"flex-item-"+He(e,/flex-|-self/,"")+e;case 4675:return bt+e+yt+"flex-line-pack"+He(e,/align-content|flex-|-self/,"")+e;case 5548:return bt+e+yt+He(e,"shrink","negative")+e;case 5292:return bt+e+yt+He(e,"basis","preferred-size")+e;case 6060:return bt+"box-"+He(e,"-grow","")+bt+e+yt+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"+yt+"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(Fe(e)-1-t>6)switch(ze(e,t+1)){case 109:if(45!==ze(e,t+4))break;case 102:return He(e,/(.+:)(.+)-([^]+)/,"$1"+bt+"$2-$3$1"+mt+(108==ze(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ue(e,"stretch")?Rt(He(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ze(e,t+1))break;case 6444:switch(ze(e,Fe(e)-3-(~Ue(e,"!important")&&10))){case 107:return He(e,":",":"+bt)+e;case 101:return He(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+bt+(45===ze(e,14)?"inline-":"")+"box$3$1"+bt+"$2$3$1"+yt+"$2box$3")+e}break;case 5936:switch(ze(e,t+11)){case 114:return bt+e+yt+He(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return bt+e+yt+He(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return bt+e+yt+He(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return bt+e+yt+e+e}var n,r;return e}var Tt=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case wt:e.return=Rt(e.value,e.length);break;case St:return At([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 At([et(e,{props:[He(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return At([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+)/,yt+"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 _t=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Gt=function(e,t,n){_t(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)}},Bt={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 Lt(e){return(Lt="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,Ut,zt=/[A-Z]|^ms/g,Yt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ft=function(e){return 45===e.charCodeAt(1)},Vt=function(e){return null!=e&&"boolean"!=typeof e},Wt=(Ht=function(e){return Ft(e)?e:e.replace(zt,"-$&").toLowerCase()},Ut=Object.create(null),function(e){return void 0===Ut[e]&&(Ut[e]=Ht(e)),Ut[e]}),Jt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Yt,function(e,t,n){return Zt={name:t,styles:n,next:Zt},t})}return 1===Bt[e]||Ft(e)||"number"!=typeof t||0===t?t:t+"px"};function Qt(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(Lt(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+=Qt(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!==Lt(a)){var l=a;null!=t&&void 0!==t[l]?r+=i+"{"+t[l]+"}":Vt(l)&&(r+=Wt(i)+":"+Jt(i,l)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var u=Qt(e,t,a);switch(i){case"animation":case"animationName":r+=Wt(i)+":"+u+";";break;default:r+=i+"{"+u+"}"}}else for(var s=0;s<a.length;s++)Vt(a[s])&&(r+=Wt(i)+":"+Jt(i,a[s])+";")}return r}(e,t,n);case"function":if(void 0!==e){var l=Zt,u=n(e);return Zt=l,Qt(e,t,u)}}var s=n;if(null==t)return s;var c=t[s];return void 0!==c?c:s}var Zt,Xt=/label:\s*([^\s;{]+)\s*(;|$)/g;function Kt(e,t,n){if(1===e.length&&"object"===Lt(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+=Qt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Qt(n,t,e[a]),r&&(o+=i[a]);Xt.lastIndex=0;for(var l,u="";null!==(l=Xt.exec(o));)u+="-"+l[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)+u,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||Tt,a={},l=[];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;l.push(e)});var u,s,c,f,p=[Ot,(f=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&f(e)})],d=(s=[It,Dt].concat(i,p),c=Ve(s),function(e,t,n,r){for(var o="",i=0;i<c;i++)o+=s[i](e,t,n,r)||"";return o});o=function(e,t,n,r){u=n,At(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(l),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 _t(t,n,r),$t(function(){return Gt(t,n,r)}),null},ln=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],l="";"string"==typeof t.className?l=Nt(n.registered,a,t.className):null!=t.className&&(l=t.className+" ");var u=Kt(a,void 0,e.useContext(nn));l+=n.key+"-"+u.name;var s={};for(var c in t)rn.call(t,c)&&"css"!==c&&c!==on&&(s[c]=t[c]);return s.className=l,r&&(s.ref=r),e.createElement(e.Fragment,null,e.createElement(an,{cache:n,serialized:u,isStringTag:"string"==typeof i}),e.createElement(i,s))});function un(e){return(un="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 sn,cn,fn=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]=ln,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 pn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Kt(t)}sn=fn||(fn={}),cn||(cn=sn.JSX||(sn.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(un(i)){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var l in a="",i)i[l]&&l&&(a&&(a+=" "),a+=l);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++)Gt(t,n[e],!1)}),null},yn=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),_t(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,l=dn(t),s=Nt(i,u=[],l),u.length<2?l:s+a(u);var i,a,l,u,s},theme:e.useContext(nn)},a=t.children(i);return e.createElement(e.Fragment,null,e.createElement(hn,{cache:n,serializedArr:r}),a)});function mn(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=mn(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 Sn(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 An(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,Sn(r.key),r)}}function On(e,t,n){return t&&An(e.prototype,t),n&&An(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=Sn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jn(e){return(jn="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 Mn(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 kn(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){Mn(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 In(e){return(In=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Dn(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=In(e);if(t){var a=In(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return r=this,!(o=n)||"object"!==jn(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 Rn=function(){};function Tn(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(Tn(e,o)));return r.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var _n=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===gn(e)&&null!==e?[e]:[]},Gn=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,kn({},bn(e,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]))};function Bn(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Ln(e){return Bn(e)?window.pageYOffset:e.scrollTop}function Hn(e,t){Bn(e)?window.scrollTo(0,t):e.scrollTop=t}function Un(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Rn,o=Ln(e),i=t-o,a=0;!function t(){var l,u=i*((l=(l=a+=10)/n-1)*l*l+1)+o;Hn(e,u),a<n?window.requestAnimationFrame(t):r(e)}()}function zn(){try{return document.createEvent("TouchEvent"),!0}catch(Ht){return!1}}var Yn=!1,Fn={get passive(){return Yn=!0}},Vn="undefined"!=typeof window?window:{};Vn.addEventListener&&Vn.removeEventListener&&(Vn.addEventListener("p",Rn,Fn),Vn.removeEventListener("p",Rn,!1));var Wn=Yn,Jn=function(e){return"auto"===e?"bottom":e},Qn=(0,e.createContext)({getPortalPlacement:null}),Zn=function(e){xn(n,e);var t=Dn(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,l=n.menuShouldScrollIntoView,u=n.theme;if(t){var s="fixed"===a,c=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=e.theme.spacing,u=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),s={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return s;var c=u.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,d=f.height,h=f.top,y=n.offsetParent.getBoundingClientRect().top,m=window.innerHeight,b=Ln(u),g=parseInt(getComputedStyle(n).marginBottom,10),v=parseInt(getComputedStyle(n).marginTop,10),w=y-v,S=m-h,A=w+b,O=c-b-h,E=p-m+b+g,x=b+h-v,C=160;switch(o){case"auto":case"bottom":if(S>=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!a)return i&&Un(u,E,C),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&S>=r)return i&&Un(u,E,C),{placement:"bottom",maxHeight:a?S-g:O-g};if("auto"===o||a){var j=t,M=a?w:A;return M>=r&&(j=Math.min(M-g-l.controlHeight,t)),{placement:"top",maxHeight:j}}if("bottom"===o)return i&&Hn(u,E),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(A>=d&&!a)return i&&Un(u,x,C),{placement:"top",maxHeight:t};if(!a&&A>=r||a&&w>=r){var P=t;return(!a&&A>=r||a&&w>=r)&&(P=a?w-v:A-v),i&&Un(u,x,C),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return s}({maxHeight:o,menuEl:t,minHeight:r,placement:i,shouldScroll:l&&!s,isFixedPosition:s,theme:u}),f=e.context.getPortalPlacement;f&&f(c),e.setState(c)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||Jn(t);return kn(kn({},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=Qn;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 fn("div",Te({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 fn("div",Te({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=Dn(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,l=t.innerProps,u=t.menuPlacement,s=t.menuPosition,c=t.getStyles,f="fixed"===s;if(!n&&!f||!i)return null;var p=this.state.placement||Jn(u),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=f?0:window.pageYOffset,y=d[p]+h,m=fn("div",Te({css:c("menuPortal",{offset:y,position:s,rect:d}),className:a({"menu-portal":!0},o)},l),r);return fn(Qn.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},n?(0,e.createPortal)(m,n):m)}}]),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 fn("svg",Te({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ir},n))},lr=function(e){return fn(ar,Te({size:20},e),fn("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"}))},ur=function(e){return fn(ar,Te({size:20},e),fn("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"}))},sr=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=sr,fr=sr,pr=function(){var e=pn.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 fn("span",{css:pn({animation:"".concat(pr," 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 fn("div",Te({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},o),fn(dr,{delay:0,offset:i}),fn(dr,{delay:160,offset:!0}),fn(dr,{delay:320,offset:!i}))};hr.defaultProps={size:4};var yr=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},mr=function(e){var t=e.children,n=e.innerProps;return fn("div",n,t)},br=mr,gr=mr,vr=function(e){var t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,l=e.innerProps,u=e.isDisabled,s=e.removeProps,c=e.selectProps,f=r.Container,p=r.Label,d=r.Remove;return fn(yn,null,function(r){var h=r.css,y=r.cx;return fn(f,{data:i,innerProps:kn({className:y(h(a("multiValue",e)),o({"multi-value":!0,"multi-value--is-disabled":u},n))},l),selectProps:c},fn(p,{data:i,innerProps:{className:y(h(a("multiValueLabel",e)),o({"multi-value__label":!0},n))},selectProps:c},t),fn(d,{data:i,innerProps:kn({className:y(h(a("multiValueRemove",e)),o({"multi-value__remove":!0},n))},s),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 fn("div",Te({css:o("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},i),t||fn(lr,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,l=e.innerRef,u=e.innerProps,s=e.menuIsOpen;return fn("div",Te({ref:l,css:r("control",e),className:n({control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":s},o)},u),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return fn("div",Te({css:o("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},i),t||fn(ur,null))},DownChevron:ur,CrossIcon:lr,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,l=e.innerProps,u=e.label,s=e.theme,c=e.selectProps;return fn("div",Te({css:o("group",e),className:r({group:!0},n)},l),fn(i,Te({},a,{selectProps:c,theme:s,getStyles:o,cx:r}),u),fn("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,r=e.className,o=Gn(e);o.data;var i=bn(o,["data"]);return fn("div",Te({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 fn("div",Te({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 fn("span",Te({},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=Gn(e),i=o.innerRef,a=o.isDisabled,l=o.isHidden,u=bn(o,["innerRef","isDisabled","isHidden"]);return fn("div",{css:r("input",e)},fn(vn.A,Te({className:n({input:!0},t),inputRef:i,inputStyle:yr(l),disabled:a},u)))},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 fn("div",Te({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,l=e.isMulti;return fn("div",Te({css:o("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":l},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 fn("div",n,t||fn(lr,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,l=e.isSelected,u=e.innerRef,s=e.innerProps;return fn("div",Te({css:o("option",e),className:r({option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":l},n),ref:u},s),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return fn("div",Te({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,l=e.isRtl;return fn("div",Te({css:o("container",e),className:r({"--is-disabled":a,"--is-rtl":l},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 fn("div",Te({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,l=e.hasValue;return fn("div",Te({css:a("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":l},n)},o),t)}};function Sr(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 Ar(e){return function(e){if(Array.isArray(e))return Sr(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 Sr(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)?Sr(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"},jr=function(e){return fn("span",Te({css:Cr},e))},Mr={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,l=e.selectValue,u=e.isDisabled,s=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&l)return"value ".concat(a," focused, ").concat(c(l,r),".");if("menu"===t){var f=u?" disabled":"",p="".concat(s?"selected":"focused").concat(f);return"option ".concat(a," ").concat(p,", ").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,l=t.selectValue,u=t.selectProps,s=u.ariaLiveMessages,c=u.getOptionLabel,f=u.inputValue,p=u.isMulti,d=u.isOptionDisabled,h=u.isSearchable,y=u.menuIsOpen,m=u.options,b=u.screenReaderStatus,g=u.tabSelectsValue,v=u["aria-label"],w=u["aria-live"],S=(0,e.useMemo)(function(){return kn(kn({},Mr),s||{})},[s]),A=(0,e.useMemo)(function(){var e,t="";if(n&&S.onChange){var r=n.option,o=n.removedValue,i=n.value,a=o||r||(e=i,Array.isArray(e)?null:e),l=kn({isDisabled:a&&d(a),label:a?c(a):""},n);t=S.onChange(l)}return t},[n,d,c,S]),O=(0,e.useMemo)(function(){var e="",t=r||o,n=!!(r&&l&&l.includes(r));if(t&&S.onFocus){var i={focused:t,label:c(t),isDisabled:d(t),isSelected:n,options:m,context:t===r?"menu":"value",selectValue:l};e=S.onFocus(i)}return e},[r,o,c,d,S,m,l]),E=(0,e.useMemo)(function(){var e="";if(y&&m.length&&S.onFilter){var t=b({count:i.length});e=S.onFilter({inputValue:f,resultsMessage:t})}return e},[i,f,y,S,m,b]),x=(0,e.useMemo)(function(){var e="";if(S.guidance){var t=o?"value":y?"menu":"input";e=S.guidance({"aria-label":v,context:t,isDisabled:r&&d(r),isMulti:p,isSearchable:h,tabSelectsValue:g})}return e},[v,r,o,p,d,h,y,S,g]),C="".concat(O," ").concat(E," ").concat(x);return fn(jr,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},a&&fn(e.default.Fragment,null,fn("span",{id:"aria-selection"},A),fn("span",{id:"aria-context"},C)))},kr=[{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źẑżžẓẕƶȥɀⱬꝣ"}],Ir=new RegExp("["+kr.map(function(e){return e.letters}).join("")+"]","g"),Dr={},Rr=0;Rr<kr.length;Rr++)for(var Tr=kr[Rr],Nr=0;Nr<Tr.letters.length;Nr++)Dr[Tr.letters[Nr]]=Tr.base;var _r=function(e){return e.replace(Ir,function(e){return Dr[e]})},Gr=function(e,t){var n;void 0===t&&(t=xr);var r,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(_r),Br=function(e){return e.replace(/^\s+|\s+$/g,"")},Lr=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 fn("input",Te({ref:t},n,{css:pn({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 Ur=["boxSizing","height","overflow","paddingRight","position"],zr={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Yr(e){e.preventDefault()}function Fr(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 Wr(){return"ontouchstart"in window||navigator.maxTouchPoints}var Jr=!("undefined"==typeof window||!window.document||!window.document.createElement),Qr=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,l,u,s,c,f,p,d,h,y,m,b,g=t.children,v=t.lockEnabled,w=t.captureEnabled,S=(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,l=n.onTopLeave,u=(0,e.useRef)(!1),s=(0,e.useRef)(!1),c=(0,e.useRef)(0),f=(0,e.useRef)(null),p=(0,e.useCallback)(function(e,t){if(null!==f.current){var n=f.current,r=n.scrollTop,c=n.scrollHeight,p=n.clientHeight,d=f.current,h=t>0,y=c-p-r,m=!1;y>t&&u.current&&(i&&i(e),u.current=!1),h&&s.current&&(l&&l(e),s.current=!1),h&&t>y?(o&&!u.current&&o(e),d.scrollTop=c,m=!0,u.current=!0):!h&&-t>r&&(a&&!s.current&&a(e),d.scrollTop=0,m=!0,s.current=!0),m&&((b=e).preventDefault(),b.stopPropagation())}var b},[]),d=(0,e.useCallback)(function(e){p(e,e.deltaY)},[p]),h=(0,e.useCallback)(function(e){c.current=e.changedTouches[0].clientY},[]),y=(0,e.useCallback)(function(e){var t=c.current-e.changedTouches[0].clientY;p(e,t)},[p]),m=(0,e.useCallback)(function(e){if(e){var t=!!Wn&&{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",y,t)}},[y,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",y,!1))},[y,h,d]),(0,e.useEffect)(function(){if(r){var e=f.current;return m(e),function(){b(e)}}},[r,m,b]),function(e){f.current=e}),A=function(t){var n=t.isEnabled,r=t.accountForScrollbars,o=void 0===r||r,i=(0,e.useRef)({}),a=(0,e.useRef)(null),l=(0,e.useCallback)(function(e){if(Jr){var t=document.body,n=t&&t.style;if(o&&Ur.forEach(function(e){var t=n&&n[e];i.current[e]=t}),o&&Qr<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+r||0;Object.keys(zr).forEach(function(e){var t=zr[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(l,"px"))}t&&Wr()&&(t.addEventListener("touchmove",Yr,Zr),e&&(e.addEventListener("touchstart",Vr,Zr),e.addEventListener("touchmove",Fr,Zr))),Qr+=1}},[]),u=(0,e.useCallback)(function(e){if(Jr){var t=document.body,n=t&&t.style;Qr=Math.max(Qr-1,0),o&&Qr<1&&Ur.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&Wr()&&(t.removeEventListener("touchmove",Yr,Zr),e&&(e.removeEventListener("touchstart",Vr,Zr),e.removeEventListener("touchmove",Fr,Zr)))}},[]);return(0,e.useEffect)(function(){if(n){var e=a.current;return l(e),function(){u(e)}}},[n,l,u]),function(e){a.current=e}}({isEnabled:v});return fn(e.default.Fragment,null,v&&fn("div",{onClick:Xr,css:Kr}),g(function(e){S(e),A(e)}))}var $r={clearIndicator:fr,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,l=o.colors;return Cn(t={label:"menu"},(n=r)?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),Cn(t,"backgroundColor",l.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:zn(),captureMenuScroll:!zn(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=kn({ignoreCase:!0,ignoreAccents:!0,stringify:Lr,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,l=n.matchFrom,u=a?Br(t):t,s=a?Br(i(e)):i(e);return r&&(u=u.toLowerCase(),s=s.toLowerCase()),o&&(u=Gr(u),s=_r(s)),"start"===l?s.substr(0,u.length)===u:s.indexOf(u)>-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:uo(e,t,n),isSelected:so(e,t,n),label:ao(e,t),value:lo(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,Ar(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,l=t.value;return(!fo(e)||!i)&&co(e,{label:a,value:l,data:o},r)}var ao=function(e,t){return e.getOptionLabel(t)},lo=function(e,t){return e.getOptionValue(t)};function uo(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function so(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=lo(e,t);return n.some(function(t){return lo(e,t)===r})}function co(e,t,n){return!e.filterOption||e.filterOption(t,n)}var fo=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},po=1,ho=function(t){xn(r,t);var n=Dn(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,l=o&&t.isOptionSelected(e,a),u=t.isOptionDisabled(e,a);if(l){var s=t.getOptionValue(e);t.setValue(a.filter(function(e){return t.getOptionValue(e)!==s}),"deselect-option",e)}else{if(u)return void t.ariaOnChange(e,{action:"select-option",name:i});o?t.setValue([].concat(Ar(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 lo(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,kn(kn({},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:kn({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&&Bn(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 fo(t.props)},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,l=n.isClearable,u=n.isDisabled,s=n.menuIsOpen,c=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=t.state,h=d.focusedOption,y=d.focusedValue,m=d.selectValue;if(!(u||"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(y)t.removeValue(y);else{if(!o)return;r?t.popValue():l&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!s||!f||!h||p&&t.isOptionSelected(h,m))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(s){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":s?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close"}),t.onMenuClose()):l&&i&&t.clearValue();break;case" ":if(a)return;if(!s){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":s?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":s?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!s)return;t.focusOption("pageup");break;case"PageDown":if(!s)return;t.focusOption("pagedown");break;case"Home":if(!s)return;t.focusOption("first");break;case"End":if(!s)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++po),t.state.selectValue=_n(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,l=a.isDisabled,u=a.menuIsOpen,s=this.state.isFocused;(s&&!l&&e.isDisabled||s&&u&&!e.menuIsOpen)&&this.focusInput(),s&&l&&!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 l=i.indexOf(r[0]);l>-1&&(a=l)}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):kn(kn({},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,l=a.isMulti,u=a.isRtl,s=a.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:s,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 uo(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return so(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,l=t.form,u=this.getComponents().Input,s=this.state.inputIsHidden,c=this.commonProps,f=o||this.getElementId("input"),p={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return r?e.default.createElement(u,Te({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:f,innerRef:this.getInputRef,isDisabled:n,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:l,type:"text",value:i},p)):e.default.createElement(Hr,Te({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Rn,onFocus:this.onInputFocus,readOnly:!0,disabled:n,tabIndex:a,form:l,value:""},p))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,l=n.SingleValue,u=n.Placeholder,s=this.commonProps,c=this.props,f=c.controlShouldRenderValue,p=c.isDisabled,d=c.isMulti,h=c.inputValue,y=c.placeholder,m=this.state,b=m.selectValue,g=m.focusedValue,v=m.isFocused;if(!this.hasValue()||!f)return h?null:e.default.createElement(u,Te({},s,{key:"placeholder",isDisabled:p,isFocused:v}),y);if(d){var w=b.map(function(n,l){var u=n===g;return e.default.createElement(r,Te({},s,{components:{Container:o,Label:i,Remove:a},isFocused:u,isDisabled:p,key:"".concat(t.getOptionValue(n)).concat(l),index:l,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 S=b[0];return e.default.createElement(l,Te({},s,{data:S,isDisabled:p}),this.formatOptionLabel(S,"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 l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.default.createElement(t,Te({},n,{innerProps:l,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,Te({},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,Te({},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,Te({},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,l=n.MenuPortal,u=n.LoadingMessage,s=n.NoOptionsMessage,c=n.Option,f=this.commonProps,p=this.state.focusedOption,d=this.props,h=d.captureMenuScroll,y=d.inputValue,m=d.isLoading,b=d.loadingMessage,g=d.minMenuHeight,v=d.maxMenuHeight,w=d.menuIsOpen,S=d.menuPlacement,A=d.menuPosition,O=d.menuPortalTarget,E=d.menuShouldBlockScroll,x=d.menuShouldScrollIntoView,C=d.noOptionsMessage,j=d.onMenuScrollToTop,M=d.onMenuScrollToBottom;if(!w)return null;var P,k=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,l=n.isSelected,u=n.label,s=n.value,d=p===i,h=a?void 0:function(){return t.onOptionHover(i)},y=a?void 0:function(){return t.selectOption(i)},m="".concat(t.getElementId("option"),"-").concat(r),b={id:m,onClick:y,onMouseMove:h,onMouseOver:h,tabIndex:-1};return e.default.createElement(c,Te({},f,{innerProps:b,data:i,isDisabled:a,isSelected:l,key:m,label:u,type:o,value:s,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,l=n.index,u="".concat(t.getElementId("group"),"-").concat(l),s="".concat(u,"-heading");return e.default.createElement(r,Te({},f,{key:u,data:i,options:a,Heading:o,headingProps:{id:s,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map(function(e){return k(e,"".concat(l,"-").concat(e.index))}))}if("option"===n.type)return k(n,"".concat(n.index))});else if(m){var I=b({inputValue:y});if(null===I)return null;P=e.default.createElement(u,f,I)}else{var D=C({inputValue:y});if(null===D)return null;P=e.default.createElement(s,f,D)}var R={minMenuHeight:g,maxMenuHeight:v,menuPlacement:S,menuPosition:A,menuShouldScrollIntoView:x},T=e.default.createElement(Zn,Te({},f,R),function(n){var r=n.ref,o=n.placerProps,l=o.placement,u=o.maxHeight;return e.default.createElement(i,Te({},f,R,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:m,placement:l}),e.default.createElement(qr,{captureEnabled:h,onTopArrive:j,onBottomArrive:M,lockEnabled:E},function(n){return e.default.createElement(a,Te({},f,{innerRef:function(e){t.getMenuListRef(e),n(e)},isLoading:m,maxHeight:u,focusedOption:p}),P)}))});return O||"fixed"===A?e.default.createElement(l,Te({},f,{appendTo:O,controlElement:this.controlRef,menuPlacement:S,menuPosition:A}),T):T}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,l=this.state.selectValue;if(a&&!o){if(i){if(r){var u=l.map(function(e){return t.getOptionValue(e)}).join(r);return e.default.createElement("input",{name:a,type:"hidden",value:u})}var s=l.length>0?l.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,s)}var c=l[0]?this.getOptionValue(l[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,l=n.selectValue,u=this.getFocusableOptions();return e.default.createElement(Pr,Te({},t,{ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:l,focusableOptions:u}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,l=a.className,u=a.id,s=a.isDisabled,c=a.menuIsOpen,f=this.state.isFocused,p=this.commonProps=this.getCommonProps();return e.default.createElement(o,Te({},p,{className:l,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:f}),this.renderLiveRegion(),e.default.createElement(n,Te({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:f,menuIsOpen:c}),e.default.createElement(i,Te({},p,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),e.default.createElement(r,Te({},p,{isDisabled:s}),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,l=e.menuIsOpen,u=e.inputValue,s={};if(n&&(a!==n.value||i!==n.options||l!==n.menuIsOpen||u!==n.inputValue)){var c=_n(a),f=l?oo(ro(e,c)):[],p=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,f);s={selectValue:c,focusedOption:d,focusedValue:p,clearFocusValueOnUpdate:!1}}var h=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{};return kn(kn(kn({},s),h),{},{prevProps:e})}}]),r}(e.Component);ho.defaultProps=to;var yo,mo,bo,go=(yo=ho,bo=mo=function(t){xn(r,t);var n=Dn(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(yo,Te({},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),mo.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 So=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 Ao=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 jo(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){Mo(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 Mo(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,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(c){s=!0,o=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ko(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)?ko(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 ko(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 Io=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],l=i[1],u=t.body.modified||t.body.created,s=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(u),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),s):e.default.createElement("div",{className:r?"r6o-widget comment editable":"r6o-widget comment"},e.default.createElement(Re,{editable:r,content:t.body.value,onChange:function(e){return t.onUpdate(t.body,jo(jo({},t.body),{},{value:e.target.value}))},onSaveAndClose:t.onSaveAndClose}),!r&&s,t.purposeSelector&&e.default.createElement(So,{editable:r,content:t.body.purpose,onChange:function(e){return t.onUpdate(t.body,jo(jo({},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 l(!a)}},e.default.createElement(Ao,{width:12})),a&&e.default.createElement(xe,{onEdit:function(e){o(!0),l(!1)},onDelete:function(e){t.onDelete(t.body),l(!1)},onClickOutside:function(){return l(!1)}}))};function Do(e){return(Do="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 Ro(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 To(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ro(Object(n),!0).forEach(function(t){No(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ro(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"!=Do(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Do(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==Do(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var _o=wo.map(function(e){return e.value}),Go=function(e,t){var n=t?_o.indexOf(e.purpose)>-1:"commenting"==e.purpose||"replying"==e.purpose;return"TextualBody"===e.type&&(!Object.prototype.hasOwnProperty.call(e,"purpose")||n)},Bo=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},Lo=function(t){var n,r,o=t.annotation?t.annotation.bodies.filter(function(e){return Go(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}),l=!t.readOnly&&t.annotation,u=0===a.length||!t.disableReply;return e.default.createElement(e.default.Fragment,null,a.map(function(n,r){return e.default.createElement(Io,{key:r,env:t.env,purposeSelector:t.purposeSelector,readOnly:Bo(n,t),body:n,onUpdate:t.onUpdateBody,onDelete:t.onRemoveBody,onSaveAndClose:t.onSaveAndClose})}),l&&u&&e.default.createElement("div",{className:"r6o-widget comment editable"},e.default.createElement(Re,{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(To(To({},i),{},{value:r})):n.length>0&&0===r.length?t.onRemoveBody(i):t.onUpdateBody(i,To(To({},i),{},{value:r}))},onSaveAndClose:function(){return t.onSaveAndClose()}}),t.purposeSelector&&i.value.length>0&&e.default.createElement(So,{editable:!0,content:i.purpose,onChange:function(e){return t.onUpdateBody(i,To(To({},i),{},{purpose:e.value}))},onSaveAndClose:function(){return t.onSaveAndClose()}})))};Lo.disableDelete=function(e,t){return e.bodies.filter(function(e){return Go(e,t.purposeSelector)}).some(function(e){return Bo(e,t)})};const Ho=Lo;function Uo(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,En(e,t)}function zo(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Yo=e.default.createContext(null);var Fo=function(e){return e.scrollTop},Vo="unmounted",Wo="exited",Jo="entering",Qo="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=Wo,r.appearStatus=Jo):o=Qo:o=e.unmountOnExit||e.mountOnEnter?Vo:Wo,r.state={status:o},r.nextCallback=null,r}Uo(n,t),n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Vo?{status:Wo}: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!==Qo&&(t=Jo):n!==Jo&&n!==Qo||(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&&Fo(r)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Wo&&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],l=i[1],u=this.getTimeouts(),s=o?u.appear:u.enter;t||r?(this.props.onEnter(a,l),this.safeSetState({status:Jo},function(){n.props.onEntering(a,l),n.onTransitionEnd(s,function(){n.safeSetState({status:Qo},function(){n.props.onEntered(a,l)})})})):this.safeSetState({status:Qo},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:Wo},function(){t.props.onExited(o)})})})):this.safeSetState({status:Wo},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],l=i[1];this.props.addEndListener(a,l)}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,mn(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e.default.createElement(Yo.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=Yo,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=Wo,Xo.ENTERING=Jo,Xo.ENTERED=Qo,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=zo(n.className,r):n.setAttribute("class",zo(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}Uo(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&&Fo(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,mn(t,["classNames"]));return e.default.createElement(qo,Te({},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,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(c){s=!0,o=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(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),l=a[0],u=a[1],s=ni((0,e.useState)(null),2),c=s[0],f=s[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 p=function(){if(null!==c)t.onSubmit(l[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(""),u([]),f(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)p();else if(27===e.which)t.onCancel&&t.onCancel();else if(l.length>0){if(38===e.which)if(null===c)f(0);else{var n=Math.max(0,c-1);f(n)}else if(40===e.which)if(null===c)f(0);else{var r=Math.min(l.length-1,c+1);f(r)}}else 40===e.which&&Array.isArray(t.vocabulary)&&u(t.vocabulary)},onChange:function(e){var n=e.target.value;i(n),f(null),n?function(e){if("function"==typeof t.vocabulary){var n=(i=e,(0,t.vocabulary)(i));n.then?n.then(u):u(n)}else{var r=(o=e,t.vocabulary.filter(function(e){return(e.label?e.label:e).toLowerCase().startsWith(o.toLowerCase())}));u(r)}var o,i}(n):u([])},value:o,placeholder:t.placeholder})),e.default.createElement("ul",null,l.length>0&&l.map(function(t,n){return e.default.createElement("li",{key:"".concat(t.label?t.label:t).concat(n),onClick:p,onMouseEnter:function(){return f(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 li(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){ui(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 ui(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 si(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=[],l=!0,u=!1;try{for(o=(t=t.call(e)).next;!(l=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);l=!0);}catch(s){u=!0,r=s}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return si(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)?si(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],l=i[1],u=function(e){return function(t){l(a!==e&&e)}},s=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:u(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:s(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(li(li({},r),{},{value:o})):n.length>0&&0===o.length?t.onRemoveBody(r):n!==o&&t.onUpdateBody(r,li(li({},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 fi(e){return(fi="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 pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function di(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pi(Object(n),!0).forEach(function(t){hi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hi(e,t,n){return(t=yi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yi(e){var t=function(e){if("object"!=fi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fi(t)?t:t+""}function mi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mi=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"==fi(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,mi()?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,yi(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 Si={COMMENT:Ho,TAG:ci},Ai=[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(Si[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,l=i.top,u=i.right,s=i.bottom;if(t.style.top="".concat(s-o.top+14,"px"),t.style.left="".concat(a-o.left,"px"),r){var c=t.children[1].getBoundingClientRect(),f=e.ownerDocument.defaultView,p=f.innerWidth,d=f.innerHeight;if(c.right>p&&(t.classList.remove("r6o-arrow-left"),t.classList.add("r6o-arrow-right"),t.style.left="".concat(u-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(l-o.top-h-14,"px")}var y=t.children[1].getBoundingClientRect();if(y.top<0){t.classList.add("pushed","down"),t.style.top="".concat(-o.top,"px");var m=s-o.top;y.height-o.top>m&&t.classList.remove("r6o-arrow-bottom")}y.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 ji(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ji(Object(n),!0).forEach(function(t){Ti(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ji(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pi(e){return function(e){if(Array.isArray(e))return ki(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 ki(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)?ki(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 ki(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 Ii(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ii=function(){return!!e})()}function Di(e){return(Di=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ri(e,t){return(Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ti(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 _i,Gi=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)},Bi=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),Ti(r=function(e,t,n){return t=Di(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,Ii()?Reflect.construct(t,n||[],Di(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)}),Ti(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}),Ti(r,"getCurrentAnnotation",function(){return r.state.currentAnnotation.clone()}),Ti(r,"hasChanges",function(){var e;return!(null!==(e=r.props.annotation)&&void 0!==e&&e.isEqual(r.state.currentAnnotation))}),Ti(r,"updateCurrentAnnotation",function(e,t){r.setState({currentAnnotation:r.state.currentAnnotation.clone(e)},function(){t?r.onOk():r.props.onChanged&&r.props.onChanged()})}),Ti(r,"onAppendBody",function(e,t){return r.updateCurrentAnnotation({body:[].concat(Pi(r.state.currentAnnotation.bodies),[Mi(Mi({},e),r.creationMeta(e))])},t)}),Ti(r,"onUpdateBody",function(e,t,n){return r.updateCurrentAnnotation({body:r.state.currentAnnotation.bodies.map(function(n){return n===e?Mi(Mi({},t),r.creationMeta(t)):n})},n)}),Ti(r,"onRemoveBody",function(e,t){return r.updateCurrentAnnotation({body:r.state.currentAnnotation.bodies.filter(function(t){return t!==e})},t)}),Ti(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)}}),Ti(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:Mi(Mi({},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 Mi(Mi({},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:Mi(Mi({},e.updated),r.creationMeta(e.updated))}})),Pi(n.filter(function(e){return e.previous}))),l=[].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:l},t)}),Ti(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(Ti({},e,t));else{var n=r.currentAnnotation.clone();delete n[e],r.setState({currentAnnotation:n})}}),Ti(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}))}),Ti(r,"onCancel",function(){return r.props.onCancel(r.props.annotation)}),Ti(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)}),Ti(r,"onDelete",function(){return r.props.onAnnotationDeleted(r.props.annotation)}),r.element=e.default.createRef(),r.state={currentAnnotation:t.annotation,dragged:!1,selectionBounds:Gi(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&&Ri(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=Gi(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):Ai,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,Mi(Mi({},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),Li=r(8202),Hi=r.n(Li),Ui="http://www.w3.org/2000/svg",zi=function(e){var t=e.getAttribute("class");return t?new Set(t.split(" ")):new Set},Yi=function(e,t){var n=zi(e);n.add(t),e.setAttribute("class",Array.from(n).join(" "))},Fi=function(e,t){var n=zi(e);n.delete(t),0===n.size?e.removeAttribute("class"):e.setAttribute("class",Array.from(n).join(" "))},Vi=function(e,t){return zi(e).has(t)},Wi=new Uint8Array(16);function Ji(){if(!_i&&!(_i="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 _i(Wi)}const Qi=/^(?:[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)||!Qi.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 la(e){return(la="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 ua(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 sa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ua(Object(n),!0).forEach(function(t){ca(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ua(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ca(e,t,n){return(t=fa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fa(e){var t=function(e){if("object"!=la(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=la(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==la(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 pa=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,fa(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=sa(sa({},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=[],l=!0,u=!1;try{for(o=(t=t.call(e)).next;!(l=(n=o.call(t)).done)&&(a.push(n.value),4!==a.length);l=!0);}catch(s){u=!0,r=s}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)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.")}(),l=a[0],u=a[1],s=a[2],c=a[3];return"percent"===i.toLowerCase()&&(l=l*t.naturalWidth/100,u=u*t.naturalHeight/100,s=s*t.naturalWidth/100,c=c*t.naturalHeight/100),{x:l,y:u,w:s,h:c}}},ya=function(e,t,n,r,o,i,a){return"percent"===(null==i?void 0:i.toLowerCase())?(l=t,u=n,s=r,f=a,p=e/(c=o).naturalWidth*100,d=l/c.naturalHeight*100,h=u/c.naturalWidth*100,y=s/c.naturalHeight*100,{source:c.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:"xywh=percent:".concat(p,",").concat(d,",").concat(h,",").concat(y)},color:f,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 l,u,s,c,f,p,d,h,y},ma=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(Ui,"path");i.setAttribute("fill-rule","evenodd");var a=e.naturalWidth,l=e.naturalHeight;return i.setAttribute("d","M0 0 h".concat(a," v").concat(l," 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,l=t.naturalHeight;e.setAttribute("d","M0 0 h".concat(a," v").concat(l," 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,l=o.w,u=o.h,s=document.createElementNS(Ui,"g");if(0===l&&0===u){var c;Yi(s,"a9s-point"),Yi(s,"a9s-non-scaling"),s.setAttribute("transform-origin","".concat(i," ").concat(a));var f=document.createElementNS(Ui,"circle"),p=document.createElementNS(Ui,"circle");p.setAttribute("class","a9s-inner"),ba(p,i,a),f.setAttribute("class","a9s-outer"),ba(f,i,a),null!==(c=e.target)&&void 0!==c&&c.color&&(p.setAttribute("style","stroke: ".concat(e.target.color,";fill: none;")),f.setAttribute("style","stroke: ".concat(e.target.color,";fill: none;"))),s.appendChild(f),s.appendChild(p)}else{var d,h=document.createElementNS(Ui,"rect"),y=document.createElementNS(Ui,"rect");y.setAttribute("class","a9s-inner"),ma(y,i,a,l,u),h.setAttribute("class","a9s-outer"),ma(h,i,a,l,u),null!==(d=e.target)&&void 0!==d&&d.color&&(y.setAttribute("style","stroke: ".concat(e.target.color,";")),h.setAttribute("style","stroke: ".concat(e.target.color,";"))),s.appendChild(h),s.appendChild(y)}return s},Sa=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}},Aa=function(e,t,n,r,o){var i=e.querySelector(".a9s-inner"),a=e.querySelector(".a9s-outer");"rect"===a.nodeName?(ma(i,t,n,r,o),ma(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 l=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){l.group.style.display=null,l.opposite=[e,t];var n=l.bbox,r=n.x,o=n.y,i=n.w,a=n.h;va(l.mask,l.env.image,r,o,i,a),Aa(l.rect,r,o,i,a)}),Ea(this,"getBoundingClientRect",function(){return l.rect.getBoundingClientRect()}),Ea(this,"toSelection",function(){var e=l.bbox,t=e.x,n=e.y,r=e.w,o=e.h;return new pa(ya(t,n,r,o,l.env.image,l.config.fragmentUnit,l.color))}),Ea(this,"destroy",function(){l.group.parentNode.removeChild(l.group),l.mask=null,l.rect=null,l.group=null}),this.anchor=[t,n],this.opposite=[t,n],this.config=o,this.env=i,this.color=a,this.group=document.createElementNS(Ui,"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}}]),ja={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},Ma=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 ka(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ia(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,La(r.key),r)}}function Da(e,t,n){return t&&Ia(e.prototype,t),n&&Ia(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ra(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,Ta()?Reflect.construct(t,n||[],Na(e).constructor):t.apply(e,n))}function Ta(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ta=function(){return!!e})()}function Na(e){return(Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _a(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&&Ga(e,t)}function Ga(e,t){return(Ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ba(e,t,n){return(t=La(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function La(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",Ua=Ma(),za=function(e){function t(e,n,r,o){var i;ka(this,t),Ba(i=Ra(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))}),Ba(i,"getSVGPoint",function(e){var t=i.svg.createSVGPoint();if(Ua){var n=i.svg.getBoundingClientRect(),r=e.clientX-n.x,o=e.clientY-n.y,a=i.svg.getBoundingClientRect(),l=a.left,u=a.top;return t.x=r+l,t.y=o+u,t.matrixTransform(i.g.getScreenCTM().inverse())}return t.x=e.offsetX,t.y=e.offsetY,t.matrixTransform(i.g.getCTM().inverse())}),Ba(i,"drawHandle",function(e,t){var n=document.createElementNS(Ui,"g");n.setAttribute("class","a9s-handle");var r=document.createElementNS(Ui,"g"),o=function(n){var r=document.createElementNS(Ui,"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,l=o(a);l.setAttribute("class","a9s-handle-inner");var u=o(a+1);return u.setAttribute("class","a9s-handle-outer"),r.appendChild(u),r.appendChild(l),n.appendChild(r),n}),Ba(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))}),Ba(i,"getHandleXY",function(e){var t=e.querySelector(".a9s-handle-outer");return{x:parseFloat(t.getAttribute("cx")),y:parseFloat(t.getAttribute("cy"))}}),Ba(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 _a(t,e),Da(t,[{key:"destroy",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null}}])}(n()),Ya=function(e){function t(e,n,r,o){var i;return ka(this,t),Ba(i=Ra(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))}),Ba(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)}),Ba(i,"start",function(e,t){var n=i.getSVGPoint(e),r=n.x,o=n.y,a=i.env.image,l=a.naturalWidth,u=a.naturalHeight,s=r<0?0:r>l?l:r,c=o<0?0:o>u?u:o;i.startDrawing(s,c,t,e)}),Ba(i,"startDrawing",function(e){throw new Error(Ha)}),Ba(i,"createEditableShape",function(e,t){throw new Error(Ha)}),i.started=!1,i}return _a(t,e),Da(t,[{key:"isDrawing",get:function(){throw new Error(Ha)}}])}(za);function Fa(e){return(Fa="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 Wa(e){return(Wa=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 Qa(e){var t=function(e){if("object"!=Fa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fa(t)?t:t+""}Ya.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,l,u,s;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=Qa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}((l=this,s=[n,r,o,i],u=Wa(u=t),a=function(e,t){if(t&&("object"==Fa(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)}(l,Va()?Reflect.construct(u,s||[],Wa(l).constructor):u.apply(l,s))),"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,Qa(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);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),el=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))},tl=function(e,t,n){if(!n)return e;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 l in r)r.hasOwnProperty(l)&&l.startsWith("data-")&&(e[l]=r[l]);return e},{}),o=r.className,i=r.style,a=r.elements;if(o&&Yi(e,o),i){var l=e.querySelector(".a9s-outer"),u=e.querySelector(".a9s-inner");l&&u?(l.setAttribute("style","display:none"),u.setAttribute("style",i)):e.setAttribute("style",i)}for(var s 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,l=document.createElementNS(Ui,"svg");l.setAttribute("class","a9s-formatter-el"),el(l,r,o,i,a);var u=document.createElementNS(Ui,"g");u.appendChild(e),l.appendChild(u),t.append(l)}(t,e)}),r)r.hasOwnProperty(s)&&s.startsWith("data-")&&e.setAttribute(s,r[s])},nl=function(e,t,n,r,o){var i=e.querySelector(".a9s-formatter-el");i&&el(i,t,n,r,o)};function rl(e){return(rl="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 ol(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,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(c){s=!0,o=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return il(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)?il(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 il(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 al(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(al=function(){return!!e})()}function ll(){return ll="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ul(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}},ll.apply(null,arguments)}function ul(e){return(ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sl(e,t){return(sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cl(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"!=rl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rl(t)?t:t+""}var pl="corner",dl="edge",hl=function(e){function t(e,n,r,o,i){var a,l,u,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),cl((l=this,s=[e,n,r,o,i],u=ul(u=t),a=function(e,t){if(t&&("object"==rl(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)}(l,al()?Reflect.construct(u,s||[],ul(l).constructor):u.apply(l,s))),"onScaleChanged",function(){return a.handles.map(a.scaleHandle)}),cl(a,"setSize",function(e,t,n,r){Aa(a.rectangle,e,t,n,r),va(a.mask,a.env.image,e,t,n,r),nl(a.elementGroup,e,t,n,r);var o=ol(a.handles,8),i=o[0],l=o[1],u=o[2],s=o[3],c=o[4],f=o[5],p=o[6],d=o[7];a.setHandleXY(i,e,t),a.setHandleXY(l,e+n,t),a.setHandleXY(u,e+n,t+r),a.setHandleXY(s,e,t+r),a.enableEdgeControls&&(a.setHandleXY(c,e+n/2,t),a.setHandleXY(f,e+n,t+r/2),a.setHandleXY(p,e+n/2,t+r),a.setHandleXY(d,e,t+r/2))}),cl(a,"stretchCorners",function(e,t,n){var r=a.getHandleXY(t),o=n.x-r.x,i=n.y-r.y,l=o>0?r.x:n.x,u=i>0?r.y:n.y,s=Math.abs(o),c=Math.abs(i);return a.setSize(l,u,s,c),{x:l,y:u,w:s,h:c}}),cl(a,"stretchEdge",function(e,t,n){var r=a.getHandleXY(t),o=Sa(a.rectangle),i=e%2==0,l=i?o.w:n.x-r.x,u=i?n.y-r.y:o.h,s=i?o.x:l>0?r.x:n.x,c=i?u>0?r.y:n.y:o.y,f=Math.abs(l),p=Math.abs(u);return a.setSize(s,c,f,p),{x:s,y:c,w:f,h:p}}),cl(a,"onGrab",function(e,t){return function(n){if(0===n.button){a.grabbedElem=e,a.grabbedType=t;var r=a.getSVGPoint(n),o=Sa(a.rectangle),i=o.x,l=o.y;a.mouseOffset={x:r.x-i,y:r.y-l}}}}),cl(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=Sa(a.rectangle),l=i.w,u=i.h,s=a.env.image,c=s.naturalWidth,f=s.naturalHeight,p=t(n.x-a.mouseOffset.x,c-l),d=t(n.y-a.mouseOffset.y,f-u);a.setSize(p,d,l,u);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",ya(p,d,l,u,a.env.image,a.config.fragmentUnit,h))}else{var y,m,b=a.handles.indexOf(a.grabbedElem),g=a.handles[2^b],v=a.grabbedType===pl?a.stretchCorners(b,g,n):a.stretchEdge(b,g,n),w=v.x,S=v.y,A=v.w,O=v.h,E=null!==(y=a.annotation.target)&&void 0!==y&&y.color?null===(m=a.annotation.target)||void 0===m?void 0:m.color:a.color?a.color:null;a.emit("update",ya(w,S,A,O,a.env.image,a.config.fragmentUnit,E))}}}}),cl(a,"onMouseUp",function(e){a.grabbedElem=null,a.grabbedType=null,a.mouseOffset=null}),cl(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),f=c.x,p=c.y,d=c.w,h=c.h;a.containerGroup=document.createElementNS(Ui,"g"),a.mask=ga(o.image,f,p,d,h),a.mask.setAttribute("class","a9s-selection-mask"),a.containerGroup.appendChild(a.mask),a.elementGroup=document.createElementNS(Ui,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.rectangle=wa(f,p,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 y=a.enableEdgeControls?[[f+d/2,p,dl],[f+d,p+h/2,dl],[f+d/2,p+h,dl],[f,p+h/2,dl]]:[];return a.handles=[[f,p,pl],[f+d,p,pl],[f+d,p+h,pl],[f,p+h,pl]].concat(y).map(function(e){var t=ol(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),tl(a.rectangle,e,r.formatters),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&&sl(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=ll(ul(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,fl(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function yl(e){return(yl="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){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 bl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ml(Object(n),!0).forEach(function(t){Sl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ml(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gl=function(){return!!e})()}function vl(e){return(vl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wl(e,t){return(wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sl(e,t,n){return(t=Al(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Al(e){var t=function(e){if("object"!=yl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yl(t)?t:t+""}var Ol=function(e){function t(e,n,r,o){var i,a,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Sl((a=this,u=[e,n,r,o],l=vl(l=t),i=function(e,t){if(t&&("object"==yl(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,gl()?Reflect.construct(l,u||[],vl(a).constructor):l.apply(a,u))),"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))}),Sl(i,"stop",function(){i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),Sl(i,"onMouseMove",function(e,t){var n=i.env.image,r=n.naturalWidth,o=n.naturalHeight,a=Math.min(Math.max(e,0),r),l=Math.min(Math.max(t,0),o);i.rubberband.dragTo(a,l)}),Sl(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()}),Sl(i,"createEditableShape",function(e,t){return new hl(e,i.g,bl(bl({},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&&wl(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,Al(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ya);function El(e){return function(e){if(Array.isArray(e))return jl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Cl(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 xl(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Cl(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,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Cl(e,t){if(e){if("string"==typeof e)return jl(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)?jl(e,t):void 0}}function jl(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}Ol.identifier="rect",Ol.supports=function(e){var t=e.selector("FragmentSelector");return null==t?void 0:t.conformsTo.startsWith("http://www.w3.org/TR/media-frags")};var Ml=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)},Pl=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 l=t[i][0],u=t[i][1],s=t[a][0],c=t[a][1];u>r!=c>r&&n<(s-l)*(r-u)/(c-u)+l&&(o=!o)}return o},kl=function(e){var t,n=[],r=[],o=xl(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(El(r)),r=[];else{var l=i.substring(1).split(" ").map(function(e){return parseFloat(e.trim())}),u=a===a.toUpperCase(),s=u?l[0]:l[0]+r[r.length-1][0],c=u?l[1]:l[1]+r[r.length-1][1];r.push([s,c])}}}catch(f){o.e(f)}finally{o.f()}return r.length>0&&n.push(El(r)),n};function Il(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 Dl=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},Rl=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"),l=a.lookupPrefix(Ui),u=a.lookupNamespaceURI(null);return l||u?Dl(a).firstChild:Dl((t=a,n=(new XMLSerializer).serializeToString(t.documentElement).replace("<svg>",'<svg xmlns="'.concat(Ui,'">')),(new DOMParser).parseFromString(n,"image/svg+xml").documentElement)).firstChild}},Tl=function(e){var t=Rl(e),n=document.createElementNS(Ui,"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},Nl=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(Ui,'"'),""),{source:null==t?void 0:t.src,selector:{type:"SvgSelector",value:"<svg>".concat(r,"</svg>")}}};function _l(e){return(_l="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 Gl(e,t,n){return(t=Bl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bl(e){var t=function(e){if("object"!=_l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_l(t)?t:t+""}var Ll=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,Bl(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),Gl(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"))}),Gl(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(Ui,"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 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 Ul(e){return function(e){if(Array.isArray(e))return Yl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||zl(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 zl(e,t){if(e){if("string"==typeof e)return Yl(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)?Yl(e,t):void 0}}function Yl(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 Fl(e,t,n){return(t=Vl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vl(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+""}var Wl=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,Vl(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),Fl(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)}),Fl(this,"getBoundingClientRect",function(){return i.outer.getBoundingClientRect()}),Fl(this,"dragTo",function(e){i.group.style.display=null,i.mousepos=e;var t=[].concat(Ul(i.points),[e]);i.setPoints(t),i.mask.redraw()}),Fl(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=[],l=!0,u=!1;try{for(o=(t=t.call(e)).next;!(l=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);l=!0);}catch(s){u=!0,r=s}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}(e)||zl(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(Ul(i.points),[i.mousepos]),i.setPoints(i.points),i.mask.redraw())}),Fl(this,"destroy",function(){i.group.parentNode.removeChild(i.group),i.polygon=null,i.group=null}),Fl(this,"toSelection",function(){return new pa(Nl(i.group,i.env.image))}),this.points=[t],this.env=r,this.mousepos=t,this.group=document.createElementNS(Ui,"g"),this.polygon=document.createElementNS(Ui,"g"),this.polygon.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Ui,"polygon"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Ui,"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 Ll(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 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 Ql(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 Zl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Zl=function(){return!!e})()}function Xl(e,t){return(Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Kl(){return Kl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ql(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}},Kl.apply(null,arguments)}function ql(e){return(ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $l(e,t,n){return(t=eu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eu(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 tu=function(e){for(var t=e.querySelector(".a9s-inner").points,n=[],r=0;r<t.numberOfItems;r++)n.push(t.getItem(r));return n},nu=function(e){function t(e,n,r,o,i){var a,l,u,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),$l((l=this,s=[e,n,r,o,i],u=ql(u=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)}(l,Zl()?Reflect.construct(u,s||[],ql(l).constructor):u.apply(l,s))),"onScaleChanged",function(){return a.handles.map(a.scaleHandle)}),$l(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,l=o.y,u=o.width,s=o.height;nl(a.elementGroup,i,l,u,s)}),$l(a,"onGrab",function(e){return function(t){0===t.button&&(a.grabbedElem=e,a.grabbedAt=a.getSVGPoint(t))}}),$l(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,l=r.width,u=r.height,s=a.env.image,c=s.naturalWidth,f=s.naturalHeight,p=t(o,n.x-a.grabbedAt.x,c-l),d=t(i,n.y-a.grabbedAt.y,f-u),h=tu(a.shape).map(function(e){return{x:e.x+p,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",Nl(a.shape,a.env.image))}else{var y=a.handles.indexOf(a.grabbedElem),m=tu(a.shape).map(function(e,t){return t===y?n:e});a.setPoints(m),a.setHandleXY(a.handles[y],n.x,n.y),a.emit("update",Nl(a.shape,a.env.image))}}}),$l(a,"onMouseUp",function(e){a.grabbedElem=null,a.grabbedAt=null}),$l(a,"updateState",function(e){var t=Rl(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=[],l=!0,u=!1;try{for(o=(t=t.call(e)).next;!(l=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);l=!0);}catch(s){u=!0,r=s}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return Ql(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)?Ql(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)})}),$l(a,"destroy",function(){a.containerGroup.parentNode.removeChild(a.containerGroup),function(e,t,n){var r=Kl(ql(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(Ui,"g"),a.shape=Tl(e),a.shape.querySelector(".a9s-inner").addEventListener("mousedown",a.onGrab(a.shape)),a.mask=new Ll(o.image,a.shape.querySelector(".a9s-inner")),a.containerGroup.appendChild(a.mask.element),a.elementGroup=document.createElementNS(Ui,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.elementGroup.appendChild(a.shape),a.handles=tu(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),tl(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&&Xl(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,eu(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function ru(e){return(ru="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 ou(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 iu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ou(Object(n),!0).forEach(function(t){su(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ou(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function au(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(au=function(){return!!e})()}function lu(e){return(lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uu(e,t){return(uu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function su(e,t,n){return(t=cu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cu(e){var t=function(e){if("object"!=ru(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ru(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ru(t)?t:t+""}var fu=function(e){function t(e,n,r,o){var i,a,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),su((a=this,u=[e,n,r,o],l=lu(l=t),i=function(e,t){if(t&&("object"==ru(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,au()?Reflect.construct(l,u||[],lu(a).constructor):l.apply(a,u))),"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 Wl([e,t],i.g,i.env,i.color)}),su(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),su(i,"onMouseMove",function(e,t){return i.rubberband.dragTo([e,t])}),su(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())}),su(i,"onDblClick",function(){i._isDrawing=!1;var e=i.rubberband.element;e.annotation=i.rubberband.toSelection(),i.emit("complete",e),i.stop()}),su(i,"createEditableShape",function(e,t){return new nu(e,i.g,iu(iu({},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&&uu(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,cu(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ya);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 du(e,t,n){return(t=hu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hu(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+""}fu.identifier="polygon",fu.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 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,hu(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),du(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"))}),du(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(Ui,"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 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 bu(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 gu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bu(Object(n),!0).forEach(function(t){wu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vu(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 wu(e,t,n){return(t=Su(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Su(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 Au=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,Su(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),wu(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]))}),wu(this,"getBoundingClientRect",function(){return i.outer.getBoundingClientRect()}),wu(this,"dragTo",function(e){i.group.style.display=null,i.mousepos=e;var t,n=[].concat(function(e){if(Array.isArray(e))return vu(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 vu(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)?vu(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()}),wu(this,"addPoint",function(e){i.points.length<=2&&(i.points[2]=e[0],i.points[3]=e[1],i.setPoints(i.points))}),wu(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()}),wu(this,"newPart",function(){i.points.push([])}),wu(this,"destroy",function(){i.group.parentNode.removeChild(i.group),i.Line=null,i.group=null}),wu(this,"toSelection",function(){return new pa(gu(gu({},Nl(i.group,i.env.image)),{},{renderedVia:{name:"line"}}))}),this.points=t,this.env=r,this.group=document.createElementNS(Ui,"g"),this.Line=document.createElementNS(Ui,"g"),this.Line.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Ui,"line"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Ui,"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 yu(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 Ou(e){return(Ou="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 Eu(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 xu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(xu=function(){return!!e})()}function Cu(e,t){return(Cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ju(){return ju="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Mu(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}},ju.apply(null,arguments)}function Mu(e){return(Mu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pu(e,t,n){return(t=ku(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ku(e){var t=function(e){if("object"!=Ou(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ou(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ou(t)?t:t+""}var Iu=function(e){var t=e.querySelector(".a9s-inner");return[[t.x1.baseVal,t.y1.baseVal],[t.x2.baseVal,t.y2.baseVal]]},Du=function(e){function t(e,n,r,o,i){var a,l,u,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Pu((l=this,s=[e,n,r,o,i],u=Mu(u=t),a=function(e,t){if(t&&("object"==Ou(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)}(l,xu()?Reflect.construct(u,s||[],Mu(l).constructor):u.apply(l,s))),"onScaleChanged",function(){return a.handles.map(a.scaleHandle)}),Pu(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 l=a.shape.querySelector(".a9s-outer");l.setAttribute("x1",t),l.setAttribute("y1",n),l.setAttribute("x2",r),l.setAttribute("y2",o),a.mask.redraw();var u=l.getBBox(),s=u.x,c=u.y,f=u.width,p=u.height;nl(a.elementGroup,s,c,f,p)}),Pu(a,"onGrab",function(e){return function(t){0===t.button&&(a.grabbedElem=e,a.grabbedAt=a.getSVGPoint(t))}}),Pu(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,l=r.width,u=r.height,s=a.env.image,c=s.naturalWidth,f=s.naturalHeight,p=t(o,n.x-a.grabbedAt.x,c-l),d=t(i,n.y-a.grabbedAt.y,f-u),h=Iu(a.shape).map(function(e){return{x:e[0].value+p,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",Nl(a.shape,a.env.image))}else{var y=a.handles.indexOf(a.grabbedElem),m=Iu(a.shape).map(function(e,t){return t===y?n:{x:e[0].value,y:e[1].value}});a.setPoints(m),a.setHandleXY(a.handles[y],n.x,n.y),a.emit("update",Nl(a.shape,a.env.image))}}}),Pu(a,"onMouseUp",function(e){a.grabbedElem=null,a.grabbedAt=null}),Pu(a,"updateState",function(e){var t=Rl(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=[],l=!0,u=!1;try{for(o=(t=t.call(e)).next;!(l=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);l=!0);}catch(s){u=!0,r=s}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return Eu(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)?Eu(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)})}),Pu(a,"destroy",function(){a.containerGroup.parentNode.removeChild(a.containerGroup),function(e,t,n){var r=ju(Mu(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(Ui,"g"),a.shape=Tl(e),a.shape.querySelector(".a9s-inner").addEventListener("mousedown",a.onGrab(a.shape)),a.mask=new yu(o.image,a.shape.querySelector(".a9s-inner")),a.containerGroup.appendChild(a.mask.element),a.elementGroup=document.createElementNS(Ui,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.elementGroup.appendChild(a.shape),a.handles=Iu(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),tl(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&&Cu(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,ku(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function Ru(e){return(Ru="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 Nu(e){return(Nu=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 Gu(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"!=Ru(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ru(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ru(t)?t:t+""}var Lu=function(e){function t(e,n,r,o){var i,a,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gu((a=this,u=[e,n,r,o],l=Nu(l=t),i=function(e,t){if(t&&("object"==Ru(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(l,u||[],Nu(a).constructor):l.apply(a,u))),"startDrawing",function(e,t){i._isDrawing=!0,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new Au([e,t],i.g,i.env,i.color)}),Gu(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),Gu(i,"undo",function(){i.rubberband&&i.rubberband.undo()}),Gu(i,"newPart",function(){i.rubberband&&i.rubberband.newPart()}),Gu(i,"onMouseMove",function(e,t){return i.rubberband.dragTo([e,t])}),Gu(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()}}),Gu(i,"createEditableShape",function(e){return new Du(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&&_u(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,Bu(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ya);function Hu(e){return(Hu="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){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 zu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uu(Object(n),!0).forEach(function(t){Yu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yu(e,t,n){return r=function(e){if("object"!=Hu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==Hu(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}Lu.identifier="line",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.*<line/g)};var Fu=function(e,t,n,r,o){return zu(zu({},ya(e,t,0,0,n,r)),{},{color:o,renderedVia:{name:"point"}})};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 Wu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wu=function(){return!!e})()}function Ju(){return Ju="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Qu(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}},Ju.apply(null,arguments)}function Qu(e){return(Qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zu(e,t){return(Zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Xu(e,t,n){return(t=Ku(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ku(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 qu=function(e){function t(e,n,r,o,i){var a,l,u,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Xu((l=this,s=[e,n,r,o,i],u=Qu(u=t),a=function(e,t){if(t&&("object"==Vu(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)}(l,Wu()?Reflect.construct(u,s||[],Qu(l).constructor):u.apply(l,s))),"onScaleChanged",function(){return a.scaleHandle(a.point)}),Xu(a,"onGrab",function(){a.isGrabbed=!0}),Xu(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 l=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,u=Fu(o,i,a.env.image,a.config.fragmentUnit,l);a.emit("update",u)}}),Xu(a,"onMouseUp",function(){a.isGrabbed=!1}),Xu(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),f=c.x,p=c.y;return a.container=document.createElementNS(Ui,"g"),a.elementGroup=document.createElementNS(Ui,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.point=a.drawHandle(f,p),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&&Zu(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=Ju(Qu(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,Ku(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function $u(e){return($u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function es(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(es=function(){return!!e})()}function ts(e){return(ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ns(e,t){return(ns=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function rs(e,t,n){return(t=os(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function os(e){var t=function(e){if("object"!=$u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$u(t)?t:t+""}var is=function(e){function t(e,n,r,o){var i,a,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),rs((a=this,u=[e,n,r,o],l=ts(l=t),i=function(e,t){if(t&&("object"==$u(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,es()?Reflect.construct(l,u||[],ts(a).constructor):l.apply(a,u))),"startDrawing",function(e,t,n,r){var o,a,l=null===(o=r.target.closest(".a9s-annotation"))||void 0===o?void 0:o.annotation;if(l&&"point"===(null===(a=l.target.renderedVia)||void 0===a?void 0:a.name))i.emit("cancel");else{var u=i.drawHandle(e,t);i.scaleHandle(u),i.g.appendChild(u),u.annotation=new pa(Fu(e,t,i.env.image,i.config.fragmentUnit,i.color)),i.emit("complete",u)}}),rs(i,"stop",function(){}),rs(i,"createEditableShape",function(e){return new qu(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&&ns(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,os(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ya);is.identifier="point",is.supports=function(e){return!1};var as=function(e,t,n,r){e.setAttribute("cx",t),e.setAttribute("cy",n),e.setAttribute("r",r)},ls=function(e,t,n,r){var o=e.querySelector(".a9s-inner"),i=e.querySelector(".a9s-outer");as(o,t,n,r),as(i,t,n,r)},us=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 ss(e){return(ss="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 cs(e,t,n){return(t=fs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fs(e){var t=function(e){if("object"!=ss(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ss(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ss(t)?t:t+""}var ps=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,fs(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),cs(this,"redraw",function(){var e=us(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"))}),cs(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.circle=n;var o=us(this.circle),i=o.cx,a=o.cy,l=o.r,u=i+l>this.w?this.w-l:i,s=a+l>this.h?this.h-l:a+l;this.mask=document.createElementNS(Ui,"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(u," ").concat(s," a ").concat(l," ").concat(l," 0 1 1 1 0"))},[{key:"element",get:function(){return this.mask}}]);function ds(e){return(ds="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 hs(e,t,n){return(t=ys(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ys(e){var t=function(e){if("object"!=ds(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ds(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ds(t)?t:t+""}var ms=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,ys(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o,i){var a,l,u,s,c,f=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),hs(this,"dragTo",function(e,t){var n=f.env.image,r=n.naturalWidth,o=n.naturalHeight;f.group.style.display=null;var i=e-f.anchor[0],a=t-f.anchor[1],l=Math.max(1,Math.pow(Math.pow(i,2)+Math.pow(a,2),.5)/2),u=f.anchor[0]+i/2,s=f.anchor[1]+a/2;u-l<0||u+l>r||s-l<0||s+l>o||(ls(f.circle,u,s,l),f.mask.redraw())}),hs(this,"getBoundingClientRect",function(){return f.circle.getBoundingClientRect()}),hs(this,"toSelection",function(){return new pa(Nl(f.group,f.env.image))}),hs(this,"destroy",function(){f.group.parentNode.removeChild(f.group),f.mask=null,f.circle=null,f.group=null}),this.anchor=[t,n],this.env=o,this.group=document.createElementNS(Ui,"g"),this.circle=(a=t,l=n,u=document.createElementNS(Ui,"g"),s=document.createElementNS(Ui,"circle"),(c=document.createElementNS(Ui,"circle")).setAttribute("class","a9s-inner"),as(c,a,l,2),s.setAttribute("class","a9s-outer"),as(s,a,l,2),u.appendChild(s),u.appendChild(c),u),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 ps(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 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 gs(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,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(c){s=!0,o=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(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}}(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 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 ws(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ws=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=As(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 As(e){return(As=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Os(e,t){return(Os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Es(e,t,n){return(t=xs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xs(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 Cs=function(e){function t(e,n,r,o){var i,a,l,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Es((a=this,u=[e,n,r,o],l=As(l=t),i=function(e,t){if(t&&("object"==bs(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,ws()?Reflect.construct(l,u||[],As(a).constructor):l.apply(a,u))),"setSize",function(e,t,n){ls(i.circle,e,t,n),i.mask.redraw(),nl(i.elementGroup,e,t,n,n);var r=gs(i.handles,4),o=r[0],a=r[1],l=r[2],u=r[3];i.setHandleXY(o,e,t-n),i.setHandleXY(a,e+n,t),i.setHandleXY(l,e,t+n),i.setHandleXY(u,e-n,t)}),Es(i,"stretchCorners",function(e,t,n){var r,o=i.getHandleXY(t),a=n.x,l=n.y,u=0,s=0;0==e||2==e?(a=o.x,s=l-o.y,r=Math.abs(s)/2):(l=o.y,u=a-o.x,r=Math.abs(u)/2);var c=u>0?o.x:a,f=s>0?o.y:l,p=c+Math.abs(u)/2,d=f+Math.abs(s)/2;if(ls(i.circle,p,d,r),i.mask.redraw(),nl(i.elementGroup,p,d,r,r),0==e||2==e){var h=0,y=2;(0==e&&s>0||2==e&&s<0)&&(h=2,y=0),i.setHandleXY(i.handles[h],p,d-r),i.setHandleXY(i.handles[y],p,d+r),i.setHandleXY(i.handles[1],p+r,d),i.setHandleXY(i.handles[3],p-r,d)}else{var m=3,b=1;(1==e&&u>0||3==e&&u<0)&&(m=1,b=3),i.setHandleXY(i.handles[m],p+r,d),i.setHandleXY(i.handles[b],p-r,d),i.setHandleXY(i.handles[0],p,d-r),i.setHandleXY(i.handles[2],p,d+r)}}),Es(i,"onGrab",function(e){return function(t){i.grabbedElem=e;var n=i.getSVGPoint(t),r=us(i.circle),o=r.cx,a=r.cy;i.grabbedAt={x:n.x-o,y:n.y-a}}}),Es(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=us(i.circle).r,o=i.env.image,a=o.naturalWidth,l=o.naturalHeight,u=Math.max(t(n.x-i.grabbedAt.x,a-r),r),s=Math.max(t(n.y-i.grabbedAt.y,l-r),r);i.setSize(u,s,r),i.emit("update",Nl(i.circle,i.env.image))}else{var c=i.handles.indexOf(i.grabbedElem),f=c<2?i.handles[c+2]:i.handles[c-2];i.stretchCorners(c,f,n),i.emit("update",Nl(i.circle,i.env.image))}}}),Es(i,"onMouseUp",function(){i.grabbedElem=null,i.grabbedAt=null}),Es(i,"onScaleChanged",function(e){return i.handles.map(i.scaleHandle)}),Es(i,"updateState",function(e){var t=Rl(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(Ui,"g"),i.circle=Tl(e),i.circle.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.circle)),i.mask=new ps(o.image,i.circle),i.containerGroup.appendChild(i.mask.element),i.elementGroup=document.createElementNS(Ui,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.circle);var s=us(i.circle),c=s.cx,f=s.cy,p=s.r;return i.handles=[[c,f-p],[c+p,f],[c,f+p],[c-p,f]].map(function(e){var t=gs(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),tl(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&&Os(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(As(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,xs(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function js(e){return(js="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 Ms(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ms=function(){return!!e})()}function Ps(e){return(Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ks(e,t){return(ks=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Is(e,t,n){return(t=Ds(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ds(e){var t=function(e){if("object"!=js(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=js(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==js(t)?t:t+""}var Rs=function(e){function t(e,n,r,o){var i,a,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Is((a=this,u=[e,n,r,o],l=Ps(l=t),i=function(e,t){if(t&&("object"==js(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,Ms()?Reflect.construct(l,u||[],Ps(a).constructor):l.apply(a,u))),"startDrawing",function(e,t){i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new ms(e,t,i.g,i.env,i.color)}),Is(i,"stop",function(){i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),Is(i,"onMouseMove",function(e,t){return i.rubberband.dragTo(e,t)}),Is(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()}),Is(i,"createEditableShape",function(e){return new Cs(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&&ks(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,Ds(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ya);Rs.identifier="circle",Rs.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 Ts=function(e,t,n,r,o){e.setAttribute("cx",t),e.setAttribute("cy",n),e.setAttribute("rx",r),e.setAttribute("ry",o)},Ns=function(e,t,n,r,o){var i=e.querySelector(".a9s-inner"),a=e.querySelector(".a9s-outer");Ts(i,t,n,r,o),Ts(a,t,n,r,o)},_s=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 Gs(e){return(Gs="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=Ls(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ls(e){var t=function(e){if("object"!=Gs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gs(t)?t:t+""}var Hs=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,Ls(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(){var e=_s(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"))}),Bs(this,"destroy",function(){return r.mask.parentNode.removeChild(r.mask)}),this.w=t.naturalWidth,this.h=t.naturalHeight,this.ellipse=n;var o=_s(this.ellipse),i=o.cx,a=o.cy,l=o.rx,u=o.ry,s=a+u;this.mask=document.createElementNS(Ui,"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(s," a ").concat(l," ").concat(u," 0 1 1 1 0"))},[{key:"element",get:function(){return this.mask}}]);function Us(e){return(Us="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 zs(e,t,n){return(t=Ys(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ys(e){var t=function(e){if("object"!=Us(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Us(t)?t:t+""}var Fs=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,Ys(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r,o,i){var a,l,u,s,c,f=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),zs(this,"dragTo",function(e,t){f.group.style.display=null;var n=e-f.anchor[0],r=t-f.anchor[1],o=n>0?f.anchor[0]+n/2:e+n/2,i=r>0?f.anchor[1]+r/2:t+r/2,a=Math.abs(n/2),l=Math.abs(r/2);Ns(f.ellipse,o,i,a,l),f.mask.redraw()}),zs(this,"getBoundingClientRect",function(){return f.ellipse.getBoundingClientRect()}),zs(this,"toSelection",function(){return new pa(Nl(f.group,f.env.image))}),zs(this,"destroy",function(){f.group.parentNode.removeChild(f.group),f.mask=null,f.ellipse=null,f.group=null}),this.anchor=[t,n],this.env=o,this.group=document.createElementNS(Ui,"g"),this.ellipse=(a=t,l=n,u=document.createElementNS(Ui,"g"),s=document.createElementNS(Ui,"ellipse"),c=document.createElementNS(Ui,"ellipse"),s.setAttribute("class","a9s-inner"),Ts(s,a,l,2,2),c.setAttribute("class","a9s-outer"),Ts(c,a,l,2,2),u.appendChild(c),u.appendChild(s),u),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 Hs(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 Vs(e){return(Vs="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 Ws(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,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(c){s=!0,o=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Js(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)?Js(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 Js(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(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Qs=function(){return!!e})()}function Zs(){return Zs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Xs(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}},Zs.apply(null,arguments)}function Xs(e){return(Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ks(e,t){return(Ks=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function qs(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"!=Vs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vs(t)?t:t+""}var ec=function(e){function t(e,n,r,o){var i,a,l,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),qs((a=this,u=[e,n,r,o],l=Xs(l=t),i=function(e,t){if(t&&("object"==Vs(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,Qs()?Reflect.construct(l,u||[],Xs(a).constructor):l.apply(a,u))),"setSize",function(e,t,n,r){Ns(i.ellipse,e,t,n,r),i.mask.redraw(),nl(i.elementGroup,e,t,n,r);var o=Ws(i.handles,4),a=o[0],l=o[1],u=o[2],s=o[3];i.setHandleXY(a,e,t-r),i.setHandleXY(l,e+n,t),i.setHandleXY(u,e,t+r),i.setHandleXY(s,e-n,t)}),qs(i,"stretchCorners",function(e,t,n,r){var o=i.getHandleXY(t),a=i.getHandleXY(n),l=r.x,u=r.y,s=0,c=0;0==e||2==e?l=o.x:u=o.y;var f=l-o.x,p=u-o.y,d=f>0?o.x:l,h=p>0?o.y:u,y=Math.abs(f),m=Math.abs(p),b=d+y/2,g=h+m/2;if(s=y/2,c=m/2,0==e||2==e?s=Math.abs(o.x-a.x):c=Math.abs(o.y-a.y),Ns(i.ellipse,b,g,s,c),i.mask.redraw(),nl(i.elementGroup,b,g,s,c),0==e||2==e){var v=0,w=2;(0==e&&p>0||2==e&&p<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+s,g),i.setHandleXY(i.handles[3],b-s,g)}else{var S=3,A=1;(1==e&&f>0||3==e&&f<0)&&(S=1,A=3),i.setHandleXY(i.handles[S],b+s,g),i.setHandleXY(i.handles[A],b-s,g),i.setHandleXY(i.handles[0],b,g-c),i.setHandleXY(i.handles[2],b,g+c)}}),qs(i,"onGrab",function(e){return function(t){i.grabbedElem=e;var n=i.getSVGPoint(t),r=_s(i.ellipse),o=r.cx,a=r.cy;i.grabbedAt={x:n.x-o,y:n.y-a}}}),qs(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=_s(i.ellipse),o=r.rx,a=r.ry,l=i.env.image,u=l.naturalWidth,s=l.naturalHeight,c=t(n.x-i.grabbedAt.x,u-o),f=t(n.y-i.grabbedAt.y,s-a);i.setSize(c,f,o,a),i.emit("update",Nl(i.ellipse,i.env.image))}else{var p=i.handles.indexOf(i.grabbedElem),d=p<2?i.handles[p+2]:i.handles[p-2],h=i.handles[(p+3)%4];i.stretchCorners(p,d,h,n),i.emit("update",Nl(i.ellipse,i.env.image))}}}),qs(i,"onMouseUp",function(){i.grabbedElem=null,i.grabbedAt=null}),qs(i,"onScaleChanged",function(e){return i.handles.map(i.scaleHandle)}),qs(i,"updateState",function(e){var t=Rl(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(Ui,"g"),i.ellipse=Tl(e),i.ellipse.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.ellipse)),i.mask=new Hs(o.image,i.ellipse),i.containerGroup.appendChild(i.mask.element),i.elementGroup=document.createElementNS(Ui,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.ellipse);var s=_s(i.ellipse),c=s.cx,f=s.cy,p=s.rx,d=s.ry;return i.handles=[[c,f-d],[c+p,f],[c,f+d],[c-p,f]].map(function(e){var t=Ws(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),tl(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&&Ks(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=Zs(Xs(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,$s(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function tc(e){return(tc="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 nc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(nc=function(){return!!e})()}function rc(e){return(rc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oc(e,t){return(oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ic(e,t,n){return(t=ac(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ac(e){var t=function(e){if("object"!=tc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tc(t)?t:t+""}var lc=function(e){function t(e,n,r,o){var i,a,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ic((a=this,u=[e,n,r,o],l=rc(l=t),i=function(e,t){if(t&&("object"==tc(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,nc()?Reflect.construct(l,u||[],rc(a).constructor):l.apply(a,u))),"startDrawing",function(e,t){i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp}),i.rubberband=new Fs(e,t,i.g,i.env,i.color)}),ic(i,"stop",function(){i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),ic(i,"onMouseMove",function(e,t){return i.rubberband.dragTo(e,t)}),ic(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()}),ic(i,"createEditableShape",function(e){return new ec(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&&oc(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,ac(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ya);function uc(e){return(uc="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(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 cc(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"!=uc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=uc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==uc(t)?t:t+""}lc.identifier="ellipse",lc.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 pc=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,fc(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),cc(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)}),cc(this,"getBoundingClientRect",function(){return i.outer.getBoundingClientRect()}),cc(this,"dragTo",function(e){i.group.style.display=null,i.addPoint(e)}),cc(this,"addPoint",function(e){var t;i.points=[].concat(function(e){if(Array.isArray(e))return sc(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 sc(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)?sc(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)}),cc(this,"destroy",function(){i.group.parentNode.removeChild(i.group),i.freehand=null,i.group=null}),cc(this,"toSelection",function(){return new pa(Nl(i.group,i.env.image))}),this.points=[t],this.env=r,this.group=document.createElementNS(Ui,"g"),this.freehand=document.createElementNS(Ui,"g"),this.freehand.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Ui,"path"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Ui,"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 dc(e){return(dc="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 hc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(hc=function(){return!!e})()}function yc(e,t){return(yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mc(){return mc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=bc(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}},mc.apply(null,arguments)}function bc(e){return(bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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"!=dc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dc(t)?t:t+""}var wc=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},Sc=function(e){return e.querySelector(".a9s-inner").getBBox()},Ac=function(e){function t(e,n,r,o){var i,a,l,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),gc((a=this,u=[e,n,r,o],l=bc(l=t),i=function(e,t){if(t&&("object"==dc(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,hc()?Reflect.construct(l,u||[],bc(a).constructor):l.apply(a,u))),"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,l=o.y,u=o.width,s=o.height;nl(i.elementGroup,a,l,u,s)}),gc(i,"onGrab",function(e){return function(t){i.grabbedElem=e;var n=i.getSVGPoint(t);i.grabbedAt={x:n.x,y:n.y}}}),gc(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=Sc(i.shape),o=r.x,a=r.y,l=r.width,u=r.height;if(i.grabbedElem===i.shape){var s=i.env.image,c=s.naturalWidth,f=s.naturalHeight,p=t(o,n.x-i.grabbedAt.x,c-l),d=t(a,n.y-i.grabbedAt.y,f-u),h=i.shape.querySelector(".a9s-inner"),y=wc(h).map(function(e){return{x:e.x+p,y:e.y+d}});i.grabbedAt=n,i.setPoints(y),i.emit("update",Nl(i.shape,i.env.image))}}}),gc(i,"onMouseUp",function(e){i.grabbedElem=null,i.grabbedAt=null}),gc(i,"updateState",function(e){var t=wc(Rl(e));i.setPoints(t)}),gc(i,"destroy",function(){i.containerGroup.parentNode.removeChild(i.containerGroup),function(e,t,n){var r=mc(bc(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(Ui,"g"),i.shape=Tl(e),i.elementGroup=document.createElementNS(Ui,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.shape),i.containerGroup.appendChild(i.elementGroup),n.appendChild(i.containerGroup),tl(i.shape,e,r.formatter),i.shape.querySelector(".a9s-inner").addEventListener("mousedown",i.onGrab(i.shape));var s=Sc(i.shape);return s.x,s.y,s.width,s.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&&yc(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,vc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function Oc(e){return(Oc="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 Ec(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ec=function(){return!!e})()}function xc(e){return(xc=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 jc(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"!=Oc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Oc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oc(t)?t:t+""}var Pc=function(e){function t(e,n,r,o){var i,a,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),jc((a=this,u=[e,n,r,o],l=xc(l=t),i=function(e,t){if(t&&("object"==Oc(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(l,u||[],xc(a).constructor):l.apply(a,u))),"startDrawing",function(e,t){i._isDrawing=!0,i.attachListeners({mouseMove:i.onMouseMove,mouseUp:i.onMouseUp,dblClick:i.onDblClick}),i.rubberband=new pc([e,t],i.g,i.env,i.color)}),jc(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),jc(i,"onMouseMove",function(e,t){return i.rubberband.dragTo([e,t])}),jc(i,"onMouseUp",function(e,t){i.onDblClick(e,t)}),jc(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,l=i.config.minSelectionHeight||4;if(r>=a||o>=l){var u=i.rubberband.element;u.annotation=i.rubberband.toSelection(),i.emit("complete",u)}else i.emit("cancel");i.stop()}),jc(i,"createEditableShape",function(e){return new Ac(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&&Cc(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,Mc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ya);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 Ic(e){return function(e){if(Array.isArray(e))return Tc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Rc(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 Dc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Rc(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,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Rc(e,t){if(e){if("string"==typeof e)return Tc(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)?Tc(e,t):void 0}}function Tc(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 Nc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Nc=function(){return!!e})()}function _c(e){return(_c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gc(e,t){return(Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Bc(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+""}Pc.identifier="freehand",Pc.supports=function(e){var t=e.selector("SvgSelector");if(t)return t.value.match(/^<svg.*<path*/g)&&!t.value.toUpperCase().includes("Z")};var Hc=function(e){function t(e,n,r,o,i){var a,l,u,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Bc((l=this,s=[n,r,o,i],u=_c(u=t),a=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)}(l,Nc()?Reflect.construct(u,s||[],_c(l).constructor):u.apply(l,s))),"setPoints",function(e){var t,n="",r=Dc(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,i="";if(o.length>0){var l,u=Dc(o);try{for(u.s();!(l=u.n()).done;){var s=l.value;s&&(i+=""===i?"M".concat(s[0],",").concat(s[1]):" L".concat(s[0],",").concat(s[1]))}}catch(c){u.e(c)}finally{u.f()}n+=i}}}catch(c){r.e(c)}finally{r.f()}n+=" Z",a.outer.setAttribute("d",n),a.inner.setAttribute("d",n)}),Bc(a,"close",function(){var e=new e(Nl(a.points,a.env.image));a.emit("close",{shape:a.multipolygon,multipolygon:e})}),Bc(a,"getBoundingClientRect",function(){return a.outer.getBoundingClientRect()}),Bc(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(Ic(t),[e,t[0]]);n.push(r),a.setPoints(n)}),Bc(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)}),Bc(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(Ic(t),[e,t[0]]),a.setPoints(a.points))}else a.points[a.points.length-1]=[e,e],a.setPoints(a.points)}),Bc(a,"undo",function(){a.pop()}),Bc(a,"isClosable",function(){return a.getDistanceToStart()<6*a.scale}),Bc(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)}),Bc(a,"newPart",function(){a.points.push([])}),Bc(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}),Bc(a,"destroy",function(){a.group.parentNode.removeChild(a.group),a.multipolygon=null,a.group=null}),Bc(a,"toSelection",function(){return new pa(Nl(a.group,a.env.image))}),a.points=[],a.points.push([e,e]),a.mousepos=e,a.env=o,a.scale=1,a.group=document.createElementNS(Ui,"g"),a.multipolygon=document.createElementNS(Ui,"g"),a.multipolygon.setAttribute("class","a9s-selection a9s-multipolygon improved-polygon"),a.rubberband=document.createElementNS(Ui,"polygon"),a.rubberband.setAttribute("class","a9s-rubberband"),a.closeHandle=a.drawHandle(e[0],e[1]),a.closeHandle.style.display="none",a.outer=document.createElementNS(Ui,"path"),a.outer.setAttribute("class","a9s-outer"),a.inner=document.createElementNS(Ui,"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&&Gc(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,Lc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(za);function Uc(e){return(Uc="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 zc(e){return function(e){if(Array.isArray(e))return Kc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Xc(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 Yc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Yc=function(){return!!e})()}function Fc(e,t){return(Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vc(){return Vc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Wc(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}},Vc.apply(null,arguments)}function Wc(e){return(Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jc(e,t,n){return(t=Qc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qc(e){var t=function(e){if("object"!=Uc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Uc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Uc(t)?t:t+""}function Zc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Xc(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,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Xc(e,t){if(e){if("string"==typeof e)return Kc(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)?Kc(e,t):void 0}}function Kc(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 qc=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},$c=function(e){var t,n=[],r=Zc(qc(e.querySelector(".a9s-inner").attributes.d.nodeValue));try{for(r.s();!(t=r.n()).done;){var o,i=t.value,a=[],l=Zc(i);try{for(l.s();!(o=l.n()).done;){var u=o.value,s={x:parseFloat(u[0]),y:parseFloat(u[1])};a.push(s)}}catch(c){l.e(c)}finally{l.f()}n.push(a)}}catch(c){r.e(c)}finally{r.f()}return n},ef=function(e){var t,n=Rl(e);t=Rl(e).getAttribute("d"),qc(t);var r=document.createElementNS(Ui,"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},tf=function(e){function t(e,n,r,o){var i,a,l,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Jc((a=this,u=[e,n,r,o],l=Wc(l=t),i=function(e,t){if(t&&("object"==Uc(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,Yc()?Reflect.construct(l,u||[],Wc(a).constructor):l.apply(a,u))),"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}),Jc(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,l=i.drawMidpoint(o,a);return l.addEventListener("mousedown",i.onGrab(l)),i.shape.appendChild(l),l}),Jc(i,"deleteSelected",function(){var e=$c(i.shape);if(i.selected.length>0){var t,n=-1,r=[],o=[],a=Zc(i.midpoints);try{for(a.s();!(t=a.n()).done;){var l=t.value,u=l.filter(function(e,t){return-1===i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)});l.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)}),u.length>2&&o.push(u)}}catch(v){a.e(v)}finally{a.f()}var s,c=Zc(e);try{for(c.s();!(s=c.n()).done;){var f=s.value;n+=1;var p=f.filter(function(e,t){return-1===i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)});p.length>2&&r.push(p)}}catch(v){c.e(v)}finally{c.f()}n=-1;var d,h=[],y=Zc(i.cornerHandles);try{for(y.s();!(d=y.n()).done;){var m=d.value;n+=1;var b=m.filter(function(e,t){return-1!==i.selected.map(function(e){return e[0]===n&&e[1]===t}).indexOf(!0)}),g=m.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){y.e(v)}finally{y.f()}i.midpoints=o,i.cornerHandles=h,i.selected=[],i.setPoints(r)}}),Jc(i,"deselectCorners",function(){return i.cornerHandles.forEach(function(e){return Fi(e,"selected")})}),Jc(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=Vc(Wc(e.prototype),"destroy",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,i)([])}),Jc(i,"drawMidpoint",function(e,t){var n=document.createElementNS(Ui,"circle");return n.setAttribute("class","a9s-midpoint"),n.setAttribute("cx",e),n.setAttribute("cy",t),n.setAttribute("r",5*i.scale),n}),Jc(i,"onAddPoint",function(e){var t,n=$c(i.shape),r=-1,o=-1,a=Zc(i.midpoints);try{for(a.s();!(t=a.n()).done;){var l=t.value;if(o+=1,(r=l.indexOf(i.grabbedElement))>-1)break}}catch(S){a.e(S)}finally{a.f()}var u,s=[],c=-1,f=null,p=null,d=Zc(n);try{for(d.s();!(u=d.n()).done;){var h=u.value;if((c+=1)===o){var y,m=[],b=-1,g=Zc(h);try{for(g.s();!(y=g.n()).done;){var v=y.value;b+=1,m.push(v),b===r&&(m.push(e),f=i.createMidpoint(h,b-1),p=i.createMidpoint(h,b))}}catch(S){g.e(S)}finally{g.f()}s.push(m)}else s.push(h)}}catch(S){d.e(S)}finally{d.f()}var w=i.createCornerHandle(e);i.cornerHandles[o]=[].concat(zc(i.cornerHandles[o].slice(0,r+1)),[w],zc(i.cornerHandles[o].slice(r+1))),i.midpoints[o]=[].concat(zc(i.midpoints[o].slice(0,r)),[f,p],zc(i.midpoints[o].slice(r+1))),i.grabbedElement.parentNode.removeChild(i.grabbedElement),i.grabbedElement=w,i.setPoints(s)}),Jc(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())}}),Jc(i,"onKeyDown",function(e){46===e.which&&i.deleteSelected()}),Jc(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,l=r.width,u=r.height,s=i.env.image,c=s.naturalWidth,f=s.naturalHeight,p=n(o,e.x-i.grabbedAt.x,c-l),d=n(a,e.y-i.grabbedAt.y,f-u),h=[],y=Zc($c(i.shape));try{for(y.s();!(t=y.n()).done;){var m=t.value,b=m.map(function(e){return[e.x,e.y]});Pl([i.grabbedAt.x,i.grabbedAt.y],b)?h.push(m.map(function(e){return{x:e.x+p,y:e.y+d}})):h.push(m)}}catch(g){y.e(g)}finally{y.f()}i.grabbedAt=e,i.setPoints(h)}),Jc(i,"onMoveCornerHandle",function(e,t){var n,r=-1,o=0,a=Zc(i.cornerHandles);try{for(a.s();!(n=a.n()).done;){var l=n.value;if((r=l.indexOf(i.grabbedElement))>-1)break;o+=1}}catch(m){a.e(m)}finally{a.f()}t.ctrlKey?i.selected=Array.from(new Set([].concat(zc(i.selected),[r]))):i.selected.includes(r)||(i.selected=[r]);var u,s=$c(i.shape),c=i.selected.map(function(e){var t=s[o][r],n=s[o][e];return{index:e,dx:n.x-t.x,dy:n.y-t.y}}),f=0,p=[],d=Zc($c(i.shape));try{for(d.s();!(u=d.n()).done;){var h=u.value;if(f===o){var y=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,l=o.dy;return{x:e.x+a,y:e.y+l}}return t});p.push(y)}else p.push(h);f+=1}}catch(m){d.e(m)}finally{d.f()}i.setPoints(p)}),Jc(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",pf($c(i.shape),i.env.image))}}),Jc(i,"onMouseUp",function(e){i.grabbedElement=null,i.grabbedAt=null}),Jc(i,"onScaleChanged",function(e){var t,n=Zc(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=Zc(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()}}),Jc(i,"onSelectCorner",function(e){return function(t){if(!((new Date).getTime()-i.lastMouseDown>250)){var n,r=-1,o=-1,a=Zc(i.cornerHandles);try{for(a.s();!(n=a.n()).done;){var l=n.value;if(r+=1,(o=l.indexOf(e))>0)break}}catch(u){a.e(u)}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(zc(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($c(i.shape))}}}),Jc(i,"setPoints",function(e){var t=ff(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=Zc(e);try{for(a.s();!(r=a.n()).done;){var l=r.value;l.forEach(function(e,t){i.setHandleXY(i.cornerHandles[o][t],e.x,e.y)});for(var u=0;u<l.length;u++){var s=l[u],c=u===l.length-1?l[0]:l[u+1],f=(s.x+c.x)/2,p=(s.y+c.y)/2,d=i.midpoints[o][u];d.setAttribute("cx",f),d.setAttribute("cy",p)}o+=1}}catch(O){a.e(O)}finally{a.f()}var h,y=-1,m=Zc(i.cornerHandles);try{for(m.s();!(h=m.n()).done;){var b=h.value;y+=1,b.forEach(function(e,t){var n=i.selected.map(function(e){return e[0]===y&&e[1]===t}).indexOf(!0)>-1;n&&!Vi(e,"selectedCorner")?Yi(e,"selectedCorner"):!n&&Vi(e,"selectedCorner")&&Fi(e,"selectedCorner")})}}catch(O){m.e(O)}finally{m.f()}var g=n.getBBox(),v=g.x,w=g.y,S=g.width,A=g.height;nl(i.shape,v,w,S,A)}),Jc(i,"updateState",function(e){var t=ef(e),n=$c(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(Ui,"g"),i.shape=ef(e),i.shape.setAttribute("class","a9s-annotation editable selected improved-polygon"),i.elementGroup=document.createElementNS(Ui,"g"),i.elementGroup.setAttribute("class","a9s-annotation editable selected"),i.elementGroup.appendChild(i.shape);var s=$c(i.shape);i.cornerHandles=[],i.midpoints=[];var c,f=Zc(s);try{var p=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(f.s();!(c=f.n()).done;)p()}catch(a){f.e(a)}finally{f.f()}return i.container.appendChild(i.elementGroup),n.appendChild(i.container),tl(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&&Fc(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,Qc(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xa);function nf(e){return(nf="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 rf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(rf=function(){return!!e})()}function of(e){return(of=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function af(e,t){return(af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lf(e,t,n){return(t=uf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uf(e){var t=function(e){if("object"!=nf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nf(t)?t:t+""}function sf(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 cf(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)?cf(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,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function cf(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 ff=function(e){var t,n=function(e){return Math.round(10*e)/10},r="",o=sf(e);try{for(o.s();!(t=o.n()).done;){var i=t.value;r+="M";var a,l=!0,u=sf(i);try{for(u.s();!(a=u.n()).done;){var s=a.value;l?(l=!1,r+=n(s.x).toString()+","+n(s.y).toString()):r+=" L"+n(s.x).toString()+","+n(s.y).toString()}}catch(c){u.e(c)}finally{u.f()}r+=" Z"}}catch(c){o.e(c)}finally{o.f()}return r},pf=function(e,t){return{source:null==t?void 0:t.src,selector:{type:"SvgSelector",value:'<svg><path d="'.concat(ff(e),'" /></svg>')}}},df=function(e){function t(e,n,r,o){var i,a,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),lf((a=this,u=[e,n,r,o],l=of(l=t),i=function(e,t){if(t&&("object"==nf(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,rf()?Reflect.construct(l,u||[],of(a).constructor):l.apply(a,u))),"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 Hc([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()})}),lf(i,"stop",function(){i.detachListeners(),i._isDrawing=!1,i.rubberband&&(i.rubberband.destroy(),i.rubberband=null)}),lf(i,"undo",function(){i.rubberband&&i.rubberband.undo()}),lf(i,"newPart",function(){i.rubberband&&i.rubberband.newPart()}),lf(i,"onMouseMove",function(e,t,n){i.rubberband.dragTo([e,t])}),lf(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,l=i.config.minSelectionWidth||4,u=i.config.minSelectionHeight||4;o>=l||a>=u?i.rubberband.addPoint([e,t]):(i.emit("cancel"),i.stop())}}),lf(i,"onScaleChanged",function(e){i.rubberband&&i.rubberband.onScaleChanged(e)}),lf(i,"onDblClick",function(e,t){i.config.completeWithDoubleClick&&i.complete(e,t)}),lf(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()}),lf(i,"createEditableShape",function(e){return new tf(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&&af(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,uf(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ya);function hf(e){return(hf="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 yf(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 mf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mf=function(){return!!e})()}function bf(e){return(bf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gf(e,t){return(gf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function vf(e,t,n){return(t=wf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wf(e){var t=function(e){if("object"!=hf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hf(t)?t:t+""}df.identifier="multipolygon",df.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 Sf=function(e){function t(e,n,r,o){var i,a,l,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),vf((a=this,l=bf(l=t),i=function(e,t){if(t&&("object"==hf(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,mf()?Reflect.construct(l,[],bf(a).constructor):l.apply(a,u))),"listTools",function(){return i._registered.map(function(e){return e.identifier})}),vf(i,"registerTool",function(e){var t=e.identifier;i.listTools().includes(t)&&i.unregisterTool(t),i._registered.unshift(e)}),vf(i,"unregisterTool",function(e){return i._registered=i._registered.filter(function(t){return t.identifier!==e})}),vf(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)})}),vf(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 yf(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)?yf(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=(yf(r).slice(1),null===(t=o.renderedVia)||void 0===t?void 0:t.name),l=a?i._registered.find(function(e){return e.identifier===a}):i._registered.find(function(t){return t.supports(e)});return l?new l(i._g,i._config,i._env,i._color):null}),i._g=e,i._config=n,i._env=r,i._color=o,i._registered=[Ol,fu,Lu,is,Rs,lc,Pc,df],i.setCurrent(Ol,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&&gf(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,wf(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(n()),Af={FragmentSelector:wa,SvgSelector:Tl},Of={FragmentSelector:function(e,t){var n=ha(e,t);return n.w*n.h},SvgSelector:function(e){var t,n,r,o=Rl(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())})}),Ml(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=kl(e);if(1==t.length)return Ml(t[0]);var n,r=function(e){return t.find(function(t){if(e!==t)return function(e,t){var n,r=xl(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(!Pl(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 Il(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)?Il(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-=Ml(a):o+=Ml(a)}}catch(l){i.e(l)}finally{i.f()}return o}(o);if("line"==i)return 0;throw"Unsupported SVG shape type: ".concat(i)}},Ef=function(e){var t=e.targets[0];if(t)return Array.isArray(t.selector)?t.selector[0]:t.selector},xf=function(e,t){return Af[Ef(e).type](e,t)},Cf=function(e,t){return Of[Ef(e).type](e,t)};function jf(e){return(jf="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 Mf(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,Pf(r.key),r)}}function Pf(e){var t=function(e){if("object"!=jf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jf(t)?t:t+""}var kf=function(e,t,n){return t&&Mf(e.prototype,t),n&&Mf(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(Ui,"svg");n.setAttribute("class","a9s-osd-crosshair-container");var r=document.createElementNS(Ui,"g");r.setAttribute("class","a9s-crosshair"),n.appendChild(r);var o=document.createElementNS(Ui,"line"),i=document.createElementNS(Ui,"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,l=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",l)};t.addEventListener("pointermove",a),t.parentElement.addEventListener("pointermove",a)}),If=r(7295),Df=r.n(If);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 Tf(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 Nf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tf(Object(n),!0).forEach(function(t){Gf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bf(r.key),r)}}function Gf(e,t,n){return(t=Bf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bf(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 Lf=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=xf(e,t),a=document.createElementNS(Ui,"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 l=i.getBBox(),u=l.x,s=l.y,c=l.width,f=l.height;return document.body.removeChild(a),{minX:u,minY:s,maxX:u+c,maxY:s+f}},Hf=function(e,t,n){return t&&_f(e.prototype,t),n&&_f(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),Gf(this,"clear",function(){return n.spatial_index.clear()}),Gf(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,l,u=Rl(n),s=u.nodeName.toLowerCase(),c=[e,t];if("polygon"===s){var f=Array.from(u.points).map(function(e){return[e.x,e.y]});return Pl(c,f)}if("circle"===s){var p=u.getAttribute("cx"),d=u.getAttribute("cy"),h=u.getAttribute("r");return i=h,a=(o=c)[0]-p,l=o[1]-d,Math.sqrt(a*a+l*l)<=i}if("ellipse"===s){var y=u.getAttribute("cx"),m=u.getAttribute("cy"),b=u.getAttribute("rx"),g=u.getAttribute("ry");return function(e,t,n,r,o){var i=Math.cos(0),a=Math.sin(0),l=e[0]-t,u=e[1]-n,s=i*l+a*u,c=a*l-i*u;return s*s/(r*r)+c*c/(o*o)<=1}(c,y,m,b,g)}if("path"===s)return kl(u).find(function(e){return Pl(c,e)});if("line"===s){var v=parseInt(u.getAttribute("x1")),w=parseInt(u.getAttribute("y1")),S=parseInt(u.getAttribute("x2")),A=parseInt(u.getAttribute("y2"));return function(e,t,n,r,o,i){var a=e[0],l=e[1],u=r-t,s=o-n,c=Math.sqrt(u*u+s*s);return Math.abs((a-t)*s-(l-n)*u)/c<=i}(c,v,w,S,A,r)}throw"Unsupported SVG shape type: ".concat(s)}(e,t,n,o);throw"Unsupported selector type: ".concat(a)});if(i.length>0)return i.sort(function(e,t){return Cf(e,n.env.image)-Cf(t,n.env.image)}),i[0]}),Gf(this,"getAnnotationsIntersecting",function(e){var t=e.minX,r=t?e:Lf(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)})}),Gf(this,"insert",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){n.spatial_index.insert(Nf(Nf({},Lf(e,n.env.image)),{},{annotation:e}))})}),Gf(this,"getBounds",function(e){return n.getBounds(e,n.env.image)}),Gf(this,"remove",function(e){var t=Nf(Nf({},Lf(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(Df())}),Uf=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,l=n.x-o.x,u=n.y-o.y,s=n.width,c=n.height,f=document.createElement("CANVAS"),p=f.getContext("2d");f.width=s,f.height=c,p.drawImage(r,l*i,u*a,s*i,c*a,0,0,s,c);var d=e.viewport.viewerElementToImageCoordinates(new(Hi().Point)(l,u)),h=e.viewport.viewportToImageZoom(e.viewport.getZoom());return{snippet:f,transform:function(e){return[d.x+e[0]/i/h,d.y+e[1]/a/h]}}};function zf(e){return(zf="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 Yf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ff(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)}}function Vf(e,t,n){return t&&Ff(e.prototype,t),n&&Ff(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wf(e,t,n){return t=Qf(t),function(e,t){if(t&&("object"==zf(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,Jf()?Reflect.construct(t,n||[],Qf(e).constructor):t.apply(e,n))}function Jf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jf=function(){return!!e})()}function Qf(e){return(Qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zf(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&&Xf(e,t)}function Xf(e,t){return(Xf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}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"!=zf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zf(t)?t:t+""}var $f=Ma(),ep=function(e){function t(e){var n,r,o,i,a;Yf(this,t),Kf(n=Wf(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,l=n.svg.getBoundingClientRect(),u=l.left,s=l.top;return t.x=i+u,t.y=a+s,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)}),Kf(n,"_initDrawingTools",function(e){var t,r=!1,o=!1,i=!1;n.tools=new Sf(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,l=t.y;o||e.originalEvent.stopPropagation(),n.tools.current.onMouseMove(a,l,e.originalEvent),r||(n.emit("startSelection",{x:a,y:l}),r=!0),!i&&n.tools.current.onDragStart&&(n.tools.current.onDragStart(a,l,e.originalEvent),i=!0)}},releaseHandler:function(e){if(n.tools.current.isDrawing){var t=n.tools.current.getSVGPoint(e.originalEvent),a=t.x,l=t.y;r&&(n.emit("endSelection",{x:a,y:l}),o=!0),n.tools.current.onMouseUp(a,l,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",l=null===(t=n.config.hotkey)||void 0===t?void 0:t.inverted;n.mouseTracker.enabled=l,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&&!l;n.mouseTracker.enabled=t,n.tools.current.enabled=t}},n.onKeyUp=function(e){e.key.toLowerCase()!==a||n.tools.current.isDrawing||(n.mouseTracker.enabled=l,n.tools.current.enabled=l,o=!1)},document.addEventListener("keydown",n.onKeyDown),document.addEventListener("keyup",n.onKeyUp)}),Kf(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;Fi(i,"hover"),n.emit("mouseLeaveAnnotation",n.hoveredShape.annotation,n.hoveredShape)}o&&(Yi(o,"hover"),n.emit("mouseEnterAnnotation",o.annotation,o))}n.hoveredShape=o}}),n.svg.parentElement.addEventListener("mouseleave",function(){n.hoveredShape&&(Fi(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)})}),Kf(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)}}),Kf(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,")"))})}),Kf(n,"addAnnotation",function(e,t){var r=t||n.g,o=xf(e,n.env.image);return Yi(o,"a9s-annotation"),o.setAttribute("data-id",e.id),o.annotation=e,r.appendChild(o),tl(o,e,n.formatters),n.scaleFormatterElements(o),o}),Kf(n,"addDrawingTool",function(e){return n.tools.registerTool(e)}),Kf(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)}),Kf(n,"currentScale",function(){var e=n.viewer.viewport.getContainerSize().x;return n.viewer.viewport.getZoom(!0)*e/n.viewer.world.getContentFactor()}),Kf(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 Fi(n.selectedShape,"selected");n.selectedShape=null}}),Kf(n,"destroy",function(){n.deselect(),n.svg.parentNode.removeChild(n.svg)}),Kf(n,"findShape",function(e){var t=null!=e&&e.id?e.id:e;return n.g.querySelector('.a9s-annotation[data-id="'.concat(t,'"]'))}),Kf(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,l=n.viewer.container.getBoundingClientRect(),u=Math.min(2*a/l.width,2*a/l.height),s=o.getBBox(),c=s.x,f=s.y,p=s.width,d=s.height,h=c-u*p,y=f-u*d,m=p+2*u*p,b=d+2*u*d,g=n.viewer.viewport.imageToViewportRectangle(h,y,m,b);n.viewer.viewport[r](g,i)}}),Kf(n,"fitBounds",function(e,t){return n._fit(e,t,"fitBounds")}),Kf(n,"fitBoundsWithConstraints",function(e,t){return n._fit(e,t,"fitBoundsWithConstraints")}),Kf(n,"getAnnotations",function(){return Array.from(n.g.querySelectorAll(".a9s-annotation")).map(function(e){return e.annotation})}),Kf(n,"getAnnotationsIntersecting",function(e){var t=e.id?e:n.findShape(e).annotation;return n.store.getAnnotationsIntersecting(t)}),Kf(n,"getImageSnippetById",function(e){var t=n.findShape(e);if(t)return Uf(n.viewer,t)}),Kf(n,"getSelectedImageSnippet",function(){if(n.selectedShape){var e,t=null!==(e=n.selectedShape.element)&&void 0!==e?e:n.selectedShape;return Uf(n.viewer,t)}}),Kf(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()})}),Kf(n,"listDrawingTools",function(){return n.tools.listTools()}),Kf(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}),Kf(n,"panTo",function(e,t){var r=n.findShape(e);if(r){var o=r.getBoundingClientRect(),i=o.top,a=o.left,l=o.width,u=o.height,s=a+l/2+window.scrollX,c=i+u/2+window.scrollY,f=n.viewer.viewport.windowToViewportCoordinates(new(Hi().Point)(s,c));n.viewer.viewport.panTo(f,t)}}),Kf(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)}}),Kf(n,"removeDrawingTool",function(e){var t;return null===(t=n.tools)||void 0===t?void 0:t.unregisterTool(e)}),Kf(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,")"))})}),Kf(n,"scaleTool",function(e){if(e){var t=1/n.currentScale();e.scale=t,e.onScaleChanged&&e.onScaleChanged(t)}}),Kf(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()}),Kf(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,Yi(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})}}}),Kf(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)}}),Kf(n,"setDrawingTool",function(e,t){var r;n.tools&&(null===(r=n.tools.current)||void 0===r||r.stop(),n.tools.setCurrent(e,t))}),Kf(n,"setVisible",function(e){e?n.svg.style.display=null:(n.deselect(),n.svg.style.display="none")}),Kf(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(Ui,"svg"),$f?(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(ja[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(Ui,"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 l=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 kf(n.svg),Yi(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",l),n.viewer.world.addHandler("add-item",l),n.viewer.world.getItemAt(0)&&l(),n.store=new Hf(n.env),n.selectedShape=null,n.hoveredShape=null,n._initMouseEvents(),n}return Zf(t,e),Vf(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()),tp=function(e){function t(e){var n;return Yf(this,t),Kf(n=Wf(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 Zf(t,e),Vf(t)}(ep);function np(e){return(np="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 rp(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 op(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rp(Object(n),!0).forEach(function(t){ip(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ip(e,t,n){return r=function(e){if("object"!=np(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=np(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==np(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}var ap=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()}},lp=function(e,t){var n=ap(e),r=n.extent,o=n.scale,i=t.selector,a=aa.create({target:t});if("SvgSelector"===i.type){var l=Rl(a),u=l.nodeName.toLowerCase(),s=null;if("polygon"===u)s=up(l,r,o);else if("circle"===u)s=sp(l,r,o);else if("ellipse"===u)s=cp(l,r,o);else{if("path"!==u)throw"Unsupported SVG shape type: ".concat(u);s=fp(l,r,o)}var c=s.outerHTML||(new XMLSerializer).serializeToString(s);return c=c.replace(' xmlns="'.concat(Ui,'"'),""),op(op({},t),{},{selector:{type:"SvgSelector",value:"<svg>".concat(c,"</svg>")}})}if("FragmentSelector"===i.type){var f=ha(a),p=f.x,d=f.y,h=f.w,y=f.h,m=r.x+p/o,b=r.y+d/o,g=h/o,v=y/o;return 0===h&&0===y?op(op({},ya(m,b,g,v)),{},{renderedVia:{name:"point"}}):ya(m,b,g,v)}throw"Unsupported selector type: ".concat(i.type)},up=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},sp=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},cp=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},fp=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},pp=function(e,t){var n=ap(e),r=n.extent,o=n.scale,i=t.selector("FragmentSelector");if(t.selector("SvgSelector")){var a=Rl(t),l=a.nodeName.toLowerCase(),u=null;if("polygon"===l)u=dp(a,r,o);else if("circle"===l)u=hp(a,r,o);else if("ellipse"===l)u=yp(a,r,o);else{if("path"!==l)throw"Unsupported SVG shape type: ".concat(l);u=mp(a,r,o)}var s=u.outerHTML||(new XMLSerializer).serializeToString(u);s=s.replace(' xmlns="'.concat(Ui,'"'),"");var c={selector:{type:"SvgSelector",value:"<svg>".concat(s,"</svg>")}};return t.clone({target:c})}if(i){var f=ha(t),p=f.x,d=f.y,h=f.w,y=f.h,m=(p-r.x)*o,b=(d-r.y)*o,g=ya(m,b,h*o,y*o);return t.clone({target:g})}},dp=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},hp=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},yp=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},mp=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},bp=function(e,t){var n,r,o=ap(e),i=o.extent,a=o.scale,l=(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"===l)gp(t,i,a);else{if("SvgSelector"!==l)throw"Unsupported selector type type: ".concat(l);vp(t,i,a)}var u=t.querySelector(".a9s-formatter-el");if(u){var s=t.querySelector(".a9s-inner").getBBox(),c=s.x,f=s.y;u.setAttribute("x",c),u.setAttribute("y",f)}},gp=function(e,t,n){var r=ha(e.annotation),o=r.x,i=r.y,a=r.w,l=r.h,u=e.querySelector(".a9s-outer"),s=e.querySelector(".a9s-inner"),c=n*(o-t.x),f=n*(i-t.y);[u,s].forEach(0===a&&0===l?function(e){e.setAttribute("cx",c),e.setAttribute("cy",f)}:function(e){e.setAttribute("x",c),e.setAttribute("y",f),e.setAttribute("width",a*n),e.setAttribute("height",l*n)})},vp=function(e,t,n){var r=Rl(e.annotation),o=r.nodeName.toLowerCase();if("polygon"===o)wp(e,r,t,n);else if("circle"===o)Sp(e,r,t,n);else if("ellipse"===o)Ap(e,r,t,n);else{if("path"!==o)throw"Unsupported SVG shape type: ".concat(o);Op(e,r,t,n)}},wp=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)},Sp=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"),l=e.querySelector(".a9s-outer");l.setAttribute("cx",o),l.setAttribute("cy",i),l.setAttribute("r",a);var u=e.querySelector(".a9s-inner");u.setAttribute("cx",o),u.setAttribute("cy",i),u.setAttribute("r",a)},Ap=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"),l=r*t.getAttribute("ry"),u=e.querySelector(".a9s-outer");u.setAttribute("cx",o),u.setAttribute("cy",i),u.setAttribute("rx",a),u.setAttribute("ry",l);var s=e.querySelector(".a9s-inner");s.setAttribute("cx",o),s.setAttribute("cy",i),s.setAttribute("rx",a),s.setAttribute("ry",l)},Op=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 Ep(e){return(Ep="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 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 jp(e,t){return(jp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mp(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"!=Ep(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ep(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ep(t)?t:t+""}var kp=Ma(),Ip=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),Mp((r=this,i=[e],o=Cp(o=t),n=function(e,t){if(t&&("object"==Ep(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,xp()?Reflect.construct(o,i||[],Cp(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 l=n.viewer.container.getBoundingClientRect(),u=a.getBoundingClientRect(),s=u.x-l.x-i,c=u.y-l.y-i,f=u.width+2*i,p=u.height+2*i,d=n.viewer.viewport.viewerElementToViewportRectangle(new(Hi().Rect)(s,c,f,p));n.viewer.viewport[r](d,o)}}),Mp(n,"_getShapeAt",function(e){var t=n.viewer.viewport.viewerElementToViewportCoordinates(function(e){if(kp){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)}),Mp(n,"_refreshNonScalingAnnotations",function(){}),Mp(n,"addAnnotation",function(e,t){var r=t||n.g,o=xf(e,n.env.image);return Yi(o,"a9s-annotation"),o.setAttribute("data-id",e.id),o.annotation=e,bp(n.viewer,o),r.appendChild(o),tl(o,e,n.formatters),o}),Mp(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)}),Mp(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)):Fi(n.selectedShape,"selected"),n.selectedShape=null}}),Mp(n,"onDrawingComplete",function(e){var t=e.annotation.clone({target:lp(n.viewer,e.annotation.target)});e.annotation=t,n.selectShape(e),n.emit("createSelection",e.annotation),n.mouseTracker.enabled=!1}),Mp(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,Yi(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=pp(n.viewer,o);n.selectedShape.updateState(a);var l=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,l.setTracking(!0)}),n.selectedShape.element.addEventListener("mouseleave",function(){n.hoveredShape=null,l.setTracking(!1)}),n.selectedShape.mouseTracker=l,n.selectedShape.on("update",function(e){var t=lp(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&&jp(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 bp(e.viewer,t)}),this.selectedShape))if(this.selectedShape.element){var t=pp(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,Pp(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ep);function Dp(e){return(Dp="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 Rp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Rp=function(){return!!e})()}function Tp(e){return(Tp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Np(e,t){return(Np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _p(e,t,n){return(t=Gp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gp(e){var t=function(e){if("object"!=Dp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dp(t)?t:t+""}var Bp=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),_p(r=function(e,t,n){return t=Tp(t),function(e,t){if(t&&("object"==Dp(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,Rp()?Reflect.construct(t,n||[],Tp(e).constructor):t.apply(e,n))}(this,n,[t]),"clearState",function(e){return r.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,beforeHeadlessModify:null},e)}),_p(r,"forwardEvent",function(e,t){r.annotationLayer.on(e,function(e,n){r.props[t](e.clone(),n)})}),_p(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))}}),_p(r,"handleStartSelect",function(e){return r.props.onSelectionStarted(e)}),_p(r,"handleEndSelect",function(e){return r.props.onSelectionEnded(e)}),_p(r,"handleSelect",function(e,t){r.state.editorDisabled?r.onHeadlessSelect(e,t):r.onNormalSelect(e,t)}),_p(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 l=r.state.selectedAnnotation;l?r.clearState(function(){return r.props.onCancelSelected(l)}):r.clearState()}}),_p(r,"onHeadlessSelect",function(e,t){r.saveSelected().then(function(){r.onNormalSelect(e,t)})}),_p(r,"handleUpdateTarget",function(e,t){r.setState({selectedDOMElement:e,modifiedTarget:t});var n=JSON.parse(JSON.stringify(t));r.props.onSelectionTargetChanged(n)}),_p(r,"handleViewportChange",function(e){return r.setState({selectedDOMElement:e})}),_p(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)}}),_p(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()})}}),_p(r,"onDeleteAnnotation",function(e){r.clearState(),r.annotationLayer.removeAnnotation(e),r.props.onAnnotationDeleted(e)}),_p(r,"onCancelAnnotation",function(e,t){r.state.editorDisabled||r.annotationLayer.deselect(),r.props.onCancelSelected(e),r.clearState(t)}),_p(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())}),_p(r,"addDrawingTool",function(e){return r.annotationLayer.addDrawingTool(e)}),_p(r,"cancelSelected",function(){return new Promise(function(e){r.annotationLayer.deselect(),r.state.selectedAnnotation?r.clearState(e):e()})}),_p(r,"fitBounds",function(e,t){return r.annotationLayer.fitBounds(e,t)}),_p(r,"fitBoundsWithConstraints",function(e,t){return r.annotationLayer.fitBoundsWithConstraints(e,t)}),_p(r,"getAnnotationById",function(e){var t;return null===(t=r.annotationLayer.findShape(e))||void 0===t?void 0:t.annotation}),_p(r,"getAnnotations",function(){return r.annotationLayer.getAnnotations().map(function(e){return e.clone()})}),_p(r,"getAnnotationsIntersecting",function(e){return r.annotationLayer.getAnnotationsIntersecting(e)}),_p(r,"getImageSnippetById",function(e){return r.annotationLayer.getImageSnippetById(e)}),_p(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()}),_p(r,"getSelectedImageSnippet",function(){return r.annotationLayer.getSelectedImageSnippet()}),_p(r,"listDrawingTools",function(){return r.annotationLayer.listDrawingTools()}),_p(r,"panTo",function(e,t){return r.annotationLayer.panTo(e,t)}),_p(r,"removeAnnotation",function(e){return r.annotationLayer.removeAnnotation(e)}),_p(r,"removeDrawingTool",function(e){return r.annotationLayer.removeDrawingTool(e)}),_p(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()})}),_p(r,"selectAnnotation",function(e){var t=r.annotationLayer.selectAnnotation(e,!0);if(t)return r.handleSelect(t,!0),t.annotation.clone();r.clearState()}),_p(r,"setAnnotations",function(e){return r.annotationLayer.init(e.map(function(e){return e.clone()}))}),_p(r,"setDrawingEnabled",function(e){return r.annotationLayer.setDrawingEnabled(e)}),_p(r,"setDrawingTool",function(e,t){r.state.color=t,r.annotationLayer.setDrawingTool(e,t)}),_p(r,"setVisible",function(e){r.annotationLayer.setVisible(e),e||r.clearState()}),_p(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&&Np(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,Gp(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 Ip(this.props):new tp(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(Bi,{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),Lp=0;function Hp(e){return(Hp="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 Up(e,t,n){return(t=zp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zp(e){var t=function(e){if("object"!=Hp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hp(t)?t:t+""}var Yp=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,zp(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),Up(this,"handleAnnotationCreated",function(e,t){return i._emitter.emit("createAnnotation",e.underlying,t)}),Up(this,"handleAnnotationDeleted",function(e){return i._emitter.emit("deleteAnnotation",e.underlying)}),Up(this,"handleAnnotationSelected",function(e,t){return i._emitter.emit("selectAnnotation",e.underlying,t)}),Up(this,"handleAnnotationUpdated",function(e,t){return i._emitter.emit("updateAnnotation",e.underlying,t.underlying)}),Up(this,"handleCancelSelected",function(e){return i._emitter.emit("cancelSelected",e.underlying)}),Up(this,"handleClickAnnotation",function(e,t){return i._emitter.emit("clickAnnotation",e.underlying,t)}),Up(this,"handleLoad",function(e){return i._emitter.emit("load",e)}),Up(this,"handleSelectionCreated",function(e){return i._emitter.emit("createSelection",e.underlying)}),Up(this,"handleSelectionStarted",function(e){return i._emitter.emit("startSelection",e)}),Up(this,"handleSelectionEnded",function(e){return i._emitter.emit("endSelection",e)}),Up(this,"handleSelectionTargetChanged",function(e){return i._emitter.emit("changeSelectionTarget",e)}),Up(this,"handleMouseEnterAnnotation",function(e,t){return i._emitter.emit("mouseEnterAnnotation",e.underlying,t)}),Up(this,"handleMouseLeaveAnnotation",function(e,t){return i._emitter.emit("mouseLeaveAnnotation",e.underlying,t)}),Up(this,"_wrap",function(e){return"Annotation"===(null==e?void 0:e.type)?new aa(e):e}),Up(this,"addAnnotation",function(e){return i._app.current.addAnnotation(new aa(e))}),Up(this,"addDrawingTool",function(e){return i._app.current.addDrawingTool(e)}),Up(this,"cancelSelected",function(){return i._app.current.cancelSelected()}),Up(this,"clearAnnotations",function(){return i.setAnnotations([])}),Up(this,"clearAuthInfo",function(){return i._env.user=null}),Up(this,"destroy",function(){return e.default.unmountComponentAtNode(i.appContainerEl)}),Up(this,"fitBounds",function(e,t){return i._app.current.fitBounds(i._wrap(e),t)}),Up(this,"fitBoundsWithConstraints",function(e,t){return i._app.current.fitBoundsWithConstraints(i._wrap(e),t)}),Up(this,"getAnnotationById",function(e){var t=i._app.current.getAnnotationById(e);return null==t?void 0:t.underlying}),Up(this,"getAnnotations",function(){return i._app.current.getAnnotations().map(function(e){return e.underlying})}),Up(this,"getAnnotationsIntersecting",function(e){return i._app.current.getAnnotationsIntersecting(i._wrap(e))}),Up(this,"getImageSnippetById",function(e){return i._app.current.getImageSnippetById(e)}),Up(this,"getSelected",function(){var e=i._app.current.getSelected();return null==e?void 0:e.underlying}),Up(this,"getSelectedImageSnippet",function(){return i._app.current.getSelectedImageSnippet()}),Up(this,"listDrawingTools",function(){return i._app.current.listDrawingTools()}),Up(this,"loadAnnotations",function(e){return fetch(e).then(function(e){return e.json()}).then(function(e){return i.setAnnotations(e),e})}),Up(this,"off",function(e,t){return i._emitter.off(e,t)}),Up(this,"on",function(e,t){return i._emitter.on(e,t)}),Up(this,"once",function(e,t){return i._emitter.once(e,t)}),Up(this,"panTo",function(e,t){return i._app.current.panTo(i._wrap(e),t)}),Up(this,"removeAnnotation",function(e){return i._app.current.removeAnnotation(i._wrap(e))}),Up(this,"removeDrawingTool",function(e){return i._app.current.removeDrawingTool(e)}),Up(this,"saveSelected",function(){return i._app.current.saveSelected()}),Up(this,"selectAnnotation",function(e){var t=i._app.current.selectAnnotation(i._wrap(e));return null==t?void 0:t.underlying}),Up(this,"setAnnotations",function(e){var t=(e||[]).map(function(e){return new aa(e)});i._app.current.setAnnotations(t)}),Up(this,"setAuthInfo",function(e){return i._env.user=e}),Up(this,"setDrawingEnabled",function(e){return i._app.current.setDrawingEnabled(e)}),Up(this,"setDrawingTool",function(e,t){i._color=t,i._app.current.setDrawingTool(e,t)}),Up(this,"setServerTime",function(e){return i._env.setServerTime(e)}),Up(this,"setVisible",function(e){return i._app.current.setVisible(e)}),Up(this,"updateSelected",function(e,t){var n=null;"Annotation"===e.type?n=new aa(e):"Selection"===e.type&&(n=new pa(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();Lp=e-t},getCurrentTimeAdjusted:function(){return new Date(Date.now()+Lp).toISOString()},toClientTime:function(e){return Date.parse(e)-Lp}},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 Ae.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(Bp,{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 Fp=function(e,t){return new Yp(e,t)}})(),o.default})(),s.exports=u(t);const c=l(s.exports);class f extends i{constructor(e,t={}){super(e),o(this,"anno"),console.log("[AnnoAnnotator] Initializing Annotorious v2.7.17...",c),this.anno=c(this.engine.viewer,{...t}),console.log("[AnnoAnnotator] Annotorious v2.7.17 initialized.",this.anno),console.log("tools",this.anno.listDrawingTools()),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 }\n ",document.head.appendChild(t)}}const p=[{id:"anno",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4Aeyde8xcRRnGdzVIMApo0XAxAQsVQ4kS6q0gpeV+h961QG2xQNQASoqJkmibKBGlNrYJClQKVihQLlqFAlrbaKGtVkwQDRUq/ENRi6KAMQHx83k/9mz267eXd+bMnJk58zTzfnN2952Zd545v87Z3bMzb2rwHxWgAj0VICA9peELVKDRICA8C6hAHwUISB9x+BIVICA8B6hAHwU8AtKnVb5EBRJRgIAkMlAMM4wCBCSM7mw1EQUISCIDxTDDKEBAwujOVhNRIE1AEhGXYaavAAFJfwyT7sHQ0NCesLGwyTDJ94ypQwQkptHILBYAMRldfhK2A7YBJvmTrefxMHwiIOHHIMsIWhAIFIfsJoA83tB6fbeXqn9IQ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KtMkYZJHHkQAAAABJRU5ErkJggg==",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">标注颜色</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">标注形状</div>';const l=document.createElement("div");l.className="med-tool-grid";return[{id:"rect",label:"矩形"},{id:"polygon",label:"多边形"},{id:"circle",label:"圆形"},{id:"ellipse",label:"椭圆"},{id:"line",label:"线段"},{id:"freehand",label:"手绘"}].forEach(n=>{const o=document.createElement("button");o.className="med-tool-item",o.textContent=n.label,o.onclick=()=>{e.setInteractionEffect("anno"),e.anno&&e.anno.setTool(n.id,r),t()},l.appendChild(o)}),a.appendChild(l),n.appendChild(a),n},label:"标注设置"},{id:"selection",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AeydDbRtVVXH7y1L0AzKSJAKzMheKE8yUniiIAgPEITk+8OgIBDFeiKaQ4hHouMlqARqgBIIPLIHqKCoKAUxQAFH+YqPGEpqRgxL86OsbIwaz9//vn3uO/fec+7+mmvttfaed8x51z57rzXXnP+5/nufsz/W/pEZ/3MEHIGpCDhBpkLjGxyBmRkniI8CR2AZBJwgy4DjmxwBJ4iPAUdgGQQCEmSZXn2TI5AJAk6QTBLlbnaDgBOkG9y910wQcIJkkih3sxsEnCDd4O69ZoJAngTJBFx3M38EnCD559AjCIiAEyQguG46fwScIPnn0CMIiIATJCC4bjp/BJwgi3LoHx2BcQScIONo+LIjsAgBJ8giQPyjIzCOgBN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rUN1GL4yEFR+XFWEu7C+j1jGosBSmOhWu50VYlZ9kS5BxqEnqd9GPoWtQJUWE0fxLSva+1B1Xff/egXpboyvQw9GLUSWXqi5gsRG9BD0CFUbCUpgKu3EstSyMhaUwFfavp80GVEfj7MG0IkhyQJCgH6CPonct0vv4rL1dcj6n7JAwQ4XdYjyFcZUjTMrhTfWttwSZGrFvcARqIOAEqQGWVx0eAk6Q4eXcI66BgBOkBlhedXgIZECQ4SXFI04HASdIOrlwTxJEwAmSYFLcpXQQcIKkkwv3JEEEnCAJJsVdSgeBYRMknTy4J4ki4ARJNDHuVhoIOEHSyIN7kSgCTpBEE+NupYGAEySNPLgXiSLgBAmUGDfbDwR+CAAA//984SgBAAAABklEQVQDAOpfFBhVguy8AAAAAElFTkSuQmCC",label:"截图设置",onClick:(e,t)=>{var n;null==(n=e.selection)||n.toggleState(),t()}}],d="med-toolbar-styles";class h{constructor(e,t={}){o(this,"engine"),o(this,"options"),o(this,"element"),o(this,"dropdownElement",null),o(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(){this.element.innerHTML="";const e=new Map(p.map(e=>[e.id,e])),t=[];this.options.buttons&&this.options.buttons.forEach(n=>{const r=e.get(n.id);r?(t.push({...r,...n}),e.delete(n.id)):t.push(n)}),t.push(...Array.from(e.values())),t.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);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),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(d))return;const e=document.createElement("style");e.id=d,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 /* 内容样式 */\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 ',document.head.appendChild(e)}}!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 l(n,r){let o,i=this.rect.getDegreeRotation(),a=this.restrictToImage||this.cropMinimumSize?this.rect.clone():null,l=r.delta;switch(0!==i&&(l=l.rotate(-1*i,new e.Point(0,0)),o=this.rect.getCenter()),l=this.viewer.viewport.deltaPointsFromPixels(l,!0),n){case 0:this.rect.y+=l.y,this.rect.height-=l.y;break;case 1:this.rect.width+=l.x;break;case 2:this.rect.height+=l.y;break;case 3:this.rect.x+=l.x,this.rect.width-=l.x;break;case.5:this.rect.y+=l.y,this.rect.height-=l.y,this.rect.x+=l.x,this.rect.width-=l.x;break;case 1.5:this.rect.y+=l.y,this.rect.height-=l.y,this.rect.width+=l.x;break;case 2.5:this.rect.width+=l.x,this.rect.height+=l.y;break;case 3.5:this.rect.height+=l.y,this.rect.x+=l.x,this.rect.width-=l.x}if(0!==i){let e=this.rect.getCenter();l=e.rotate(i,o).minus(e),this.rect.x+=l.x,this.rect.y+=l.y}let u=this.viewer.world.getHomeBounds();this.restrictToImage&&!this.rect.fitsIn(new e.Rect(0,0,u.width,u.height))&&(this.rect=a),t(this),this.draw()}function u(){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 s(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,l=new e.Point(o.x/2+t.x,o.y/2+t.y),u=new e.SelectionRect(l.x-i/2,l.y-r/2,i,r,a),s=new e.Point(0,r);return s=s.rotate(u.getDegreeRotation(),new e.Point(0,0)),u.x+=s.x/2,u.y+=s.y/2,u}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,f=[];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:l.bind(this,n),dragEndHandler:u.bind(this,n)}),f[n]=e.makeNeutralElement("div"),f[n].className="corner-"+n+"-handle",f[n].style.position="absolute",f[n].style.width=this.cornersStyle.width,f[n].style.height=this.cornersStyle.height,f[n].style.background=this.cornersStyle.background,f[n].style.border=this.cornersStyle.border,new e.MouseTracker({element:f[n],dragHandler:l.bind(this,n+.5),dragEndHandler:u.bind(this,n)}),this.borders[n].appendChild(c),this.element.appendChild(this.borders[n]),setTimeout(this.element.appendChild.bind(this.element,f[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%",f[0].style.top="-3px",f[0].style.left="-3px",f[1].style.top="-3px",f[1].style.right="-3px",f[2].style.bottom="-3px",f[2].style.right="-3px",f[3].style.bottom="-3px",f[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,s),!1);let p=this.prefixUrl||this.viewer.prefixUrl||"",d=this.viewer.buttons&&this.viewer.buttonGroup.buttons,h=d?this.viewer.buttonGroup.buttons[0]:null,y=h?h.onFocus:null,m=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:p+this.navImages.selection.REST,srcGroup:p+this.navImages.selection.GROUP,srcHover:p+this.navImages.selection.HOVER,srcDown:p+this.navImages.selection.DOWN,onRelease:this.toggleState.bind(this),onFocus:y,onBlur:m}),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:p+this.navImages.selectionConfirm.REST,srcGroup:p+this.navImages.selectionConfirm.GROUP,srcHover:p+this.navImages.selectionConfirm.HOVER,srcDown:p+this.navImages.selectionConfirm.DOWN,onRelease:this.confirm.bind(this),onFocus:y,onBlur:m});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:p+this.navImages.selectionCancel.REST,srcGroup:p+this.navImages.selectionCancel.GROUP,srcHover:p+this.navImages.selectionCancel.HOVER,srcDown:p+this.navImages.selectionCancel.DOWN,onRelease:this.cancel.bind(this),onFocus:y,onBlur:m});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","Toggle Selection"),t.setString("Tooltips.SelectionConfirm","Confirm Selection"),t.setString("Tooltips.SelectionCancel","Cancel Selection");class y{constructor(e,t={}){o(this,"viewer"),o(this,"selection"),o(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,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3eB/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),console.log("[SelectionPlugin] Selection plugin initialized",this.selection)}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.destroy(),this.selection=null)}}!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 l=r(e,t),u=i(l/e*t,3);return{size:l*t,text:u+a+n+(o&&u>1?"s":"")}}function n(e,t,n){var o=r(e,t),a=o*t,l=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:l}}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 l(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=!l(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&&(l(e.type)&&this.setDrawScalebarFunction(e.type),l(e.minWidth)&&this.setMinWidth(e.minWidth),l(e.color)&&(this.color=e.color),l(e.fontColor)&&(this.fontColor=e.fontColor),l(e.backgroundColor)&&(this.backgroundColor=e.backgroundColor),l(e.fontSize)&&(this.fontSize=e.fontSize),l(e.fontFamily)&&(this.fontFamily=e.fontFamily),l(e.barThickness)&&(this.barThickness=e.barThickness),l(e.pixelsPerMeter)&&(this.pixelsPerMeter=e.pixelsPerMeter),l(e.referenceItemIdx)&&(this.referenceItemIdx=e.referenceItemIdx),l(e.location)&&(this.location=e.location),l(e.xOffset)&&(this.xOffset=e.xOffset),l(e.yOffset)&&(this.yOffset=e.yOffset),l(e.stayInsideImage)&&(this.stayInsideImage=e.stayInsideImage),l(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 l=24*a;return o<365.25*l?t(l,r,"day",!0):t(365.25*l,r,"year",!0)},METRIC_GENERIC:n}}(t);var m=(e=>(e[e.NONE=0]="NONE",e[e.MICROSCOPY=1]="MICROSCOPY",e[e.MAP=2]="MAP",e))(m||{}),b=(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))(b||{});class g{constructor(e,t={}){o(this,"viewer"),o(this,"options"),o(this,"scalebar"),this.viewer=e,"string"==typeof t.type&&(t.type=m[t.type]),"string"==typeof t.location&&(t.location=b[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},console.log(this.options),this.init()}init(){this.viewer.scalebar(this.options)}destroy(){this.scalebar&&"function"==typeof this.scalebar.destroy&&this.scalebar.destroy(),this.scalebar=null}}class v{constructor(e){o(this,"viewer"),o(this,"konva",null),o(this,"anno",null),o(this,"toolbar",null),o(this,"colorAdjust",null),o(this,"selection",null),o(this,"scalebar",null),o(this,"options");const n={id:"osd-container",crossOriginPolicy:"Anonymous",prefixUrl:e.prefixUrl||"",drawer:["webgl","canvas"],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,rotationIncrement:90,maxTilesPerFrame:3,maxImageCacheCount:200,gestureSettingsMouse:{dragToPan:!0,clickToZoom:!1,dblClickToZoom:!1,contextMenu:!0},gestureSettingsTouch:{flickEnabled:!1,pinchToZoom:!0,panToNextImage:!1,contextMenu:!0},plugins:{konva:!1,annotorious:!1,toolbar:!1,selection:!1},...e};this.options=n,this.viewer=t(this.options),this.viewer.addOnceHandler("open",()=>{}),this.initPlugins()}initPlugins(){const{plugins:e}=this.options;if(e){if(e.konva&&(this.konva=new a(this),console.log("[MedEngine] Konva plugin initialized.")),e.annotorious){const t="object"==typeof e.annotorious?e.annotorious:{};this.viewer.isOpen()?this.mountAnnotorious(t):this.viewer.addOnceHandler("open",()=>{this.mountAnnotorious(t)})}if(e.toolbar){const t="object"==typeof e.toolbar?e.toolbar:{};this.toolbar=new h(this,t)}if(e.selection){const t="object"==typeof e.selection?e.selection:{};this.selection=new y(this.viewer,t)}if(e.scalebar){const t="object"==typeof e.scalebar?e.scalebar:{};this.scalebar=new g(this.viewer,t)}}}mountAnnotorious(e){try{this.anno=new f(this,e),console.log("[MedEngine] Annotorious plugin initialized.",this.anno)}catch(t){console.error("[MedEngine] Failed to initialize Annotorious:",t)}}setInteractionEffect(e){var t,n,r,o;switch(null==(t=this.konva)||t.setEnabled(!1),null==(n=this.anno)||n.setEnabled(!1),e){case"konva":null==(r=this.konva)||r.setEnabled(!0);break;case"anno":null==(o=this.anno)||o.setEnabled(!0)}}destroy(){var e,t,n,r,o,i;null==(e=this.konva)||e.destroy(),null==(t=this.anno)||t.destroy(),null==(n=this.toolbar)||n.destroy(),null==(r=this.selection)||r.destroy(),null==(o=this.scalebar)||o.destroy(),null==(i=this.colorAdjust)||i.destroy(),this.viewer.destroy(),this.options.element.innerHTML=""}}"undefined"!=typeof window&&(window.MedViewerSDK={MedViewerEngine:v,KonvaAnnotator:a,AnnoAnnotator:f,MedToolbar:h,SelectionPlugin:y}),e.AnnoAnnotator=f,e.KonvaAnnotator=a,e.MedToolbar=h,e.MedViewerEngine=v,e.SelectionPlugin=y,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|