@cogic/annotorious 2.7.20 → 2.7.22

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotorious.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,6CCPT,IAAIC,EAAeC,EAAQ,MACvBC,EAAYD,EAAQ,KACpBE,EAAaH,EAAa,eAE1BI,EAAOH,EAAQ,MACfI,EAAMJ,EAAQ,MACdK,EAAcL,EAAQ,MACtBM,EAAaN,EAAQ,MACrBO,EAAoBP,EAAQ,MAC5BQ,EAAWR,EAAQ,MACnBS,EAAWT,EAAQ,MAEnBU,EAAWV,EAAQ,MAEnBW,EAASV,EAAU,0BAGnBW,EAAcC,OAAO,KACrBC,EAAiC,MAAnBF,EAAY,MAAgB,KAAKA,GAEnDjB,EAAOD,QAAU,SAAiBqB,GACjC,IASIC,EATAC,EAAQT,EAASU,MACjBC,EAAIL,GAAeJ,EAASQ,MAAQP,EAAOO,KAAM,IAAMD,EAEvDG,EAAMb,EAAkBY,GAE5B,IAAKb,EAAWS,GACf,MAAM,IAAIb,EAAW,uDAIlBmB,UAAUC,OAAS,IACtBN,EAAUK,UAAU,IAIrB,IADA,IAAIE,EAAI,EACDA,EAAIH,GAAK,CACf,IAAII,EAAKf,EAASc,GAElB,GADelB,EAAYc,EAAGK,GAChB,CACb,IAAIC,EAASrB,EAAIe,EAAGK,GACpBrB,EAAKY,EAAYC,EAAS,CAACS,EAAQF,EAAGJ,GACvC,CACAI,GAAK,CACN,CAGD,+BC/CA,IAAI3B,EAASI,EAAQ,MACjB0B,EAAW1B,EAAQ,MACnBC,EAAYD,EAAQ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M,IACN+oD,QAAS,UACR,CACD/oD,KAAM,IACN+oD,QAAS,qBACR,CACD/oD,KAAM,IACN+oD,QAAS,qBACR,CACD/oD,KAAM,IACN+oD,QAAS,mBACR,CACD/oD,KAAM,KACN+oD,QAAS,KACR,CACD/oD,KAAM,IACN+oD,QAAS,sCACR,CACD/oD,KAAM,IACN+oD,QAAS,YACR,CACD/oD,KAAM,KACN+oD,QAAS,KACR,CACD/oD,KAAM,IACN+oD,QAAS,cACR,CACD/oD,KAAM,IACN+oD,QAAS,SACR,CACD/oD,KAAM,IACN+oD,QAAS,mBACR,CACD/oD,KAAM,IACN+oD,QAAS,kBACR,CACD/oD,KAAM,IACN+oD,QAAS,uCACR,CACD/oD,KAAM,KACN+oD,QAAS,KACR,CACD/oD,KAAM,KACN+oD,QAAS,OACR,CACD/oD,KAAM,KACN+oD,QAAS,KACR,CACD/oD,KAAM,KACN+oD,QAAS,KACR,CACD/oD,KAAM,KACN+oD,QAAS,MACR,CACD/oD,KAAM,KACN+oD,QAAS,KACR,CACD/oD,KAAM,IACN+oD,QAAS,aACR,CACD/oD,KAAM,IACN+oD,QAAS,iBACR,CACD/oD,KAAM,IACN+oD,QAAS,kBACR,CACD/oD,KAAM,KACN+oD,QAAS,MACR,CACD/oD,KAAM,IACN+oD,QAAS,mCACR,CACD/oD,KAAM,IACN+oD,QAAS,UACR,CACD/oD,KAAM,IACN+oD,QAAS,mBACR,CACD/oD,KAAM,IACN+oD,QAAS,mBACR,CACD/oD,KAAM,KACN+oD,QAAS,KACR,CACD/oD,KAAM,IACN+oD,QAAS,wBACR,CACD/oD,KAAM,IACN+oD,QAAS,UACR,CACD/oD,KAAM,IACN+oD,QAAS,kBACR,CACD/oD,KAAM,IACN+oD,QAAS,uBACR,CACD/oD,KAAM,KACN+oD,QAAS,KACR,CACD/oD,KAAM,IACN+oD,QAAS,YACR,CACD/oD,KAAM,IACN+oD,QAAS,qBACR,CACD/oD,KAAM,KACN+oD,QAAS,KACR,CACD/oD,KAA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E,OAAO/B,KAAKgrF,KAAKjmE,QAAQslE,aAC3B,EAACroF,IAED,SAAkBw4B,GAChBx6B,KAAKgrF,KAAKjmE,QAAQslE,cAAgB7vD,CACpC,GAAC,CAAA34B,IAAA,gBAAAE,IAED,WACE,OAAO/B,KAAKgrF,KAAKjmE,QAAQu/B,aAC3B,EAACtiD,IAED,SAAkBsiC,GAChBtkC,KAAKgrF,KAAKjmE,QAAQu/B,cAAgBhgB,CACpC,GAAC,CAAAziC,IAAA,aAAAE,IAQD,WACE,OAAO/B,KAAKgrF,KAAKjmE,QAAQszB,YAAc,EACzC,EAACr2C,IAED,SAAe0zD,GACb,GAAIA,EAAK,CACP,IAAMrd,EAAah3C,MAAMiG,QAAQouD,GAAOA,EAAM,CAAEA,GAChD11D,KAAKgrF,KAAKjmE,QAAQszB,WAAaA,CACjC,MACEr4C,KAAKgrF,KAAKjmE,QAAQszB,WAAa,IAEnC,GAAC,CAAAx2C,IAAA,WAAAE,IA6CD,WACE,OAAO/B,KAAKgrF,KAAKjmE,QAAQiuB,QAC3B,EAAChxC,IAED,SAAagxC,GACXhzC,KAAKgrF,KAAKjmE,QAAQiuB,SAAWA,CAC/B,GAAC,CAAAnxC,IAAA,UAAAE,IA8CD,WACE,OAAO/B,KAAKgrF,KAAKjmE,QAAQuiE,OAC3B,EAACtlF,IAED,SAAYslF,GACVtnF,KAAKgrF,KAAKjmE,QAAQuiE,QAAUA,CAC9B,2EAACwD,CAAA,CAzQqB,GA6QX9/B,GAAO,SAAAnX,GAAM,OAAI,IAAIi3C,GAAYj3C,EAAO","sources":["webpack://Annotorious/webpack/universalModuleDefinition","webpack://Annotorious/./node_modules/array.prototype.foreach/implementation.js","webpack://Annotorious/./node_modules/array.prototype.foreach/index.js","webpack://Annotorious/./node_modules/array.prototype.foreach/polyfill.js","webpack://Annotorious/./node_modules/array.prototype.foreach/shim.js","webpack://Annotorious/./node_modules/autosize/dist/autosize.js","webpack://Annotorious/./node_modules/call-bind/callBound.js","webpack://Annotorious/./node_modules/call-bind/index.js","webpack://Annotorious/./node_modules/clsx/dist/clsx.m.js","webpack://Annotorious/./node_modules/computed-style/dist/computedStyle.commonjs.js","webpack://Annotorious/./node_modules/define-properties/index.js","webpack://Annotorious/./node_modules/es-array-method-boxes-properly/index.js","webpack://Annotorious/./node_modules/es-to-primitive/es2015.js","webpack://Annotorious/./node_modules/es-to-primitive/es5.js","webpack://Annotorious/./node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://Annotorious/./node_modules/fast-deep-equal/index.js","webpack://Annotorious/./node_modules/function-bind/implementation.js","webpack://Annotorious/./node_modules/function-bind/index.js","webpack://Annotorious/./node_modules/get-intrinsic/index.js","webpack://Annotorious/./node_modules/has-symbols/index.js","webpack://Annotorious/./node_modules/has-symbols/shams.js","webpack://Annotorious/./node_modules/has-tostringtag/shams.js","webpack://Annotorious/./node_modules/has/src/index.js","webpack://Annotorious/./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://Annotorious/./node_modules/is-callable/index.js","webpack://Annotorious/./node_modules/is-date-object/index.js","webpack://Annotorious/./node_modules/is-string/index.js","webpack://Annotorious/./node_modules/is-symbol/index.js","webpack://Annotorious/./node_modules/line-height/lib/line-height.js","webpack://Annotorious/./node_modules/node-polyglot/index.js","webpack://Annotorious/./node_modules/object-inspect/index.js","webpack://Annotorious/./node_modules/object-keys/implementation.js","webpack://Annotorious/./node_modules/object-keys/index.js","webpack://Annotorious/./node_modules/object-keys/isArguments.js","webpack://Annotorious/./node_modules/object.entries/implementation.js","webpack://Annotorious/./node_modules/object.entries/index.js","webpack://Annotorious/./node_modules/object.entries/polyfill.js","webpack://Annotorious/./node_modules/object.entries/shim.js","webpack://Annotorious/../src/constants.js","webpack://Annotorious/../src/util.js","webpack://Annotorious/../src/options.js","webpack://Annotorious/../src/create-element.js","webpack://Annotorious/../src/component.js","webpack://Annotorious/../src/create-context.js","webpack://Annotorious/../src/diff/children.js","webpack://Annotorious/../src/diff/props.js","webpack://Annotorious/../src/diff/index.js","webpack://Annotorious/../src/render.js","webpack://Annotorious/../src/clone-element.js","webpack://Annotorious/../src/diff/catch-error.js","webpack://Annotorious/../src/index.js","webpack://Annotorious/../src/PureComponent.js","webpack://Annotorious/../src/memo.js","webpack://Annotorious/../src/forwardRef.js","webpack://Annotorious/../src/Children.js","webpack://Annotorious/../src/suspense.js","webpack://Annotorious/../src/suspense-list.js","webpack://Annotorious/../src/portals.js","webpack://Annotorious/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://Annotorious/./node_modules/prop-types/index.js","webpack://Annotorious/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://Annotorious/./node_modules/react-autosize-textarea/lib/TextareaAutosize.js","webpack://Annotorious/./node_modules/react-autosize-textarea/lib/index.js","webpack://Annotorious/./node_modules/react-draggable/build/cjs/Draggable.js","webpack://Annotorious/./node_modules/react-draggable/build/cjs/DraggableCore.js","webpack://Annotorious/./node_modules/react-draggable/build/cjs/cjs.js","webpack://Annotorious/./node_modules/react-draggable/build/cjs/utils/domFns.js","webpack://Annotorious/./node_modules/react-draggable/build/cjs/utils/getPrefix.js","webpack://Annotorious/./node_modules/react-draggable/build/cjs/utils/log.js","webpack://Annotorious/./node_modules/react-draggable/build/cjs/utils/positionFns.js","webpack://Annotorious/./node_modules/react-draggable/build/cjs/utils/shims.js","webpack://Annotorious/./node_modules/react-input-autosize/lib/AutosizeInput.js","webpack://Annotorious/./node_modules/react-is/cjs/react-is.production.min.js","webpack://Annotorious/./node_modules/react-is/index.js","webpack://Annotorious/./node_modules/string.prototype.trim/implementation.js","webpack://Annotorious/./node_modules/string.prototype.trim/index.js","webpack://Annotorious/./node_modules/string.prototype.trim/polyfill.js","webpack://Annotorious/./node_modules/string.prototype.trim/shim.js","webpack://Annotorious/../../src/lang/ar.ts","webpack://Annotorious/../../src/lang/cs.ts","webpack://Annotorious/../../src/lang/de.ts","webpack://Annotorious/../../src/lang/el.ts","webpack://Annotorious/../../src/lang/es.ts","webpack://Annotorious/../../src/lang/fi.ts","webpack://Annotorious/../../src/lang/fr.ts","webpack://Annotorious/../../src/lang/gl.ts","webpack://Annotorious/../../src/lang/hi_IN.ts","webpack://Annotorious/../../src/lang/it.ts","webpack://Annotorious/../../src/lang/ja.ts","webpack://Annotorious/../../src/lang/ko.ts","webpack://Annotorious/../../src/lang/nl.ts","webpack://Annotorious/../../src/lang/pt_BR.ts","webpack://Annotorious/../../src/lang/ru.ts","webpack://Annotorious/../../src/lang/sv.ts","webpack://Annotorious/../../src/lang/th.ts","webpack://Annotorious/../../src/lang/tr.ts","webpack://Annotorious/../../src/lang/zh_CN.ts","webpack://Annotorious/../../src/lang/zh_TW.ts","webpack://Annotorious/./node_modules/tiny-emitter/index.js","webpack://Annotorious/./node_modules/warning/warning.js","webpack://Annotorious/./node_modules/es-abstract/2021/Call.js","webpack://Annotorious/./node_modules/es-abstract/2021/Get.js","webpack://Annotorious/./node_modules/es-abstract/2021/HasProperty.js","webpack://Annotorious/./node_modules/es-abstract/2021/IsArray.js","webpack://Annotorious/./node_modules/es-abstract/2021/IsCallable.js","webpack://Annotorious/./node_modules/es-abstract/2021/IsPropertyKey.js","webpack://Annotorious/./node_modules/es-abstract/2021/LengthOfArrayLike.js","webpack://Annotorious/./node_modules/es-abstract/2021/RequireObjectCoercible.js","webpack://Annotorious/./node_modules/es-abstract/2021/ToIntegerOrInfinity.js","webpack://Annotorious/./node_modules/es-abstract/2021/ToLength.js","webpack://Annotorious/./node_modules/es-abstract/2021/ToNumber.js","webpack://Annotorious/./node_modules/es-abstract/2021/ToObject.js","webpack://Annotorious/./node_modules/es-abstract/2021/ToPrimitive.js","webpack://Annotorious/./node_modules/es-abstract/2021/ToString.js","webpack://Annotorious/./node_modules/es-abstract/2021/Type.js","webpack://Annotorious/./node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://Annotorious/./node_modules/es-abstract/5/ToInteger.js","webpack://Annotorious/./node_modules/es-abstract/5/ToNumber.js","webpack://Annotorious/./node_modules/es-abstract/5/ToPrimitive.js","webpack://Annotorious/./node_modules/es-abstract/5/Type.js","webpack://Annotorious/./node_modules/es-abstract/5/abs.js","webpack://Annotorious/./node_modules/es-abstract/5/floor.js","webpack://Annotorious/./node_modules/es-abstract/helpers/isFinite.js","webpack://Annotorious/./node_modules/es-abstract/helpers/isNaN.js","webpack://Annotorious/./node_modules/es-abstract/helpers/isPrimitive.js","webpack://Annotorious/./node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://Annotorious/./node_modules/es-abstract/helpers/regexTester.js","webpack://Annotorious/./node_modules/es-abstract/helpers/sign.js","webpack://Annotorious/webpack/bootstrap","webpack://Annotorious/webpack/runtime/compat get default export","webpack://Annotorious/webpack/runtime/define property getters","webpack://Annotorious/webpack/runtime/hasOwnProperty shorthand","webpack://Annotorious/webpack/runtime/make namespace object","webpack://Annotorious/./src/util/SVG.js","webpack://Annotorious/./src/selectors/RectFragment.js","webpack://Annotorious/./src/util/Geom2D.js","webpack://Annotorious/./src/selectors/EmbeddedSVG.js","webpack://Annotorious/./node_modules/uuid/dist/esm-browser/rng.js","webpack://Annotorious/./src/selectors/index.js","webpack://Annotorious/./node_modules/uuid/dist/esm-browser/regex.js","webpack://Annotorious/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://Annotorious/./node_modules/uuid/dist/esm-browser/validate.js","webpack://Annotorious/./node_modules/uuid/dist/esm-browser/v4.js","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/WebAnnotation.js","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/Selection.js","webpack://Annotorious/./src/tools/rectangle/RubberbandRect.js","webpack://Annotorious/./src/util/Touch.js","webpack://Annotorious/./src/tools/Tool.js","webpack://Annotorious/./src/tools/EditableShape.js","webpack://Annotorious/./src/util/Formatting.js","webpack://Annotorious/./src/tools/rectangle/EditableRect.js","webpack://Annotorious/./src/tools/rectangle/RubberbandRectTool.js","webpack://Annotorious/./src/tools/polygon/PolygonMask.js","webpack://Annotorious/./src/tools/polygon/RubberbandPolygon.js","webpack://Annotorious/./src/tools/polygon/EditablePolygon.js","webpack://Annotorious/./src/tools/polygon/RubberbandPolygonTool.js","webpack://Annotorious/./src/tools/ToolsRegistry.js","webpack://Annotorious/./src/Crosshair.js","webpack://Annotorious/./src/util/ImageSnippet.js","webpack://Annotorious/./src/AnnotationLayer.js","webpack://Annotorious/../../src/lang/en_US.ts","webpack://Annotorious/../src/register.ts","webpack://Annotorious/../../src/utils/date.ts","webpack://Annotorious/../src/format.ts","webpack://Annotorious/../../src/utils/dom.ts","webpack://Annotorious/../src/realtime.ts","webpack://Annotorious/../src/index.ts","webpack://Annotorious/../src/timeago-react.tsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/i18n/index.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/widgets/comment/DropdownMenu.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/useClickOutside.js","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/widgets/comment/TextEntryField.jsx","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://Annotorious/./node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js","webpack://Annotorious/./node_modules/stylis/src/Utility.js","webpack://Annotorious/./node_modules/stylis/src/Tokenizer.js","webpack://Annotorious/./node_modules/stylis/src/Enum.js","webpack://Annotorious/./node_modules/stylis/src/Serializer.js","webpack://Annotorious/./node_modules/stylis/src/Parser.js","webpack://Annotorious/./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","webpack://Annotorious/./node_modules/stylis/src/Middleware.js","webpack://Annotorious/./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack://Annotorious/./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack://Annotorious/./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack://Annotorious/./node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","webpack://Annotorious/./node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack://Annotorious/./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","webpack://Annotorious/./node_modules/@emotion/react/dist/emotion-element-c39617d8.browser.esm.js","webpack://Annotorious/./node_modules/@emotion/react/dist/emotion-react.browser.esm.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://Annotorious/./node_modules/react-select/dist/index-4bd03571.esm.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://Annotorious/./node_modules/memoize-one/dist/memoize-one.esm.js","webpack://Annotorious/./node_modules/react-select/dist/Select-dbb12e54.esm.js","webpack://Annotorious/./node_modules/react-select/dist/stateManager-845a3300.esm.js","webpack://Annotorious/./node_modules/react-select/dist/react-select.esm.js","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/widgets/comment/PurposeSelect.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/Icons.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/widgets/comment/Comment.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/widgets/comment/CommentWidget.jsx","webpack://Annotorious/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://Annotorious/./node_modules/dom-helpers/esm/removeClass.js","webpack://Annotorious/./node_modules/react-transition-group/esm/config.js","webpack://Annotorious/./node_modules/react-transition-group/esm/TransitionGroupContext.js","webpack://Annotorious/./node_modules/react-transition-group/esm/Transition.js","webpack://Annotorious/./node_modules/react-transition-group/esm/CSSTransition.js","webpack://Annotorious/./node_modules/dom-helpers/esm/addClass.js","webpack://Annotorious/./node_modules/dom-helpers/esm/hasClass.js","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/widgets/Autocomplete.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/widgets/tag/TagWidget.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/widgets/WrappedWidget.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/widgets/index.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/setPosition.js","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/editor/Editor.jsx","webpack://Annotorious/./src/ImageAnnotator.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/Environment.js","webpack://Annotorious/./src/index.jsx","webpack://Annotorious/./node_modules/@recogito/recogito-client-core/src/utils/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Annotorious\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Annotorious\"] = factory();\n\telse\n\t\troot[\"Annotorious\"] = factory();\n})(self, () => {\nreturn ","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Call = require('es-abstract/2021/Call');\nvar Get = require('es-abstract/2021/Get');\nvar HasProperty = require('es-abstract/2021/HasProperty');\nvar IsCallable = require('es-abstract/2021/IsCallable');\nvar LengthOfArrayLike = require('es-abstract/2021/LengthOfArrayLike');\nvar ToObject = require('es-abstract/2021/ToObject');\nvar ToString = require('es-abstract/2021/ToString');\n\nvar isString = require('is-string');\n\nvar $split = callBound('String.prototype.split');\n\n// Check failure of by-index access of string characters (IE < 9) and failure of `0 in boxedString` (Rhino)\nvar boxedString = Object('a');\nvar splitString = boxedString[0] !== 'a' || !(0 in boxedString);\n\nmodule.exports = function forEach(callbackfn) {\n\tvar thisO = ToObject(this);\n\tvar O = splitString && isString(this) ? $split(this, '') : thisO;\n\n\tvar len = LengthOfArrayLike(O);\n\n\tif (!IsCallable(callbackfn)) {\n\t\tthrow new $TypeError('Array.prototype.forEach callback must be a function');\n\t}\n\n\tvar thisArg;\n\tif (arguments.length > 1) {\n\t\tthisArg = arguments[1];\n\t}\n\n\tvar k = 0;\n\twhile (k < len) {\n\t\tvar Pk = ToString(k);\n\t\tvar kPresent = HasProperty(O, Pk);\n\t\tif (kPresent) {\n\t\t\tvar kValue = Get(O, Pk);\n\t\t\tCall(callbackfn, thisArg, [kValue, k, O]);\n\t\t}\n\t\tk += 1;\n\t}\n\n\treturn void undefined;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\nvar callBound = require('call-bind/callBound');\nvar RequireObjectCoercible = require('es-abstract/2021/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar polyfill = getPolyfill();\nvar shim = require('./shim');\n\nvar $slice = callBound('Array.prototype.slice');\n\nvar bound = callBind.apply(polyfill);\n// eslint-disable-next-line no-unused-vars\nvar boundCoercible = function forEach(array, callbackfn) {\n\tRequireObjectCoercible(array);\n\treturn bound(array, $slice(arguments, 1));\n};\n\ndefine(boundCoercible, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundCoercible;\n","'use strict';\n\nvar arrayMethodBoxesProperly = require('es-array-method-boxes-properly');\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tvar method = Array.prototype.forEach;\n\treturn arrayMethodBoxesProperly(method) ? method : implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimForEach() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tArray.prototype,\n\t\t{ forEach: polyfill },\n\t\t{ forEach: function () { return Array.prototype.forEach !== polyfill; } }\n\t);\n\treturn polyfill;\n};\n","/*!\n\tautosize 4.0.4\n\tlicense: MIT\n\thttp://www.jacklmoore.com/autosize\n*/\n(function (global, factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine(['module', 'exports'], factory);\n\t} else if (typeof exports !== \"undefined\") {\n\t\tfactory(module, exports);\n\t} else {\n\t\tvar mod = {\n\t\t\texports: {}\n\t\t};\n\t\tfactory(mod, mod.exports);\n\t\tglobal.autosize = mod.exports;\n\t}\n})(this, function (module, exports) {\n\t'use strict';\n\n\tvar map = typeof Map === \"function\" ? new Map() : function () {\n\t\tvar keys = [];\n\t\tvar values = [];\n\n\t\treturn {\n\t\t\thas: function has(key) {\n\t\t\t\treturn keys.indexOf(key) > -1;\n\t\t\t},\n\t\t\tget: function get(key) {\n\t\t\t\treturn values[keys.indexOf(key)];\n\t\t\t},\n\t\t\tset: function set(key, value) {\n\t\t\t\tif (keys.indexOf(key) === -1) {\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t\tvalues.push(value);\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelete: function _delete(key) {\n\t\t\t\tvar index = keys.indexOf(key);\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tkeys.splice(index, 1);\n\t\t\t\t\tvalues.splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}();\n\n\tvar createEvent = function createEvent(name) {\n\t\treturn new Event(name, { bubbles: true });\n\t};\n\ttry {\n\t\tnew Event('test');\n\t} catch (e) {\n\t\t// IE does not support `new Event()`\n\t\tcreateEvent = function createEvent(name) {\n\t\t\tvar evt = document.createEvent('Event');\n\t\t\tevt.initEvent(name, true, false);\n\t\t\treturn evt;\n\t\t};\n\t}\n\n\tfunction assign(ta) {\n\t\tif (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;\n\n\t\tvar heightOffset = null;\n\t\tvar clientWidth = null;\n\t\tvar cachedHeight = null;\n\n\t\tfunction init() {\n\t\t\tvar style = window.getComputedStyle(ta, null);\n\n\t\t\tif (style.resize === 'vertical') {\n\t\t\t\tta.style.resize = 'none';\n\t\t\t} else if (style.resize === 'both') {\n\t\t\t\tta.style.resize = 'horizontal';\n\t\t\t}\n\n\t\t\tif (style.boxSizing === 'content-box') {\n\t\t\t\theightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n\t\t\t} else {\n\t\t\t\theightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n\t\t\t}\n\t\t\t// Fix when a textarea is not on document body and heightOffset is Not a Number\n\t\t\tif (isNaN(heightOffset)) {\n\t\t\t\theightOffset = 0;\n\t\t\t}\n\n\t\t\tupdate();\n\t\t}\n\n\t\tfunction changeOverflow(value) {\n\t\t\t{\n\t\t\t\t// Chrome/Safari-specific fix:\n\t\t\t\t// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space\n\t\t\t\t// made available by removing the scrollbar. The following forces the necessary text reflow.\n\t\t\t\tvar width = ta.style.width;\n\t\t\t\tta.style.width = '0px';\n\t\t\t\t// Force reflow:\n\t\t\t\t/* jshint ignore:start */\n\t\t\t\tta.offsetWidth;\n\t\t\t\t/* jshint ignore:end */\n\t\t\t\tta.style.width = width;\n\t\t\t}\n\n\t\t\tta.style.overflowY = value;\n\t\t}\n\n\t\tfunction getParentOverflows(el) {\n\t\t\tvar arr = [];\n\n\t\t\twhile (el && el.parentNode && el.parentNode instanceof Element) {\n\t\t\t\tif (el.parentNode.scrollTop) {\n\t\t\t\t\tarr.push({\n\t\t\t\t\t\tnode: el.parentNode,\n\t\t\t\t\t\tscrollTop: el.parentNode.scrollTop\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tel = el.parentNode;\n\t\t\t}\n\n\t\t\treturn arr;\n\t\t}\n\n\t\tfunction resize() {\n\t\t\tif (ta.scrollHeight === 0) {\n\t\t\t\t// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar overflows = getParentOverflows(ta);\n\t\t\tvar docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)\n\n\t\t\tta.style.height = '';\n\t\t\tta.style.height = ta.scrollHeight + heightOffset + 'px';\n\n\t\t\t// used to check if an update is actually necessary on window.resize\n\t\t\tclientWidth = ta.clientWidth;\n\n\t\t\t// prevents scroll-position jumping\n\t\t\toverflows.forEach(function (el) {\n\t\t\t\tel.node.scrollTop = el.scrollTop;\n\t\t\t});\n\n\t\t\tif (docTop) {\n\t\t\t\tdocument.documentElement.scrollTop = docTop;\n\t\t\t}\n\t\t}\n\n\t\tfunction update() {\n\t\t\tresize();\n\n\t\t\tvar styleHeight = Math.round(parseFloat(ta.style.height));\n\t\t\tvar computed = window.getComputedStyle(ta, null);\n\n\t\t\t// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box\n\t\t\tvar actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;\n\n\t\t\t// The actual height not matching the style height (set via the resize method) indicates that \n\t\t\t// the max-height has been exceeded, in which case the overflow should be allowed.\n\t\t\tif (actualHeight < styleHeight) {\n\t\t\t\tif (computed.overflowY === 'hidden') {\n\t\t\t\t\tchangeOverflow('scroll');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.\n\t\t\t\tif (computed.overflowY !== 'hidden') {\n\t\t\t\t\tchangeOverflow('hidden');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cachedHeight !== actualHeight) {\n\t\t\t\tcachedHeight = actualHeight;\n\t\t\t\tvar evt = createEvent('autosize:resized');\n\t\t\t\ttry {\n\t\t\t\t\tta.dispatchEvent(evt);\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// Firefox will throw an error on dispatchEvent for a detached element\n\t\t\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=889376\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar pageResize = function pageResize() {\n\t\t\tif (ta.clientWidth !== clientWidth) {\n\t\t\t\tupdate();\n\t\t\t}\n\t\t};\n\n\t\tvar destroy = function (style) {\n\t\t\twindow.removeEventListener('resize', pageResize, false);\n\t\t\tta.removeEventListener('input', update, false);\n\t\t\tta.removeEventListener('keyup', update, false);\n\t\t\tta.removeEventListener('autosize:destroy', destroy, false);\n\t\t\tta.removeEventListener('autosize:update', update, false);\n\n\t\t\tObject.keys(style).forEach(function (key) {\n\t\t\t\tta.style[key] = style[key];\n\t\t\t});\n\n\t\t\tmap.delete(ta);\n\t\t}.bind(ta, {\n\t\t\theight: ta.style.height,\n\t\t\tresize: ta.style.resize,\n\t\t\toverflowY: ta.style.overflowY,\n\t\t\toverflowX: ta.style.overflowX,\n\t\t\twordWrap: ta.style.wordWrap\n\t\t});\n\n\t\tta.addEventListener('autosize:destroy', destroy, false);\n\n\t\t// IE9 does not fire onpropertychange or oninput for deletions,\n\t\t// so binding to onkeyup to catch most of those events.\n\t\t// There is no way that I know of to detect something like 'cut' in IE9.\n\t\tif ('onpropertychange' in ta && 'oninput' in ta) {\n\t\t\tta.addEventListener('keyup', update, false);\n\t\t}\n\n\t\twindow.addEventListener('resize', pageResize, false);\n\t\tta.addEventListener('input', update, false);\n\t\tta.addEventListener('autosize:update', update, false);\n\t\tta.style.overflowX = 'hidden';\n\t\tta.style.wordWrap = 'break-word';\n\n\t\tmap.set(ta, {\n\t\t\tdestroy: destroy,\n\t\t\tupdate: update\n\t\t});\n\n\t\tinit();\n\t}\n\n\tfunction destroy(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.destroy();\n\t\t}\n\t}\n\n\tfunction update(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.update();\n\t\t}\n\t}\n\n\tvar autosize = null;\n\n\t// Do nothing in Node.js environment and IE8 (or lower)\n\tif (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {\n\t\tautosize = function autosize(el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\treturn el;\n\t\t};\n\t} else {\n\t\tautosize = function autosize(el, options) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], function (x) {\n\t\t\t\t\treturn assign(x, options);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], destroy);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], update);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t}\n\n\texports.default = autosize;\n\tmodule.exports = exports['default'];\n});","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","// This code has been refactored for 140 bytes\n// You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js\nvar computedStyle = function (el, prop, getComputedStyle) {\n getComputedStyle = window.getComputedStyle;\n\n // In one fell swoop\n return (\n // If we have getComputedStyle\n getComputedStyle ?\n // Query it\n // TODO: From CSS-Query notes, we might need (node, null) for FF\n getComputedStyle(el) :\n\n // Otherwise, we are in IE and use currentStyle\n el.currentStyle\n )[\n // Switch to camelCase for CSSOM\n // DEV: Grabbed from jQuery\n // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194\n // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597\n prop.replace(/-(\\w)/gi, function (word, letter) {\n return letter.toUpperCase();\n })\n ];\n};\n\nmodule.exports = computedStyle;\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\torigDefineProperty(obj, 'x', { enumerable: false, value: obj });\n\t\t// eslint-disable-next-line no-unused-vars, no-restricted-syntax\n\t\tfor (var _ in obj) { // jscs:ignore disallowUnusedVariables\n\t\t\treturn false;\n\t\t}\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","module.exports = function properlyBoxed(method) {\n\t// Check node 0.6.21 bug where third parameter is not boxed\n\tvar properlyBoxesNonStrict = true;\n\tvar properlyBoxesStrict = true;\n\tvar threwException = false;\n\tif (typeof method === 'function') {\n\t\ttry {\n\t\t\t// eslint-disable-next-line max-params\n\t\t\tmethod.call('f', function (_, __, O) {\n\t\t\t\tif (typeof O !== 'object') {\n\t\t\t\t\tproperlyBoxesNonStrict = false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmethod.call(\n\t\t\t\t[null],\n\t\t\t\tfunction () {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\tproperlyBoxesStrict = typeof this === 'string'; // eslint-disable-line no-invalid-this\n\t\t\t\t},\n\t\t\t\t'x'\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tthrewException = true;\n\t\t}\n\t\treturn !threwException && properlyBoxesNonStrict && properlyBoxesStrict;\n\t}\n\treturn false;\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nvar isPrimitive = require('./helpers/isPrimitive');\n\nvar isCallable = require('is-callable');\n\n// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8\nvar ES5internalSlots = {\n\t'[[DefaultValue]]': function (O) {\n\t\tvar actualHint;\n\t\tif (arguments.length > 1) {\n\t\t\tactualHint = arguments[1];\n\t\t} else {\n\t\t\tactualHint = toStr.call(O) === '[object Date]' ? String : Number;\n\t\t}\n\n\t\tif (actualHint === String || actualHint === Number) {\n\t\t\tvar methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\t\t\tvar value, i;\n\t\t\tfor (i = 0; i < methods.length; ++i) {\n\t\t\t\tif (isCallable(O[methods[i]])) {\n\t\t\t\t\tvalue = O[methods[i]]();\n\t\t\t\t\tif (isPrimitive(value)) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new TypeError('No default value');\n\t\t}\n\t\tthrow new TypeError('invalid [[DefaultValue]] hint supplied');\n\t}\n};\n\n// http://ecma-international.org/ecma-262/5.1/#sec-9.1\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tif (arguments.length > 1) {\n\t\treturn ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);\n\t}\n\treturn ES5internalSlots['[[DefaultValue]]'](input);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n/* globals document: false */\nvar documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (value === documentDotAll) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (typeof value === 'function' && !value.prototype) { return true; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (value === documentDotAll) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (typeof value === 'function' && !value.prototype) { return true; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\treturn strClass === fnClass || strClass === genClass;\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar strValue = String.prototype.valueOf;\nvar tryStringObject = function tryStringObject(value) {\n\ttry {\n\t\tstrValue.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar strClass = '[object String]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isString(value) {\n\tif (typeof value === 'string') {\n\t\treturn true;\n\t}\n\tif (typeof value !== 'object') {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;\n};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","// Load in dependencies\nvar computedStyle = require('computed-style');\n\n/**\n * Calculate the `line-height` of a given node\n * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.\n * @returns {Number} `line-height` of the element in pixels\n */\nfunction lineHeight(node) {\n // Grab the line-height via style\n var lnHeightStr = computedStyle(node, 'line-height');\n var lnHeight = parseFloat(lnHeightStr, 10);\n\n // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')\n if (lnHeightStr === lnHeight + '') {\n // Save the old lineHeight style and update the em unit to the element\n var _lnHeightStyle = node.style.lineHeight;\n node.style.lineHeight = lnHeightStr + 'em';\n\n // Calculate the em based height\n lnHeightStr = computedStyle(node, 'line-height');\n lnHeight = parseFloat(lnHeightStr, 10);\n\n // Revert the lineHeight style\n if (_lnHeightStyle) {\n node.style.lineHeight = _lnHeightStyle;\n } else {\n delete node.style.lineHeight;\n }\n }\n\n // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)\n // DEV: `em` units are converted to `pt` in IE6\n // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length\n if (lnHeightStr.indexOf('pt') !== -1) {\n lnHeight *= 4;\n lnHeight /= 3;\n // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)\n } else if (lnHeightStr.indexOf('mm') !== -1) {\n lnHeight *= 96;\n lnHeight /= 25.4;\n // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)\n } else if (lnHeightStr.indexOf('cm') !== -1) {\n lnHeight *= 96;\n lnHeight /= 2.54;\n // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)\n } else if (lnHeightStr.indexOf('in') !== -1) {\n lnHeight *= 96;\n // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)\n } else if (lnHeightStr.indexOf('pc') !== -1) {\n lnHeight *= 16;\n }\n\n // Continue our computation\n lnHeight = Math.round(lnHeight);\n\n // If the line-height is \"normal\", calculate by font-size\n if (lnHeightStr === 'normal') {\n // Create a temporary node\n var nodeName = node.nodeName;\n var _node = document.createElement(nodeName);\n _node.innerHTML = '&nbsp;';\n\n // If we have a text area, reset it to only 1 row\n // https://github.com/twolfson/line-height/issues/4\n if (nodeName.toUpperCase() === 'TEXTAREA') {\n _node.setAttribute('rows', '1');\n }\n\n // Set the font-size of the element\n var fontSizeStr = computedStyle(node, 'font-size');\n _node.style.fontSize = fontSizeStr;\n\n // Remove default padding/border which can affect offset height\n // https://github.com/twolfson/line-height/issues/4\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight\n _node.style.padding = '0px';\n _node.style.border = '0px';\n\n // Append it to the body\n var body = document.body;\n body.appendChild(_node);\n\n // Assume the line height of the element is the height\n var height = _node.offsetHeight;\n lnHeight = height;\n\n // Remove our child from the DOM\n body.removeChild(_node);\n }\n\n // Return the calculated height\n return lnHeight;\n}\n\n// Export lineHeight\nmodule.exports = lineHeight;\n","// (c) 2012-2018 Airbnb, Inc.\n//\n// polyglot.js may be freely distributed under the terms of the BSD\n// license. For all licensing information, details, and documentation:\n// http://airbnb.github.com/polyglot.js\n//\n//\n// Polyglot.js is an I18n helper library written in JavaScript, made to\n// work both in the browser and in Node. It provides a simple solution for\n// interpolation and pluralization, based off of Airbnb's\n// experience adding I18n functionality to its Backbone.js and Node apps.\n//\n// Polylglot is agnostic to your translation backend. It doesn't perform any\n// translation; it simply gives you a way to manage translated phrases from\n// your client- or server-side JavaScript application.\n//\n\n'use strict';\n\nvar forEach = require('array.prototype.foreach');\nvar entries = require('object.entries');\nvar warning = require('warning');\nvar has = require('has');\nvar trim = require('string.prototype.trim');\n\nvar warn = function warn(message) {\n warning(false, message);\n};\n\nvar replace = String.prototype.replace;\nvar split = String.prototype.split;\n\n// #### Pluralization methods\n// The string that separates the different phrase possibilities.\nvar delimiter = '||||';\n\nvar russianPluralGroups = function (n) {\n var lastTwo = n % 100;\n var end = lastTwo % 10;\n if (lastTwo !== 11 && end === 1) {\n return 0;\n }\n if (2 <= end && end <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {\n return 1;\n }\n return 2;\n};\n\nvar defaultPluralRules = {\n // Mapping from pluralization group plural logic.\n pluralTypes: {\n arabic: function (n) {\n // http://www.arabeyes.org/Plural_Forms\n if (n < 3) { return n; }\n var lastTwo = n % 100;\n if (lastTwo >= 3 && lastTwo <= 10) return 3;\n return lastTwo >= 11 ? 4 : 5;\n },\n bosnian_serbian: russianPluralGroups,\n chinese: function () { return 0; },\n croatian: russianPluralGroups,\n french: function (n) { return n >= 2 ? 1 : 0; },\n german: function (n) { return n !== 1 ? 1 : 0; },\n russian: russianPluralGroups,\n lithuanian: function (n) {\n if (n % 10 === 1 && n % 100 !== 11) { return 0; }\n return n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19) ? 1 : 2;\n },\n czech: function (n) {\n if (n === 1) { return 0; }\n return (n >= 2 && n <= 4) ? 1 : 2;\n },\n polish: function (n) {\n if (n === 1) { return 0; }\n var end = n % 10;\n return 2 <= end && end <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;\n },\n icelandic: function (n) { return (n % 10 !== 1 || n % 100 === 11) ? 1 : 0; },\n slovenian: function (n) {\n var lastTwo = n % 100;\n if (lastTwo === 1) {\n return 0;\n }\n if (lastTwo === 2) {\n return 1;\n }\n if (lastTwo === 3 || lastTwo === 4) {\n return 2;\n }\n return 3;\n }\n },\n\n // Mapping from pluralization group to individual language codes/locales.\n // Will look up based on exact match, if not found and it's a locale will parse the locale\n // for language code, and if that does not exist will default to 'en'\n pluralTypeToLanguages: {\n arabic: ['ar'],\n bosnian_serbian: ['bs-Latn-BA', 'bs-Cyrl-BA', 'srl-RS', 'sr-RS'],\n chinese: ['id', 'id-ID', 'ja', 'ko', 'ko-KR', 'lo', 'ms', 'th', 'th-TH', 'zh'],\n croatian: ['hr', 'hr-HR'],\n german: ['fa', 'da', 'de', 'en', 'es', 'fi', 'el', 'he', 'hi-IN', 'hu', 'hu-HU', 'it', 'nl', 'no', 'pt', 'sv', 'tr'],\n french: ['fr', 'tl', 'pt-br'],\n russian: ['ru', 'ru-RU'],\n lithuanian: ['lt'],\n czech: ['cs', 'cs-CZ', 'sk'],\n polish: ['pl'],\n icelandic: ['is'],\n slovenian: ['sl-SL']\n }\n};\n\nfunction langToTypeMap(mapping) {\n var ret = {};\n forEach(entries(mapping), function (entry) {\n var type = entry[0];\n var langs = entry[1];\n forEach(langs, function (lang) {\n ret[lang] = type;\n });\n });\n return ret;\n}\n\nfunction pluralTypeName(pluralRules, locale) {\n var langToPluralType = langToTypeMap(pluralRules.pluralTypeToLanguages);\n return langToPluralType[locale]\n || langToPluralType[split.call(locale, /-/, 1)[0]]\n || langToPluralType.en;\n}\n\nfunction pluralTypeIndex(pluralRules, pluralType, count) {\n return pluralRules.pluralTypes[pluralType](count);\n}\n\nfunction createMemoizedPluralTypeNameSelector() {\n var localePluralTypeStorage = {};\n\n return function (pluralRules, locale) {\n var pluralType = localePluralTypeStorage[locale];\n\n if (pluralType && !pluralRules.pluralTypes[pluralType]) {\n pluralType = null;\n localePluralTypeStorage[locale] = pluralType;\n }\n\n if (!pluralType) {\n pluralType = pluralTypeName(pluralRules, locale);\n\n if (pluralType) {\n localePluralTypeStorage[locale] = pluralType;\n }\n }\n\n return pluralType;\n };\n}\n\nfunction escape(token) {\n return token.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction constructTokenRegex(opts) {\n var prefix = (opts && opts.prefix) || '%{';\n var suffix = (opts && opts.suffix) || '}';\n\n if (prefix === delimiter || suffix === delimiter) {\n throw new RangeError('\"' + delimiter + '\" token is reserved for pluralization');\n }\n\n return new RegExp(escape(prefix) + '(.*?)' + escape(suffix), 'g');\n}\n\nvar memoizedPluralTypeName = createMemoizedPluralTypeNameSelector();\n\nvar defaultTokenRegex = /%\\{(.*?)\\}/g;\n\n// ### transformPhrase(phrase, substitutions, locale)\n//\n// Takes a phrase string and transforms it by choosing the correct\n// plural form and interpolating it.\n//\n// transformPhrase('Hello, %{name}!', {name: 'Spike'});\n// // \"Hello, Spike!\"\n//\n// The correct plural form is selected if substitutions.smart_count\n// is set. You can pass in a number instead of an Object as `substitutions`\n// as a shortcut for `smart_count`.\n//\n// transformPhrase('%{smart_count} new messages |||| 1 new message', {smart_count: 1}, 'en');\n// // \"1 new message\"\n//\n// transformPhrase('%{smart_count} new messages |||| 1 new message', {smart_count: 2}, 'en');\n// // \"2 new messages\"\n//\n// transformPhrase('%{smart_count} new messages |||| 1 new message', 5, 'en');\n// // \"5 new messages\"\n//\n// You should pass in a third argument, the locale, to specify the correct plural type.\n// It defaults to `'en'` with 2 plural forms.\nfunction transformPhrase(phrase, substitutions, locale, tokenRegex, pluralRules) {\n if (typeof phrase !== 'string') {\n throw new TypeError('Polyglot.transformPhrase expects argument #1 to be string');\n }\n\n if (substitutions == null) {\n return phrase;\n }\n\n var result = phrase;\n var interpolationRegex = tokenRegex || defaultTokenRegex;\n\n // allow number as a pluralization shortcut\n var options = typeof substitutions === 'number' ? { smart_count: substitutions } : substitutions;\n\n // Select plural form: based on a phrase text that contains `n`\n // plural forms separated by `delimiter`, a `locale`, and a `substitutions.smart_count`,\n // choose the correct plural form. This is only done if `count` is set.\n if (options.smart_count != null && phrase) {\n var pluralRulesOrDefault = pluralRules || defaultPluralRules;\n var texts = split.call(phrase, delimiter);\n var bestLocale = locale || 'en';\n var pluralType = memoizedPluralTypeName(pluralRulesOrDefault, bestLocale);\n var pluralTypeWithCount = pluralTypeIndex(\n pluralRulesOrDefault,\n pluralType,\n options.smart_count\n );\n\n result = trim(texts[pluralTypeWithCount] || texts[0]);\n }\n\n // Interpolate: Creates a `RegExp` object for each interpolation placeholder.\n result = replace.call(result, interpolationRegex, function (expression, argument) {\n if (!has(options, argument) || options[argument] == null) { return expression; }\n return options[argument];\n });\n\n return result;\n}\n\n// ### Polyglot class constructor\nfunction Polyglot(options) {\n var opts = options || {};\n this.phrases = {};\n this.extend(opts.phrases || {});\n this.currentLocale = opts.locale || 'en';\n var allowMissing = opts.allowMissing ? transformPhrase : null;\n this.onMissingKey = typeof opts.onMissingKey === 'function' ? opts.onMissingKey : allowMissing;\n this.warn = opts.warn || warn;\n this.tokenRegex = constructTokenRegex(opts.interpolation);\n this.pluralRules = opts.pluralRules || defaultPluralRules;\n}\n\n// ### polyglot.locale([locale])\n//\n// Get or set locale. Internally, Polyglot only uses locale for pluralization.\nPolyglot.prototype.locale = function (newLocale) {\n if (newLocale) this.currentLocale = newLocale;\n return this.currentLocale;\n};\n\n// ### polyglot.extend(phrases)\n//\n// Use `extend` to tell Polyglot how to translate a given key.\n//\n// polyglot.extend({\n// \"hello\": \"Hello\",\n// \"hello_name\": \"Hello, %{name}\"\n// });\n//\n// The key can be any string. Feel free to call `extend` multiple times;\n// it will override any phrases with the same key, but leave existing phrases\n// untouched.\n//\n// It is also possible to pass nested phrase objects, which get flattened\n// into an object with the nested keys concatenated using dot notation.\n//\n// polyglot.extend({\n// \"nav\": {\n// \"hello\": \"Hello\",\n// \"hello_name\": \"Hello, %{name}\",\n// \"sidebar\": {\n// \"welcome\": \"Welcome\"\n// }\n// }\n// });\n//\n// console.log(polyglot.phrases);\n// // {\n// // 'nav.hello': 'Hello',\n// // 'nav.hello_name': 'Hello, %{name}',\n// // 'nav.sidebar.welcome': 'Welcome'\n// // }\n//\n// `extend` accepts an optional second argument, `prefix`, which can be used\n// to prefix every key in the phrases object with some string, using dot\n// notation.\n//\n// polyglot.extend({\n// \"hello\": \"Hello\",\n// \"hello_name\": \"Hello, %{name}\"\n// }, \"nav\");\n//\n// console.log(polyglot.phrases);\n// // {\n// // 'nav.hello': 'Hello',\n// // 'nav.hello_name': 'Hello, %{name}'\n// // }\n//\n// This feature is used internally to support nested phrase objects.\nPolyglot.prototype.extend = function (morePhrases, prefix) {\n forEach(entries(morePhrases || {}), function (entry) {\n var key = entry[0];\n var phrase = entry[1];\n var prefixedKey = prefix ? prefix + '.' + key : key;\n if (typeof phrase === 'object') {\n this.extend(phrase, prefixedKey);\n } else {\n this.phrases[prefixedKey] = phrase;\n }\n }, this);\n};\n\n// ### polyglot.unset(phrases)\n// Use `unset` to selectively remove keys from a polyglot instance.\n//\n// polyglot.unset(\"some_key\");\n// polyglot.unset({\n// \"hello\": \"Hello\",\n// \"hello_name\": \"Hello, %{name}\"\n// });\n//\n// The unset method can take either a string (for the key), or an object hash with\n// the keys that you would like to unset.\nPolyglot.prototype.unset = function (morePhrases, prefix) {\n if (typeof morePhrases === 'string') {\n delete this.phrases[morePhrases];\n } else {\n forEach(entries(morePhrases || {}), function (entry) {\n var key = entry[0];\n var phrase = entry[1];\n var prefixedKey = prefix ? prefix + '.' + key : key;\n if (typeof phrase === 'object') {\n this.unset(phrase, prefixedKey);\n } else {\n delete this.phrases[prefixedKey];\n }\n }, this);\n }\n};\n\n// ### polyglot.clear()\n//\n// Clears all phrases. Useful for special cases, such as freeing\n// up memory if you have lots of phrases but no longer need to\n// perform any translation. Also used internally by `replace`.\nPolyglot.prototype.clear = function () {\n this.phrases = {};\n};\n\n// ### polyglot.replace(phrases)\n//\n// Completely replace the existing phrases with a new set of phrases.\n// Normally, just use `extend` to add more phrases, but under certain\n// circumstances, you may want to make sure no old phrases are lying around.\nPolyglot.prototype.replace = function (newPhrases) {\n this.clear();\n this.extend(newPhrases);\n};\n\n// ### polyglot.t(key, options)\n//\n// The most-used method. Provide a key, and `t` will return the\n// phrase.\n//\n// polyglot.t(\"hello\");\n// => \"Hello\"\n//\n// The phrase value is provided first by a call to `polyglot.extend()` or\n// `polyglot.replace()`.\n//\n// Pass in an object as the second argument to perform interpolation.\n//\n// polyglot.t(\"hello_name\", {name: \"Spike\"});\n// => \"Hello, Spike\"\n//\n// If you like, you can provide a default value in case the phrase is missing.\n// Use the special option key \"_\" to specify a default.\n//\n// polyglot.t(\"i_like_to_write_in_language\", {\n// _: \"I like to write in %{language}.\",\n// language: \"JavaScript\"\n// });\n// => \"I like to write in JavaScript.\"\n//\nPolyglot.prototype.t = function (key, options) {\n var phrase, result;\n var opts = options == null ? {} : options;\n if (typeof this.phrases[key] === 'string') {\n phrase = this.phrases[key];\n } else if (typeof opts._ === 'string') {\n phrase = opts._;\n } else if (this.onMissingKey) {\n var onMissingKey = this.onMissingKey;\n result = onMissingKey(key, opts, this.currentLocale, this.tokenRegex, this.pluralRules);\n } else {\n this.warn('Missing translation for key: \"' + key + '\"');\n result = key;\n }\n if (typeof phrase === 'string') {\n result = transformPhrase(phrase, opts, this.currentLocale, this.tokenRegex, this.pluralRules);\n }\n return result;\n};\n\n// ### polyglot.has(key)\n//\n// Check if polyglot has a translation for given key\nPolyglot.prototype.has = function (key) {\n return has(this.phrases, key);\n};\n\n// export transformPhrase\nPolyglot.transformPhrase = function transform(phrase, substitutions, locale) {\n return transformPhrase(phrase, substitutions, locale);\n};\n\nmodule.exports = Polyglot;\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar inspectCustom = require('./util.inspect').custom;\nvar inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function') {\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {\n return obj[inspectSymbol]();\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '&quot;');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2021/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\nvar $push = callBound('Array.prototype.push');\n\nmodule.exports = function entries(O) {\n\tvar obj = RequireObjectCoercible(O);\n\tvar entrys = [];\n\tfor (var key in obj) {\n\t\tif ($isEnumerable(obj, key)) { // checks own-ness as well\n\t\t\t$push(entrys, [key, obj[key]]);\n\t\t}\n\t}\n\treturn entrys;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.entries === 'function' ? Object.entries : implementation;\n};\n","'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimEntries() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { entries: polyfill }, {\n\t\tentries: function testEntries() {\n\t\t\treturn Object.entries !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","export const EMPTY_OBJ = {};\r\nexport const EMPTY_ARR = [];\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\r\n","import { EMPTY_ARR } from \"./constants\";\r\n\r\n/**\r\n * Assign properties from `props` to `obj`\r\n * @template O, P The obj and props types\r\n * @param {O} obj The object to copy properties to\r\n * @param {P} props The object to copy properties from\r\n * @returns {O & P}\r\n */\r\nexport function assign(obj, props) {\r\n\t// @ts-ignore We change the type of `obj` to be `O & P`\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn /** @type {O & P} */ (obj);\r\n}\r\n\r\n/**\r\n * Remove a child node from its parent if attached. This is a workaround for\r\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\r\n * is smaller than including a dedicated polyfill.\r\n * @param {Node} node The node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\nexport const slice = EMPTY_ARR.slice;\r\n","import { _catchError } from './diff/catch-error';\r\n\r\n/**\r\n * The `option` object can potentially contain callback functions\r\n * that are called during various stages of our renderer. This is the\r\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\r\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\r\n * for a full list of available option hooks (most editors/IDEs allow you to\r\n * ctrl+click or cmd+click on mac the type definition below).\r\n * @type {import('./internal').Options}\r\n */\r\nconst options = {\r\n\t_catchError\r\n};\r\n\r\nexport default options;\r\n","import { slice } from './util';\r\nimport options from './options';\r\n\r\nlet vnodeId = 0;\r\n\r\n/**\r\n * Create an virtual node (used for JSX)\r\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\r\n * constructor for this virtual node\r\n * @param {object | null | undefined} [props] The properties of the virtual node\r\n * @param {Array<import('.').ComponentChildren>} [children] The children of the virtual node\r\n * @returns {import('./internal').VNode}\r\n */\r\nexport function createElement(type, props, children) {\r\n\tlet normalizedProps = {},\r\n\t\tkey,\r\n\t\tref,\r\n\t\ti;\r\n\tfor (i in props) {\r\n\t\tif (i == 'key') key = props[i];\r\n\t\telse if (i == 'ref') ref = props[i];\r\n\t\telse normalizedProps[i] = props[i];\r\n\t}\r\n\r\n\tif (arguments.length > 2) {\r\n\t\tnormalizedProps.children =\r\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\r\n\t}\r\n\r\n\t// If a Component VNode, check for and apply defaultProps\r\n\t// Note: type may be undefined in development, must never error here.\r\n\tif (typeof type == 'function' && type.defaultProps != null) {\r\n\t\tfor (i in type.defaultProps) {\r\n\t\t\tif (normalizedProps[i] === undefined) {\r\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn createVNode(type, normalizedProps, key, ref, null);\r\n}\r\n\r\n/**\r\n * Create a VNode (used internally by Preact)\r\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\r\n * Constructor for this virtual node\r\n * @param {object | string | number | null} props The properties of this virtual node.\r\n * If this virtual node represents a text node, this is the text of the node (string or number).\r\n * @param {string | number | null} key The key for this virtual node, used when\r\n * diffing it against its children\r\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\r\n * receive a reference to its created child\r\n * @returns {import('./internal').VNode}\r\n */\r\nexport function createVNode(type, props, key, ref, original) {\r\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\r\n\t// Do not inline into createElement and coerceToVNode!\r\n\tconst vnode = {\r\n\t\ttype,\r\n\t\tprops,\r\n\t\tkey,\r\n\t\tref,\r\n\t\t_children: null,\r\n\t\t_parent: null,\r\n\t\t_depth: 0,\r\n\t\t_dom: null,\r\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\r\n\t\t// be set to dom.nextSibling which can return `null` and it is important\r\n\t\t// to be able to distinguish between an uninitialized _nextDom and\r\n\t\t// a _nextDom that has been set to `null`\r\n\t\t_nextDom: undefined,\r\n\t\t_component: null,\r\n\t\t_hydrating: null,\r\n\t\tconstructor: undefined,\r\n\t\t_original: original == null ? ++vnodeId : original\r\n\t};\r\n\r\n\t// Only invoke the vnode hook if this was *not* a direct copy:\r\n\tif (original == null && options.vnode != null) options.vnode(vnode);\r\n\r\n\treturn vnode;\r\n}\r\n\r\nexport function createRef() {\r\n\treturn { current: null };\r\n}\r\n\r\nexport function Fragment(props) {\r\n\treturn props.children;\r\n}\r\n\r\n/**\r\n * Check if a the argument is a valid Preact VNode.\r\n * @param {*} vnode\r\n * @returns {vnode is import('./internal').VNode}\r\n */\r\nexport const isValidElement = vnode =>\r\n\tvnode != null && vnode.constructor === undefined;\r\n","import { assign } from './util';\r\nimport { diff, commitRoot } from './diff/index';\r\nimport options from './options';\r\nimport { Fragment } from './create-element';\r\n\r\n/**\r\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\r\n * trigger rendering\r\n * @param {object} props The initial component props\r\n * @param {object} context The initial context from parent components'\r\n * getChildContext\r\n */\r\nexport function Component(props, context) {\r\n\tthis.props = props;\r\n\tthis.context = context;\r\n}\r\n\r\n/**\r\n * Update component state and schedule a re-render.\r\n * @this {import('./internal').Component}\r\n * @param {object | ((s: object, p: object) => object)} update A hash of state\r\n * properties to update with new values or a function that given the current\r\n * state and props returns a new partial state\r\n * @param {() => void} [callback] A function to be called once component state is\r\n * updated\r\n */\r\nComponent.prototype.setState = function(update, callback) {\r\n\t// only clone state when copying to nextState the first time.\r\n\tlet s;\r\n\tif (this._nextState != null && this._nextState !== this.state) {\r\n\t\ts = this._nextState;\r\n\t} else {\r\n\t\ts = this._nextState = assign({}, this.state);\r\n\t}\r\n\r\n\tif (typeof update == 'function') {\r\n\t\t// Some libraries like `immer` mark the current state as readonly,\r\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\r\n\t\tupdate = update(assign({}, s), this.props);\r\n\t}\r\n\r\n\tif (update) {\r\n\t\tassign(s, update);\r\n\t}\r\n\r\n\t// Skip update if updater function returned null\r\n\tif (update == null) return;\r\n\r\n\tif (this._vnode) {\r\n\t\tif (callback) this._renderCallbacks.push(callback);\r\n\t\tenqueueRender(this);\r\n\t}\r\n};\r\n\r\n/**\r\n * Immediately perform a synchronous re-render of the component\r\n * @this {import('./internal').Component}\r\n * @param {() => void} [callback] A function to be called after component is\r\n * re-rendered\r\n */\r\nComponent.prototype.forceUpdate = function(callback) {\r\n\tif (this._vnode) {\r\n\t\t// Set render mode so that we can differentiate where the render request\r\n\t\t// is coming from. We need this because forceUpdate should never call\r\n\t\t// shouldComponentUpdate\r\n\t\tthis._force = true;\r\n\t\tif (callback) this._renderCallbacks.push(callback);\r\n\t\tenqueueRender(this);\r\n\t}\r\n};\r\n\r\n/**\r\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n * @param {object} props Props (eg: JSX attributes) received from parent\r\n * element/component\r\n * @param {object} state The component's current state\r\n * @param {object} context Context object, as returned by the nearest\r\n * ancestor's `getChildContext()`\r\n * @returns {import('./index').ComponentChildren | void}\r\n */\r\nComponent.prototype.render = Fragment;\r\n\r\n/**\r\n * @param {import('./internal').VNode} vnode\r\n * @param {number | null} [childIndex]\r\n */\r\nexport function getDomSibling(vnode, childIndex) {\r\n\tif (childIndex == null) {\r\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\r\n\t\treturn vnode._parent\r\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\r\n\t\t\t: null;\r\n\t}\r\n\r\n\tlet sibling;\r\n\tfor (; childIndex < vnode._children.length; childIndex++) {\r\n\t\tsibling = vnode._children[childIndex];\r\n\r\n\t\tif (sibling != null && sibling._dom != null) {\r\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\r\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\r\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\r\n\t\t\treturn sibling._dom;\r\n\t\t}\r\n\t}\r\n\r\n\t// If we get here, we have not found a DOM node in this vnode's children.\r\n\t// We must resume from this vnode's sibling (in it's parent _children array)\r\n\t// Only climb up and search the parent if we aren't searching through a DOM\r\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\r\n\t// the search)\r\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\r\n}\r\n\r\n/**\r\n * Trigger in-place re-rendering of a component.\r\n * @param {import('./internal').Component} component The component to rerender\r\n */\r\nfunction renderComponent(component) {\r\n\tlet vnode = component._vnode,\r\n\t\toldDom = vnode._dom,\r\n\t\tparentDom = component._parentDom;\r\n\r\n\tif (parentDom) {\r\n\t\tlet commitQueue = [];\r\n\t\tconst oldVNode = assign({}, vnode);\r\n\t\toldVNode._original = vnode._original + 1;\r\n\r\n\t\tdiff(\r\n\t\t\tparentDom,\r\n\t\t\tvnode,\r\n\t\t\toldVNode,\r\n\t\t\tcomponent._globalContext,\r\n\t\t\tparentDom.ownerSVGElement !== undefined,\r\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\r\n\t\t\tcommitQueue,\r\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\r\n\t\t\tvnode._hydrating\r\n\t\t);\r\n\t\tcommitRoot(commitQueue, vnode);\r\n\r\n\t\tif (vnode._dom != oldDom) {\r\n\t\t\tupdateParentDomPointers(vnode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * @param {import('./internal').VNode} vnode\r\n */\r\nfunction updateParentDomPointers(vnode) {\r\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\r\n\t\tvnode._dom = vnode._component.base = null;\r\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\r\n\t\t\tlet child = vnode._children[i];\r\n\t\t\tif (child != null && child._dom != null) {\r\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn updateParentDomPointers(vnode);\r\n\t}\r\n}\r\n\r\n/**\r\n * The render queue\r\n * @type {Array<import('./internal').Component>}\r\n */\r\nlet rerenderQueue = [];\r\n\r\n/**\r\n * Asynchronously schedule a callback\r\n * @type {(cb: () => void) => void}\r\n */\r\n/* istanbul ignore next */\r\n// Note the following line isn't tree-shaken by rollup cuz of rollup/rollup#2566\r\nconst defer =\r\n\ttypeof Promise == 'function'\r\n\t\t? Promise.prototype.then.bind(Promise.resolve())\r\n\t\t: setTimeout;\r\n\r\n/*\r\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\r\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\r\n * do, and when their effects will be applied. See the links below for some further reading on designing\r\n * asynchronous APIs.\r\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\r\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\r\n */\r\n\r\nlet prevDebounce;\r\n\r\n/**\r\n * Enqueue a rerender of a component\r\n * @param {import('./internal').Component} c The component to rerender\r\n */\r\nexport function enqueueRender(c) {\r\n\tif (\r\n\t\t(!c._dirty &&\r\n\t\t\t(c._dirty = true) &&\r\n\t\t\trerenderQueue.push(c) &&\r\n\t\t\t!process._rerenderCount++) ||\r\n\t\tprevDebounce !== options.debounceRendering\r\n\t) {\r\n\t\tprevDebounce = options.debounceRendering;\r\n\t\t(prevDebounce || defer)(process);\r\n\t}\r\n}\r\n\r\n/** Flush the render queue by rerendering all queued components */\r\nfunction process() {\r\n\tlet queue;\r\n\twhile ((process._rerenderCount = rerenderQueue.length)) {\r\n\t\tqueue = rerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\r\n\t\trerenderQueue = [];\r\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\r\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\r\n\t\tqueue.some(c => {\r\n\t\t\tif (c._dirty) renderComponent(c);\r\n\t\t});\r\n\t}\r\n}\r\nprocess._rerenderCount = 0;\r\n","import { enqueueRender } from './component';\r\n\r\nexport let i = 0;\r\n\r\nexport function createContext(defaultValue, contextId) {\r\n\tcontextId = '__cC' + i++;\r\n\r\n\tconst context = {\r\n\t\t_id: contextId,\r\n\t\t_defaultValue: defaultValue,\r\n\t\t/** @type {import('./internal').FunctionComponent} */\r\n\t\tConsumer(props, contextValue) {\r\n\t\t\t// return props.children(\r\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\r\n\t\t\t// );\r\n\t\t\treturn props.children(contextValue);\r\n\t\t},\r\n\t\t/** @type {import('./internal').FunctionComponent} */\r\n\t\tProvider(props) {\r\n\t\t\tif (!this.getChildContext) {\r\n\t\t\t\tlet subs = [];\r\n\t\t\t\tlet ctx = {};\r\n\t\t\t\tctx[contextId] = this;\r\n\r\n\t\t\t\tthis.getChildContext = () => ctx;\r\n\r\n\t\t\t\tthis.shouldComponentUpdate = function(_props) {\r\n\t\t\t\t\tif (this.props.value !== _props.value) {\r\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\r\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\r\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\r\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\r\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\r\n\t\t\t\t\t\t// subs.some(c => {\r\n\t\t\t\t\t\t// \tc.context = _props.value;\r\n\t\t\t\t\t\t// \tenqueueRender(c);\r\n\t\t\t\t\t\t// });\r\n\r\n\t\t\t\t\t\t// subs.some(c => {\r\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\r\n\t\t\t\t\t\t// \tenqueueRender(c);\r\n\t\t\t\t\t\t// });\r\n\t\t\t\t\t\tsubs.some(enqueueRender);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tthis.sub = c => {\r\n\t\t\t\t\tsubs.push(c);\r\n\t\t\t\t\tlet old = c.componentWillUnmount;\r\n\t\t\t\t\tc.componentWillUnmount = () => {\r\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\r\n\t\t\t\t\t\tif (old) old.call(c);\r\n\t\t\t\t\t};\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn props.children;\r\n\t\t}\r\n\t};\r\n\r\n\t// Devtools needs access to the context object when it\r\n\t// encounters a Provider. This is necessary to support\r\n\t// setting `displayName` on the context object instead\r\n\t// of on the component itself. See:\r\n\t// https://reactjs.org/docs/context.html#contextdisplayname\r\n\r\n\treturn (context.Provider._contextRef = context.Consumer.contextType = context);\r\n}\r\n","import { diff, unmount, applyRef } from './index';\r\nimport { createVNode, Fragment } from '../create-element';\r\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\r\nimport { getDomSibling } from '../component';\r\n\r\n/**\r\n * Diff the children of a virtual node\r\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\r\n * children are being diffed\r\n * @param {import('../internal').ComponentChildren[]} renderResult\r\n * @param {import('../internal').VNode} newParentVNode The new virtual\r\n * node whose children should be diff'ed against oldParentVNode\r\n * @param {import('../internal').VNode} oldParentVNode The old virtual\r\n * node whose children should be diff'ed against newParentVNode\r\n * @param {object} globalContext The current context object - modified by getChildContext\r\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\r\n * @param {Array<import('../internal').PreactElement>} excessDomChildren\r\n * @param {Array<import('../internal').Component>} commitQueue List of components\r\n * which have callbacks to invoke in commitRoot\r\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\r\n * element any new dom elements should be placed around. Likely `null` on first\r\n * render (except when hydrating). Can be a sibling DOM element when diffing\r\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\r\n * @param {boolean} isHydrating Whether or not we are in hydration\r\n */\r\nexport function diffChildren(\r\n\tparentDom,\r\n\trenderResult,\r\n\tnewParentVNode,\r\n\toldParentVNode,\r\n\tglobalContext,\r\n\tisSvg,\r\n\texcessDomChildren,\r\n\tcommitQueue,\r\n\toldDom,\r\n\tisHydrating\r\n) {\r\n\tlet i, j, oldVNode, childVNode, newDom, firstChildDom, refs;\r\n\r\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\r\n\t// as EMPTY_OBJ._children should be `undefined`.\r\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\r\n\r\n\tlet oldChildrenLength = oldChildren.length;\r\n\r\n\tnewParentVNode._children = [];\r\n\tfor (i = 0; i < renderResult.length; i++) {\r\n\t\tchildVNode = renderResult[i];\r\n\r\n\t\tif (childVNode == null || typeof childVNode == 'boolean') {\r\n\t\t\tchildVNode = newParentVNode._children[i] = null;\r\n\t\t}\r\n\t\t// If this newVNode is being reused (e.g. <div>{reuse}{reuse}</div>) in the same diff,\r\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\r\n\t\t// it's own DOM & etc. pointers\r\n\t\telse if (\r\n\t\t\ttypeof childVNode == 'string' ||\r\n\t\t\ttypeof childVNode == 'number' ||\r\n\t\t\t// eslint-disable-next-line valid-typeof\r\n\t\t\ttypeof childVNode == 'bigint'\r\n\t\t) {\r\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\r\n\t\t\t\tnull,\r\n\t\t\t\tchildVNode,\r\n\t\t\t\tnull,\r\n\t\t\t\tnull,\r\n\t\t\t\tchildVNode\r\n\t\t\t);\r\n\t\t} else if (Array.isArray(childVNode)) {\r\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\r\n\t\t\t\tFragment,\r\n\t\t\t\t{ children: childVNode },\r\n\t\t\t\tnull,\r\n\t\t\t\tnull,\r\n\t\t\t\tnull\r\n\t\t\t);\r\n\t\t} else if (childVNode._depth > 0) {\r\n\t\t\t// VNode is already in use, clone it. This can happen in the following\r\n\t\t\t// scenario:\r\n\t\t\t// const reuse = <div />\r\n\t\t\t// <div>{reuse}<span />{reuse}</div>\r\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\r\n\t\t\t\tchildVNode.type,\r\n\t\t\t\tchildVNode.props,\r\n\t\t\t\tchildVNode.key,\r\n\t\t\t\tnull,\r\n\t\t\t\tchildVNode._original\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\r\n\t\t}\r\n\r\n\t\t// Terser removes the `continue` here and wraps the loop body\r\n\t\t// in a `if (childVNode) { ... } condition\r\n\t\tif (childVNode == null) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tchildVNode._parent = newParentVNode;\r\n\t\tchildVNode._depth = newParentVNode._depth + 1;\r\n\r\n\t\t// Check if we find a corresponding element in oldChildren.\r\n\t\t// If found, delete the array item by setting to `undefined`.\r\n\t\t// We use `undefined`, as `null` is reserved for empty placeholders\r\n\t\t// (holes).\r\n\t\toldVNode = oldChildren[i];\r\n\r\n\t\tif (\r\n\t\t\toldVNode === null ||\r\n\t\t\t(oldVNode &&\r\n\t\t\t\tchildVNode.key == oldVNode.key &&\r\n\t\t\t\tchildVNode.type === oldVNode.type)\r\n\t\t) {\r\n\t\t\toldChildren[i] = undefined;\r\n\t\t} else {\r\n\t\t\t// Either oldVNode === undefined or oldChildrenLength > 0,\r\n\t\t\t// so after this loop oldVNode == null or oldVNode is a valid value.\r\n\t\t\tfor (j = 0; j < oldChildrenLength; j++) {\r\n\t\t\t\toldVNode = oldChildren[j];\r\n\t\t\t\t// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.\r\n\t\t\t\t// We always match by type (in either case).\r\n\t\t\t\tif (\r\n\t\t\t\t\toldVNode &&\r\n\t\t\t\t\tchildVNode.key == oldVNode.key &&\r\n\t\t\t\t\tchildVNode.type === oldVNode.type\r\n\t\t\t\t) {\r\n\t\t\t\t\toldChildren[j] = undefined;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\toldVNode = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toldVNode = oldVNode || EMPTY_OBJ;\r\n\r\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\r\n\t\tdiff(\r\n\t\t\tparentDom,\r\n\t\t\tchildVNode,\r\n\t\t\toldVNode,\r\n\t\t\tglobalContext,\r\n\t\t\tisSvg,\r\n\t\t\texcessDomChildren,\r\n\t\t\tcommitQueue,\r\n\t\t\toldDom,\r\n\t\t\tisHydrating\r\n\t\t);\r\n\r\n\t\tnewDom = childVNode._dom;\r\n\r\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\r\n\t\t\tif (!refs) refs = [];\r\n\t\t\tif (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);\r\n\t\t\trefs.push(j, childVNode._component || newDom, childVNode);\r\n\t\t}\r\n\r\n\t\tif (newDom != null) {\r\n\t\t\tif (firstChildDom == null) {\r\n\t\t\t\tfirstChildDom = newDom;\r\n\t\t\t}\r\n\r\n\t\t\tif (\r\n\t\t\t\ttypeof childVNode.type == 'function' &&\r\n\t\t\t\tchildVNode._children === oldVNode._children\r\n\t\t\t) {\r\n\t\t\t\tchildVNode._nextDom = oldDom = reorderChildren(\r\n\t\t\t\t\tchildVNode,\r\n\t\t\t\t\toldDom,\r\n\t\t\t\t\tparentDom\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\toldDom = placeChild(\r\n\t\t\t\t\tparentDom,\r\n\t\t\t\t\tchildVNode,\r\n\t\t\t\t\toldVNode,\r\n\t\t\t\t\toldChildren,\r\n\t\t\t\t\tnewDom,\r\n\t\t\t\t\toldDom\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif (typeof newParentVNode.type == 'function') {\r\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\r\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\r\n\t\t\t\t//\r\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\r\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\r\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\r\n\t\t\t\t// node's nextSibling.\r\n\t\t\t\tnewParentVNode._nextDom = oldDom;\r\n\t\t\t}\r\n\t\t} else if (\r\n\t\t\toldDom &&\r\n\t\t\toldVNode._dom == oldDom &&\r\n\t\t\toldDom.parentNode != parentDom\r\n\t\t) {\r\n\t\t\t// The above condition is to handle null placeholders. See test in placeholder.test.js:\r\n\t\t\t// `efficiently replace null placeholders in parent rerenders`\r\n\t\t\toldDom = getDomSibling(oldVNode);\r\n\t\t}\r\n\t}\r\n\r\n\tnewParentVNode._dom = firstChildDom;\r\n\r\n\t// Remove remaining oldChildren if there are any.\r\n\tfor (i = oldChildrenLength; i--; ) {\r\n\t\tif (oldChildren[i] != null) {\r\n\t\t\tif (\r\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\r\n\t\t\t\toldChildren[i]._dom != null &&\r\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\r\n\t\t\t) {\r\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\r\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\r\n\t\t\t\t// _nextDom to it\r\n\t\t\t\tnewParentVNode._nextDom = getDomSibling(oldParentVNode, i + 1);\r\n\t\t\t}\r\n\r\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\r\n\t\t}\r\n\t}\r\n\r\n\t// Set refs only after unmount\r\n\tif (refs) {\r\n\t\tfor (i = 0; i < refs.length; i++) {\r\n\t\t\tapplyRef(refs[i], refs[++i], refs[++i]);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction reorderChildren(childVNode, oldDom, parentDom) {\r\n\t// Note: VNodes in nested suspended trees may be missing _children.\r\n\tlet c = childVNode._children;\r\n\tlet tmp = 0;\r\n\tfor (; c && tmp < c.length; tmp++) {\r\n\t\tlet vnode = c[tmp];\r\n\t\tif (vnode) {\r\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\r\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\r\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\r\n\t\t\t// (childVNode here).\r\n\t\t\tvnode._parent = childVNode;\r\n\r\n\t\t\tif (typeof vnode.type == 'function') {\r\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\r\n\t\t\t} else {\r\n\t\t\t\toldDom = placeChild(\r\n\t\t\t\t\tparentDom,\r\n\t\t\t\t\tvnode,\r\n\t\t\t\t\tvnode,\r\n\t\t\t\t\tc,\r\n\t\t\t\t\tvnode._dom,\r\n\t\t\t\t\toldDom\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn oldDom;\r\n}\r\n\r\n/**\r\n * Flatten and loop through the children of a virtual node\r\n * @param {import('../index').ComponentChildren} children The unflattened\r\n * children of a virtual node\r\n * @returns {import('../internal').VNode[]}\r\n */\r\nexport function toChildArray(children, out) {\r\n\tout = out || [];\r\n\tif (children == null || typeof children == 'boolean') {\r\n\t} else if (Array.isArray(children)) {\r\n\t\tchildren.some(child => {\r\n\t\t\ttoChildArray(child, out);\r\n\t\t});\r\n\t} else {\r\n\t\tout.push(children);\r\n\t}\r\n\treturn out;\r\n}\r\n\r\nfunction placeChild(\r\n\tparentDom,\r\n\tchildVNode,\r\n\toldVNode,\r\n\toldChildren,\r\n\tnewDom,\r\n\toldDom\r\n) {\r\n\tlet nextDom;\r\n\tif (childVNode._nextDom !== undefined) {\r\n\t\t// Only Fragments or components that return Fragment like VNodes will\r\n\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\r\n\t\t// of last DOM child of this child VNode\r\n\t\tnextDom = childVNode._nextDom;\r\n\r\n\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\r\n\t\t// it is only used by `diffChildren` to determine where to resume the diff after\r\n\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\r\n\t\t// can clean up the property\r\n\t\tchildVNode._nextDom = undefined;\r\n\t} else if (\r\n\t\toldVNode == null ||\r\n\t\tnewDom != oldDom ||\r\n\t\tnewDom.parentNode == null\r\n\t) {\r\n\t\touter: if (oldDom == null || oldDom.parentNode !== parentDom) {\r\n\t\t\tparentDom.appendChild(newDom);\r\n\t\t\tnextDom = null;\r\n\t\t} else {\r\n\t\t\t// `j<oldChildrenLength; j+=2` is an alternative to `j++<oldChildrenLength/2`\r\n\t\t\tfor (\r\n\t\t\t\tlet sibDom = oldDom, j = 0;\r\n\t\t\t\t(sibDom = sibDom.nextSibling) && j < oldChildren.length;\r\n\t\t\t\tj += 2\r\n\t\t\t) {\r\n\t\t\t\tif (sibDom == newDom) {\r\n\t\t\t\t\tbreak outer;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tparentDom.insertBefore(newDom, oldDom);\r\n\t\t\tnextDom = oldDom;\r\n\t\t}\r\n\t}\r\n\r\n\t// If we have pre-calculated the nextDOM node, use it. Else calculate it now\r\n\t// Strictly check for `undefined` here cuz `null` is a valid value of `nextDom`.\r\n\t// See more detail in create-element.js:createVNode\r\n\tif (nextDom !== undefined) {\r\n\t\toldDom = nextDom;\r\n\t} else {\r\n\t\toldDom = newDom.nextSibling;\r\n\t}\r\n\r\n\treturn oldDom;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n/**\r\n * Diff the old and new properties of a VNode and apply changes to the DOM node\r\n * @param {import('../internal').PreactElement} dom The DOM node to apply\r\n * changes to\r\n * @param {object} newProps The new props\r\n * @param {object} oldProps The old props\r\n * @param {boolean} isSvg Whether or not this node is an SVG node\r\n * @param {boolean} hydrate Whether or not we are in hydration mode\r\n */\r\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\r\n\tlet i;\r\n\r\n\tfor (i in oldProps) {\r\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\r\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\r\n\t\t}\r\n\t}\r\n\r\n\tfor (i in newProps) {\r\n\t\tif (\r\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\r\n\t\t\ti !== 'children' &&\r\n\t\t\ti !== 'key' &&\r\n\t\t\ti !== 'value' &&\r\n\t\t\ti !== 'checked' &&\r\n\t\t\toldProps[i] !== newProps[i]\r\n\t\t) {\r\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction setStyle(style, key, value) {\r\n\tif (key[0] === '-') {\r\n\t\tstyle.setProperty(key, value);\r\n\t} else if (value == null) {\r\n\t\tstyle[key] = '';\r\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\r\n\t\tstyle[key] = value;\r\n\t} else {\r\n\t\tstyle[key] = value + 'px';\r\n\t}\r\n}\r\n\r\n/**\r\n * Set a property value on a DOM node\r\n * @param {import('../internal').PreactElement} dom The DOM node to modify\r\n * @param {string} name The name of the property to set\r\n * @param {*} value The value to set the property to\r\n * @param {*} oldValue The old value the property had\r\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\r\n */\r\nexport function setProperty(dom, name, value, oldValue, isSvg) {\r\n\tlet useCapture;\r\n\r\n\to: if (name === 'style') {\r\n\t\tif (typeof value == 'string') {\r\n\t\t\tdom.style.cssText = value;\r\n\t\t} else {\r\n\t\t\tif (typeof oldValue == 'string') {\r\n\t\t\t\tdom.style.cssText = oldValue = '';\r\n\t\t\t}\r\n\r\n\t\t\tif (oldValue) {\r\n\t\t\t\tfor (name in oldValue) {\r\n\t\t\t\t\tif (!(value && name in value)) {\r\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (value) {\r\n\t\t\t\tfor (name in value) {\r\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\r\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\r\n\telse if (name[0] === 'o' && name[1] === 'n') {\r\n\t\tuseCapture = name !== (name = name.replace(/Capture$/, ''));\r\n\r\n\t\t// Infer correct casing for DOM built-in events:\r\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\r\n\t\telse name = name.slice(2);\r\n\r\n\t\tif (!dom._listeners) dom._listeners = {};\r\n\t\tdom._listeners[name + useCapture] = value;\r\n\r\n\t\tif (value) {\r\n\t\t\tif (!oldValue) {\r\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\r\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\r\n\t\t\tdom.removeEventListener(name, handler, useCapture);\r\n\t\t}\r\n\t} else if (name !== 'dangerouslySetInnerHTML') {\r\n\t\tif (isSvg) {\r\n\t\t\t// Normalize incorrect prop usage for SVG:\r\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\r\n\t\t\t// - className --> class\r\n\t\t\tname = name.replace(/xlink[H:h]/, 'h').replace(/sName$/, 's');\r\n\t\t} else if (\r\n\t\t\tname !== 'href' &&\r\n\t\t\tname !== 'list' &&\r\n\t\t\tname !== 'form' &&\r\n\t\t\t// Default value in browsers is `-1` and an empty string is\r\n\t\t\t// cast to `0` instead\r\n\t\t\tname !== 'tabIndex' &&\r\n\t\t\tname !== 'download' &&\r\n\t\t\tname in dom\r\n\t\t) {\r\n\t\t\ttry {\r\n\t\t\t\tdom[name] = value == null ? '' : value;\r\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\r\n\t\t\t\tbreak o;\r\n\t\t\t} catch (e) {}\r\n\t\t}\r\n\r\n\t\t// ARIA-attributes have a different notion of boolean values.\r\n\t\t// The value `false` is different from the attribute not\r\n\t\t// existing on the DOM, so we can't remove it. For non-boolean\r\n\t\t// ARIA-attributes we could treat false as a removal, but the\r\n\t\t// amount of exceptions would cost us too many bytes. On top of\r\n\t\t// that other VDOM frameworks also always stringify `false`.\r\n\r\n\t\tif (typeof value === 'function') {\r\n\t\t\t// never serialize functions as attribute values\r\n\t\t} else if (\r\n\t\t\tvalue != null &&\r\n\t\t\t(value !== false || (name[0] === 'a' && name[1] === 'r'))\r\n\t\t) {\r\n\t\t\tdom.setAttribute(name, value);\r\n\t\t} else {\r\n\t\t\tdom.removeAttribute(name);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Proxy an event to hooked event handlers\r\n * @param {Event} e The event object from the browser\r\n * @private\r\n */\r\nfunction eventProxy(e) {\r\n\tthis._listeners[e.type + false](options.event ? options.event(e) : e);\r\n}\r\n\r\nfunction eventProxyCapture(e) {\r\n\tthis._listeners[e.type + true](options.event ? options.event(e) : e);\r\n}\r\n","import { EMPTY_OBJ } from '../constants';\r\nimport { Component, getDomSibling } from '../component';\r\nimport { Fragment } from '../create-element';\r\nimport { diffChildren } from './children';\r\nimport { diffProps, setProperty } from './props';\r\nimport { assign, removeNode, slice } from '../util';\r\nimport options from '../options';\r\n\r\n/**\r\n * Diff two virtual nodes and apply proper changes to the DOM\r\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\r\n * @param {import('../internal').VNode} newVNode The new virtual node\r\n * @param {import('../internal').VNode} oldVNode The old virtual node\r\n * @param {object} globalContext The current context object. Modified by getChildContext\r\n * @param {boolean} isSvg Whether or not this element is an SVG node\r\n * @param {Array<import('../internal').PreactElement>} excessDomChildren\r\n * @param {Array<import('../internal').Component>} commitQueue List of components\r\n * which have callbacks to invoke in commitRoot\r\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\r\n * element any new dom elements should be placed around. Likely `null` on first\r\n * render (except when hydrating). Can be a sibling DOM element when diffing\r\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\r\n * @param {boolean} [isHydrating] Whether or not we are in hydration\r\n */\r\nexport function diff(\r\n\tparentDom,\r\n\tnewVNode,\r\n\toldVNode,\r\n\tglobalContext,\r\n\tisSvg,\r\n\texcessDomChildren,\r\n\tcommitQueue,\r\n\toldDom,\r\n\tisHydrating\r\n) {\r\n\tlet tmp,\r\n\t\tnewType = newVNode.type;\r\n\r\n\t// When passing through createElement it assigns the object\r\n\t// constructor as undefined. This to prevent JSON-injection.\r\n\tif (newVNode.constructor !== undefined) return null;\r\n\r\n\t// If the previous diff bailed out, resume creating/hydrating.\r\n\tif (oldVNode._hydrating != null) {\r\n\t\tisHydrating = oldVNode._hydrating;\r\n\t\toldDom = newVNode._dom = oldVNode._dom;\r\n\t\t// if we resume, we want the tree to be \"unlocked\"\r\n\t\tnewVNode._hydrating = null;\r\n\t\texcessDomChildren = [oldDom];\r\n\t}\r\n\r\n\tif ((tmp = options._diff)) tmp(newVNode);\r\n\r\n\ttry {\r\n\t\touter: if (typeof newType == 'function') {\r\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\r\n\t\t\tlet newProps = newVNode.props;\r\n\r\n\t\t\t// Necessary for createContext api. Setting this property will pass\r\n\t\t\t// the context value as `this.context` just for this component.\r\n\t\t\ttmp = newType.contextType;\r\n\t\t\tlet provider = tmp && globalContext[tmp._id];\r\n\t\t\tlet componentContext = tmp\r\n\t\t\t\t? provider\r\n\t\t\t\t\t? provider.props.value\r\n\t\t\t\t\t: tmp._defaultValue\r\n\t\t\t\t: globalContext;\r\n\r\n\t\t\t// Get component and set it to `c`\r\n\t\t\tif (oldVNode._component) {\r\n\t\t\t\tc = newVNode._component = oldVNode._component;\r\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\r\n\t\t\t} else {\r\n\t\t\t\t// Instantiate the new component\r\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\r\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\r\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\r\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\r\n\t\t\t\t\tc.constructor = newType;\r\n\t\t\t\t\tc.render = doRender;\r\n\t\t\t\t}\r\n\t\t\t\tif (provider) provider.sub(c);\r\n\r\n\t\t\t\tc.props = newProps;\r\n\t\t\t\tif (!c.state) c.state = {};\r\n\t\t\t\tc.context = componentContext;\r\n\t\t\t\tc._globalContext = globalContext;\r\n\t\t\t\tisNew = c._dirty = true;\r\n\t\t\t\tc._renderCallbacks = [];\r\n\t\t\t}\r\n\r\n\t\t\t// Invoke getDerivedStateFromProps\r\n\t\t\tif (c._nextState == null) {\r\n\t\t\t\tc._nextState = c.state;\r\n\t\t\t}\r\n\t\t\tif (newType.getDerivedStateFromProps != null) {\r\n\t\t\t\tif (c._nextState == c.state) {\r\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tassign(\r\n\t\t\t\t\tc._nextState,\r\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\toldProps = c.props;\r\n\t\t\toldState = c.state;\r\n\r\n\t\t\t// Invoke pre-render lifecycle methods\r\n\t\t\tif (isNew) {\r\n\t\t\t\tif (\r\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\r\n\t\t\t\t\tc.componentWillMount != null\r\n\t\t\t\t) {\r\n\t\t\t\t\tc.componentWillMount();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (c.componentDidMount != null) {\r\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (\r\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\r\n\t\t\t\t\tnewProps !== oldProps &&\r\n\t\t\t\t\tc.componentWillReceiveProps != null\r\n\t\t\t\t) {\r\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\t(!c._force &&\r\n\t\t\t\t\t\tc.shouldComponentUpdate != null &&\r\n\t\t\t\t\t\tc.shouldComponentUpdate(\r\n\t\t\t\t\t\t\tnewProps,\r\n\t\t\t\t\t\t\tc._nextState,\r\n\t\t\t\t\t\t\tcomponentContext\r\n\t\t\t\t\t\t) === false) ||\r\n\t\t\t\t\tnewVNode._original === oldVNode._original\r\n\t\t\t\t) {\r\n\t\t\t\t\tc.props = newProps;\r\n\t\t\t\t\tc.state = c._nextState;\r\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\r\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) c._dirty = false;\r\n\t\t\t\t\tc._vnode = newVNode;\r\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\r\n\t\t\t\t\tnewVNode._children = oldVNode._children;\r\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\r\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\r\n\t\t\t\t\t});\r\n\t\t\t\t\tif (c._renderCallbacks.length) {\r\n\t\t\t\t\t\tcommitQueue.push(c);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak outer;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (c.componentWillUpdate != null) {\r\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (c.componentDidUpdate != null) {\r\n\t\t\t\t\tc._renderCallbacks.push(() => {\r\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tc.context = componentContext;\r\n\t\t\tc.props = newProps;\r\n\t\t\tc.state = c._nextState;\r\n\r\n\t\t\tif ((tmp = options._render)) tmp(newVNode);\r\n\r\n\t\t\tc._dirty = false;\r\n\t\t\tc._vnode = newVNode;\r\n\t\t\tc._parentDom = parentDom;\r\n\r\n\t\t\ttmp = c.render(c.props, c.state, c.context);\r\n\r\n\t\t\t// Handle setState called in render, see #2553\r\n\t\t\tc.state = c._nextState;\r\n\r\n\t\t\tif (c.getChildContext != null) {\r\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\r\n\t\t\t}\r\n\r\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\r\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\r\n\t\t\t}\r\n\r\n\t\t\tlet isTopLevelFragment =\r\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\r\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\r\n\r\n\t\t\tdiffChildren(\r\n\t\t\t\tparentDom,\r\n\t\t\t\tArray.isArray(renderResult) ? renderResult : [renderResult],\r\n\t\t\t\tnewVNode,\r\n\t\t\t\toldVNode,\r\n\t\t\t\tglobalContext,\r\n\t\t\t\tisSvg,\r\n\t\t\t\texcessDomChildren,\r\n\t\t\t\tcommitQueue,\r\n\t\t\t\toldDom,\r\n\t\t\t\tisHydrating\r\n\t\t\t);\r\n\r\n\t\t\tc.base = newVNode._dom;\r\n\r\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\r\n\t\t\tnewVNode._hydrating = null;\r\n\r\n\t\t\tif (c._renderCallbacks.length) {\r\n\t\t\t\tcommitQueue.push(c);\r\n\t\t\t}\r\n\r\n\t\t\tif (clearProcessingException) {\r\n\t\t\t\tc._pendingError = c._processingException = null;\r\n\t\t\t}\r\n\r\n\t\t\tc._force = false;\r\n\t\t} else if (\r\n\t\t\texcessDomChildren == null &&\r\n\t\t\tnewVNode._original === oldVNode._original\r\n\t\t) {\r\n\t\t\tnewVNode._children = oldVNode._children;\r\n\t\t\tnewVNode._dom = oldVNode._dom;\r\n\t\t} else {\r\n\t\t\tnewVNode._dom = diffElementNodes(\r\n\t\t\t\toldVNode._dom,\r\n\t\t\t\tnewVNode,\r\n\t\t\t\toldVNode,\r\n\t\t\t\tglobalContext,\r\n\t\t\t\tisSvg,\r\n\t\t\t\texcessDomChildren,\r\n\t\t\t\tcommitQueue,\r\n\t\t\t\tisHydrating\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif ((tmp = options.diffed)) tmp(newVNode);\r\n\t} catch (e) {\r\n\t\tnewVNode._original = null;\r\n\t\t// if hydrating or creating initial tree, bailout preserves DOM:\r\n\t\tif (isHydrating || excessDomChildren != null) {\r\n\t\t\tnewVNode._dom = oldDom;\r\n\t\t\tnewVNode._hydrating = !!isHydrating;\r\n\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\r\n\t\t\t// ^ could possibly be simplified to:\r\n\t\t\t// excessDomChildren.length = 0;\r\n\t\t}\r\n\t\toptions._catchError(e, newVNode, oldVNode);\r\n\t}\r\n}\r\n\r\n/**\r\n * @param {Array<import('../internal').Component>} commitQueue List of components\r\n * which have callbacks to invoke in commitRoot\r\n * @param {import('../internal').VNode} root\r\n */\r\nexport function commitRoot(commitQueue, root) {\r\n\tif (options._commit) options._commit(root, commitQueue);\r\n\r\n\tcommitQueue.some(c => {\r\n\t\ttry {\r\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\r\n\t\t\tcommitQueue = c._renderCallbacks;\r\n\t\t\tc._renderCallbacks = [];\r\n\t\t\tcommitQueue.some(cb => {\r\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\r\n\t\t\t\tcb.call(c);\r\n\t\t\t});\r\n\t\t} catch (e) {\r\n\t\t\toptions._catchError(e, c._vnode);\r\n\t\t}\r\n\t});\r\n}\r\n\r\n/**\r\n * Diff two virtual nodes representing DOM element\r\n * @param {import('../internal').PreactElement} dom The DOM element representing\r\n * the virtual nodes being diffed\r\n * @param {import('../internal').VNode} newVNode The new virtual node\r\n * @param {import('../internal').VNode} oldVNode The old virtual node\r\n * @param {object} globalContext The current context object\r\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\r\n * @param {*} excessDomChildren\r\n * @param {Array<import('../internal').Component>} commitQueue List of components\r\n * which have callbacks to invoke in commitRoot\r\n * @param {boolean} isHydrating Whether or not we are in hydration\r\n * @returns {import('../internal').PreactElement}\r\n */\r\nfunction diffElementNodes(\r\n\tdom,\r\n\tnewVNode,\r\n\toldVNode,\r\n\tglobalContext,\r\n\tisSvg,\r\n\texcessDomChildren,\r\n\tcommitQueue,\r\n\tisHydrating\r\n) {\r\n\tlet oldProps = oldVNode.props;\r\n\tlet newProps = newVNode.props;\r\n\tlet nodeType = newVNode.type;\r\n\tlet i = 0;\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tif (nodeType === 'svg') isSvg = true;\r\n\r\n\tif (excessDomChildren != null) {\r\n\t\tfor (; i < excessDomChildren.length; i++) {\r\n\t\t\tconst child = excessDomChildren[i];\r\n\r\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\r\n\t\t\t// argument matches an element in excessDomChildren, remove it from\r\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\r\n\t\t\tif (\r\n\t\t\t\tchild &&\r\n\t\t\t\t'setAttribute' in child === !!nodeType &&\r\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\r\n\t\t\t) {\r\n\t\t\t\tdom = child;\r\n\t\t\t\texcessDomChildren[i] = null;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (dom == null) {\r\n\t\tif (nodeType === null) {\r\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\r\n\t\t\treturn document.createTextNode(newProps);\r\n\t\t}\r\n\r\n\t\tif (isSvg) {\r\n\t\t\tdom = document.createElementNS(\r\n\t\t\t\t'http://www.w3.org/2000/svg',\r\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\r\n\t\t\t\tnodeType\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tdom = document.createElement(\r\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\r\n\t\t\t\tnodeType,\r\n\t\t\t\tnewProps.is && newProps\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// we created a new parent, so none of the previously attached children can be reused:\r\n\t\texcessDomChildren = null;\r\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\r\n\t\tisHydrating = false;\r\n\t}\r\n\r\n\tif (nodeType === null) {\r\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\r\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\r\n\t\t\tdom.data = newProps;\r\n\t\t}\r\n\t} else {\r\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\r\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\r\n\r\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\r\n\r\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\r\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\r\n\r\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\r\n\t\t// @TODO we should warn in debug mode when props don't match here.\r\n\t\tif (!isHydrating) {\r\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\r\n\t\t\t// we should read the existing DOM attributes to diff them\r\n\t\t\tif (excessDomChildren != null) {\r\n\t\t\t\toldProps = {};\r\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\r\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (newHtml || oldHtml) {\r\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\r\n\t\t\t\tif (\r\n\t\t\t\t\t!newHtml ||\r\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\r\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\r\n\t\t\t\t) {\r\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\r\n\r\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\r\n\t\tif (newHtml) {\r\n\t\t\tnewVNode._children = [];\r\n\t\t} else {\r\n\t\t\ti = newVNode.props.children;\r\n\t\t\tdiffChildren(\r\n\t\t\t\tdom,\r\n\t\t\t\tArray.isArray(i) ? i : [i],\r\n\t\t\t\tnewVNode,\r\n\t\t\t\toldVNode,\r\n\t\t\t\tglobalContext,\r\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\r\n\t\t\t\texcessDomChildren,\r\n\t\t\t\tcommitQueue,\r\n\t\t\t\texcessDomChildren\r\n\t\t\t\t\t? excessDomChildren[0]\r\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\r\n\t\t\t\tisHydrating\r\n\t\t\t);\r\n\r\n\t\t\t// Remove children that are not part of any vnode.\r\n\t\t\tif (excessDomChildren != null) {\r\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\r\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// (as above, don't diff props during hydration)\r\n\t\tif (!isHydrating) {\r\n\t\t\tif (\r\n\t\t\t\t'value' in newProps &&\r\n\t\t\t\t(i = newProps.value) !== undefined &&\r\n\t\t\t\t// #2756 For the <progress>-element the initial value is 0,\r\n\t\t\t\t// despite the attribute not being present. When the attribute\r\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\r\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\r\n\t\t\t\t(i !== oldProps.value ||\r\n\t\t\t\t\ti !== dom.value ||\r\n\t\t\t\t\t(nodeType === 'progress' && !i))\r\n\t\t\t) {\r\n\t\t\t\tsetProperty(dom, 'value', i, oldProps.value, false);\r\n\t\t\t}\r\n\t\t\tif (\r\n\t\t\t\t'checked' in newProps &&\r\n\t\t\t\t(i = newProps.checked) !== undefined &&\r\n\t\t\t\ti !== dom.checked\r\n\t\t\t) {\r\n\t\t\t\tsetProperty(dom, 'checked', i, oldProps.checked, false);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n/**\r\n * Invoke or update a ref, depending on whether it is a function or object ref.\r\n * @param {object|function} ref\r\n * @param {any} value\r\n * @param {import('../internal').VNode} vnode\r\n */\r\nexport function applyRef(ref, value, vnode) {\r\n\ttry {\r\n\t\tif (typeof ref == 'function') ref(value);\r\n\t\telse ref.current = value;\r\n\t} catch (e) {\r\n\t\toptions._catchError(e, vnode);\r\n\t}\r\n}\r\n\r\n/**\r\n * Unmount a virtual node from the tree and apply DOM changes\r\n * @param {import('../internal').VNode} vnode The virtual node to unmount\r\n * @param {import('../internal').VNode} parentVNode The parent of the VNode that\r\n * initiated the unmount\r\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\r\n * current element is already detached from the DOM.\r\n */\r\nexport function unmount(vnode, parentVNode, skipRemove) {\r\n\tlet r;\r\n\tif (options.unmount) options.unmount(vnode);\r\n\r\n\tif ((r = vnode.ref)) {\r\n\t\tif (!r.current || r.current === vnode._dom) applyRef(r, null, parentVNode);\r\n\t}\r\n\r\n\tif ((r = vnode._component) != null) {\r\n\t\tif (r.componentWillUnmount) {\r\n\t\t\ttry {\r\n\t\t\t\tr.componentWillUnmount();\r\n\t\t\t} catch (e) {\r\n\t\t\t\toptions._catchError(e, parentVNode);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tr.base = r._parentDom = null;\r\n\t}\r\n\r\n\tif ((r = vnode._children)) {\r\n\t\tfor (let i = 0; i < r.length; i++) {\r\n\t\t\tif (r[i]) {\r\n\t\t\t\tunmount(r[i], parentVNode, typeof vnode.type != 'function');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (!skipRemove && vnode._dom != null) removeNode(vnode._dom);\r\n\r\n\t// Must be set to `undefined` to properly clean up `_nextDom`\r\n\t// for which `null` is a valid value. See comment in `create-element.js`\r\n\tvnode._dom = vnode._nextDom = undefined;\r\n}\r\n\r\n/** The `.render()` method for a PFC backing instance. */\r\nfunction doRender(props, state, context) {\r\n\treturn this.constructor(props, context);\r\n}\r\n","import { EMPTY_OBJ } from './constants';\r\nimport { commitRoot, diff } from './diff/index';\r\nimport { createElement, Fragment } from './create-element';\r\nimport options from './options';\r\nimport { slice } from './util';\r\n\r\n/**\r\n * Render a Preact virtual node into a DOM element\r\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\r\n * @param {import('./internal').PreactElement} parentDom The DOM element to\r\n * render into\r\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\r\n * existing DOM tree rooted at `replaceNode`\r\n */\r\nexport function render(vnode, parentDom, replaceNode) {\r\n\tif (options._root) options._root(vnode, parentDom);\r\n\r\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\r\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\r\n\t// element..\r\n\tlet isHydrating = typeof replaceNode === 'function';\r\n\r\n\t// To be able to support calling `render()` multiple times on the same\r\n\t// DOM node, we need to obtain a reference to the previous tree. We do\r\n\t// this by assigning a new `_children` property to DOM nodes which points\r\n\t// to the last rendered tree. By default this property is not present, which\r\n\t// means that we are mounting a new tree for the first time.\r\n\tlet oldVNode = isHydrating\r\n\t\t? null\r\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\r\n\r\n\tvnode = (\r\n\t\t(!isHydrating && replaceNode) ||\r\n\t\tparentDom\r\n\t)._children = createElement(Fragment, null, [vnode]);\r\n\r\n\t// List of effects that need to be called after diffing.\r\n\tlet commitQueue = [];\r\n\tdiff(\r\n\t\tparentDom,\r\n\t\t// Determine the new vnode tree and store it on the DOM element on\r\n\t\t// our custom `_children` property.\r\n\t\tvnode,\r\n\t\toldVNode || EMPTY_OBJ,\r\n\t\tEMPTY_OBJ,\r\n\t\tparentDom.ownerSVGElement !== undefined,\r\n\t\t!isHydrating && replaceNode\r\n\t\t\t? [replaceNode]\r\n\t\t\t: oldVNode\r\n\t\t\t? null\r\n\t\t\t: parentDom.firstChild\r\n\t\t\t? slice.call(parentDom.childNodes)\r\n\t\t\t: null,\r\n\t\tcommitQueue,\r\n\t\t!isHydrating && replaceNode\r\n\t\t\t? replaceNode\r\n\t\t\t: oldVNode\r\n\t\t\t? oldVNode._dom\r\n\t\t\t: parentDom.firstChild,\r\n\t\tisHydrating\r\n\t);\r\n\r\n\t// Flush all queued effects\r\n\tcommitRoot(commitQueue, vnode);\r\n}\r\n\r\n/**\r\n * Update an existing DOM element with data from a Preact virtual node\r\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\r\n * @param {import('./internal').PreactElement} parentDom The DOM element to\r\n * update\r\n */\r\nexport function hydrate(vnode, parentDom) {\r\n\trender(vnode, parentDom, hydrate);\r\n}\r\n","import { assign, slice } from './util';\r\nimport { createVNode } from './create-element';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\r\n * @param {object} props Attributes/props to add when cloning\r\n * @param {Array<import('./internal').ComponentChildren>} rest Any additional arguments will be used as replacement children.\r\n * @returns {import('./internal').VNode}\r\n */\r\nexport function cloneElement(vnode, props, children) {\r\n\tlet normalizedProps = assign({}, vnode.props),\r\n\t\tkey,\r\n\t\tref,\r\n\t\ti;\r\n\tfor (i in props) {\r\n\t\tif (i == 'key') key = props[i];\r\n\t\telse if (i == 'ref') ref = props[i];\r\n\t\telse normalizedProps[i] = props[i];\r\n\t}\r\n\r\n\tif (arguments.length > 2) {\r\n\t\tnormalizedProps.children =\r\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\r\n\t}\r\n\r\n\treturn createVNode(\r\n\t\tvnode.type,\r\n\t\tnormalizedProps,\r\n\t\tkey || vnode.key,\r\n\t\tref || vnode.ref,\r\n\t\tnull\r\n\t);\r\n}\r\n","/**\r\n * Find the closest error boundary to a thrown error and call it\r\n * @param {object} error The thrown value\r\n * @param {import('../internal').VNode} vnode The vnode that threw\r\n * the error that was caught (except for unmounting when this parameter\r\n * is the highest parent that was being unmounted)\r\n */\r\nexport function _catchError(error, vnode) {\r\n\t/** @type {import('../internal').Component} */\r\n\tlet component, ctor, handled;\r\n\r\n\tfor (; (vnode = vnode._parent); ) {\r\n\t\tif ((component = vnode._component) && !component._processingException) {\r\n\t\t\ttry {\r\n\t\t\t\tctor = component.constructor;\r\n\r\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != null) {\r\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\r\n\t\t\t\t\thandled = component._dirty;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (component.componentDidCatch != null) {\r\n\t\t\t\t\tcomponent.componentDidCatch(error);\r\n\t\t\t\t\thandled = component._dirty;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\r\n\t\t\t\tif (handled) {\r\n\t\t\t\t\treturn (component._pendingError = component);\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\terror = e;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthrow error;\r\n}\r\n","import { options } from 'preact';\r\n\r\n/** @type {number} */\r\nlet currentIndex;\r\n\r\n/** @type {import('./internal').Component} */\r\nlet currentComponent;\r\n\r\n/** @type {number} */\r\nlet currentHook = 0;\r\n\r\n/** @type {Array<import('./internal').Component>} */\r\nlet afterPaintEffects = [];\r\n\r\nlet oldBeforeDiff = options._diff;\r\nlet oldBeforeRender = options._render;\r\nlet oldAfterDiff = options.diffed;\r\nlet oldCommit = options._commit;\r\nlet oldBeforeUnmount = options.unmount;\r\n\r\nconst RAF_TIMEOUT = 100;\r\nlet prevRaf;\r\n\r\noptions._diff = vnode => {\r\n\tcurrentComponent = null;\r\n\tif (oldBeforeDiff) oldBeforeDiff(vnode);\r\n};\r\n\r\noptions._render = vnode => {\r\n\tif (oldBeforeRender) oldBeforeRender(vnode);\r\n\r\n\tcurrentComponent = vnode._component;\r\n\tcurrentIndex = 0;\r\n\r\n\tconst hooks = currentComponent.__hooks;\r\n\tif (hooks) {\r\n\t\thooks._pendingEffects.forEach(invokeCleanup);\r\n\t\thooks._pendingEffects.forEach(invokeEffect);\r\n\t\thooks._pendingEffects = [];\r\n\t}\r\n};\r\n\r\noptions.diffed = vnode => {\r\n\tif (oldAfterDiff) oldAfterDiff(vnode);\r\n\r\n\tconst c = vnode._component;\r\n\tif (c && c.__hooks && c.__hooks._pendingEffects.length) {\r\n\t\tafterPaint(afterPaintEffects.push(c));\r\n\t}\r\n\tcurrentComponent = null;\r\n};\r\n\r\noptions._commit = (vnode, commitQueue) => {\r\n\tcommitQueue.some(component => {\r\n\t\ttry {\r\n\t\t\tcomponent._renderCallbacks.forEach(invokeCleanup);\r\n\t\t\tcomponent._renderCallbacks = component._renderCallbacks.filter(cb =>\r\n\t\t\t\tcb._value ? invokeEffect(cb) : true\r\n\t\t\t);\r\n\t\t} catch (e) {\r\n\t\t\tcommitQueue.some(c => {\r\n\t\t\t\tif (c._renderCallbacks) c._renderCallbacks = [];\r\n\t\t\t});\r\n\t\t\tcommitQueue = [];\r\n\t\t\toptions._catchError(e, component._vnode);\r\n\t\t}\r\n\t});\r\n\r\n\tif (oldCommit) oldCommit(vnode, commitQueue);\r\n};\r\n\r\noptions.unmount = vnode => {\r\n\tif (oldBeforeUnmount) oldBeforeUnmount(vnode);\r\n\r\n\tconst c = vnode._component;\r\n\tif (c && c.__hooks) {\r\n\t\tlet hasErrored;\r\n\t\tc.__hooks._list.forEach(s => {\r\n\t\t\ttry {\r\n\t\t\t\tinvokeCleanup(s);\r\n\t\t\t} catch (e) {\r\n\t\t\t\thasErrored = e;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (hasErrored) options._catchError(hasErrored, c._vnode);\r\n\t}\r\n};\r\n\r\n/**\r\n * Get a hook's state from the currentComponent\r\n * @param {number} index The index of the hook to get\r\n * @param {number} type The index of the hook to get\r\n * @returns {any}\r\n */\r\nfunction getHookState(index, type) {\r\n\tif (options._hook) {\r\n\t\toptions._hook(currentComponent, index, currentHook || type);\r\n\t}\r\n\tcurrentHook = 0;\r\n\r\n\t// Largely inspired by:\r\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\r\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\r\n\t// Other implementations to look at:\r\n\t// * https://codesandbox.io/s/mnox05qp8\r\n\tconst hooks =\r\n\t\tcurrentComponent.__hooks ||\r\n\t\t(currentComponent.__hooks = {\r\n\t\t\t_list: [],\r\n\t\t\t_pendingEffects: []\r\n\t\t});\r\n\r\n\tif (index >= hooks._list.length) {\r\n\t\thooks._list.push({});\r\n\t}\r\n\treturn hooks._list[index];\r\n}\r\n\r\n/**\r\n * @param {import('./index').StateUpdater<any>} [initialState]\r\n */\r\nexport function useState(initialState) {\r\n\tcurrentHook = 1;\r\n\treturn useReducer(invokeOrReturn, initialState);\r\n}\r\n\r\n/**\r\n * @param {import('./index').Reducer<any, any>} reducer\r\n * @param {import('./index').StateUpdater<any>} initialState\r\n * @param {(initialState: any) => void} [init]\r\n * @returns {[ any, (state: any) => void ]}\r\n */\r\nexport function useReducer(reducer, initialState, init) {\r\n\t/** @type {import('./internal').ReducerHookState} */\r\n\tconst hookState = getHookState(currentIndex++, 2);\r\n\thookState._reducer = reducer;\r\n\tif (!hookState._component) {\r\n\t\thookState._value = [\r\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\r\n\r\n\t\t\taction => {\r\n\t\t\t\tconst nextValue = hookState._reducer(hookState._value[0], action);\r\n\t\t\t\tif (hookState._value[0] !== nextValue) {\r\n\t\t\t\t\thookState._value = [nextValue, hookState._value[1]];\r\n\t\t\t\t\thookState._component.setState({});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t];\r\n\r\n\t\thookState._component = currentComponent;\r\n\t}\r\n\r\n\treturn hookState._value;\r\n}\r\n\r\n/**\r\n * @param {import('./internal').Effect} callback\r\n * @param {any[]} args\r\n */\r\nexport function useEffect(callback, args) {\r\n\t/** @type {import('./internal').EffectHookState} */\r\n\tconst state = getHookState(currentIndex++, 3);\r\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\r\n\t\tstate._value = callback;\r\n\t\tstate._args = args;\r\n\r\n\t\tcurrentComponent.__hooks._pendingEffects.push(state);\r\n\t}\r\n}\r\n\r\n/**\r\n * @param {import('./internal').Effect} callback\r\n * @param {any[]} args\r\n */\r\nexport function useLayoutEffect(callback, args) {\r\n\t/** @type {import('./internal').EffectHookState} */\r\n\tconst state = getHookState(currentIndex++, 4);\r\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\r\n\t\tstate._value = callback;\r\n\t\tstate._args = args;\r\n\r\n\t\tcurrentComponent._renderCallbacks.push(state);\r\n\t}\r\n}\r\n\r\nexport function useRef(initialValue) {\r\n\tcurrentHook = 5;\r\n\treturn useMemo(() => ({ current: initialValue }), []);\r\n}\r\n\r\n/**\r\n * @param {object} ref\r\n * @param {() => object} createHandle\r\n * @param {any[]} args\r\n */\r\nexport function useImperativeHandle(ref, createHandle, args) {\r\n\tcurrentHook = 6;\r\n\tuseLayoutEffect(\r\n\t\t() => {\r\n\t\t\tif (typeof ref == 'function') ref(createHandle());\r\n\t\t\telse if (ref) ref.current = createHandle();\r\n\t\t},\r\n\t\targs == null ? args : args.concat(ref)\r\n\t);\r\n}\r\n\r\n/**\r\n * @param {() => any} factory\r\n * @param {any[]} args\r\n */\r\nexport function useMemo(factory, args) {\r\n\t/** @type {import('./internal').MemoHookState} */\r\n\tconst state = getHookState(currentIndex++, 7);\r\n\tif (argsChanged(state._args, args)) {\r\n\t\tstate._value = factory();\r\n\t\tstate._args = args;\r\n\t\tstate._factory = factory;\r\n\t}\r\n\r\n\treturn state._value;\r\n}\r\n\r\n/**\r\n * @param {() => void} callback\r\n * @param {any[]} args\r\n */\r\nexport function useCallback(callback, args) {\r\n\tcurrentHook = 8;\r\n\treturn useMemo(() => callback, args);\r\n}\r\n\r\n/**\r\n * @param {import('./internal').PreactContext} context\r\n */\r\nexport function useContext(context) {\r\n\tconst provider = currentComponent.context[context._id];\r\n\t// We could skip this call here, but than we'd not call\r\n\t// `options._hook`. We need to do that in order to make\r\n\t// the devtools aware of this hook.\r\n\t/** @type {import('./internal').ContextHookState} */\r\n\tconst state = getHookState(currentIndex++, 9);\r\n\t// The devtools needs access to the context object to\r\n\t// be able to pull of the default value when no provider\r\n\t// is present in the tree.\r\n\tstate._context = context;\r\n\tif (!provider) return context._defaultValue;\r\n\t// This is probably not safe to convert to \"!\"\r\n\tif (state._value == null) {\r\n\t\tstate._value = true;\r\n\t\tprovider.sub(currentComponent);\r\n\t}\r\n\treturn provider.props.value;\r\n}\r\n\r\n/**\r\n * Display a custom label for a custom hook for the devtools panel\r\n * @type {<T>(value: T, cb?: (value: T) => string | number) => void}\r\n */\r\nexport function useDebugValue(value, formatter) {\r\n\tif (options.useDebugValue) {\r\n\t\toptions.useDebugValue(formatter ? formatter(value) : value);\r\n\t}\r\n}\r\n\r\n/**\r\n * @param {(error: any) => void} cb\r\n */\r\nexport function useErrorBoundary(cb) {\r\n\t/** @type {import('./internal').ErrorBoundaryHookState} */\r\n\tconst state = getHookState(currentIndex++, 10);\r\n\tconst errState = useState();\r\n\tstate._value = cb;\r\n\tif (!currentComponent.componentDidCatch) {\r\n\t\tcurrentComponent.componentDidCatch = err => {\r\n\t\t\tif (state._value) state._value(err);\r\n\t\t\terrState[1](err);\r\n\t\t};\r\n\t}\r\n\treturn [\r\n\t\terrState[0],\r\n\t\t() => {\r\n\t\t\terrState[1](undefined);\r\n\t\t}\r\n\t];\r\n}\r\n\r\n/**\r\n * After paint effects consumer.\r\n */\r\nfunction flushAfterPaintEffects() {\r\n\tlet component;\r\n\t// sort the queue by depth (outermost to innermost)\r\n\tafterPaintEffects.sort((a, b) => a._vnode._depth - b._vnode._depth);\r\n\twhile (component = afterPaintEffects.pop()) {\r\n\t\tif (!component._parentDom) continue;\r\n\t\ttry {\r\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeCleanup);\r\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeEffect);\r\n\t\t\tcomponent.__hooks._pendingEffects = [];\r\n\t\t} catch (e) {\r\n\t\t\tcomponent.__hooks._pendingEffects = [];\r\n\t\t\toptions._catchError(e, component._vnode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nlet HAS_RAF = typeof requestAnimationFrame == 'function';\r\n\r\n/**\r\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\r\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\r\n * the next browser frame.\r\n *\r\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\r\n * even if RAF doesn't fire (for example if the browser tab is not visible)\r\n *\r\n * @param {() => void} callback\r\n */\r\nfunction afterNextFrame(callback) {\r\n\tconst done = () => {\r\n\t\tclearTimeout(timeout);\r\n\t\tif (HAS_RAF) cancelAnimationFrame(raf);\r\n\t\tsetTimeout(callback);\r\n\t};\r\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\r\n\r\n\tlet raf;\r\n\tif (HAS_RAF) {\r\n\t\traf = requestAnimationFrame(done);\r\n\t}\r\n}\r\n\r\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\r\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\r\n// Perhaps this is not such a big deal.\r\n/**\r\n * Schedule afterPaintEffects flush after the browser paints\r\n * @param {number} newQueueLength\r\n */\r\nfunction afterPaint(newQueueLength) {\r\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\r\n\t\tprevRaf = options.requestAnimationFrame;\r\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\r\n\t}\r\n}\r\n\r\n/**\r\n * @param {import('./internal').EffectHookState} hook\r\n */\r\nfunction invokeCleanup(hook) {\r\n\t// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode\r\n\t// and move the currentComponent away.\r\n\tconst comp = currentComponent;\r\n\tlet cleanup = hook._cleanup;\r\n\tif (typeof cleanup == 'function') {\r\n\t\thook._cleanup = undefined;\r\n\t\tcleanup();\r\n\t}\r\n\tcurrentComponent = comp;\r\n}\r\n\r\n/**\r\n * Invoke a Hook's effect\r\n * @param {import('./internal').EffectHookState} hook\r\n */\r\nfunction invokeEffect(hook) {\r\n\t// A hook call can introduce a call to render which creates a new root, this will call options.vnode\r\n\t// and move the currentComponent away.\r\n\tconst comp = currentComponent;\r\n\thook._cleanup = hook._value();\r\n\tcurrentComponent = comp;\r\n}\r\n\r\n/**\r\n * @param {any[]} oldArgs\r\n * @param {any[]} newArgs\r\n */\r\nfunction argsChanged(oldArgs, newArgs) {\r\n\treturn (\r\n\t\t!oldArgs ||\r\n\t\toldArgs.length !== newArgs.length ||\r\n\t\tnewArgs.some((arg, index) => arg !== oldArgs[index])\r\n\t);\r\n}\r\n\r\nfunction invokeOrReturn(arg, f) {\r\n\treturn typeof f == 'function' ? f(arg) : f;\r\n}\r\n","import { Component } from 'preact';\r\nimport { shallowDiffers } from './util';\r\n\r\n/**\r\n * Component class with a predefined `shouldComponentUpdate` implementation\r\n */\r\nexport function PureComponent(p) {\r\n\tthis.props = p;\r\n}\r\nPureComponent.prototype = new Component();\r\n// Some third-party libraries check if this property is present\r\nPureComponent.prototype.isPureReactComponent = true;\r\nPureComponent.prototype.shouldComponentUpdate = function(props, state) {\r\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\r\n};\r\n","import { createElement } from 'preact';\r\nimport { shallowDiffers } from './util';\r\n\r\n/**\r\n * Memoize a component, so that it only updates when the props actually have\r\n * changed. This was previously known as `React.pure`.\r\n * @param {import('./internal').FunctionComponent} c functional component\r\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\r\n * @returns {import('./internal').FunctionComponent}\r\n */\r\nexport function memo(c, comparer) {\r\n\tfunction shouldUpdate(nextProps) {\r\n\t\tlet ref = this.props.ref;\r\n\t\tlet updateRef = ref == nextProps.ref;\r\n\t\tif (!updateRef && ref) {\r\n\t\t\tref.call ? ref(null) : (ref.current = null);\r\n\t\t}\r\n\r\n\t\tif (!comparer) {\r\n\t\t\treturn shallowDiffers(this.props, nextProps);\r\n\t\t}\r\n\r\n\t\treturn !comparer(this.props, nextProps) || !updateRef;\r\n\t}\r\n\r\n\tfunction Memoed(props) {\r\n\t\tthis.shouldComponentUpdate = shouldUpdate;\r\n\t\treturn createElement(c, props);\r\n\t}\r\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\r\n\tMemoed.prototype.isReactComponent = true;\r\n\tMemoed._forwarded = true;\r\n\treturn Memoed;\r\n}\r\n","import { options } from 'preact';\r\nimport { assign } from './util';\r\n\r\nlet oldDiffHook = options._diff;\r\noptions._diff = vnode => {\r\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\r\n\t\tvnode.props.ref = vnode.ref;\r\n\t\tvnode.ref = null;\r\n\t}\r\n\tif (oldDiffHook) oldDiffHook(vnode);\r\n};\r\n\r\nexport const REACT_FORWARD_SYMBOL =\r\n\t(typeof Symbol != 'undefined' &&\r\n\t\tSymbol.for &&\r\n\t\tSymbol.for('react.forward_ref')) ||\r\n\t0xf47;\r\n\r\n/**\r\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\r\n * wrap components. Using `forwardRef` there is an easy way to get a reference\r\n * of the wrapped component instead of one of the wrapper itself.\r\n * @param {import('./index').ForwardFn} fn\r\n * @returns {import('./internal').FunctionComponent}\r\n */\r\nexport function forwardRef(fn) {\r\n\t// We always have ref in props.ref, except for\r\n\t// mobx-react. It will call this function directly\r\n\t// and always pass ref as the second argument.\r\n\tfunction Forwarded(props, ref) {\r\n\t\tlet clone = assign({}, props);\r\n\t\tdelete clone.ref;\r\n\t\tref = props.ref || ref;\r\n\t\treturn fn(\r\n\t\t\tclone,\r\n\t\t\t!ref || (typeof ref === 'object' && !('current' in ref)) ? null : ref\r\n\t\t);\r\n\t}\r\n\r\n\t// mobx-react checks for this being present\r\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\r\n\t// mobx-react heavily relies on implementation details.\r\n\t// It expects an object here with a `render` property,\r\n\t// and prototype.render will fail. Without this\r\n\t// mobx-react throws.\r\n\tForwarded.render = Forwarded;\r\n\r\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\r\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\r\n\treturn Forwarded;\r\n}\r\n","import { toChildArray } from 'preact';\r\n\r\nconst mapFn = (children, fn) => {\r\n\tif (children == null) return null;\r\n\treturn toChildArray(toChildArray(children).map(fn));\r\n};\r\n\r\n// This API is completely unnecessary for Preact, so it's basically passthrough.\r\nexport const Children = {\r\n\tmap: mapFn,\r\n\tforEach: mapFn,\r\n\tcount(children) {\r\n\t\treturn children ? toChildArray(children).length : 0;\r\n\t},\r\n\tonly(children) {\r\n\t\tconst normalized = toChildArray(children);\r\n\t\tif (normalized.length !== 1) throw 'Children.only';\r\n\t\treturn normalized[0];\r\n\t},\r\n\ttoArray: toChildArray\r\n};\r\n","import { Component, createElement, options, Fragment } from 'preact';\r\nimport { assign } from './util';\r\n\r\nconst oldCatchError = options._catchError;\r\noptions._catchError = function(error, newVNode, oldVNode) {\r\n\tif (error.then) {\r\n\t\t/** @type {import('./internal').Component} */\r\n\t\tlet component;\r\n\t\tlet vnode = newVNode;\r\n\r\n\t\tfor (; (vnode = vnode._parent); ) {\r\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\r\n\t\t\t\tif (newVNode._dom == null) {\r\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\r\n\t\t\t\t\tnewVNode._children = oldVNode._children;\r\n\t\t\t\t}\r\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\r\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\toldCatchError(error, newVNode, oldVNode);\r\n};\r\n\r\nconst oldUnmount = options.unmount;\r\noptions.unmount = function(vnode) {\r\n\t/** @type {import('./internal').Component} */\r\n\tconst component = vnode._component;\r\n\tif (component && component._onResolve) {\r\n\t\tcomponent._onResolve();\r\n\t}\r\n\r\n\t// if the component is still hydrating\r\n\t// most likely it is because the component is suspended\r\n\t// we set the vnode.type as `null` so that it is not a typeof function\r\n\t// so the unmount will remove the vnode._dom\r\n\tif (component && vnode._hydrating === true) {\r\n\t\tvnode.type = null;\r\n\t}\r\n\r\n\tif (oldUnmount) oldUnmount(vnode);\r\n};\r\n\r\nfunction detachedClone(vnode, detachedParent, parentDom) {\r\n\tif (vnode) {\r\n\t\tif (vnode._component && vnode._component.__hooks) {\r\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\r\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\r\n\t\t\t});\r\n\r\n\t\t\tvnode._component.__hooks = null;\r\n\t\t}\r\n\r\n\t\tvnode = assign({}, vnode);\r\n\t\tif (vnode._component != null) {\r\n\t\t\tif (vnode._component._parentDom === parentDom) {\r\n\t\t\t\tvnode._component._parentDom = detachedParent;\r\n\t\t\t}\r\n\t\t\tvnode._component = null;\r\n\t\t}\r\n\r\n\t\tvnode._children =\r\n\t\t\tvnode._children &&\r\n\t\t\tvnode._children.map(child =>\r\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\r\n\t\t\t);\r\n\t}\r\n\r\n\treturn vnode;\r\n}\r\n\r\nfunction removeOriginal(vnode, detachedParent, originalParent) {\r\n\tif (vnode) {\r\n\t\tvnode._original = null;\r\n\t\tvnode._children =\r\n\t\t\tvnode._children &&\r\n\t\t\tvnode._children.map(child =>\r\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\r\n\t\t\t);\r\n\r\n\t\tif (vnode._component) {\r\n\t\t\tif (vnode._component._parentDom === detachedParent) {\r\n\t\t\t\tif (vnode._dom) {\r\n\t\t\t\t\toriginalParent.insertBefore(vnode._dom, vnode._nextDom);\r\n\t\t\t\t}\r\n\t\t\t\tvnode._component._force = true;\r\n\t\t\t\tvnode._component._parentDom = originalParent;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn vnode;\r\n}\r\n\r\n// having custom inheritance instead of a class here saves a lot of bytes\r\nexport function Suspense() {\r\n\t// we do not call super here to golf some bytes...\r\n\tthis._pendingSuspensionCount = 0;\r\n\tthis._suspenders = null;\r\n\tthis._detachOnNextRender = null;\r\n}\r\n\r\n// Things we do here to save some bytes but are not proper JS inheritance:\r\n// - call `new Component()` as the prototype\r\n// - do not set `Suspense.prototype.constructor` to `Suspense`\r\nSuspense.prototype = new Component();\r\n\r\n/**\r\n * @this {import('./internal').SuspenseComponent}\r\n * @param {Promise} promise The thrown promise\r\n * @param {import('./internal').VNode<any, any>} suspendingVNode The suspending component\r\n */\r\nSuspense.prototype._childDidSuspend = function(promise, suspendingVNode) {\r\n\tconst suspendingComponent = suspendingVNode._component;\r\n\r\n\t/** @type {import('./internal').SuspenseComponent} */\r\n\tconst c = this;\r\n\r\n\tif (c._suspenders == null) {\r\n\t\tc._suspenders = [];\r\n\t}\r\n\tc._suspenders.push(suspendingComponent);\r\n\r\n\tconst resolve = suspended(c._vnode);\r\n\r\n\tlet resolved = false;\r\n\tconst onResolved = () => {\r\n\t\tif (resolved) return;\r\n\r\n\t\tresolved = true;\r\n\t\tsuspendingComponent._onResolve = null;\r\n\r\n\t\tif (resolve) {\r\n\t\t\tresolve(onSuspensionComplete);\r\n\t\t} else {\r\n\t\t\tonSuspensionComplete();\r\n\t\t}\r\n\t};\r\n\r\n\tsuspendingComponent._onResolve = onResolved;\r\n\r\n\tconst onSuspensionComplete = () => {\r\n\t\tif (!--c._pendingSuspensionCount) {\r\n\t\t\t// If the suspension was during hydration we don't need to restore the\r\n\t\t\t// suspended children into the _children array\r\n\t\t\tif (c.state._suspended) {\r\n\t\t\t\tconst suspendedVNode = c.state._suspended;\r\n\t\t\t\tc._vnode._children[0] = removeOriginal(\r\n\t\t\t\t\tsuspendedVNode,\r\n\t\t\t\t\tsuspendedVNode._component._parentDom,\r\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\r\n\r\n\t\t\tlet suspended;\r\n\t\t\twhile ((suspended = c._suspenders.pop())) {\r\n\t\t\t\tsuspended.forceUpdate();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * We do not set `suspended: true` during hydration because we want the actual markup\r\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\r\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\r\n\t */\r\n\tconst wasHydrating = suspendingVNode._hydrating === true;\r\n\tif (!c._pendingSuspensionCount++ && !wasHydrating) {\r\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\r\n\t}\r\n\tpromise.then(onResolved, onResolved);\r\n};\r\n\r\nSuspense.prototype.componentWillUnmount = function() {\r\n\tthis._suspenders = [];\r\n};\r\n\r\n/**\r\n * @this {import('./internal').SuspenseComponent}\r\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\r\n * @param {import('./internal').SuspenseState} state\r\n */\r\nSuspense.prototype.render = function(props, state) {\r\n\tif (this._detachOnNextRender) {\r\n\t\t// When the Suspense's _vnode was created by a call to createVNode\r\n\t\t// (i.e. due to a setState further up in the tree)\r\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\r\n\t\tif (this._vnode._children) {\r\n\t\t\tconst detachedParent = document.createElement('div');\r\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\r\n\t\t\tthis._vnode._children[0] = detachedClone(\r\n\t\t\t\tthis._detachOnNextRender,\r\n\t\t\t\tdetachedParent,\r\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tthis._detachOnNextRender = null;\r\n\t}\r\n\r\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\r\n\t/** @type {import('./internal').VNode} */\r\n\tconst fallback =\r\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\r\n\tif (fallback) fallback._hydrating = null;\r\n\r\n\treturn [\r\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\r\n\t\tfallback\r\n\t];\r\n};\r\n\r\n/**\r\n * Checks and calls the parent component's _suspended method, passing in the\r\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\r\n * that one of its children/descendants suspended.\r\n *\r\n * The parent MAY return a callback. The callback will get called when the\r\n * suspension resolves, notifying the parent of the fact.\r\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\r\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\r\n * This is a way for the parent to delay unsuspending.\r\n *\r\n * If the parent does not return a callback then the resolved vnode\r\n * gets unsuspended immediately when it resolves.\r\n *\r\n * @param {import('./internal').VNode} vnode\r\n * @returns {((unsuspend: () => void) => void)?}\r\n */\r\nexport function suspended(vnode) {\r\n\t/** @type {import('./internal').Component} */\r\n\tlet component = vnode._parent._component;\r\n\treturn component && component._suspended && component._suspended(vnode);\r\n}\r\n\r\nexport function lazy(loader) {\r\n\tlet prom;\r\n\tlet component;\r\n\tlet error;\r\n\r\n\tfunction Lazy(props) {\r\n\t\tif (!prom) {\r\n\t\t\tprom = loader();\r\n\t\t\tprom.then(\r\n\t\t\t\texports => {\r\n\t\t\t\t\tcomponent = exports.default || exports;\r\n\t\t\t\t},\r\n\t\t\t\te => {\r\n\t\t\t\t\terror = e;\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (error) {\r\n\t\t\tthrow error;\r\n\t\t}\r\n\r\n\t\tif (!component) {\r\n\t\t\tthrow prom;\r\n\t\t}\r\n\r\n\t\treturn createElement(component, props);\r\n\t}\r\n\r\n\tLazy.displayName = 'Lazy';\r\n\tLazy._forwarded = true;\r\n\treturn Lazy;\r\n}\r\n","import { Component, toChildArray } from 'preact';\r\nimport { suspended } from './suspense.js';\r\n\r\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\r\nconst SUSPENDED_COUNT = 0;\r\nconst RESOLVED_COUNT = 1;\r\nconst NEXT_NODE = 2;\r\n\r\n// Having custom inheritance instead of a class here saves a lot of bytes.\r\nexport function SuspenseList() {\r\n\tthis._next = null;\r\n\tthis._map = null;\r\n}\r\n\r\n// Mark one of child's earlier suspensions as resolved.\r\n// Some pending callbacks may become callable due to this\r\n// (e.g. the last suspended descendant gets resolved when\r\n// revealOrder === 'together'). Process those callbacks as well.\r\nconst resolve = (list, child, node) => {\r\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\r\n\t\t// The number a child (or any of its descendants) has been suspended\r\n\t\t// matches the number of times it's been resolved. Therefore we\r\n\t\t// mark the child as completely resolved by deleting it from ._map.\r\n\t\t// This is used to figure out when *all* children have been completely\r\n\t\t// resolved when revealOrder is 'together'.\r\n\t\tlist._map.delete(child);\r\n\t}\r\n\r\n\t// If revealOrder is falsy then we can do an early exit, as the\r\n\t// callbacks won't get queued in the node anyway.\r\n\t// If revealOrder is 'together' then also do an early exit\r\n\t// if all suspended descendants have not yet been resolved.\r\n\tif (\r\n\t\t!list.props.revealOrder ||\r\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\r\n\t) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Walk the currently suspended children in order, calling their\r\n\t// stored callbacks on the way. Stop if we encounter a child that\r\n\t// has not been completely resolved yet.\r\n\tnode = list._next;\r\n\twhile (node) {\r\n\t\twhile (node.length > 3) {\r\n\t\t\tnode.pop()();\r\n\t\t}\r\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tlist._next = node = node[NEXT_NODE];\r\n\t}\r\n};\r\n\r\n// Things we do here to save some bytes but are not proper JS inheritance:\r\n// - call `new Component()` as the prototype\r\n// - do not set `Suspense.prototype.constructor` to `Suspense`\r\nSuspenseList.prototype = new Component();\r\n\r\nSuspenseList.prototype._suspended = function(child) {\r\n\tconst list = this;\r\n\tconst delegated = suspended(list._vnode);\r\n\r\n\tlet node = list._map.get(child);\r\n\tnode[SUSPENDED_COUNT]++;\r\n\r\n\treturn unsuspend => {\r\n\t\tconst wrappedUnsuspend = () => {\r\n\t\t\tif (!list.props.revealOrder) {\r\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\r\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\r\n\t\t\t\tunsuspend();\r\n\t\t\t} else {\r\n\t\t\t\tnode.push(unsuspend);\r\n\t\t\t\tresolve(list, child, node);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (delegated) {\r\n\t\t\tdelegated(wrappedUnsuspend);\r\n\t\t} else {\r\n\t\t\twrappedUnsuspend();\r\n\t\t}\r\n\t};\r\n};\r\n\r\nSuspenseList.prototype.render = function(props) {\r\n\tthis._next = null;\r\n\tthis._map = new Map();\r\n\r\n\tconst children = toChildArray(props.children);\r\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\r\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\r\n\t\t// then flip the child list around so that the last child will be\r\n\t\t// the first in the linked list.\r\n\t\tchildren.reverse();\r\n\t}\r\n\t// Build the linked list. Iterate through the children in reverse order\r\n\t// so that `_next` points to the first linked list node to be resolved.\r\n\tfor (let i = children.length; i--; ) {\r\n\t\t// Create a new linked list node as an array of form:\r\n\t\t// \t[suspended_count, resolved_count, next_node]\r\n\t\t// where suspended_count and resolved_count are numeric counters for\r\n\t\t// keeping track how many times a node has been suspended and resolved.\r\n\t\t//\r\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\r\n\t\t// processing callbacks until componentDidMount has been called. In a sense\r\n\t\t// node is suspended at least until componentDidMount gets called!\r\n\t\t//\r\n\t\t// Pending callbacks are added to the end of the node:\r\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\r\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\r\n\t}\r\n\treturn props.children;\r\n};\r\n\r\nSuspenseList.prototype.componentDidUpdate = SuspenseList.prototype.componentDidMount = function() {\r\n\t// Iterate through all children after mounting for two reasons:\r\n\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\r\n\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\r\n\t// The nodes can now be completely consumed from the linked list.\r\n\t// 2. Handle nodes that might have gotten resolved between render and\r\n\t// componentDidMount.\r\n\tthis._map.forEach((node, child) => {\r\n\t\tresolve(this, child, node);\r\n\t});\r\n};\r\n","import { createElement, render } from 'preact';\r\n\r\n/**\r\n * @param {import('../../src/index').RenderableProps<{ context: any }>} props\r\n */\r\nfunction ContextProvider(props) {\r\n\tthis.getChildContext = () => props.context;\r\n\treturn props.children;\r\n}\r\n\r\n/**\r\n * Portal component\r\n * @this {import('./internal').Component}\r\n * @param {object | null | undefined} props\r\n *\r\n * TODO: use createRoot() instead of fake root\r\n */\r\nfunction Portal(props) {\r\n\tconst _this = this;\r\n\tlet container = props._container;\r\n\r\n\t_this.componentWillUnmount = function() {\r\n\t\trender(null, _this._temp);\r\n\t\t_this._temp = null;\r\n\t\t_this._container = null;\r\n\t};\r\n\r\n\t// When we change container we should clear our old container and\r\n\t// indicate a new mount.\r\n\tif (_this._container && _this._container !== container) {\r\n\t\t_this.componentWillUnmount();\r\n\t}\r\n\r\n\t// When props.vnode is undefined/false/null we are dealing with some kind of\r\n\t// conditional vnode. This should not trigger a render.\r\n\tif (props._vnode) {\r\n\t\tif (!_this._temp) {\r\n\t\t\t_this._container = container;\r\n\r\n\t\t\t// Create a fake DOM parent node that manages a subset of `container`'s children:\r\n\t\t\t_this._temp = {\r\n\t\t\t\tnodeType: 1,\r\n\t\t\t\tparentNode: container,\r\n\t\t\t\tchildNodes: [],\r\n\t\t\t\tappendChild(child) {\r\n\t\t\t\t\tthis.childNodes.push(child);\r\n\t\t\t\t\t_this._container.appendChild(child);\r\n\t\t\t\t},\r\n\t\t\t\tinsertBefore(child, before) {\r\n\t\t\t\t\tthis.childNodes.push(child);\r\n\t\t\t\t\t_this._container.appendChild(child);\r\n\t\t\t\t},\r\n\t\t\t\tremoveChild(child) {\r\n\t\t\t\t\tthis.childNodes.splice(this.childNodes.indexOf(child) >>> 1, 1);\r\n\t\t\t\t\t_this._container.removeChild(child);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t// Render our wrapping element into temp.\r\n\t\trender(\r\n\t\t\tcreateElement(ContextProvider, { context: _this.context }, props._vnode),\r\n\t\t\t_this._temp\r\n\t\t);\r\n\t}\r\n\t// When we come from a conditional render, on a mounted\r\n\t// portal we should clear the DOM.\r\n\telse if (_this._temp) {\r\n\t\t_this.componentWillUnmount();\r\n\t}\r\n}\r\n\r\n/**\r\n * Create a `Portal` to continue rendering the vnode tree at a different DOM node\r\n * @param {import('./internal').VNode} vnode The vnode to render\r\n * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.\r\n */\r\nexport function createPortal(vnode, container) {\r\n\treturn createElement(Portal, { _vnode: vnode, _container: container });\r\n}\r\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n};\nexports.__esModule = true;\nvar React = require(\"react\");\nvar PropTypes = require(\"prop-types\");\nvar autosize = require(\"autosize\");\nvar _getLineHeight = require(\"line-height\");\nvar getLineHeight = _getLineHeight;\nvar RESIZED = \"autosize:resized\";\n/**\n * A light replacement for built-in textarea component\n * which automaticaly adjusts its height to match the content\n */\nvar TextareaAutosizeClass = /** @class */ (function (_super) {\n __extends(TextareaAutosizeClass, _super);\n function TextareaAutosizeClass() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n lineHeight: null\n };\n _this.textarea = null;\n _this.onResize = function (e) {\n if (_this.props.onResize) {\n _this.props.onResize(e);\n }\n };\n _this.updateLineHeight = function () {\n if (_this.textarea) {\n _this.setState({\n lineHeight: getLineHeight(_this.textarea)\n });\n }\n };\n _this.onChange = function (e) {\n var onChange = _this.props.onChange;\n _this.currentValue = e.currentTarget.value;\n onChange && onChange(e);\n };\n return _this;\n }\n TextareaAutosizeClass.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, maxRows = _a.maxRows, async = _a.async;\n if (typeof maxRows === \"number\") {\n this.updateLineHeight();\n }\n if (typeof maxRows === \"number\" || async) {\n /*\n the defer is needed to:\n - force \"autosize\" to activate the scrollbar when this.props.maxRows is passed\n - support StyledComponents (see #71)\n */\n setTimeout(function () { return _this.textarea && autosize(_this.textarea); });\n }\n else {\n this.textarea && autosize(this.textarea);\n }\n if (this.textarea) {\n this.textarea.addEventListener(RESIZED, this.onResize);\n }\n };\n TextareaAutosizeClass.prototype.componentWillUnmount = function () {\n if (this.textarea) {\n this.textarea.removeEventListener(RESIZED, this.onResize);\n autosize.destroy(this.textarea);\n }\n };\n TextareaAutosizeClass.prototype.render = function () {\n var _this = this;\n var _a = this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, children = _b.children, props = __rest(_b, [\"onResize\", \"maxRows\", \"onChange\", \"style\", \"innerRef\", \"children\"]), lineHeight = _a.state.lineHeight;\n var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;\n return (React.createElement(\"textarea\", __assign({}, props, { onChange: this.onChange, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, ref: function (element) {\n _this.textarea = element;\n if (typeof _this.props.innerRef === 'function') {\n _this.props.innerRef(element);\n }\n else if (_this.props.innerRef) {\n _this.props.innerRef.current = element;\n }\n } }), children));\n };\n TextareaAutosizeClass.prototype.componentDidUpdate = function () {\n this.textarea && autosize.update(this.textarea);\n };\n TextareaAutosizeClass.defaultProps = {\n rows: 1,\n async: false\n };\n TextareaAutosizeClass.propTypes = {\n rows: PropTypes.number,\n maxRows: PropTypes.number,\n onResize: PropTypes.func,\n innerRef: PropTypes.any,\n async: PropTypes.bool\n };\n return TextareaAutosizeClass;\n}(React.Component));\nexports.TextareaAutosize = React.forwardRef(function (props, ref) {\n return React.createElement(TextareaAutosizeClass, __assign({}, props, { innerRef: ref }));\n});\n","\"use strict\";\nexports.__esModule = true;\nvar TextareaAutosize_1 = require(\"./TextareaAutosize\");\nexports[\"default\"] = TextareaAutosize_1.TextareaAutosize;\n","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"DraggableCore\", {\n enumerable: true,\n get: function get() {\n return _DraggableCore.default;\n }\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _clsx2 = _interopRequireDefault(require(\"clsx\"));\n\nvar _domFns = require(\"./utils/domFns\");\n\nvar _positionFns = require(\"./utils/positionFns\");\n\nvar _shims = require(\"./utils/shims\");\n\nvar _DraggableCore = _interopRequireDefault(require(\"./DraggableCore\"));\n\nvar _log = _interopRequireDefault(require(\"./utils/log\"));\n\nvar _excluded = [\"axis\", \"bounds\", \"children\", \"defaultPosition\", \"defaultClassName\", \"defaultClassNameDragging\", \"defaultClassNameDragged\", \"position\", \"positionOffset\", \"scale\"];\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n// Define <Draggable>\n//\nvar Draggable = /*#__PURE__*/function (_React$Component) {\n _inherits(Draggable, _React$Component);\n\n var _super = _createSuper(Draggable);\n\n function Draggable(props\n /*: DraggableProps*/\n ) {\n var _this;\n\n _classCallCheck(this, Draggable);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStart\", function (e, coreData) {\n (0, _log.default)('Draggable: onDragStart: %j', coreData); // Short-circuit if user's callback killed it.\n\n var shouldStart = _this.props.onStart(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData)); // Kills start event on core as well, so move handlers are never bound.\n\n\n if (shouldStart === false) return false;\n\n _this.setState({\n dragging: true,\n dragged: true\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDrag\", function (e, coreData) {\n if (!_this.state.dragging) return false;\n (0, _log.default)('Draggable: onDrag: %j', coreData);\n var uiData = (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData);\n var newState\n /*: $Shape<DraggableState>*/\n = {\n x: uiData.x,\n y: uiData.y\n }; // Keep within bounds.\n\n if (_this.props.bounds) {\n // Save original x and y.\n var x = newState.x,\n y = newState.y; // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n\n newState.x += _this.state.slackX;\n newState.y += _this.state.slackY; // Get bound position. This will ceil/floor the x and y within the boundaries.\n\n var _getBoundPosition = (0, _positionFns.getBoundPosition)(_assertThisInitialized(_this), newState.x, newState.y),\n _getBoundPosition2 = _slicedToArray(_getBoundPosition, 2),\n newStateX = _getBoundPosition2[0],\n newStateY = _getBoundPosition2[1];\n\n newState.x = newStateX;\n newState.y = newStateY; // Recalculate slack by noting how much was shaved by the boundPosition handler.\n\n newState.slackX = _this.state.slackX + (x - newState.x);\n newState.slackY = _this.state.slackY + (y - newState.y); // Update the event we fire to reflect what really happened after bounds took effect.\n\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - _this.state.x;\n uiData.deltaY = newState.y - _this.state.y;\n } // Short-circuit if user's callback killed it.\n\n\n var shouldUpdate = _this.props.onDrag(e, uiData);\n\n if (shouldUpdate === false) return false;\n\n _this.setState(newState);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStop\", function (e, coreData) {\n if (!_this.state.dragging) return false; // Short-circuit if user's callback killed it.\n\n var shouldContinue = _this.props.onStop(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData));\n\n if (shouldContinue === false) return false;\n (0, _log.default)('Draggable: onDragStop: %j', coreData);\n var newState\n /*: $Shape<DraggableState>*/\n = {\n dragging: false,\n slackX: 0,\n slackY: 0\n }; // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n\n var controlled = Boolean(_this.props.position);\n\n if (controlled) {\n var _this$props$position = _this.props.position,\n x = _this$props$position.x,\n y = _this$props$position.y;\n newState.x = x;\n newState.y = y;\n }\n\n _this.setState(newState);\n });\n\n _this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n // Whether or not we have been dragged before.\n dragged: false,\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n prevPropsPosition: _objectSpread({}, props.position),\n // Used for compensating for out-of-bounds drags\n slackX: 0,\n slackY: 0,\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n if (props.position && !(props.onDrag || props.onStop)) {\n // eslint-disable-next-line no-console\n 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 }\n\n return _this;\n }\n\n _createClass(Draggable, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) {\n this.setState({\n isElementSVG: true\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.setState({\n dragging: false\n }); // prevents invariant if unmounted while dragging\n } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n\n }, {\n key: \"findDOMNode\",\n value: function findDOMNode()\n /*: ?HTMLElement*/\n {\n var _this$props$nodeRef$c, _this$props, _this$props$nodeRef;\n\n return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 ? void 0 : (_this$props$nodeRef = _this$props.nodeRef) === null || _this$props$nodeRef === void 0 ? void 0 : _this$props$nodeRef.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom.default.findDOMNode(this);\n }\n }, {\n key: \"render\",\n value: function render()\n /*: ReactElement<any>*/\n {\n var _clsx;\n\n var _this$props2 = this.props,\n axis = _this$props2.axis,\n bounds = _this$props2.bounds,\n children = _this$props2.children,\n defaultPosition = _this$props2.defaultPosition,\n defaultClassName = _this$props2.defaultClassName,\n defaultClassNameDragging = _this$props2.defaultClassNameDragging,\n defaultClassNameDragged = _this$props2.defaultClassNameDragged,\n position = _this$props2.position,\n positionOffset = _this$props2.positionOffset,\n scale = _this$props2.scale,\n draggableCoreProps = _objectWithoutProperties(_this$props2, _excluded);\n\n var style = {};\n var svgTransform = null; // If this is controlled, we don't want to move it - unless it's dragging.\n\n var controlled = Boolean(position);\n var draggable = !controlled || this.state.dragging;\n var validPosition = position || defaultPosition;\n var transformOpts = {\n // Set left if horizontal drag is enabled\n x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,\n // Set top if vertical drag is enabled\n y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y\n }; // If this element was SVG, we use the `transform` attribute.\n\n if (this.state.isElementSVG) {\n svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable>\n // has a clean slate.\n style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);\n } // Mark with class while dragging\n\n\n var className = (0, _clsx2.default)(children.props.className || '', defaultClassName, (_clsx = {}, _defineProperty(_clsx, defaultClassNameDragging, this.state.dragging), _defineProperty(_clsx, defaultClassNameDragged, this.state.dragged), _clsx)); // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n\n return /*#__PURE__*/React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {\n onStart: this.onDragStart,\n onDrag: this.onDrag,\n onStop: this.onDragStop\n }), /*#__PURE__*/React.cloneElement(React.Children.only(children), {\n className: className,\n style: _objectSpread(_objectSpread({}, children.props.style), style),\n transform: svgTransform\n }));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: // React 16.3+\n // Arity (props, state)\n function getDerivedStateFromProps(_ref, _ref2)\n /*: ?$Shape<DraggableState>*/\n {\n var position = _ref.position;\n var prevPropsPosition = _ref2.prevPropsPosition;\n\n // Set x/y if a new position is provided in props that is different than the previous.\n if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {\n (0, _log.default)('Draggable: getDerivedStateFromProps %j', {\n position: position,\n prevPropsPosition: prevPropsPosition\n });\n return {\n x: position.x,\n y: position.y,\n prevPropsPosition: _objectSpread({}, position)\n };\n }\n\n return null;\n }\n }]);\n\n return Draggable;\n}(React.Component);\n\nexports.default = Draggable;\n\n_defineProperty(Draggable, \"displayName\", 'Draggable');\n\n_defineProperty(Draggable, \"propTypes\", _objectSpread(_objectSpread({}, _DraggableCore.default.propTypes), {}, {\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable bounds={{right: 300, bottom: 300}}>\n * <div>Content</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n bounds: _propTypes.default.oneOfType([_propTypes.default.shape({\n left: _propTypes.default.number,\n right: _propTypes.default.number,\n top: _propTypes.default.number,\n bottom: _propTypes.default.number\n }), _propTypes.default.string, _propTypes.default.oneOf([false])]),\n defaultClassName: _propTypes.default.string,\n defaultClassNameDragging: _propTypes.default.string,\n defaultClassNameDragged: _propTypes.default.string,\n\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable defaultPosition={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n defaultPosition: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n positionOffset: _propTypes.default.shape({\n x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable position={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n position: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n}));\n\n_defineProperty(Draggable, \"defaultProps\", _objectSpread(_objectSpread({}, _DraggableCore.default.defaultProps), {}, {\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {\n x: 0,\n y: 0\n },\n scale: 1\n}));","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _domFns = require(\"./utils/domFns\");\n\nvar _positionFns = require(\"./utils/positionFns\");\n\nvar _shims = require(\"./utils/shims\");\n\nvar _log = _interopRequireDefault(require(\"./utils/log\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Simple abstraction for dragging events names.\nvar eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n}; // Default to mouse events.\n\nvar dragEventFor = eventsFor.mouse;\n/*:: type DraggableCoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: ?number\n};*/\n\n/*:: export type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};*/\n\n/*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false;*/\n\n/*:: export type ControlPosition = {x: number, y: number};*/\n\n/*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/\n\n/*:: export type DraggableCoreDefaultProps = {\n allowAnyClick: boolean,\n disabled: boolean,\n enableUserSelectHack: boolean,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n scale: number,\n};*/\n\n/*:: export type DraggableCoreProps = {\n ...DraggableCoreDefaultProps,\n cancel: string,\n children: ReactElement<any>,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n nodeRef?: ?React.ElementRef<any>,\n};*/\n\n//\n// Define <DraggableCore>.\n//\n// <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\nvar DraggableCore = /*#__PURE__*/function (_React$Component) {\n _inherits(DraggableCore, _React$Component);\n\n var _super = _createSuper(DraggableCore);\n\n function DraggableCore() {\n var _this;\n\n _classCallCheck(this, DraggableCore);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN,\n lastY: NaN,\n touchIdentifier: null\n });\n\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"handleDragStart\", function (e) {\n // Make it possible to attach event handlers on top of this one.\n _this.props.onMouseDown(e); // Only accept left-clicks.\n\n\n if (!_this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false; // Get nodes. Be sure to grab relative document (could be iframed)\n\n var thisNode = _this.findDOMNode();\n\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error('<DraggableCore> not mounted on DragStart!');\n }\n\n var ownerDocument = thisNode.ownerDocument; // Short circuit if handle or cancel prop was provided and selector doesn't match.\n\n if (_this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.handle, thisNode) || _this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.cancel, thisNode)) {\n return;\n } // Prevent scrolling on mobile devices, like ipad/iphone.\n // Important that this is after handle/cancel.\n\n\n if (e.type === 'touchstart') e.preventDefault(); // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n\n var touchIdentifier = (0, _domFns.getTouchIdentifier)(e);\n\n _this.setState({\n touchIdentifier: touchIdentifier\n }); // Get the current drag point from the event. This is used as the offset.\n\n\n var position = (0, _positionFns.getControlPosition)(e, touchIdentifier, _assertThisInitialized(_this));\n if (position == null) return; // not possible but satisfies flow\n\n var x = position.x,\n y = position.y; // Create an event object with all the data parents need to make a decision here.\n\n var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y);\n (0, _log.default)('DraggableCore: handleDragStart: %j', coreEvent); // Call event handler. If it returns explicit false, cancel.\n\n (0, _log.default)('calling', _this.props.onStart);\n\n var shouldUpdate = _this.props.onStart(e, coreEvent);\n\n if (shouldUpdate === false || _this.mounted === false) return; // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n\n if (_this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument); // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n\n _this.setState({\n dragging: true,\n lastX: x,\n lastY: y\n }); // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n\n\n (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, _this.handleDrag);\n (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, _this.handleDragStop);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleDrag\", function (e) {\n // Get the current drag point from the event. This is used as the offset.\n var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this));\n if (position == null) return;\n var x = position.x,\n y = position.y; // Snap to grid if prop has been provided\n\n if (Array.isArray(_this.props.grid)) {\n var deltaX = x - _this.state.lastX,\n deltaY = y - _this.state.lastY;\n\n var _snapToGrid = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY);\n\n var _snapToGrid2 = _slicedToArray(_snapToGrid, 2);\n\n deltaX = _snapToGrid2[0];\n deltaY = _snapToGrid2[1];\n if (!deltaX && !deltaY) return; // skip useless drag\n\n x = _this.state.lastX + deltaX, y = _this.state.lastY + deltaY;\n }\n\n var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y);\n (0, _log.default)('DraggableCore: handleDrag: %j', coreEvent); // Call event handler. If it returns explicit false, trigger end.\n\n var shouldUpdate = _this.props.onDrag(e, coreEvent);\n\n if (shouldUpdate === false || _this.mounted === false) {\n try {\n // $FlowIgnore\n _this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n var event = ((document.createEvent('MouseEvents')\n /*: any*/\n )\n /*: MouseTouchEvent*/\n ); // I see why this insanity was deprecated\n // $FlowIgnore\n\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n\n _this.handleDragStop(event);\n }\n\n return;\n }\n\n _this.setState({\n lastX: x,\n lastY: y\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleDragStop\", function (e) {\n if (!_this.state.dragging) return;\n var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this));\n if (position == null) return;\n var x = position.x,\n y = position.y;\n var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y); // Call event handler\n\n var shouldContinue = _this.props.onStop(e, coreEvent);\n\n if (shouldContinue === false || _this.mounted === false) return false;\n\n var thisNode = _this.findDOMNode();\n\n if (thisNode) {\n // Remove user-select hack\n if (_this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);\n }\n\n (0, _log.default)('DraggableCore: handleDragStop: %j', coreEvent); // Reset the el.\n\n _this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\n });\n\n if (thisNode) {\n // Remove event handlers\n (0, _log.default)('DraggableCore: Removing handlers');\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, _this.handleDrag);\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, _this.handleDragStop);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseDown\", function (e) {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return _this.handleDragStart(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseUp\", function (e) {\n dragEventFor = eventsFor.mouse;\n return _this.handleDragStop(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTouchStart\", function (e) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return _this.handleDragStart(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTouchEnd\", function (e) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return _this.handleDragStop(e);\n });\n\n return _this;\n }\n\n _createClass(DraggableCore, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.mounted = true; // Touch handlers must be added with {passive: false} to be cancelable.\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n\n var thisNode = this.findDOMNode();\n\n if (thisNode) {\n (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.mounted = false; // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n\n var thisNode = this.findDOMNode();\n\n if (thisNode) {\n var ownerDocument = thisNode.ownerDocument;\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(ownerDocument);\n }\n } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n\n }, {\n key: \"findDOMNode\",\n value: function findDOMNode()\n /*: ?HTMLElement*/\n {\n var _this$props$nodeRef$c, _this$props, _this$props$nodeRef;\n\n return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 ? void 0 : (_this$props$nodeRef = _this$props.nodeRef) === null || _this$props$nodeRef === void 0 ? void 0 : _this$props$nodeRef.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom.default.findDOMNode(this);\n }\n }, {\n key: \"render\",\n value: function render()\n /*: React.Element<any>*/\n {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return /*#__PURE__*/React.cloneElement(React.Children.only(this.props.children), {\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onMouseUp: this.onMouseUp,\n // onTouchStart is added on `componentDidMount` so they can be added with\n // {passive: false}, which allows it to cancel. See\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n onTouchEnd: this.onTouchEnd\n });\n }\n }]);\n\n return DraggableCore;\n}(React.Component);\n\nexports.default = DraggableCore;\n\n_defineProperty(DraggableCore, \"displayName\", 'DraggableCore');\n\n_defineProperty(DraggableCore, \"propTypes\", {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: _propTypes.default.bool,\n\n /**\n * `disabled`, if true, stops the <Draggable> from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: _propTypes.default.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: _propTypes.default.bool,\n\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function offsetParent(props\n /*: DraggableCoreProps*/\n , propName\n /*: $Keys<DraggableCoreProps>*/\n ) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: _propTypes.default.arrayOf(_propTypes.default.number),\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable handle=\".handle\">\n * <div>\n * <div className=\"handle\">Click me to drag</div>\n * <div>This is some other content</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n handle: _propTypes.default.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * <Draggable cancel=\".cancel\">\n * <div>\n * <div className=\"cancel\">You can't drag from here</div>\n * <div>Dragging here works fine</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n cancel: _propTypes.default.string,\n\n /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.\n * Unfortunately, in order for <Draggable> to work properly, we need raw access\n * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`\n * as in this example:\n *\n * function MyComponent() {\n * const nodeRef = React.useRef(null);\n * return (\n * <Draggable nodeRef={nodeRef}>\n * <div ref={nodeRef}>Example Target</div>\n * </Draggable>\n * );\n * }\n *\n * This can be used for arbitrarily nested components, so long as the ref ends up\n * pointing to the actual child DOM node and not a custom component.\n */\n nodeRef: _propTypes.default.object,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: _propTypes.default.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: _propTypes.default.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: _propTypes.default.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: _propTypes.default.func,\n\n /**\n * `scale`, if set, applies scaling while dragging an element\n */\n scale: _propTypes.default.number,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n});\n\n_defineProperty(DraggableCore, \"defaultProps\", {\n allowAnyClick: false,\n // by default only accept left click\n disabled: false,\n enableUserSelectHack: true,\n onStart: function onStart() {},\n onDrag: function onDrag() {},\n onStop: function onStop() {},\n onMouseDown: function onMouseDown() {},\n scale: 1\n});","\"use strict\";\n\nvar _require = require('./Draggable'),\n Draggable = _require.default,\n DraggableCore = _require.DraggableCore; // Previous versions of this lib exported <Draggable> as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\n\n\nmodule.exports = Draggable;\nmodule.exports.default = Draggable;\nmodule.exports.DraggableCore = DraggableCore;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.matchesSelector = matchesSelector;\nexports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;\nexports.addEvent = addEvent;\nexports.removeEvent = removeEvent;\nexports.outerHeight = outerHeight;\nexports.outerWidth = outerWidth;\nexports.innerHeight = innerHeight;\nexports.innerWidth = innerWidth;\nexports.offsetXYFromParent = offsetXYFromParent;\nexports.createCSSTransform = createCSSTransform;\nexports.createSVGTransform = createSVGTransform;\nexports.getTranslation = getTranslation;\nexports.getTouch = getTouch;\nexports.getTouchIdentifier = getTouchIdentifier;\nexports.addUserSelectStyles = addUserSelectStyles;\nexports.removeUserSelectStyles = removeUserSelectStyles;\nexports.addClassName = addClassName;\nexports.removeClassName = removeClassName;\n\nvar _shims = require(\"./shims\");\n\nvar _getPrefix = _interopRequireWildcard(require(\"./getPrefix\"));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar matchesSelectorFunc = '';\n\nfunction matchesSelector(el\n/*: Node*/\n, selector\n/*: string*/\n)\n/*: boolean*/\n{\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) {\n // $FlowIgnore: Doesn't think elements are indexable\n return (0, _shims.isFunction)(el[method]);\n });\n } // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n\n\n if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false; // $FlowIgnore: Doesn't think elements are indexable\n\n return el[matchesSelectorFunc](selector);\n} // Works up the tree to the draggable itself attempting to match selector.\n\n\nfunction matchesSelectorAndParentsTo(el\n/*: Node*/\n, selector\n/*: string*/\n, baseNode\n/*: Node*/\n)\n/*: boolean*/\n{\n var node = el;\n\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}\n\nfunction addEvent(el\n/*: ?Node*/\n, event\n/*: string*/\n, handler\n/*: Function*/\n, inputOptions\n/*: Object*/\n)\n/*: void*/\n{\n if (!el) return;\n\n var options = _objectSpread({\n capture: true\n }, inputOptions); // $FlowIgnore[method-unbinding]\n\n\n if (el.addEventListener) {\n el.addEventListener(event, handler, options);\n } else if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nfunction removeEvent(el\n/*: ?Node*/\n, event\n/*: string*/\n, handler\n/*: Function*/\n, inputOptions\n/*: Object*/\n)\n/*: void*/\n{\n if (!el) return;\n\n var options = _objectSpread({\n capture: true\n }, inputOptions); // $FlowIgnore[method-unbinding]\n\n\n if (el.removeEventListener) {\n el.removeEventListener(event, handler, options);\n } else if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nfunction outerHeight(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n var height = node.clientHeight;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += (0, _shims.int)(computedStyle.borderTopWidth);\n height += (0, _shims.int)(computedStyle.borderBottomWidth);\n return height;\n}\n\nfunction outerWidth(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n var width = node.clientWidth;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += (0, _shims.int)(computedStyle.borderLeftWidth);\n width += (0, _shims.int)(computedStyle.borderRightWidth);\n return width;\n}\n\nfunction innerHeight(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n var height = node.clientHeight;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= (0, _shims.int)(computedStyle.paddingTop);\n height -= (0, _shims.int)(computedStyle.paddingBottom);\n return height;\n}\n\nfunction innerWidth(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n var width = node.clientWidth;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= (0, _shims.int)(computedStyle.paddingLeft);\n width -= (0, _shims.int)(computedStyle.paddingRight);\n return width;\n}\n/*:: interface EventWithOffset {\n clientX: number, clientY: number\n}*/\n\n\n// Get from offsetParent\nfunction offsetXYFromParent(evt\n/*: EventWithOffset*/\n, offsetParent\n/*: HTMLElement*/\n, scale\n/*: number*/\n)\n/*: ControlPosition*/\n{\n var isBody = offsetParent === offsetParent.ownerDocument.body;\n var offsetParentRect = isBody ? {\n left: 0,\n top: 0\n } : offsetParent.getBoundingClientRect();\n var x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;\n var y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;\n return {\n x: x,\n y: y\n };\n}\n\nfunction createCSSTransform(controlPos\n/*: ControlPosition*/\n, positionOffset\n/*: PositionOffsetControlPosition*/\n)\n/*: Object*/\n{\n var translation = getTranslation(controlPos, positionOffset, 'px');\n return _defineProperty({}, (0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default), translation);\n}\n\nfunction createSVGTransform(controlPos\n/*: ControlPosition*/\n, positionOffset\n/*: PositionOffsetControlPosition*/\n)\n/*: string*/\n{\n var translation = getTranslation(controlPos, positionOffset, '');\n return translation;\n}\n\nfunction getTranslation(_ref2, positionOffset\n/*: PositionOffsetControlPosition*/\n, unitSuffix\n/*: string*/\n)\n/*: string*/\n{\n var x = _ref2.x,\n y = _ref2.y;\n var translation = \"translate(\".concat(x).concat(unitSuffix, \",\").concat(y).concat(unitSuffix, \")\");\n\n if (positionOffset) {\n var defaultX = \"\".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix);\n var defaultY = \"\".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix);\n translation = \"translate(\".concat(defaultX, \", \").concat(defaultY, \")\") + translation;\n }\n\n return translation;\n}\n\nfunction getTouch(e\n/*: MouseTouchEvent*/\n, identifier\n/*: number*/\n)\n/*: ?{clientX: number, clientY: number}*/\n{\n return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, function (t) {\n return identifier === t.identifier;\n }) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, function (t) {\n return identifier === t.identifier;\n });\n}\n\nfunction getTouchIdentifier(e\n/*: MouseTouchEvent*/\n)\n/*: ?number*/\n{\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n} // User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n// Note we're passing `document` b/c we could be iframed\n\n\nfunction addUserSelectStyles(doc\n/*: ?Document*/\n) {\n if (!doc) return;\n var styleEl = doc.getElementById('react-draggable-style-el');\n\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nfunction removeUserSelectStyles(doc\n/*: ?Document*/\n) {\n if (!doc) return;\n\n try {\n if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection'); // $FlowIgnore: IE\n\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n // Remove selection caused by scroll, unless it's a focused input\n // (we use doc.defaultView in case we're in an iframe)\n var selection = (doc.defaultView || window).getSelection();\n\n if (selection && selection.type !== 'Caret') {\n selection.removeAllRanges();\n }\n }\n } catch (e) {// probably IE\n }\n}\n\nfunction addClassName(el\n/*: HTMLElement*/\n, className\n/*: string*/\n) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(\"(?:^|\\\\s)\".concat(className, \"(?!\\\\S)\")))) {\n el.className += \" \".concat(className);\n }\n }\n}\n\nfunction removeClassName(el\n/*: HTMLElement*/\n, className\n/*: string*/\n) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(\"(?:^|\\\\s)\".concat(className, \"(?!\\\\S)\"), 'g'), '');\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getPrefix = getPrefix;\nexports.browserPrefixToKey = browserPrefixToKey;\nexports.browserPrefixToStyle = browserPrefixToStyle;\nexports.default = void 0;\nvar prefixes = ['Moz', 'Webkit', 'O', 'ms'];\n\nfunction getPrefix()\n/*: string*/\n{\n var _window$document, _window$document$docu;\n\n var prop\n /*: string*/\n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform';\n // Ensure we're running in an environment where there is actually a global\n // `window` obj\n if (typeof window === 'undefined') return ''; // If we're in a pseudo-browser server-side environment, this access\n // path may not exist, so bail out if it doesn't.\n\n var style = (_window$document = window.document) === null || _window$document === void 0 ? void 0 : (_window$document$docu = _window$document.documentElement) === null || _window$document$docu === void 0 ? void 0 : _window$document$docu.style;\n if (!style) return '';\n if (prop in style) return '';\n\n for (var i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nfunction browserPrefixToKey(prop\n/*: string*/\n, prefix\n/*: string*/\n)\n/*: string*/\n{\n return prefix ? \"\".concat(prefix).concat(kebabToTitleCase(prop)) : prop;\n}\n\nfunction browserPrefixToStyle(prop\n/*: string*/\n, prefix\n/*: string*/\n)\n/*: string*/\n{\n return prefix ? \"-\".concat(prefix.toLowerCase(), \"-\").concat(prop) : prop;\n}\n\nfunction kebabToTitleCase(str\n/*: string*/\n)\n/*: string*/\n{\n var out = '';\n var shouldCapitalize = true;\n\n for (var i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n\n return out;\n} // Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\n\n\nvar _default = (getPrefix()\n/*: string*/\n);\n\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = log;\n\n/*eslint no-console:0*/\nfunction log() {\n var _console;\n\n if (undefined) (_console = console).log.apply(_console, arguments);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getBoundPosition = getBoundPosition;\nexports.snapToGrid = snapToGrid;\nexports.canDragX = canDragX;\nexports.canDragY = canDragY;\nexports.getControlPosition = getControlPosition;\nexports.createCoreData = createCoreData;\nexports.createDraggableData = createDraggableData;\n\nvar _shims = require(\"./shims\");\n\nvar _domFns = require(\"./domFns\");\n\nfunction getBoundPosition(draggable\n/*: Draggable*/\n, x\n/*: number*/\n, y\n/*: number*/\n)\n/*: [number, number]*/\n{\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y]; // Clone new bounds\n\n var bounds = draggable.props.bounds;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n var node = findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n var ownerDocument = node.ownerDocument;\n var ownerWindow = ownerDocument.defaultView;\n var boundNode;\n\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n\n var boundNodeEl\n /*: HTMLElement*/\n = boundNode; // for Flow, can't seem to refine correctly\n\n var nodeStyle = ownerWindow.getComputedStyle(node);\n var boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl); // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n\n bounds = {\n left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),\n top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),\n right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),\n bottom: (0, _domFns.innerHeight)(boundNodeEl) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)\n };\n } // Keep x and y below right and bottom limits...\n\n\n if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right);\n if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom); // But above left and top limits.\n\n if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left);\n if ((0, _shims.isNum)(bounds.top)) y = Math.max(y, bounds.top);\n return [x, y];\n}\n\nfunction snapToGrid(grid\n/*: [number, number]*/\n, pendingX\n/*: number*/\n, pendingY\n/*: number*/\n)\n/*: [number, number]*/\n{\n var x = Math.round(pendingX / grid[0]) * grid[0];\n var y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nfunction canDragX(draggable\n/*: Draggable*/\n)\n/*: boolean*/\n{\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nfunction canDragY(draggable\n/*: Draggable*/\n)\n/*: boolean*/\n{\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n} // Get {x, y} positions from event.\n\n\nfunction getControlPosition(e\n/*: MouseTouchEvent*/\n, touchIdentifier\n/*: ?number*/\n, draggableCore\n/*: DraggableCore*/\n)\n/*: ?ControlPosition*/\n{\n var touchObj = typeof touchIdentifier === 'number' ? (0, _domFns.getTouch)(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n\n var node = findDOMNode(draggableCore); // User can provide an offsetParent if desired.\n\n var offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);\n} // Create an data object exposed by <DraggableCore>'s events\n\n\nfunction createCoreData(draggable\n/*: DraggableCore*/\n, x\n/*: number*/\n, y\n/*: number*/\n)\n/*: DraggableData*/\n{\n var state = draggable.state;\n var isStart = !(0, _shims.isNum)(state.lastX);\n var node = findDOMNode(draggable);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node: node,\n deltaX: 0,\n deltaY: 0,\n lastX: x,\n lastY: y,\n x: x,\n y: y\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node: node,\n deltaX: x - state.lastX,\n deltaY: y - state.lastY,\n lastX: state.lastX,\n lastY: state.lastY,\n x: x,\n y: y\n };\n }\n} // Create an data exposed by <Draggable>'s events\n\n\nfunction createDraggableData(draggable\n/*: Draggable*/\n, coreData\n/*: DraggableData*/\n)\n/*: DraggableData*/\n{\n var scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + coreData.deltaX / scale,\n y: draggable.state.y + coreData.deltaY / scale,\n deltaX: coreData.deltaX / scale,\n deltaY: coreData.deltaY / scale,\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n} // A lot faster than stringify/parse\n\n\nfunction cloneBounds(bounds\n/*: Bounds*/\n)\n/*: Bounds*/\n{\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\nfunction findDOMNode(draggable\n/*: Draggable | DraggableCore*/\n)\n/*: HTMLElement*/\n{\n var node = draggable.findDOMNode();\n\n if (!node) {\n throw new Error('<DraggableCore>: Unmounted during event!');\n } // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n\n\n return node;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.findInArray = findInArray;\nexports.isFunction = isFunction;\nexports.isNum = isNum;\nexports.int = int;\nexports.dontSetMe = dontSetMe;\n\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nfunction findInArray(array\n/*: Array<any> | TouchList*/\n, callback\n/*: Function*/\n)\n/*: any*/\n{\n for (var i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nfunction isFunction(func\n/*: any*/\n)\n/*: boolean %checks*/\n{\n // $FlowIgnore[method-unbinding]\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nfunction isNum(num\n/*: any*/\n)\n/*: boolean %checks*/\n{\n return typeof num === 'number' && !isNaN(num);\n}\n\nfunction int(a\n/*: string*/\n)\n/*: number*/\n{\n return parseInt(a, 10);\n}\n\nfunction dontSetMe(props\n/*: Object*/\n, propName\n/*: string*/\n, componentName\n/*: string*/\n)\n/*: ?Error*/\n{\n if (props[propName]) {\n return new Error(\"Invalid prop \".concat(propName, \" passed to \").concat(componentName, \" - do not set this, set it on the child.\"));\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar sizerStyle = {\n\tposition: 'absolute',\n\ttop: 0,\n\tleft: 0,\n\tvisibility: 'hidden',\n\theight: 0,\n\toverflow: 'scroll',\n\twhiteSpace: 'pre'\n};\n\nvar INPUT_PROPS_BLACKLIST = ['extraWidth', 'injectStyles', 'inputClassName', 'inputRef', 'inputStyle', 'minWidth', 'onAutosize', 'placeholderIsMinWidth'];\n\nvar cleanInputProps = function cleanInputProps(inputProps) {\n\tINPUT_PROPS_BLACKLIST.forEach(function (field) {\n\t\treturn delete inputProps[field];\n\t});\n\treturn inputProps;\n};\n\nvar copyStyles = function copyStyles(styles, node) {\n\tnode.style.fontSize = styles.fontSize;\n\tnode.style.fontFamily = styles.fontFamily;\n\tnode.style.fontWeight = styles.fontWeight;\n\tnode.style.fontStyle = styles.fontStyle;\n\tnode.style.letterSpacing = styles.letterSpacing;\n\tnode.style.textTransform = styles.textTransform;\n};\n\nvar isIE = typeof window !== 'undefined' && window.navigator ? /MSIE |Trident\\/|Edge\\//.test(window.navigator.userAgent) : false;\n\nvar generateId = function generateId() {\n\t// we only need an auto-generated ID for stylesheet injection, which is only\n\t// used for IE. so if the browser is not IE, this should return undefined.\n\treturn isIE ? '_' + Math.random().toString(36).substr(2, 12) : undefined;\n};\n\nvar AutosizeInput = function (_Component) {\n\t_inherits(AutosizeInput, _Component);\n\n\t_createClass(AutosizeInput, null, [{\n\t\tkey: 'getDerivedStateFromProps',\n\t\tvalue: function getDerivedStateFromProps(props, state) {\n\t\t\tvar id = props.id;\n\n\t\t\treturn id !== state.prevId ? { inputId: id || generateId(), prevId: id } : null;\n\t\t}\n\t}]);\n\n\tfunction AutosizeInput(props) {\n\t\t_classCallCheck(this, AutosizeInput);\n\n\t\tvar _this = _possibleConstructorReturn(this, (AutosizeInput.__proto__ || Object.getPrototypeOf(AutosizeInput)).call(this, props));\n\n\t\t_this.inputRef = function (el) {\n\t\t\t_this.input = el;\n\t\t\tif (typeof _this.props.inputRef === 'function') {\n\t\t\t\t_this.props.inputRef(el);\n\t\t\t}\n\t\t};\n\n\t\t_this.placeHolderSizerRef = function (el) {\n\t\t\t_this.placeHolderSizer = el;\n\t\t};\n\n\t\t_this.sizerRef = function (el) {\n\t\t\t_this.sizer = el;\n\t\t};\n\n\t\t_this.state = {\n\t\t\tinputWidth: props.minWidth,\n\t\t\tinputId: props.id || generateId(),\n\t\t\tprevId: props.id\n\t\t};\n\t\treturn _this;\n\t}\n\n\t_createClass(AutosizeInput, [{\n\t\tkey: 'componentDidMount',\n\t\tvalue: function componentDidMount() {\n\t\t\tthis.mounted = true;\n\t\t\tthis.copyInputStyles();\n\t\t\tthis.updateInputWidth();\n\t\t}\n\t}, {\n\t\tkey: 'componentDidUpdate',\n\t\tvalue: function componentDidUpdate(prevProps, prevState) {\n\t\t\tif (prevState.inputWidth !== this.state.inputWidth) {\n\t\t\t\tif (typeof this.props.onAutosize === 'function') {\n\t\t\t\t\tthis.props.onAutosize(this.state.inputWidth);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.updateInputWidth();\n\t\t}\n\t}, {\n\t\tkey: 'componentWillUnmount',\n\t\tvalue: function componentWillUnmount() {\n\t\t\tthis.mounted = false;\n\t\t}\n\t}, {\n\t\tkey: 'copyInputStyles',\n\t\tvalue: function copyInputStyles() {\n\t\t\tif (!this.mounted || !window.getComputedStyle) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar inputStyles = this.input && window.getComputedStyle(this.input);\n\t\t\tif (!inputStyles) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcopyStyles(inputStyles, this.sizer);\n\t\t\tif (this.placeHolderSizer) {\n\t\t\t\tcopyStyles(inputStyles, this.placeHolderSizer);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'updateInputWidth',\n\t\tvalue: function updateInputWidth() {\n\t\t\tif (!this.mounted || !this.sizer || typeof this.sizer.scrollWidth === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar newInputWidth = void 0;\n\t\t\tif (this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth)) {\n\t\t\t\tnewInputWidth = Math.max(this.sizer.scrollWidth, this.placeHolderSizer.scrollWidth) + 2;\n\t\t\t} else {\n\t\t\t\tnewInputWidth = this.sizer.scrollWidth + 2;\n\t\t\t}\n\t\t\t// add extraWidth to the detected width. for number types, this defaults to 16 to allow for the stepper UI\n\t\t\tvar extraWidth = this.props.type === 'number' && this.props.extraWidth === undefined ? 16 : parseInt(this.props.extraWidth) || 0;\n\t\t\tnewInputWidth += extraWidth;\n\t\t\tif (newInputWidth < this.props.minWidth) {\n\t\t\t\tnewInputWidth = this.props.minWidth;\n\t\t\t}\n\t\t\tif (newInputWidth !== this.state.inputWidth) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tinputWidth: newInputWidth\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getInput',\n\t\tvalue: function getInput() {\n\t\t\treturn this.input;\n\t\t}\n\t}, {\n\t\tkey: 'focus',\n\t\tvalue: function focus() {\n\t\t\tthis.input.focus();\n\t\t}\n\t}, {\n\t\tkey: 'blur',\n\t\tvalue: function blur() {\n\t\t\tthis.input.blur();\n\t\t}\n\t}, {\n\t\tkey: 'select',\n\t\tvalue: function select() {\n\t\t\tthis.input.select();\n\t\t}\n\t}, {\n\t\tkey: 'renderStyles',\n\t\tvalue: function renderStyles() {\n\t\t\t// this method injects styles to hide IE's clear indicator, which messes\n\t\t\t// with input size detection. the stylesheet is only injected when the\n\t\t\t// browser is IE, and can also be disabled by the `injectStyles` prop.\n\t\t\tvar injectStyles = this.props.injectStyles;\n\n\t\t\treturn isIE && injectStyles ? _react2.default.createElement('style', { dangerouslySetInnerHTML: {\n\t\t\t\t\t__html: 'input#' + this.state.inputId + '::-ms-clear {display: none;}'\n\t\t\t\t} }) : null;\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar sizerValue = [this.props.defaultValue, this.props.value, ''].reduce(function (previousValue, currentValue) {\n\t\t\t\tif (previousValue !== null && previousValue !== undefined) {\n\t\t\t\t\treturn previousValue;\n\t\t\t\t}\n\t\t\t\treturn currentValue;\n\t\t\t});\n\n\t\t\tvar wrapperStyle = _extends({}, this.props.style);\n\t\t\tif (!wrapperStyle.display) wrapperStyle.display = 'inline-block';\n\n\t\t\tvar inputStyle = _extends({\n\t\t\t\tboxSizing: 'content-box',\n\t\t\t\twidth: this.state.inputWidth + 'px'\n\t\t\t}, this.props.inputStyle);\n\n\t\t\tvar inputProps = _objectWithoutProperties(this.props, []);\n\n\t\t\tcleanInputProps(inputProps);\n\t\t\tinputProps.className = this.props.inputClassName;\n\t\t\tinputProps.id = this.state.inputId;\n\t\t\tinputProps.style = inputStyle;\n\n\t\t\treturn _react2.default.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: this.props.className, style: wrapperStyle },\n\t\t\t\tthis.renderStyles(),\n\t\t\t\t_react2.default.createElement('input', _extends({}, inputProps, { ref: this.inputRef })),\n\t\t\t\t_react2.default.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ ref: this.sizerRef, style: sizerStyle },\n\t\t\t\t\tsizerValue\n\t\t\t\t),\n\t\t\t\tthis.props.placeholder ? _react2.default.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ ref: this.placeHolderSizerRef, style: sizerStyle },\n\t\t\t\t\tthis.props.placeholder\n\t\t\t\t) : null\n\t\t\t);\n\t\t}\n\t}]);\n\n\treturn AutosizeInput;\n}(_react.Component);\n\nAutosizeInput.propTypes = {\n\tclassName: _propTypes2.default.string, // className for the outer element\n\tdefaultValue: _propTypes2.default.any, // default field value\n\textraWidth: _propTypes2.default.oneOfType([// additional width for input element\n\t_propTypes2.default.number, _propTypes2.default.string]),\n\tid: _propTypes2.default.string, // id to use for the input, can be set for consistent snapshots\n\tinjectStyles: _propTypes2.default.bool, // inject the custom stylesheet to hide clear UI, defaults to true\n\tinputClassName: _propTypes2.default.string, // className for the input element\n\tinputRef: _propTypes2.default.func, // ref callback for the input element\n\tinputStyle: _propTypes2.default.object, // css styles for the input element\n\tminWidth: _propTypes2.default.oneOfType([// minimum width for input element\n\t_propTypes2.default.number, _propTypes2.default.string]),\n\tonAutosize: _propTypes2.default.func, // onAutosize handler: function(newWidth) {}\n\tonChange: _propTypes2.default.func, // onChange handler: function(event) {}\n\tplaceholder: _propTypes2.default.string, // placeholder text\n\tplaceholderIsMinWidth: _propTypes2.default.bool, // don't collapse size to less than the placeholder\n\tstyle: _propTypes2.default.object, // css styles for the outer element\n\tvalue: _propTypes2.default.any // field value\n};\nAutosizeInput.defaultProps = {\n\tminWidth: 1,\n\tinjectStyles: true\n};\n\nexports.default = AutosizeInput;","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2021/RequireObjectCoercible');\nvar ToString = require('es-abstract/2021/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\n/* eslint-disable no-control-regex */\nvar leftWhitespace = /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundTrim = callBind(getPolyfill());\n\ndefine(boundTrim, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundTrim;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.trim && zeroWidthSpace.trim() === zeroWidthSpace) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"function E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('%Function.prototype.apply%');\n\n// https://ecma-international.org/ecma-262/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n/**\n * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p\n * 1. Assert: Type(O) is Object.\n * 2. Assert: IsPropertyKey(P) is true.\n * 3. Return O.[[Get]](P, O).\n */\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://ecma-international.org/ecma-262/6.0/#sec-hasproperty\n\nmodule.exports = function HasProperty(O, P) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\treturn P in O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\n// https://ecma-international.org/ecma-262/6.0/#sec-isarray\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\n// https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Get = require('./Get');\nvar ToLength = require('./ToLength');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/11.0/#sec-lengthofarraylike\n\nmodule.exports = function LengthOfArrayLike(obj) {\n\tif (Type(obj) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `obj` must be an Object');\n\t}\n\treturn ToLength(Get(obj, 'length'));\n};\n\n// TODO: use this all over\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar ES5ToInteger = require('../5/ToInteger');\n\nvar ToNumber = require('./ToNumber');\n\n// https://www.ecma-international.org/ecma-262/11.0/#sec-tointeger\n\nmodule.exports = function ToInteger(value) {\n\tvar number = ToNumber(value);\n\tif (number !== 0) {\n\t\tnumber = ES5ToInteger(number);\n\t}\n\treturn number === 0 ? 0 : number;\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('../helpers/regexTester');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\n// whitespace from: https://es5.github.io/#x15.5.4.20\n// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324\nvar ws = [\n\t'\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003',\n\t'\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028',\n\t'\\u2029\\uFEFF'\n].join('');\nvar trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g');\nvar $replace = callBound('String.prototype.replace');\nvar $trim = function (value) {\n\treturn $replace(value, trimRegex, '');\n};\n\nvar ToPrimitive = require('./ToPrimitive');\n\n// https://ecma-international.org/ecma-262/6.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\tif (isBinary(value)) {\n\t\t\treturn ToNumber($parseInteger($strSlice(value, 2), 2));\n\t\t} else if (isOctal(value)) {\n\t\t\treturn ToNumber($parseInteger($strSlice(value, 2), 8));\n\t\t} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {\n\t\t\treturn NaN;\n\t\t}\n\t\tvar trimmed = $trim(value);\n\t\tif (trimmed !== value) {\n\t\t\treturn ToNumber(trimmed);\n\t\t}\n\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Object = GetIntrinsic('%Object%');\n\nvar RequireObjectCoercible = require('./RequireObjectCoercible');\n\n// https://ecma-international.org/ecma-262/6.0/#sec-toobject\n\nmodule.exports = function ToObject(value) {\n\tRequireObjectCoercible(value);\n\treturn $Object(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://ecma-international.org/ecma-262/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://ecma-international.org/ecma-262/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar abs = require('./abs');\nvar floor = require('./floor');\nvar ToNumber = require('./ToNumber');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\nvar $sign = require('../helpers/sign');\n\n// http://262.ecma-international.org/5.1/#sec-9.4\n\nmodule.exports = function ToInteger(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number)) { return 0; }\n\tif (number === 0 || !$isFinite(number)) { return number; }\n\treturn $sign(number) * floor(abs(number));\n};\n","'use strict';\n\nvar ToPrimitive = require('./ToPrimitive');\n\n// http://262.ecma-international.org/5.1/#sec-9.3\n\nmodule.exports = function ToNumber(value) {\n\tvar prim = ToPrimitive(value, Number);\n\tif (typeof prim !== 'string') {\n\t\treturn +prim; // eslint-disable-line no-implicit-coercion\n\t}\n\n\t// eslint-disable-next-line no-control-regex\n\tvar trimmed = prim.replace(/^[ \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\u0085]+|[ \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\u0085]+$/g, '');\n\tif ((/^0[ob]|^[+-]0x/).test(trimmed)) {\n\t\treturn NaN;\n\t}\n\n\treturn +trimmed; // eslint-disable-line no-implicit-coercion\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.1\n\nmodule.exports = require('es-to-primitive/es5');\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\n\n// http://262.ecma-international.org/5.1/#sec-5.2\n\nmodule.exports = function abs(x) {\n\treturn $abs(x);\n};\n","'use strict';\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/5.1/#sec-5.2\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\treturn $floor(x);\n};\n","'use strict';\n\nvar $isNaN = Number.isNaN || function (a) { return a !== a; };\n\nmodule.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Math = GetIntrinsic('%Math%');\nvar $Number = GetIntrinsic('%Number%');\n\nmodule.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $test = GetIntrinsic('RegExp.prototype.test');\n\nvar callBind = require('call-bind');\n\nmodule.exports = function regexTester(regex) {\n\treturn callBind($test, regex);\n};\n","'use strict';\n\nmodule.exports = function sign(number) {\n\treturn number >= 0 ? 1 : -1;\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\r\n\r\nconst getClassNames = el => {\r\n const attr = el.getAttribute('class');\r\n return attr ? new Set(attr.split(' ')) : new Set();\r\n}\r\n\r\n// IE11 doesn't support adding/removing classes to SVG elements except \r\n// via .setAttribute\r\nexport const addClass = (el, className) => {\r\n const classNames = getClassNames(el);\r\n classNames.add(className);\r\n el.setAttribute('class', Array.from(classNames).join(' '));\r\n}\r\n\r\nexport const removeClass = (el, className) => {\r\n const classNames = getClassNames(el);\r\n classNames.delete(className);\r\n\r\n if (classNames.size === 0)\r\n el.removeAttribute('class');\r\n else\r\n el.setAttribute('class', Array.from(classNames).join(' '));\r\n}\r\n\r\nexport const hasClass = (el, className) =>\r\n getClassNames(el).has(className);","import { SVG_NAMESPACE, addClass } from '../util/SVG';\r\n\r\n/** \r\n * Parses a W3C Web Annotation FragmentSelector conforming\r\n * to the Media Fragments spec. Supports (well-formed) xywh=pixel\r\n * and xywh=percent fragments. \r\n */\r\nexport const parseRectFragment = (annotation, image) => {\r\n const selector = annotation.selector('FragmentSelector');\r\n\r\n if (selector?.conformsTo.startsWith('http://www.w3.org/TR/media-frags')) {\r\n const { value } = selector;\r\n \r\n const format = value.includes(':') ? value.substring(value.indexOf('=') + 1, value.indexOf(':')) : 'pixel';\r\n const coords = value.includes(':') ? value.substring(value.indexOf(':') + 1) : value.substring(value.indexOf('=') + 1);\r\n\r\n let [ x, y, w, h ] = coords.split(',').map(parseFloat);\r\n\r\n if (format.toLowerCase() === 'percent') {\r\n x = x * image.naturalWidth / 100;\r\n y = y * image.naturalHeight / 100;\r\n w = w * image.naturalWidth / 100;\r\n h = h * image.naturalHeight / 100;\r\n }\r\n\r\n return { x, y, w, h };\r\n }\r\n}\r\n\r\n/** \r\n * Serializes a (x, y, w, h)-tuple as Media Fragment selector\r\n * using pixel coordinates.\r\n */\r\nconst toPixelRectFragment = (x, y, w, h, image) => ({\r\n source: image?.src,\r\n selector: {\r\n type: \"FragmentSelector\",\r\n conformsTo: \"http://www.w3.org/TR/media-frags/\",\r\n value: `xywh=pixel:${x},${y},${w},${h}`\r\n }\r\n});\r\n\r\n/** \r\n * Serializes a (x, y, w, h)-tuple as Media Fragment selector \r\n * using percent coordinates.\r\n */\r\nconst toPercentRectFragment = (x, y, w, h, image) => {\r\n const px = x / image.naturalWidth * 100;\r\n const py = y / image.naturalHeight * 100;\r\n const pw = w / image.naturalWidth * 100;\r\n const ph = h / image.naturalHeight * 100;\r\n\r\n return {\r\n source: image.src,\r\n selector: {\r\n type: \"FragmentSelector\",\r\n conformsTo: \"http://www.w3.org/TR/media-frags/\",\r\n value: `xywh=percent:${px},${py},${pw},${ph}`\r\n }\r\n }\r\n}\r\n\r\nexport const toRectFragment = (x, y, w, h, image, fragmentUnit) =>\r\n fragmentUnit?.toLowerCase() === 'percent' ?\r\n toPercentRectFragment(x, y, w, h, image) :\r\n toPixelRectFragment(x, y, w, h, image);\r\n\r\n/** Shorthand to apply the given (x, y, w, h) to the SVG shape **/\r\nconst setXYWH = (shape, x, y, w, h) => {\r\n shape.setAttribute('x', x);\r\n shape.setAttribute('y', y);\r\n shape.setAttribute('width', w);\r\n shape.setAttribute('height', h);\r\n}\r\n\r\n\r\nconst setPointXY = (shape, x, y) => {\r\n shape.setAttribute('cx', x);\r\n shape.setAttribute('cy', y);\r\n shape.setAttribute('r', 7); // TODO make configurable\r\n}\r\n\r\nexport const drawRectMask = (imageDimensions, x, y, w, h) => {\r\n const mask = document.createElementNS(SVG_NAMESPACE, 'path');\r\n mask.setAttribute('fill-rule', 'evenodd');\r\n\r\n const { naturalWidth, naturalHeight } = imageDimensions;\r\n mask.setAttribute('d', `M0 0 h${naturalWidth} v${naturalHeight} h-${naturalWidth} z M${x} ${y} h${w} v${h} h-${w} z`);\r\n\r\n return mask;\r\n}\r\n\r\nexport const setRectMaskSize = (mask, imageDimensions, x, y, w, h) => {\r\n const { naturalWidth, naturalHeight } = imageDimensions;\r\n mask.setAttribute('d', `M0 0 h${naturalWidth} v${naturalHeight} h-${naturalWidth} z M${x} ${y} h${w} v${h} h-${w} z`);\r\n}\r\n\r\n/** \r\n * Draws an SVG rectangle, either from an annotation, or an\r\n * (x, y, w, h)-tuple.\r\n */\r\nexport const drawRect = (arg1, arg2, arg3, arg4) => {\r\n const { x, y, w, h } = arg1.type === 'Annotation' || arg1.type === 'Selection' ?\r\n parseRectFragment(arg1, arg2) : { x: arg1, y: arg2, w: arg3, h: arg4 };\r\n\r\n const g = document.createElementNS(SVG_NAMESPACE, 'g');\r\n\r\n if (w === 0 && h === 0) {\r\n // Edge case: rect is actually a point\r\n addClass(g, 'a9s-point');\r\n addClass(g, 'a9s-non-scaling');\r\n g.setAttribute('transform-origin', `${x} ${y}`);\r\n\r\n const outerPoint = document.createElementNS(SVG_NAMESPACE, 'circle');\r\n const innerPoint = document.createElementNS(SVG_NAMESPACE, 'circle');\r\n\r\n innerPoint.setAttribute('class', 'a9s-inner');\r\n setPointXY(innerPoint, x, y);\r\n\r\n outerPoint.setAttribute('class', 'a9s-outer');\r\n setPointXY(outerPoint, x, y);\r\n\r\n g.appendChild(outerPoint);\r\n g.appendChild(innerPoint); \r\n } else {\r\n const outerRect = document.createElementNS(SVG_NAMESPACE, 'rect');\r\n const innerRect = document.createElementNS(SVG_NAMESPACE, 'rect');\r\n\r\n innerRect.setAttribute('class', 'a9s-inner');\r\n setXYWH(innerRect, x, y, w, h);\r\n\r\n outerRect.setAttribute('class', 'a9s-outer');\r\n setXYWH(outerRect, x, y, w, h);\r\n\r\n g.appendChild(outerRect);\r\n g.appendChild(innerRect);\r\n }\r\n\r\n return g;\r\n}\r\n\r\n/** Gets the (x, y, w, h)-values from the attributes of the SVG group **/\r\nexport const getRectSize = g => {\r\n const outer = g.querySelector('.a9s-outer');\r\n\r\n if (outer.nodeName === 'rect') {\r\n const x = parseFloat(outer.getAttribute('x'));\r\n const y = parseFloat(outer.getAttribute('y'));\r\n const w = parseFloat(outer.getAttribute('width'));\r\n const h = parseFloat(outer.getAttribute('height'));\r\n\r\n return { x, y, w, h };\r\n } else {\r\n const x = parseFloat(outer.getAttribute('cx'));\r\n const y = parseFloat(outer.getAttribute('cy'));\r\n\r\n return { x, y, w: 0, h: 0 };\r\n }\r\n}\r\n\r\n/** Applies the (x, y, w, h)-values to the rects in the SVG group **/\r\nexport const setRectSize = (g, x, y, w, h) => {\r\n const inner = g.querySelector('.a9s-inner');\r\n const outer = g.querySelector('.a9s-outer');\r\n\r\n if (outer.nodeName === 'rect') {\r\n setXYWH(inner, x, y, w, h);\r\n setXYWH(outer, x, y, w, h); \r\n } else {\r\n setPointXY(inner, x, y);\r\n setPointXY(outer, x, y);\r\n }\r\n}\r\n\r\n/** \r\n * Shorthand to get the area (rectangle w x h) from the \r\n * annotation's fragment selector. \r\n */\r\nexport const rectArea = (annotation, image) => {\r\n const { w, h } = parseRectFragment(annotation, image);\r\n return w * h;\r\n}\r\n\r\n","/**\r\n * Computes the area of the polygon defined by\r\n * the given conrner points.\r\n * @param {Array} points \r\n * @returns {number} the area\r\n */\r\nexport const polygonArea = points => {\r\n let area = 0;\r\n let j = points.length - 1;\r\n\r\n for (let i=0; i < points.length; i++) {\r\n area += (points[j][0] + points[i][0]) * (points[j][1] - points[i][1]);\r\n j = i;\r\n }\r\n\r\n return Math.abs(0.5 * area);\r\n}\r\n\r\n/**\r\n * Hit test: checks if this point is inside the circle.\r\n * @param {Array} point the point [x, y]\r\n * @param {number} cx circle center x\r\n * @param {number} cy circle center y\r\n * @param {number} r circle radius\r\n * @returns {boolean} \r\n */\r\nexport const pointInCircle = (point, cx, cy, r) => {\r\n const dx = point[0] - cx;\r\n const dy = point[1] - cy;\r\n\r\n const d = Math.sqrt(dx * dx + dy * dy);\r\n return d <= r;\r\n}\r\n\r\n/**\r\n * Hit test: checks if this point is inside the ellipse.\r\n * Cf. https://github.com/w8r/point-in-ellipse\r\n * @param {Array} point the point [x, y] \r\n * @param {number} cx ellipse center x \r\n * @param {number} cy ellipse center y\r\n * @param {number} rx ellipse x radius\r\n * @param {number} ry ellipse y radius\r\n * @param {number=} rotation ellipse rotation \r\n * @returns {boolean}\r\n */\r\nexport const pointInEllipse = (point, cx, cy, rx, ry, rotation) => {\r\n const rot = rotation || 0;\r\n\r\n const cos = Math.cos(rot);\r\n const sin = Math.sin(rot);\r\n\r\n const dx = point[0] - cx;\r\n const dy = point[1] - cy;\r\n\r\n const tdx = cos * dx + sin * dy;\r\n const tdy = sin * dx - cos * dy;\r\n\r\n return (tdx * tdx) / (rx * rx) + (tdy * tdy) / (ry * ry) <= 1;\r\n}\r\n\r\n/**\r\n * Hit test: checks if this point is inside the polygon.\r\n * @param {Array} xy the point [x, y]\r\n * @param {Array<number>} points polygon corner points \r\n * @param {boolean} [noneZeroMode=true] whether to use None Zero Mode \r\n * @returns {boolean}\r\n */\r\nexport const pointInPolygon = (xy, points, noneZeroMode = true) => {\r\n // Algorithm checks, if xy is in Polygon\r\n // algorithm based on\r\n // https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html/pnpoly.html\r\n // and https://www.cnblogs.com/guogangj/p/5127527.html\r\n const x = xy[0];\r\n const y = xy[1];\r\n \r\n let oddNodes = false;\r\n let zeroState = 0;\r\n\r\n for (let i=0, j=points.length-1; i < points.length; j=i++) {\r\n const xi = points[i][0], yi = points[i][1];\r\n const xj = points[j][0], yj = points[j][1];\r\n \r\n const intersect = ((yi > y) != (yj > y))\r\n && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\r\n \r\n if (intersect) {\r\n oddNodes = !oddNodes;\r\n\r\n if (yi > yj) {\r\n zeroState++;\r\n } else {\r\n zeroState--;\r\n }\r\n }\r\n }\r\n \r\n return noneZeroMode ? zeroState != 0 : oddNodes;\r\n}\r\n\r\n/**\r\n * Checks if polygon A is contained fully inside polygon B.\r\n * @param {Array<Array<number>>} polygonA array of points [x, y] \r\n * @param {Array<Array<number>>} polygonB array of points [x, y]\r\n * @returns {boolean}\r\n */\r\nexport const polygonInPolygon = (polygonA, polygonB) => {\r\n for (let point of polygonA) {\r\n if (!pointInPolygon(point, polygonB)) \r\n return false\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/** \r\n * Hit test: checks if this point is inside the line.\r\n * @param {Array} xy the point [x, y]\r\n * @param number x1 line start x\r\n * @param number y1 line start y\r\n * @param number x2 line end x\r\n * @param number y2 line end y\r\n * @param number buffer around the line\r\n * @returns {boolean}\r\n */\r\nexport const pointInLine = (xy, x1, y1, x2, y2, buffer) => {\r\n const x = xy[0];\r\n const y = xy[1];\r\n\r\n const dx = x2 - x1;\r\n const dy = y2 - y1;\r\n const d = Math.sqrt(dx * dx + dy * dy);\r\n const cross = Math.abs((x - x1) * dy - (y - y1) * dx);\r\n const dist = cross / d;\r\n\r\n return dist <= buffer;\r\n}\r\n\r\n/**\r\n * A utility helper that parses an SVG path into \r\n * a list of polygons.\r\n * @param {SVGElement} path the SVG path\r\n * @returns {Array<Array<Array<number>>>} list of polygons \r\n */\r\nexport const svgPathToPolygons = path => {\r\n const commands = path.getAttribute('d')\r\n .split(/(?=M|m|L|l|H|h|V|v|Z|z)/g)\r\n .map(str => str.trim());\r\n\r\n const polygons = [];\r\n\r\n let points = [];\r\n\r\n for (let cmd of commands) {\r\n const op = cmd.substring(0, 1);\r\n\r\n if (op.toLowerCase() === 'z') {\r\n polygons.push([...points]);\r\n points = [];\r\n } else {\r\n const xy = cmd.substring(1).split(' ')\r\n .map(str => parseFloat(str.trim()));\r\n \r\n // Uppercase ops are absolute coords -> transform\r\n const isUppercase = op === op.toUpperCase();\r\n\r\n const x = isUppercase ? xy[0] : xy[0] + points[points.length - 1][0];\r\n const y = isUppercase ? xy[1] : xy[1] + points[points.length - 1][1];\r\n\r\n points.push([x, y]);\r\n }\r\n }\r\n\r\n if (points.length > 0) // Unclosed path - close for area computation\r\n polygons.push([...points]); \r\n\r\n return polygons;\r\n}","import { SVG_NAMESPACE } from '../util/SVG';\r\nimport { polygonArea, polygonInPolygon, svgPathToPolygons } from '../util/Geom2D';\r\n\r\n/** Helper that forces an un-namespaced node to SVG **/\r\nconst insertSVGNamespace = originalDoc => {\r\n // Serialize and parse for the namespace to take effect on every node\r\n const serializer = new XMLSerializer();\r\n const str = serializer.serializeToString(originalDoc.documentElement);\r\n\r\n // Doesn't seem that there's a clean cross-browser way for this...\r\n const namespaced = str.replace('<svg>', `<svg xmlns=\"${SVG_NAMESPACE}\">`);\r\n\r\n const parser = new DOMParser();\r\n const namespacedDoc = parser.parseFromString(namespaced, \"image/svg+xml\");\r\n return namespacedDoc.documentElement;\r\n}\r\n\r\nconst sanitize = doc => {\r\n // Cf. https://github.com/mattkrick/sanitize-svg#readme \r\n // for the basic approach\r\n const cleanEl = el => {\r\n Array.from(el.attributes).forEach(attr => {\r\n if (attr.name.startsWith('on'))\r\n el.removeAttribute(attr.name)\r\n });\r\n }\r\n\r\n // Remove script tags\r\n const scripts = doc.getElementsByTagName('script');\r\n Array.from(scripts).reverse().forEach(el =>\r\n el.parentNode.removeChild(el));\r\n\r\n // Remove on... attributes\r\n cleanEl(doc);\r\n Array.from(doc.querySelectorAll('*')).forEach(cleanEl);\r\n\r\n return doc;\r\n}\r\n\r\nexport const svgFragmentToShape = annotation => {\r\n const selector = annotation.selector('SvgSelector');\r\n if (selector) {\r\n const parser = new DOMParser();\r\n\r\n // Parse the XML document, assuming SVG\r\n const { value } = selector;\r\n const doc = parser.parseFromString(value, \"image/svg+xml\");\r\n\r\n // SVG needs a namespace declaration - check if it's set or insert if not\r\n const isPrefixDeclared = doc.lookupPrefix(SVG_NAMESPACE); // SVG declared via prefix\r\n const isDefaultNamespaceSVG = doc.lookupNamespaceURI(null); // SVG declared as default namespace\r\n\r\n if (isPrefixDeclared || isDefaultNamespaceSVG) {\r\n return sanitize(doc).firstChild;\r\n } else {\r\n return sanitize(insertSVGNamespace(doc)).firstChild;\r\n }\r\n }\r\n}\r\n\r\nexport const drawEmbeddedSVG = annotation => {\r\n const shape = svgFragmentToShape(annotation);\r\n\r\n // Because we're nitpicky, we don't just draw the shape,\r\n // but duplicate it, so we can have inner and an outer lines\r\n const g = document.createElementNS(SVG_NAMESPACE, 'g');\r\n\r\n const inner = shape.cloneNode(true);\r\n inner.setAttribute('class', 'a9s-inner');\r\n\r\n const outer = shape.cloneNode(true);\r\n outer.setAttribute('class', 'a9s-outer');\r\n\r\n g.appendChild(outer);\r\n g.appendChild(inner);\r\n\r\n return g;\r\n}\r\n\r\nexport const toSVGTarget = (shape, image) => {\r\n const inner = shape.querySelector('.a9s-inner').cloneNode(true);\r\n inner.removeAttribute('class');\r\n inner.removeAttribute('xmlns');\r\n\r\n let serialized = inner.outerHTML || new XMLSerializer().serializeToString(inner);\r\n serialized = serialized.replace(` xmlns=\"${SVG_NAMESPACE}\"`, '');\r\n\r\n return {\r\n source: image?.src,\r\n selector: {\r\n type: \"SvgSelector\",\r\n value: `<svg>${serialized}</svg>`\r\n }\r\n }\r\n}\r\n\r\nexport const svgArea = annotation => {\r\n const shape = svgFragmentToShape(annotation);\r\n const nodeName = shape.nodeName.toLowerCase();\r\n\r\n if (nodeName === 'polygon') \r\n return svgPolygonArea(shape);\r\n else if (nodeName === 'circle')\r\n return svgCircleArea(shape);\r\n else if (nodeName === 'ellipse')\r\n return svgEllipseArea(shape);\r\n else if (nodeName == 'path')\r\n return svgPathArea(shape);\r\n else if (nodeName == 'line')\r\n return 0;\r\n else\r\n throw `Unsupported SVG shape type: ${nodeName}`;\r\n}\r\n\r\nconst svgPolygonArea = polygon => {\r\n const points = polygon.getAttribute('points')\r\n .trim()\r\n .split(' ') // Split x/y tuples\r\n .map(xy => xy.split(',').map(str => parseFloat(str.trim())));\r\n\r\n return polygonArea(points)\r\n}\r\n\r\nconst svgCircleArea = circle => {\r\n const r = circle.getAttribute('r');\r\n return r * r * Math.PI;\r\n}\r\n\r\nconst svgEllipseArea = ellipse => {\r\n const rx = ellipse.getAttribute('rx');\r\n const ry = ellipse.getAttribute('ry');\r\n return rx * ry * Math.PI;\r\n}\r\n\r\nconst svgPathArea = path => {\r\n const polygons = svgPathToPolygons(path);\r\n\r\n if (polygons.length == 1) {\r\n return polygonArea(polygons[0]);\r\n } else {\r\n // Helper to check if a polygon is a hole\r\n const isHole = p => polygons.find(other => {\r\n if (p !== other)\r\n return polygonInPolygon(p, other); \r\n })\r\n\r\n let area = 0\r\n\r\n for (let poly of polygons) {\r\n if (isHole(poly))\r\n area -= polygonArea(poly);\r\n else \r\n area += polygonArea(poly);\r\n }\r\n\r\n return area;\r\n }\r\n}","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import { drawRect, rectArea } from './RectFragment';\r\nimport { drawEmbeddedSVG, svgArea } from './EmbeddedSVG';\r\n\r\n// Drawing functions per selector type\r\nconst drawFn = {\r\n 'FragmentSelector': drawRect,\r\n 'SvgSelector': drawEmbeddedSVG\r\n};\r\n\r\n// Area computation functions per selector type\r\nconst areaFn = {\r\n 'FragmentSelector': rectArea,\r\n 'SvgSelector': svgArea\r\n}\r\n\r\n// Helper to get the first selector from an annotation\r\nconst getFirstSelector = annotation => {\r\n const firstTarget = annotation.targets[0];\r\n if (firstTarget)\r\n return Array.isArray(firstTarget.selector) ? firstTarget.selector[0] : firstTarget.selector;\r\n}\r\n\r\n/** \r\n * Evaluates the annotation target and picks the right drawing functions. \r\n * \r\n * We currently support the following selectors\r\n * - MediaFragment\r\n * - SVG (with embedded SVG shape)\r\n */\r\nexport const drawShape = (annotation, image) =>\r\n drawFn[getFirstSelector(annotation).type](annotation, image);\r\n\r\nexport const shapeArea = (annotation, image) =>\r\n areaFn[getFirstSelector(annotation).type](annotation, image);\r\n\r\nexport { parseRectFragment } from './RectFragment';\r\n\r\nexport * from './EmbeddedSVG';\r\nexport * from './RectFragment';\r\n\r\n\r\n","export default /^(?:[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;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import { v4 as uuid } from 'uuid';\nimport equals from 'fast-deep-equal';\n\nexport default class WebAnnotation {\n\n constructor(annotation, opts) {\n this.underlying = annotation;\n this.opts = opts;\n }\n\n /** For convenience - creates an empty web annotation **/\n static create = args => {\n const stub = {\n '@context': 'http://www.w3.org/ns/anno.jsonld',\n 'type': 'Annotation',\n 'id': `#${uuid()}`,\n 'body': []\n };\n\n return new WebAnnotation({ ...stub, ...args });\n }\n\n /** Creates a copy of this annotation **/\n clone = (opt_props, opt_opts) => {\n return new WebAnnotation({ ...this.underlying, ...opt_props}, { ...this.opts, ...opt_opts });\n }\n\n /** An equality check based on the underlying object **/\n isEqual(other) {\n if (other?.type !== 'Annotation') {\n return false;\n } else if (this.underlying === other.underlying) {\n return true;\n } else if (!this.underlying.id || !other.underlying.id) {\n return false;\n } else {\n return equals(this.underlying, other.underlying);\n }\n }\n\n get readOnly() {\n return this.opts?.readOnly;\n }\n\n /*************************************/\n /* Getters to forward properties of */\n /* the underlying annotation */\n /*************************************/\n\n get id() {\n return this.underlying.id;\n }\n\n get context() {\n return this.underlying['@context'];\n }\n\n get type() {\n return this.underlying.type;\n }\n\n get motivation() {\n return this.underlying.motivation;\n }\n\n get body() {\n return this.underlying.body;\n }\n\n get target() {\n return this.underlying.target;\n }\n\n /** Same as .body, but guaranteed to return an array **/\n get bodies() {\n return (Array.isArray(this.underlying.body)) ?\n this.underlying.body : [ this.underlying.body ];\n }\n\n /** Only bodies are meant to be mutated by the application **/\n set bodies(bodies) {\n this.underlying.body = bodies;\n }\n\n /** Same as .target, but guaranteed to return an array **/\n get targets() {\n return (Array.isArray(this.underlying.target)) ?\n this.underlying.target : [ this.underlying.target ];\n }\n\n /*****************************************/\n /* Various access helpers and shorthands */\n /*****************************************/\n\n /** Selector of the given type **/\n selector = type => {\n const { target } = this.underlying;\n\n if (target.selector) {\n // Normalize to array\n const selectors = Array.isArray(target.selector) ?\n target.selector : [ target.selector ];\n\n return selectors.find(s => s.type === type);\n }\n }\n\n /** Shorthand for the 'exact' field of the TextQuoteSelector **/\n get quote() {\n return this.selector('TextQuoteSelector')?.exact;\n }\n\n /** Shorthand for the 'start' field of the TextPositionSelector **/\n get start() {\n return this.selector('TextPositionSelector')?.start;\n }\n\n /** Shorthand for the 'end' field of the TextPositionSelector **/\n get end() {\n return this.selector('TextPositionSelector')?.end;\n }\n\n}\n","import WebAnnotation from './WebAnnotation';\nimport { v4 as uuid } from 'uuid';\nimport equals from 'fast-deep-equal';\n\n/**\n * An \"annotation in draft mode\". Really the same\n * data structure, but as a separate class so we can\n * tell things apart properly.\n */\nexport default class Selection {\n\n constructor(target, body) {\n this.underlying = {\n '@context': 'http://www.w3.org/ns/anno.jsonld',\n type: 'Selection',\n body: body || [],\n target\n }\n }\n\n /** Creates a copy of this selection **/\n clone = opt_props => {\n // Deep-clone\n const cloned = new Selection();\n cloned.underlying = JSON.parse(JSON.stringify(this.underlying));\n\n if (opt_props)\n cloned.underlying = { ...cloned.underlying, ...opt_props };\n\n return cloned;\n }\n\n get context() {\n return this.underlying['@context'];\n }\n\n get type() {\n return this.underlying.type;\n }\n\n get body() {\n return this.underlying.body;\n }\n\n get target() {\n return this.underlying.target;\n }\n\n get targets() {\n return (Array.isArray(this.underlying.target)) ?\n this.underlying.target : [ this.underlying.target ];\n }\n\n /** For consistency with WebAnnotation **/\n isEqual(other) {\n if (!other) {\n return false;\n } else {\n return equals(this.underlying, other.underlying);\n }\n }\n\n get bodies() {\n return (Array.isArray(this.underlying.body)) ?\n this.underlying.body : [ this.underlying.body ];\n }\n\n selector = type => {\n const { target } = this.underlying;\n\n if (target.selector) {\n // Normalize to array\n const selectors = Array.isArray(target.selector) ?\n target.selector : [ target.selector ];\n\n return selectors.find(s => s.type === type);\n }\n }\n\n /** Shorthand for the 'exact' field of the TextQuoteSelector **/\n get quote() {\n return this.selector('TextQuoteSelector')?.exact;\n }\n\n /*******************************************/\n /* Selection-specific properties & methods */\n /*******************************************/\n\n get isSelection() {\n return true;\n }\n\n toAnnotation = () => {\n const a = Object.assign({}, this.underlying, {\n 'type': 'Annotation',\n 'id': `#${uuid()}`\n });\n\n return new WebAnnotation(a);\n }\n\n}\n","import { Selection } from '@recogito/recogito-client-core';\r\nimport { SVG_NAMESPACE } from '../../util/SVG';\r\nimport {\r\n drawRect,\r\n drawRectMask,\r\n setRectSize,\r\n setRectMaskSize,\r\n toRectFragment\r\n} from '../../selectors/RectFragment';\r\n\r\n/**\r\n * A 'rubberband' selection tool for creating a rectangle by\r\n * clicking and dragging.\r\n */\r\nexport default class RubberbandRect {\r\n\r\n constructor(anchorX, anchorY, g, config, env) {\r\n this.anchor = [anchorX, anchorY];\r\n this.opposite = [anchorX, anchorY];\r\n\r\n this.config = config;\r\n this.env = env;\r\n\r\n this.group = document.createElementNS(SVG_NAMESPACE, 'g');\r\n\r\n this.mask = drawRectMask(env.image, anchorX, anchorY, 2, 2);\r\n this.mask.setAttribute('class', 'a9s-selection-mask');\r\n\r\n this.rect = drawRect(anchorX, anchorY, 2, 2);\r\n this.rect.setAttribute('class', 'a9s-selection');\r\n\r\n // We make the selection transparent to \r\n // pointer events because it would interfere with the \r\n // rendered annotations' mouseleave/enter events\r\n this.group.style.pointerEvents = 'none';\r\n\r\n // Additionally, selection remains hidden until \r\n // the user actually moves the mouse\r\n this.group.style.display = 'none';\r\n\r\n this.group.appendChild(this.mask);\r\n this.group.appendChild(this.rect);\r\n\r\n g.appendChild(this.group);\r\n }\r\n\r\n get bbox() {\r\n const w = this.opposite[0] - this.anchor[0];\r\n const h = this.opposite[1] - this.anchor[1];\r\n\r\n return {\r\n x: w > 0 ? this.anchor[0] : this.opposite[0],\r\n y: h > 0 ? this.anchor[1] : this.opposite[1],\r\n w: Math.max(1, Math.abs(w)), // Negative values\r\n h: Math.max(1, Math.abs(h))\r\n };\r\n }\r\n\r\n get element() {\r\n return this.rect;\r\n }\r\n\r\n dragTo = (oppositeX, oppositeY) => {\r\n // Make visible\r\n this.group.style.display = null;\r\n\r\n this.opposite = [oppositeX, oppositeY];\r\n const { x, y, w, h } = this.bbox;\r\n\r\n setRectMaskSize(this.mask, this.env.image, x, y, w, h);\r\n setRectSize(this.rect, x, y, w, h);\r\n }\r\n\r\n getBoundingClientRect = () =>\r\n this.rect.getBoundingClientRect();\r\n\r\n toSelection = () => {\r\n const { x, y, w, h } = this.bbox;\r\n return new Selection(toRectFragment(x, y, w, h, this.env.image, this.config.fragmentUnit));\r\n }\r\n\r\n destroy = () => {\r\n this.group.parentNode.removeChild(this.group);\r\n\r\n this.mask = null;\r\n this.rect = null;\r\n this.group = null;\r\n }\r\n\r\n}","const SIM_EVENTS = {\r\n touchstart: 'mousedown',\r\n touchmove: 'mousemove',\r\n touchend: 'mouseup'\r\n}\r\n\r\nexport const isTouchDevice = () =>\r\n 'ontouchstart' in window ||\r\n navigator.maxTouchPoints > 0 ||\r\n navigator.msMaxTouchPoints > 0;\r\n\r\nexport const enableTouchTranslation = el => {\r\n\r\n let pressAndHoldTrigger = null;\r\n\r\n const simulateEvent = (type, e) => new MouseEvent(type, {\r\n screenX: e.screenX,\r\n screenY: e.screenY,\r\n clientX: e.clientX,\r\n clientY: e.clientY,\r\n pageX: e.pageX,\r\n pageY: e.pageY,\r\n bubbles: true\r\n });\r\n\r\n const touchHandler = evt => {\r\n const touch = evt.changedTouches[0];\r\n const simulatedEvent = simulateEvent(SIM_EVENTS[evt.type], touch);\r\n\r\n touch.target.dispatchEvent(simulatedEvent);\r\n evt.preventDefault();\r\n\r\n if (evt.type === 'touchstart' || evt.type === 'touchmove') {\r\n pressAndHoldTrigger && clearTimeout(pressAndHoldTrigger);\r\n\r\n pressAndHoldTrigger = setTimeout(() => {\r\n const simulatedEvent = simulateEvent('dblclick', touch);\r\n touch.target.dispatchEvent(simulatedEvent);\r\n }, 800);\r\n }\r\n\r\n if (evt.type === 'touchend')\r\n pressAndHoldTrigger && clearTimeout(pressAndHoldTrigger);\r\n }\r\n\r\n el.addEventListener('touchstart', touchHandler, true);\r\n el.addEventListener('touchmove', touchHandler, true);\r\n el.addEventListener('touchend', touchHandler, true);\r\n el.addEventListener('touchcancel', touchHandler, true);\r\n\r\n}","import EventEmitter from 'tiny-emitter';\r\nimport { isTouchDevice } from '../util/Touch';\r\nimport { SVG_NAMESPACE } from '../util/SVG';\r\n\r\nconst IMPLEMENTATION_MISSING = \"An implementation is missing\";\r\n\r\nconst isTouch = isTouchDevice();\r\n\r\n/**\r\n * A commmon base class for Tools and EditableShapes\r\n */\r\nexport class ToolLike extends EventEmitter {\r\n\r\n constructor(g, config, env) {\r\n super();\r\n\r\n this.svg = g.closest('svg');\r\n\r\n this.g = g;\r\n this.config = config;\r\n this.env = env;\r\n\r\n // Default image scale\r\n this.scale = 1;\r\n\r\n // Bit of a hack. If we are dealing with a 'real' image, we enable\r\n // reponsive mode. OpenSeadragon handles scaling in a different way,\r\n // so we don't need responsive mode.\r\n const { image } = env;\r\n if (image instanceof Element || image instanceof HTMLDocument)\r\n this.enableResponsive();\r\n }\r\n\r\n /**\r\n * Implementations MAY extend this (calling super),\r\n * to destroy SVG elements, mask, etc.\r\n */\r\n destroy() {\r\n if (this.resizeObserver)\r\n this.resizeObserver.disconnect();\r\n\r\n this.resizeObserver = null;\r\n }\r\n\r\n enableResponsive = () => {\r\n if (window.ResizeObserver) {\r\n this.resizeObserver = new ResizeObserver(() => {\r\n const svgBounds = this.svg.getBoundingClientRect();\r\n const { width, height } = this.svg.viewBox.baseVal;\r\n\r\n this.scale = Math.max(\r\n width / svgBounds.width,\r\n height / svgBounds.height\r\n );\r\n\r\n if (this.onScaleChanged)\r\n this.onScaleChanged(this.scale);\r\n });\r\n\r\n this.resizeObserver.observe(this.svg.parentNode);\r\n }\r\n }\r\n\r\n getSVGPoint = evt => {\r\n const pt = this.svg.createSVGPoint();\r\n\r\n if (isTouch) {\r\n const bbox = this.svg.getBoundingClientRect();\r\n\r\n const x = evt.clientX - bbox.x;\r\n const y = evt.clientY - bbox.y;\r\n\r\n const { left, top } = this.svg.getBoundingClientRect();\r\n pt.x = x + left;\r\n pt.y = y + top;\r\n\r\n return pt.matrixTransform(this.g.getScreenCTM().inverse());\r\n } else {\r\n pt.x = evt.offsetX;\r\n pt.y = evt.offsetY;\r\n\r\n return pt.matrixTransform(this.g.getCTM().inverse());\r\n }\r\n }\r\n\r\n /*********************************/\r\n /* Helpers for drawing handles */\r\n /*********************************/\r\n\r\n drawHandle = (x, y) => {\r\n const containerGroup = document.createElementNS(SVG_NAMESPACE, 'g');\r\n containerGroup.setAttribute('class', 'a9s-handle');\r\n\r\n const group = document.createElementNS(SVG_NAMESPACE, 'g');\r\n\r\n const drawCircle = r => {\r\n const c = document.createElementNS(SVG_NAMESPACE, 'circle');\r\n c.setAttribute('cx', x);\r\n c.setAttribute('cy', y);\r\n c.setAttribute('r', r);\r\n c.setAttribute('transform-origin', `${x} ${y}`);\r\n return c;\r\n }\r\n\r\n const radius = this.config.handleRadius || 6;\r\n\r\n const inner = drawCircle(radius);\r\n inner.setAttribute('class', 'a9s-handle-inner')\r\n\r\n const outer = drawCircle(radius + 1);\r\n outer.setAttribute('class', 'a9s-handle-outer')\r\n\r\n group.appendChild(outer);\r\n group.appendChild(inner);\r\n\r\n containerGroup.appendChild(group);\r\n return containerGroup;\r\n }\r\n\r\n setHandleXY = (handle, x, y) => {\r\n const inner = handle.querySelector('.a9s-handle-inner');\r\n inner.setAttribute('cx', x);\r\n inner.setAttribute('cy', y);\r\n inner.setAttribute('transform-origin', `${x} ${y}`);\r\n\r\n const outer = handle.querySelector('.a9s-handle-outer');\r\n outer.setAttribute('cx', x);\r\n outer.setAttribute('cy', y);\r\n outer.setAttribute('transform-origin', `${x} ${y}`);\r\n }\r\n\r\n getHandleXY = handle => {\r\n const outer = handle.querySelector('.a9s-handle-outer');\r\n return {\r\n x: parseFloat(outer.getAttribute('cx')),\r\n y: parseFloat(outer.getAttribute('cy'))\r\n }\r\n }\r\n\r\n scaleHandle = handle => {\r\n const inner = handle.querySelector('.a9s-handle-inner');\r\n const outer = handle.querySelector('.a9s-handle-outer');\r\n\r\n const radius = this.scale * (this.config.handleRadius || 6);\r\n\r\n inner.setAttribute('r', radius);\r\n outer.setAttribute('r', radius);\r\n }\r\n\r\n}\r\n\r\n/**\r\n * Base class that adds some convenience stuff for tool plugins.\r\n */\r\nexport default class Tool extends ToolLike {\r\n _eventTarget\r\n\r\n constructor(g, config, env) {\r\n super(g, config, env);\r\n\r\n // We'll keep a flag set to false until\r\n // the user has started moving, so we can\r\n // fire the startSelection event\r\n this.started = false;\r\n this._eventTarget = this.config.bindEventListenersInternally === true ? this.svg : document;\r\n }\r\n\r\n attachListeners = ({ mouseMove, mouseUp, mouseDown, dblClick }) => {\r\n // Handle SVG conversion on behalf of tool implementations\r\n if (mouseMove) {\r\n this.mouseMove = evt => {\r\n const { x , y } = this.getSVGPoint(evt);\r\n\r\n if (!this.started) {\r\n this.emit('startSelection', { x, y });\r\n this.started = true;\r\n }\r\n\r\n mouseMove(x, y, evt);\r\n }\r\n\r\n // Mouse move goes on SVG element\r\n this.svg.addEventListener('mousemove', this.mouseMove);\r\n }\r\n\r\n if (mouseUp) {\r\n this.mouseUp = evt => {\r\n if (evt.button !== 0) return; // left click\r\n const { x , y } = this.getSVGPoint(evt);\r\n mouseUp(x, y, evt);\r\n }\r\n\r\n // Mouse up goes on doc, so we capture events outside, too\r\n this._eventTarget.addEventListener('mouseup', this.mouseUp);\r\n }\r\n\r\n if (mouseDown) {\r\n this.mouseDown = evt => {\r\n if (evt.button !== 0) return; // left click\r\n const { x , y } = this.getSVGPoint(evt);\r\n mouseDown(x, y, evt);\r\n }\r\n\r\n // Mouse down goes on doc, so we capture events outside, too\r\n this._eventTarget.addEventListener('mousedown', this.mouseDown);\r\n }\r\n\r\n if (dblClick) {\r\n this.dblClick = evt => {\r\n const { x , y } = this.getSVGPoint(evt);\r\n dblClick(x, y, evt);\r\n }\r\n\r\n this._eventTarget.addEventListener('dblclick', this.dblClick);\r\n }\r\n\r\n }\r\n\r\n detachListeners = () => {\r\n if (this.mouseMove)\r\n this.svg.removeEventListener('mousemove', this.mouseMove);\r\n\r\n if (this.mouseUp)\r\n this._eventTarget.removeEventListener('mouseup', this.mouseUp);\r\n\r\n if (this.mouseDown)\r\n this._eventTarget.removeEventListener('mousedown', this.mouseDown);\r\n\r\n if (this.dblClick)\r\n this._eventTarget.removeEventListener('dblclick', this.dblClick);\r\n }\r\n\r\n /**\r\n * If startOnSingleClick is true, the tool starts on single click\r\n * as well as drag. If false, starting strictly requires drag!\r\n */\r\n start = (evt, startOnSingleClick) => {\r\n // Handle SVG conversion on behalf of tool implementations\r\n const { x, y } = this.getSVGPoint(evt);\r\n \r\n // Constrain the initial coordinates (x, y) to be within the image bounds\r\n const { naturalWidth, naturalHeight } = this.env.image;\r\n const startX = x < 0 ? 0 : (x > naturalWidth ? naturalWidth : x);\r\n const startY = y < 0 ? 0 : (y > naturalHeight ? naturalHeight : y);\r\n \r\n this.startDrawing(startX, startY, startOnSingleClick, evt);\r\n }\r\n\r\n /**\r\n * Tool implementations MUST override these\r\n */\r\n\r\n get isDrawing() {\r\n throw new Error(IMPLEMENTATION_MISSING);\r\n }\r\n\r\n startDrawing = evt => {\r\n throw new Error(IMPLEMENTATION_MISSING);\r\n }\r\n\r\n createEditableShape = (annotation, formatters) => {\r\n throw new Error(IMPLEMENTATION_MISSING);\r\n }\r\n\r\n}\r\n\r\n// In addition, Tool implementations need to implement the following static methods\r\n\r\n// Tool.identifier = '...'\r\n\r\nTool.supports = annotation => {\r\n throw new Error(IMPLEMENTATION_MISSING);\r\n}\r\n\r\n// Just some convenience shortcuts to client-core, for quicker\r\n// importing in plugins. (In a way, the intention is to make the\r\n// Tool class serve as a kind of mini-SDK).\r\nexport { default as Selection } from '@recogito/recogito-client-core/src/Selection';\r\nexport { default as WebAnnotation } from '@recogito/recogito-client-core/src/WebAnnotation';\r\n","import { ToolLike } from './Tool';\r\n\r\nconst IMPLEMENTATION_MISSING = \"An implementation is missing\";\r\n\r\nexport default class EditableShape extends ToolLike {\r\n\r\n constructor(annotation, g, config, env) {\r\n super(g, config, env);\r\n\r\n this.annotation = annotation;\r\n }\r\n \r\n /**\r\n * Implementations MUST override this method!\r\n * \r\n * Must return the 'g' element with the a9s-annotation class.\r\n */\r\n get element() {\r\n throw new Error(IMPLEMENTATION_MISSING);\r\n }\r\n\r\n /**\r\n * Implementations MUST override this method!\r\n * \r\n * The annotation argument MUST be used to update\r\n * the current state of the shape. It MUST NOT\r\n * be stored as 'this.annotation'! 'this.annotation'\r\n * MUST remain the original annotation at the time\r\n * this EditableShape was created, because we will\r\n * need it again in case the user cancels editing.\r\n * \r\n * Thinking of it in React terms, 'this.annotation'\r\n * has the same purpose as props.annotation, whereas\r\n * this method affects state.\r\n */\r\n updateState = annotation => {\r\n throw new Error(IMPLEMENTATION_MISSING);\r\n }\r\n\r\n}\r\n","import { addClass, SVG_NAMESPACE } from './SVG';\r\n\r\nconst isFirefox = /firefox/i.test(navigator.userAgent);\r\n\r\nconst formatSvgEl = (svgEl, x, y, w, h) => {\r\n svgEl.setAttribute('width', w);\r\n svgEl.setAttribute('height', h);\r\n\r\n // Argh - Firefox produces broken SVG bounds for nested SVG\r\n if (isFirefox) {\r\n svgEl.setAttribute('x', 0);\r\n svgEl.setAttribute('y', 0);\r\n svgEl.setAttribute('transform', `translate(${x}, ${y})`); \r\n } else {\r\n svgEl.setAttribute('x', x);\r\n svgEl.setAttribute('y', y);\r\n }\r\n}\r\n\r\nconst appendFormatterEl = (formatterEl, shape) => {\r\n const inner = shape.querySelector('.a9s-inner');\r\n const targetBox = inner || shape;\r\n const { x, y, width, height } = targetBox.getBBox();\r\n\r\n const svgEl = document.createElementNS(SVG_NAMESPACE, 'svg');\r\n svgEl.setAttribute('class', 'a9s-formatter-el');\r\n\r\n formatSvgEl(svgEl, x, y, width, height);\r\n\r\n const g = document.createElementNS(SVG_NAMESPACE, 'g');\r\n g.appendChild(formatterEl);y\r\n\r\n svgEl.appendChild(g);\r\n \r\n shape.append(svgEl);\r\n}\r\n\r\n/**\r\n * A formatter is a user-defined function that takes an annotation as input,\r\n * and returns either a string, or an object. If a string is returned, this\r\n * will be appended to the annotation element CSS class list. Otherwise, the\r\n * object can have the following properties: \r\n * \r\n * - 'className' added to the CSS class list\r\n * - 'data-*' added as data attributes\r\n * - 'style' a list of CSS styles (in the form of a string) \r\n * - 'shapeStyle' a list of CSS styles for shape (in the form of a string) \r\n */\r\nexport const format = (shape, annotation, formatters) => {\r\n // The formatter can be undefined\r\n if (!formatters)\r\n return shape;\r\n\r\n // Merge outputs from all formatter functions into one object\r\n const format = formatters.reduce((merged, fn) => {\r\n const format = fn(annotation);\r\n\r\n if (!format)\r\n return merged;\r\n\r\n if (typeof format === 'string' || format instanceof String) {\r\n merged.className = merged.className ? `${merged.className} ${format}` : format; \r\n } else if (format.nodeType === Node.ELEMENT_NODE) {\r\n merged.elements = merged.elements ? [...merged.elements, format] : [format];\r\n } else {\r\n const { className, style, shapeStyle, element } = format;\r\n\r\n if (className)\r\n merged.className = merged.className ? `${merged.className} ${className}` : className;\r\n\r\n if (style)\r\n merged.style = merged.style ? `${merged.style} ${style}` : style;\r\n \r\n if (shapeStyle)\r\n merged.shapeStyle = merged.shapeStyle ? `${merged.shapeStyle} ${shapeStyle}` : shapeStyle;\r\n\r\n if (element)\r\n merged.elements = merged.elements ? [...merged.elements, element] : [element];\r\n }\r\n\r\n // Copy data attributes\r\n for (const key in format) {\r\n if (format.hasOwnProperty(key) && key.startsWith('data-')) {\r\n merged[key] = format[key];\r\n }\r\n }\r\n\r\n return merged;\r\n }, {});\r\n\r\n const { className, style, shapeStyle, elements } = format;\r\n\r\n if (className)\r\n addClass(shape, className);\r\n\r\n if (style) {\r\n const outer = shape.querySelector('.a9s-outer');\r\n const inner = shape.querySelector('.a9s-inner');\r\n\r\n if (outer && inner) {\r\n outer.setAttribute('style', 'display:none');\r\n inner.setAttribute('style', style);\r\n } else {\r\n shape.setAttribute('style', style);\r\n }\r\n }\r\n\r\n if (shapeStyle) {\r\n shape.setAttribute('style', shapeStyle);\r\n }\r\n\r\n if (elements)\r\n elements.forEach(el => appendFormatterEl(el, shape));\r\n\r\n for (const key in format) {\r\n if (format.hasOwnProperty(key) && key.startsWith('data-')) {\r\n shape.setAttribute(key, format[key]);\r\n }\r\n }\r\n}\r\n\r\nexport const setFormatterElSize = (group, x, y, w, h) => {\r\n const formatterEl = group.querySelector('.a9s-formatter-el');\r\n if (formatterEl)\r\n formatSvgEl(formatterEl, x, y, w, h);\r\n}","import EditableShape from '../EditableShape';\r\nimport { SVG_NAMESPACE } from '../../util/SVG';\r\nimport { format, setFormatterElSize } from '../../util/Formatting';\r\nimport {\r\n drawRect,\r\n drawRectMask,\r\n parseRectFragment,\r\n getRectSize,\r\n setRectSize,\r\n toRectFragment,\r\n setRectMaskSize\r\n} from '../../selectors/RectFragment';\r\n\r\nconst CORNER = 'corner';\r\nconst EDGE = 'edge';\r\n\r\n/**\r\n * An editable rectangle shape.\r\n */\r\nexport default class EditableRect extends EditableShape {\r\n\r\n constructor(annotation, g, config, env) {\r\n super(annotation, g, config, env);\r\n\r\n this.svg.addEventListener('mousemove', this.onMouseMove);\r\n this.svg.addEventListener('mouseup', this.onMouseUp);\r\n\r\n const { x, y, w, h } = parseRectFragment(annotation, env.image);\r\n\r\n // SVG markup for this class looks like this:\r\n //\r\n // <g>\r\n // <path class=\"a9s-selection mask\"... />\r\n // <g> <-- return this node as .element\r\n // <rect class=\"a9s-outer\" ... />\r\n // <rect class=\"a9s-inner\" ... />\r\n // <g class=\"a9s-handle\" ...> ... </g>\r\n // <g class=\"a9s-handle\" ...> ... </g>\r\n // <g class=\"a9s-handle\" ...> ... </g>\r\n // <g class=\"a9s-handle\" ...> ... </g>\r\n // </g>\r\n // </g>\r\n\r\n // 'g' for the editable rect compound shape\r\n this.containerGroup = document.createElementNS(SVG_NAMESPACE, 'g');\r\n\r\n this.mask = drawRectMask(env.image, x, y, w, h);\r\n this.mask.setAttribute('class', 'a9s-selection-mask');\r\n this.containerGroup.appendChild(this.mask);\r\n\r\n // The 'element' = rectangles + handles\r\n this.elementGroup = document.createElementNS(SVG_NAMESPACE, 'g');\r\n this.elementGroup.setAttribute('class', 'a9s-annotation editable selected');\r\n this.elementGroup.setAttribute('data-id', annotation.id);\r\n\r\n this.rectangle = drawRect(x, y, w, h);\r\n this.rectangle.querySelector('.a9s-inner')\r\n .addEventListener('mousedown', this.onGrab(this.rectangle));\r\n\r\n this.elementGroup.appendChild(this.rectangle);\r\n\r\n this.enableEdgeControls = config.enableEdgeControls;\r\n\r\n const edgeHandles = this.enableEdgeControls\r\n ? [\r\n [x + w / 2, y, EDGE],\r\n [x + w, y + h / 2, EDGE],\r\n [x + w / 2, y + h, EDGE],\r\n [x, y + h / 2, EDGE],\r\n ]\r\n : [];\r\n\r\n this.handles = [\r\n [x, y, CORNER],\r\n [x + w, y, CORNER],\r\n [x + w, y + h, CORNER],\r\n [x, y + h, CORNER],\r\n ...edgeHandles,\r\n ].map(t => {\r\n const [x, y, type] = t;\r\n const handle = this.drawHandle(x, y);\r\n\r\n handle.addEventListener('mousedown', this.onGrab(handle, type));\r\n this.elementGroup.appendChild(handle);\r\n\r\n return handle;\r\n });\r\n\r\n this.containerGroup.appendChild(this.elementGroup);\r\n\r\n g.appendChild(this.containerGroup);\r\n\r\n format(this.elementGroup, annotation, config.formatters);\r\n\r\n // The grabbed element (handle or entire group), if any\r\n this.grabbedElem = null;\r\n \r\n // Type of the grabbed element, either 'corner' or 'edge'\r\n this.grabbedType = null;\r\n\r\n // Mouse xy offset inside the shape, if mouse pressed\r\n this.mouseOffset = null;\r\n }\r\n\r\n onScaleChanged = () => \r\n this.handles.map(this.scaleHandle);\r\n\r\n setSize = (x, y, w, h) => {\r\n setRectSize(this.rectangle, x, y, w, h);\r\n setRectMaskSize(this.mask, this.env.image, x, y, w, h);\r\n setFormatterElSize(this.elementGroup, x, y, w, h);\r\n\r\n const [\r\n topleft,\r\n topright,\r\n bottomright,\r\n bottomleft,\r\n topEdge,\r\n rightEdge,\r\n bottomEdge,\r\n leftEdge\r\n ] = this.handles;\r\n\r\n this.setHandleXY(topleft, x, y);\r\n this.setHandleXY(topright, x + w, y);\r\n this.setHandleXY(bottomright, x + w, y + h);\r\n this.setHandleXY(bottomleft, x, y + h);\r\n\r\n if (this.enableEdgeControls) {\r\n this.setHandleXY(topEdge, x + w / 2, y);\r\n this.setHandleXY(rightEdge, x + w, y + h / 2);\r\n this.setHandleXY(bottomEdge, x + w / 2, y + h);\r\n this.setHandleXY(leftEdge, x, y + h / 2);\r\n }\r\n }\r\n\r\n stretchCorners = (draggedHandleIdx, anchorHandle, mousePos) => {\r\n const anchor = this.getHandleXY(anchorHandle);\r\n\r\n const width = mousePos.x - anchor.x;\r\n const height = mousePos.y - anchor.y;\r\n\r\n const x = width > 0 ? anchor.x : mousePos.x;\r\n const y = height > 0 ? anchor.y : mousePos.y;\r\n const w = Math.abs(width);\r\n const h = Math.abs(height);\r\n\r\n this.setSize(x, y, w, h);\r\n\r\n return { x, y, w, h };\r\n }\r\n\r\n stretchEdge = (handleIdx, oppositeHandle, mousePos) => {\r\n const anchor = this.getHandleXY(oppositeHandle);\r\n const currentRectDims = getRectSize(this.rectangle);\r\n const isHeightAdjustment = handleIdx % 2 === 0;\r\n\r\n const width = isHeightAdjustment ? currentRectDims.w : mousePos.x - anchor.x;\r\n const height = isHeightAdjustment ? mousePos.y - anchor.y : currentRectDims.h;\r\n\r\n const x = isHeightAdjustment ? currentRectDims.x : (width > 0 ? anchor.x : mousePos.x);\r\n const y = isHeightAdjustment ? (height > 0 ? anchor.y : mousePos.y) : currentRectDims.y;\r\n const w = Math.abs(width);\r\n const h = Math.abs(height);\r\n\r\n this.setSize(x, y, w, h);\r\n\r\n return { x, y, w, h };\r\n };\r\n\r\n onGrab = (grabbedElem, type) => evt => {\r\n if (evt.button !== 0) return; // left click\r\n this.grabbedElem = grabbedElem;\r\n this.grabbedType = type;\r\n const pos = this.getSVGPoint(evt);\r\n const { x, y } = getRectSize(this.rectangle);\r\n this.mouseOffset = { x: pos.x - x, y: pos.y - y };\r\n }\r\n\r\n onMouseMove = evt => {\r\n if (evt.button !== 0) return; // left click\r\n const constrain = (coord, max) =>\r\n coord < 0 ? 0 : (coord > max ? max : coord);\r\n\r\n const { naturalWidth, naturalHeight } = this.env.image;\r\n\r\n if (this.grabbedElem) {\r\n const pos = this.getSVGPoint(evt);\r\n\r\n if (this.grabbedElem === this.rectangle) {\r\n // x/y changes by mouse offset, w/h remains unchanged\r\n const { w, h } = getRectSize(this.rectangle);\r\n\r\n const x = constrain(pos.x - this.mouseOffset.x, naturalWidth - w);\r\n const y = constrain(pos.y - this.mouseOffset.y, naturalHeight - h);\r\n\r\n this.setSize(x, y, w, h);\r\n this.emit('update', toRectFragment(x, y, w, h, this.env.image, this.config.fragmentUnit));\r\n } else {\r\n // Mouse position replaces one of the corner coords, depending\r\n // on which handle is the grabbed element\r\n const handleIdx = this.handles.indexOf(this.grabbedElem);\r\n const oppositeHandle = this.handles[handleIdx ^ 2];\r\n\r\n const constrainMousePos = {\r\n x: Math.min(Math.max(pos.x, 0), naturalWidth),\r\n y: Math.min(Math.max(pos.y, 0), naturalHeight),\r\n };\r\n\r\n const { x, y, w, h } = \r\n this.grabbedType === CORNER\r\n ? this.stretchCorners(handleIdx, oppositeHandle, constrainMousePos)\r\n : this.stretchEdge(handleIdx, oppositeHandle, constrainMousePos);\r\n\r\n this.emit('update', toRectFragment(x, y, w, h, this.env.image, this.config.fragmentUnit));\r\n }\r\n }\r\n }\r\n\r\n onMouseUp = evt => {\r\n this.grabbedElem = null;\r\n this.grabbedType = null;\r\n this.mouseOffset = null;\r\n }\r\n\r\n get element() {\r\n return this.elementGroup;\r\n }\r\n\r\n updateState = annotation => {\r\n const { x, y, w, h } = parseRectFragment(annotation, this.env.image);\r\n this.setSize(x, y, w, h);\r\n }\r\n\r\n detachListeners = () => {\r\n this.svg.removeEventListener('mousemove', this.onMouseMove);\r\n this.svg.removeEventListener('mouseup', this.onMouseUp);\r\n }\r\n\r\n destroy() {\r\n this.detachListeners();\r\n this.containerGroup.parentNode.removeChild(this.containerGroup);\r\n super.destroy();\r\n }\r\n\r\n}\r\n","import RubberbandRect from './RubberbandRect';\r\nimport EditableRect from './EditableRect';\r\nimport Tool from '../Tool';\r\n\r\n/**\r\n * A rubberband selector for rectangle fragments.\r\n */\r\nexport default class RubberbandRectTool extends Tool {\r\n\r\n constructor(g, config, env) {\r\n // Most of the basics are handled in the Tool base class\r\n super(g, config, env);\r\n\r\n this.rubberband = null;\r\n this._startOnSingleClick = false;\r\n }\r\n\r\n startDrawing = (x, y, startOnSingleClick) => {\r\n this._startOnSingleClick = startOnSingleClick;\r\n\r\n this.attachListeners({\r\n mouseMove: this.onMouseMove,\r\n mouseUp: this.onMouseUp\r\n });\r\n\r\n this.rubberband = new RubberbandRect(x, y, this.g, this.config, this.env);\r\n }\r\n\r\n stop = () => {\r\n this.detachListeners();\r\n\r\n if (this.rubberband) {\r\n this.rubberband.destroy();\r\n this.rubberband = null;\r\n }\r\n }\r\n\r\n onMouseMove = (x, y) => {\r\n // Constrain the initial coordinates (x, y) to be within the image bounds\r\n const { naturalWidth, naturalHeight } = this.env.image;\r\n const constrainX = Math.min(Math.max(x, 0), naturalWidth);\r\n const constrainY = Math.min(Math.max(y, 0), naturalHeight);\r\n\r\n this.rubberband.dragTo(constrainX, constrainY);\r\n }\r\n \r\n onMouseUp = () => {\r\n this.started = false;\r\n\r\n const { width, height } = this.rubberband.getBoundingClientRect();\r\n\r\n const minWidth = this.config.minSelectionWidth || 4;\r\n const minHeight = this.config.minSelectionHeight || 4;\r\n\r\n if (width >= minWidth && height >= minHeight) {\r\n // Emit the SVG shape with selection attached \r\n const { element } = this.rubberband;\r\n element.annotation = this.rubberband.toSelection();\r\n\r\n // Emit the completed shape...\r\n this.emit('complete', element);\r\n this.stop();\r\n } else if (!this._startOnSingleClick) {\r\n this.emit('cancel');\r\n this.stop();\r\n }\r\n }\r\n\r\n get isDrawing() {\r\n return this.rubberband != null;\r\n }\r\n \r\n createEditableShape = (annotation, formatters) =>\r\n new EditableRect(annotation, this.g, {...this.config, formatters}, this.env);\r\n\r\n}\r\n\r\nRubberbandRectTool.identifier = 'rect';\r\n\r\nRubberbandRectTool.supports = annotation => {\r\n const fragmentSelector = annotation.selector('FragmentSelector');\r\n return fragmentSelector?.conformsTo.startsWith('http://www.w3.org/TR/media-frags');\r\n}","import { SVG_NAMESPACE } from '../../util/SVG';\r\n\r\nexport default class PolygonMask {\r\n\r\n constructor(imageDimensions, polygon) {\r\n this.w = imageDimensions.naturalWidth;\r\n this.h = imageDimensions.naturalHeight;\r\n\r\n this.polygon = polygon;\r\n\r\n this.mask = document.createElementNS(SVG_NAMESPACE, 'path');\r\n this.mask.setAttribute('fill-rule', 'evenodd'); \r\n this.mask.setAttribute('class', 'a9s-selection-mask');\r\n\r\n this.mask.setAttribute('d', `M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute('points')} z`);\r\n }\r\n\r\n redraw = () => {\r\n this.mask.setAttribute('d', `M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute('points')} z`);\r\n }\r\n\r\n get element() {\r\n return this.mask;\r\n }\r\n\r\n destroy = () =>\r\n this.mask.parentNode.removeChild(this.mask)\r\n\r\n}","import { Selection } from '@recogito/recogito-client-core';\r\nimport { toSVGTarget } from '../../selectors/EmbeddedSVG';\r\nimport { SVG_NAMESPACE } from '../../util/SVG';\r\nimport Mask from './PolygonMask';\r\n\r\nexport default class RubberbandPolygon {\r\n\r\n constructor(anchor, g, env) {\r\n this.points = [ anchor ];\r\n this.env = env;\r\n\r\n this.mousepos = anchor;\r\n\r\n this.group = document.createElementNS(SVG_NAMESPACE, 'g');\r\n \r\n this.polygon = document.createElementNS(SVG_NAMESPACE, 'g');\r\n this.polygon.setAttribute('class', 'a9s-selection');\r\n\r\n this.outer = document.createElementNS(SVG_NAMESPACE, 'polygon');\r\n this.outer.setAttribute('class', 'a9s-outer');\r\n\r\n this.inner = document.createElementNS(SVG_NAMESPACE, 'polygon');\r\n this.inner.setAttribute('class', 'a9s-inner');\r\n\r\n this.setPoints(this.points);\r\n\r\n this.mask = new Mask(env.image, this.inner);\r\n\r\n this.polygon.appendChild(this.outer);\r\n this.polygon.appendChild(this.inner);\r\n\r\n // Additionally, selection remains hidden until \r\n // the user actually moves the mouse\r\n this.group.style.display = 'none';\r\n\r\n this.group.appendChild(this.mask.element);\r\n this.group.appendChild(this.polygon);\r\n\r\n g.appendChild(this.group);\r\n }\r\n\r\n setPoints = points => {\r\n const attr = points.map(t => `${t[0]},${t[1]}`).join(' ');\r\n this.outer.setAttribute('points', attr);\r\n this.inner.setAttribute('points', attr);\r\n }\r\n\r\n getBoundingClientRect = () =>\r\n this.outer.getBoundingClientRect();\r\n\r\n dragTo = xy => {\r\n // Make visible\r\n this.group.style.display = null;\r\n\r\n this.mousepos = xy;\r\n\r\n const rubberband = [ ...this.points, xy ];\r\n \r\n this.setPoints(rubberband);\r\n this.mask.redraw();\r\n }\r\n\r\n addPoint = () => {\r\n // Don't add a new point if distance < 2 pixels\r\n const [x, y] = this.mousepos;\r\n const lastCorner = this.points[this.points.length - 1];\r\n const dist = Math.pow(x - lastCorner[0], 2) + Math.pow(y - lastCorner[1], 2);\r\n \r\n if (dist > 4) {\r\n this.points = [ ...this.points, this.mousepos];\r\n this.setPoints(this.points); \r\n this.mask.redraw();\r\n }\r\n }\r\n\r\n get element() {\r\n return this.polygon;\r\n }\r\n\r\n destroy = () => {\r\n this.group.parentNode.removeChild(this.group);\r\n this.polygon = null; \r\n this.group = null;\r\n }\r\n\r\n toSelection = () => {\r\n return new Selection(toSVGTarget(this.group, this.env.image));\r\n }\r\n\r\n}\r\n","import EditableShape from '../EditableShape';\r\nimport { drawEmbeddedSVG, svgFragmentToShape, toSVGTarget } from '../../selectors/EmbeddedSVG';\r\nimport { SVG_NAMESPACE } from '../../util/SVG';\r\nimport { format, setFormatterElSize } from '../../util/Formatting';\r\nimport Mask from './PolygonMask';\r\n\r\nconst getPoints = shape => {\r\n // Could just be Array.from(shape.querySelector('.inner').points) but...\r\n // IE11 :-(\r\n const pointList = shape.querySelector('.a9s-inner').points;\r\n const points = [];\r\n\r\n for (let i=0; i<pointList.numberOfItems; i++) {\r\n points.push(pointList.getItem(i));\r\n }\r\n\r\n return points;\r\n}\r\n\r\nconst getBBox = shape =>\r\n shape.querySelector('.a9s-inner').getBBox();\r\n\r\n/**\r\n * An editable polygon shape.\r\n */\r\nexport default class EditablePolygon extends EditableShape {\r\n\r\n constructor(annotation, g, config, env) {\r\n super(annotation, g, config, env);\r\n\r\n this.svg.addEventListener('mousemove', this.onMouseMove);\r\n this.svg.addEventListener('mouseup', this.onMouseUp);\r\n\r\n // SVG markup for this class looks like this:\r\n //\r\n // <g>\r\n // <path class=\"a9s-selection mask\"... />\r\n // <g> <-- return this node as .element\r\n // <polygon class=\"a9s-outer\" ... />\r\n // <polygon class=\"a9s-inner\" ... />\r\n // <g class=\"a9s-handle\" ...> ... </g>\r\n // <g class=\"a9s-handle\" ...> ... </g>\r\n // <g class=\"a9s-handle\" ...> ... </g>\r\n // ...\r\n // </g>\r\n // </g>\r\n\r\n // 'g' for the editable polygon compound shape\r\n this.containerGroup = document.createElementNS(SVG_NAMESPACE, 'g');\r\n\r\n this.shape = drawEmbeddedSVG(annotation);\r\n this.shape.querySelector('.a9s-inner')\r\n .addEventListener('mousedown', this.onGrab(this.shape));\r\n\r\n this.mask = new Mask(env.image, this.shape.querySelector('.a9s-inner'));\r\n\r\n this.containerGroup.appendChild(this.mask.element);\r\n\r\n this.elementGroup = document.createElementNS(SVG_NAMESPACE, 'g');\r\n this.elementGroup.setAttribute('class', 'a9s-annotation editable selected');\r\n this.elementGroup.setAttribute('data-id', annotation.id);\r\n this.elementGroup.appendChild(this.shape);\r\n\r\n this.handles = getPoints(this.shape).map(pt => {\r\n const handle = this.drawHandle(pt.x, pt.y);\r\n handle.addEventListener('mousedown', this.onGrab(handle));\r\n this.elementGroup.appendChild(handle);\r\n return handle;\r\n });\r\n\r\n this.containerGroup.appendChild(this.elementGroup);\r\n g.appendChild(this.containerGroup);\r\n\r\n format(this.elementGroup, annotation, config.formatters);\r\n\r\n // The grabbed element (handle or entire shape), if any\r\n this.grabbedElem = null;\r\n\r\n // Mouse grab point\r\n this.grabbedAt = null;\r\n }\r\n\r\n onScaleChanged = () => \r\n this.handles.map(this.scaleHandle);\r\n\r\n setPoints = (points) => {\r\n // Not using .toFixed(1) because that will ALWAYS\r\n // return one decimal, e.g. \"15.0\" (when we want \"15\")\r\n const round = num =>\r\n Math.round(10 * num) / 10;\r\n\r\n const str = points.map(pt => `${round(pt.x)},${round(pt.y)}`).join(' ');\r\n\r\n const inner = this.shape.querySelector('.a9s-inner');\r\n inner.setAttribute('points', str);\r\n\r\n const outer = this.shape.querySelector('.a9s-outer');\r\n outer.setAttribute('points', str);\r\n\r\n this.mask.redraw();\r\n\r\n const { x, y, width, height } = inner.getBBox();\r\n setFormatterElSize(this.elementGroup, x, y, width, height);\r\n }\r\n\r\n onGrab = grabbedElem => evt => {\r\n if (evt.button !== 0) return; // left click\r\n this.grabbedElem = grabbedElem;\r\n this.grabbedAt = this.getSVGPoint(evt);\r\n }\r\n\r\n onMouseMove = evt => {\r\n const constrain = (coord, delta, max) =>\r\n coord + delta < 0 ? -coord : (coord + delta > max ? max - coord : delta);\r\n\r\n if (this.grabbedElem) {\r\n const pos = this.getSVGPoint(evt);\r\n\r\n const { naturalWidth, naturalHeight } = this.env.image;\r\n\r\n if (this.grabbedElem === this.shape) {\r\n const { x, y, width, height } = getBBox(this.shape);\r\n\r\n const dx = constrain(x, pos.x - this.grabbedAt.x, naturalWidth - width);\r\n const dy = constrain(y, pos.y - this.grabbedAt.y, naturalHeight - height);\r\n\r\n const updatedPoints = getPoints(this.shape).map(pt =>\r\n ({ x: pt.x + dx, y: pt.y + dy }));\r\n\r\n this.grabbedAt = pos;\r\n\r\n this.setPoints(updatedPoints);\r\n updatedPoints.forEach((pt, idx) => this.setHandleXY(this.handles[idx], pt.x, pt.y));\r\n\r\n this.emit('update', toSVGTarget(this.shape, this.env.image));\r\n } else {\r\n const handleIdx = this.handles.indexOf(this.grabbedElem);\r\n\r\n const constrainMousePos = {\r\n x: Math.min(Math.max(pos.x, 0), naturalWidth),\r\n y: Math.min(Math.max(pos.y, 0), naturalHeight),\r\n };\r\n\r\n const updatedPoints = getPoints(this.shape).map((pt, idx) =>\r\n (idx === handleIdx) ? constrainMousePos : pt);\r\n\r\n this.setPoints(updatedPoints);\r\n this.setHandleXY(this.handles[handleIdx], constrainMousePos.x, constrainMousePos.y);\r\n\r\n this.emit('update', toSVGTarget(this.shape, this.env.image));\r\n }\r\n }\r\n }\r\n\r\n onMouseUp = evt => {\r\n this.grabbedElem = null;\r\n this.grabbedAt = null;\r\n }\r\n\r\n get element() {\r\n return this.elementGroup;\r\n }\r\n\r\n updateState = annotation => {\r\n const points = svgFragmentToShape(annotation)\r\n .getAttribute('points')\r\n .split(' ') // Split x/y tuples\r\n .map(xy => { \r\n const [ x, y ] = xy.split(',').map(str => parseFloat(str.trim()));\r\n return { x, y };\r\n });\r\n \r\n this.setPoints(points);\r\n points.forEach((pt, idx) => this.setHandleXY(this.handles[idx], pt.x, pt.y));\r\n }\r\n\r\n detachListeners = () => {\r\n this.svg.removeEventListener('mousemove', this.onMouseMove);\r\n this.svg.removeEventListener('mouseup', this.onMouseUp);\r\n }\r\n\r\n destroy = () => {\r\n this.detachListeners();\r\n this.containerGroup.parentNode.removeChild(this.containerGroup);\r\n super.destroy();\r\n }\r\n\r\n}\r\n","import RubberbandPolygon from './RubberbandPolygon';\r\nimport EditablePolygon from './EditablePolygon';\r\nimport Tool from '../Tool';\r\n\r\n/**\r\n * A rubberband selector for polygon fragments.\r\n */\r\nexport default class RubberbandPolygonTool extends Tool {\r\n\r\n constructor(g, config, env) {\r\n super(g, config, env);\r\n\r\n this._isDrawing = false;\r\n this._startOnSingleClick = false;\r\n }\r\n\r\n startDrawing = (x, y, startOnSingleClick) => {\r\n this._isDrawing = true;\r\n this._startOnSingleClick = startOnSingleClick;\r\n\r\n this.attachListeners({\r\n mouseMove: this.onMouseMove,\r\n [this.config.addPolygonPointOnMouseDown && startOnSingleClick ? \r\n 'mouseDown' : 'mouseUp']: this.onMouseUpDown,\r\n dblClick: this.onDblClick\r\n });\r\n \r\n this.rubberband = new RubberbandPolygon([ x, y ], this.g, this.env);\r\n }\r\n\r\n stop = () => {\r\n this.detachListeners();\r\n \r\n this._isDrawing = false;\r\n\r\n if (this.rubberband) {\r\n this.rubberband.destroy();\r\n this.rubberband = null;\r\n }\r\n }\r\n\r\n onMouseMove = (x, y) => {\r\n // Constrain the initial coordinates (x, y) to be within the image bounds\r\n const { naturalWidth, naturalHeight } = this.env.image;\r\n const constrainX = Math.min(Math.max(x, 0), naturalWidth);\r\n const constrainY = Math.min(Math.max(y, 0), naturalHeight);\r\n\r\n this.rubberband.dragTo([constrainX, constrainY]);\r\n }\r\n\r\n onMouseUp = () => {\r\n const { width, height } = this.rubberband.getBoundingClientRect();\r\n\r\n const minWidth = this.config.minSelectionWidth || 4;\r\n const minHeight = this.config.minSelectionHeight || 4;\r\n \r\n if (width >= minWidth || height >= minHeight) {\r\n this.rubberband.addPoint();\r\n } else if (!this._startOnSingleClick) {\r\n this.emit('cancel');\r\n this.stop();\r\n }\r\n }\r\n \r\n onMouseUpDown = () => {\r\n // It seems like renaming 'onMouseUp' to 'onMouseUpDown' would be appropriate.\r\n // However, do not do this because the 'onMouseUp' function is used in annotorious-openseadragon.\r\n this.onMouseUp();\r\n }\r\n\r\n onDblClick = () => {\r\n if (this.rubberband.points.length < (this.config.minPolygonPoints || 0)) return;\r\n\r\n this._isDrawing = false;\r\n\r\n const shape = this.rubberband.element;\r\n shape.annotation = this.rubberband.toSelection();\r\n this.emit('complete', shape);\r\n\r\n this.stop();\r\n }\r\n\r\n get isDrawing() {\r\n return this._isDrawing;\r\n }\r\n\r\n createEditableShape = (annotation, formatters) =>\r\n new EditablePolygon(annotation, this.g, {...this.config, formatters}, this.env);\r\n\r\n}\r\n\r\nRubberbandPolygonTool.identifier = 'polygon';\r\n\r\nRubberbandPolygonTool.supports = annotation => {\r\n const selector = annotation.selector('SvgSelector');\r\n if (selector)\r\n return selector.value?.match(/^<svg.*<polygon/g);\r\n}","import EventEmitter from 'tiny-emitter';\r\nimport RubberbandRectTool from './rectangle/RubberbandRectTool';\r\nimport RubberbandPolygonTool from './polygon/RubberbandPolygonTool';\r\n\r\nexport default class ToolRegistry extends EventEmitter {\r\n \r\n constructor(g, config, env) {\r\n super(); \r\n\r\n // SVG annotation layer group\r\n this._g = g;\r\n\r\n // Annotorious user config\r\n this._config = config;\r\n\r\n // Environment settings\r\n this._env = env;\r\n\r\n // Registered tool implementations\r\n this._registered = [\r\n RubberbandRectTool,\r\n RubberbandPolygonTool\r\n ];\r\n\r\n this.setCurrent(RubberbandRectTool);\r\n }\r\n\r\n listTools = () =>\r\n this._registered.map(impl => impl.identifier);\r\n\r\n registerTool = impl => {\r\n // If there's a tool with the same ID, replace\r\n const id = impl.identifier;\r\n if (this.listTools().includes(id))\r\n this.unregisterTool(id);\r\n\r\n this._registered.unshift(impl);\r\n }\r\n\r\n unregisterTool = id =>\r\n this._registered = this._registered.filter(impl => impl.identifier !== id);\r\n\r\n /** \r\n * Sets a drawing tool by providing an implementation, or the ID\r\n * of a built-in toll.\r\n */\r\n setCurrent = toolOrId => {\r\n if (this._current)\r\n this._current.destroy();\r\n \r\n const Tool = (typeof toolOrId === 'string' || toolOrId instanceof String) ?\r\n this._registered.find(impl => impl.identifier === toolOrId) :\r\n toolOrId;\r\n\r\n this._current = new Tool(this._g, this._config, this._env);\r\n this._current.on('startSelection', pt => this.emit('startSelection', pt));\r\n this._current.on('complete', evt => this.emit('complete', evt));\r\n this._current.on('cancel', evt => this.emit('cancel', evt));\r\n }\r\n\r\n forAnnotation = annotation => {\r\n // First target\r\n const [ target, ..._ ] = annotation.targets;\r\n const renderedVia = target.renderedVia?.name;\r\n\r\n const Tool = renderedVia ?\r\n this._registered.find(impl => impl.identifier === renderedVia) :\r\n this._registered.find(impl => impl.supports(annotation));\r\n\r\n return Tool ? new Tool(this._g, this._config, this._env) : null;\r\n }\r\n\r\n get current() {\r\n return this._current;\r\n }\r\n \r\n}","import { SVG_NAMESPACE } from './util/SVG';\r\n\r\nexport default class Crosshair {\r\n\r\n constructor(layerGroup, width, height) {\r\n this.svg = layerGroup.closest('svg');\r\n\r\n this.g = document.createElementNS(SVG_NAMESPACE, 'g');\r\n this.g.setAttribute('class', 'a9s-crosshair');\r\n\r\n const h = document.createElementNS(SVG_NAMESPACE, 'line');\r\n const v = document.createElementNS(SVG_NAMESPACE, 'line');\r\n\r\n this.g.appendChild(h);\r\n this.g.appendChild(v);\r\n\r\n layerGroup.appendChild(this.g);\r\n \r\n const getSVGPoint = evt => {\r\n const bbox = this.svg.getBoundingClientRect();\r\n \r\n const x = evt.clientX - bbox.x;\r\n const y = evt.clientY - bbox.y;\r\n \r\n const pt = this.svg.createSVGPoint();\r\n \r\n const { left, top } = this.svg.getBoundingClientRect();\r\n pt.x = x + left;\r\n pt.y = y + top;\r\n \r\n return pt.matrixTransform(layerGroup.getScreenCTM().inverse());\r\n }\r\n\r\n this.svg.parentElement.addEventListener('pointermove', evt => {\r\n const { x, y } = getSVGPoint(evt);\r\n\r\n h.setAttribute('x1', 0);\r\n h.setAttribute('y1', y);\r\n h.setAttribute('x2', width);\r\n h.setAttribute('y2', y);\r\n\r\n v.setAttribute('x1', x);\r\n v.setAttribute('y1', 0);\r\n v.setAttribute('x2', x);\r\n v.setAttribute('y2', height);\r\n });\r\n }\r\n\r\n}\r\n","import { hasClass } from './SVG';\r\n\r\nexport const getSnippet = (image, element) => {\r\n const shape = hasClass(element, '.a9s-annotation') ? \r\n element : element.closest('.a9s-annotation');\r\n\r\n const outer = shape.querySelector('.a9s-outer');\r\n\r\n const kx = image.naturalWidth / image.width;\r\n const ky = image.naturalHeight / image.height;\r\n\r\n const imageBounds = image.getBoundingClientRect();\r\n const outerBounds = outer.getBoundingClientRect();\r\n\r\n const x = outerBounds.x - imageBounds.x;\r\n const y = outerBounds.y - imageBounds.y;\r\n const { width, height } = outerBounds;\r\n\r\n // Cut out the image snippet as in-memory canvas element\r\n const snippet = document.createElement('CANVAS');\r\n const ctx = snippet.getContext('2d');\r\n snippet.width = width * kx;\r\n snippet.height = height * ky;\r\n ctx.drawImage(image, x * kx, y * ky, width * kx, height * ky, 0, 0, width * kx, height * ky);\r\n\r\n return {\r\n snippet,\r\n transform: xy => {\r\n const px = x * kx + xy[0];\r\n const py = y * ky + xy[1];\r\n return [ px, py ];\r\n }\r\n };\r\n}","import EventEmitter from 'tiny-emitter';\r\nimport { drawShape, shapeArea } from './selectors';\r\nimport { SVG_NAMESPACE, addClass, hasClass, removeClass } from './util/SVG';\r\nimport DrawingTools from './tools/ToolsRegistry';\r\nimport Crosshair from './Crosshair';\r\nimport { format } from './util/Formatting';\r\nimport { getSnippet } from './util/ImageSnippet';\r\nimport { isTouchDevice, enableTouchTranslation } from './util/Touch';\r\n\r\nconst isTouch = isTouchDevice();\r\n\r\nexport default class AnnotationLayer extends EventEmitter {\r\n\r\n constructor(props) {\r\n super();\r\n\r\n const { wrapperEl, config, env } = props;\r\n\r\n this.imageEl = env.image;\r\n\r\n this.readOnly = config.readOnly;\r\n\r\n this.allowDrawingWithSelection = config.allowDrawingWithSelection;\r\n\r\n // Deprecate the old 'formatter' option \r\n if (config.formatter)\r\n this.formatters = [ config.formatter ];\r\n else if (config.formatters)\r\n this.formatters = Array.isArray(config.formatters) ? config.formatters : [ config.formatters ];\r\n \r\n this.disableSelect = config.disableSelect;\r\n this.drawOnSingleClick = config.drawOnSingleClick; \r\n\r\n // Annotation layer SVG element\r\n this.svg = document.createElementNS(SVG_NAMESPACE, 'svg');\r\n this.svg.setAttribute('tabindex', 0);\r\n\r\n if (isTouch) {\r\n this.svg.setAttribute('class', 'a9s-annotationlayer touch');\r\n\r\n // Translates touch events to simulated mouse events\r\n enableTouchTranslation(this.svg);\r\n\r\n // Adds additional logic because touch doesn't have hover\r\n this.svg.addEventListener('touchstart', () => {\r\n this.currentHover = null;\r\n this.selectCurrentHover();\r\n });\r\n } else {\r\n this.svg.setAttribute('class', 'a9s-annotationlayer');\r\n }\r\n\r\n const { naturalWidth, naturalHeight } = this.imageEl;\r\n\r\n if (!naturalWidth && !naturalHeight) {\r\n // Might be because a) the image has not loaded yet, or b) because it's not \r\n // an image element (but maybe a CANVAS etc.)! Allow for both possibilities.\r\n const { width, height } = this.imageEl;\r\n this.svg.setAttribute('viewBox', `0 0 ${width} ${height}`);\r\n\r\n // Plus: monkey-patch the element (won't work for images)\r\n if(this.imageEl.nodeName.toLowerCase() !== 'img') {\r\n this.imageEl.naturalWidth = width;\r\n this.imageEl.naturalHeight = height;\r\n }\r\n\r\n this.imageEl.addEventListener('load', () => {\r\n this.emit('load', this.imageEl.src);\r\n this.svg.setAttribute('viewBox', `0 0 ${this.imageEl.naturalWidth} ${this.imageEl.naturalHeight}`)\r\n });\r\n } else {\r\n this.svg.setAttribute('viewBox', `0 0 ${naturalWidth} ${naturalHeight}`);\r\n }\r\n\r\n // Don't attach directly, but in a group\r\n this.g = document.createElementNS(SVG_NAMESPACE, 'g');\r\n\r\n this.svg.appendChild(this.g);\r\n wrapperEl.appendChild(this.svg);\r\n\r\n if (config.crosshair) {\r\n this.crosshair = new Crosshair(this.g, naturalWidth, naturalHeight);\r\n if (!config.crosshairWithCursor){\r\n addClass(this.svg, 'no-cursor');\r\n }\r\n }\r\n\r\n this.selectedShape = null;\r\n\r\n this.tools = new DrawingTools(this.g, config, env);\r\n this.tools.on('startSelection', pt => this.emit('startSelection', pt));\r\n this.tools.on('cancel', this.selectCurrentHover);\r\n this.tools.on('complete', this.selectShape);\r\n\r\n this.svg.addEventListener('mousedown', this._onMouseDown);\r\n\r\n this.currentHover = null;\r\n\r\n // On image resize...\r\n if (window.ResizeObserver) {\r\n this.resizeObserver = new ResizeObserver(() => {\r\n // ...counter-scale non-scaling annotations...\r\n this._refreshNonScalingAnnotations();\r\n\r\n // ...and resize formatter elements (shape labels etc.)\r\n this._scaleFormatterElements();\r\n });\r\n\r\n this.resizeObserver.observe(this.svg.parentNode);\r\n }\r\n }\r\n\r\n _attachMouseListeners = (elem, annotation) => {\r\n elem.addEventListener('mouseenter', () => {\r\n if (!this.tools?.current?.isDrawing) {\r\n if (this.currentHover !== elem)\r\n this.emit('mouseEnterAnnotation', annotation, elem);\r\n\r\n this.currentHover = elem;\r\n }\r\n });\r\n\r\n elem.addEventListener('mouseleave', () => {\r\n if (!this.tools?.current?.isDrawing) {\r\n this.emit('mouseLeaveAnnotation', annotation, elem);\r\n this.currentHover = null;\r\n }\r\n });\r\n\r\n if (isTouch) {\r\n elem.addEventListener('touchstart', evt => {\r\n evt.stopPropagation();\r\n this.currentHover = elem;\r\n });\r\n\r\n elem.addEventListener('touchend', evt => {\r\n const { clientX, clientY } = evt.changedTouches[0];\r\n const realTarget = document.elementFromPoint(clientX, clientY);\r\n evt.stopPropagation();\r\n\r\n if (elem.contains(realTarget)) {\r\n this.currentHover = elem;\r\n this.selectCurrentHover();\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Helper - executes immediately if the image is loaded,\r\n * or defers to image.onload if not\r\n */\r\n _lazy = fn => { \r\n if (this.imageEl.naturalWidth)\r\n fn();\r\n else \r\n this.imageEl.addEventListener('load', () => fn());\r\n }\r\n\r\n _onMouseDown = evt => {\r\n if (evt.button !== 0) return; // Left click\r\n\r\n if (\r\n !(\r\n this.readOnly ||\r\n (this.allowDrawingWithSelection ? this.selectedShape && this.selectedShape.element === this.currentHover : this.selectedShape) ||\r\n this.tools.current.isDrawing\r\n )\r\n ) {\r\n\r\n // No active selection (or active selection is not current Hover when allowDrawingWithSelection) & not drawing now? Start drawing.\r\n this.tools.current.start(evt, this.drawOnSingleClick && !this.currentHover);\r\n } else if (!this.tools?.current?.isDrawing && this.selectedShape !== this.currentHover) {\r\n // Not drawing and another shape was clicked? Select.\r\n this.selectCurrentHover();\r\n }\r\n }\r\n\r\n _refreshNonScalingAnnotations = () => {\r\n const scale = this.getCurrentScale();\r\n \r\n // This happens after .destroy(), when this.svg still exists,\r\n // but has 0x0 size!\r\n if (scale === Infinity)\r\n return;\r\n\r\n Array.from(this.svg.querySelectorAll('.a9s-non-scaling')).forEach(shape => {\r\n shape.setAttribute('transform', `scale(${scale})`);\r\n });\r\n }\r\n\r\n _scaleFormatterElements = opt_shape => {\r\n const scale = this.getCurrentScale();\r\n\r\n if (scale === Infinity)\r\n return;\r\n\r\n if (opt_shape) {\r\n const el = opt_shape.querySelector('.a9s-formatter-el');\r\n if (el)\r\n el.firstChild.setAttribute('transform', `scale(${scale})`);\r\n } else {\r\n const elements = Array.from(this.g.querySelectorAll('.a9s-formatter-el'));\r\n elements.forEach(el =>\r\n el.firstChild.setAttribute('transform', `scale(${scale})`));\r\n }\r\n }\r\n\r\n addAnnotation = annotation => {\r\n const g = drawShape(annotation, this.imageEl);\r\n\r\n addClass(g, 'a9s-annotation');\r\n g.setAttribute('data-id', annotation.id);\r\n\r\n g.annotation = annotation;\r\n\r\n this._attachMouseListeners(g, annotation);\r\n this.g.appendChild(g);\r\n\r\n format(g, annotation, this.formatters);\r\n this._scaleFormatterElements(g);\r\n\r\n return g;\r\n }\r\n\r\n addDrawingTool = plugin =>\r\n this.tools?.registerTool(plugin);\r\n\r\n addOrUpdateAnnotation = (annotation, previous) => {\r\n if (this.selectedShape && (this.selectedShape.annotation.isEqual(annotation) || this.selectedShape.annotation.isEqual(previous))) {\r\n this.deselect();\r\n this.emit('select', {});\r\n }\r\n\r\n if (previous)\r\n this.removeAnnotation(previous);\r\n\r\n this.removeAnnotation(annotation);\r\n\r\n const shape = this.addAnnotation(annotation);\r\n \r\n // Counter-scale non-scaling annotations\r\n if (hasClass(shape, 'a9s-non-scaling'))\r\n shape.setAttribute('transform', `scale(${this.getCurrentScale()})`);\r\n\r\n // Make sure rendering order is large-to-small\r\n this.redraw();\r\n }\r\n\r\n deselect = skipRedraw => {\r\n if (this.selectedShape) {\r\n this.tools?.current.stop();\r\n\r\n const { annotation } = this.selectedShape;\r\n\r\n if (this.selectedShape.destroy) {\r\n // Modifiable shape: destroy and re-add the annotation\r\n this.selectedShape.destroy();\r\n this.selectedShape = null;\r\n\r\n if (!annotation.isSelection) {\r\n this.addAnnotation(annotation);\r\n\r\n if (!skipRedraw)\r\n this.redraw();\r\n }\r\n } else {\r\n // Not modifiable - just clear\r\n removeClass(this.selectedShape, 'selected');\r\n this.selectedShape = null;\r\n }\r\n }\r\n }\r\n\r\n destroy = () => {\r\n this.deselect();\r\n this.currentHover = null;\r\n this.svg.parentNode.removeChild(this.svg);\r\n }\r\n\r\n findShape = annotationOrId => {\r\n const id = annotationOrId?.id ? annotationOrId.id : annotationOrId;\r\n return this.g.querySelector(`.a9s-annotation[data-id=\"${id}\"]`);\r\n }\r\n\r\n getAnnotations = () => {\r\n const shapes = Array.from(this.g.querySelectorAll('.a9s-annotation'));\r\n return shapes.map(s => s.annotation);\r\n }\r\n\r\n getCurrentScale = () => {\r\n const svgBounds = this.svg.getBoundingClientRect();\r\n const { width, height } = this.svg.viewBox.baseVal;\r\n\r\n return Math.max(\r\n width / svgBounds.width,\r\n height / svgBounds.height\r\n );\r\n }\r\n\r\n getSelectedImageSnippet = () => {\r\n if (this.selectedShape) {\r\n const element = this.selectedShape.element || this.selectedShape;\r\n return getSnippet(this.imageEl, element);\r\n }\r\n }\r\n\r\n init = annotations => {\r\n // Clear existing\r\n this.deselect();\r\n this.currentHover = null;\r\n\r\n const shapes = Array.from(this.g.querySelectorAll('.a9s-annotation'));\r\n shapes.forEach(s => this.g.removeChild(s));\r\n\r\n // Add\r\n this._lazy(() => {\r\n annotations.sort((a, b) => shapeArea(b, this.imageEl) - shapeArea(a, this.imageEl));\r\n annotations.forEach(this.addAnnotation);\r\n });\r\n\r\n // Counter-scale non-scaling annotations\r\n this._refreshNonScalingAnnotations();\r\n }\r\n\r\n listDrawingTools = () =>\r\n this.tools?.listTools();\r\n\r\n /**\r\n * Forces a new ID on the annotation with the given ID.\r\n * @returns the updated annotation for convenience\r\n */\r\n overrideId = (originalId, forcedId) => {\r\n // Update SVG shape data attribute\r\n const shape = this.findShape(originalId);\r\n shape.setAttribute('data-id', forcedId);\r\n\r\n // Update annotation\r\n const { annotation } = shape;\r\n\r\n const updated = annotation.clone({ id : forcedId });\r\n shape.annotation = updated;\r\n\r\n return updated;\r\n }\r\n\r\n /**\r\n * Redraws the whole layer with annotations sorted by\r\n * size, so that larger ones don't occlude smaller ones.\r\n */\r\n redraw = () => {\r\n const shapes = Array.from(this.g.querySelectorAll('.a9s-annotation:not(.selected)'));\r\n\r\n const annotations = shapes.map(s => s.annotation);\r\n annotations.sort((a, b) => shapeArea(b, this.imageEl) - shapeArea(a, this.imageEl));\r\n\r\n // Clear the SVG element\r\n shapes.forEach(s => this.g.removeChild(s));\r\n\r\n // Redraw\r\n annotations.forEach(this.addAnnotation);\r\n }\r\n\r\n removeAnnotation = annotationOrId => {\r\n // Removal won't work if the annotation is currently selected - deselect!\r\n const id = annotationOrId.type ? annotationOrId.id : annotationOrId;\r\n\r\n if (this.selectedShape?.annotation.id === id)\r\n this.deselect();\r\n\r\n const toRemove = this.findShape(annotationOrId);\r\n\r\n if (toRemove) {\r\n if (this.selectedShape?.annotation === toRemove.annotation)\r\n this.deselect();\r\n\r\n if (this.currentHover?.annotation === toRemove.annotation)\r\n this.currentHover = null;\r\n\r\n toRemove.parentNode.removeChild(toRemove);\r\n }\r\n }\r\n\r\n removeDrawingTool = id =>\r\n this.tools?.unregisterTool(id);\r\n\r\n /**\r\n * Programmatic selection via the API. Should work as normal,\r\n * but the selectAnnotation event should not be fired to the outside.\r\n */\r\n selectAnnotation = (annotationOrId, skipEvent) => {\r\n // Deselect first\r\n if (this.selectedShape)\r\n this.deselect();\r\n\r\n const selected = this.findShape(annotationOrId);\r\n\r\n if (selected) {\r\n this.selectShape(selected, skipEvent);\r\n\r\n const element = this.selectedShape.element ?\r\n this.selectedShape.element : this.selectedShape;\r\n\r\n return { annotation: selected.annotation, element };\r\n } else {\r\n this.deselect();\r\n }\r\n }\r\n\r\n selectCurrentHover = () => {\r\n if (this.currentHover) {\r\n if (this.disableSelect) {\r\n // Click only - no select\r\n this.emit('clickAnnotation', this.currentHover.annotation, this.currentHover);\r\n } else {\r\n this.selectShape(this.currentHover);\r\n }\r\n } else {\r\n this.deselect();\r\n this.emit('select', { skipEvent: true });\r\n }\r\n }\r\n\r\n selectShape = (shape, skipEvent) => {\r\n if (!skipEvent && !shape.annotation.isSelection)\r\n this.emit('clickAnnotation', shape.annotation, shape);\r\n \r\n // Don't re-select\r\n if (this.selectedShape?.annotation === shape.annotation)\r\n return;\r\n\r\n // If another shape is currently selected, deselect first\r\n if (this.selectedShape && this.selectedShape.annotation !== shape.annotation) {\r\n this.deselect(true);\r\n }\r\n\r\n const { annotation } = shape;\r\n\r\n const readOnly = this.readOnly || annotation.readOnly;\r\n\r\n if (!readOnly) {\r\n const toolForAnnotation = this.tools.forAnnotation(annotation);\r\n\r\n // Replace the shape with an editable version\r\n if (toolForAnnotation) {\r\n shape.parentNode.removeChild(shape);\r\n this.selectedShape = toolForAnnotation.createEditableShape(annotation, this.formatters);\r\n\r\n // Yikes... hack to make the tool act like SVG annotation shapes - needs redesign\r\n this.selectedShape.element.annotation = annotation;\r\n \r\n this._scaleFormatterElements(this.selectedShape.element);\r\n\r\n this.selectedShape.on('update', fragment => {\r\n if (this.selectedShape)\r\n this.emit('updateTarget', this.selectedShape.element, fragment);\r\n });\r\n\r\n // If we attach immediately 'mouseEnter' will fire when the editable shape\r\n // is added to the DOM!\r\n setTimeout(() => {\r\n if (this.selectedShape != null)\r\n this._attachMouseListeners(this.selectedShape.element, annotation);\r\n\r\n // Bit of a hack...\r\n // We need to make the selection the current hover manually (because \r\n // 'mouseEnter' won't have fired. But ONLY if the selection was not\r\n // done programmatically (which was the case for 'skipEvent')\r\n if (!skipEvent && this.selectedShape?.element)\r\n this.currentHover = this.selectedShape.element;\r\n }, 1);\r\n } else {\r\n this.selectedShape = shape;\r\n }\r\n\r\n if (!skipEvent)\r\n this.emit('select', { annotation, element: this.selectedShape.element || this.selectedShape });\r\n } else {\r\n addClass(shape, 'selected');\r\n this.selectedShape = shape;\r\n\r\n if (!skipEvent)\r\n this.emit('select', { annotation, element: shape, skipEvent });\r\n }\r\n }\r\n\r\n setDrawingTool = shape => {\r\n if (this.tools) {\r\n this.tools.current?.stop();\r\n this.tools.setCurrent(shape);\r\n }\r\n }\r\n\r\n setVisible = visible => {\r\n if (visible) {\r\n this.svg.style.display = null;\r\n } else {\r\n this.deselect();\r\n this.svg.style.display = 'none';\r\n }\r\n }\r\n\r\n stopDrawing = () => {\r\n this.tools?.current?.stop();\r\n }\r\n\r\n}\r\n",null,null,null,null,null,null,null,null,"import Polyglot from 'node-polyglot';\nimport TimeAgo from 'timeago-react';\nimport * as timeago from 'timeago.js';\n\nimport messages_ar from './messages_ar.json';\nimport messages_cs from './messages_cs.json';\nimport messages_de from './messages_de.json';\nimport messages_el from './messages_el.json';\nimport messages_es from './messages_es.json';\nimport messages_fi from './messages_fi.json';\nimport messages_fr from './messages_fr.json';\nimport messages_gl from './messages_gl.json';\nimport messages_hi from './messages_hi.json';\nimport messages_it from './messages_it.json';\nimport messages_ja from './messages_ja.json';\nimport messages_ko from './messages_ko.json';\nimport messages_nl from './messages_nl.json';\nimport messages_pt from './messages_pt.json';\nimport messages_ru from './messages_ru.json';\nimport messages_sv from './messages_sv.json';\nimport messages_th from './messages_th.json';\nimport messages_tr from './messages_tr.json';\nimport messages_ur from './messages_ur.json';\nimport messages_zh from './messages_zh.json';\nimport messages_zh_CN from './messages_zh_CN.json';\nimport messages_zh_TW from './messages_zh_TW.json';\n\nconst MESSAGES = {\n ar: messages_ar,\n cs: messages_cs,\n de: messages_de,\n el: messages_el,\n es: messages_es,\n fi: messages_fi,\n fr: messages_fr,\n gl: messages_gl,\n hi: messages_hi,\n it: messages_it,\n ja: messages_ja,\n ko: messages_ko,\n nl: messages_nl,\n pt: messages_pt,\n ru: messages_ru,\n sv: messages_sv,\n th: messages_th,\n tr: messages_tr,\n ur: messages_ur,\n zh: messages_zh,\n 'zh-CN': messages_zh_CN,\n 'zh-TW': messages_zh_TW\n}\n\nexport const availableLocales = Object.keys(MESSAGES);\n\nconst i18n = new Polyglot({ allowMissing: true });\n\ni18n.init = (lang, opt_messages) => {\n i18n.clear();\n\n if (lang) {\n i18n.locale(lang);\n i18n.extend(MESSAGES[lang]);\n }\n\n if (opt_messages)\n i18n.extend(opt_messages);\n}\n\n/** Load and register TimeAgo locales **/\nimport ar from 'timeago.js/lib/lang/ar';\nimport cs from 'timeago.js/lib/lang/cs';\nimport de from 'timeago.js/lib/lang/de';\nimport el from 'timeago.js/lib/lang/el';\nimport es from 'timeago.js/lib/lang/es';\nimport fi from 'timeago.js/lib/lang/fi';\nimport fr from 'timeago.js/lib/lang/fr';\nimport gl from 'timeago.js/lib/lang/gl';\nimport hi from 'timeago.js/lib/lang/hi_IN';\nimport it from 'timeago.js/lib/lang/it';\nimport ja from 'timeago.js/lib/lang/ja';\nimport ko from 'timeago.js/lib/lang/ko';\nimport nl from 'timeago.js/lib/lang/nl';\nimport pt from 'timeago.js/lib/lang/pt_BR';\nimport ru from 'timeago.js/lib/lang/ru';\nimport sv from 'timeago.js/lib/lang/sv';\nimport th from 'timeago.js/lib/lang/th';\nimport tr from 'timeago.js/lib/lang/tr';\n// import ur from 'timeago.js/lib/lang/ur'; // Not currently supported by TimeAgo\nimport zh_CN from 'timeago.js/lib/lang/zh_CN';\nimport zh_TW from 'timeago.js/lib/lang/zh_TW';\n\ntimeago.register('ar', ar);\ntimeago.register('cs', cs);\ntimeago.register('de', de);\ntimeago.register('el', el);\ntimeago.register('es', es);\ntimeago.register('fi', fi);\ntimeago.register('fr', fr);\ntimeago.register('gl', gl);\ntimeago.register('hi', hi);\ntimeago.register('it', it);\ntimeago.register('ja', ja);\ntimeago.register('ko', ko);\ntimeago.register('nl', nl);\ntimeago.register('pt', pt);\ntimeago.register('ru', ru);\ntimeago.register('sv', sv);\ntimeago.register('th', th);\ntimeago.register('tr', tr);\ntimeago.register('zh', zh_CN);\ntimeago.register('zh-CN', zh_CN);\ntimeago.register('zh-TW', zh_TW);\n\n/**\n * Helper function that allows plugins to register their\n * own additional I18N labels\n */\ni18n.registerMessages = (lang, messages) => {\n if (MESSAGES[lang])\n MESSAGES[lang] = {...MESSAGES[lang], ...messages };\n else\n MESSAGES[lang] = messages;\n}\n\nexport default i18n;\n\n/**\n * For convenience: exposes a pre-localized TimeAgo widget,\n * for use in plugins\n */\nexport const LocalTimeAgo = props => {\n\n return (\n <TimeAgo\n datetime={props.timestamp}\n locale={i18n.locale()} />\n )\n\n}\n","import React, { useRef } from 'react';\nimport useClickOutside from '../../useClickOutside';\nimport i18n from '../../../i18n';\n\nconst DropdownMenu = props => {\n\n const ref = useRef();\n\n // Custom hook that notifies when clicked outside this component\n useClickOutside(ref, () => props.onClickOutside());\n\n return (\n <ul ref={ref} className=\"r6o-comment-dropdown-menu\">\n <li onClick={props.onEdit}>{i18n.t('Edit')}</li>\n <li onClick={props.onDelete}>{i18n.t('Delete')}</li>\n </ul>\n )\n\n}\n\nexport default DropdownMenu;","import { useEffect } from 'react';\n\nexport default function useClickOutside(ref, callback) {\n\n const onClickOutside = _ => {\n if (ref.current && !ref.current.contains(event.target))\n callback();\n }\n\n useEffect(() => {\n document.addEventListener('mousedown', onClickOutside);\n\n return () =>\n document.removeEventListener('mousedown', onClickOutside);\n });\n\n}","import React, { Component, createRef } from 'react';\nimport TextareaAutosize from 'react-autosize-textarea';\nimport i18n from '../../../i18n';\n\n/** \n * A basic text entry field, for reuse in different widgets.\n */\nexport default class TextEntryField extends Component {\n\n constructor(props) {\n super(props);\n\n this.element = createRef();\n }\n\n // CTRL+Enter functions as Ok\n onKeyDown = evt => {\n if (evt.which === 13 && evt.ctrlKey) {\n this.props.onSaveAndClose();\n }\n }\n\n onKeyUp = evt => {\n if (evt.which === 46)\n evt.stopPropagation();\n }\n\n componentDidMount() {\n if (this.props.focus && this.element.current)\n this.element.current.focus({ preventScroll: true });\n }\n\n render() {\n return (\n <TextareaAutosize\n ref={this.element}\n className=\"r6o-editable-text\" \n value={this.props.content}\n placeholder={this.props.placeholder || i18n.t('Add a comment...')}\n disabled={!this.props.editable}\n onChange={this.props.onChange}\n onKeyUp={this.onKeyUp}\n onKeyDown={this.onKeyDown} />\n )\n }\n\n} ","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (process.env.NODE_ENV !== 'production') {\n var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;\n\n if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {\n // this would only cause problem in speedy mode\n // but we don't want enabling speedy to affect the observable behavior\n // so we report this error at all times\n console.error(\"You're attempting to insert the following rule:\\n\" + rule + '\\n\\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');\n }\n this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;\n }\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {\n console.error(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode && tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n\n if (process.env.NODE_ENV !== 'production') {\n this._alreadyInsertedOrderInsensitiveRule = false;\n }\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, COMMENT, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\nvar ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n\nvar isIgnoringComment = function isIgnoringComment(element) {\n return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;\n};\n\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {\n return function (element, index, children) {\n if (element.type !== 'rule' || cache.compat) return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses) {\n var isNested = !!element.parent; // in nested rules comments become children of the \"auto-inserted\" rule and that's always the `element.parent`\n //\n // considering this input:\n // .a {\n // .b /* comm */ {}\n // color: hotpink;\n // }\n // we get output corresponding to this:\n // .a {\n // & {\n // /* comm */\n // color: hotpink;\n // }\n // .b {}\n // }\n\n var commentContainer = isNested ? element.parent.children : // global rule at the root level\n children;\n\n for (var i = commentContainer.length - 1; i >= 0; i--) {\n var node = commentContainer[i];\n\n if (node.line < element.line) {\n break;\n } // it is quite weird but comments are *usually* put at `column: element.column - 1`\n // so we seek *from the end* for the node that is earlier than the rule's `element` and check that\n // this will also match inputs like this:\n // .a {\n // /* comm */\n // .b {}\n // }\n //\n // but that is fine\n //\n // it would be the easiest to change the placement of the comment to be the first child of the rule:\n // .a {\n // .b { /* comm */ }\n // }\n // with such inputs we wouldn't have to search for the comment at all\n // TODO: consider changing this comment placement in the next major version\n\n\n if (node.column < element.column) {\n if (isIgnoringComment(node)) {\n return;\n }\n\n break;\n }\n }\n\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n });\n }\n };\n};\n\nvar isImportRule = function isImportRule(element) {\n return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\n\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {\n for (var i = index - 1; i >= 0; i--) {\n if (!isImportRule(children[i])) {\n return true;\n }\n }\n\n return false;\n}; // use this to remove incorrect elements from further processing\n// so they don't get handed to the `sheet` (or anything else)\n// as that could potentially lead to additional logs which in turn could be overhelming to the user\n\n\nvar nullifyElement = function nullifyElement(element) {\n element.type = '';\n element.value = '';\n element[\"return\"] = '';\n element.children = '';\n element.props = '';\n};\n\nvar incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {\n if (!isImportRule(element)) {\n return;\n }\n\n if (element.parent) {\n console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n nullifyElement(element);\n } else if (isPrependedWithRegularRules(index, children)) {\n console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n nullifyElement(element);\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (process.env.NODE_ENV !== 'production' && !key) {\n throw new Error(\"You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\\n\" + \"If multiple caches share the same key they might \\\"fight\\\" for each other's style elements.\");\n }\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' '); // $FlowFixMe\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n if (process.env.NODE_ENV !== 'production') {\n omnipresentPlugins.push(createUnsafeSelectorsAlarm({\n get compat() {\n return cache.compat;\n }\n\n }), incorrectImportAlarm);\n }\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {\n if (!element.root) {\n if (element[\"return\"]) {\n currentSheet.insert(element[\"return\"]);\n } else if (element.value && element.type !== COMMENT) {\n // insert empty rule in non-production environments\n // so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet\n currentSheet.insert(element.value + \"{}\");\n }\n }\n } : rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n currentSheet = {\n insert: function insert(rule) {\n sheet.insert(rule + serialized.map);\n }\n };\n }\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n throw new Error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n var processed = oldProcessStyleValue(key, value);\n\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n\n return processed;\n };\n}\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error(noComponentSelectorMessage);\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n break;\n }\n\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n return cached !== undefined ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isBrowser = \"object\" !== 'undefined';\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nif (!isBrowser) {\n withEmotionCache = function withEmotionCache(func) {\n return function (props) {\n var cache = useContext(EmotionCacheContext);\n\n if (cache === null) {\n // yes, we're potentially creating this on every render\n // it doesn't actually matter though since it's only on the server\n // so there will only every be a single render\n // that could change in the future because of suspense and etc. but for now,\n // this works and i don't want to optimise for a future thing that we aren't sure about\n cache = createCache({\n key: 'css'\n });\n return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {\n value: cache\n }, func(props, cache));\n } else {\n return func(props, cache);\n }\n };\n };\n}\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/React.forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar getLastPart = function getLastPart(functionName) {\n // The match may be something like 'Object.createEmotionProps' or\n // 'Loader.prototype.render'\n var parts = functionName.split('.');\n return parts[parts.length - 1];\n};\n\nvar getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {\n // V8\n var match = /^\\s+at\\s+([A-Za-z0-9$.]+)\\s/.exec(line);\n if (match) return getLastPart(match[1]); // Safari / Firefox\n\n match = /^([A-Za-z0-9$.]+)@/.exec(line);\n if (match) return getLastPart(match[1]);\n return undefined;\n};\n\nvar internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS\n// identifiers, thus we only need to replace what is a valid character for JS,\n// but not for CSS.\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {\n if (!stackTrace) return undefined;\n var lines = stackTrace.split('\\n');\n\n for (var i = 0; i < lines.length; i++) {\n var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just \"Error\"\n\n if (!functionName) continue; // If we reach one of these, we have gone too far and should quit\n\n if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an\n // uppercase letter\n\n if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);\n }\n\n return undefined;\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when\n // the label hasn't already been computed\n\n if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {\n var label = getLabelFromStackTrace(new Error().stack);\n if (label) newProps[labelPropName] = label;\n }\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwnProperty as h, isBrowser as i, useTheme as u, withEmotionCache as w };\n","import { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isBrowser$1 } from './emotion-element-c39617d8.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-c39617d8.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.11.1\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\texports: {\n\t\t\".\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./dist/emotion-react.worker.esm.js\",\n\t\t\t\tbrowser: \"./dist/emotion-react.browser.esm.js\",\n\t\t\t\t\"default\": \"./dist/emotion-react.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./dist/emotion-react.cjs.mjs\",\n\t\t\t\"default\": \"./dist/emotion-react.cjs.js\"\n\t\t},\n\t\t\"./jsx-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js\"\n\t\t},\n\t\t\"./_isolated-hnrs\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js\",\n\t\t\t\tbrowser: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js\",\n\t\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs\",\n\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js\"\n\t\t},\n\t\t\"./jsx-dev-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\",\n\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\"./macro\": {\n\t\t\ttypes: {\n\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t},\n\t\t\t\"default\": \"./macro.js\"\n\t\t}\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"_isolated-hnrs\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.*\"\n\t],\n\tsideEffects: false,\n\tauthor: \"Emotion Contributors\",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.18.3\",\n\t\t\"@emotion/babel-plugin\": \"^11.11.0\",\n\t\t\"@emotion/cache\": \"^11.11.0\",\n\t\t\"@emotion/serialize\": \"^1.1.2\",\n\t\t\"@emotion/use-insertion-effect-with-fallbacks\": \"^1.0.1\",\n\t\t\"@emotion/utils\": \"^1.2.1\",\n\t\t\"@emotion/weak-memoize\": \"^0.3.1\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@definitelytyped/dtslint\": \"0.0.112\",\n\t\t\"@emotion/css\": \"11.11.0\",\n\t\t\"@emotion/css-prettifier\": \"1.1.3\",\n\t\t\"@emotion/server\": \"11.11.0\",\n\t\t\"@emotion/styled\": \"11.11.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\",\n\t\ttypescript: \"^4.5.5\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./_isolated-hnrs.js\"\n\t\t],\n\t\tumdName: \"emotionReact\",\n\t\texports: {\n\t\t\tenvConditions: [\n\t\t\t\t\"browser\",\n\t\t\t\t\"worker\"\n\t\t\t],\n\t\t\textra: {\n\t\t\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\t\t\"./macro\": {\n\t\t\t\t\ttypes: {\n\t\t\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t\t\t},\n\t\t\t\t\t\"default\": \"./macro.js\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwnProperty.call(props, 'css')) {\n // $FlowFixMe\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n\n if (!isBrowser$1) {\n var _ref;\n\n var serializedNames = serialized.name;\n var serializedStyles = serialized.styles;\n var next = serialized.next;\n\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n serializedStyles += next.styles;\n next = next.next;\n }\n\n var shouldCache = cache.compat === true;\n var rules = cache.insert(\"\", {\n name: serializedNames,\n styles: serializedStyles\n }, cache.sheet, shouldCache);\n\n if (shouldCache) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"style\", (_ref = {}, _ref[\"data-emotion\"] = cache.key + \"-global \" + serializedNames, _ref.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref.nonce = cache.sheet.nonce, _ref));\n } // yes, i know these hooks are used conditionally\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');\n }\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var isBrowser = \"object\" !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked\n\n var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';\n\n if (isBrowser && !isTestEnv) {\n // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later\n var globalContext = // $FlowIgnore\n typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef\n : isBrowser ? window : global;\n var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n if (globalContext[globalKey]) {\n console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n }\n\n globalContext[globalKey] = true;\n }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { jsx, keyframes, css as css$2, ClassNames } from '@emotion/react';\nimport _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';\nimport _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';\nimport _typeof from '@babel/runtime/helpers/esm/typeof';\nimport AutosizeInput from 'react-input-autosize';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\nimport _defineProperty$1 from '@babel/runtime/helpers/esm/defineProperty';\nimport { createContext, Component } from 'react';\nimport { createPortal } from 'react-dom';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\n// ==============================\n// NO OP\n// ==============================\nvar noop = function noop() {};\n// Class Name Prefixer\n// ==============================\n\n/**\n String representation of component state for styling with class names.\n\n Expects an array of strings OR a string/object pair:\n - className(['comp', 'comp-arg', 'comp-arg-2'])\n @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2'\n - className('comp', { some: true, state: false })\n @returns 'react-select__comp react-select__comp--some'\n*/\n\nfunction applyPrefixToName(prefix, name) {\n if (!name) {\n return prefix;\n } else if (name[0] === '-') {\n return prefix + name;\n } else {\n return prefix + '__' + name;\n }\n}\n\nfunction classNames(prefix, state, className) {\n var arr = [className];\n\n if (state && prefix) {\n for (var key in state) {\n if (state.hasOwnProperty(key) && state[key]) {\n arr.push(\"\".concat(applyPrefixToName(prefix, key)));\n }\n }\n }\n\n return arr.filter(function (i) {\n return i;\n }).map(function (i) {\n return String(i).trim();\n }).join(' ');\n} // ==============================\n// Clean Value\n// ==============================\n\nvar cleanValue = function cleanValue(value) {\n if (Array.isArray(value)) return value.filter(Boolean);\n if (_typeof(value) === 'object' && value !== null) return [value];\n return [];\n}; // ==============================\n// Clean Common Props\n// ==============================\n\nvar cleanCommonProps = function cleanCommonProps(props) {\n //className\n props.className;\n props.clearValue;\n props.cx;\n props.getStyles;\n props.getValue;\n props.hasValue;\n props.isMulti;\n props.isRtl;\n props.options;\n props.selectOption;\n props.selectProps;\n props.setValue;\n props.theme;\n var innerProps = _objectWithoutProperties(props, [\"className\", \"clearValue\", \"cx\", \"getStyles\", \"getValue\", \"hasValue\", \"isMulti\", \"isRtl\", \"options\", \"selectOption\", \"selectProps\", \"setValue\", \"theme\"]);\n\n return _objectSpread2({}, innerProps);\n}; // ==============================\n// Handle Input Change\n// ==============================\n\nfunction handleInputChange(inputValue, actionMeta, onInputChange) {\n if (onInputChange) {\n var newValue = onInputChange(inputValue, actionMeta);\n if (typeof newValue === 'string') return newValue;\n }\n\n return inputValue;\n} // ==============================\n// Scroll Helpers\n// ==============================\n\nfunction isDocumentElement(el) {\n return [document.documentElement, document.body, window].indexOf(el) > -1;\n} // Normalized Scroll Top\n// ------------------------------\n\nfunction getScrollTop(el) {\n if (isDocumentElement(el)) {\n return window.pageYOffset;\n }\n\n return el.scrollTop;\n}\nfunction scrollTo(el, top) {\n // with a scroll distance, we perform scroll on the element\n if (isDocumentElement(el)) {\n window.scrollTo(0, top);\n return;\n }\n\n el.scrollTop = top;\n} // Get Scroll Parent\n// ------------------------------\n\nfunction getScrollParent(element) {\n var style = getComputedStyle(element);\n var excludeStaticParent = style.position === 'absolute';\n var overflowRx = /(auto|scroll)/;\n var docEl = document.documentElement; // suck it, flow...\n\n if (style.position === 'fixed') return docEl;\n\n for (var parent = element; parent = parent.parentElement;) {\n style = getComputedStyle(parent);\n\n if (excludeStaticParent && style.position === 'static') {\n continue;\n }\n\n if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) {\n return parent;\n }\n }\n\n return docEl;\n} // Animated Scroll To\n// ------------------------------\n\n/**\n @param t: time (elapsed)\n @param b: initial value\n @param c: amount of change\n @param d: duration\n*/\n\nfunction easeOutCubic(t, b, c, d) {\n return c * ((t = t / d - 1) * t * t + 1) + b;\n}\n\nfunction animatedScrollTo(element, to) {\n var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;\n var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;\n var start = getScrollTop(element);\n var change = to - start;\n var increment = 10;\n var currentTime = 0;\n\n function animateScroll() {\n currentTime += increment;\n var val = easeOutCubic(currentTime, start, change, duration);\n scrollTo(element, val);\n\n if (currentTime < duration) {\n window.requestAnimationFrame(animateScroll);\n } else {\n callback(element);\n }\n }\n\n animateScroll();\n} // Scroll Into View\n// ------------------------------\n\nfunction scrollIntoView(menuEl, focusedEl) {\n var menuRect = menuEl.getBoundingClientRect();\n var focusedRect = focusedEl.getBoundingClientRect();\n var overScroll = focusedEl.offsetHeight / 3;\n\n if (focusedRect.bottom + overScroll > menuRect.bottom) {\n scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight));\n } else if (focusedRect.top - overScroll < menuRect.top) {\n scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0));\n }\n} // ==============================\n// Get bounding client object\n// ==============================\n// cannot get keys using array notation with DOMRect\n\nfunction getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}\n// Touch Capability Detector\n// ==============================\n\nfunction isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n} // ==============================\n// Mobile Device Detector\n// ==============================\n\nfunction isMobileDevice() {\n try {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n } catch (e) {\n return false;\n }\n} // ==============================\n// Passive Event Detector\n// ==============================\n// https://github.com/rafgraph/detect-it/blob/main/src/index.ts#L19-L36\n\nvar passiveOptionAccessed = false;\nvar options = {\n get passive() {\n return passiveOptionAccessed = true;\n }\n\n}; // check for SSR\n\nvar w = typeof window !== 'undefined' ? window : {};\n\nif (w.addEventListener && w.removeEventListener) {\n w.addEventListener('p', noop, options);\n w.removeEventListener('p', noop, false);\n}\n\nvar supportsPassiveEvents = passiveOptionAccessed;\n\nfunction getMenuPlacement(_ref) {\n var maxHeight = _ref.maxHeight,\n menuEl = _ref.menuEl,\n minHeight = _ref.minHeight,\n placement = _ref.placement,\n shouldScroll = _ref.shouldScroll,\n isFixedPosition = _ref.isFixedPosition,\n theme = _ref.theme;\n var spacing = theme.spacing;\n var scrollParent = getScrollParent(menuEl);\n var defaultState = {\n placement: 'bottom',\n maxHeight: maxHeight\n }; // something went wrong, return default state\n\n if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when\n // the menu is rendered\n\n var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),\n scrollHeight = _scrollParent$getBoun.height;\n\n var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),\n menuBottom = _menuEl$getBoundingCl.bottom,\n menuHeight = _menuEl$getBoundingCl.height,\n menuTop = _menuEl$getBoundingCl.top;\n\n var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(),\n containerTop = _menuEl$offsetParent$.top;\n\n var viewHeight = window.innerHeight;\n var scrollTop = getScrollTop(scrollParent);\n var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);\n var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);\n var viewSpaceAbove = containerTop - marginTop;\n var viewSpaceBelow = viewHeight - menuTop;\n var scrollSpaceAbove = viewSpaceAbove + scrollTop;\n var scrollSpaceBelow = scrollHeight - scrollTop - menuTop;\n var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom;\n var scrollUp = scrollTop + menuTop - marginTop;\n var scrollDuration = 160;\n\n switch (placement) {\n case 'auto':\n case 'bottom':\n // 1: the menu will fit, do nothing\n if (viewSpaceBelow >= menuHeight) {\n return {\n placement: 'bottom',\n maxHeight: maxHeight\n };\n } // 2: the menu will fit, if scrolled\n\n\n if (scrollSpaceBelow >= menuHeight && !isFixedPosition) {\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollDown, scrollDuration);\n }\n\n return {\n placement: 'bottom',\n maxHeight: maxHeight\n };\n } // 3: the menu will fit, if constrained\n\n\n if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) {\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollDown, scrollDuration);\n } // we want to provide as much of the menu as possible to the user,\n // so give them whatever is available below rather than the minHeight.\n\n\n var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom;\n return {\n placement: 'bottom',\n maxHeight: constrainedHeight\n };\n } // 4. Forked beviour when there isn't enough space below\n // AUTO: flip the menu, render above\n\n\n if (placement === 'auto' || isFixedPosition) {\n // may need to be constrained after flipping\n var _constrainedHeight = maxHeight;\n var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove;\n\n if (spaceAbove >= minHeight) {\n _constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight);\n }\n\n return {\n placement: 'top',\n maxHeight: _constrainedHeight\n };\n } // BOTTOM: allow browser to increase scrollable area and immediately set scroll\n\n\n if (placement === 'bottom') {\n if (shouldScroll) {\n scrollTo(scrollParent, scrollDown);\n }\n\n return {\n placement: 'bottom',\n maxHeight: maxHeight\n };\n }\n\n break;\n\n case 'top':\n // 1: the menu will fit, do nothing\n if (viewSpaceAbove >= menuHeight) {\n return {\n placement: 'top',\n maxHeight: maxHeight\n };\n } // 2: the menu will fit, if scrolled\n\n\n if (scrollSpaceAbove >= menuHeight && !isFixedPosition) {\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollUp, scrollDuration);\n }\n\n return {\n placement: 'top',\n maxHeight: maxHeight\n };\n } // 3: the menu will fit, if constrained\n\n\n if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user,\n // so give them whatever is available below rather than the minHeight.\n\n if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop;\n }\n\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollUp, scrollDuration);\n }\n\n return {\n placement: 'top',\n maxHeight: _constrainedHeight2\n };\n } // 4. not enough space, the browser WILL NOT increase scrollable area when\n // absolutely positioned element rendered above the viewport (only below).\n // Flip the menu, render below\n\n\n return {\n placement: 'bottom',\n maxHeight: maxHeight\n };\n\n default:\n throw new Error(\"Invalid placement provided \\\"\".concat(placement, \"\\\".\"));\n } // fulfil contract with flow: implicit return value of undefined\n\n\n return defaultState;\n} // Menu Component\n// ------------------------------\n\nfunction alignToControl(placement) {\n var placementToCSSProp = {\n bottom: 'top',\n top: 'bottom'\n };\n return placement ? placementToCSSProp[placement] : 'bottom';\n}\n\nvar coercePlacement = function coercePlacement(p) {\n return p === 'auto' ? 'bottom' : p;\n};\n\nvar menuCSS = function menuCSS(_ref2) {\n var _ref3;\n\n var placement = _ref2.placement,\n _ref2$theme = _ref2.theme,\n borderRadius = _ref2$theme.borderRadius,\n spacing = _ref2$theme.spacing,\n colors = _ref2$theme.colors;\n return _ref3 = {\n label: 'menu'\n }, _defineProperty$1(_ref3, alignToControl(placement), '100%'), _defineProperty$1(_ref3, \"backgroundColor\", colors.neutral0), _defineProperty$1(_ref3, \"borderRadius\", borderRadius), _defineProperty$1(_ref3, \"boxShadow\", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty$1(_ref3, \"marginBottom\", spacing.menuGutter), _defineProperty$1(_ref3, \"marginTop\", spacing.menuGutter), _defineProperty$1(_ref3, \"position\", 'absolute'), _defineProperty$1(_ref3, \"width\", '100%'), _defineProperty$1(_ref3, \"zIndex\", 1), _ref3;\n};\nvar PortalPlacementContext = /*#__PURE__*/createContext({\n getPortalPlacement: null\n}); // NOTE: internal only\n\nvar MenuPlacer = /*#__PURE__*/function (_Component) {\n _inherits(MenuPlacer, _Component);\n\n var _super = _createSuper(MenuPlacer);\n\n function MenuPlacer() {\n var _this;\n\n _classCallCheck(this, MenuPlacer);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.state = {\n maxHeight: _this.props.maxMenuHeight,\n placement: null\n };\n\n _this.getPlacement = function (ref) {\n var _this$props = _this.props,\n minMenuHeight = _this$props.minMenuHeight,\n maxMenuHeight = _this$props.maxMenuHeight,\n menuPlacement = _this$props.menuPlacement,\n menuPosition = _this$props.menuPosition,\n menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView,\n theme = _this$props.theme;\n if (!ref) return; // DO NOT scroll if position is fixed\n\n var isFixedPosition = menuPosition === 'fixed';\n var shouldScroll = menuShouldScrollIntoView && !isFixedPosition;\n var state = getMenuPlacement({\n maxHeight: maxMenuHeight,\n menuEl: ref,\n minHeight: minMenuHeight,\n placement: menuPlacement,\n shouldScroll: shouldScroll,\n isFixedPosition: isFixedPosition,\n theme: theme\n });\n var getPortalPlacement = _this.context.getPortalPlacement;\n if (getPortalPlacement) getPortalPlacement(state);\n\n _this.setState(state);\n };\n\n _this.getUpdatedProps = function () {\n var menuPlacement = _this.props.menuPlacement;\n var placement = _this.state.placement || coercePlacement(menuPlacement);\n return _objectSpread2(_objectSpread2({}, _this.props), {}, {\n placement: placement,\n maxHeight: _this.state.maxHeight\n });\n };\n\n return _this;\n }\n\n _createClass(MenuPlacer, [{\n key: \"render\",\n value: function render() {\n var children = this.props.children;\n return children({\n ref: this.getPlacement,\n placerProps: this.getUpdatedProps()\n });\n }\n }]);\n\n return MenuPlacer;\n}(Component);\nMenuPlacer.contextType = PortalPlacementContext;\n\nvar Menu = function Menu(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerRef = props.innerRef,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('menu', props),\n className: cx({\n menu: true\n }, className),\n ref: innerRef\n }, innerProps), children);\n};\n// Menu List\n// ==============================\n\nvar menuListCSS = function menuListCSS(_ref4) {\n var maxHeight = _ref4.maxHeight,\n baseUnit = _ref4.theme.spacing.baseUnit;\n return {\n maxHeight: maxHeight,\n overflowY: 'auto',\n paddingBottom: baseUnit,\n paddingTop: baseUnit,\n position: 'relative',\n // required for offset[Height, Top] > keyboard scroll\n WebkitOverflowScrolling: 'touch'\n };\n};\nvar MenuList = function MenuList(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n innerRef = props.innerRef,\n isMulti = props.isMulti;\n return jsx(\"div\", _extends({\n css: getStyles('menuList', props),\n className: cx({\n 'menu-list': true,\n 'menu-list--is-multi': isMulti\n }, className),\n ref: innerRef\n }, innerProps), children);\n}; // ==============================\n// Menu Notices\n// ==============================\n\nvar noticeCSS = function noticeCSS(_ref5) {\n var _ref5$theme = _ref5.theme,\n baseUnit = _ref5$theme.spacing.baseUnit,\n colors = _ref5$theme.colors;\n return {\n color: colors.neutral40,\n padding: \"\".concat(baseUnit * 2, \"px \").concat(baseUnit * 3, \"px\"),\n textAlign: 'center'\n };\n};\n\nvar noOptionsMessageCSS = noticeCSS;\nvar loadingMessageCSS = noticeCSS;\nvar NoOptionsMessage = function NoOptionsMessage(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('noOptionsMessage', props),\n className: cx({\n 'menu-notice': true,\n 'menu-notice--no-options': true\n }, className)\n }, innerProps), children);\n};\nNoOptionsMessage.defaultProps = {\n children: 'No options'\n};\nvar LoadingMessage = function LoadingMessage(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('loadingMessage', props),\n className: cx({\n 'menu-notice': true,\n 'menu-notice--loading': true\n }, className)\n }, innerProps), children);\n};\nLoadingMessage.defaultProps = {\n children: 'Loading...'\n}; // ==============================\n// Menu Portal\n// ==============================\n\nvar menuPortalCSS = function menuPortalCSS(_ref6) {\n var rect = _ref6.rect,\n offset = _ref6.offset,\n position = _ref6.position;\n return {\n left: rect.left,\n position: position,\n top: offset,\n width: rect.width,\n zIndex: 1\n };\n};\nvar MenuPortal = /*#__PURE__*/function (_Component2) {\n _inherits(MenuPortal, _Component2);\n\n var _super2 = _createSuper(MenuPortal);\n\n function MenuPortal() {\n var _this2;\n\n _classCallCheck(this, MenuPortal);\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this2 = _super2.call.apply(_super2, [this].concat(args));\n _this2.state = {\n placement: null\n };\n\n _this2.getPortalPlacement = function (_ref7) {\n var placement = _ref7.placement;\n var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed\n\n if (placement !== initialPlacement) {\n _this2.setState({\n placement: placement\n });\n }\n };\n\n return _this2;\n }\n\n _createClass(MenuPortal, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n appendTo = _this$props2.appendTo,\n children = _this$props2.children,\n className = _this$props2.className,\n controlElement = _this$props2.controlElement,\n cx = _this$props2.cx,\n innerProps = _this$props2.innerProps,\n menuPlacement = _this$props2.menuPlacement,\n position = _this$props2.menuPosition,\n getStyles = _this$props2.getStyles;\n var isFixed = position === 'fixed'; // bail early if required elements aren't present\n\n if (!appendTo && !isFixed || !controlElement) {\n return null;\n }\n\n var placement = this.state.placement || coercePlacement(menuPlacement);\n var rect = getBoundingClientObj(controlElement);\n var scrollDistance = isFixed ? 0 : window.pageYOffset;\n var offset = rect[placement] + scrollDistance;\n var state = {\n offset: offset,\n position: position,\n rect: rect\n }; // same wrapper element whether fixed or portalled\n\n var menuWrapper = jsx(\"div\", _extends({\n css: getStyles('menuPortal', state),\n className: cx({\n 'menu-portal': true\n }, className)\n }, innerProps), children);\n return jsx(PortalPlacementContext.Provider, {\n value: {\n getPortalPlacement: this.getPortalPlacement\n }\n }, appendTo ? /*#__PURE__*/createPortal(menuWrapper, appendTo) : menuWrapper);\n }\n }]);\n\n return MenuPortal;\n}(Component);\n\nvar containerCSS = function containerCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n isRtl = _ref.isRtl;\n return {\n label: 'container',\n direction: isRtl ? 'rtl' : null,\n pointerEvents: isDisabled ? 'none' : null,\n // cancel mouse events when disabled\n position: 'relative'\n };\n};\nvar SelectContainer = function SelectContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n isDisabled = props.isDisabled,\n isRtl = props.isRtl;\n return jsx(\"div\", _extends({\n css: getStyles('container', props),\n className: cx({\n '--is-disabled': isDisabled,\n '--is-rtl': isRtl\n }, className)\n }, innerProps), children);\n}; // ==============================\n// Value Container\n// ==============================\n\nvar valueContainerCSS = function valueContainerCSS(_ref2) {\n var spacing = _ref2.theme.spacing;\n return {\n alignItems: 'center',\n display: 'flex',\n flex: 1,\n flexWrap: 'wrap',\n padding: \"\".concat(spacing.baseUnit / 2, \"px \").concat(spacing.baseUnit * 2, \"px\"),\n WebkitOverflowScrolling: 'touch',\n position: 'relative',\n overflow: 'hidden'\n };\n};\nvar ValueContainer = function ValueContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n innerProps = props.innerProps,\n isMulti = props.isMulti,\n getStyles = props.getStyles,\n hasValue = props.hasValue;\n return jsx(\"div\", _extends({\n css: getStyles('valueContainer', props),\n className: cx({\n 'value-container': true,\n 'value-container--is-multi': isMulti,\n 'value-container--has-value': hasValue\n }, className)\n }, innerProps), children);\n}; // ==============================\n// Indicator Container\n// ==============================\n\nvar indicatorsContainerCSS = function indicatorsContainerCSS() {\n return {\n alignItems: 'center',\n alignSelf: 'stretch',\n display: 'flex',\n flexShrink: 0\n };\n};\nvar IndicatorsContainer = function IndicatorsContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n innerProps = props.innerProps,\n getStyles = props.getStyles;\n return jsx(\"div\", _extends({\n css: getStyles('indicatorsContainer', props),\n className: cx({\n indicators: true\n }, className)\n }, innerProps), children);\n};\n\nvar _templateObject;\n\nfunction _EMOTION_STRINGIFIED_CSS_ERROR__() { return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\"; }\n\nvar _ref2 = process.env.NODE_ENV === \"production\" ? {\n name: \"8mmkcg\",\n styles: \"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0\"\n} : {\n name: \"tj5bde-Svg\",\n styles: \"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0JJIiwiZmlsZSI6ImluZGljYXRvcnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyB0eXBlIE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHR5cGUgeyBDb21tb25Qcm9wcywgVGhlbWUgfSBmcm9tICcuLi90eXBlcyc7XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gRHJvcGRvd24gJiBDbGVhciBJY29uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmNvbnN0IFN2ZyA9ICh7IHNpemUsIC4uLnByb3BzIH06IHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTt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m9wcykgPT4ge1xuICBjb25zdCB7IGNsYXNzTmFtZSwgY3gsIGdldFN0eWxlcywgaW5uZXJQcm9wcywgaXNSdGwgfSA9IHByb3BzO1xuXG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgY3NzPXtnZXRTdHlsZXMoJ2xvYWRpbmdJbmRpY2F0b3InLCBwcm9wcyl9XG4gICAgICBjbGFzc05hbWU9e2N4KFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICAgIGNsYXNzTmFtZVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5Mb2FkaW5nSW5kaWNhdG9yLmRlZmF1bHRQcm9wcyA9IHsgc2l6ZTogNCB9O1xuIl19 */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__\n};\n\n// ==============================\n// Dropdown & Clear Icons\n// ==============================\nvar Svg = function Svg(_ref) {\n var size = _ref.size,\n props = _objectWithoutProperties(_ref, [\"size\"]);\n\n return jsx(\"svg\", _extends({\n height: size,\n width: size,\n viewBox: \"0 0 20 20\",\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n css: _ref2\n }, props));\n};\n\nvar CrossIcon = function CrossIcon(props) {\n return jsx(Svg, _extends({\n size: 20\n }, props), jsx(\"path\", {\n 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\"\n }));\n};\nvar DownChevron = function DownChevron(props) {\n return jsx(Svg, _extends({\n size: 20\n }, props), jsx(\"path\", {\n 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\"\n }));\n}; // ==============================\n// Dropdown & Clear Buttons\n// ==============================\n\nvar baseCSS = function baseCSS(_ref3) {\n var isFocused = _ref3.isFocused,\n _ref3$theme = _ref3.theme,\n baseUnit = _ref3$theme.spacing.baseUnit,\n colors = _ref3$theme.colors;\n return {\n label: 'indicatorContainer',\n color: isFocused ? colors.neutral60 : colors.neutral20,\n display: 'flex',\n padding: baseUnit * 2,\n transition: 'color 150ms',\n ':hover': {\n color: isFocused ? colors.neutral80 : colors.neutral40\n }\n };\n};\n\nvar dropdownIndicatorCSS = baseCSS;\nvar DropdownIndicator = function DropdownIndicator(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('dropdownIndicator', props),\n className: cx({\n indicator: true,\n 'dropdown-indicator': true\n }, className)\n }, innerProps), children || jsx(DownChevron, null));\n};\nvar clearIndicatorCSS = baseCSS;\nvar ClearIndicator = function ClearIndicator(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('clearIndicator', props),\n className: cx({\n indicator: true,\n 'clear-indicator': true\n }, className)\n }, innerProps), children || jsx(CrossIcon, null));\n}; // ==============================\n// Separator\n// ==============================\n\nvar indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref4) {\n var isDisabled = _ref4.isDisabled,\n _ref4$theme = _ref4.theme,\n baseUnit = _ref4$theme.spacing.baseUnit,\n colors = _ref4$theme.colors;\n return {\n label: 'indicatorSeparator',\n alignSelf: 'stretch',\n backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,\n marginBottom: baseUnit * 2,\n marginTop: baseUnit * 2,\n width: 1\n };\n};\nvar IndicatorSeparator = function IndicatorSeparator(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"span\", _extends({}, innerProps, {\n css: getStyles('indicatorSeparator', props),\n className: cx({\n 'indicator-separator': true\n }, className)\n }));\n}; // ==============================\n// Loading\n// ==============================\n\nvar loadingDotAnimations = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n 0%, 80%, 100% { opacity: 0; }\\n 40% { opacity: 1; }\\n\"])));\nvar loadingIndicatorCSS = function loadingIndicatorCSS(_ref5) {\n var isFocused = _ref5.isFocused,\n size = _ref5.size,\n _ref5$theme = _ref5.theme,\n colors = _ref5$theme.colors,\n baseUnit = _ref5$theme.spacing.baseUnit;\n return {\n label: 'loadingIndicator',\n color: isFocused ? colors.neutral60 : colors.neutral20,\n display: 'flex',\n padding: baseUnit * 2,\n transition: 'color 150ms',\n alignSelf: 'center',\n fontSize: size,\n lineHeight: 1,\n marginRight: size,\n textAlign: 'center',\n verticalAlign: 'middle'\n };\n};\n\nvar LoadingDot = function LoadingDot(_ref6) {\n var delay = _ref6.delay,\n offset = _ref6.offset;\n return jsx(\"span\", {\n css: /*#__PURE__*/css$2({\n animation: \"\".concat(loadingDotAnimations, \" 1s ease-in-out \").concat(delay, \"ms infinite;\"),\n backgroundColor: 'currentColor',\n borderRadius: '1em',\n display: 'inline-block',\n marginLeft: offset ? '1em' : null,\n height: '1em',\n verticalAlign: 'top',\n width: '1em'\n }, process.env.NODE_ENV === \"production\" ? \"\" : \";label:LoadingDot;\", process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0xJIiwiZmlsZSI6ImluZGljYXRvcnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyB0eXBlIE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHR5cGUgeyBDb21tb25Qcm9wcywgVGhlbWUgfSBmcm9tICcuLi90eXBlcyc7XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gRHJvcGRvd24gJiBDbGVhciBJY29uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmNvbnN0IFN2ZyA9ICh7IHNpemUsIC4uLnByb3BzIH06IHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuIC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ZGljYXRvciA9IChwcm9wczogTG9hZGluZ0ljb25Qcm9wcykgPT4ge1xuICBjb25zdCB7IGNsYXNzTmFtZSwgY3gsIGdldFN0eWxlcywgaW5uZXJQcm9wcywgaXNSdGwgfSA9IHByb3BzO1xuXG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgY3NzPXtnZXRTdHlsZXMoJ2xvYWRpbmdJbmRpY2F0b3InLCBwcm9wcyl9XG4gICAgICBjbGFzc05hbWU9e2N4KFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICAgIGNsYXNzTmFtZVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5Mb2FkaW5nSW5kaWNhdG9yLmRlZmF1bHRQcm9wcyA9IHsgc2l6ZTogNCB9O1xuIl19 */\")\n });\n};\n\nvar LoadingIndicator = function LoadingIndicator(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n isRtl = props.isRtl;\n return jsx(\"div\", _extends({\n css: getStyles('loadingIndicator', props),\n className: cx({\n indicator: true,\n 'loading-indicator': true\n }, className)\n }, innerProps), jsx(LoadingDot, {\n delay: 0,\n offset: isRtl\n }), jsx(LoadingDot, {\n delay: 160,\n offset: true\n }), jsx(LoadingDot, {\n delay: 320,\n offset: !isRtl\n }));\n};\nLoadingIndicator.defaultProps = {\n size: 4\n};\n\nvar css = function css(_ref) {\n var isDisabled = _ref.isDisabled,\n isFocused = _ref.isFocused,\n _ref$theme = _ref.theme,\n colors = _ref$theme.colors,\n borderRadius = _ref$theme.borderRadius,\n spacing = _ref$theme.spacing;\n return {\n label: 'control',\n alignItems: 'center',\n backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,\n borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,\n borderRadius: borderRadius,\n borderStyle: 'solid',\n borderWidth: 1,\n boxShadow: isFocused ? \"0 0 0 1px \".concat(colors.primary) : null,\n cursor: 'default',\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n minHeight: spacing.controlHeight,\n outline: '0 !important',\n position: 'relative',\n transition: 'all 100ms',\n '&:hover': {\n borderColor: isFocused ? colors.primary : colors.neutral30\n }\n };\n};\n\nvar Control = function Control(props) {\n var children = props.children,\n cx = props.cx,\n getStyles = props.getStyles,\n className = props.className,\n isDisabled = props.isDisabled,\n isFocused = props.isFocused,\n innerRef = props.innerRef,\n innerProps = props.innerProps,\n menuIsOpen = props.menuIsOpen;\n return jsx(\"div\", _extends({\n ref: innerRef,\n css: getStyles('control', props),\n className: cx({\n control: true,\n 'control--is-disabled': isDisabled,\n 'control--is-focused': isFocused,\n 'control--menu-is-open': menuIsOpen\n }, className)\n }, innerProps), children);\n};\n\nvar groupCSS = function groupCSS(_ref) {\n var spacing = _ref.theme.spacing;\n return {\n paddingBottom: spacing.baseUnit * 2,\n paddingTop: spacing.baseUnit * 2\n };\n};\n\nvar Group = function Group(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n Heading = props.Heading,\n headingProps = props.headingProps,\n innerProps = props.innerProps,\n label = props.label,\n theme = props.theme,\n selectProps = props.selectProps;\n return jsx(\"div\", _extends({\n css: getStyles('group', props),\n className: cx({\n group: true\n }, className)\n }, innerProps), jsx(Heading, _extends({}, headingProps, {\n selectProps: selectProps,\n theme: theme,\n getStyles: getStyles,\n cx: cx\n }), label), jsx(\"div\", null, children));\n};\n\nvar groupHeadingCSS = function groupHeadingCSS(_ref2) {\n var spacing = _ref2.theme.spacing;\n return {\n label: 'group',\n color: '#999',\n cursor: 'default',\n display: 'block',\n fontSize: '75%',\n fontWeight: '500',\n marginBottom: '0.25em',\n paddingLeft: spacing.baseUnit * 3,\n paddingRight: spacing.baseUnit * 3,\n textTransform: 'uppercase'\n };\n};\nvar GroupHeading = function GroupHeading(props) {\n var getStyles = props.getStyles,\n cx = props.cx,\n className = props.className;\n\n var _cleanCommonProps = cleanCommonProps(props);\n _cleanCommonProps.data;\n var innerProps = _objectWithoutProperties(_cleanCommonProps, [\"data\"]);\n\n return jsx(\"div\", _extends({\n css: getStyles('groupHeading', props),\n className: cx({\n 'group-heading': true\n }, className)\n }, innerProps));\n};\n\nvar inputCSS = function inputCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n margin: spacing.baseUnit / 2,\n paddingBottom: spacing.baseUnit / 2,\n paddingTop: spacing.baseUnit / 2,\n visibility: isDisabled ? 'hidden' : 'visible',\n color: colors.neutral80\n };\n};\n\nvar inputStyle = function inputStyle(isHidden) {\n return {\n label: 'input',\n background: 0,\n border: 0,\n fontSize: 'inherit',\n opacity: isHidden ? 0 : 1,\n outline: 0,\n padding: 0,\n color: 'inherit'\n };\n};\n\nvar Input = function Input(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles;\n\n var _cleanCommonProps = cleanCommonProps(props),\n innerRef = _cleanCommonProps.innerRef,\n isDisabled = _cleanCommonProps.isDisabled,\n isHidden = _cleanCommonProps.isHidden,\n innerProps = _objectWithoutProperties(_cleanCommonProps, [\"innerRef\", \"isDisabled\", \"isHidden\"]);\n\n return jsx(\"div\", {\n css: getStyles('input', props)\n }, jsx(AutosizeInput, _extends({\n className: cx({\n input: true\n }, className),\n inputRef: innerRef,\n inputStyle: inputStyle(isHidden),\n disabled: isDisabled\n }, innerProps)));\n};\n\nvar multiValueCSS = function multiValueCSS(_ref) {\n var _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n borderRadius = _ref$theme.borderRadius,\n colors = _ref$theme.colors;\n return {\n label: 'multiValue',\n backgroundColor: colors.neutral10,\n borderRadius: borderRadius / 2,\n display: 'flex',\n margin: spacing.baseUnit / 2,\n minWidth: 0 // resolves flex/text-overflow bug\n\n };\n};\nvar multiValueLabelCSS = function multiValueLabelCSS(_ref2) {\n var _ref2$theme = _ref2.theme,\n borderRadius = _ref2$theme.borderRadius,\n colors = _ref2$theme.colors,\n cropWithEllipsis = _ref2.cropWithEllipsis;\n return {\n borderRadius: borderRadius / 2,\n color: colors.neutral80,\n fontSize: '85%',\n overflow: 'hidden',\n padding: 3,\n paddingLeft: 6,\n textOverflow: cropWithEllipsis ? 'ellipsis' : null,\n whiteSpace: 'nowrap'\n };\n};\nvar multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) {\n var _ref3$theme = _ref3.theme,\n spacing = _ref3$theme.spacing,\n borderRadius = _ref3$theme.borderRadius,\n colors = _ref3$theme.colors,\n isFocused = _ref3.isFocused;\n return {\n alignItems: 'center',\n borderRadius: borderRadius / 2,\n backgroundColor: isFocused && colors.dangerLight,\n display: 'flex',\n paddingLeft: spacing.baseUnit,\n paddingRight: spacing.baseUnit,\n ':hover': {\n backgroundColor: colors.dangerLight,\n color: colors.danger\n }\n };\n};\nvar MultiValueGeneric = function MultiValueGeneric(_ref4) {\n var children = _ref4.children,\n innerProps = _ref4.innerProps;\n return jsx(\"div\", innerProps, children);\n};\nvar MultiValueContainer = MultiValueGeneric;\nvar MultiValueLabel = MultiValueGeneric;\nfunction MultiValueRemove(_ref5) {\n var children = _ref5.children,\n innerProps = _ref5.innerProps;\n return jsx(\"div\", innerProps, children || jsx(CrossIcon, {\n size: 14\n }));\n}\n\nvar MultiValue = function MultiValue(props) {\n var children = props.children,\n className = props.className,\n components = props.components,\n cx = props.cx,\n data = props.data,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n isDisabled = props.isDisabled,\n removeProps = props.removeProps,\n selectProps = props.selectProps;\n var Container = components.Container,\n Label = components.Label,\n Remove = components.Remove;\n return jsx(ClassNames, null, function (_ref6) {\n var css = _ref6.css,\n emotionCx = _ref6.cx;\n return jsx(Container, {\n data: data,\n innerProps: _objectSpread2({\n className: emotionCx(css(getStyles('multiValue', props)), cx({\n 'multi-value': true,\n 'multi-value--is-disabled': isDisabled\n }, className))\n }, innerProps),\n selectProps: selectProps\n }, jsx(Label, {\n data: data,\n innerProps: {\n className: emotionCx(css(getStyles('multiValueLabel', props)), cx({\n 'multi-value__label': true\n }, className))\n },\n selectProps: selectProps\n }, children), jsx(Remove, {\n data: data,\n innerProps: _objectSpread2({\n className: emotionCx(css(getStyles('multiValueRemove', props)), cx({\n 'multi-value__remove': true\n }, className))\n }, removeProps),\n selectProps: selectProps\n }));\n });\n};\n\nMultiValue.defaultProps = {\n cropWithEllipsis: true\n};\n\nvar optionCSS = function optionCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n isFocused = _ref.isFocused,\n isSelected = _ref.isSelected,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n label: 'option',\n backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',\n color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',\n cursor: 'default',\n display: 'block',\n fontSize: 'inherit',\n padding: \"\".concat(spacing.baseUnit * 2, \"px \").concat(spacing.baseUnit * 3, \"px\"),\n width: '100%',\n userSelect: 'none',\n WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',\n // provide some affordance on touch devices\n ':active': {\n backgroundColor: !isDisabled && (isSelected ? colors.primary : colors.primary50)\n }\n };\n};\n\nvar Option = function Option(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n isDisabled = props.isDisabled,\n isFocused = props.isFocused,\n isSelected = props.isSelected,\n innerRef = props.innerRef,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('option', props),\n className: cx({\n option: true,\n 'option--is-disabled': isDisabled,\n 'option--is-focused': isFocused,\n 'option--is-selected': isSelected\n }, className),\n ref: innerRef\n }, innerProps), children);\n};\n\nvar placeholderCSS = function placeholderCSS(_ref) {\n var _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n label: 'placeholder',\n color: colors.neutral50,\n marginLeft: spacing.baseUnit / 2,\n marginRight: spacing.baseUnit / 2,\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)'\n };\n};\n\nvar Placeholder = function Placeholder(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('placeholder', props),\n className: cx({\n placeholder: true\n }, className)\n }, innerProps), children);\n};\n\nvar css$1 = function css(_ref) {\n var isDisabled = _ref.isDisabled,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n label: 'singleValue',\n color: isDisabled ? colors.neutral40 : colors.neutral80,\n marginLeft: spacing.baseUnit / 2,\n marginRight: spacing.baseUnit / 2,\n maxWidth: \"calc(100% - \".concat(spacing.baseUnit * 2, \"px)\"),\n overflow: 'hidden',\n position: 'absolute',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n top: '50%',\n transform: 'translateY(-50%)'\n };\n};\n\nvar SingleValue = function SingleValue(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n isDisabled = props.isDisabled,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('singleValue', props),\n className: cx({\n 'single-value': true,\n 'single-value--is-disabled': isDisabled\n }, className)\n }, innerProps), children);\n};\n\nvar components = {\n ClearIndicator: ClearIndicator,\n Control: Control,\n DropdownIndicator: DropdownIndicator,\n DownChevron: DownChevron,\n CrossIcon: CrossIcon,\n Group: Group,\n GroupHeading: GroupHeading,\n IndicatorsContainer: IndicatorsContainer,\n IndicatorSeparator: IndicatorSeparator,\n Input: Input,\n LoadingIndicator: LoadingIndicator,\n Menu: Menu,\n MenuList: MenuList,\n MenuPortal: MenuPortal,\n LoadingMessage: LoadingMessage,\n NoOptionsMessage: NoOptionsMessage,\n MultiValue: MultiValue,\n MultiValueContainer: MultiValueContainer,\n MultiValueLabel: MultiValueLabel,\n MultiValueRemove: MultiValueRemove,\n Option: Option,\n Placeholder: Placeholder,\n SelectContainer: SelectContainer,\n SingleValue: SingleValue,\n ValueContainer: ValueContainer\n};\nvar defaultComponents = function defaultComponents(props) {\n return _objectSpread2(_objectSpread2({}, components), props.components);\n};\n\nexport { isMobileDevice as A, classNames as B, defaultComponents as C, isDocumentElement as D, cleanValue as E, scrollIntoView as F, noop as G, handleInputChange as H, MenuPlacer as M, _createSuper as _, _objectSpread2 as a, clearIndicatorCSS as b, components as c, containerCSS as d, css as e, dropdownIndicatorCSS as f, groupCSS as g, groupHeadingCSS as h, indicatorsContainerCSS as i, indicatorSeparatorCSS as j, inputCSS as k, loadingIndicatorCSS as l, loadingMessageCSS as m, menuCSS as n, menuListCSS as o, menuPortalCSS as p, multiValueCSS as q, multiValueLabelCSS as r, supportsPassiveEvents as s, multiValueRemoveCSS as t, noOptionsMessageCSS as u, optionCSS as v, placeholderCSS as w, css$1 as x, valueContainerCSS as y, isTouchCapable as z };\n","export default function _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n return memoized;\n}\n\nexport default memoizeOne;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { a as _objectSpread2, s as supportsPassiveEvents, b as clearIndicatorCSS, d as containerCSS, e as css$1, f as dropdownIndicatorCSS, g as groupCSS, h as groupHeadingCSS, i as indicatorsContainerCSS, j as indicatorSeparatorCSS, k as inputCSS, l as loadingIndicatorCSS, m as loadingMessageCSS, n as menuCSS, o as menuListCSS, p as menuPortalCSS, q as multiValueCSS, r as multiValueLabelCSS, t as multiValueRemoveCSS, u as noOptionsMessageCSS, v as optionCSS, w as placeholderCSS, x as css$2, y as valueContainerCSS, z as isTouchCapable, A as isMobileDevice, _ as _createSuper, B as classNames, C as defaultComponents, D as isDocumentElement, E as cleanValue, F as scrollIntoView, G as noop, M as MenuPlacer } from './index-4bd03571.esm.js';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\nimport React, { useMemo, useRef, useCallback, useEffect, Component } from 'react';\nimport { jsx, css } from '@emotion/react';\nimport memoizeOne from 'memoize-one';\nimport _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';\n\nfunction _EMOTION_STRINGIFIED_CSS_ERROR__() { return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\"; }\n\nvar _ref = process.env.NODE_ENV === \"production\" ? {\n name: \"7pg0cj-a11yText\",\n 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\"\n} : {\n name: \"1f43avz-a11yText-A11yText\",\n 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;label:A11yText;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVFJIiwiZmlsZSI6IkExMXlUZXh0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQGZsb3dcbi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgdHlwZSBFbGVtZW50Q29uZmlnIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vLyBBc3Npc3RpdmUgdGV4dCB0byBkZXNjcmliZSB2aXN1YWwgZWxlbWVudHMuIEhpZGRlbiBmb3Igc2lnaHRlZCB1c2Vycy5cbmNvbnN0IEExMXlUZXh0ID0gKHByb3BzOiBFbGVtZW50Q29uZmlnPCdzcGFuJz4pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__\n};\n\nvar A11yText = function A11yText(props) {\n return jsx(\"span\", _extends({\n css: _ref\n }, props));\n};\n\nvar defaultAriaLiveMessages = {\n guidance: function guidance(props) {\n var isSearchable = props.isSearchable,\n isMulti = props.isMulti,\n isDisabled = props.isDisabled,\n tabSelectsValue = props.tabSelectsValue,\n context = props.context;\n\n switch (context) {\n case 'menu':\n return \"Use Up and Down to choose options\".concat(isDisabled ? '' : ', press Enter to select the currently focused option', \", press Escape to exit the menu\").concat(tabSelectsValue ? ', press Tab to select the option and exit the menu' : '', \".\");\n\n case 'input':\n return \"\".concat(props['aria-label'] || 'Select', \" is focused \").concat(isSearchable ? ',type to refine list' : '', \", press Down to open the menu, \").concat(isMulti ? ' press left to focus selected values' : '');\n\n case 'value':\n return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value';\n\n default:\n return '';\n }\n },\n onChange: function onChange(props) {\n var action = props.action,\n _props$label = props.label,\n label = _props$label === void 0 ? '' : _props$label,\n isDisabled = props.isDisabled;\n\n switch (action) {\n case 'deselect-option':\n case 'pop-value':\n case 'remove-value':\n return \"option \".concat(label, \", deselected.\");\n\n case 'select-option':\n return isDisabled ? \"option \".concat(label, \" is disabled. Select another option.\") : \"option \".concat(label, \", selected.\");\n\n default:\n return '';\n }\n },\n onFocus: function onFocus(props) {\n var context = props.context,\n _props$focused = props.focused,\n focused = _props$focused === void 0 ? {} : _props$focused,\n options = props.options,\n _props$label2 = props.label,\n label = _props$label2 === void 0 ? '' : _props$label2,\n selectValue = props.selectValue,\n isDisabled = props.isDisabled,\n isSelected = props.isSelected;\n\n var getArrayIndex = function getArrayIndex(arr, item) {\n return arr && arr.length ? \"\".concat(arr.indexOf(item) + 1, \" of \").concat(arr.length) : '';\n };\n\n if (context === 'value' && selectValue) {\n return \"value \".concat(label, \" focused, \").concat(getArrayIndex(selectValue, focused), \".\");\n }\n\n if (context === 'menu') {\n var disabled = isDisabled ? ' disabled' : '';\n var status = \"\".concat(isSelected ? 'selected' : 'focused').concat(disabled);\n return \"option \".concat(label, \" \").concat(status, \", \").concat(getArrayIndex(options, focused), \".\");\n }\n\n return '';\n },\n onFilter: function onFilter(props) {\n var inputValue = props.inputValue,\n resultsMessage = props.resultsMessage;\n return \"\".concat(resultsMessage).concat(inputValue ? ' for search term ' + inputValue : '', \".\");\n }\n};\n\nvar LiveRegion = function LiveRegion(props) {\n var ariaSelection = props.ariaSelection,\n focusedOption = props.focusedOption,\n focusedValue = props.focusedValue,\n focusableOptions = props.focusableOptions,\n isFocused = props.isFocused,\n selectValue = props.selectValue,\n selectProps = props.selectProps;\n var ariaLiveMessages = selectProps.ariaLiveMessages,\n getOptionLabel = selectProps.getOptionLabel,\n inputValue = selectProps.inputValue,\n isMulti = selectProps.isMulti,\n isOptionDisabled = selectProps.isOptionDisabled,\n isSearchable = selectProps.isSearchable,\n menuIsOpen = selectProps.menuIsOpen,\n options = selectProps.options,\n screenReaderStatus = selectProps.screenReaderStatus,\n tabSelectsValue = selectProps.tabSelectsValue;\n var ariaLabel = selectProps['aria-label'];\n var ariaLive = selectProps['aria-live']; // Update aria live message configuration when prop changes\n\n var messages = useMemo(function () {\n return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});\n }, [ariaLiveMessages]); // Update aria live selected option when prop changes\n\n var ariaSelected = useMemo(function () {\n var message = '';\n\n if (ariaSelection && messages.onChange) {\n var option = ariaSelection.option,\n removedValue = ariaSelection.removedValue,\n value = ariaSelection.value; // select-option when !isMulti does not return option so we assume selected option is value\n\n var asOption = function asOption(val) {\n return !Array.isArray(val) ? val : null;\n };\n\n var selected = removedValue || option || asOption(value);\n\n var onChangeProps = _objectSpread2({\n isDisabled: selected && isOptionDisabled(selected),\n label: selected ? getOptionLabel(selected) : ''\n }, ariaSelection);\n\n message = messages.onChange(onChangeProps);\n }\n\n return message;\n }, [ariaSelection, isOptionDisabled, getOptionLabel, messages]);\n var ariaFocused = useMemo(function () {\n var focusMsg = '';\n var focused = focusedOption || focusedValue;\n var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));\n\n if (focused && messages.onFocus) {\n var onFocusProps = {\n focused: focused,\n label: getOptionLabel(focused),\n isDisabled: isOptionDisabled(focused),\n isSelected: isSelected,\n options: options,\n context: focused === focusedOption ? 'menu' : 'value',\n selectValue: selectValue\n };\n focusMsg = messages.onFocus(onFocusProps);\n }\n\n return focusMsg;\n }, [focusedOption, focusedValue, getOptionLabel, isOptionDisabled, messages, options, selectValue]);\n var ariaResults = useMemo(function () {\n var resultsMsg = '';\n\n if (menuIsOpen && options.length && messages.onFilter) {\n var resultsMessage = screenReaderStatus({\n count: focusableOptions.length\n });\n resultsMsg = messages.onFilter({\n inputValue: inputValue,\n resultsMessage: resultsMessage\n });\n }\n\n return resultsMsg;\n }, [focusableOptions, inputValue, menuIsOpen, messages, options, screenReaderStatus]);\n var ariaGuidance = useMemo(function () {\n var guidanceMsg = '';\n\n if (messages.guidance) {\n var context = focusedValue ? 'value' : menuIsOpen ? 'menu' : 'input';\n guidanceMsg = messages.guidance({\n 'aria-label': ariaLabel,\n context: context,\n isDisabled: focusedOption && isOptionDisabled(focusedOption),\n isMulti: isMulti,\n isSearchable: isSearchable,\n tabSelectsValue: tabSelectsValue\n });\n }\n\n return guidanceMsg;\n }, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled, isSearchable, menuIsOpen, messages, tabSelectsValue]);\n var ariaContext = \"\".concat(ariaFocused, \" \").concat(ariaResults, \" \").concat(ariaGuidance);\n return jsx(A11yText, {\n \"aria-live\": ariaLive,\n \"aria-atomic\": \"false\",\n \"aria-relevant\": \"additions text\"\n }, isFocused && jsx(React.Fragment, null, jsx(\"span\", {\n id: \"aria-selection\"\n }, ariaSelected), jsx(\"span\", {\n id: \"aria-context\"\n }, ariaContext)));\n};\n\nvar diacritics = [{\n base: 'A',\n letters: \"A\\u24B6\\uFF21\\xC0\\xC1\\xC2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\xC3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\xC4\\u01DE\\u1EA2\\xC5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F\"\n}, {\n base: 'AA',\n letters: \"\\uA732\"\n}, {\n base: 'AE',\n letters: \"\\xC6\\u01FC\\u01E2\"\n}, {\n base: 'AO',\n letters: \"\\uA734\"\n}, {\n base: 'AU',\n letters: \"\\uA736\"\n}, {\n base: 'AV',\n letters: \"\\uA738\\uA73A\"\n}, {\n base: 'AY',\n letters: \"\\uA73C\"\n}, {\n base: 'B',\n letters: \"B\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181\"\n}, {\n base: 'C',\n letters: \"C\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\xC7\\u1E08\\u0187\\u023B\\uA73E\"\n}, {\n base: 'D',\n letters: \"D\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779\"\n}, {\n base: 'DZ',\n letters: \"\\u01F1\\u01C4\"\n}, {\n base: 'Dz',\n letters: \"\\u01F2\\u01C5\"\n}, {\n base: 'E',\n letters: \"E\\u24BA\\uFF25\\xC8\\xC9\\xCA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\xCB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E\"\n}, {\n base: 'F',\n letters: \"F\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B\"\n}, {\n base: 'G',\n letters: \"G\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E\"\n}, {\n base: 'H',\n letters: \"H\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D\"\n}, {\n base: 'I',\n letters: \"I\\u24BE\\uFF29\\xCC\\xCD\\xCE\\u0128\\u012A\\u012C\\u0130\\xCF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197\"\n}, {\n base: 'J',\n letters: \"J\\u24BF\\uFF2A\\u0134\\u0248\"\n}, {\n base: 'K',\n letters: \"K\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2\"\n}, {\n base: 'L',\n letters: \"L\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780\"\n}, {\n base: 'LJ',\n letters: \"\\u01C7\"\n}, {\n base: 'Lj',\n letters: \"\\u01C8\"\n}, {\n base: 'M',\n letters: \"M\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C\"\n}, {\n base: 'N',\n letters: \"N\\u24C3\\uFF2E\\u01F8\\u0143\\xD1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4\"\n}, {\n base: 'NJ',\n letters: \"\\u01CA\"\n}, {\n base: 'Nj',\n letters: \"\\u01CB\"\n}, {\n base: 'O',\n letters: \"O\\u24C4\\uFF2F\\xD2\\xD3\\xD4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\xD5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\xD6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\xD8\\u01FE\\u0186\\u019F\\uA74A\\uA74C\"\n}, {\n base: 'OI',\n letters: \"\\u01A2\"\n}, {\n base: 'OO',\n letters: \"\\uA74E\"\n}, {\n base: 'OU',\n letters: \"\\u0222\"\n}, {\n base: 'P',\n letters: \"P\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754\"\n}, {\n base: 'Q',\n letters: \"Q\\u24C6\\uFF31\\uA756\\uA758\\u024A\"\n}, {\n base: 'R',\n letters: \"R\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782\"\n}, {\n base: 'S',\n letters: \"S\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784\"\n}, {\n base: 'T',\n letters: \"T\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786\"\n}, {\n base: 'TZ',\n letters: \"\\uA728\"\n}, {\n base: 'U',\n letters: \"U\\u24CA\\uFF35\\xD9\\xDA\\xDB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\xDC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244\"\n}, {\n base: 'V',\n letters: \"V\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245\"\n}, {\n base: 'VY',\n letters: \"\\uA760\"\n}, {\n base: 'W',\n letters: \"W\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72\"\n}, {\n base: 'X',\n letters: \"X\\u24CD\\uFF38\\u1E8A\\u1E8C\"\n}, {\n base: 'Y',\n letters: \"Y\\u24CE\\uFF39\\u1EF2\\xDD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE\"\n}, {\n base: 'Z',\n letters: \"Z\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762\"\n}, {\n base: 'a',\n letters: \"a\\u24D0\\uFF41\\u1E9A\\xE0\\xE1\\xE2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\xE3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\xE4\\u01DF\\u1EA3\\xE5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250\"\n}, {\n base: 'aa',\n letters: \"\\uA733\"\n}, {\n base: 'ae',\n letters: \"\\xE6\\u01FD\\u01E3\"\n}, {\n base: 'ao',\n letters: \"\\uA735\"\n}, {\n base: 'au',\n letters: \"\\uA737\"\n}, {\n base: 'av',\n letters: \"\\uA739\\uA73B\"\n}, {\n base: 'ay',\n letters: \"\\uA73D\"\n}, {\n base: 'b',\n letters: \"b\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253\"\n}, {\n base: 'c',\n letters: \"c\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\xE7\\u1E09\\u0188\\u023C\\uA73F\\u2184\"\n}, {\n base: 'd',\n letters: \"d\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A\"\n}, {\n base: 'dz',\n letters: \"\\u01F3\\u01C6\"\n}, {\n base: 'e',\n letters: \"e\\u24D4\\uFF45\\xE8\\xE9\\xEA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\xEB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD\"\n}, {\n base: 'f',\n letters: \"f\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C\"\n}, {\n base: 'g',\n letters: \"g\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F\"\n}, {\n base: 'h',\n letters: \"h\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265\"\n}, {\n base: 'hv',\n letters: \"\\u0195\"\n}, {\n base: 'i',\n letters: \"i\\u24D8\\uFF49\\xEC\\xED\\xEE\\u0129\\u012B\\u012D\\xEF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131\"\n}, {\n base: 'j',\n letters: \"j\\u24D9\\uFF4A\\u0135\\u01F0\\u0249\"\n}, {\n base: 'k',\n letters: \"k\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3\"\n}, {\n base: 'l',\n letters: \"l\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747\"\n}, {\n base: 'lj',\n letters: \"\\u01C9\"\n}, {\n base: 'm',\n letters: \"m\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F\"\n}, {\n base: 'n',\n letters: \"n\\u24DD\\uFF4E\\u01F9\\u0144\\xF1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5\"\n}, {\n base: 'nj',\n letters: \"\\u01CC\"\n}, {\n base: 'o',\n letters: \"o\\u24DE\\uFF4F\\xF2\\xF3\\xF4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\xF5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\xF6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\xF8\\u01FF\\u0254\\uA74B\\uA74D\\u0275\"\n}, {\n base: 'oi',\n letters: \"\\u01A3\"\n}, {\n base: 'ou',\n letters: \"\\u0223\"\n}, {\n base: 'oo',\n letters: \"\\uA74F\"\n}, {\n base: 'p',\n letters: \"p\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755\"\n}, {\n base: 'q',\n letters: \"q\\u24E0\\uFF51\\u024B\\uA757\\uA759\"\n}, {\n base: 'r',\n letters: \"r\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783\"\n}, {\n base: 's',\n letters: \"s\\u24E2\\uFF53\\xDF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B\"\n}, {\n base: 't',\n letters: \"t\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787\"\n}, {\n base: 'tz',\n letters: \"\\uA729\"\n}, {\n base: 'u',\n letters: \"u\\u24E4\\uFF55\\xF9\\xFA\\xFB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\xFC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289\"\n}, {\n base: 'v',\n letters: \"v\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C\"\n}, {\n base: 'vy',\n letters: \"\\uA761\"\n}, {\n base: 'w',\n letters: \"w\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73\"\n}, {\n base: 'x',\n letters: \"x\\u24E7\\uFF58\\u1E8B\\u1E8D\"\n}, {\n base: 'y',\n letters: \"y\\u24E8\\uFF59\\u1EF3\\xFD\\u0177\\u1EF9\\u0233\\u1E8F\\xFF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF\"\n}, {\n base: 'z',\n letters: \"z\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763\"\n}];\nvar anyDiacritic = new RegExp('[' + diacritics.map(function (d) {\n return d.letters;\n}).join('') + ']', 'g');\nvar diacriticToBase = {};\n\nfor (var i = 0; i < diacritics.length; i++) {\n var diacritic = diacritics[i];\n\n for (var j = 0; j < diacritic.letters.length; j++) {\n diacriticToBase[diacritic.letters[j]] = diacritic.base;\n }\n}\n\nvar stripDiacritics = function stripDiacritics(str) {\n return str.replace(anyDiacritic, function (match) {\n return diacriticToBase[match];\n });\n};\n\nvar memoizedStripDiacriticsForInput = memoizeOne(stripDiacritics);\n\nvar trimString = function trimString(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n};\n\nvar defaultStringify = function defaultStringify(option) {\n return \"\".concat(option.label, \" \").concat(option.value);\n};\n\nvar createFilter = function createFilter(config) {\n return function (option, rawInput) {\n var _ignoreCase$ignoreAcc = _objectSpread2({\n ignoreCase: true,\n ignoreAccents: true,\n stringify: defaultStringify,\n trim: true,\n matchFrom: 'any'\n }, config),\n ignoreCase = _ignoreCase$ignoreAcc.ignoreCase,\n ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents,\n stringify = _ignoreCase$ignoreAcc.stringify,\n trim = _ignoreCase$ignoreAcc.trim,\n matchFrom = _ignoreCase$ignoreAcc.matchFrom;\n\n var input = trim ? trimString(rawInput) : rawInput;\n var candidate = trim ? trimString(stringify(option)) : stringify(option);\n\n if (ignoreCase) {\n input = input.toLowerCase();\n candidate = candidate.toLowerCase();\n }\n\n if (ignoreAccents) {\n input = memoizedStripDiacriticsForInput(input);\n candidate = stripDiacritics(candidate);\n }\n\n return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;\n };\n};\n\nfunction DummyInput(_ref) {\n _ref.in;\n _ref.out;\n _ref.onExited;\n _ref.appear;\n _ref.enter;\n _ref.exit;\n var innerRef = _ref.innerRef;\n _ref.emotion;\n var props = _objectWithoutProperties(_ref, [\"in\", \"out\", \"onExited\", \"appear\", \"enter\", \"exit\", \"innerRef\", \"emotion\"]);\n\n return jsx(\"input\", _extends({\n ref: innerRef\n }, props, {\n css: /*#__PURE__*/css({\n label: 'dummyInput',\n // get rid of any default styles\n background: 0,\n border: 0,\n fontSize: 'inherit',\n outline: 0,\n padding: 0,\n // important! without `width` browsers won't allow focus\n width: 1,\n // remove cursor on desktop\n color: 'transparent',\n // remove cursor on mobile whilst maintaining \"scroll into view\" behaviour\n left: -100,\n opacity: 0,\n position: 'relative',\n transform: 'scale(0)'\n }, process.env.NODE_ENV === \"production\" ? \"\" : \";label:DummyInput;\", process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJNIiwiZmlsZSI6IkR1bW15SW5wdXQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbjogaW5Qcm9wLFxuICBvdXQsXG4gIG9uRXhpdGVkLFxuICBhcHBlYXIsXG4gIGVudGVyLFxuICBleGl0LFxuICBpbm5lclJlZixcbiAgZW1vdGlvbixcbiAgLi4ucHJvcHNcbn06IGFueSkge1xuICByZXR1cm4gKFxuICAgIDxpbnB1dFxuICAgICAgcmVmPXtpbm5lclJlZn1cbiAgICAgIHsuLi5wcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSgwKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */\")\n }));\n}\n\nvar cancelScroll = function cancelScroll(event) {\n event.preventDefault();\n event.stopPropagation();\n};\n\nfunction useScrollCapture(_ref) {\n var isEnabled = _ref.isEnabled,\n onBottomArrive = _ref.onBottomArrive,\n onBottomLeave = _ref.onBottomLeave,\n onTopArrive = _ref.onTopArrive,\n onTopLeave = _ref.onTopLeave;\n var isBottom = useRef(false);\n var isTop = useRef(false);\n var touchStart = useRef(0);\n var scrollTarget = useRef(null);\n var handleEventDelta = useCallback(function (event, delta) {\n // Reference should never be `null` at this point, but flow complains otherwise\n if (scrollTarget.current === null) return;\n var _scrollTarget$current = scrollTarget.current,\n scrollTop = _scrollTarget$current.scrollTop,\n scrollHeight = _scrollTarget$current.scrollHeight,\n clientHeight = _scrollTarget$current.clientHeight;\n var target = scrollTarget.current;\n var isDeltaPositive = delta > 0;\n var availableScroll = scrollHeight - clientHeight - scrollTop;\n var shouldCancelScroll = false; // reset bottom/top flags\n\n if (availableScroll > delta && isBottom.current) {\n if (onBottomLeave) onBottomLeave(event);\n isBottom.current = false;\n }\n\n if (isDeltaPositive && isTop.current) {\n if (onTopLeave) onTopLeave(event);\n isTop.current = false;\n } // bottom limit\n\n\n if (isDeltaPositive && delta > availableScroll) {\n if (onBottomArrive && !isBottom.current) {\n onBottomArrive(event);\n }\n\n target.scrollTop = scrollHeight;\n shouldCancelScroll = true;\n isBottom.current = true; // top limit\n } else if (!isDeltaPositive && -delta > scrollTop) {\n if (onTopArrive && !isTop.current) {\n onTopArrive(event);\n }\n\n target.scrollTop = 0;\n shouldCancelScroll = true;\n isTop.current = true;\n } // cancel scroll\n\n\n if (shouldCancelScroll) {\n cancelScroll(event);\n }\n }, []);\n var onWheel = useCallback(function (event) {\n handleEventDelta(event, event.deltaY);\n }, [handleEventDelta]);\n var onTouchStart = useCallback(function (event) {\n // set touch start so we can calculate touchmove delta\n touchStart.current = event.changedTouches[0].clientY;\n }, []);\n var onTouchMove = useCallback(function (event) {\n var deltaY = touchStart.current - event.changedTouches[0].clientY;\n handleEventDelta(event, deltaY);\n }, [handleEventDelta]);\n var startListening = useCallback(function (el) {\n // bail early if no element is available to attach to\n if (!el) return;\n var notPassive = supportsPassiveEvents ? {\n passive: false\n } : false; // all the if statements are to appease Flow 😢\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('wheel', onWheel, notPassive);\n }\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchstart', onTouchStart, notPassive);\n }\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchmove', onTouchMove, notPassive);\n }\n }, [onTouchMove, onTouchStart, onWheel]);\n var stopListening = useCallback(function (el) {\n // bail early if no element is available to detach from\n if (!el) return; // all the if statements are to appease Flow 😢\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('wheel', onWheel, false);\n }\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchstart', onTouchStart, false);\n }\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchmove', onTouchMove, false);\n }\n }, [onTouchMove, onTouchStart, onWheel]);\n useEffect(function () {\n if (!isEnabled) return;\n var element = scrollTarget.current;\n startListening(element);\n return function () {\n stopListening(element);\n };\n }, [isEnabled, startListening, stopListening]);\n return function (element) {\n scrollTarget.current = element;\n };\n}\n\nvar STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position'];\nvar LOCK_STYLES = {\n boxSizing: 'border-box',\n // account for possible declaration `width: 100%;` on body\n overflow: 'hidden',\n position: 'relative',\n height: '100%'\n};\n\nfunction preventTouchMove(e) {\n e.preventDefault();\n}\n\nfunction allowTouchMove(e) {\n e.stopPropagation();\n}\n\nfunction preventInertiaScroll() {\n var top = this.scrollTop;\n var totalScroll = this.scrollHeight;\n var currentScroll = top + this.offsetHeight;\n\n if (top === 0) {\n this.scrollTop = 1;\n } else if (currentScroll === totalScroll) {\n this.scrollTop = top - 1;\n }\n} // `ontouchstart` check works on most browsers\n// `maxTouchPoints` works on IE10/11 and Surface\n\n\nfunction isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nvar activeScrollLocks = 0;\nvar listenerOptions = {\n capture: false,\n passive: false\n};\nfunction useScrollLock(_ref) {\n var isEnabled = _ref.isEnabled,\n _ref$accountForScroll = _ref.accountForScrollbars,\n accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;\n var originalStyles = useRef({});\n var scrollTarget = useRef(null);\n var addScrollLock = useCallback(function (touchScrollTarget) {\n if (!canUseDOM) return;\n var target = document.body;\n var targetStyle = target && target.style;\n\n if (accountForScrollbars) {\n // store any styles already applied to the body\n STYLE_KEYS.forEach(function (key) {\n var val = targetStyle && targetStyle[key];\n originalStyles.current[key] = val;\n });\n } // apply the lock styles and padding if this is the first scroll lock\n\n\n if (accountForScrollbars && activeScrollLocks < 1) {\n var currentPadding = parseInt(originalStyles.current.paddingRight, 10) || 0;\n var clientWidth = document.body ? document.body.clientWidth : 0;\n var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;\n Object.keys(LOCK_STYLES).forEach(function (key) {\n var val = LOCK_STYLES[key];\n\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n\n if (targetStyle) {\n targetStyle.paddingRight = \"\".concat(adjustedPadding, \"px\");\n }\n } // account for touch devices\n\n\n if (target && isTouchDevice()) {\n // Mobile Safari ignores { overflow: hidden } declaration on the body.\n target.addEventListener('touchmove', preventTouchMove, listenerOptions); // Allow scroll on provided target\n\n if (touchScrollTarget) {\n touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, listenerOptions);\n touchScrollTarget.addEventListener('touchmove', allowTouchMove, listenerOptions);\n }\n } // increment active scroll locks\n\n\n activeScrollLocks += 1;\n }, []);\n var removeScrollLock = useCallback(function (touchScrollTarget) {\n if (!canUseDOM) return;\n var target = document.body;\n var targetStyle = target && target.style; // safely decrement active scroll locks\n\n activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any\n\n if (accountForScrollbars && activeScrollLocks < 1) {\n STYLE_KEYS.forEach(function (key) {\n var val = originalStyles.current[key];\n\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n } // remove touch listeners\n\n\n if (target && isTouchDevice()) {\n target.removeEventListener('touchmove', preventTouchMove, listenerOptions);\n\n if (touchScrollTarget) {\n touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, listenerOptions);\n touchScrollTarget.removeEventListener('touchmove', allowTouchMove, listenerOptions);\n }\n }\n }, []);\n useEffect(function () {\n if (!isEnabled) return;\n var element = scrollTarget.current;\n addScrollLock(element);\n return function () {\n removeScrollLock(element);\n };\n }, [isEnabled, addScrollLock, removeScrollLock]);\n return function (element) {\n scrollTarget.current = element;\n };\n}\n\nfunction _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\"; }\n\nvar blurSelectInput = function blurSelectInput() {\n return document.activeElement && document.activeElement.blur();\n};\n\nvar _ref2 = process.env.NODE_ENV === \"production\" ? {\n name: \"1kfdb0e\",\n styles: \"position:fixed;left:0;bottom:0;right:0;top:0\"\n} : {\n name: \"bp8cua-ScrollManager\",\n styles: \"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0RVIiwiZmlsZSI6IlNjcm9sbE1hbmFnZXIuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgUmVhY3QsIHsgdHlwZSBFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHVzZVNj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BzZXRTY3JvbGxDYXB0dXJlVGFyZ2V0ID0gdXNlU2Nyb2xsQ2FwdHVyZSh7XG4gICAgaXNFbmFibGVkOiBjYXB0dXJlRW5hYmxlZCxcbiAgICBvbkJvdHRvbUFycml2ZSxcbiAgICBvbkJvdHRvbUxlYXZlLFxuICAgIG9uVG9wQXJyaXZlLFxuICAgIG9uVG9wTGVhdmUsXG4gIH0pO1xuICBjb25zdCBzZXRTY3JvbGxMb2NrVGFyZ2V0ID0gdXNlU2Nyb2xsTG9jayh7IGlzRW5hYmxlZDogbG9ja0VuYWJsZWQgfSk7XG5cbiAgY29uc3QgdGFyZ2V0UmVmID0gZWxlbWVudCA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPFJlYWN0LkZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvUmVhY3QuRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1\n};\n\nfunction ScrollManager(_ref) {\n var children = _ref.children,\n lockEnabled = _ref.lockEnabled,\n _ref$captureEnabled = _ref.captureEnabled,\n captureEnabled = _ref$captureEnabled === void 0 ? true : _ref$captureEnabled,\n onBottomArrive = _ref.onBottomArrive,\n onBottomLeave = _ref.onBottomLeave,\n onTopArrive = _ref.onTopArrive,\n onTopLeave = _ref.onTopLeave;\n var setScrollCaptureTarget = useScrollCapture({\n isEnabled: captureEnabled,\n onBottomArrive: onBottomArrive,\n onBottomLeave: onBottomLeave,\n onTopArrive: onTopArrive,\n onTopLeave: onTopLeave\n });\n var setScrollLockTarget = useScrollLock({\n isEnabled: lockEnabled\n });\n\n var targetRef = function targetRef(element) {\n setScrollCaptureTarget(element);\n setScrollLockTarget(element);\n };\n\n return jsx(React.Fragment, null, lockEnabled && jsx(\"div\", {\n onClick: blurSelectInput,\n css: _ref2\n }), children(targetRef));\n}\n\nvar formatGroupLabel = function formatGroupLabel(group) {\n return group.label;\n};\nvar getOptionLabel = function getOptionLabel(option) {\n return option.label;\n};\nvar getOptionValue = function getOptionValue(option) {\n return option.value;\n};\nvar isOptionDisabled = function isOptionDisabled(option) {\n return !!option.isDisabled;\n};\n\nvar defaultStyles = {\n clearIndicator: clearIndicatorCSS,\n container: containerCSS,\n control: css$1,\n dropdownIndicator: dropdownIndicatorCSS,\n group: groupCSS,\n groupHeading: groupHeadingCSS,\n indicatorsContainer: indicatorsContainerCSS,\n indicatorSeparator: indicatorSeparatorCSS,\n input: inputCSS,\n loadingIndicator: loadingIndicatorCSS,\n loadingMessage: loadingMessageCSS,\n menu: menuCSS,\n menuList: menuListCSS,\n menuPortal: menuPortalCSS,\n multiValue: multiValueCSS,\n multiValueLabel: multiValueLabelCSS,\n multiValueRemove: multiValueRemoveCSS,\n noOptionsMessage: noOptionsMessageCSS,\n option: optionCSS,\n placeholder: placeholderCSS,\n singleValue: css$2,\n valueContainer: valueContainerCSS\n}; // Merge Utility\n// Allows consumers to extend a base Select with additional styles\n\nfunction mergeStyles(source) {\n var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // initialize with source styles\n var styles = _objectSpread2({}, source); // massage in target styles\n\n\n Object.keys(target).forEach(function (key) {\n if (source[key]) {\n styles[key] = function (rsCss, props) {\n return target[key](source[key](rsCss, props), props);\n };\n } else {\n styles[key] = target[key];\n }\n });\n return styles;\n}\n\nvar colors = {\n primary: '#2684FF',\n primary75: '#4C9AFF',\n primary50: '#B2D4FF',\n primary25: '#DEEBFF',\n danger: '#DE350B',\n dangerLight: '#FFBDAD',\n neutral0: 'hsl(0, 0%, 100%)',\n neutral5: 'hsl(0, 0%, 95%)',\n neutral10: 'hsl(0, 0%, 90%)',\n neutral20: 'hsl(0, 0%, 80%)',\n neutral30: 'hsl(0, 0%, 70%)',\n neutral40: 'hsl(0, 0%, 60%)',\n neutral50: 'hsl(0, 0%, 50%)',\n neutral60: 'hsl(0, 0%, 40%)',\n neutral70: 'hsl(0, 0%, 30%)',\n neutral80: 'hsl(0, 0%, 20%)',\n neutral90: 'hsl(0, 0%, 10%)'\n};\nvar borderRadius = 4; // Used to calculate consistent margin/padding on elements\n\nvar baseUnit = 4; // The minimum height of the control\n\nvar controlHeight = 38; // The amount of space between the control and menu */\n\nvar menuGutter = baseUnit * 2;\nvar spacing = {\n baseUnit: baseUnit,\n controlHeight: controlHeight,\n menuGutter: menuGutter\n};\nvar defaultTheme = {\n borderRadius: borderRadius,\n colors: colors,\n spacing: spacing\n};\n\nvar defaultProps = {\n 'aria-live': 'polite',\n backspaceRemovesValue: true,\n blurInputOnSelect: isTouchCapable(),\n captureMenuScroll: !isTouchCapable(),\n closeMenuOnSelect: true,\n closeMenuOnScroll: false,\n components: {},\n controlShouldRenderValue: true,\n escapeClearsValue: false,\n filterOption: createFilter(),\n formatGroupLabel: formatGroupLabel,\n getOptionLabel: getOptionLabel,\n getOptionValue: getOptionValue,\n isDisabled: false,\n isLoading: false,\n isMulti: false,\n isRtl: false,\n isSearchable: true,\n isOptionDisabled: isOptionDisabled,\n loadingMessage: function loadingMessage() {\n return 'Loading...';\n },\n maxMenuHeight: 300,\n minMenuHeight: 140,\n menuIsOpen: false,\n menuPlacement: 'bottom',\n menuPosition: 'absolute',\n menuShouldBlockScroll: false,\n menuShouldScrollIntoView: !isMobileDevice(),\n noOptionsMessage: function noOptionsMessage() {\n return 'No options';\n },\n openMenuOnFocus: false,\n openMenuOnClick: true,\n options: [],\n pageSize: 5,\n placeholder: 'Select...',\n screenReaderStatus: function screenReaderStatus(_ref) {\n var count = _ref.count;\n return \"\".concat(count, \" result\").concat(count !== 1 ? 's' : '', \" available\");\n },\n styles: {},\n tabIndex: '0',\n tabSelectsValue: true\n};\n\nfunction toCategorizedOption(props, option, selectValue, index) {\n var isDisabled = _isOptionDisabled(props, option, selectValue);\n\n var isSelected = _isOptionSelected(props, option, selectValue);\n\n var label = getOptionLabel$1(props, option);\n var value = getOptionValue$1(props, option);\n return {\n type: 'option',\n data: option,\n isDisabled: isDisabled,\n isSelected: isSelected,\n label: label,\n value: value,\n index: index\n };\n}\n\nfunction buildCategorizedOptions(props, selectValue) {\n return props.options.map(function (groupOrOption, groupOrOptionIndex) {\n if (groupOrOption.options) {\n var categorizedOptions = groupOrOption.options.map(function (option, optionIndex) {\n return toCategorizedOption(props, option, selectValue, optionIndex);\n }).filter(function (categorizedOption) {\n return isFocusable(props, categorizedOption);\n });\n return categorizedOptions.length > 0 ? {\n type: 'group',\n data: groupOrOption,\n options: categorizedOptions,\n index: groupOrOptionIndex\n } : undefined;\n }\n\n var categorizedOption = toCategorizedOption(props, groupOrOption, selectValue, groupOrOptionIndex);\n return isFocusable(props, categorizedOption) ? categorizedOption : undefined;\n }) // Flow limitation (see https://github.com/facebook/flow/issues/1414)\n .filter(function (categorizedOption) {\n return !!categorizedOption;\n });\n}\n\nfunction buildFocusableOptionsFromCategorizedOptions(categorizedOptions) {\n return categorizedOptions.reduce(function (optionsAccumulator, categorizedOption) {\n if (categorizedOption.type === 'group') {\n optionsAccumulator.push.apply(optionsAccumulator, _toConsumableArray(categorizedOption.options.map(function (option) {\n return option.data;\n })));\n } else {\n optionsAccumulator.push(categorizedOption.data);\n }\n\n return optionsAccumulator;\n }, []);\n}\n\nfunction buildFocusableOptions(props, selectValue) {\n return buildFocusableOptionsFromCategorizedOptions(buildCategorizedOptions(props, selectValue));\n}\n\nfunction isFocusable(props, categorizedOption) {\n var _props$inputValue = props.inputValue,\n inputValue = _props$inputValue === void 0 ? '' : _props$inputValue;\n var data = categorizedOption.data,\n isSelected = categorizedOption.isSelected,\n label = categorizedOption.label,\n value = categorizedOption.value;\n return (!shouldHideSelectedOptions(props) || !isSelected) && _filterOption(props, {\n label: label,\n value: value,\n data: data\n }, inputValue);\n}\n\nfunction getNextFocusedValue(state, nextSelectValue) {\n var focusedValue = state.focusedValue,\n lastSelectValue = state.selectValue;\n var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);\n\n if (lastFocusedIndex > -1) {\n var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);\n\n if (nextFocusedIndex > -1) {\n // the focused value is still in the selectValue, return it\n return focusedValue;\n } else if (lastFocusedIndex < nextSelectValue.length) {\n // the focusedValue is not present in the next selectValue array by\n // reference, so return the new value at the same index\n return nextSelectValue[lastFocusedIndex];\n }\n }\n\n return null;\n}\n\nfunction getNextFocusedOption(state, options) {\n var lastFocusedOption = state.focusedOption;\n return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];\n}\n\nvar getOptionLabel$1 = function getOptionLabel(props, data) {\n return props.getOptionLabel(data);\n};\n\nvar getOptionValue$1 = function getOptionValue(props, data) {\n return props.getOptionValue(data);\n};\n\nfunction _isOptionDisabled(props, option, selectValue) {\n return typeof props.isOptionDisabled === 'function' ? props.isOptionDisabled(option, selectValue) : false;\n}\n\nfunction _isOptionSelected(props, option, selectValue) {\n if (selectValue.indexOf(option) > -1) return true;\n\n if (typeof props.isOptionSelected === 'function') {\n return props.isOptionSelected(option, selectValue);\n }\n\n var candidate = getOptionValue$1(props, option);\n return selectValue.some(function (i) {\n return getOptionValue$1(props, i) === candidate;\n });\n}\n\nfunction _filterOption(props, option, inputValue) {\n return props.filterOption ? props.filterOption(option, inputValue) : true;\n}\n\nvar shouldHideSelectedOptions = function shouldHideSelectedOptions(props) {\n var hideSelectedOptions = props.hideSelectedOptions,\n isMulti = props.isMulti;\n if (hideSelectedOptions === undefined) return isMulti;\n return hideSelectedOptions;\n};\n\nvar instanceId = 1;\n\nvar Select = /*#__PURE__*/function (_Component) {\n _inherits(Select, _Component);\n\n var _super = _createSuper(Select);\n\n // Misc. Instance Properties\n // ------------------------------\n // TODO\n // Refs\n // ------------------------------\n // Lifecycle\n // ------------------------------\n function Select(_props) {\n var _this;\n\n _classCallCheck(this, Select);\n\n _this = _super.call(this, _props);\n _this.state = {\n ariaSelection: null,\n focusedOption: null,\n focusedValue: null,\n inputIsHidden: false,\n isFocused: false,\n selectValue: [],\n clearFocusValueOnUpdate: false,\n inputIsHiddenAfterUpdate: undefined,\n prevProps: undefined\n };\n _this.blockOptionHover = false;\n _this.isComposing = false;\n _this.commonProps = void 0;\n _this.initialTouchX = 0;\n _this.initialTouchY = 0;\n _this.instancePrefix = '';\n _this.openAfterFocus = false;\n _this.scrollToFocusedOptionOnUpdate = false;\n _this.userIsDragging = void 0;\n _this.controlRef = null;\n\n _this.getControlRef = function (ref) {\n _this.controlRef = ref;\n };\n\n _this.focusedOptionRef = null;\n\n _this.getFocusedOptionRef = function (ref) {\n _this.focusedOptionRef = ref;\n };\n\n _this.menuListRef = null;\n\n _this.getMenuListRef = function (ref) {\n _this.menuListRef = ref;\n };\n\n _this.inputRef = null;\n\n _this.getInputRef = function (ref) {\n _this.inputRef = ref;\n };\n\n _this.focus = _this.focusInput;\n _this.blur = _this.blurInput;\n\n _this.onChange = function (newValue, actionMeta) {\n var _this$props = _this.props,\n onChange = _this$props.onChange,\n name = _this$props.name;\n actionMeta.name = name;\n\n _this.ariaOnChange(newValue, actionMeta);\n\n onChange(newValue, actionMeta);\n };\n\n _this.setValue = function (newValue) {\n var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value';\n var option = arguments.length > 2 ? arguments[2] : undefined;\n var _this$props2 = _this.props,\n closeMenuOnSelect = _this$props2.closeMenuOnSelect,\n isMulti = _this$props2.isMulti;\n\n _this.onInputChange('', {\n action: 'set-value'\n });\n\n if (closeMenuOnSelect) {\n _this.setState({\n inputIsHiddenAfterUpdate: !isMulti\n });\n\n _this.onMenuClose();\n } // when the select value should change, we should reset focusedValue\n\n\n _this.setState({\n clearFocusValueOnUpdate: true\n });\n\n _this.onChange(newValue, {\n action: action,\n option: option\n });\n };\n\n _this.selectOption = function (newValue) {\n var _this$props3 = _this.props,\n blurInputOnSelect = _this$props3.blurInputOnSelect,\n isMulti = _this$props3.isMulti,\n name = _this$props3.name;\n var selectValue = _this.state.selectValue;\n\n var deselected = isMulti && _this.isOptionSelected(newValue, selectValue);\n\n var isDisabled = _this.isOptionDisabled(newValue, selectValue);\n\n if (deselected) {\n var candidate = _this.getOptionValue(newValue);\n\n _this.setValue(selectValue.filter(function (i) {\n return _this.getOptionValue(i) !== candidate;\n }), 'deselect-option', newValue);\n } else if (!isDisabled) {\n // Select option if option is not disabled\n if (isMulti) {\n _this.setValue([].concat(_toConsumableArray(selectValue), [newValue]), 'select-option', newValue);\n } else {\n _this.setValue(newValue, 'select-option');\n }\n } else {\n _this.ariaOnChange(newValue, {\n action: 'select-option',\n name: name\n });\n\n return;\n }\n\n if (blurInputOnSelect) {\n _this.blurInput();\n }\n };\n\n _this.removeValue = function (removedValue) {\n var isMulti = _this.props.isMulti;\n var selectValue = _this.state.selectValue;\n\n var candidate = _this.getOptionValue(removedValue);\n\n var newValueArray = selectValue.filter(function (i) {\n return _this.getOptionValue(i) !== candidate;\n });\n var newValue = isMulti ? newValueArray : newValueArray[0] || null;\n\n _this.onChange(newValue, {\n action: 'remove-value',\n removedValue: removedValue\n });\n\n _this.focusInput();\n };\n\n _this.clearValue = function () {\n var selectValue = _this.state.selectValue;\n\n _this.onChange(_this.props.isMulti ? [] : null, {\n action: 'clear',\n removedValues: selectValue\n });\n };\n\n _this.popValue = function () {\n var isMulti = _this.props.isMulti;\n var selectValue = _this.state.selectValue;\n var lastSelectedValue = selectValue[selectValue.length - 1];\n var newValueArray = selectValue.slice(0, selectValue.length - 1);\n var newValue = isMulti ? newValueArray : newValueArray[0] || null;\n\n _this.onChange(newValue, {\n action: 'pop-value',\n removedValue: lastSelectedValue\n });\n };\n\n _this.getValue = function () {\n return _this.state.selectValue;\n };\n\n _this.cx = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return classNames.apply(void 0, [_this.props.classNamePrefix].concat(args));\n };\n\n _this.getOptionLabel = function (data) {\n return getOptionLabel$1(_this.props, data);\n };\n\n _this.getOptionValue = function (data) {\n return getOptionValue$1(_this.props, data);\n };\n\n _this.getStyles = function (key, props) {\n var base = defaultStyles[key](props);\n base.boxSizing = 'border-box';\n var custom = _this.props.styles[key];\n return custom ? custom(base, props) : base;\n };\n\n _this.getElementId = function (element) {\n return \"\".concat(_this.instancePrefix, \"-\").concat(element);\n };\n\n _this.getComponents = function () {\n return defaultComponents(_this.props);\n };\n\n _this.buildCategorizedOptions = function () {\n return buildCategorizedOptions(_this.props, _this.state.selectValue);\n };\n\n _this.getCategorizedOptions = function () {\n return _this.props.menuIsOpen ? _this.buildCategorizedOptions() : [];\n };\n\n _this.buildFocusableOptions = function () {\n return buildFocusableOptionsFromCategorizedOptions(_this.buildCategorizedOptions());\n };\n\n _this.getFocusableOptions = function () {\n return _this.props.menuIsOpen ? _this.buildFocusableOptions() : [];\n };\n\n _this.ariaOnChange = function (value, actionMeta) {\n _this.setState({\n ariaSelection: _objectSpread2({\n value: value\n }, actionMeta)\n });\n };\n\n _this.onMenuMouseDown = function (event) {\n if (event.button !== 0) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n\n _this.focusInput();\n };\n\n _this.onMenuMouseMove = function (event) {\n _this.blockOptionHover = false;\n };\n\n _this.onControlMouseDown = function (event) {\n var openMenuOnClick = _this.props.openMenuOnClick;\n\n if (!_this.state.isFocused) {\n if (openMenuOnClick) {\n _this.openAfterFocus = true;\n }\n\n _this.focusInput();\n } else if (!_this.props.menuIsOpen) {\n if (openMenuOnClick) {\n _this.openMenu('first');\n }\n } else {\n if ( // $FlowFixMe\n event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {\n _this.onMenuClose();\n }\n }\n\n if ( // $FlowFixMe\n event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {\n event.preventDefault();\n }\n };\n\n _this.onDropdownIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n\n if (_this.props.isDisabled) return;\n var _this$props4 = _this.props,\n isMulti = _this$props4.isMulti,\n menuIsOpen = _this$props4.menuIsOpen;\n\n _this.focusInput();\n\n if (menuIsOpen) {\n _this.setState({\n inputIsHiddenAfterUpdate: !isMulti\n });\n\n _this.onMenuClose();\n } else {\n _this.openMenu('first');\n }\n\n event.preventDefault();\n event.stopPropagation();\n };\n\n _this.onClearIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n\n _this.clearValue();\n\n event.stopPropagation();\n _this.openAfterFocus = false;\n\n if (event.type === 'touchend') {\n _this.focusInput();\n } else {\n setTimeout(function () {\n return _this.focusInput();\n });\n }\n };\n\n _this.onScroll = function (event) {\n if (typeof _this.props.closeMenuOnScroll === 'boolean') {\n if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {\n _this.props.onMenuClose();\n }\n } else if (typeof _this.props.closeMenuOnScroll === 'function') {\n if (_this.props.closeMenuOnScroll(event)) {\n _this.props.onMenuClose();\n }\n }\n };\n\n _this.onCompositionStart = function () {\n _this.isComposing = true;\n };\n\n _this.onCompositionEnd = function () {\n _this.isComposing = false;\n };\n\n _this.onTouchStart = function (_ref2) {\n var touches = _ref2.touches;\n var touch = touches && touches.item(0);\n\n if (!touch) {\n return;\n }\n\n _this.initialTouchX = touch.clientX;\n _this.initialTouchY = touch.clientY;\n _this.userIsDragging = false;\n };\n\n _this.onTouchMove = function (_ref3) {\n var touches = _ref3.touches;\n var touch = touches && touches.item(0);\n\n if (!touch) {\n return;\n }\n\n var deltaX = Math.abs(touch.clientX - _this.initialTouchX);\n var deltaY = Math.abs(touch.clientY - _this.initialTouchY);\n var moveThreshold = 5;\n _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;\n };\n\n _this.onTouchEnd = function (event) {\n if (_this.userIsDragging) return; // close the menu if the user taps outside\n // we're checking on event.target here instead of event.currentTarget, because we want to assert information\n // on events on child elements, not the document (which we've attached this handler to).\n\n if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) {\n _this.blurInput();\n } // reset move vars\n\n\n _this.initialTouchX = 0;\n _this.initialTouchY = 0;\n };\n\n _this.onControlTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onControlMouseDown(event);\n };\n\n _this.onClearIndicatorTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onClearIndicatorMouseDown(event);\n };\n\n _this.onDropdownIndicatorTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onDropdownIndicatorMouseDown(event);\n };\n\n _this.handleInputChange = function (event) {\n var inputValue = event.currentTarget.value;\n\n _this.setState({\n inputIsHiddenAfterUpdate: false\n });\n\n _this.onInputChange(inputValue, {\n action: 'input-change'\n });\n\n if (!_this.props.menuIsOpen) {\n _this.onMenuOpen();\n }\n };\n\n _this.onInputFocus = function (event) {\n if (_this.props.onFocus) {\n _this.props.onFocus(event);\n }\n\n _this.setState({\n inputIsHiddenAfterUpdate: false,\n isFocused: true\n });\n\n if (_this.openAfterFocus || _this.props.openMenuOnFocus) {\n _this.openMenu('first');\n }\n\n _this.openAfterFocus = false;\n };\n\n _this.onInputBlur = function (event) {\n if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) {\n _this.inputRef.focus();\n\n return;\n }\n\n if (_this.props.onBlur) {\n _this.props.onBlur(event);\n }\n\n _this.onInputChange('', {\n action: 'input-blur'\n });\n\n _this.onMenuClose();\n\n _this.setState({\n focusedValue: null,\n isFocused: false\n });\n };\n\n _this.onOptionHover = function (focusedOption) {\n if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) {\n return;\n }\n\n _this.setState({\n focusedOption: focusedOption\n });\n };\n\n _this.shouldHideSelectedOptions = function () {\n return shouldHideSelectedOptions(_this.props);\n };\n\n _this.onKeyDown = function (event) {\n var _this$props5 = _this.props,\n isMulti = _this$props5.isMulti,\n backspaceRemovesValue = _this$props5.backspaceRemovesValue,\n escapeClearsValue = _this$props5.escapeClearsValue,\n inputValue = _this$props5.inputValue,\n isClearable = _this$props5.isClearable,\n isDisabled = _this$props5.isDisabled,\n menuIsOpen = _this$props5.menuIsOpen,\n onKeyDown = _this$props5.onKeyDown,\n tabSelectsValue = _this$props5.tabSelectsValue,\n openMenuOnFocus = _this$props5.openMenuOnFocus;\n var _this$state = _this.state,\n focusedOption = _this$state.focusedOption,\n focusedValue = _this$state.focusedValue,\n selectValue = _this$state.selectValue;\n if (isDisabled) return;\n\n if (typeof onKeyDown === 'function') {\n onKeyDown(event);\n\n if (event.defaultPrevented) {\n return;\n }\n } // Block option hover events when the user has just pressed a key\n\n\n _this.blockOptionHover = true;\n\n switch (event.key) {\n case 'ArrowLeft':\n if (!isMulti || inputValue) return;\n\n _this.focusValue('previous');\n\n break;\n\n case 'ArrowRight':\n if (!isMulti || inputValue) return;\n\n _this.focusValue('next');\n\n break;\n\n case 'Delete':\n case 'Backspace':\n if (inputValue) return;\n\n if (focusedValue) {\n _this.removeValue(focusedValue);\n } else {\n if (!backspaceRemovesValue) return;\n\n if (isMulti) {\n _this.popValue();\n } else if (isClearable) {\n _this.clearValue();\n }\n }\n\n break;\n\n case 'Tab':\n if (_this.isComposing) return;\n\n if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused\n // option is already selected; it breaks the flow of navigation\n openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) {\n return;\n }\n\n _this.selectOption(focusedOption);\n\n break;\n\n case 'Enter':\n if (event.keyCode === 229) {\n // ignore the keydown event from an Input Method Editor(IME)\n // ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode\n break;\n }\n\n if (menuIsOpen) {\n if (!focusedOption) return;\n if (_this.isComposing) return;\n\n _this.selectOption(focusedOption);\n\n break;\n }\n\n return;\n\n case 'Escape':\n if (menuIsOpen) {\n _this.setState({\n inputIsHiddenAfterUpdate: false\n });\n\n _this.onInputChange('', {\n action: 'menu-close'\n });\n\n _this.onMenuClose();\n } else if (isClearable && escapeClearsValue) {\n _this.clearValue();\n }\n\n break;\n\n case ' ':\n // space\n if (inputValue) {\n return;\n }\n\n if (!menuIsOpen) {\n _this.openMenu('first');\n\n break;\n }\n\n if (!focusedOption) return;\n\n _this.selectOption(focusedOption);\n\n break;\n\n case 'ArrowUp':\n if (menuIsOpen) {\n _this.focusOption('up');\n } else {\n _this.openMenu('last');\n }\n\n break;\n\n case 'ArrowDown':\n if (menuIsOpen) {\n _this.focusOption('down');\n } else {\n _this.openMenu('first');\n }\n\n break;\n\n case 'PageUp':\n if (!menuIsOpen) return;\n\n _this.focusOption('pageup');\n\n break;\n\n case 'PageDown':\n if (!menuIsOpen) return;\n\n _this.focusOption('pagedown');\n\n break;\n\n case 'Home':\n if (!menuIsOpen) return;\n\n _this.focusOption('first');\n\n break;\n\n case 'End':\n if (!menuIsOpen) return;\n\n _this.focusOption('last');\n\n break;\n\n default:\n return;\n }\n\n event.preventDefault();\n };\n\n _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);\n _this.state.selectValue = cleanValue(_props.value);\n return _this;\n }\n\n _createClass(Select, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.startListeningComposition();\n this.startListeningToTouch();\n\n if (this.props.closeMenuOnScroll && document && document.addEventListener) {\n // Listen to all scroll events, and filter them out inside of 'onScroll'\n document.addEventListener('scroll', this.onScroll, true);\n }\n\n if (this.props.autoFocus) {\n this.focusInput();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props6 = this.props,\n isDisabled = _this$props6.isDisabled,\n menuIsOpen = _this$props6.menuIsOpen;\n var isFocused = this.state.isFocused;\n\n if ( // ensure focus is restored correctly when the control becomes enabled\n isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens\n isFocused && menuIsOpen && !prevProps.menuIsOpen) {\n this.focusInput();\n }\n\n if (isFocused && isDisabled && !prevProps.isDisabled) {\n // ensure select state gets blurred in case Select is programatically disabled while focused\n this.setState({\n isFocused: false\n }, this.onMenuClose);\n } // scroll the focused option into view if necessary\n\n\n if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {\n scrollIntoView(this.menuListRef, this.focusedOptionRef);\n this.scrollToFocusedOptionOnUpdate = false;\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.stopListeningComposition();\n this.stopListeningToTouch();\n document.removeEventListener('scroll', this.onScroll, true);\n } // ==============================\n // Consumer Handlers\n // ==============================\n\n }, {\n key: \"onMenuOpen\",\n value: function onMenuOpen() {\n this.props.onMenuOpen();\n }\n }, {\n key: \"onMenuClose\",\n value: function onMenuClose() {\n this.onInputChange('', {\n action: 'menu-close'\n });\n this.props.onMenuClose();\n }\n }, {\n key: \"onInputChange\",\n value: function onInputChange(newValue, actionMeta) {\n this.props.onInputChange(newValue, actionMeta);\n } // ==============================\n // Methods\n // ==============================\n\n }, {\n key: \"focusInput\",\n value: function focusInput() {\n if (!this.inputRef) return;\n this.inputRef.focus();\n }\n }, {\n key: \"blurInput\",\n value: function blurInput() {\n if (!this.inputRef) return;\n this.inputRef.blur();\n } // aliased for consumers\n\n }, {\n key: \"openMenu\",\n value: function openMenu(focusOption) {\n var _this2 = this;\n\n var _this$state2 = this.state,\n selectValue = _this$state2.selectValue,\n isFocused = _this$state2.isFocused;\n var focusableOptions = this.buildFocusableOptions();\n var openAtIndex = focusOption === 'first' ? 0 : focusableOptions.length - 1;\n\n if (!this.props.isMulti) {\n var selectedIndex = focusableOptions.indexOf(selectValue[0]);\n\n if (selectedIndex > -1) {\n openAtIndex = selectedIndex;\n }\n } // only scroll if the menu isn't already open\n\n\n this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);\n this.setState({\n inputIsHiddenAfterUpdate: false,\n focusedValue: null,\n focusedOption: focusableOptions[openAtIndex]\n }, function () {\n return _this2.onMenuOpen();\n });\n }\n }, {\n key: \"focusValue\",\n value: function focusValue(direction) {\n var _this$state3 = this.state,\n selectValue = _this$state3.selectValue,\n focusedValue = _this$state3.focusedValue; // Only multiselects support value focusing\n\n if (!this.props.isMulti) return;\n this.setState({\n focusedOption: null\n });\n var focusedIndex = selectValue.indexOf(focusedValue);\n\n if (!focusedValue) {\n focusedIndex = -1;\n }\n\n var lastIndex = selectValue.length - 1;\n var nextFocus = -1;\n if (!selectValue.length) return;\n\n switch (direction) {\n case 'previous':\n if (focusedIndex === 0) {\n // don't cycle from the start to the end\n nextFocus = 0;\n } else if (focusedIndex === -1) {\n // if nothing is focused, focus the last value first\n nextFocus = lastIndex;\n } else {\n nextFocus = focusedIndex - 1;\n }\n\n break;\n\n case 'next':\n if (focusedIndex > -1 && focusedIndex < lastIndex) {\n nextFocus = focusedIndex + 1;\n }\n\n break;\n }\n\n this.setState({\n inputIsHidden: nextFocus !== -1,\n focusedValue: selectValue[nextFocus]\n });\n }\n }, {\n key: \"focusOption\",\n value: function focusOption() {\n var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first';\n var pageSize = this.props.pageSize;\n var focusedOption = this.state.focusedOption;\n var options = this.getFocusableOptions();\n if (!options.length) return;\n var nextFocus = 0; // handles 'first'\n\n var focusedIndex = options.indexOf(focusedOption);\n\n if (!focusedOption) {\n focusedIndex = -1;\n }\n\n if (direction === 'up') {\n nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;\n } else if (direction === 'down') {\n nextFocus = (focusedIndex + 1) % options.length;\n } else if (direction === 'pageup') {\n nextFocus = focusedIndex - pageSize;\n if (nextFocus < 0) nextFocus = 0;\n } else if (direction === 'pagedown') {\n nextFocus = focusedIndex + pageSize;\n if (nextFocus > options.length - 1) nextFocus = options.length - 1;\n } else if (direction === 'last') {\n nextFocus = options.length - 1;\n }\n\n this.scrollToFocusedOptionOnUpdate = true;\n this.setState({\n focusedOption: options[nextFocus],\n focusedValue: null\n });\n }\n }, {\n key: \"getTheme\",\n value: // ==============================\n // Getters\n // ==============================\n function getTheme() {\n // Use the default theme if there are no customizations.\n if (!this.props.theme) {\n return defaultTheme;\n } // If the theme prop is a function, assume the function\n // knows how to merge the passed-in default theme with\n // its own modifications.\n\n\n if (typeof this.props.theme === 'function') {\n return this.props.theme(defaultTheme);\n } // Otherwise, if a plain theme object was passed in,\n // overlay it with the default theme.\n\n\n return _objectSpread2(_objectSpread2({}, defaultTheme), this.props.theme);\n }\n }, {\n key: \"getCommonProps\",\n value: function getCommonProps() {\n var clearValue = this.clearValue,\n cx = this.cx,\n getStyles = this.getStyles,\n getValue = this.getValue,\n selectOption = this.selectOption,\n setValue = this.setValue,\n props = this.props;\n var isMulti = props.isMulti,\n isRtl = props.isRtl,\n options = props.options;\n var hasValue = this.hasValue();\n return {\n clearValue: clearValue,\n cx: cx,\n getStyles: getStyles,\n getValue: getValue,\n hasValue: hasValue,\n isMulti: isMulti,\n isRtl: isRtl,\n options: options,\n selectOption: selectOption,\n selectProps: props,\n setValue: setValue,\n theme: this.getTheme()\n };\n }\n }, {\n key: \"hasValue\",\n value: function hasValue() {\n var selectValue = this.state.selectValue;\n return selectValue.length > 0;\n }\n }, {\n key: \"hasOptions\",\n value: function hasOptions() {\n return !!this.getFocusableOptions().length;\n }\n }, {\n key: \"isClearable\",\n value: function isClearable() {\n var _this$props7 = this.props,\n isClearable = _this$props7.isClearable,\n isMulti = _this$props7.isMulti; // single select, by default, IS NOT clearable\n // multi select, by default, IS clearable\n\n if (isClearable === undefined) return isMulti;\n return isClearable;\n }\n }, {\n key: \"isOptionDisabled\",\n value: function isOptionDisabled(option, selectValue) {\n return _isOptionDisabled(this.props, option, selectValue);\n }\n }, {\n key: \"isOptionSelected\",\n value: function isOptionSelected(option, selectValue) {\n return _isOptionSelected(this.props, option, selectValue);\n }\n }, {\n key: \"filterOption\",\n value: function filterOption(option, inputValue) {\n return _filterOption(this.props, option, inputValue);\n }\n }, {\n key: \"formatOptionLabel\",\n value: function formatOptionLabel(data, context) {\n if (typeof this.props.formatOptionLabel === 'function') {\n var inputValue = this.props.inputValue;\n var selectValue = this.state.selectValue;\n return this.props.formatOptionLabel(data, {\n context: context,\n inputValue: inputValue,\n selectValue: selectValue\n });\n } else {\n return this.getOptionLabel(data);\n }\n }\n }, {\n key: \"formatGroupLabel\",\n value: function formatGroupLabel(data) {\n return this.props.formatGroupLabel(data);\n } // ==============================\n // Mouse Handlers\n // ==============================\n\n }, {\n key: \"startListeningComposition\",\n value: // ==============================\n // Composition Handlers\n // ==============================\n function startListeningComposition() {\n if (document && document.addEventListener) {\n document.addEventListener('compositionstart', this.onCompositionStart, false);\n document.addEventListener('compositionend', this.onCompositionEnd, false);\n }\n }\n }, {\n key: \"stopListeningComposition\",\n value: function stopListeningComposition() {\n if (document && document.removeEventListener) {\n document.removeEventListener('compositionstart', this.onCompositionStart);\n document.removeEventListener('compositionend', this.onCompositionEnd);\n }\n }\n }, {\n key: \"startListeningToTouch\",\n value: // ==============================\n // Touch Handlers\n // ==============================\n function startListeningToTouch() {\n if (document && document.addEventListener) {\n document.addEventListener('touchstart', this.onTouchStart, false);\n document.addEventListener('touchmove', this.onTouchMove, false);\n document.addEventListener('touchend', this.onTouchEnd, false);\n }\n }\n }, {\n key: \"stopListeningToTouch\",\n value: function stopListeningToTouch() {\n if (document && document.removeEventListener) {\n document.removeEventListener('touchstart', this.onTouchStart);\n document.removeEventListener('touchmove', this.onTouchMove);\n document.removeEventListener('touchend', this.onTouchEnd);\n }\n }\n }, {\n key: \"renderInput\",\n value: // ==============================\n // Renderers\n // ==============================\n function renderInput() {\n var _this$props8 = this.props,\n isDisabled = _this$props8.isDisabled,\n isSearchable = _this$props8.isSearchable,\n inputId = _this$props8.inputId,\n inputValue = _this$props8.inputValue,\n tabIndex = _this$props8.tabIndex,\n form = _this$props8.form;\n\n var _this$getComponents = this.getComponents(),\n Input = _this$getComponents.Input;\n\n var inputIsHidden = this.state.inputIsHidden;\n var commonProps = this.commonProps;\n var id = inputId || this.getElementId('input'); // aria attributes makes the JSX \"noisy\", separated for clarity\n\n var ariaAttributes = {\n 'aria-autocomplete': 'list',\n 'aria-label': this.props['aria-label'],\n 'aria-labelledby': this.props['aria-labelledby']\n };\n\n if (!isSearchable) {\n // use a dummy input to maintain focus/blur functionality\n return /*#__PURE__*/React.createElement(DummyInput, _extends({\n id: id,\n innerRef: this.getInputRef,\n onBlur: this.onInputBlur,\n onChange: noop,\n onFocus: this.onInputFocus,\n readOnly: true,\n disabled: isDisabled,\n tabIndex: tabIndex,\n form: form,\n value: \"\"\n }, ariaAttributes));\n }\n\n return /*#__PURE__*/React.createElement(Input, _extends({}, commonProps, {\n autoCapitalize: \"none\",\n autoComplete: \"off\",\n autoCorrect: \"off\",\n id: id,\n innerRef: this.getInputRef,\n isDisabled: isDisabled,\n isHidden: inputIsHidden,\n onBlur: this.onInputBlur,\n onChange: this.handleInputChange,\n onFocus: this.onInputFocus,\n spellCheck: \"false\",\n tabIndex: tabIndex,\n form: form,\n type: \"text\",\n value: inputValue\n }, ariaAttributes));\n }\n }, {\n key: \"renderPlaceholderOrValue\",\n value: function renderPlaceholderOrValue() {\n var _this3 = this;\n\n var _this$getComponents2 = this.getComponents(),\n MultiValue = _this$getComponents2.MultiValue,\n MultiValueContainer = _this$getComponents2.MultiValueContainer,\n MultiValueLabel = _this$getComponents2.MultiValueLabel,\n MultiValueRemove = _this$getComponents2.MultiValueRemove,\n SingleValue = _this$getComponents2.SingleValue,\n Placeholder = _this$getComponents2.Placeholder;\n\n var commonProps = this.commonProps;\n var _this$props9 = this.props,\n controlShouldRenderValue = _this$props9.controlShouldRenderValue,\n isDisabled = _this$props9.isDisabled,\n isMulti = _this$props9.isMulti,\n inputValue = _this$props9.inputValue,\n placeholder = _this$props9.placeholder;\n var _this$state4 = this.state,\n selectValue = _this$state4.selectValue,\n focusedValue = _this$state4.focusedValue,\n isFocused = _this$state4.isFocused;\n\n if (!this.hasValue() || !controlShouldRenderValue) {\n return inputValue ? null : /*#__PURE__*/React.createElement(Placeholder, _extends({}, commonProps, {\n key: \"placeholder\",\n isDisabled: isDisabled,\n isFocused: isFocused\n }), placeholder);\n }\n\n if (isMulti) {\n var selectValues = selectValue.map(function (opt, index) {\n var isOptionFocused = opt === focusedValue;\n return /*#__PURE__*/React.createElement(MultiValue, _extends({}, commonProps, {\n components: {\n Container: MultiValueContainer,\n Label: MultiValueLabel,\n Remove: MultiValueRemove\n },\n isFocused: isOptionFocused,\n isDisabled: isDisabled,\n key: \"\".concat(_this3.getOptionValue(opt)).concat(index),\n index: index,\n removeProps: {\n onClick: function onClick() {\n return _this3.removeValue(opt);\n },\n onTouchEnd: function onTouchEnd() {\n return _this3.removeValue(opt);\n },\n onMouseDown: function onMouseDown(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n },\n data: opt\n }), _this3.formatOptionLabel(opt, 'value'));\n });\n return selectValues;\n }\n\n if (inputValue) {\n return null;\n }\n\n var singleValue = selectValue[0];\n return /*#__PURE__*/React.createElement(SingleValue, _extends({}, commonProps, {\n data: singleValue,\n isDisabled: isDisabled\n }), this.formatOptionLabel(singleValue, 'value'));\n }\n }, {\n key: \"renderClearIndicator\",\n value: function renderClearIndicator() {\n var _this$getComponents3 = this.getComponents(),\n ClearIndicator = _this$getComponents3.ClearIndicator;\n\n var commonProps = this.commonProps;\n var _this$props10 = this.props,\n isDisabled = _this$props10.isDisabled,\n isLoading = _this$props10.isLoading;\n var isFocused = this.state.isFocused;\n\n if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {\n return null;\n }\n\n var innerProps = {\n onMouseDown: this.onClearIndicatorMouseDown,\n onTouchEnd: this.onClearIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n return /*#__PURE__*/React.createElement(ClearIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderLoadingIndicator\",\n value: function renderLoadingIndicator() {\n var _this$getComponents4 = this.getComponents(),\n LoadingIndicator = _this$getComponents4.LoadingIndicator;\n\n var commonProps = this.commonProps;\n var _this$props11 = this.props,\n isDisabled = _this$props11.isDisabled,\n isLoading = _this$props11.isLoading;\n var isFocused = this.state.isFocused;\n if (!LoadingIndicator || !isLoading) return null;\n var innerProps = {\n 'aria-hidden': 'true'\n };\n return /*#__PURE__*/React.createElement(LoadingIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderIndicatorSeparator\",\n value: function renderIndicatorSeparator() {\n var _this$getComponents5 = this.getComponents(),\n DropdownIndicator = _this$getComponents5.DropdownIndicator,\n IndicatorSeparator = _this$getComponents5.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator\n\n\n if (!DropdownIndicator || !IndicatorSeparator) return null;\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n return /*#__PURE__*/React.createElement(IndicatorSeparator, _extends({}, commonProps, {\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderDropdownIndicator\",\n value: function renderDropdownIndicator() {\n var _this$getComponents6 = this.getComponents(),\n DropdownIndicator = _this$getComponents6.DropdownIndicator;\n\n if (!DropdownIndicator) return null;\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n var innerProps = {\n onMouseDown: this.onDropdownIndicatorMouseDown,\n onTouchEnd: this.onDropdownIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n return /*#__PURE__*/React.createElement(DropdownIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderMenu\",\n value: function renderMenu() {\n var _this4 = this;\n\n var _this$getComponents7 = this.getComponents(),\n Group = _this$getComponents7.Group,\n GroupHeading = _this$getComponents7.GroupHeading,\n Menu = _this$getComponents7.Menu,\n MenuList = _this$getComponents7.MenuList,\n MenuPortal = _this$getComponents7.MenuPortal,\n LoadingMessage = _this$getComponents7.LoadingMessage,\n NoOptionsMessage = _this$getComponents7.NoOptionsMessage,\n Option = _this$getComponents7.Option;\n\n var commonProps = this.commonProps;\n var focusedOption = this.state.focusedOption;\n var _this$props12 = this.props,\n captureMenuScroll = _this$props12.captureMenuScroll,\n inputValue = _this$props12.inputValue,\n isLoading = _this$props12.isLoading,\n loadingMessage = _this$props12.loadingMessage,\n minMenuHeight = _this$props12.minMenuHeight,\n maxMenuHeight = _this$props12.maxMenuHeight,\n menuIsOpen = _this$props12.menuIsOpen,\n menuPlacement = _this$props12.menuPlacement,\n menuPosition = _this$props12.menuPosition,\n menuPortalTarget = _this$props12.menuPortalTarget,\n menuShouldBlockScroll = _this$props12.menuShouldBlockScroll,\n menuShouldScrollIntoView = _this$props12.menuShouldScrollIntoView,\n noOptionsMessage = _this$props12.noOptionsMessage,\n onMenuScrollToTop = _this$props12.onMenuScrollToTop,\n onMenuScrollToBottom = _this$props12.onMenuScrollToBottom;\n if (!menuIsOpen) return null; // TODO: Internal Option Type here\n\n var render = function render(props, id) {\n var type = props.type,\n data = props.data,\n isDisabled = props.isDisabled,\n isSelected = props.isSelected,\n label = props.label,\n value = props.value;\n var isFocused = focusedOption === data;\n var onHover = isDisabled ? undefined : function () {\n return _this4.onOptionHover(data);\n };\n var onSelect = isDisabled ? undefined : function () {\n return _this4.selectOption(data);\n };\n var optionId = \"\".concat(_this4.getElementId('option'), \"-\").concat(id);\n var innerProps = {\n id: optionId,\n onClick: onSelect,\n onMouseMove: onHover,\n onMouseOver: onHover,\n tabIndex: -1\n };\n return /*#__PURE__*/React.createElement(Option, _extends({}, commonProps, {\n innerProps: innerProps,\n data: data,\n isDisabled: isDisabled,\n isSelected: isSelected,\n key: optionId,\n label: label,\n type: type,\n value: value,\n isFocused: isFocused,\n innerRef: isFocused ? _this4.getFocusedOptionRef : undefined\n }), _this4.formatOptionLabel(props.data, 'menu'));\n };\n\n var menuUI;\n\n if (this.hasOptions()) {\n menuUI = this.getCategorizedOptions().map(function (item) {\n if (item.type === 'group') {\n var data = item.data,\n options = item.options,\n groupIndex = item.index;\n var groupId = \"\".concat(_this4.getElementId('group'), \"-\").concat(groupIndex);\n var headingId = \"\".concat(groupId, \"-heading\");\n return /*#__PURE__*/React.createElement(Group, _extends({}, commonProps, {\n key: groupId,\n data: data,\n options: options,\n Heading: GroupHeading,\n headingProps: {\n id: headingId,\n data: item.data\n },\n label: _this4.formatGroupLabel(item.data)\n }), item.options.map(function (option) {\n return render(option, \"\".concat(groupIndex, \"-\").concat(option.index));\n }));\n } else if (item.type === 'option') {\n return render(item, \"\".concat(item.index));\n }\n });\n } else if (isLoading) {\n var message = loadingMessage({\n inputValue: inputValue\n });\n if (message === null) return null;\n menuUI = /*#__PURE__*/React.createElement(LoadingMessage, commonProps, message);\n } else {\n var _message = noOptionsMessage({\n inputValue: inputValue\n });\n\n if (_message === null) return null;\n menuUI = /*#__PURE__*/React.createElement(NoOptionsMessage, commonProps, _message);\n }\n\n var menuPlacementProps = {\n minMenuHeight: minMenuHeight,\n maxMenuHeight: maxMenuHeight,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition,\n menuShouldScrollIntoView: menuShouldScrollIntoView\n };\n var menuElement = /*#__PURE__*/React.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref4) {\n var ref = _ref4.ref,\n _ref4$placerProps = _ref4.placerProps,\n placement = _ref4$placerProps.placement,\n maxHeight = _ref4$placerProps.maxHeight;\n return /*#__PURE__*/React.createElement(Menu, _extends({}, commonProps, menuPlacementProps, {\n innerRef: ref,\n innerProps: {\n onMouseDown: _this4.onMenuMouseDown,\n onMouseMove: _this4.onMenuMouseMove\n },\n isLoading: isLoading,\n placement: placement\n }), /*#__PURE__*/React.createElement(ScrollManager, {\n captureEnabled: captureMenuScroll,\n onTopArrive: onMenuScrollToTop,\n onBottomArrive: onMenuScrollToBottom,\n lockEnabled: menuShouldBlockScroll\n }, function (scrollTargetRef) {\n return /*#__PURE__*/React.createElement(MenuList, _extends({}, commonProps, {\n innerRef: function innerRef(instance) {\n _this4.getMenuListRef(instance);\n\n scrollTargetRef(instance);\n },\n isLoading: isLoading,\n maxHeight: maxHeight,\n focusedOption: focusedOption\n }), menuUI);\n }));\n }); // positioning behaviour is almost identical for portalled and fixed,\n // so we use the same component. the actual portalling logic is forked\n // within the component based on `menuPosition`\n\n return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React.createElement(MenuPortal, _extends({}, commonProps, {\n appendTo: menuPortalTarget,\n controlElement: this.controlRef,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition\n }), menuElement) : menuElement;\n }\n }, {\n key: \"renderFormField\",\n value: function renderFormField() {\n var _this5 = this;\n\n var _this$props13 = this.props,\n delimiter = _this$props13.delimiter,\n isDisabled = _this$props13.isDisabled,\n isMulti = _this$props13.isMulti,\n name = _this$props13.name;\n var selectValue = this.state.selectValue;\n if (!name || isDisabled) return;\n\n if (isMulti) {\n if (delimiter) {\n var value = selectValue.map(function (opt) {\n return _this5.getOptionValue(opt);\n }).join(delimiter);\n return /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: value\n });\n } else {\n var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {\n return /*#__PURE__*/React.createElement(\"input\", {\n key: \"i-\".concat(i),\n name: name,\n type: \"hidden\",\n value: _this5.getOptionValue(opt)\n });\n }) : /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\"\n });\n return /*#__PURE__*/React.createElement(\"div\", null, input);\n }\n } else {\n var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';\n\n return /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: _value\n });\n }\n }\n }, {\n key: \"renderLiveRegion\",\n value: function renderLiveRegion() {\n var commonProps = this.commonProps;\n var _this$state5 = this.state,\n ariaSelection = _this$state5.ariaSelection,\n focusedOption = _this$state5.focusedOption,\n focusedValue = _this$state5.focusedValue,\n isFocused = _this$state5.isFocused,\n selectValue = _this$state5.selectValue;\n var focusableOptions = this.getFocusableOptions();\n return /*#__PURE__*/React.createElement(LiveRegion, _extends({}, commonProps, {\n ariaSelection: ariaSelection,\n focusedOption: focusedOption,\n focusedValue: focusedValue,\n isFocused: isFocused,\n selectValue: selectValue,\n focusableOptions: focusableOptions\n }));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$getComponents8 = this.getComponents(),\n Control = _this$getComponents8.Control,\n IndicatorsContainer = _this$getComponents8.IndicatorsContainer,\n SelectContainer = _this$getComponents8.SelectContainer,\n ValueContainer = _this$getComponents8.ValueContainer;\n\n var _this$props14 = this.props,\n className = _this$props14.className,\n id = _this$props14.id,\n isDisabled = _this$props14.isDisabled,\n menuIsOpen = _this$props14.menuIsOpen;\n var isFocused = this.state.isFocused;\n var commonProps = this.commonProps = this.getCommonProps();\n return /*#__PURE__*/React.createElement(SelectContainer, _extends({}, commonProps, {\n className: className,\n innerProps: {\n id: id,\n onKeyDown: this.onKeyDown\n },\n isDisabled: isDisabled,\n isFocused: isFocused\n }), this.renderLiveRegion(), /*#__PURE__*/React.createElement(Control, _extends({}, commonProps, {\n innerRef: this.getControlRef,\n innerProps: {\n onMouseDown: this.onControlMouseDown,\n onTouchEnd: this.onControlTouchEnd\n },\n isDisabled: isDisabled,\n isFocused: isFocused,\n menuIsOpen: menuIsOpen\n }), /*#__PURE__*/React.createElement(ValueContainer, _extends({}, commonProps, {\n isDisabled: isDisabled\n }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React.createElement(IndicatorsContainer, _extends({}, commonProps, {\n isDisabled: isDisabled\n }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(props, state) {\n var prevProps = state.prevProps,\n clearFocusValueOnUpdate = state.clearFocusValueOnUpdate,\n inputIsHiddenAfterUpdate = state.inputIsHiddenAfterUpdate;\n var options = props.options,\n value = props.value,\n menuIsOpen = props.menuIsOpen,\n inputValue = props.inputValue;\n var newMenuOptionsState = {};\n\n if (prevProps && (value !== prevProps.value || options !== prevProps.options || menuIsOpen !== prevProps.menuIsOpen || inputValue !== prevProps.inputValue)) {\n var selectValue = cleanValue(value);\n var focusableOptions = menuIsOpen ? buildFocusableOptions(props, selectValue) : [];\n var focusedValue = clearFocusValueOnUpdate ? getNextFocusedValue(state, selectValue) : null;\n var focusedOption = getNextFocusedOption(state, focusableOptions);\n newMenuOptionsState = {\n selectValue: selectValue,\n focusedOption: focusedOption,\n focusedValue: focusedValue,\n clearFocusValueOnUpdate: false\n };\n } // some updates should toggle the state of the input visibility\n\n\n var newInputIsHiddenState = inputIsHiddenAfterUpdate != null && props !== prevProps ? {\n inputIsHidden: inputIsHiddenAfterUpdate,\n inputIsHiddenAfterUpdate: undefined\n } : {};\n return _objectSpread2(_objectSpread2(_objectSpread2({}, newMenuOptionsState), newInputIsHiddenState), {}, {\n prevProps: props\n });\n }\n }]);\n\n return Select;\n}(Component);\n\nSelect.defaultProps = defaultProps;\n\nexport { Select as S, getOptionLabel as a, defaultProps as b, createFilter as c, defaultTheme as d, getOptionValue as g, mergeStyles as m };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\nimport { _ as _createSuper } from './index-4bd03571.esm.js';\nimport React, { Component } from 'react';\n\nvar defaultProps = {\n defaultInputValue: '',\n defaultMenuIsOpen: false,\n defaultValue: null\n};\n\nvar manageState = function manageState(SelectComponent) {\n var _class, _temp;\n\n return _temp = _class = /*#__PURE__*/function (_Component) {\n _inherits(StateManager, _Component);\n\n var _super = _createSuper(StateManager);\n\n function StateManager() {\n var _this;\n\n _classCallCheck(this, StateManager);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.select = void 0;\n _this.state = {\n inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue,\n menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen,\n value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue\n };\n\n _this.onChange = function (value, actionMeta) {\n _this.callProp('onChange', value, actionMeta);\n\n _this.setState({\n value: value\n });\n };\n\n _this.onInputChange = function (value, actionMeta) {\n // TODO: for backwards compatibility, we allow the prop to return a new\n // value, but now inputValue is a controllable prop we probably shouldn't\n var newValue = _this.callProp('onInputChange', value, actionMeta);\n\n _this.setState({\n inputValue: newValue !== undefined ? newValue : value\n });\n };\n\n _this.onMenuOpen = function () {\n _this.callProp('onMenuOpen');\n\n _this.setState({\n menuIsOpen: true\n });\n };\n\n _this.onMenuClose = function () {\n _this.callProp('onMenuClose');\n\n _this.setState({\n menuIsOpen: false\n });\n };\n\n return _this;\n }\n\n _createClass(StateManager, [{\n key: \"focus\",\n value: function focus() {\n this.select.focus();\n }\n }, {\n key: \"blur\",\n value: function blur() {\n this.select.blur();\n } // FIXME: untyped flow code, return any\n\n }, {\n key: \"getProp\",\n value: function getProp(key) {\n return this.props[key] !== undefined ? this.props[key] : this.state[key];\n } // FIXME: untyped flow code, return any\n\n }, {\n key: \"callProp\",\n value: function callProp(name) {\n if (typeof this.props[name] === 'function') {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return (_this$props = this.props)[name].apply(_this$props, args);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props2 = this.props;\n _this$props2.defaultInputValue;\n _this$props2.defaultMenuIsOpen;\n _this$props2.defaultValue;\n var props = _objectWithoutProperties(_this$props2, [\"defaultInputValue\", \"defaultMenuIsOpen\", \"defaultValue\"]);\n\n return /*#__PURE__*/React.createElement(SelectComponent, _extends({}, props, {\n ref: function ref(_ref) {\n _this2.select = _ref;\n },\n inputValue: this.getProp('inputValue'),\n menuIsOpen: this.getProp('menuIsOpen'),\n onChange: this.onChange,\n onInputChange: this.onInputChange,\n onMenuClose: this.onMenuClose,\n onMenuOpen: this.onMenuOpen,\n value: this.getProp('value')\n }));\n }\n }]);\n\n return StateManager;\n }(Component), _class.defaultProps = defaultProps, _temp;\n};\n\nexport { manageState as m };\n","import { S as Select } from './Select-dbb12e54.esm.js';\nexport { c as createFilter, d as defaultTheme, m as mergeStyles } from './Select-dbb12e54.esm.js';\nimport { m as manageState } from './stateManager-845a3300.esm.js';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\nimport { _ as _createSuper } from './index-4bd03571.esm.js';\nexport { c as components } from './index-4bd03571.esm.js';\nimport React, { Component } from 'react';\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport memoizeOne from 'memoize-one';\nimport '@babel/runtime/helpers/extends';\nimport '@babel/runtime/helpers/toConsumableArray';\nimport '@babel/runtime/helpers/objectWithoutProperties';\nimport '@babel/runtime/helpers/taggedTemplateLiteral';\nimport '@babel/runtime/helpers/typeof';\nimport 'react-input-autosize';\nimport '@babel/runtime/helpers/defineProperty';\nimport 'react-dom';\n\nvar NonceProvider = /*#__PURE__*/function (_Component) {\n _inherits(NonceProvider, _Component);\n\n var _super = _createSuper(NonceProvider);\n\n function NonceProvider(props) {\n var _this;\n\n _classCallCheck(this, NonceProvider);\n\n _this = _super.call(this, props);\n\n _this.createEmotionCache = function (nonce, key) {\n return createCache({\n nonce: nonce,\n key: key\n });\n };\n\n _this.createEmotionCache = memoizeOne(_this.createEmotionCache);\n return _this;\n }\n\n _createClass(NonceProvider, [{\n key: \"render\",\n value: function render() {\n var emotionCache = this.createEmotionCache(this.props.nonce, this.props.cacheKey);\n return /*#__PURE__*/React.createElement(CacheProvider, {\n value: emotionCache\n }, this.props.children);\n }\n }]);\n\n return NonceProvider;\n}(Component);\n\nvar index = manageState(Select);\n\nexport default index;\nexport { NonceProvider };\n","import React from 'react';\nimport Select from 'react-select';\n\nexport const PURPOSES = [\n {'value': 'assessing', 'label': 'Assessing'}, \n {'value': 'bookmarking', 'label': 'Bookmarking'}, \n {'value': 'classifying', 'label': 'Classifying'}, \n {'value': 'commenting', 'label': 'Commenting'}, \n {'value': 'describing', 'label': 'Describing'},\n {'value': 'editing', 'label': 'Editing'}, \n {'value': 'highlighting', 'label': 'Highlighting'},\n {'value': 'identifying', 'label': 'Identifying'},\n {'value': 'linking', 'label': 'Linking'},\n {'value': 'moderating', 'label': 'Moderating'},\n {'value': 'questioning', 'label': 'Questioning'},\n {'value': 'replying', 'label': 'Replying'},\n {'value': 'supplementing', 'label': 'Transcription'}\n]\n\nconst PurposeSelect = props => {\n\n const selectedOption = props.content ?\n PURPOSES.find(p => p.value === props.content) : null;\n\n return (\n <div className=\"r6o-purposedropdown\">\n <Select\n value={selectedOption}\n onChange={props.onChange}\n options={PURPOSES}\n isDisabled={!props.editable}\n />\n </div>\n );\n\n}\n\nexport default PurposeSelect;\n","import React from 'react';\n\n/**\n * Icon from IcoFont https://icofont.com/, licensed under the CC BY 4.0 license.\n */\nexport const ChevronDownIcon = props => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1000 940\" width={props.width}>\n <metadata>IcoFont Icons</metadata>\n <title>simple-down</title>\n <glyph glyphName=\"simple-down\" unicode=\"&#xeab2;\" horizAdvX=\"1000\" />\n <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\" />\n </svg>\n )\n}\n\n/**\n * Icon from IcoFont https://icofont.com/, licensed under the CC BY 4.0 license.\n */\nexport const CloseIcon = props => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"180 150 700 800\" width={props.width}>\n <metadata>IcoFont Icons</metadata>\n <title>close</title>\n <glyph glyphName=\"close\" unicode=\"&#xeee4;\" horizAdvX=\"1000\" />\n <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\"/>\n </svg>\n )\n}\n\n/**\n * Icon from IcoFont https://icofont.com/, licensed under the CC BY 4.0 license.\n */\nexport const CheckIcon = props => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 980 980\" width={props.width}>\n <metadata>IcoFont Icons</metadata>\n <title>verification-check</title>\n <glyph glyphName=\"verification-check\" unicode=\"&#xf021;\" horizAdvX=\"1000\" />\n <path fill=\"currentColor\" d=\"M792.9 162.8c-133.19999999999993 126.69999999999999-264.9 251.89999999999998-397.29999999999995 377.8-8.800000000000011 8.299999999999955-22.600000000000023 8-31-0.8000000000000682l-139.50000000000003-146.89999999999998c-8.299999999999983-8.799999999999955-22.5-9.399999999999977-31.599999999999994-1.5-41.19999999999999 36-82 71.70000000000005-123.7 108.20000000000005-9.099999999999994 8-9.899999999999999 21.699999999999932-1.7999999999999972 30.600000000000023 92.9 102.19999999999993 185 203.5 277.7 305.4 8.100000000000023 8.899999999999977 21.900000000000034 9.5 30.80000000000001 1.2999999999999545 185.29999999999995-172.39999999999998 369.29999999999995-343.7 553.8-515.3 8.900000000000091-8.200000000000045 9.600000000000023-22.30000000000001 1.7000000000000455-31.5-36.700000000000045-42.400000000000034-72.70000000000005-84.00000000000003-108.89999999999998-125.80000000000001-7.899999999999977-9.100000000000023-21.399999999999977-9.800000000000011-30.200000000000045-1.5z\"/>\n </svg> \n )\n}\n\n/**\n * Icon from FontAwesome https://fontawesome.com/icons/trash-alt, \n * licensed under the CC BY 4.0 license https://fontawesome.com/license\n */\nexport const TrashIcon = props => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" width={props.width}>\n <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\"></path>\n </svg>\n )\n}","import React, { useState } from 'react';\nimport TimeAgo from 'timeago-react';\nimport DropdownMenu from './DropdownMenu';\nimport TextEntryField from './TextEntryField';\nimport PurposeSelect from './PurposeSelect';\nimport { ChevronDownIcon } from '../../../Icons';\nimport i18n from '../../../i18n';\n\n/** A single comment inside the CommentWidget **/\nconst Comment = props => {\n\n const [ isEditable, setIsEditable ] = useState(false);\n const [ isMenuVisible, setIsMenuVisible ] = useState(false);\n\n const onMakeEditable = _ => {\n setIsEditable(true);\n setIsMenuVisible(false);\n }\n\n const onDelete = _ => {\n props.onDelete(props.body);\n setIsMenuVisible(false); \n }\n\n const onUpdateComment = evt =>\n props.onUpdate(props.body, { ...props.body, value: evt.target.value });\n\n const onChangePurpose = evt =>\n props.onUpdate(props.body, { ...props.body, purpose: evt.value });\n\n const timestamp = props.body.modified || props.body.created;\n\n const creatorInfo = props.body.creator && \n <div className=\"r6o-lastmodified\">\n <span className=\"r6o-lastmodified-by\">{props.body.creator.name || props.body.creator.id}</span>\n { props.body.created && \n <span className=\"r6o-lastmodified-at\">\n <TimeAgo \n datetime={props.env.toClientTime(timestamp)}\n locale={i18n.locale()} />\n </span> \n }\n </div>\n \n return props.readOnly ? (\n <div className=\"r6o-widget comment\">\n <div className=\"r6o-readonly-comment\">{props.body.value}</div>\n { creatorInfo }\n </div>\n ) : (\n <div className={ isEditable ? \"r6o-widget comment editable\" : \"r6o-widget comment\"}>\n <TextEntryField \n editable={isEditable}\n content={props.body.value} \n onChange={onUpdateComment} \n onSaveAndClose={props.onSaveAndClose}\n />\n { !isEditable && creatorInfo }\n\n { props.purposeSelector &&\n <PurposeSelect\n editable={isEditable}\n content={props.body.purpose} \n onChange={onChangePurpose} \n onSaveAndClose={props.onSaveAndClose}\n /> } \n \n <div \n className={isMenuVisible ? \"r6o-icon r6o-arrow-down r6o-menu-open\" : \"r6o-icon r6o-arrow-down\"} \n onClick={() => setIsMenuVisible(!isMenuVisible)}>\n <ChevronDownIcon width={12} />\n </div>\n\n { isMenuVisible && \n <DropdownMenu \n onEdit={onMakeEditable} \n onDelete={onDelete} \n onClickOutside={() => setIsMenuVisible(false)} /> \n }\n </div>\n )\n\n}\n\nexport default Comment;","import React from 'react';\nimport Comment from './Comment';\nimport TextEntryField from './TextEntryField';\nimport i18n from '../../../i18n';\nimport PurposeSelect, { PURPOSES } from './PurposeSelect';\n\nconst validPurposes = PURPOSES.map(p => p.value);\n\n/**\n * Comments are TextualBodies where the purpose field is either\n * blank or 'commenting' or 'replying'\n */\nconst isComment = (body, matchAllPurposes) => {\n const hasMatchingPurpose = matchAllPurposes ?\n validPurposes.indexOf(body.purpose) > -1 : body.purpose == 'commenting' || body.purpose == 'replying';\n\n return body.type === 'TextualBody' && (\n !Object.prototype.hasOwnProperty.call(body, 'purpose') || hasMatchingPurpose\n );\n}\n\n/**\n/* A comment should be read-only if:\n/* - the global read-only flag is set\n/* - the current rule is 'MINE_ONLY' and the creator ID differs\n/* The 'editable' config flag overrides the global setting, if any\n*/\nconst isReadOnlyComment = (body, props) => {\n if (props.editable === true)\n return false;\n\n if (props.editable === false)\n return true;\n\n if (props.editable === 'MINE_ONLY') {\n // The original creator of the body\n const creator = body.creator?.id;\n\n // The current user\n const me = props.env.user?.id;\n\n return me !== creator;\n }\n\n // Global setting as last possible option\n return props.readOnly;\n}\n\n/**\n * The draft reply is a comment body with a 'draft' flag\n */\nconst getDraftReply = (existingDraft, isReply) => {\n const purpose = isReply ? 'replying' : 'commenting';\n return existingDraft ? existingDraft : {\n type: 'TextualBody', value: '', purpose, draft: true\n };\n};\n\n/**\n * Renders a list of comment bodies, followed by a 'reply' field.\n */\nconst CommentWidget = props => {\n\n // All comments\n const all = props.annotation ?\n props.annotation.bodies.filter(body => isComment(body, props.purposeSelector)) : [];\n\n // Add a draft reply if there isn't one already\n const draftReply = getDraftReply(all.find(b => b.draft == true), all.length > 1);\n\n // All except draft reply\n const comments = all.filter(b => b != draftReply);\n\n const onEditReply = evt => {\n const prev = draftReply.value;\n const updated = evt.target.value;\n\n if (prev.length === 0 && updated.length > 0) {\n props.onAppendBody({ ...draftReply, value: updated });\n } else if (prev.length > 0 && updated.length === 0) {\n props.onRemoveBody(draftReply);\n } else {\n props.onUpdateBody(draftReply, { ...draftReply, value: updated });\n }\n }\n\n const onChangeReplyPurpose = purpose =>\n props.onUpdateBody(draftReply, { ...draftReply, purpose: purpose.value });\n\n // Pre-condition: will be true if the annotation exists, and Annotorious is not in read-only mode\n const isReadable = (!props.readOnly && props.annotation);\n\n // Extra condtion to: reply field exists if there is no comment yet, or disableReply is false.\n const hasReply = comments.length === 0 || !props.disableReply;\n\n return (\n <>\n { comments.map((body, idx) =>\n <Comment\n key={idx}\n env={props.env}\n purposeSelector={props.purposeSelector}\n readOnly={isReadOnlyComment(body, props)}\n body={body}\n onUpdate={props.onUpdateBody}\n onDelete={props.onRemoveBody}\n onSaveAndClose={props.onSaveAndClose} />\n )}\n\n { isReadable && hasReply &&\n <div className=\"r6o-widget comment editable\">\n <TextEntryField\n focus={props.focus}\n content={draftReply.value}\n editable={true}\n placeholder={comments.length > 0 ? i18n.t('Add a reply...') : (props.textPlaceHolder || i18n.t('Add a comment...'))}\n onChange={onEditReply}\n onSaveAndClose={() => props.onSaveAndClose()}\n />\n { props.purposeSelector && draftReply.value.length > 0 &&\n <PurposeSelect\n editable={true}\n content={draftReply.purpose}\n onChange={onChangeReplyPurpose}\n onSaveAndClose={() => props.onSaveAndClose()}\n />\n }\n </div>\n }\n </>\n )\n\n}\n\nCommentWidget.disableDelete = (annotation, props) => {\n const commentBodies =\n annotation.bodies.filter(body => isComment(body, props.purposeSelector));\n\n return commentBodies.some(comment => isReadOnlyComment(comment, props));\n}\n\nexport default CommentWidget;","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `<CSSTransition>` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/addClass';\nimport removeOneClass from 'dom-helpers/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return addOneClass(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return removeOneClass(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <CSSTransition in={inProp} timeout={200} classNames=\"my-node\">\n * <div>\n * {\"I'll receive my-node-* classes\"}\n * </div>\n * </CSSTransition>\n * <button type=\"button\" onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n /* eslint-disable no-unused-expressions */\n node && node.scrollTop;\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","import React, { useEffect, useRef, useState } from 'react';\n\nconst getVocabSuggestions = (query, vocabulary) =>\n vocabulary.filter(item => {\n // Item could be string or { label, uri } tuple\n const label = item.label ? item.label : item;\n return label.toLowerCase().startsWith(query.toLowerCase());\n });\n\nconst getFnSuggestions = (query, fn) =>\n fn(query);\n\nconst Autocomplete = props => {\n\n const element = useRef();\n\n // Current value of the input field\n const [ value, setValue ] = useState(props.initialValue || '');\n\n // Current list of suggestions \n const [ suggestions, setSuggestions ] = useState([]);\n\n // Highlighted suggestion, if any\n const [ highlightedIndex, setHighlightedIndex ] = useState(null);\n\n useEffect(() => {\n if (props.focus)\n element.current.querySelector('input').focus({ preventScroll: true });\n }, []);\n\n useEffect(() => {\n props.onChange && props.onChange(value);\n }, [ value ]);\n\n const getSuggestions = value => {\n if (typeof props.vocabulary === 'function') {\n const result = getFnSuggestions(value, props.vocabulary);\n\n // Result could be suggestions or Promise\n if (result.then)\n result.then(setSuggestions);\n else \n setSuggestions(result);\n } else {\n const suggestions = getVocabSuggestions(value, props.vocabulary);\n setSuggestions(suggestions);\n }\n }\n\n const onSubmit = () => {\n if (highlightedIndex !== null) {\n // Submit highligted suggestion\n props.onSubmit(suggestions[highlightedIndex]);\n } else {\n // Submit input value\n const trimmed = value.trim();\n\n if (trimmed) {\n // If there is a vocabulary with the same label, use that\n const matchingTerm = Array.isArray(props.vocabulary) ?\n props.vocabulary.find(t => {\n const label = t.label || t;\n return label.toLowerCase() === trimmed.toLowerCase();\n }) : null;\n\n if (matchingTerm) {\n props.onSubmit(matchingTerm);\n } else {\n // Otherwise, just use as a freetext tag\n props.onSubmit(trimmed);\n }\n }\n }\n\n setValue('');\n setSuggestions([]);\n setHighlightedIndex(null);\n }\n\n const onKeyDown = evt => {\n if (evt.which === 13) {\n // Enter\n onSubmit();\n } else if (evt.which === 27) {\n props.onCancel && props.onCancel();\n } else {\n // Neither enter nor cancel\n if (suggestions.length > 0) {\n if (evt.which === 38) {\n // Key up\n if (highlightedIndex === null) {\n setHighlightedIndex(0);\n } else {\n const prev = Math.max(0, highlightedIndex - 1);\n setHighlightedIndex(prev);\n }\n } else if (evt.which === 40) {\n // Key down\n if (highlightedIndex === null) {\n setHighlightedIndex(0);\n } else {\n const next = Math.min(suggestions.length - 1, highlightedIndex + 1);\n setHighlightedIndex(next);\n }\n }\n } else {\n // No suggestions: key down shows all vocab \n // options (only for hard-wired vocabs!)\n if (evt.which === 40) {\n if (Array.isArray(props.vocabulary))\n setSuggestions(props.vocabulary);\n }\n }\n }\n }\n\n const onChange = evt => {\n const { value } = evt.target;\n\n // Set controlled input value\n setValue(value);\n\n // Typing on the input resets the highlight\n setHighlightedIndex(null);\n\n if (value)\n getSuggestions(value);\n else\n setSuggestions([]);\n }\n\n return (\n <div\n ref={element} \n className=\"r6o-autocomplete\">\n <div>\n <input\n onKeyDown={onKeyDown}\n onChange={onChange}\n value={value}\n placeholder={props.placeholder} />\n </div>\n <ul>\n {suggestions.length > 0 && suggestions.map((item, index) => (\n <li \n key={`${item.label ? item.label : item}${index}`}\n onClick={onSubmit}\n onMouseEnter={() => setHighlightedIndex(index)}\n style={\n highlightedIndex === index\n ? { backgroundColor: '#bde4ff' }\n : {}\n }>\n {item.label ? item.label : item}\n </li>\n ))}\n </ul>\n </div>\n )\n}\n\nexport default Autocomplete;","import React, { useState } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport { CloseIcon } from '../../../Icons';\nimport i18n from '../../../i18n';\n\nimport Autocomplete from '../Autocomplete';\n\nconst getDraftTag = existingDraft =>\n existingDraft ? existingDraft : {\n type: 'TextualBody', value: '', purpose: 'tagging', draft: true\n };\n\nconst TagWidget = props => {\n\n // All tags (draft + non-draft)\n const all = props.annotation ?\n props.annotation.bodies.filter(b => b.purpose === 'tagging') : [];\n\n // Last draft tag goes into the input field\n const draftTag = getDraftTag(all.slice().reverse().find(b => b.draft));\n\n // All except draft tag\n const tags = all.filter(b => b != draftTag);\n\n const [ showDelete, setShowDelete ] = useState(false);\n\n const toggle = tag => _ => {\n if (showDelete === tag) // Removes delete button\n setShowDelete(false);\n else\n setShowDelete(tag); // Sets delete button on a different tag\n }\n\n const onDraftChange = value => {\n const prev = draftTag.value.trim();\n const updated = value.trim();\n\n if (prev.length === 0 && updated.length > 0) {\n props.onAppendBody({ ...draftTag, value: updated });\n } else if (prev.length > 0 && updated.length === 0) {\n props.onRemoveBody(draftTag);\n } else if (prev !== updated) {\n props.onUpdateBody(draftTag, { ...draftTag, value: updated });\n }\n }\n\n const onDelete = tag => evt => {\n evt.stopPropagation();\n props.onRemoveBody(tag);\n }\n\n const onSubmit = tag => {\n const toSubmit = tag.uri ? {\n type: 'SpecificResource',\n purpose: 'tagging',\n source: {\n id: tag.uri,\n label: tag.label\n }\n } : {\n type: 'TextualBody',\n purpose: 'tagging',\n value: tag.label || tag\n };\n\n if (draftTag.value.trim().length === 0) {\n props.onAppendBody(toSubmit);\n } else {\n props.onUpdateBody(draftTag, toSubmit);\n }\n }\n\n // Shorthand\n const tagValue = tag => tag.value || tag.source.label;\n\n return (\n <div className=\"r6o-widget r6o-tag\">\n { tags.length > 0 &&\n <ul className=\"r6o-taglist\">\n { tags.map(tag =>\n <li key={tagValue(tag)} onClick={toggle(tag)}>\n <span className=\"r6o-label\">{tagValue(tag)}</span>\n\n {!props.readOnly &&\n <CSSTransition in={showDelete === tag} timeout={200} classNames=\"r6o-delete\">\n <span className=\"r6o-delete-wrapper\" onClick={onDelete(tag)}>\n <span className=\"r6o-delete\">\n <CloseIcon width={12} />\n </span>\n </span>\n </CSSTransition>\n }\n </li>\n )}\n </ul>\n }\n\n {!props.readOnly &&\n <Autocomplete\n focus={props.focus}\n placeholder={props.textPlaceHolder || i18n.t('Add tag...')}\n vocabulary={props.vocabulary || []}\n onChange={onDraftChange}\n onSubmit={onSubmit}/>\n }\n </div>\n )\n\n}\n\nexport default TagWidget;","import React, { Component } from 'react';\n\nexport default class WrappedWidget extends Component {\n\n constructor(props) {\n super(props);\n\n this.element = React.createRef();\n }\n\n renderWidget(props) {\n const widgetEl = this.props.widget({\n annotation: props.annotation,\n readOnly: props.readOnly,\n ...props.config,\n onAppendBody: (body, saveImmediately) => props.onAppendBody(body, saveImmediately),\n onUpdateBody: (previous, updated, saveImmediately) => props.onUpdateBody(previous, updated, saveImmediately),\n onUpsertBody: (previous, updated, saveImmediately) => props.onUpsertBody(previous, updated, saveImmediately),\n onRemoveBody: (body, saveImmediately) => props.onRemoveBody(body, saveImmediately),\n onBatchModify: (diffs, saveImmediately) => props.onBatchModify(diffs, saveImmediately),\n onSetProperty: (property, value) => props.onSetProperty(property, value),\n onAddContext: uri => props.onAddContext(uri),\n onSaveAndClose: () => props.onSaveAndClose()\n });\n\n // Delete previous rendered state\n while (this.element.current.firstChild)\n this.element.current.removeChild(this.element.current.lastChild);\n\n this.element.current.appendChild(widgetEl);\n }\n\n componentDidMount() {\n this.renderWidget(this.props);\n }\n\n componentWillReceiveProps(next) {\n if (this.element.current) {\n if (this.props.annotation !== next.annotation) {\n this.renderWidget(next);\n }\n }\n }\n\n render() {\n return (\n <div ref={this.element} className=\"widget\"></div>\n )\n }\n\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport CommentWidget from './comment/CommentWidget'\nimport TagWidget from './tag/TagWidget';\nimport WrappedWidget from './WrappedWidget';\n\n/**\n * We'll add React and ReactDOM to the global window, so that \n * plugins can use it without re-bundling. Also,\n * without this, hooks won't work!\n */\nwindow.React = React;\nwindow.ReactDOM = ReactDOM;\n\n/** Standard widgets included by default **/\nconst BUILTIN_WIDGETS = {\n COMMENT: CommentWidget,\n TAG: TagWidget\n};\n\n/** Defaults to use if there's no overrides from the host app **/\nexport const DEFAULT_WIDGETS = [\n <CommentWidget />, <TagWidget />\n]\n\n// https://stackoverflow.com/questions/33199959/how-to-detect-a-react-component-vs-a-react-element\nconst isReactComponent = component => { \n\n const isClassComponent = component => \n typeof component === 'function' && !!component.prototype?.isReactComponent;\n \n const isFunctionComponent = component =>\n // There's no good way to match function components (they are just functions), but\n // this RegEx pattern should catch most minified and unminified variants, e.g.:\n // - return React.createElement('div', {\n // - return pe(\"div\",{\n typeof component === 'function' && ( \n String(component).match(/return .+\\(['|\"].+['|\"],\\s*\\{/g) ||\n String(component).match(/return .+preact_compat/) ||\n String(component).match(/return .+\\.createElement/g)\n );\n \n return isClassComponent(component) || isFunctionComponent(component);\n}\n\n\n/**\n * There are multiple ways in which users can specify widgets:\n * \n * 1. string -> name of a built-in widget\n * 2. function -> custom JS plugin\n * 3. React component custom JSX plugin\n * 4. an object in the following form: { widget: (...), args }\n * \n * In case of 4, the 'widget' property may have the same allowed \n * values (string, function, React component). The remaining parameters\n * are treated as widget configuration, and are passed along to the\n * widget.\n */\nexport const getWidget = arg => {\n\n const instantiate = (widget, config, force) => {\n // Check if user forced explicit type \n if (typeof widget === 'string' || widget instanceof String) {\n // Built-in\n return React.createElement(BUILTIN_WIDGETS[widget], config);\n } else { \n // Plugin\n if (force?.toLowerCase() === 'react') {\n return React.createElement(widget, config);\n } else if (force?.toLowerCase() === 'plainjs') {\n return <WrappedWidget widget={widget} config={config} />\n } else {\n // Auto-detect\n if (isReactComponent(widget)) {\n return React.createElement(widget, config);\n } else if (typeof widget === 'function' || widget instanceof Function) {\n return <WrappedWidget widget={widget} config={config} />\n } else {\n throw `${widget} is not a valid plugin`\n }\n }\n }\n }\n\n // First, check 'top-level' vs. 'nested object' case\n if (arg.widget) {\n const { widget, force, ...config } = arg;\n return instantiate(widget, config, force);\n } else {\n // No object with args -> instantiate arg directly\n return instantiate(arg);\n }\n}","const MARGIN_VERTICAL = 14;\n\n/** Sets the editor position and determines a proper orientation **/\nconst setPosition = (wrapperEl, editorEl, selectedEl, autoPosition) => {\n // Container element bounds\n const containerBounds = wrapperEl.getBoundingClientRect();\n\n // Re-set orientation class\n editorEl.className = 'r6o-editor r6o-arrow-top r6o-arrow-left';\n\n // Default orientation (upwards arrow, at bottom-left of shape)\n const { left, top, right, bottom } = selectedEl.getBoundingClientRect();\n editorEl.style.top = `${bottom - containerBounds.top + MARGIN_VERTICAL}px`;\n editorEl.style.left = `${left - containerBounds.left}px`;\n\n if (autoPosition) {\n const defaultOrientation = editorEl.children[1].getBoundingClientRect();\n\n const { innerWidth, innerHeight } = wrapperEl.ownerDocument.defaultView;\n\n // Test 1: does right edge extend beyond the width of the page?\n // If so, flip horizontally\n if (defaultOrientation.right > innerWidth) {\n editorEl.classList.remove('r6o-arrow-left');\n editorEl.classList.add('r6o-arrow-right');\n editorEl.style.left = `${right - defaultOrientation.width - containerBounds.left}px`;\n }\n\n // Test 2: does the bottom edge extend beyond the height of the page?\n // If so, flip vertically\n if (defaultOrientation.bottom > innerHeight) {\n editorEl.classList.remove('r6o-arrow-top');\n editorEl.classList.add('r6o-arrow-bottom');\n \n const editorHeight = editorEl.children[1].getBoundingClientRect().height;\n editorEl.style.top = `${top - containerBounds.top - editorHeight - MARGIN_VERTICAL}px`;\n }\n\n // Get bounding box in current orientation for next tests\n const currentOrientation = editorEl.children[1].getBoundingClientRect();\n\n // Test 3: does the top (still?) extend beyond top of the page?\n // If so, push it down\n if (currentOrientation.top < 0) {\n editorEl.classList.add('pushed', 'down');\n editorEl.style.top = `${-containerBounds.top}px`;\n\n const shapeBottom = bottom - containerBounds.top;\n const editorBottom = currentOrientation.height - containerBounds.top;\n\n if (editorBottom > shapeBottom)\n editorEl.classList.remove('r6o-arrow-bottom');\n\n }\n\n // Test 4: does the left edge extend beyond the start of the page?\n // If so, push inward\n if (currentOrientation.left < 0) {\n editorEl.classList.add('pushed', 'right');\n editorEl.style.left = `${-containerBounds.left}px`;\n }\n\n // Make visible\n requestAnimationFrame(() =>\n editorEl.style.opacity = 1);\n }\n}\n\nexport default setPosition;\n","import React, { Component } from 'react';\nimport Draggable from 'react-draggable';\nimport { getWidget, DEFAULT_WIDGETS } from './widgets';\nimport { TrashIcon } from '../Icons';\nimport setPosition from './setPosition';\nimport i18n from '../i18n';\n\n/** We need to compare bounds by value, not by object ref **/\nconst bounds = elem => {\n const { top, left, width, height } = elem.getBoundingClientRect();\n return `${top}, ${left}, ${width}, ${height}`;\n}\n\n/**\n * The popup editor component.\n *\n * TODO instead of just updating the current annotation state,\n * we could create a stack of revisions, and allow going back\n * with CTRL+Z.\n */\nexport default class Editor extends Component {\n\n constructor(props) {\n super(props);\n\n // Reference to the DOM element, so we can set position\n this.element = React.createRef();\n\n this.state = {\n currentAnnotation: props.annotation,\n dragged: false,\n selectionBounds: bounds(props.selectedElement)\n }\n }\n\n componentWillReceiveProps(next) {\n const { selectionBounds } = this.state;\n const nextBounds = bounds(next.selectedElement);\n\n if (!this.props.annotation?.isEqual(next.annotation)) {\n this.setState({\n currentAnnotation: next.annotation,\n selectionBounds: nextBounds\n });\n } else {\n this.setState({ selectionBounds: nextBounds });\n }\n\n if (this.props.modifiedTarget != next.modifiedTarget) {\n // Update in case target was changed (move, resize)\n if (this.state.currentAnnotation)\n this.updateCurrentAnnotation({ target: this.props.modifiedTarget });\n }\n\n // Change editor position if element has moved\n if (selectionBounds != nextBounds) {\n if (this.element.current) {\n this.removeObserver && this.removeObserver();\n this.removeObserver = this.initResizeObserver();\n }\n }\n }\n\n componentDidMount() {\n this.removeObserver = this.initResizeObserver();\n\n // This makes sure the editor is repositioned if the widgets change\n const observer = new MutationObserver(() => {\n if (this.element.current) {\n this.removeObserver && this.removeObserver();\n this.removeObserver = this.initResizeObserver();\n }\n });\n\n observer.observe(this.element.current, { childList: true, subtree: true });\n }\n\n componentWillUnmount() {\n // Remove the observer\n this.removeObserver && this.removeObserver();\n }\n\n initResizeObserver = () => {\n // Defaults to true\n const autoPosition =\n this.props.autoPosition === undefined ? true : this.props.autoPosition;\n\n if (window?.ResizeObserver) {\n const resizeObserver = new ResizeObserver(() => {\n if (!this.state.dragged)\n setPosition(this.props.wrapperEl, this.element.current, this.props.selectedElement, autoPosition);\n });\n\n resizeObserver.observe(this.props.wrapperEl);\n return () => resizeObserver.disconnect();\n } else {\n // Fire setPosition manually *only* for devices that don't support ResizeObserver\n if (!this.state.dragged)\n setPosition(this.props.wrapperEl, this.element.current, this.props.selectedElement, autoPosition);\n }\n }\n\n /** Creator and created/modified timestamp metadata **/\n creationMeta = body => {\n const meta = {};\n\n const { user } = this.props.env;\n\n // Metadata is only added when a user is set, otherwise\n // the Editor operates in 'anonymous mode'.\n if (user) {\n meta.creator = {};\n if (user.id) meta.creator.id = user.id;\n if (user.displayName) meta.creator.name = user.displayName;\n\n meta[body.created ? 'modified' : 'created'] = this.props.env.getCurrentTimeAdjusted();\n }\n\n return meta;\n }\n\n getCurrentAnnotation = () =>\n this.state.currentAnnotation.clone();\n\n hasChanges = () =>\n !this.props.annotation?.isEqual(this.state.currentAnnotation);\n\n /** Shorthand **/\n updateCurrentAnnotation = (diff, saveImmediately) => {\n this.setState({\n currentAnnotation: this.state.currentAnnotation.clone(diff)\n }, () => {\n if (saveImmediately)\n this.onOk();\n else \n this.props.onChanged && this.props.onChanged();\n })\n }\n\n onAppendBody = (body, saveImmediately) => this.updateCurrentAnnotation({\n body: [\n ...this.state.currentAnnotation.bodies,\n { ...body, ...this.creationMeta(body) }\n ]\n }, saveImmediately);\n\n onUpdateBody = (previous, updated, saveImmediately) => this.updateCurrentAnnotation({\n body: this.state.currentAnnotation.bodies.map(body =>\n body === previous ? { ...updated, ...this.creationMeta(updated) } : body)\n }, saveImmediately);\n\n onRemoveBody = (body, saveImmediately) => this.updateCurrentAnnotation({\n body: this.state.currentAnnotation.bodies.filter(b => b !== body)\n }, saveImmediately);\n\n /**\n * For convenience: an 'append or update' shorthand.\n */\n onUpsertBody = (arg1, arg2, saveImmediately) => {\n if (arg1 == null && arg2 != null) {\n // Append arg 2 as a new body\n this.onAppendBody(arg2, saveImmediately);\n } else if (arg1 != null && arg2 != null) {\n // Replace body arg1 with body arg2\n this.onUpdateBody(arg1, arg2, saveImmediately);\n } else if (arg1 != null && arg2 == null) {\n // Find the first body with the same purpose as arg1,\n // and upsert\n const existing = this.state.currentAnnotation.bodies.find(b => b.purpose === arg1.purpose);\n if (existing)\n this.onUpdateBody(existing, arg1, saveImmediately);\n else\n this.onAppendBody(arg1, saveImmediately);\n }\n }\n\n /**\n * Advanced method for applying a batch of body changes\n * in one go (append, remove update), optionally saving\n * immediately afterwards. The argument is an array of\n * diff objects with the following structure:\n *\n * [\n * { action: 'append', body: bodyToAppend },\n * { action: 'update', previous: prevBody, updated: updatedBody }\n * { action: 'remove', body: bodyToRemove },\n *\n * // Normal upsert, previous is optional\n * { action: 'upsert', previous: prevBody, updated: updatedBody }\n *\n * // Auto-upsert based on purpose\n * { action: 'upsert', body: bodyToUpsert }\n * ]\n */\n onBatchModify = (diffs, saveImmediately) => {\n // First, find previous bodies for auto upserts\n const autoUpserts = diffs\n .filter(d => d.action === 'upsert' && d.body)\n .map(d => ({\n previous: this.state.currentAnnotation.bodies.find(b => b.purpose === d.body.purpose),\n updated: { ...d.body, ...this.creationMeta(d.body)}\n }));\n\n const toRemove = diffs\n .filter(d => d.action === 'remove')\n .map(d => d.body);\n\n const toAppend = [\n ...diffs\n .filter(d => (d.action === 'append') || (d.action === 'upsert' && d.updated && !d.previous))\n .map(d => ({ ...d.body, ...this.creationMeta(d.body) })),\n\n ...autoUpserts\n .filter(d => !d.previous)\n .map(d => d.updated)\n ];\n\n const toUpdate = [\n ...diffs\n .filter(d => (d.action === 'update') || (d.action === 'upsert' && d.updated && d.previous))\n .map(d => ({\n previous: d.previous,\n updated: { ...d.updated, ...this.creationMeta(d.updated) }\n })),\n\n ...autoUpserts\n .filter(d => d.previous)\n ];\n\n const updatedBodies = [\n // Current bodies\n ...this.state.currentAnnotation.bodies\n // Remove\n .filter(b => !toRemove.includes(b))\n\n // Update\n .map(b => {\n const diff = toUpdate.find(t => t.previous === b);\n return diff ? diff.updated : b;\n }),\n\n // Append\n ...toAppend\n ]\n\n this.updateCurrentAnnotation({ body: updatedBodies }, saveImmediately);\n }\n\n /**\n * Sets the given property value at the top level of the annotation.\n * @param property property key\n * @param value property value - set to null to delete the property\n */\n onSetProperty = (property, value) => {\n // A list of properties the user is NOT allowed to set\n const isForbidden = [ '@context', 'id', 'type', 'body', 'target' ].includes(property);\n\n if (isForbidden)\n throw new Exception(`Cannot set ${property} - not allowed`);\n\n if (value) {\n this.updateCurrentAnnotation({ [ property ]: value });\n } else {\n const updated = this.currentAnnotation.clone();\n delete updated[ property ];\n this.setState({ currentAnnotation: updated });\n }\n }\n\n /**\n * Adds a URI to the context field\n */\n onAddContext = uri => {\n const { currentAnnotation } = this.state;\n const context = Array.isArray(currentAnnotation.context) ?\n currentAnnotation.context : [ currentAnnotation.context ];\n\n if (context.indexOf(uri) < 0) {\n context.push(uri);\n this.updateCurrentAnnotation({ '@context': context });\n }\n }\n\n onCancel = () =>\n this.props.onCancel(this.props.annotation);\n\n onOk = () => {\n // Removes the state payload from all bodies\n const undraft = annotation =>\n annotation.clone({\n body : annotation.bodies.map(({ draft, ...rest }) => rest)\n });\n\n const { currentAnnotation } = this.state;\n\n // Current annotation is either a selection (if it was created from\n // scratch just now) or an annotation (if it existed already and was\n // selected for editing)\n if (currentAnnotation.bodies.length === 0 && !this.props.allowEmpty) {\n if (currentAnnotation.isSelection)\n this.onCancel();\n else\n this.props.onAnnotationDeleted(this.props.annotation);\n } else {\n if (currentAnnotation.isSelection)\n this.props.onAnnotationCreated(undraft(currentAnnotation).toAnnotation());\n else\n this.props.onAnnotationUpdated(undraft(currentAnnotation), this.props.annotation);\n }\n }\n\n onDelete = () =>\n this.props.onAnnotationDeleted(this.props.annotation);\n\n render() {\n const { currentAnnotation } = this.state;\n\n // Use default comment + tag widget unless host app overrides\n const widgets = this.props.widgets ?\n this.props.widgets.map(getWidget) : DEFAULT_WIDGETS;\n\n const isReadOnlyWidget = w => w.type.disableDelete ?\n w.type.disableDelete(currentAnnotation, {\n ...w.props,\n readOnly:this.props.readOnly,\n env: this.props.env\n }) : false;\n\n const hasDelete = currentAnnotation &&\n // annotation has bodies or allowEmpty,\n (currentAnnotation.bodies.length > 0 || this.props.allowEmpty) && // AND\n !this.props.readOnly && // we are not in read-only mode AND\n !currentAnnotation.isSelection && // this is not a selection AND\n !widgets.some(isReadOnlyWidget); // every widget is deletable\n\n return (\n <Draggable\n disabled={!this.props.detachable}\n handle=\".r6o-draggable\"\n cancel=\".r6o-btn, .r6o-btn *\"\n onDrag={() => this.setState({ dragged: true })}>\n\n <div ref={this.element} className={this.state.dragged ? 'r6o-editor dragged' : 'r6o-editor'}>\n <div className=\"r6o-arrow\" />\n <div className=\"r6o-editor-inner\">\n {widgets.map((widget, idx) =>\n React.cloneElement(widget, {\n key: `${idx}`,\n focus: idx === 0,\n annotation : currentAnnotation,\n readOnly : this.props.readOnly,\n env: this.props.env,\n onAppendBody: this.onAppendBody,\n onUpdateBody: this.onUpdateBody,\n onRemoveBody: this.onRemoveBody,\n onUpsertBody: this.onUpsertBody,\n onBatchModify: this.onBatchModify,\n onSetProperty: this.onSetProperty,\n onAddContext: this.onAddContext,\n onSaveAndClose: this.onOk\n })\n )}\n\n { this.props.readOnly ? (\n <div className=\"r6o-footer\">\n <button\n className=\"r6o-btn\"\n onClick={this.onCancel}>{i18n.t('Close')}</button>\n </div>\n ) : (\n <div\n className={this.props.detachable ? \"r6o-footer r6o-draggable\" : \"r6o-footer\"}>\n { hasDelete && (\n <button\n className=\"r6o-btn left delete-annotation\"\n title={i18n.t('Delete')}\n onClick={this.onDelete}>\n <TrashIcon width={12} />\n </button>\n )}\n\n <button\n className=\"r6o-btn outline\"\n onClick={this.onCancel}>{i18n.t('Cancel')}</button>\n\n <button\n className=\"r6o-btn \"\n onClick={this.onOk}>{i18n.t('Ok')}</button>\n </div>\n )}\n </div>\n </div>\n\n </Draggable>\n )\n\n }\n\n}\n","import React, { Component } from 'react';\r\nimport AnnotationLayer from './AnnotationLayer';\r\nimport { Editor } from '@recogito/recogito-client-core';\r\nimport { getSnippet } from './util/ImageSnippet';\r\n\r\nimport './ImageAnnotator.scss';\r\n\r\nexport default class ImageAnnotator extends Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n selectedAnnotation: null,\r\n selectedDOMElement: null,\r\n modifiedTarget: null,\r\n\r\n // ReadOnly mode\r\n readOnly: this.props.config.readOnly,\r\n\r\n // Headless mode\r\n editorDisabled: this.props.config.disableEditor,\r\n\r\n // Widgets\r\n widgets: this.props.config.widgets,\r\n\r\n // Records the state before any potential headless modify (done via\r\n // .updateSelected) so we can properly fire the updateAnnotation(a, previous)\r\n // event, and distinguish between headless Save and Cancel\r\n beforeHeadlessModify: null\r\n }\r\n\r\n this._editor = React.createRef();\r\n }\r\n\r\n /** Shorthand **/\r\n clearState = opt_callback => this.setState({\r\n selectedAnnotation: null,\r\n selectedDOMElement: null,\r\n modifiedTarget: null,\r\n beforeHeadlessModify: null\r\n }, opt_callback);\r\n\r\n componentDidMount() {\r\n this.annotationLayer = new AnnotationLayer(this.props);\r\n\r\n this.annotationLayer.on('load', this.props.onLoad);\r\n\r\n this.annotationLayer.on('startSelection', this.handleStartSelect);\r\n this.annotationLayer.on('select', this.handleSelect);\r\n\r\n this.annotationLayer.on('updateTarget', this.handleUpdateTarget);\r\n\r\n this.forwardEvent('clickAnnotation','onClickAnnotation');\r\n this.forwardEvent('mouseEnterAnnotation', 'onMouseEnterAnnotation');\r\n this.forwardEvent('mouseLeaveAnnotation','onMouseLeaveAnnotation');\r\n \r\n // Escape cancels editing\r\n document.addEventListener('keyup', this.onKeyUp);\r\n }\r\n\r\n forwardEvent = (from, to) => {\r\n this.annotationLayer.on(from, (annotation, elem) => {\r\n this.props[to](annotation.clone(), elem);\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n this.annotationLayer.destroy();\r\n document.removeEventListener('keyup', this.onKeyUp);\r\n }\r\n\r\n onKeyUp = evt => {\r\n if (evt.which === 27) { // Escape\r\n const { disableEscapeKey } = this.props.config;\r\n\r\n if (!disableEscapeKey) {\r\n this.annotationLayer.stopDrawing();\r\n \r\n const { selectedAnnotation } = this.state;\r\n if (selectedAnnotation) {\r\n this.cancelSelected();\r\n this.props.onCancelSelected(selectedAnnotation);\r\n }\r\n }\r\n } else if (evt.which === 46) { // Delete\r\n const { disableDeleteKey } = this.props.config;\r\n\r\n if (!disableDeleteKey) {\r\n const { selectedAnnotation } = this.state;\r\n if (selectedAnnotation) {\r\n if (selectedAnnotation.isSelection) {\r\n this.onCancelAnnotation(selectedAnnotation);\r\n } else {\r\n this.onDeleteAnnotation(selectedAnnotation);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n handleStartSelect = pt =>\r\n this.props.onSelectionStarted(pt);\r\n\r\n handleSelect = (evt, skipEvent) => {\r\n this.state.editorDisabled ?\r\n this.onHeadlessSelect(evt, skipEvent) : this.onNormalSelect(evt, skipEvent);\r\n }\r\n\r\n /** Selection when editorDisabled == false **/\r\n onNormalSelect = (evt, skipEvent) => {\r\n const { annotation, element } = evt;\r\n\r\n if (annotation) {\r\n // Select action needs to run immediately if no annotation was\r\n // selected before. Otherwise, make a deselect state change first,\r\n // and then select after this state change has completed. (This is\r\n // keep our external event cycle clean!)\r\n const select = opt_callback => {\r\n this.setState({\r\n selectedAnnotation: annotation,\r\n selectedDOMElement: element,\r\n modifiedTarget: null,\r\n beforeHeadlessModify: null\r\n }, () => {\r\n if (!skipEvent) {\r\n if (annotation.isSelection) {\r\n this.props.onSelectionCreated(annotation.clone());\r\n } else {\r\n this.props.onAnnotationSelected(annotation.clone(), element);\r\n }\r\n }\r\n\r\n opt_callback && opt_callback();\r\n });\r\n }\r\n\r\n // If there is another selected annotation,\r\n // fire cancel before making the new selection\r\n const { selectedAnnotation } = this.state;\r\n\r\n if (selectedAnnotation && !selectedAnnotation.isEqual(annotation)) {\r\n this.clearState(() => {\r\n this.props.onCancelSelected(selectedAnnotation.clone());\r\n select(() =>\r\n this.props.onChangeSelected(annotation.clone(), selectedAnnotation.clone()));\r\n });\r\n } else {\r\n select();\r\n }\r\n } else {\r\n const { selectedAnnotation } = this.state;\r\n\r\n if (selectedAnnotation)\r\n this.clearState(() => {\r\n this.props.onCancelSelected(selectedAnnotation);\r\n });\r\n else\r\n this.clearState();\r\n }\r\n }\r\n\r\n /** Selection when editorDisabled == true **/\r\n onHeadlessSelect = (evt, skipEvent) => {\r\n // When in headless mode, changing selection acts as 'Ok' - changes\r\n // to the previous annotation are stored! (In normal mode, selection\r\n // acts as 'Cancel'.)\r\n this.saveSelected().then(() => {\r\n this.onNormalSelect(evt, skipEvent);\r\n\r\n // saveSelected will have deselected - we need to re-select\r\n const { annotation } = evt;\r\n\r\n if (annotation && !annotation.isSelection) {\r\n const selection = this.annotationLayer.selectAnnotation(evt.annotation, true);\r\n this.setState({ selectedDOMElement: selection.element });\r\n }\r\n });\r\n }\r\n\r\n handleUpdateTarget = (selectedDOMElement, modifiedTarget) => {\r\n this.setState({ selectedDOMElement, modifiedTarget });\r\n\r\n const clone = JSON.parse(JSON.stringify(modifiedTarget));\r\n this.props.onSelectionTargetChanged(clone);\r\n }\r\n\r\n /**\r\n * A convenience method that allows the external application to\r\n * override the autogenerated Id for an annotation.\r\n */\r\n overrideAnnotationId = originalAnnotation => forcedId => {\r\n const { id } = originalAnnotation;\r\n\r\n // Force the editor to close first, otherwise there's a risk of orphaned annotation\r\n if (this.state.selectedAnnotation) {\r\n this.clearState(() => {\r\n this.annotationLayer.overrideId(id, forcedId);\r\n });\r\n } else {\r\n this.annotationLayer.overrideId(id, forcedId);\r\n }\r\n }\r\n\r\n /**************************/\r\n /* Annotation CRUD events */\r\n /**************************/\r\n\r\n /** Common handler for annotation CREATE or UPDATE **/\r\n onCreateOrUpdateAnnotation = (method, opt_callback) => (annotation, previous) => {\r\n // Merge updated target if necessary\r\n let a = annotation.isSelection ? annotation.toAnnotation() : annotation;\r\n\r\n a = (this.state.modifiedTarget) ?\r\n a.clone({ target: this.state.modifiedTarget }) : a.clone();\r\n\r\n this.clearState(() => {\r\n this.annotationLayer.deselect();\r\n this.annotationLayer.addOrUpdateAnnotation(a, previous);\r\n\r\n // Call CREATE or UPDATE handler\r\n if (previous)\r\n this.props[method](a, previous.clone());\r\n else\r\n this.props[method](a, this.overrideAnnotationId(a));\r\n\r\n opt_callback && opt_callback();\r\n });\r\n }\r\n\r\n onDeleteAnnotation = annotation => {\r\n this.clearState();\r\n this.annotationLayer.removeAnnotation(annotation);\r\n this.props.onAnnotationDeleted(annotation);\r\n }\r\n\r\n onCancelAnnotation = (annotation, opt_callback) => {\r\n this.annotationLayer.deselect();\r\n this.props.onCancelSelected(annotation);\r\n this.clearState(opt_callback);\r\n }\r\n\r\n /****************/\r\n /* External API */\r\n /****************/\r\n\r\n addAnnotation = annotation =>\r\n this.annotationLayer.addOrUpdateAnnotation(annotation.clone());\r\n\r\n addDrawingTool = plugin =>\r\n this.annotationLayer.addDrawingTool(plugin);\r\n\r\n /** Cancel is an async op, return promise **/\r\n cancelSelected = () => new Promise(resolve => {\r\n this.annotationLayer.deselect();\r\n\r\n if (this.state.selectedAnnotation) {\r\n // Clear state and resolve afterwards\r\n this.clearState(resolve);\r\n } else { \r\n // Nothing to clear - resolve now\r\n resolve();\r\n }\r\n });\r\n\r\n get disableEditor() {\r\n return this.state.editorDisabled;\r\n }\r\n\r\n set disableEditor(disabled) {\r\n this.setState({ editorDisabled: disabled });\r\n }\r\n\r\n get disableSelect() {\r\n return this.annotationLayer.disableSelect;\r\n }\r\n\r\n set disableSelect(disable) {\r\n this.annotationLayer.disableSelect = disable;\r\n }\r\n\r\n get formatters() {\r\n return this.annotationLayer.formatters;\r\n }\r\n\r\n set formatters(formatters) {\r\n this.annotationLayer.formatters = formatters;\r\n this.annotationLayer.redraw();\r\n }\r\n\r\n getAnnotationById = annotationId =>\r\n this.annotationLayer.findShape(annotationId)?.annotation;\r\n\r\n getAnnotations = () =>\r\n this.annotationLayer.getAnnotations().map(a => a.clone());\r\n\r\n getImageSnippetById = annotationId => {\r\n const shape = this.annotationLayer.findShape(annotationId);\r\n if (shape)\r\n return getSnippet(this.props.env.image, shape);\r\n }\r\n\r\n getSelected = () => {\r\n if (this.state.selectedAnnotation) {\r\n return this.state.editorDisabled ?\r\n this.state.selectedAnnotation :\r\n this._editor.current?.getCurrentAnnotation();\r\n }\r\n }\r\n\r\n getSelectedImageSnippet = () =>\r\n this.annotationLayer.getSelectedImageSnippet();\r\n\r\n getCurrentDrawingTool = () => this.annotationLayer.tools?.current;\r\n\r\n getSelectedShape = () =>\r\n this.annotationLayer.selectedShape;\r\n\r\n listDrawingTools = () =>\r\n this.annotationLayer.listDrawingTools();\r\n\r\n get readOnly() {\r\n return this.state.readOnly;\r\n }\r\n\r\n set readOnly(readOnly) {\r\n this.annotationLayer.readOnly = readOnly;\r\n this.setState({ readOnly });\r\n }\r\n\r\n removeAnnotation = annotationOrId => {\r\n this.annotationLayer.removeAnnotation(annotationOrId);\r\n if (this.state.selectedAnnotation)\r\n this.setState({ selectedAnnotation: null });\r\n }\r\n\r\n removeDrawingTool = id =>\r\n this.annotationLayer.removeDrawingTool(id);\r\n\r\n saveSelected = () =>\r\n new Promise(resolve => {\r\n const a = this.state.selectedAnnotation;\r\n\r\n if (a) {\r\n if (this._editor.current) {\r\n this._editor.current.onOk();\r\n resolve();\r\n } else if (a.isSelection) {\r\n if (a.bodies.length > 0 || this.props.config.allowEmpty) {\r\n this.onCreateOrUpdateAnnotation('onAnnotationCreated', resolve)(a);\r\n } else {\r\n this.annotationLayer.deselect();\r\n resolve();\r\n }\r\n } else {\r\n // Headless update?\r\n const { beforeHeadlessModify, modifiedTarget } = this.state;\r\n\r\n if (beforeHeadlessModify) {\r\n // Annotation was modified using '.updateSelected()'\r\n this.onCreateOrUpdateAnnotation('onAnnotationUpdated', resolve)(a, beforeHeadlessModify);\r\n } else if (modifiedTarget) {\r\n // Target was modified, but otherwise no change\r\n this.onCreateOrUpdateAnnotation('onAnnotationUpdated', resolve)(a, a);\r\n } else {\r\n this.onCancelAnnotation(a, resolve);\r\n }\r\n }\r\n } else {\r\n resolve();\r\n }\r\n });\r\n\r\n selectAnnotation = arg => {\r\n const selected = this.annotationLayer.selectAnnotation(arg, true);\r\n\r\n if (selected) {\r\n this.handleSelect(selected, true);\r\n return selected.annotation.clone();\r\n } else {\r\n this.clearState(); // Deselect\r\n }\r\n }\r\n\r\n setAnnotations = annotations =>\r\n this.annotationLayer.init(annotations.map(a => a.clone()));\r\n\r\n setDrawingTool = shape =>\r\n this.annotationLayer.setDrawingTool(shape);\r\n\r\n setVisible = visible => {\r\n this.annotationLayer.setVisible(visible);\r\n\r\n if (!visible)\r\n this.clearState();\r\n }\r\n\r\n updateSelected = (annotation, saveImmediately) =>\r\n new Promise(resolve => {\r\n if (this.state.selectedAnnotation) {\r\n if (saveImmediately) {\r\n if (this.state.selectedAnnotation.isSelection) {\r\n this.onCreateOrUpdateAnnotation('onAnnotationCreated', resolve)(annotation);\r\n } else {\r\n this.onCreateOrUpdateAnnotation('onAnnotationUpdated', resolve)(annotation, this.state.selectedAnnotation);\r\n }\r\n } else {\r\n this.setState({\r\n selectedAnnotation: annotation, // Updated annotation\r\n beforeHeadlessModify: this.state.beforeHeadlessModify || this.state.selectedAnnotation\r\n }, resolve);\r\n }\r\n }\r\n });\r\n\r\n get widgets() {\r\n return this.state.widgets;\r\n }\r\n\r\n set widgets(widgets) {\r\n this.setState({ widgets });\r\n }\r\n\r\n render() {\r\n // The editor should open under normal conditions - annotation was selected, no headless mode\r\n const open = this.state.selectedAnnotation && !this.state.editorDisabled;\r\n\r\n const readOnly = this.state.readOnly || this.state.selectedAnnotation?.readOnly;\r\n\r\n return (open && (\r\n <Editor\r\n ref={this._editor}\r\n detachable\r\n wrapperEl={this.props.wrapperEl}\r\n annotation={this.state.selectedAnnotation}\r\n modifiedTarget={this.state.modifiedTarget}\r\n selectedElement={this.state.selectedDOMElement}\r\n readOnly={readOnly}\r\n allowEmpty={this.props.config.allowEmpty}\r\n widgets={this.state.widgets}\r\n env={this.props.env}\r\n onAnnotationCreated={this.onCreateOrUpdateAnnotation('onAnnotationCreated')}\r\n onAnnotationUpdated={this.onCreateOrUpdateAnnotation('onAnnotationUpdated')}\r\n onAnnotationDeleted={this.onDeleteAnnotation}\r\n onCancel={this.onCancelAnnotation} />\r\n ))\r\n }\r\n\r\n}\r\n","/**\n * Difference between server time and client time, in milliseconds\n */\nlet serverTimeDifference = 0;\n\nexport default () => ({\n \n /**\n * A generic container for RecogitoJS/Annotorious \n * to store globally available environment info. The \n * most important piece of information is user auth \n * info. Example:\n *\n * user: { id, displayName, email, avatarURL }\n * \n * id ........... the host application user ID (should be a URI, but could be username) REQUIRED\n * displayName .. screen display or nickname OPTIONAL (id is used when empty)\n * email ........ OPTIONAL\n * avatarURL .... OPTIONAL + not supported at the moment\n */\n\n /**\n * Sets a server time, so we can correct browser time error. \n * Note for the super-picky: client-server latency will introduce\n * an error we don't account for.\n */\n setServerTime: serverNow => {\n const browserNow = Date.now()\n serverTimeDifference = serverNow - browserNow;\n },\n \n /** \n * Returns the current 'server time', i.e. browser time \n * adjusted by the serverTimeDifference value.\n */\n getCurrentTimeAdjusted: () =>\n (new Date(Date.now() + serverTimeDifference)).toISOString(),\n\n /** Re-adjusts the given server timestamp to browser time **/\n toClientTime: serverTime =>\n Date.parse(serverTime) - serverTimeDifference\n\n})","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport Emitter from 'tiny-emitter';\r\nimport ImageAnnotator from './ImageAnnotator';\r\nimport {\r\n Selection,\r\n WebAnnotation,\r\n createEnvironment,\r\n setLocale\r\n} from '@recogito/recogito-client-core';\r\n\r\nimport '@recogito/recogito-client-core/themes/default';\r\n\r\n/**\r\n * The entrypoint into the application. Provides the\r\n * externally visible JavaScript API.\r\n */\r\nexport class Annotorious {\r\n\r\n constructor(config) {\r\n // Programmatic calls to this instance from outside are forwarded\r\n // through a ref\r\n this._app = React.createRef();\r\n\r\n // Event handling via tiny-emitter\r\n this._emitter = new Emitter();\r\n\r\n // TODO .headless option is deprecated!\r\n config.disableEditor = config.disableEditor || config.headless;\r\n\r\n // Host app may supply the image as either a DOM node or ID - normalize\r\n const imageEl = (config.image.nodeType) ?\r\n config.image : document.getElementById(config.image);\r\n\r\n // Wrapper div might produce unwanted margin at the bottom otherwise!\r\n imageEl.style.display = 'block';\r\n\r\n // Store image reference in the Environment\r\n this._env = createEnvironment();\r\n this._env.image = imageEl;\r\n\r\n setLocale(config.locale, config.messages);\r\n\r\n // We'll wrap the image in a DIV ('_element'). The application\r\n // container DIV, which holds the editor popup, will be attached\r\n // as a child to the same wrapper element (=a sibling to the image\r\n // element), so that editor and image share the same offset coordinate\r\n // space.\r\n this._element = document.createElement('DIV');\r\n this._element.style.position = 'relative';\r\n this._element.style.display = 'inline-block';\r\n\r\n imageEl.parentNode.insertBefore(this._element, imageEl);\r\n this._element.appendChild(imageEl);\r\n\r\n this._appContainerEl = document.createElement('DIV');\r\n this._element.appendChild(this._appContainerEl);\r\n\r\n // A basic ImageAnnotator with just a comment and a tag widget\r\n ReactDOM.render(\r\n <ImageAnnotator\r\n ref={this._app}\r\n env={this._env}\r\n wrapperEl={this._element}\r\n config={config}\r\n onSelectionStarted={this.handleSelectionStarted}\r\n onSelectionCreated={this.handleSelectionCreated}\r\n onSelectionTargetChanged={this.handleSelectionTargetChanged}\r\n onAnnotationCreated={this.handleAnnotationCreated}\r\n onAnnotationSelected={this.handleAnnotationSelected}\r\n onAnnotationUpdated={this.handleAnnotationUpdated}\r\n onAnnotationDeleted={this.handleAnnotationDeleted}\r\n onCancelSelected={this.handleCancelSelected}\r\n onChangeSelected={this.handleChangeSelected}\r\n onClickAnnotation={this.handleClickAnnotation}\r\n onLoad={this.handleLoad}\r\n onMouseEnterAnnotation={this.handleMouseEnterAnnotation}\r\n onMouseLeaveAnnotation={this.handleMouseLeaveAnnotation} />, this._appContainerEl);\r\n }\r\n\r\n /********************/\r\n /* External events */\r\n /********************/\r\n\r\n handleAnnotationCreated = (annotation, overrideId) =>\r\n this._emitter.emit('createAnnotation', annotation.underlying, overrideId);\r\n\r\n handleAnnotationDeleted = annotation =>\r\n this._emitter.emit('deleteAnnotation', annotation.underlying);\r\n\r\n handleAnnotationSelected = (annotation, elem) =>\r\n this._emitter.emit('selectAnnotation', annotation.underlying, elem);\r\n\r\n handleAnnotationUpdated = (annotation, previous) =>\r\n this._emitter.emit('updateAnnotation', annotation.underlying, previous.underlying);\r\n\r\n handleCancelSelected = annotation =>\r\n this._emitter.emit('cancelSelected', annotation.underlying);\r\n\r\n handleChangeSelected = (selected, previous) =>\r\n this._emitter.emit('changeSelected', selected.underlying, previous.underlying);\r\n\r\n handleClickAnnotation = (annotation, elem) =>\r\n this._emitter.emit('clickAnnotation', annotation.underlying, elem);\r\n\r\n handleLoad = src =>\r\n this._emitter.emit('load', src);\r\n\r\n handleSelectionCreated = selection =>\r\n this._emitter.emit('createSelection', selection.underlying);\r\n\r\n handleSelectionStarted = pt =>\r\n this._emitter.emit('startSelection', pt);\r\n\r\n handleSelectionTargetChanged = target =>\r\n this._emitter.emit('changeSelectionTarget', target);\r\n\r\n handleMouseEnterAnnotation = (annotation, elem) =>\r\n this._emitter.emit('mouseEnterAnnotation', annotation.underlying, elem);\r\n\r\n handleMouseLeaveAnnotation = (annotation, elem) =>\r\n this._emitter.emit('mouseLeaveAnnotation', annotation.underlying, elem);\r\n\r\n /******************/\r\n /* External API */\r\n /******************/\r\n\r\n // Common shorthand for handling annotationOrId args\r\n _wrap = annotationOrId =>\r\n annotationOrId?.type === 'Annotation' ? new WebAnnotation(annotationOrId) : annotationOrId;\r\n\r\n addAnnotation = (annotation, readOnly) =>\r\n this._app.current.addAnnotation(new WebAnnotation(annotation, { readOnly }));\r\n\r\n addDrawingTool = plugin =>\r\n this._app.current.addDrawingTool(plugin);\r\n\r\n cancelSelected = () =>\r\n this._app.current.cancelSelected();\r\n\r\n clearAnnotations = () =>\r\n this.setAnnotations([]);\r\n\r\n clearAuthInfo = () =>\r\n this._env.user = null;\r\n\r\n get disableEditor() {\r\n return this._app.current.disableEditor;\r\n }\r\n\r\n set disableEditor(disabled) {\r\n this._app.current.disableEditor = disabled;\r\n }\r\n\r\n get disableSelect() {\r\n return this._app.current.disableSelect;\r\n }\r\n\r\n set disableSelect(select) {\r\n this._app.current.disableSelect = select;\r\n }\r\n\r\n destroy = () => {\r\n ReactDOM.unmountComponentAtNode(this._appContainerEl);\r\n this._element.parentNode.insertBefore(this._env.image, this._element);\r\n this._element.parentNode.removeChild(this._element);\r\n }\r\n \r\n get formatters() {\r\n return this._app.current.formatters || [];\r\n }\r\n\r\n set formatters(arg) {\r\n if (arg) {\r\n const formatters = Array.isArray(arg) ? arg : [ arg ];\r\n this._app.current.formatters = formatters; \r\n } else {\r\n this._app.current.formatters = null;\r\n }\r\n }\r\n \r\n getAnnotationById = annotationId => {\r\n const a = this._app.current.getAnnotationById(annotationId);\r\n return a?.underlying;\r\n }\r\n\r\n getAnnotations = () => {\r\n const annotations = this._app.current.getAnnotations();\r\n return annotations.map(a => a.underlying);\r\n }\r\n\r\n getImageSnippetById = annotationId =>\r\n this._app.current.getImageSnippetById(annotationId);\r\n\r\n getSelected = () => {\r\n const selected = this._app.current.getSelected();\r\n return selected?.underlying;\r\n }\r\n\r\n getSelectedImageSnippet = () =>\r\n this._app.current.getSelectedImageSnippet();\r\n\r\n getCurrentDrawingTool = () => this._app.current.getCurrentDrawingTool();\r\n\r\n getSelectedShape = () => this._app.current.getSelectedShape();\r\n\r\n listDrawingTools = () =>\r\n this._app.current.listDrawingTools();\r\n\r\n loadAnnotations = url => fetch(url)\r\n .then(response => response.json()).then(annotations => {\r\n this.setAnnotations(annotations);\r\n return annotations;\r\n });\r\n\r\n off = (event, callback) =>\r\n this._emitter.off(event, callback);\r\n\r\n on = (event, handler) =>\r\n this._emitter.on(event, handler);\r\n\r\n once = (event, handler) =>\r\n this._emitter.once(event, handler);\r\n\r\n get readOnly() {\r\n return this._app.current.readOnly;\r\n }\r\n\r\n set readOnly(readOnly) {\r\n this._app.current.readOnly = readOnly;\r\n }\r\n\r\n removeAnnotation = annotationOrId =>\r\n this._app.current.removeAnnotation(this._wrap(annotationOrId));\r\n\r\n removeDrawingTool = id =>\r\n this._app.current.removeDrawingTool(id);\r\n\r\n saveSelected = () =>\r\n this._app.current.saveSelected();\r\n\r\n selectAnnotation = annotationOrId => {\r\n const selected = this._app.current.selectAnnotation(this._wrap(annotationOrId));\r\n return selected?.underlying;\r\n }\r\n\r\n setAnnotations = a => {\r\n const annotations = a || []; // Allow null arg\r\n const webannotations = annotations.map(a => new WebAnnotation(a));\r\n this._app.current.setAnnotations(webannotations);\r\n }\r\n\r\n setAuthInfo = authinfo =>\r\n this._env.user = authinfo;\r\n\r\n setDrawingTool = shape =>\r\n this._app.current.setDrawingTool(shape);\r\n\r\n setServerTime = timestamp =>\r\n this._env.setServerTime(timestamp);\r\n\r\n setVisible = visible =>\r\n this._app.current.setVisible(visible);\r\n\r\n updateSelected = (annotation, saveImmediately) => {\r\n let updated = null;\r\n\r\n if (annotation.type === 'Annotation')\r\n updated = new WebAnnotation(annotation);\r\n else if (annotation.type === 'Selection')\r\n updated = new Selection(annotation.target, annotation.body);\r\n\r\n if (updated)\r\n this._app.current.updateSelected(updated, saveImmediately);\r\n }\r\n\r\n get widgets() {\r\n return this._app.current.widgets;\r\n }\r\n\r\n set widgets(widgets) {\r\n this._app.current.widgets = widgets;\r\n }\r\n\r\n}\r\n\r\nexport const init = config => new Annotorious(config);\r\n","import I18n, { availableLocales } from '../i18n';\n\n/**\n * Helper to init the i18n class with a pre-defined or auto-detected locale.\n */\nexport const setLocale = (locale, opt_messages) => {\n if (locale) {\n const l = locale === 'auto' ?\n window.navigator.userLanguage || window.navigator.language : locale;\n\n const fallback = l.split('-')[0].toLowerCase();\n const foundLocale = [l, fallback].find(_l => availableLocales.includes(_l));\n\n if (!foundLocale) {\n console.warn(`Unsupported locale '${l}'. Falling back to default en.`);\n }\n\n I18n.init(foundLocale, opt_messages);\n } else {\n I18n.init(null, opt_messages);\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","GetIntrinsic","require","callBound","$TypeError","Call","Get","HasProperty","IsCallable","LengthOfArrayLike","ToObject","ToString","isString","$split","boxedString","Object","splitString","callbackfn","thisArg","thisO","this","O","len","arguments","length","k","Pk","kValue","callBind","RequireObjectCoercible","implementation","getPolyfill","polyfill","shim","$slice","bound","apply","boundCoercible","array","arrayMethodBoxesProperly","method","Array","prototype","forEach","keys","values","map","Map","has","key","indexOf","get","set","value","push","delete","index","splice","createEvent","name","Event","bubbles","e","evt","document","initEvent","assign","ta","nodeName","heightOffset","clientWidth","cachedHeight","pageResize","update","destroy","style","window","removeEventListener","bind","height","resize","overflowY","overflowX","wordWrap","addEventListener","getComputedStyle","boxSizing","parseFloat","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","isNaN","changeOverflow","width","offsetWidth","scrollHeight","overflows","el","arr","parentNode","Element","scrollTop","node","getParentOverflows","docTop","documentElement","styleHeight","Math","round","computed","actualHeight","offsetHeight","dispatchEvent","err","methods","autosize","options","call","x","$indexOf","allowMissing","intrinsic","$apply","$call","$reflectApply","$gOPD","$defineProperty","$max","originalFunction","func","configurable","applyBind","toVal","mix","y","str","_typeof","isArray","tmp","i","prop","currentStyle","replace","word","letter","toUpperCase","obj","Symbol","iterator","constructor","hasSymbols","toStr","toString","concat","origDefineProperty","defineProperty","supportsDescriptors","_","enumerable","arePropertyDescriptorsSupported","object","predicate","fn","writable","defineProperties","predicates","props","getOwnPropertySymbols","properlyBoxesNonStrict","properlyBoxesStrict","threwException","__","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","P","TypeError","GetMethod","valueOf","result","methodNames","ordinaryToPrimitive","ES5internalSlots","actualHint","equal","a","b","RegExp","source","flags","hasOwnProperty","slice","that","target","args","boundLength","max","boundArgs","Function","join","Empty","undefined","$SyntaxError","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","getOwnPropertyDescriptor","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","getProto","getPrototypeOf","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","JSON","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","$strSlice","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","desc","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","toStringTag","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","defaultProps","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","type","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","component","isMemo","ForwardRef","render","Memo","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","badArrayLike","isCallableMarker","fnToStr","reflectApply","constructorRegex","isES6ClassFn","fnStr","test","hasToStringTag","documentDotAll","all","tryFunctionObject","strClass","getDay","tryDateObject","strValue","tryStringObject","symToStr","symStringRegex","isSymbolObject","computedStyle","lnHeightStr","lnHeight","_lnHeightStyle","lineHeight","_node","createElement","innerHTML","setAttribute","fontSizeStr","fontSize","padding","border","body","appendChild","removeChild","entries","warning","trim","warn","message","split","delimiter","russianPluralGroups","n","lastTwo","end","defaultPluralRules","pluralTypes","arabic","bosnian_serbian","chinese","croatian","french","german","russian","lithuanian","czech","polish","icelandic","slovenian","pluralTypeToLanguages","escape","token","localePluralTypeStorage","memoizedPluralTypeName","pluralRules","locale","pluralType","mapping","ret","langToPluralType","entry","langs","lang","en","pluralTypeName","defaultTokenRegex","transformPhrase","phrase","substitutions","tokenRegex","interpolationRegex","smart_count","pluralRulesOrDefault","texts","pluralTypeWithCount","count","pluralTypeIndex","expression","argument","Polyglot","opts","phrases","extend","currentLocale","onMissingKey","prefix","suffix","constructTokenRegex","interpolation","newLocale","morePhrases","prefixedKey","unset","clear","newPhrases","t","hasMap","mapSizeDescriptor","mapSize","mapForEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","inspectCustom","inspectSymbol","wrapQuotes","s","defaultStyle","quoteChar","quoteStyle","inspect_","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isRegExp","ys","isPlainObject","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","charCodeAt","size","lineJoiner","isArr","symMap","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","keysWorksWithArguments","$isEnumerable","$push","entrys","u","r","h","v","children","ref","__k","__b","__e","__d","__c","__h","__v","vnode","p","current","d","context","g","__r","debounceRendering","sort","some","__P","__n","ownerSVGElement","z","w","A","N","M","nextSibling","insertBefore","$","setProperty","H","cssText","T","I","removeAttribute","event","__E","sub","state","__s","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","L","diffed","localName","nodeType","createTextNode","createElementNS","is","data","dangerouslySetInnerHTML","__html","C","checked","unmount","componentWillUnmount","S","firstChild","q","B","D","Consumer","Provider","setState","componentDidCatch","forceUpdate","then","resolve","setTimeout","__H","F","useDebugValue","pop","requestAnimationFrame","clearTimeout","cancelAnimationFrame","filter","E","isReactComponent","__f","isPureReactComponent","R","$$typeof","only","toArray","__u","U","__R","__O","fallback","revealOrder","W","reverse","V","textContent","Z","Y","cancelBubble","defaultPrevented","persist","isPropagationStopped","isDefaultPrevented","nativeEvent","G","J","K","multiple","selected","defaultValue","className","Q","X","ReactCurrentDispatcher","readContext","nn","tn","rn","un","on","ln","cn","useState","useReducer","useEffect","useLayoutEffect","useRef","useImperativeHandle","useMemo","useCallback","useContext","version","Children","hydrate","unmountComponentAtNode","createPortal","createContext","createFactory","cloneElement","createRef","Fragment","isValidElement","findDOMNode","Component","PureComponent","memo","forwardRef","flushSync","unstable_batchedUpdates","StrictMode","Suspense","SuspenseList","lazy","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","propName","componentName","location","propFullName","secret","getShim","isRequired","ReactPropTypes","bigint","bool","symbol","any","arrayOf","element","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","extendStatics","__extends","setPrototypeOf","create","__assign","__rest","__esModule","React","getLineHeight","RESIZED","TextareaAutosizeClass","_super","_this","textarea","onResize","updateLineHeight","onChange","currentValue","currentTarget","_a","maxRows","async","_b","innerRef","maxHeight","rows","TextareaAutosize","TextareaAutosize_1","_DraggableCore","nodeInterop","default","cache","_getRequireWildcardCache","newObj","hasPropertyDescriptor","_interopRequireWildcard","_propTypes","_interopRequireDefault","_reactDom","_clsx2","_domFns","_positionFns","_shims","_log","_excluded","cacheBabelInterop","cacheNodeInterop","_extends","ownKeys","enumerableOnly","symbols","_objectSpread","_defineProperty","getOwnPropertyDescriptors","_arrayLikeToArray","arr2","_defineProperties","_setPrototypeOf","_assertThisInitialized","_getPrototypeOf","Draggable","_React$Component","subClass","superClass","_inherits","Constructor","protoProps","staticProps","Derived","hasNativeReflectConstruct","construct","sham","_isNativeReflectConstruct","Super","NewTarget","_possibleConstructorReturn","instance","_classCallCheck","coreData","onStart","createDraggableData","dragging","dragged","uiData","newState","bounds","slackX","slackY","_getBoundPosition2","getBoundPosition","_arrayWithHoles","_i","_s","_e","_arr","_n","_d","next","done","_iterableToArrayLimit","minLen","_unsupportedIterableToArray","_nonIterableRest","newStateX","newStateY","deltaX","deltaY","onDrag","onStop","position","_this$props$position","defaultPosition","prevPropsPosition","isElementSVG","console","_ref","_ref2","SVGElement","_this$props$nodeRef$c","_this$props","_this$props$nodeRef","nodeRef","_clsx","_this$props2","axis","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","positionOffset","draggableCoreProps","scale","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","_objectWithoutProperties","svgTransform","draggable","validPosition","transformOpts","canDragX","canDragY","createSVGTransform","createCSSTransform","onDragStart","onDragStop","transform","left","right","top","bottom","dontSetMe","eventsFor","start","move","stop","dragEventFor","DraggableCore","_len","_key","lastX","NaN","lastY","touchIdentifier","onMouseDown","allowAnyClick","button","thisNode","ownerDocument","disabled","defaultView","Node","handle","matchesSelectorAndParentsTo","cancel","preventDefault","getTouchIdentifier","getControlPosition","coreEvent","createCoreData","mounted","enableUserSelectHack","addUserSelectStyles","addEvent","handleDrag","handleDragStop","grid","_snapToGrid2","snapToGrid","MouseEvent","initMouseEvent","removeUserSelectStyles","removeEvent","handleDragStart","onTouchStart","passive","onMouseUp","onTouchEnd","offsetParent","_require","matchesSelector","selector","baseNode","handler","inputOptions","capture","attachEvent","detachEvent","outerHeight","clientHeight","outerWidth","borderLeftWidth","borderRightWidth","innerHeight","innerWidth","paddingLeft","paddingRight","offsetXYFromParent","offsetParentRect","getBoundingClientRect","clientX","scrollLeft","clientY","controlPos","translation","getTranslation","_getPrefix","browserPrefixToKey","getTouch","identifier","targetTouches","findInArray","changedTouches","doc","styleEl","getElementById","id","getElementsByTagName","addClassName","removeClassName","selection","empty","getSelection","removeAllRanges","matchesSelectorFunc","unitSuffix","defaultX","defaultY","classList","add","remove","getPrefix","browserPrefixToStyle","prefixes","_window$document","_window$document$docu","out","shouldCapitalize","kebabToTitleCase","_default","cloneBounds","boundNode","ownerWindow","querySelector","boundNodeEl","nodeStyle","boundNodeStyle","offsetLeft","marginLeft","offsetTop","marginTop","marginRight","marginBottom","isNum","min","pendingX","pendingY","draggableCore","touchObj","isStart","callback","_createClass","_react","_react2","_propTypes2","sizerStyle","visibility","overflow","whiteSpace","INPUT_PROPS_BLACKLIST","copyStyles","styles","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform","isIE","navigator","userAgent","generateId","random","substr","AutosizeInput","_Component","inputRef","placeHolderSizerRef","placeHolderSizer","sizerRef","sizer","inputWidth","minWidth","inputId","prevId","copyInputStyles","updateInputWidth","prevProps","prevState","onAutosize","inputStyles","scrollWidth","newInputWidth","placeholder","placeholderIsMinWidth","extraWidth","focus","blur","select","injectStyles","sizerValue","reduce","previousValue","wrapperStyle","display","inputStyle","inputProps","field","cleanInputProps","inputClassName","renderStyles","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Lazy","Portal","Profiler","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","leftWhitespace","rightWhitespace","boundTrim","timeTypes","timeStr","inflectionIndex","formatNum","f1","n10","seconds","minutes","hours","days","weeks","months","years","ZH_CN","diff","idx","unit","ctx","once","listener","off","emit","evtArr","evts","liveEvents","TinyEmitter","IsArray","argumentsList","IsPropertyKey","Type","$Array","ToLength","ES5ToInteger","ToNumber","MAX_SAFE_INTEGER","ToIntegerOrInfinity","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","ws","trimRegex","ToPrimitive","trimmed","$trim","$Object","$String","ES5Type","optMessage","abs","$isNaN","$isFinite","$sign","prim","$abs","$Math","pow","regex","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","definition","SVG_NAMESPACE","getClassNames","attr","addClass","classNames","hasClass","parseRectFragment","annotation","image","conformsTo","startsWith","format","includes","substring","_coords$split$map2","_slicedToArray","naturalWidth","naturalHeight","toRectFragment","fragmentUnit","px","py","pw","ph","src","toPercentRectFragment","toPixelRectFragment","setXYWH","setPointXY","drawRectMask","imageDimensions","mask","setRectMaskSize","drawRect","arg1","arg2","arg3","arg4","outerPoint","innerPoint","outerRect","innerRect","getRectSize","outer","setRectSize","inner","polygonArea","points","area","pointInPolygon","xy","noneZeroMode","oddNodes","zeroState","xi","yi","xj","yj","getRandomValues","sanitize","cleanEl","scripts","querySelectorAll","svgFragmentToShape","originalDoc","namespaced","parser","DOMParser","parseFromString","isPrefixDeclared","lookupPrefix","isDefaultNamespaceSVG","lookupNamespaceURI","XMLSerializer","serializeToString","drawEmbeddedSVG","cloneNode","toSVGTarget","serialized","outerHTML","svgPathArea","path","polygons","_step2","_iterator2","_createForOfIteratorHelper","cmd","op","_toConsumableArray","isUppercase","svgPathToPolygons","_step","isHole","find","other","polygonA","polygonB","_iterator","point","polygonInPolygon","poly","drawFn","areaFn","_parseRectFragment","ellipse","PI","getFirstSelector","firstTarget","targets","shapeArea","rnds8","rng","crypto","msCrypto","byteToHex","offset","uuid","REGEX","validate","buf","rnds","stringify","WebAnnotation","opt_props","opt_opts","underlying","equals","_this$opts","readOnly","motivation","bodies","_this$selector","_this$selector2","_this$selector3","stub","Selection","cloned","parse","RubberbandRect","anchorX","anchorY","config","env","oppositeX","oppositeY","group","opposite","_this$bbox","bbox","rect","_this$bbox2","anchor","pointerEvents","SIM_EVENTS","touchstart","touchmove","touchend","isTouchDevice","maxTouchPoints","msMaxTouchPoints","IMPLEMENTATION_MISSING","isTouch","ToolLike","_EventEmitter","_createSuper","ResizeObserver","resizeObserver","svgBounds","svg","_this$svg$viewBox$bas","viewBox","baseVal","onScaleChanged","observe","pt","createSVGPoint","_this$svg$getBounding","matrixTransform","getScreenCTM","inverse","offsetX","offsetY","getCTM","containerGroup","drawCircle","radius","handleRadius","closest","HTMLDocument","enableResponsive","disconnect","EventEmitter","Tool","_ToolLike","_super2","_this2","mouseMove","mouseUp","mouseDown","dblClick","_this2$getSVGPoint","getSVGPoint","started","_this2$getSVGPoint2","_eventTarget","_this2$getSVGPoint3","_this2$getSVGPoint4","startOnSingleClick","_this2$getSVGPoint5","_this2$env$image","startX","startY","startDrawing","formatters","bindEventListenersInternally","supports","EditableShape","isFirefox","formatSvgEl","svgEl","merged","ELEMENT_NODE","elements","shapeStyle","formatterEl","_targetBox$getBBox","getBBox","append","appendFormatterEl","setFormatterElSize","CORNER","EDGE","EditableRect","_EditableShape","handles","scaleHandle","rectangle","elementGroup","_this$handles","topleft","topright","bottomright","bottomleft","topEdge","rightEdge","bottomEdge","leftEdge","setHandleXY","enableEdgeControls","draggedHandleIdx","anchorHandle","mousePos","getHandleXY","handleIdx","oppositeHandle","currentRectDims","isHeightAdjustment","grabbedElem","grabbedType","pos","_getRectSize","mouseOffset","constrain","coord","_this$env$image","_getRectSize2","constrainMousePos","stretchCorners","stretchEdge","onMouseMove","_parseRectFragment2","onGrab","edgeHandles","_t","drawHandle","detachListeners","_get","RubberbandRectTool","_Tool","_startOnSingleClick","attachListeners","rubberband","constrainX","constrainY","dragTo","_this$rubberband$getB","minSelectionWidth","minHeight","minSelectionHeight","toSelection","fragmentSelector","PolygonMask","polygon","RubberbandPolygon","mousepos","setPoints","redraw","_this$mousepos","lastCorner","Mask","getPoints","pointList","numberOfItems","getItem","EditablePolygon","_thisSuper","_inner$getBBox","grabbedAt","delta","_getBBox","dx","dy","updatedPoints","_xy$split$map2","RubberbandPolygonTool","_this$attachListeners","_isDrawing","addPolygonPointOnMouseDown","onMouseUpDown","onDblClick","addPoint","minPolygonPoints","_selector$value","ToolRegistry","_registered","impl","listTools","unregisterTool","unshift","toolOrId","_current","_g","_config","_env","_target$renderedVia","_annotation$targets","renderedVia","setCurrent","Crosshair","layerGroup","parentElement","_getSVGPoint","getSnippet","kx","ky","imageBounds","outerBounds","snippet","getContext","drawImage","AnnotationLayer","elem","_this$tools","_this$tools$current","tools","isDrawing","currentHover","_this$tools2","_this$tools2$current","stopPropagation","_evt$changedTouches$","realTarget","elementFromPoint","contains","selectCurrentHover","imageEl","_this$tools3","_this$tools3$current","allowDrawingWithSelection","selectedShape","drawOnSingleClick","getCurrentScale","opt_shape","drawShape","_attachMouseListeners","_scaleFormatterElements","plugin","_this$tools4","registerTool","previous","isEqual","deselect","removeAnnotation","addAnnotation","skipRedraw","_this$tools5","isSelection","removeClass","annotationOrId","annotations","_lazy","_refreshNonScalingAnnotations","_this$tools6","originalId","forcedId","findShape","updated","clone","shapes","_this$selectedShape","_this$selectedShape2","_this$currentHover","toRemove","_this$tools7","skipEvent","selectShape","disableSelect","_this$selectedShape3","toolForAnnotation","forAnnotation","createEditableShape","fragment","_this$selectedShape4","_this$tools$current2","visible","_this$tools8","_this$tools8$current","wrapperEl","formatter","pressAndHoldTrigger","simulateEvent","screenX","screenY","pageX","pageY","touchHandler","touch","simulatedEvent","enableTouchTranslation","_this$imageEl","_this$imageEl2","crosshair","crosshairWithCursor","DrawingTools","_onMouseDown","EN_US","Locales","register","getLocale","SEC_ARRAY","toDate","formatDiff","localeFunc","agoIn","totalSec","diffSec","date","relativeDate","ATTR_TIMEAGO_TID","getTimerId","TIMER_POOL","tid","run","minInterval","innerText","rst","ceil","nextInterval","timerId","setTimerId","TimeAgo","dom","renderTimeAgo","live","datetime","getTime","nodes","getDateAttribute","others","MESSAGES","ar","messages_ar","cs","messages_cs","de","messages_de","messages_el","es","messages_es","fi","messages_fi","fr","messages_fr","gl","messages_gl","hi","messages_hi","it","messages_it","ja","messages_ja","ko","messages_ko","nl","messages_nl","messages_pt","ru","messages_ru","sv","messages_sv","th","messages_th","tr","messages_tr","ur","messages_ur","zh","messages_zh","messages_zh_CN","messages_zh_TW","availableLocales","i18n","init","opt_messages","timeago","zh_CN","zh_TW","registerMessages","messages","onClickOutside","useClickOutside","onClick","onEdit","onDelete","TextEntryField","which","ctrlKey","onSaveAndClose","preventScroll","content","editable","onKeyUp","onKeyDown","StyleSheet","_insertTag","before","tags","insertionPoint","prepend","container","isSpeedy","speedy","ctr","nonce","_proto","insert","rule","createStyleElement","sheet","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","flush","fromCharCode","pattern","replacement","indexof","search","charat","begin","strlen","sizeof","line","column","character","characters","parent","return","copy","peek","caret","alloc","dealloc","delimit","whitespace","escaping","commenter","MS","MOZ","WEBKIT","COMMENT","RULESET","DECLARATION","KEYFRAMES","serialize","output","compile","rules","rulesets","pseudo","declarations","atrule","property","variable","scanning","ampersand","reference","comment","declaration","ruleset","post","identifierWithPointTracking","fixedElements","compat","isImplicitRule","parsed","toRules","getRules","parentRules","removeLabel","hash","defaultStylisPlugins","combine","exec","createCache","ssrStyles","head","_insert","stylisPlugins","inserted","nodesToHydrate","attrib","currentSheet","collection","finalizingPlugins","serializer","shouldCache","registered","getRegisteredStyles","registeredStyles","rawClassName","registerStyles","isStringTag","insertStyles","unitlessKeys","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","memoize","arg","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","processStyleValue","p1","p2","cursor","unitless","handleInterpolation","mergedProps","__emotion_styles","anim","interpolated","createStringFromObject","previousCursor","cached","labelPattern","serializeStyles","stringMode","strings","raw","lastIndex","identifierName","hashString","useInsertionEffect","useInsertionEffectAlwaysWithSyncFallback","EmotionCacheContext","withEmotionCache","ThemeContext","typePropName","Insertion","Emotion$1","cssProp","css","WrappedComponent","newProps","jsx","argsLength","createElementArgArray","Emotion","createEmotionProps","classnames","cls","toAdd","serializedArr","ClassNames","cx","_len2","_key2","merge","theme","ele","objectWithoutPropertiesLoose","_toPropertyKey","res","toPropertyKey","_objectSpread2","_typeof2","noop","applyPrefixToName","cleanValue","cleanCommonProps","clearValue","getStyles","getValue","hasValue","isMulti","isRtl","selectOption","selectProps","setValue","isDocumentElement","getScrollTop","pageYOffset","scrollTo","animatedScrollTo","to","duration","change","currentTime","animateScroll","val","isTouchCapable","passiveOptionAccessed","supportsPassiveEvents","coercePlacement","PortalPlacementContext","getPortalPlacement","MenuPlacer","maxMenuHeight","placement","getPlacement","minMenuHeight","menuPlacement","menuPosition","menuShouldScrollIntoView","isFixedPosition","menuEl","shouldScroll","spacing","scrollParent","excludeStaticParent","overflowRx","docEl","getScrollParent","defaultState","_menuEl$getBoundingCl","menuBottom","menuHeight","menuTop","containerTop","viewHeight","viewSpaceAbove","viewSpaceBelow","scrollSpaceAbove","scrollSpaceBelow","scrollDown","scrollUp","scrollDuration","_constrainedHeight","spaceAbove","controlHeight","_constrainedHeight2","getMenuPlacement","getUpdatedProps","placerProps","noticeCSS","_ref5","_ref5$theme","baseUnit","color","colors","neutral40","textAlign","noOptionsMessageCSS","loadingMessageCSS","NoOptionsMessage","innerProps","LoadingMessage","_templateObject","MenuPortal","_Component2","_ref7","appendTo","controlElement","isFixed","getBoundingClientObj","scrollDistance","menuWrapper","Svg","focusable","CrossIcon","DownChevron","baseCSS","_ref3","isFocused","_ref3$theme","label","neutral60","neutral20","transition","neutral80","dropdownIndicatorCSS","clearIndicatorCSS","loadingDotAnimations","insertable","keyframes","freeze","LoadingDot","_ref6","delay","css$2","animation","backgroundColor","borderRadius","verticalAlign","LoadingIndicator","indicator","isHidden","background","outline","MultiValueGeneric","_ref4","MultiValueContainer","MultiValueLabel","MultiValue","components","isDisabled","removeProps","Container","Label","Remove","emotionCx","cropWithEllipsis","ClearIndicator","Control","menuIsOpen","control","DropdownIndicator","Group","Heading","headingProps","GroupHeading","_cleanCommonProps","IndicatorsContainer","indicators","IndicatorSeparator","Input","Menu","menu","MenuList","MultiValueRemove","Option","isSelected","option","Placeholder","SelectContainer","SingleValue","ValueContainer","arrayLikeToArray","arrayWithoutHoles","iter","iterableToArray","unsupportedIterableToArray","nonIterableSpread","safeIsNaN","areInputsEqual","newInputs","lastInputs","second","A11yText","defaultAriaLiveMessages","guidance","isSearchable","tabSelectsValue","action","_props$label","onFocus","_props$focused","focused","_props$label2","selectValue","getArrayIndex","item","status","onFilter","inputValue","resultsMessage","LiveRegion","ariaSelection","focusedOption","focusedValue","focusableOptions","ariaLiveMessages","getOptionLabel","isOptionDisabled","screenReaderStatus","ariaLabel","ariaLive","ariaSelected","removedValue","onChangeProps","ariaFocused","focusMsg","onFocusProps","ariaResults","resultsMsg","ariaGuidance","guidanceMsg","ariaContext","diacritics","letters","anyDiacritic","diacriticToBase","diacritic","stripDiacritics","memoizedStripDiacriticsForInput","resultFn","lastThis","lastResult","lastArgs","calledOnce","newArgs","memoizeOne","trimString","defaultStringify","DummyInput","onExited","appear","enter","exit","emotion","STYLE_KEYS","LOCK_STYLES","preventTouchMove","allowTouchMove","preventInertiaScroll","totalScroll","currentScroll","canUseDOM","activeScrollLocks","listenerOptions","blurSelectInput","activeElement","ScrollManager","lockEnabled","_ref$captureEnabled","captureEnabled","setScrollCaptureTarget","isEnabled","onBottomArrive","onBottomLeave","onTopArrive","onTopLeave","isBottom","isTop","touchStart","scrollTarget","handleEventDelta","_scrollTarget$current","isDeltaPositive","availableScroll","shouldCancelScroll","cancelScroll","onWheel","onTouchMove","startListening","notPassive","stopListening","useScrollCapture","setScrollLockTarget","_ref$accountForScroll","accountForScrollbars","originalStyles","addScrollLock","touchScrollTarget","targetStyle","currentPadding","adjustedPadding","removeScrollLock","useScrollLock","defaultStyles","clearIndicator","direction","_ref$theme","alignItems","neutral5","neutral0","borderColor","neutral10","primary","borderStyle","borderWidth","boxShadow","flexWrap","justifyContent","neutral30","dropdownIndicator","groupHeading","indicatorsContainer","alignSelf","indicatorSeparator","_ref4$theme","margin","loadingIndicator","loadingMessage","_ref2$theme","_defineProperty$1","alignToControl","menuGutter","menuList","WebkitOverflowScrolling","menuPortal","multiValue","multiValueLabel","textOverflow","multiValueRemove","dangerLight","danger","noOptionsMessage","primary25","userSelect","WebkitTapHighlightColor","primary50","neutral50","singleValue","maxWidth","valueContainer","defaultTheme","primary75","neutral70","neutral90","backspaceRemovesValue","blurInputOnSelect","captureMenuScroll","closeMenuOnSelect","closeMenuOnScroll","controlShouldRenderValue","escapeClearsValue","filterOption","rawInput","_ignoreCase$ignoreAcc","ignoreCase","ignoreAccents","matchFrom","createFilter","candidate","formatGroupLabel","getOptionValue","isLoading","menuShouldBlockScroll","isMobileDevice","openMenuOnFocus","openMenuOnClick","pageSize","tabIndex","toCategorizedOption","_isOptionDisabled","_isOptionSelected","getOptionLabel$1","getOptionValue$1","buildCategorizedOptions","groupOrOption","groupOrOptionIndex","categorizedOptions","optionIndex","categorizedOption","isFocusable","buildFocusableOptionsFromCategorizedOptions","optionsAccumulator","_props$inputValue","shouldHideSelectedOptions","_filterOption","isOptionSelected","hideSelectedOptions","instanceId","Select","_props","inputIsHidden","clearFocusValueOnUpdate","inputIsHiddenAfterUpdate","blockOptionHover","isComposing","commonProps","initialTouchX","initialTouchY","instancePrefix","openAfterFocus","scrollToFocusedOptionOnUpdate","userIsDragging","controlRef","getControlRef","focusedOptionRef","getFocusedOptionRef","menuListRef","getMenuListRef","getInputRef","focusInput","blurInput","newValue","actionMeta","ariaOnChange","onInputChange","onMenuClose","_this$props3","deselected","removeValue","newValueArray","removedValues","popValue","lastSelectedValue","classNamePrefix","custom","getElementId","getComponents","getCategorizedOptions","buildFocusableOptions","getFocusableOptions","onMenuMouseDown","onMenuMouseMove","onControlMouseDown","tagName","openMenu","onDropdownIndicatorMouseDown","_this$props4","onClearIndicatorMouseDown","onScroll","onCompositionStart","onCompositionEnd","touches","onControlTouchEnd","onClearIndicatorTouchEnd","onDropdownIndicatorTouchEnd","handleInputChange","onMenuOpen","onInputFocus","onInputBlur","onBlur","onOptionHover","_this$props5","isClearable","_this$state","focusValue","shiftKey","keyCode","focusOption","startListeningComposition","startListeningToTouch","autoFocus","focusedEl","menuRect","focusedRect","overScroll","_this$props6","stopListeningComposition","stopListeningToTouch","_this$state2","openAtIndex","selectedIndex","_this$state3","focusedIndex","nextFocus","getTheme","_this$props7","formatOptionLabel","_this$props8","form","ariaAttributes","autoCapitalize","autoComplete","autoCorrect","spellCheck","_this3","_this$getComponents2","_this$props9","_this$state4","selectValues","opt","isOptionFocused","_this$props10","_this$props11","_this$getComponents5","_this4","_this$getComponents7","_this$props12","menuPortalTarget","onMenuScrollToTop","onMenuScrollToBottom","menuUI","onHover","onSelect","optionId","onMouseOver","hasOptions","groupIndex","groupId","headingId","_message","menuPlacementProps","menuElement","_ref4$placerProps","scrollTargetRef","_this5","_this$props13","_value","_this$state5","_this$getComponents8","_this$props14","getCommonProps","renderLiveRegion","renderPlaceholderOrValue","renderInput","renderClearIndicator","renderLoadingIndicator","renderIndicatorSeparator","renderDropdownIndicator","renderMenu","renderFormField","newMenuOptionsState","nextSelectValue","lastFocusedIndex","getNextFocusedValue","lastFocusedOption","getNextFocusedOption","newInputIsHiddenState","SelectComponent","_class","_temp","StateManager","defaultInputValue","defaultMenuIsOpen","callProp","getProp","PURPOSES","selectedOption","ChevronDownIcon","xmlns","glyphName","unicode","horizAdvX","fill","CloseIcon","TrashIcon","_useState2","isEditable","setIsEditable","_useState4","isMenuVisible","setIsMenuVisible","timestamp","modified","created","creatorInfo","creator","toClientTime","onUpdate","purposeSelector","PurposeSelect","purpose","DropdownMenu","validPurposes","isComment","matchAllPurposes","hasMatchingPurpose","isReadOnlyComment","_body$creator","_props$env$user","user","CommentWidget","existingDraft","isReply","draftReply","draft","comments","isReadable","hasReply","disableReply","Comment","onUpdateBody","onRemoveBody","textPlaceHolder","onAppendBody","disableDelete","_inheritsLoose","replaceClassName","origClass","classToRemove","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","initialStatus","isMounting","appearStatus","unmountOnExit","mountOnEnter","nextCallback","updateStatus","nextStatus","cancelNextCallback","getTimeouts","timeout","mounting","performEnter","performExit","appearing","ReactDOM","maybeNode","maybeAppearing","timeouts","enterTimeout","onEnter","safeSetState","onEntering","onTransitionEnd","onEntered","onExit","onExiting","nextState","setNextCallback","active","doesNotHaveTimeoutOrListener","addEndListener","maybeNextCallback","childProps","TransitionGroupContext","in","classes","CSSTransition","appliedClasses","_this$resolveArgument","resolveArguments","removeClasses","_this$resolveArgument2","_this$resolveArgument3","isStringClassNames","baseClassName","activeClassName","doneClassName","phase","_addClass","_this$appliedClasses$","initialValue","suggestions","setSuggestions","_useState6","highlightedIndex","setHighlightedIndex","onSubmit","matchingTerm","vocabulary","onCancel","query","getFnSuggestions","getVocabSuggestions","getSuggestions","onMouseEnter","draftTag","showDelete","setShowDelete","toggle","tagValue","Autocomplete","toSubmit","uri","WrappedWidget","widgetEl","widget","saveImmediately","onUpsertBody","onBatchModify","diffs","onSetProperty","onAddContext","lastChild","renderWidget","BUILTIN_WIDGETS","TAG","TagWidget","DEFAULT_WIDGETS","getWidget","instantiate","force","_component$prototype","isClassComponent","isFunctionComponent","editorEl","selectedEl","autoPosition","containerBounds","_selectedEl$getBoundi","defaultOrientation","_wrapperEl$ownerDocum","editorHeight","currentOrientation","shapeBottom","_elem$getBoundingClie","Editor","_window","setPosition","selectedElement","meta","getCurrentTimeAdjusted","currentAnnotation","_this$props$annotatio","onOk","onChanged","updateCurrentAnnotation","creationMeta","existing","autoUpserts","toAppend","toUpdate","updatedBodies","Exception","undraft","allowEmpty","onAnnotationCreated","toAnnotation","onAnnotationUpdated","onAnnotationDeleted","selectionBounds","_this$props$annotatio2","nextBounds","modifiedTarget","removeObserver","initResizeObserver","MutationObserver","childList","subtree","widgets","hasDelete","detachable","title","ImageAnnotator","opt_callback","selectedAnnotation","selectedDOMElement","beforeHeadlessModify","annotationLayer","disableEscapeKey","stopDrawing","cancelSelected","onCancelSelected","disableDeleteKey","onCancelAnnotation","onDeleteAnnotation","onSelectionStarted","editorDisabled","onHeadlessSelect","onNormalSelect","onSelectionCreated","onAnnotationSelected","clearState","onChangeSelected","saveSelected","selectAnnotation","onSelectionTargetChanged","originalAnnotation","overrideId","addOrUpdateAnnotation","overrideAnnotationId","addDrawingTool","annotationId","_this$annotationLayer","getAnnotations","_this$_editor$current","_editor","getCurrentAnnotation","getSelectedImageSnippet","_this$annotationLayer2","listDrawingTools","removeDrawingTool","onCreateOrUpdateAnnotation","handleSelect","setDrawingTool","setVisible","disableEditor","onLoad","handleStartSelect","handleUpdateTarget","forwardEvent","disable","_this$state$selectedA","open","serverTimeDifference","Annotorious","_emitter","_app","setAnnotations","_appContainerEl","_element","getAnnotationById","getImageSnippetById","getSelected","getCurrentDrawingTool","getSelectedShape","url","fetch","response","json","_wrap","webannotations","authinfo","setServerTime","updateSelected","Emitter","headless","serverNow","browserNow","now","toISOString","serverTime","userLanguage","language","foundLocale","_l","I18n","setLocale","handleSelectionStarted","handleSelectionCreated","handleSelectionTargetChanged","handleAnnotationCreated","handleAnnotationSelected","handleAnnotationUpdated","handleAnnotationDeleted","handleCancelSelected","handleChangeSelected","onClickAnnotation","handleClickAnnotation","handleLoad","onMouseEnterAnnotation","handleMouseEnterAnnotation","onMouseLeaveAnnotation","handleMouseLeaveAnnotation"],"sourceRoot":""}