1{"version":3,"sources":["../node_modules/react-popper/lib/react-popper.js","components/dialog/create-folder-dialog.js","../node_modules/chart.js/dist/Chart.js","../node_modules/lodash/isEqual.js","../node_modules/lodash/_baseIsEqualDeep.js","../node_modules/lodash/_listCacheClear.js","../node_modules/lodash/_listCacheDelete.js","../node_modules/lodash/_listCacheGet.js","../node_modules/lodash/_listCacheHas.js","../node_modules/lodash/_listCacheSet.js","../node_modules/lodash/_stackClear.js","../node_modules/lodash/_stackDelete.js","../node_modules/lodash/_stackGet.js","../node_modules/lodash/_stackHas.js","../node_modules/lodash/_stackSet.js","../node_modules/lodash/_baseIsNative.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_isMasked.js","../node_modules/lodash/_coreJsData.js","../node_modules/lodash/_getValue.js","../node_modules/lodash/_mapCacheClear.js","../node_modules/lodash/_Hash.js","../node_modules/lodash/_hashClear.js","../node_modules/lodash/_hashDelete.js","../node_modules/lodash/_hashGet.js","../node_modules/lodash/_hashHas.js","../node_modules/lodash/_hashSet.js","../node_modules/lodash/_mapCacheDelete.js","../node_modules/lodash/_isKeyable.js","../node_modules/lodash/_mapCacheGet.js","../node_modules/lodash/_mapCacheHas.js","../node_modules/lodash/_mapCacheSet.js","../node_modules/lodash/_SetCache.js","../node_modules/lodash/_setCacheAdd.js","../node_modules/lodash/_setCacheHas.js","../node_modules/lodash/_arraySome.js","../node_modules/lodash/_cacheHas.js","../node_modules/lodash/_equalByTag.js","../node_modules/lodash/_Uint8Array.js","../node_modules/lodash/_mapToArray.js","../node_modules/lodash/_setToArray.js","../node_modules/lodash/_equalObjects.js","../node_modules/lodash/_getAllKeys.js","../node_modules/lodash/_baseGetAllKeys.js","../node_modules/lodash/_arrayPush.js","../node_modules/lodash/_getSymbols.js","../node_modules/lodash/_arrayFilter.js","../node_modules/lodash/stubArray.js","../node_modules/lodash/_arrayLikeKeys.js","../node_modules/lodash/_baseTimes.js","../node_modules/lodash/_baseIsArguments.js","../node_modules/lodash/stubFalse.js","../node_modules/lodash/_baseIsTypedArray.js","../node_modules/lodash/_baseUnary.js","../node_modules/lodash/_root.js","../node_modules/lodash/_nodeUtil.js","../node_modules/lodash/_baseKeys.js","../node_modules/lodash/_isPrototype.js","../node_modules/lodash/_nativeKeys.js","../node_modules/lodash/_overArg.js","../node_modules/lodash/_getTag.js","../node_modules/lodash/_DataView.js","../node_modules/lodash/_Promise.js","../node_modules/lodash/_Set.js","../node_modules/lodash/_WeakMap.js","../node_modules/lodash/isArray.js","../node_modules/lodash/keyBy.js","../node_modules/lodash/_baseAssignValue.js","../node_modules/lodash/_defineProperty.js","../node_modules/lodash/_createAggregator.js","../node_modules/lodash/_arrayAggregator.js","../node_modules/lodash/_baseAggregator.js","../node_modules/lodash/_baseEach.js","../node_modules/lodash/_baseForOwn.js","../node_modules/lodash/_baseFor.js","../node_modules/lodash/_createBaseFor.js","../node_modules/lodash/_createBaseEach.js","../node_modules/lodash/_baseIteratee.js","../node_modules/lodash/_baseMatches.js","../node_modules/lodash/_baseIsMatch.js","../node_modules/lodash/_getMatchData.js","../node_modules/lodash/_baseMatchesProperty.js","../node_modules/lodash/get.js","../node_modules/lodash/_stringToPath.js","../node_modules/lodash/_memoizeCapped.js","../node_modules/lodash/memoize.js","../node_modules/lodash/toString.js","../node_modules/lodash/_baseToString.js","../node_modules/lodash/_arrayMap.js","../node_modules/lodash/hasIn.js","../node_modules/lodash/_baseHasIn.js","../node_modules/lodash/_hasPath.js","../node_modules/lodash/identity.js","../node_modules/lodash/property.js","../node_modules/lodash/_baseProperty.js","../node_modules/lodash/_basePropertyDeep.js","pages/sys-admin/side-panel.js","pages/sys-admin/main-panel.js","pages/sys-admin/main-panel-topbar.js","pages/sys-admin/info.js","pages/sys-admin/statistic/statistic-nav.js","pages/sys-admin/statistic/picker.js","pages/sys-admin/statistic/statistic-common-tool.js","pages/sys-admin/statistic/statistic-chart.js","pages/sys-admin/statistic/statistic-file.js","pages/sys-admin/statistic/statistic-storage.js","pages/sys-admin/statistic/traffic-table.js","pages/sys-admin/statistic/traffic-table-body.js","pages/sys-admin/statistic/statistic-traffic-orgs.js","pages/sys-admin/statistic/statistic-traffic-users.js","pages/sys-admin/statistic/statistic-traffic.js","pages/sys-admin/statistic/statistic-users.js","pages/sys-admin/statistic/statistic-reports.js","pages/sys-admin/devices/devices-nav.js","components/dialog/sysadmin-dialog/sysadmin-unlink-device-dialog.js","pages/sys-admin/devices/devices-by-platform.js","pages/sys-admin/devices/desktop-devices.js","pages/sys-admin/devices/mobile-devices.js","pages/sys-admin/user-link.js","pages/sys-admin/devices/devices-errors.js","pages/sys-admin/abuse-reports.js","components/dialog/sysadmin-dialog/set-quota.js","components/dialog/sysadmin-dialog/sysadmin-import-user-dialog.js","components/select-editor/sysadmin-user-role-editor.js","components/dialog/sysadmin-dialog/sysadmin-add-user-dialog.js","components/dialog/sysadmin-dialog/sysadmin-batch-add-admin-dialog.js","components/dialog/common-operation-confirmation-dialog.js","models/sysadmin-user.js","models/sysadmin-admin-user.js","pages/sys-admin/search.js","pages/sys-admin/users/users-nav.js","components/select-editor/sysadmin-user-status-editor.js","components/dialog/op-menu.js","pages/sys-admin/users/users-content.js","pages/sys-admin/users/users.js","pages/sys-admin/users/admin-users.js","pages/sys-admin/users/ldap-imported-users.js","pages/sys-admin/users/ldap-users.js","pages/sys-admin/users/search-users.js","components/dialog/sysadmin-dialog/update-user.js","pages/sys-admin/users/user-nav.js","pages/sys-admin/users/user-info.js","pages/sys-admin/users/user-repos.js","pages/sys-admin/users/user-shared-repos.js","pages/sys-admin/users/user-links.js","pages/sys-admin/users/user-groups.js","components/dialog/sysadmin-dialog/sysadmin-create-repo-dialog.js","pages/sys-admin/repos/repos-nav.js","components/dialog/sysadmin-dialog/sysadmin-share-to-user.js","components/dialog/sysadmin-dialog/sysadmin-share-to-group.js","components/dialog/sysadmin-dialog/sysadmin-share-dialog.js","components/dialog/sysadmin-dialog/sysadmin-lib-history-setting-dialog.js","pages/sys-admin/repos/repos.js","pages/sys-admin/repos/all-repos.js","pages/sys-admin/repos/system-repo.js","pages/sys-admin/repos/trash-repos.js","pages/sys-admin/repos/search-repos.js","models/system-admin/dirent.js","pages/sys-admin/repos/dir-path-bar.js","pages/sys-admin/repos/dir-content.js","pages/sys-admin/repos/dir-view.js","components/dialog/sysadmin-dialog/sysadmin-create-group-dialog.js","components/dialog/sysadmin-dialog/sysadmin-group-transfer-dialog.js","pages/sys-admin/groups/groups-content.js","pages/sys-admin/groups/groups.js","pages/sys-admin/groups/search-groups.js","pages/sys-admin/groups/group-nav.js","pages/sys-admin/groups/group-repos.js","components/dialog/sysadmin-dialog/sysadmin-group-add-member-dialog.js","components/select-editor/sysadmin-group-role-editor.js","pages/sys-admin/groups/group-members.js","pages/sys-admin/departments/departments.js","components/dialog/sysadmin-dialog/sysadmin-add-department-dialog.js","components/dialog/sysadmin-dialog/sysadmin-delete-department-dialog.js","components/dialog/sysadmin-dialog/sysadmin-set-group-quota-dialog.js","components/dialog/sysadmin-dialog/sysadmin-rename-department-dialog.js","pages/sys-admin/departments/group-item.js","pages/sys-admin/departments/departments-list.js","components/dialog/sysadmin-dialog/sysadmin-add-member-dialog.js","components/dialog/sysadmin-dialog/sysadmin-delete-member-dialog.js","components/dialog/sysadmin-dialog/sysadmin-add-repo-dialog.js","components/dialog/sysadmin-dialog/sysadmin-delete-repo-dialog.js","pages/sys-admin/departments/member-item.js","pages/sys-admin/departments/repo-item.js","pages/sys-admin/departments/department-detail.js","pages/sys-admin/links/links-nav.js","pages/sys-admin/links/share-links.js","pages/sys-admin/links/upload-links.js","components/dialog/sysadmin-dialog/sysadmin-add-org-dialog.js","pages/sys-admin/orgs/orgs-content.js","pages/sys-admin/orgs/orgs.js","pages/sys-admin/orgs/search-orgs.js","components/dialog/sysadmin-dialog/sysadmin-set-org-name-dialog.js","components/dialog/sysadmin-dialog/sysadmin-set-org-max-user-number-dialog.js","pages/sys-admin/orgs/org-nav.js","pages/sys-admin/orgs/org-info.js","components/select-editor/sysadmin-user-membership-editor.js","pages/sys-admin/orgs/org-users.js","pages/sys-admin/orgs/org-groups.js","pages/sys-admin/orgs/org-repos.js","components/dialog/sysadmin-dialog/sysadmin-add-institution-dialog.js","pages/sys-admin/institutions/institutions.js","pages/sys-admin/institutions/institution-nav.js","pages/sys-admin/institutions/institution-info.js","components/dialog/sysadmin-dialog/sysadmin-add-institution-member-dialog.js","pages/sys-admin/institutions/institution-users.js","pages/sys-admin/institutions/institution-admins.js","pages/sys-admin/logs-page/logs-nav.js","components/dialog/sysadmin-dialog/sysadmin-logs-export-excel-dialog.js","pages/sys-admin/logs-page/login-logs.js","pages/sys-admin/logs-page/file-access-item-menu.js","pages/sys-admin/logs-page/file-access-toggle-filter.js","pages/sys-admin/logs-page/file-access-logs.js","pages/sys-admin/logs-page/file-update-logs.js","pages/sys-admin/logs-page/share-permission-logs.js","pages/sys-admin/web-settings/section.js","pages/sys-admin/web-settings/setting-item-base.js","pages/sys-admin/web-settings/input-item.js","pages/sys-admin/web-settings/file-item.js","pages/sys-admin/web-settings/checkbox-item.js","pages/sys-admin/web-settings/web-settings.js","components/dialog/sysadmin-dialog/sysadmin-add-sys-notification-dialog.js","pages/sys-admin/notifications/notifications.js","pages/sys-admin/file-scan-records.js","pages/sys-admin/work-weixin/work-weixin-department-members-list.js","pages/sys-admin/work-weixin/work-weixin-departments-tree-node.js","pages/sys-admin/work-weixin/work-weixin-departments-tree-panel.js","components/dialog/import-work-weixin-department-dialog.js","pages/sys-admin/work-weixin-departments.js","pages/sys-admin/dingtalk/dingtalk-department-members-list.js","pages/sys-admin/dingtalk/dingtalk-departments-tree-node.js","pages/sys-admin/dingtalk/dingtalk-departments-tree-panel.js","components/dialog/import-dingtalk-department-dialog.js","pages/sys-admin/dingtalk-departments.js","pages/sys-admin/invitations/invitations.js","components/dialog/terms-editor-dialog.js","components/dialog/sysadmin-dialog/sysadmin-add-or-update-term-dialog.js","utils/markdown-utils.js","components/dialog/terms-preview-dialog.js","pages/sys-admin/terms-and-conditions/item.js","pages/sys-admin/terms-and-conditions/content.js","pages/sys-admin/terms-and-conditions/terms-and-conditions.js","pages/sys-admin/virus-scan/nav.js","pages/sys-admin/virus-scan/all-virus-files.js","pages/sys-admin/virus-scan/unhandled-virus-files.js","pages/sys-admin/admin-logs/logs-nav.js","pages/sys-admin/admin-logs/operation-logs.js","pages/sys-admin/admin-logs/login-logs.js","pages/sys-admin/index.js","../node_modules/lodash/_getNative.js","components/dialog/share-admin-link.js","../../src/utils.js","../../src/Container.js","../../src/Row.js","../../src/Col.js","../../src/Navbar.js","../../src/NavbarBrand.js","../../src/NavbarToggler.js","../../src/Nav.js","../../src/NavItem.js","../../src/Dropdown.js","../../src/NavLink.js","../../src/Breadcrumb.js","../../src/BreadcrumbItem.js","../../src/Button.js","../../src/ButtonDropdown.js","../../src/ButtonGroup.js","../../src/ButtonToolbar.js","../../src/DropdownItem.js","../../src/DropdownMenu.js","../../src/DropdownToggle.js","../../node_modules/react-transition-group/utils/PropTypes.js","../../node_modules/react-transition-group/Transition.js","../../src/Fade.js","../../src/Badge.js","../../src/Card.js","../../src/CardGroup.js","../../src/CardDeck.js","../../src/CardColumns.js","../../src/CardBody.js","../../src/CardLink.js","../../src/CardFooter.js","../../src/CardHeader.js","../../src/CardImg.js","../../src/CardImgOverlay.js","../../src/CarouselItem.js","../../src/Carousel.js","../../src/CarouselControl.js","../../src/CarouselIndicators.js","../../src/CarouselCaption.js","../../src/UncontrolledCarousel.js","../../src/CardSubtitle.js","../../src/CardText.js","../../src/CardTitle.js","../../src/PopperContent.js","../../src/PopperTargetHelper.js","../../src/Popover.js","../../src/PopoverHeader.js","../../src/PopoverBody.js","../../src/Progress.js","../../src/Portal.js","../../src/Modal.js","../../src/ModalHeader.js","../../src/ModalBody.js","../../src/ModalFooter.js","../../src/Tooltip.js","../../src/Table.js","../../src/ListGroup.js","../../src/Form.js","../../src/FormFeedback.js","../../src/FormGroup.js","../../src/FormText.js","../../src/Input.js","../../src/InputGroup.js","../../src/InputGroupText.js","../../src/InputGroupAddon.js","../../src/InputGroupButton.js","../../src/InputGroupButtonDropdown.js","../../src/Label.js","../../src/Media.js","../../src/Pagination.js","../../src/PaginationItem.js","../../src/PaginationLink.js","../../src/TabContent.js","../../src/TabPane.js","../../src/Jumbotron.js","../../src/Alert.js","../../src/Collapse.js","../../src/ListGroupItem.js","../../src/ListGroupItemHeading.js","../../src/ListGroupItemText.js","../../src/UncontrolledAlert.js","../../src/UncontrolledButtonDropdown.js","../../src/UncontrolledDropdown.js","../../src/UncontrolledTooltip.js","components/empty-tip.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/is-url/index.js","components/dialog/commit-details.js","../node_modules/@seafile/seafile-editor/dist/components/topbar-component/header-list.js","../node_modules/@seafile/seafile-editor/dist/components/topbar-component/button-group.js","../node_modules/@seafile/seafile-editor/dist/components/topbar-component/icon-button.js","../node_modules/@seafile/seafile-editor/dist/components/add-link-dialog.js","../node_modules/@seafile/seafile-editor/dist/components/add-image-dialog.js","../node_modules/@seafile/seafile-editor/dist/components/add-formula-dialog.js","../node_modules/@seafile/seafile-editor/dist/components/topbar-component/table-toolbar.js","../node_modules/@seafile/seafile-editor/dist/components/topbar-component/upload-img.js","../node_modules/@seafile/seafile-editor/dist/components/toolbar.js","../../src/history.ts","../../src/history-command.ts","../../src/history-editor.ts","../../src/with-history.ts","../node_modules/@seafile/seafile-editor/dist/editor/editor-utils/range-utils.js","../node_modules/@seafile/seafile-editor/dist/editor/editor-component/textlink-hovermenu.js","../node_modules/@seafile/seafile-editor/dist/components/context-menu.js","../node_modules/@seafile/seafile-editor/dist/editor/element-model/link.js","../node_modules/@seafile/seafile-editor/dist/editor/element-model/image.js","../node_modules/@seafile/seafile-editor/dist/editor/controller/block-element-controller.js","../node_modules/@seafile/seafile-editor/dist/editor/controller/inline-element-controller.js","../node_modules/@seafile/seafile-editor/dist/editor/controller/void-element-controller.js","../node_modules/@seafile/seafile-editor/dist/editor/editor-utils/text-utils.js","../node_modules/@seafile/seafile-editor/dist/editor/controller/shortcut-controller.js","../node_modules/@seafile/seafile-editor/dist/editor/controller/normalize-controller.js","../node_modules/@seafile/seafile-editor/dist/editor/custom/set-event-transfer.js","../node_modules/@seafile/seafile-editor/dist/editor/editor-plugin.js","../node_modules/@seafile/seafile-editor/dist/components/shortcut-dialog.js","../node_modules/@seafile/seafile-editor/dist/editor/simple-editor.js","../node_modules/@seafile/seafile-editor/dist/components/user-help.js","../node_modules/@seafile/seafile-editor/dist/components/comment-dialog.js","../node_modules/@seafile/seafile-editor/dist/components/participants-list.js","../node_modules/@seafile/seafile-editor/dist/css/react-mentions-default-style.js","../node_modules/@seafile/seafile-editor/dist/components/comment-panel.js","../node_modules/@seafile/seafile-editor/dist/components/detail-list-view.js","../node_modules/@seafile/seafile-editor/dist/components/side-panel.js","../node_modules/@seafile/seafile-editor/dist/editor/rich-markdown-editor.js","../node_modules/@seafile/seafile-editor/dist/editor/plain-markdown-editor.js","../node_modules/@seafile/seafile-editor/dist/editor/seafile-editor.js","../node_modules/@seafile/seafile-editor/dist/editor/editor.js","../node_modules/lodash/_ListCache.js","../node_modules/lodash/_assocIndexOf.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_nativeCreate.js","../node_modules/lodash/_getMapData.js","../node_modules/lodash/_toKey.js","../node_modules/react-popper/lib/Manager.js","../node_modules/react-popper/lib/Target.js","../node_modules/react-popper/lib/Popper.js","../node_modules/react-popper/lib/Arrow.js","../node_modules/codemirror/mode/markdown/markdown.js","../node_modules/codemirror/mode/meta.js","../node_modules/lodash/_baseIsEqual.js","../node_modules/lodash/_Map.js","../node_modules/lodash/isObject.js","../node_modules/lodash/_MapCache.js","../node_modules/lodash/keys.js","../node_modules/lodash/isLength.js","../node_modules/lodash/_isKey.js","../node_modules/lodash/isSymbol.js","../node_modules/@seafile/seafile-editor/dist/components/toast/alert.js","../node_modules/@seafile/seafile-editor/dist/components/toast/toast.js","../node_modules/@seafile/seafile-editor/dist/components/toast/toastManager.js","../node_modules/@seafile/seafile-editor/dist/components/toast/toaster.js","../node_modules/@seafile/seafile-editor/dist/components/toast/index.js","../node_modules/lodash/_Stack.js","../node_modules/lodash/eq.js","../node_modules/lodash/isFunction.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_toSource.js","../node_modules/lodash/_equalArrays.js","../node_modules/lodash/isArguments.js","../node_modules/lodash/isBuffer.js","../node_modules/lodash/_isIndex.js","../node_modules/lodash/isTypedArray.js","../node_modules/lodash/isArrayLike.js","../node_modules/lodash/_isStrictComparable.js","../node_modules/lodash/_matchesStrictComparable.js","../node_modules/lodash/_baseGet.js","../node_modules/lodash/_castPath.js","../node_modules/react-chartjs-2/es/index.js"],"names":["Object","defineProperty","exports","value","Arrow","Popper","Target","Manager","undefined","_Manager3","_interopRequireDefault","require","_Target3","_Popper3","_Arrow3","obj","__esModule","default","CreateForder","props","handleChange","e","target","trim","setState","isSubmitBtnActive","childName","handleSubmit","state","newName","checkDuplicatedName","errMessage","gettext","replace","Utils","HTMLescape","path","parentPath","onAddFolder","handleKeyPress","key","preventDefault","toggle","addFolderCancel","newInput","React","createRef","this","length","focus","setSelectionRange","isOpen","for","id","innerRef","input","onKeyPress","onChange","color","className","onClick","disabled","Component","module","moment","createCommonjsModule","fn","getCjsExportFromNamespace","n","hasOwnProperty","colorName","conversions","reverseKeywords","convert","rgb","channels","labels","hsl","hsv","hwb","cmyk","xyz","lab","lch","hex","keyword","ansi16","ansi256","hcg","apple","gray","model","Error","comparativeDistance","x","y","Math","pow","h","l","r","g","b","min","max","delta","rdif","gdif","bdif","s","v","diff","diffc","c","k","reversed","currentClosestKeyword","currentClosestDistance","Infinity","distance","z","t1","t2","t3","val","i","smin","lmin","hi","floor","f","p","q","t","sl","vmin","wh","bl","ratio","m","y2","x2","z2","a","atan2","PI","sqrt","hr","cos","sin","args","arguments","round","ansi","mult","rem","string","toString","toUpperCase","substring","match","colorString","split","map","char","join","integer","parseInt","hue","chroma","pure","w","mg","buildGraph","graph","models","keys","len","parent","deriveBFS","fromModel","queue","current","pop","adjacents","adjacent","node","unshift","link","from","to","wrapConversion","toModel","cur","conversion","route","wrapRaw","wrappedFn","Array","prototype","slice","call","wrapRounded","result","forEach","routes","raw","colorConvert","colorName$1","getRgba","getHsla","getRgb","getHsl","getHwb","getAlpha","hexString","rgbString","rgbaString","percentString","percentaString","hslString","hslaString","hwbString","abbr","rgba","per","hexAlpha","parseFloat","scale","alpha","isNaN","hsla","vals","hexDouble","reverseNames","num","str","name","Color","valid","values","setValues","red","lightness","whiteness","cyan","isValid","setSpace","rgbArray","hslArray","hsvArray","hwbArray","concat","cmykArray","rgbaArray","hslaArray","setChannel","green","blue","saturation","saturationv","blackness","magenta","yellow","black","rgbNumber","luminosity","lum","chan","contrast","color2","lum1","lum2","level","contrastRatio","dark","light","negate","lighten","darken","saturate","desaturate","whiten","blacken","greyscale","clearer","opaquer","rotate","degrees","mix","mixinColor","weight","color1","w1","w2","toJSON","clone","type","source","prop","console","error","spaces","maxes","getValues","space","charAt","capped","chans","sname","index","svalues","window","chartjsColor","isValidKey","indexOf","helpers","noop","uid","isNullOrUndef","isArray","substr","isObject","isFinite","Number","valueOrDefault","defaultValue","valueAtIndexOrDefault","callback","thisArg","apply","each","loopable","reverse","arrayEquals","a0","a1","ilen","v0","v1","create","klen","_merger","options","tval","sval","merge","_mergerIf","mergeIf","sources","merger","extend","assign","dst","src","inherits","extensions","me","ChartElement","constructor","Surrogate","__super__","_deprecated","scope","previous","warn","helpers_core","callCallback","array","item","fromIndex","getValueOrDefault","getValueAtIndexOrDefault","effects","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInElastic","asin","easeOutElastic","easeInOutElastic","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","helpers_easing","easingEffects","RAD_PER_DEG","DOUBLE_PI","HALF_PI","QUARTER_PI","TWO_THIRDS_PI","exports$1","clear","chart","ctx","clearRect","width","height","roundedRect","radius","left","top","right","bottom","moveTo","arc","closePath","rect","drawPoint","style","rotation","xOffset","yOffset","size","cornerRadius","rad","save","translate","drawImage","restore","beginPath","lineTo","SQRT1_2","fill","stroke","_isPointInArea","point","area","epsilon","clipArea","clip","unclipArea","flip","stepped","steppedLine","midpoint","tension","bezierCurveTo","controlPointPreviousX","controlPointNextX","controlPointPreviousY","controlPointNextY","helpers_canvas","drawRoundedRectangle","defaults","_set","defaultColor","defaultFontColor","defaultFontFamily","defaultFontSize","defaultFontStyle","defaultLineHeight","showLines","core_defaults","toFontString","font","family","helpers_options","toLineHeight","matches","toPadding","_parseFont","globalDefaults","global","fontSize","fontFamily","lineHeight","fontStyle","resolve","inputs","context","info","cacheable","exports$2","_factorize","push","sort","log10","exponent","log","LOG10E","powerOf10","helpers_math","getRtlAdapter","rectX","setWidth","textAlign","align","xPlus","leftForLtr","itemWidth","getLtrAdapter","_itemWidth","helpers$1","easing","canvas","math","rtl","overrideTextDirection","direction","original","getPropertyValue","getPropertyPriority","setProperty","prevTextDirection","restoreTextDirection","interpolate","start","view","ease","actual","origin","c0","c1","Element","configuration","initialize","_type","hidden","pivot","_view","_model","_start","transition","tooltipPosition","hasValue","isNumber","core_element","exports$3","currentStep","numSteps","render","onAnimationProgress","onAnimationComplete","core_animation","get","set","animation","duration","onProgress","onComplete","core_animations","animations","request","addAnimation","lazy","startTime","Date","now","animating","requestAnimationFrame","cancelAnimation","findIndex","splice","requestAnimFrame","startDigest","advance","nextStep","arrayEvents","listenArrayEvents","listener","_chartjs","listeners","configurable","enumerable","method","base","res","object","unlistenArrayEvents","stub","DatasetController","datasetIndex","datasetElementType","dataElementType","_datasetElementOptions","_dataElementOptions","linkScales","addElements","getMeta","updateIndex","meta","scales","dataset","getDataset","scalesOpts","xAxisID","xAxes","yAxisID","yAxes","data","datasets","getDatasetMeta","getScaleForId","scaleID","_getValueScaleId","_getIndexScaleId","_getValueScale","_getIndexScale","reset","_update","destroy","_data","createMetaDataset","_chart","_datasetIndex","createMetaData","_index","metaData","addElementAndReset","element","updateElement","buildOrUpdateElements","isExtensible","resyncElements","_configure","_config","_cachedDataOpts","update","easingValue","elements","draw","getStyle","_resolveDatasetElementOptions","_resolveDataElementOptions","backgroundColor","borderColor","hover","readKey","datasetOpts","custom","elementOptions","cached","dataIndex","freeze","removeHoverStyle","$previousStyle","setHoverStyle","getHoverColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","_removeDatasetHoverStyle","_setDatasetHoverStyle","hoverOptions","prev","numMeta","numData","insertElements","count","onDataPush","onDataPop","onDataShift","shift","onDataSplice","onDataUnshift","core_datasetController","TAU","clipArc","startAngle","endAngle","pixelMargin","angleMargin","outerRadius","innerRadius","drawFullCircleBorders","vm","inner","fullCircles","drawBorder","borderAlign","lineWidth","lineJoin","element_arc","inLabelRange","mouseX","hoverRadius","inRange","chartX","chartY","pointRelativePosition","getAngleFromPoint","angle","betweenAngles","withinRadius","getCenterPoint","halfAngle","halfRadius","getArea","centreAngle","rangeFromCentre","circumference","fillStyle","strokeStyle","valueOrDefault$1","line","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","capBezierPoints","element_line","currentVM","spanGaps","points","_children","globalOptionLineElements","lastDrawnIndex","_loop","previousItem","skip","lineCap","setLineDash","lineDashOffset","valueOrDefault$2","defaultColor$1","xRange","abs","hitRadius","yRange","mouseY","pointStyle","element_point","inXRange","inYRange","padding","chartArea","defaultColor$2","isVertical","getBarBounds","x1","y1","half","swap","orig","v2","parseBorderSkipped","edge","borderSkipped","horizontal","parseBorderWidth","maxW","maxH","boundingRects","bounds","border","outer","skipX","skipY","rectangle","element_rectangle","rects","fillRect","Arc","Line","Point","Rectangle","deprecated","valueOrDefault$3","computeMinSampleSize","pixels","curr","_length","getTicks","getPixelForTick","computeFitCategoryTraits","ruler","thickness","barThickness","stackCount","categoryPercentage","barPercentage","chunk","computeFlexCategoryTraits","next","percent","end","mode","offset","gridLines","offsetGridLines","bar","controller_bar","scaleOpts","stack","minBarLength","maxBarThickness","_ruler","getRuler","_xScale","_yScale","datasetLabel","label","_updateElementGeometry","vscale","getBasePixel","isHorizontal","vpixels","calculateBarValuePixels","ipixels","calculateBarIndexPixels","head","center","_getStacks","last","metasets","_getMatchingVisibleMetas","stacked","stacks","getStackCount","getStackIndex","getPixelForValue","_startPixel","_endPixel","imeta","ivalue","stackLength","_parseValue","range","stackIndex","indexOpts","valueOpts","valueOrDefault$4","resolve$1","position","tooltips","callbacks","title","dataPoint","xLabel","yLabel","controller_bubble","xScale","yScale","dsIndex","getPixelForDecimal","NaN","_options","valueOrDefault$5","PI$1","DOUBLE_PI$1","HALF_PI$1","animateRotate","animateScale","legendCallback","listItem","list","document","createElement","setAttribute","appendChild","createTextNode","outerHTML","legend","generateLabels","controller","text","legendItem","cutoutPercentage","tooltipItem","dataLabel","controller_doughnut","getRingIndex","ringIndex","j","isDatasetVisible","maxWidth","maxHeight","opts","ratioX","ratioY","offsetX","offsetY","arcs","cutout","chartWeight","_getRingWeight","startX","startY","endX","endY","contains0","contains90","contains270","minX","minY","maxX","maxY","getMaxBorderWidth","radiusLength","_getVisibleDatasetWeightTotal","total","calculateTotal","_getRingWeightOffset","animationOpts","centerX","centerY","calculateCircumference","hoverWidth","ringWeightOffset","dataSetIndex","axis","horizontalBar","controller_horizontalBar","valueOrDefault$6","resolve$2","isPointInArea","scaleClip","halfBorderWidth","tickOpts","ticks","defaultClip","toClip","controller_line","config","showLine","_showLine","lineTension","_scale","updateBezierControlPoints","lineModel","calculatePointY","lineOptions","ds","dsMeta","stackedRightValue","rightValue","sumPos","sumNeg","getRightValue","_getSortedVisibleDatasetMetas","controlPoints","capControlPoint","pt","filter","cubicInterpolationMode","splineCurveMonotone","splineCurve","nextItem","resolve$3","angleLines","display","circular","pointLabels","beginAtZero","controller_polarArea","starts","_starts","angles","_angles","_updateRadius","countVisibleElements","_computeAngle","minSize","getVisibleDatasetCount","xCenter","yCenter","datasetStartAngle","getDistanceFromCenterForValue","resetRadius","doughnut","controller_pie","valueOrDefault$7","controller_radar","pointPosition","getPointPositionForValue","scatter","controllers","bubble","polarArea","pie","radar","getRelativePosition","native","parseVisibleItems","handler","metadata","jlen","getIntersectItems","getNearestItems","intersect","distanceMetric","minDistance","POSITIVE_INFINITY","nearestItems","getDistanceMetricForAxis","useX","useY","pt1","pt2","deltaX","deltaY","indexMode","items","core_interaction","modes","single","nearest","intersectsItem","filterByPosition","where","pos","sortByWeight","wrapBoxes","boxes","box","layoutBoxes","setLayoutDims","layouts","params","layout","fullWidth","availableWidth","vBoxMaxWidth","hBoxMaxHeight","buildLayoutBoxes","leftAndTop","rightAndBottom","vertical","getCombinedMax","maxPadding","updateDims","newWidth","newHeight","getPadding","boxPadding","outerWidth","outerHeight","sizes","handleMaxPadding","updatePos","change","getMargins","marginForPositions","positions","margin","fitBoxes","refit","changed","refitBoxes","placeBoxes","userPadding","core_layouts","addBox","_layers","removeBox","layoutItem","configure","layoutOptions","availableHeight","verticalBoxes","horizontalBoxes","platform_basic","acquireContext","getContext","platform_dom","stylesheet","__proto__","EXPANDO_KEY","CSS_PREFIX","CSS_SIZE_MONITOR","CSS_RENDER_MONITOR","CSS_RENDER_ANIMATION","ANIMATION_START_EVENTS","EVENT_TYPES","touchstart","touchmove","touchend","pointerenter","pointerdown","pointermove","pointerup","pointerleave","pointerout","readUsedSize","property","initCanvas","renderHeight","getAttribute","renderWidth","initial","displayWidth","aspectRatio","displayHeight","eventListenerOptions","supports","addEventListener","passive","addListener","removeListener","removeEventListener","createEvent","nativeEvent","fromNativeEvent","event","throttled","ticking","createDiv","cls","el","createResizer","maxSize","resizer","expand","shrink","_reset","scrollLeft","scrollTop","onScroll","bind","watchForRender","expando","proxy","renderProxy","animationName","reflow","offsetParent","classList","add","unwatchForRender","remove","addResizeListener","container","maintainAspectRatio","parentNode","clientWidth","insertBefore","firstChild","removeResizeListener","removeChild","injectCSS","rootNode","css","containsStyles","platform_dom$2","disableCSSInjection","_enabled","_ensureLoaded","root","getRootNode","host","getElementById","releaseContext","removeAttribute","proxies","addEvent","removeEvent","implementation","platform","plugins","core_plugins","_plugins","_cacheId","register","plugin","unregister","idx","getAll","notify","hook","descriptor","descriptors","cache","$plugins","_invalidate","core_scaleService","constructors","registerScaleType","scaleConstructor","scaleDefaults","getScaleConstructor","getScaleDefaults","updateScaleDefaults","additions","addScalesToLayout","valueOrDefault$8","getRtlHelper","enabled","titleFontStyle","titleSpacing","titleMarginBottom","titleFontColor","titleAlign","bodySpacing","bodyFontColor","bodyAlign","footerFontStyle","footerSpacing","footerMarginTop","footerFontColor","footerAlign","yPadding","xPadding","caretPadding","caretSize","multiKeyBackground","displayColors","beforeTitle","tooltipItems","labelCount","afterTitle","beforeBody","beforeLabel","labelColor","labelTextColor","afterLabel","afterBody","beforeFooter","footer","afterFooter","positioners","average","eventPosition","nearestElement","d","distanceBetweenPoints","tp","pushOrConcat","toPush","splitNewlines","String","createTooltipItem","indexScale","valueScale","getLabelForIndex","getBaseModel","tooltipOpts","xAlign","yAlign","textDirection","_bodyFontFamily","bodyFontFamily","_bodyFontStyle","bodyFontStyle","_bodyAlign","bodyFontSize","_titleFontFamily","titleFontFamily","_titleFontStyle","titleFontSize","_titleAlign","_footerFontFamily","footerFontFamily","_footerFontStyle","footerFontSize","_footerAlign","opacity","legendColorBackground","getTooltipSize","tooltip","body","combinedBodyLength","reduce","bodyItem","before","lines","after","titleLineCount","footerLineCount","widthPadding","maxLineWidth","measureText","fontString","determineAlignment","lf","rf","olf","orf","yf","midX","midY","getBackgroundPoint","alignment","paddingAndSize","radiusAndPadding","getAlignedX","getBeforeAfterBodyLines","exports$4","_lastActive","getTitle","getBeforeBody","getBody","bodyItems","getAfterBody","getFooter","existingModel","active","_active","backgroundPoint","tooltipSize","caretX","caretY","labelColors","labelTextColors","_eventPosition","itemSort","dataPoints","drawCaret","tooltipPoint","caretPosition","getCaretPosition","x3","y3","ptX","ptY","tmp","drawTitle","rtlHelper","textBaseline","fillText","drawBody","textColor","drawColorBoxes","xLinePadding","colorX","fillLineOfText","bodyAlignForCalculation","rtlColorX","strokeRect","drawFooter","drawBackground","quadraticCurveTo","hasTooltipContent","globalAlpha","handleEvent","getElementsAtEventForMode","positioners_1","core_tooltip","valueOrDefault$9","mergeScaleConfig","slen","mergeConfig","initConfig","updateConfig","newOptions","ensureScalesHaveIDs","buildOrUpdateScales","nextAvailableScaleId","axesOpts","prefix","hasId","positionIsHorizontal","compare2Level","l1","l2","events","onHover","animationDuration","responsive","responsiveAnimationDuration","Chart","construct","_bufferedRender","instances","retinaScale","devicePixelRatio","bindEvents","resize","initToolTip","stop","silent","getMaximumWidth","getMaximumHeight","newSize","onResize","scalesOptions","scaleOptions","xAxisOptions","yAxisOptions","updated","dtype","dposition","isDefault","scaleType","scaleClass","mergeTicksOptions","hasUpdated","buildOrUpdateControllers","newControllers","destroyDatasetMeta","order","ControllerClass","resetElements","updateLayout","updateDatasets","lastActive","_bufferedRequest","_idx","updateDataset","animationOptions","animationObject","easingFunction","stepDecimal","layers","drawDatasets","_drawTooltip","_getSortedDatasetMetas","filterVisible","drawDataset","getElementAtEvent","getElementsAtEvent","getElementsAtXAxis","getDatasetAtEvent","_meta","generateLegend","unbindEvents","toBase64Image","toDataURL","_chartInstance","_listeners","eventHandler","updateHoverStyle","bufferedRequest","core_controller","Controller","types","configMerge","scaleMerge","core_helpers","parseMaxStyle","styleValue","parentProperty","valueInPixels","isConstrainedValue","getConstraintDimension","domNode","maxStyle","percentageProperty","defaultView","_getParentNode","constrainedNode","getComputedStyle","constrainedContainer","hasCNode","hasCContainer","infinity","collection","filterCallback","filtered","findNextWhere","arrayToSearch","startIndex","currentItem","findPreviousWhere","almostEquals","almostWhole","rounded","NEGATIVE_INFINITY","sign","toRadians","toDegrees","radians","_decimalPlaces","centrePoint","anglePoint","distanceFromXCenter","distanceFromYCenter","radialDistanceFromCenter","aliasPixel","pixelWidth","_alignPixel","pixel","currentDevicePixelRatio","halfWidth","firstPoint","middlePoint","afterPoint","d01","d12","s01","s12","fa","fb","EPSILON","pointBefore","pointCurrent","pointAfter","alphaK","betaK","tauK","squaredMagnitude","pointsWithTangents","deltaK","mK","pointsLen","slopeDeltaX","loop","niceNum","fraction","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","setTimeout","evt","originalEvent","srcElement","boundingRect","getBoundingClientRect","touches","clientX","clientY","paddingLeft","paddingTop","paddingRight","paddingBottom","getConstraintWidth","getConstraintHeight","_calculatePadding","parentDimension","cw","clientHeight","ch","currentStyle","forceRatio","pixelRatio","pixelSize","longestText","arrayOfThings","gc","garbageCollect","thing","nestedThing","longest","gcLen","textWidth","numberOfLabelLines","numberOfLines","CanvasGradient","colorValue","CanvasPattern","abstract","DateAdapter","formats","parse","format","startOf","endOf","_create","override","members","core_adapters","_date","core_ticks","formatters","tickValue","logDelta","tickString","logTick","numExponential","toExponential","numDecimal","toFixed","logarithmic","remain","valueOrDefault$a","sample","arr","numItems","increment","getPixelForGridLine","validIndex","lineValue","caches","computeLabelSizes","tickFonts","tickFont","nestedLabel","widest","highest","widths","heights","offsets","widestLabelSize","highestLabelSize","major","minor","valueAt","first","getTickMarkLength","drawTicks","tickMarkLength","getScaleLabelHeight","parseFontOptions","nestedOpts","fontColor","parseTickFontOptions","nonSkipped","ticksToFilter","getEvenSpacing","calculateSpacing","majorIndices","axisLength","ticksLimit","factors","factor","evenMajorSpacing","spacing","getMajorIndices","skipMajors","tick","ceil","majorStart","majorEnd","drawOnChartArea","zeroLineWidth","zeroLineColor","zeroLineBorderDash","zeroLineBorderDashOffset","scaleLabel","labelString","minRotation","maxRotation","mirror","autoSkip","autoSkipPadding","labelOffset","Scale","zeroLineIndex","_ticks","_getLabels","xLabels","yLabels","beforeUpdate","margins","samplingEnabled","sampleSize","_labelSizes","_maxLabelLines","longestLabelWidth","longestTextCache","_gridLineItems","_labelItems","beforeSetDimensions","setDimensions","afterSetDimensions","beforeDataLimits","determineDataLimits","afterDataLimits","beforeBuildTicks","buildTicks","afterBuildTicks","_convertTicksToLabels","beforeCalculateTickRotation","calculateTickRotation","afterCalculateTickRotation","beforeFit","fit","afterFit","_ticksToDraw","_autoSkip","afterUpdate","startPixel","endPixel","reversePixels","_reversePixels","beforeTickToLabelConversion","convertTicksToLabels","userCallback","afterTickToLabelConversion","labelSizes","maxLabelWidth","maxLabelHeight","tickWidth","maxLabelDiagonal","numTicks","labelRotation","_isVisible","_getLabelSizes","scaleLabelOpts","gridLineOpts","isBottom","firstLabelSize","lastLabelSize","lineSpace","tickPadding","isRotated","angleRadians","cosRotation","sinRotation","labelHeight","offsetLeft","offsetRight","labelWidth","handleMargins","isFullWidth","rawValue","_getScaleLabel","getValueForPixel","decimal","getDecimalForPixel","getBaseValue","avgMajorSpacing","maxTicksLimit","_tickSize","numMajorIndices","optionTicks","rot","_computeGridLineItems","borderValue","alignedLineValue","tx1","ty1","tx2","ty2","lineColor","ticksLength","tl","axisWidth","axisHalfWidth","alignPixel","alignBorderValue","_computeLabelItems","lineCount","textOffset","isMirrored","fonts","_drawGrid","firstLineWidth","lastLineWidth","_drawLabels","_drawTitle","scaleLabelX","scaleLabelY","scaleLabelFontColor","scaleLabelFont","scaleLabelPadding","halfLineHeight","isLeft","tz","gz","_draw","core_scale","isNullOrUndef$1","defaultConfig","scale_category","ticksOpts","minIndex","maxIndex","_startValue","_valueRange","valueCategory","_defaults","isNullOrUndef$2","generateTicks","generationOptions","dataRange","niceMin","niceMax","numSpaces","MIN_SPACING","stepSize","unit","maxNumSpaces","maxTicks","precision","rmin","rmax","scale_linearbase","handleTickRangeOptions","minSign","maxSign","setMin","suggestedMin","setMax","suggestedMax","getTickLimit","_computeTickLimit","handleDirectionalChanges","numericGeneratorOptions","fixedStepSize","ticksAsNumbers","_endValue","defaultConfig$1","DEFAULT_MIN","DEFAULT_MAX","getOrCreateStack","neg","stackData","relativePoints","updateMinMax","scale_linear","hasStacks","stackValues","_defaults$1","valueOrDefault$b","generateTicks$1","exp","significand","tickVal","endExp","endSignificand","minNotZero","lastTick","defaultConfig$2","nonNegativeOrDefault","scale_logarithmic","IDMatches","valuesPerStack","valuesForType","minVal","maxVal","tickValues","_getFirstTickValue","_valueOffset","_defaults$2","valueOrDefault$c","valueAtIndexOrDefault$1","resolve$4","defaultConfig$3","animate","showLabelBackdrop","backdropColor","backdropPaddingY","backdropPaddingX","getTickBackdropHeight","measureLabelSize","determineLimits","fitWithPointLabels","textSize","plFont","furthestLimits","furthestAngles","_pointLabelSizes","valueCount","getPointPosition","drawingArea","getIndexAngle","hLimits","vLimits","setReductions","getTextAlignForAngle","adjustPointPositionForLabelHeight","drawPointLabels","pointLabelOpts","tickBackdropHeight","outerDistance","extra","pointLabelPosition","pointLabelFontColor","drawRadiusLine","numberOrZero","param","scale_radialLinear","setCenterPoint","largestPossibleRadius","radiusReductionLeft","radiusReductionRight","radiusReductionTop","radiusReductionBottom","leftMovement","rightMovement","topMovement","bottomMovement","maxRight","maxLeft","maxTop","maxBottom","scalingFactor","distanceFromCenter","thisAngle","getBasePosition","angleLineOpts","tickFontColor","_defaults$3","deprecated$1","resolve$5","valueOrDefault$d","MIN_INTEGER","MIN_SAFE_INTEGER","MAX_INTEGER","MAX_SAFE_INTEGER","INTERVALS","millisecond","common","steps","second","minute","hour","day","week","month","quarter","year","UNITS","sorter","arrayUnique","hash","out","getMin","time","getMax","buildLookupTable","timestamps","distribution","table","lookup","mid","i0","i1","lo","interpolate$1","skey","tkey","span","toTimestamp","adapter","_adapter","parser","determineUnitForAutoTicks","minUnit","capacity","interval","determineUnitForFormatting","determineMajorUnit","generate","timeOpts","unitStepSize","weekday","isoWeekday","computeOffsets","setMajorTicks","majorUnit","ticksFromTimestamps","defaultConfig$4","adapters","displayFormat","displayFormats","scale_time","date","timestamp","labelsAdded","dataLabels","_table","_timestamps","getLabelCapacity","_unit","_majorUnit","_offsets","tooltipFormat","datetime","tickFormatFunction","minorFormat","majorFormat","nestedTickOpts","formatter","getPixelForOffset","_getLabelSize","tickLabelWidth","tickFontSize","getLabelWidth","exampleTime","exampleLabel","_defaults$4","category","radialLinear","FORMATS","_id","valueOf","amount","filler","propagate","mappers","boundary","decodeFill","computeLinearBoundary","scaleBottom","scaleTop","scaleZero","computeCircularBoundary","cx","cy","computeBoundary","resolveTarget","visited","visible","createMapper","isDrawable","drawArea","curve0","curve1","len0","len1","doFill","mapper","p0","p1","d0","d1","loopOffset","plugin_filler","afterDatasetsUpdate","$filler","beforeDatasetsDraw","getRtlHelper$1","noop$1","valueOrDefault$e","getBoxWidth","labelOpts","usePointStyle","boxWidth","ci","onLeave","lineDash","Legend","legendHitBoxes","_hoveredItem","doughnutMode","beforeBuildLabels","buildLabels","afterBuildLabels","legendItems","labelFont","hitboxes","lineWidths","totalHeight","vPadding","columnWidths","columnHeights","totalWidth","currentColWidth","currentColHeight","lineDefault","legendHeight","legendWidth","cursor","drawLegendBox","SQRT2","halfFontSize","xLeft","yMiddle","alignmentOffset","dimension","blockSize","itemHeight","realX","_getLegendItemAt","hitBox","lh","hoveredItem","createNewLegendAndAttach","legendOpts","plugin_legend","_element","beforeInit","afterEvent","noop$2","Title","titleX","titleY","fontOpts","createNewTitleBlockAndAttach","titleOpts","titleBlock","_adapters","Animation","animationService","Interaction","scaleService","Ticks","Tooltip","pluginService","PluginBase","canvasHelpers","layoutService","LinearScaleBase","klass","cfg","toLowerCase","factory","baseIsEqual","other","Stack","equalArrays","equalByTag","equalObjects","getTag","isBuffer","isTypedArray","argsTag","arrayTag","objectTag","bitmask","customizer","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","__data__","assocIndexOf","ListCache","has","Map","MapCache","pairs","LARGE_ARRAY_SIZE","isFunction","isMasked","toSource","reIsHostCtor","funcProto","Function","objectProto","funcToString","reIsNative","RegExp","test","Symbol","nativeObjectToString","symToStringTag","toStringTag","isOwn","tag","unmasked","coreJsData","maskSrcKey","exec","IE_PROTO","func","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","entries","entry","nativeCreate","getMapData","setCacheAdd","setCacheHas","SetCache","predicate","Uint8Array","eq","mapToArray","setToArray","symbolProto","symbolValueOf","byteLength","byteOffset","buffer","message","isPartial","getAllKeys","objProps","objLength","objStacked","othStacked","skipCtor","objValue","othValue","compared","objCtor","othCtor","baseGetAllKeys","getSymbols","arrayPush","keysFunc","symbolsFunc","arrayFilter","stubArray","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","symbol","resIndex","baseTimes","isArguments","isIndex","inherited","isArr","isArg","isBuff","isType","skipIndexes","iteratee","baseGetTag","isObjectLike","isLength","typedArrayTags","freeGlobal","freeSelf","self","freeExports","nodeType","freeModule","freeProcess","process","nodeUtil","binding","isPrototype","nativeKeys","Ctor","overArg","transform","arg","DataView","Promise","Set","WeakMap","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","ArrayBuffer","ctorString","getNative","baseAssignValue","keyBy","createAggregator","arrayAggregator","baseAggregator","baseIteratee","setter","initializer","accumulator","baseEach","baseForOwn","createBaseEach","baseFor","createBaseFor","fromRight","iterable","isArrayLike","eachFunc","baseMatches","baseMatchesProperty","identity","baseIsMatch","getMatchData","matchesStrictComparable","matchData","noCustomizer","srcValue","COMPARE_PARTIAL_FLAG","isStrictComparable","hasIn","isKey","toKey","baseGet","memoizeCapped","rePropName","reEscapeChar","stringToPath","charCodeAt","number","quote","subString","memoize","resolver","TypeError","memoized","Cache","baseToString","arrayMap","isSymbol","symbolToString","baseHasIn","hasPath","castPath","hasFunc","baseProperty","basePropertyDeep","SidePanel","getActiveClass","tab","currentTab","isSidePanelClosed","onCloseSidePanel","canViewSystemInfo","siteRoot","tabItemClick","aria-hidden","isPro","canViewStatistic","otherPermission","constanceEnabled","canConfigSystem","canManageLibrary","canManageUser","canManageGroup","multiTenancy","multiInstitution","sysadminExtraEnabled","canViewUserLog","enableFileScan","enableGuestInvitation","enableTermsAndConditions","canViewAdminLog","enableWorkWeixin","enableDingtalk","enableShareLinkReportAbuse","MainPanel","children","MainPanelTopbar","search","isAdminPanel","Info","uploadLicenseFile","fileInput","files","file","seafileAPI","sysAdminUploadLicense","then","sysInfo","with_license","catch","errMsg","getErrorMsg","toaster","danger","openFileInput","click","renderLicenseDescString","license_mode","license_to","license_expiration","app","lang","loading","errorMsg","sysAdminGetSysInfo","org_count","repos_count","total_files_count","total_storage","total_devices_count","current_connected_devices_count","license_maxusers","multi_tenancy_enabled","active_users_count","users_count","groups_count","isDefaultAdmin","ref","href","bytesToSize","Nav","navItems","urlPart","propsTypes","disabledDate","PropTypes","isRequired","FORMAT","Picker","defaultCalendarValue","locale","calendar","translateCalendar","placeholder","tabIndex","readOnly","StatisticCommonTool","changeActive","statisticTypeName","statisticType","endTime","subtract","getActiviesFiles","disabledStartDate","startValue","today","endValue","isBefore","disabledEndDate","field","onSubmit","StatisticChart","titleCallback","ticksCallback","opations","filesData","isTitleCallback","isTicksCallback","suggestedMaxNumbers","isLegendStatus","chartTitle","_this","nextProps","StatisticFile","groupBy","sysAdminStatisticFiles","added","deleted","modified","addedData","visitedData","modifiedData","deletedData","isLoading","err","StatisticStorage","sysAdminStatisticStorages","totalStorage","TrafficTable","sortBy","sortIcon","sortOrder","sortItems","TrafficTableBody","trafficName","userTrafficItem","email","org_name","syncUploadSize","sync_file_upload","syncDownloadSize","sync_file_download","webUploadSize","web_file_upload","webDownloadSize","web_file_download","linkUploadSize","link_file_upload","linkDownloadSize","link_file_download","OrgsTraffic","getPreviousPage","getTrafficList","currentPage","getNextPage","errorMessage","initPage","blur","page","perPage","orderBy","sysAdminListOrgTraffic","orgTrafficList","org_monthly_traffic_list","hasNextPage","has_next_page","resetPerPage","newPerPage","initMonth","urlParams","URL","location","searchParams","gotoPreviousPage","gotoNextPage","curPerPage","UsersTraffic","sysAdminListUserTraffic","userTrafficList","user_monthly_traffic_list","StatisticTraffic","changeTabActive","activeName","tabActive","sysAdminStatisticTraffic","total_upload","total_download","link_upload","link_download","sync_upload","sync_download","web_upload","web_download","linkData","syncData","webData","renderCommonTool","StatisticUsers","sysAdminStatisticActiveUsers","userCount","StatisticReports","onGenerateReports","url","SysAdminUnlinkDevice","handleInputChange","inputChecked","checked","unlinkDevice","toggleDialog","htmlFor","Content","getPreviousPageDevicesList","getDevicesListByPage","pageInfo","current_page","getNextPageDevicesList","emptyTip","Item","handleMouseOver","isOpIconShown","handleMouseOut","handleUnlink","is_desktop_client","toggleUnlinkDeviceDialog","isUnlinkDeviceDialogOpen","deleteFiles","device_id","user","sysAdminUnlinkDevice","unlinked","success","onMouseEnter","onMouseLeave","user_name","client_version","device_name","last_login_ip","last_accessed","fromNow","DevicesByPlatform","devicesPlatform","per_page","sysAdminListDevices","devicesData","devices","page_info","DesktopDevices","MobileDevices","UserLink","encodeURIComponent","device_ip","repo_id","repo_name","error_msg","error_time","DeviceErrors","clean","sysAdminClearDeviceErrors","devicesErrors","isCleanBtnShown","sysAdminListDeviceErrors","AbuseReports","listAbuseReports","sysAdminListAbuseReports","abuseReportList","abuse_report_list","handleError","updateAbuseReport","handled","abuseReportId","sysAdminUpdateAbuseReport","response","detail","isDesktop","AbuseReportList","fileUrl","file_path","reporter","abuse_type","description","SetQuotaDialog","handleQuotaChange","quota","updateQuota","addonType","SysAdminImportUserDialog","fileInputRef","uploadFile","fileName","lastIndexOf","importUserInBatch","SysAdminUserRoleEditor","translateRoles","role","isTextMode","isEditIconShow","roleOptions","currentOption","currentRole","onOptionChanged","onRoleChanged","translateOption","SysAdminAddUserDialog","checkSubmitBtnActive","password","passwordAgain","btnActive","togglePasswordVisible","isPasswordVisible","inputPassword","passwd","inputPasswordAgain","generatePassword","inputEmail","inputName","updateRole","showRole","addUser","dialogTitle","autoComplete","availableRoles","SysAdminBatchAddAdminDialog","handleSelectChange","addAdminInBatch","isMulti","onSelectChange","CommonOperationConfirmationDialog","executeOperation","confirmBtnText","dangerouslySetInnerHTML","__html","SysAdminUser","contact_email","login_id","last_login","last_access_time","create_time","is_active","is_staff","reference_id","department","quota_total","quota_usage","institution","org_id","isSelected","SysAdminAdminUser","admin_role","Search","submit","haveLDAP","SysAdminUserStatusEditor","translateStatus","status","statusOptions","currentStatus","onStatusChanged","OpMenu","onMenuItemClick","operation","getEventData","onDropdownToggleClick","toggleOperationMenu","isItemMenuShow","onFreezedItem","onUnfreezedItem","operations","translateOperations","data-toggle","aria-expanded","data-op","sysadmin","pageOptions","availableAdminRoles","institutions","isItemFreezed","getListByPage","sortByQuotaUsage","isAdmin","isAllUsersSelected","columns","spaceText","spaceEl","colSpaceText","colNameText","colCreatedText","toggleSelectAllUsers","updateUser","deleteUser","updateAdminRole","revokeAdmin","onUserSelected","isLDAPImported","isSearchResult","handleMouseEnter","highlight","handleMouseLeave","isOpIconShow","toggleSetQuotaDialog","isSetQuotaDialogOpen","toggleDeleteUserDialog","isDeleteUserDialogOpen","toggleResetUserPasswordDialog","isResetUserPasswordDialogOpen","toggleRevokeAdminDialog","isRevokeAdminDialogOpen","updateStatus","isActive","translateAdminRole","updateInstitution","translateInstitution","inst","resetPassword","sysAdminResetUserPassword","reset_tip","getMenuOperations","translateResult","itemName","deleteDialogMsg","resetPasswordDialogMsg","revokeAdminDialogMsg","username","Users","toggleImportUserDialog","isImportUserDialogOpen","toggleAddUserDialog","isAddUserDialogOpen","toggleBatchSetQuotaDialog","isBatchSetQuotaDialogOpen","toggleBatchDeleteUserDialog","isBatchDeleteUserDialogOpen","hasUserSelected","selectedUserList","users","userList","thisuser","getUserList","sysAdminListAdmins","admin_user_list","getUsersListByPage","sysAdminListUsers","total_count","URLSearchParams","navigate","sysAdminDeleteUser","newUserList","setUserQuotaInBatch","quotaTotal","emails","sysAdminSetUserQuotaInBatch","resultUser","deleteUserInBatch","sysAdminDeleteUserInBatch","oldUser","some","deletedUser","msg","failed","sysAdminImportUserViaFile","sysAdminAddUser","add_user_tip","sysAdminUpdateUser","update_status_tip","sysAdminUpdateAdminRole","getOperationsForAll","toggleBatchAddAdminDialog","getCurrentNavItem","isBatchAddAdminDialogOpen","sysAdminAddAdminInBatch","getSearch","searchItems","AdminUsers","LDAPImportedUsers","sysAdminListLDAPUsers","ldap_user_list","SearchUsers","getItems","sysAdminSearchUsers","query","user_list","getPreviousPageList","getNextPageList","row","sm","UpdateUser","updateValue","userName","twoFactorAuthEnabled","currentKey","isUpdateUserDialogOpen","toggleSetNameDialog","toggleSetUserLoginIDDialog","toggleSetUserComtactEmailDialog","toggleSetUserReferenceIDDialog","toggleUpdateUserDialog","showEditIcon","action","userInfo","avatar_url","alt","has_default_device","disable2FA","check","is_force_2fa","toggleForce2fa","User","sysAdminDeleteTwoFactorAuth","sysAdminSetForceTwoFactorAuth","sysAdminGetUser","enableSysAdminViewRepo","deleteRepo","transferRepo","toggleDeleteDialog","isDeleteDialogOpen","toggleTransferDialog","isTransferDialogOpen","owner","renderRepoName","repo","encrypted","iconUrl","getLibIconUrl","iconTitle","getLibIconTitle","last_modified","canTransferToDept","Repos","repoID","sysAdminDeleteRepo","newRepoList","repoList","sysAdminTransferRepo","sysAdminListReposByOwner","repos","getOwnerLink","owner_email","owner_name","groupID","last_modify","sysAdminListShareInRepos","repo_list","deleteItem","toggleLinkDialog","isLinkDialogOpen","getRoleText","roleText","getIconUrl","is_dir","getFolderIconUrl","getFileIconUrl","obj_name","view_cnt","Links","token","sysAdminDeleteShareLink","shareLinkItems","sysAdminDeleteUploadLink","uploadLinkItems","sysAdminListShareLinksByUser","share_link_list","sysAdminListUploadLinksByUser","upload_link_list","parent_group_id","created_at","Groups","sysAdminDismissGroupByID","sysAdminListGroupsJoinedByUser","group_list","SysAdminCreateRepoDialog","handleRepoNameChange","repoName","ownerEmail","createRepo","option","UserItem","isOperationShow","deleteShareItem","user_email","onChangeUserPermission","permission","currentPermission","is_admin","permissions","onPermissionChanged","UserList","SysAdminShareToUser","selectedOption","setPermission","shareToUser","sysAdminAddRepoSharedItem","newItems","sharedItems","refs","userSelect","clearSelect","useremail","sysAdminDeleteRepoSharedItem","userEmail","sysAdminUpdateRepoSharedItemPermission","updateSharedItems","sharedItem","sharedItemUsername","sysAdminListRepoSharedItems","colSpan","GroupItem","group_id","group_name","GroupList","NoOptionsMessage","innerProps","SysAdminShareToGroup","loadOptions","shareableGroups","listSharedGroups","shareToGroup","groups","sharedItemGroupID","components","makeAnimated","maxMenuHeight","inputId","SysAdminShareDialog","getInitialActiveTab","activeTab","renderDirContent","enableDirPrivateShare","isGroupOwnedRepo","pills","tabId","itemType","itemPath","isRepoOwner","SysAdminLibHistorySettingDialog","days","keepDays","autoHistory","expireDays","sysAdminUpdateRepoHistorySetting","keep_days","errorInfo","setLimitDays","allHistory","noHistory","sysAdminGetRepoHistorySetting","onKeyDown","sortByFileCount","sortBySize","initialSortIcon","onDeleteRepo","onTransferRepo","isRepoDeleted","toggleShareDialog","toggleHistorySettingDialog","isShareDialogOpen","isHistorySettingDialogOpen","getOperations","departmentID","file_count","repoEncrypted","userPerm","AllRepos","toggleCreateRepoDialog","isCreateRepoDialogOpen","getReposByPage","sysAdminListAllRepos","Owner","sysAdminCreateRepo","targetRepo","searchRepos","SystemRepo","sysAdminGetSystemRepoInfo","trashReposExpireDays","onRestoreRepo","sysAdminDeleteTrashRepo","sysAdminRestoreTrashRepo","toggleDeleteRepoDialog","isDeleteRepoDialogOpen","toggleRestoreRepoDialog","isRestoreRepoDialogOpen","delete_time","TrashRepos","toggleCleanTrashDialog","isCleanTrashDialogOpen","sysAdminListTrashRepos","cleanTrash","sysAdminCleanTrashRepos","sysAdminSearchTrashRepos","SearchRepos","getRepos","sysAdminSearchRepos","handleNameInputChange","Dirent","mtime","last_update","file_size","is_file","DirPath","onPathClick","turnPathToLink","pathList","nodePath","data-path","isSystemRepo","currentPath","pathElem","DirentItem","openFolder","dirent","deleteDirent","downloadDirent","fromSystemRepo","getDirentIcon","DirContent","direntList","DirView","loadDirentList","toggleNewFolderDialog","isNewFolderDialogOpen","createNewFolder","folderName","getFileName","sysAdminCreateSysRepoFolder","new_dirent","direntPath","joinPath","sysAdminListRepoDirents","is_system_library","dirent_list","encodePath","history","replaceState","sysAdminDeleteRepoDirent","sysAdminGetRepoFileDownloadURL","download_url","onFileInputChange","sydAdminGetSysRepoItemUploadURL","formData","FormData","append","post","upload_link","fileObj","newDirent","getTime","dirs","SysAdminCreateGroupDialog","groupName","createGroup","SysAdminTransferGroupDialog","submitBtnDisabled","receiver","transferGroup","deleteGroup","groupUrl","toggleCreateGroupDialog","isCreateGroupDialogOpen","getGroupListByPage","sysAdminListAllGroups","groupList","OnwerEmail","sysAdminCreateNewGroup","newGroupList","receiverEmail","sysAdminTransferGroup","searchGroups","SearchGroups","getGroups","sysAdminSearchGroups","unshareRepo","toggleUnshareRepoDialog","isUnshareRepoDialogOpen","dialogMsg","shared_by","shared_by_name","GroupRepos","sysAdminUnshareRepoFromGroup","sysAdminListGroupRepos","libraries","SysAdminGroupAddMemberDialog","selectedOptions","isSubmitBtnDisabled","addMembers","SysAdminGroupRoleEditor","removeMember","updateMemberRole","GroupMembers","sysAdminListGroupMembers","memberList","toggleAddMemgerDialog","isAddMemberDialogOpen","sysAdminAddGroupMember","newMemberList","sysAdminDeleteGroupMember","sysAdminUpdateGroupMemberRole","Departments","AddDepartDialog","validateName","parentGroup","parentGroupID","sysAdminAddNewDepartment","departName","onDepartChanged","header","DeleteDepartDialog","deleteDepart","sysAdminDeleteDepartment","tipMessage","SetGroupQuotaDialog","setGroupQuota","newQuota","sysAdminUpdateDepartmentQuota","RenameDepartmentDialog","sysAdminRenameDepartment","departmentName","onDepartmentNameChanged","select","group","toggleRenameDialog","showDeleteDepartDialog","isRenameDialogOpen","newHref","showSetGroupQuotaDialog","DepartmentsList","listDepartGroups","sysAdminListAllDepartments","toggleAddDepartDialog","isShowAddDepartDialog","toggleCancel","dept","topbarChildren","AddMemberDialog","orgSelect","onMemberChanged","DeleteMemberDialog","deleteMember","member","AddRepoDialog","sysAdminAddRepoInDepartment","onRepoChanged","DeleteRepoDialog","sysAdminDeleteRepoInDepartment","MemberItem","toggleMemberRoleMenu","showRoleMenu","onChangeUserRole","roles","toggleItemFreezed","showDeleteMemberDialog","RepoItem","showDeleteRepoDialog","DepartmentDetail","listGroupRepo","getDepartmentInfo","sysAdminGetDepartmentInfo","ancestorGroups","ancestor_groups","listMembers","membersPageInfo","membersErrorMsg","membersPerPage","listSubDepartGroups","onSubDepartChanged","onSubDepartmentNameChanged","isFreezed","deletedMember","deletedRepo","toggleRenameDepartmentDialog","isShowRenameDepartmentDialog","toggleAddRepoDialog","isShowAddRepoDialog","toggleAddMemberDialog","isShowAddMemberDialog","subGroup","subGroupID","subGroupName","membersPage","topBtn","ancestor","getShareLinksByPage","sortByTime","sortByCount","deleteShareLink","renderExpiration","expire_date","expire_time","is_expired","deleteIcon","onMouseOver","onMouseOut","creator_email","creator_name","ctime","ShareLinks","sysAdminListShareLinks","shareLinkList","linkToken","newShareLinkList","getUploadLinksByPage","deleteUploadLink","UploadLinks","sysAdminListAllUploadLinks","uploadLinkList","newUploadLinkList","SysAdminAddOrgDialog","orgName","addOrg","deleteOrg","sysAdminGetOrg","repoCount","Orgs","getItemsByPage","sysAdminListOrgs","orgList","organizations","toggleAddOrgDialog","isAddOrgDialogOpen","orgID","orgInfo","sysAdminUpdateOrg","newOrgList","org","sysAdminAddOrg","sysAdminDeleteOrg","SearchOrgs","sysAdminSearchOrgs","organization_list","SysAdminSetOrgNameDialog","updateName","SysAdminSetOrgMaxUserNumberDialog","isSetNameDialogOpen","toggleSetMaxUserNumberDialog","isSetMaxUserNumberDialogOpen","max_user_number","updateMaxUserNumber","OrgInfo","newOrgInfo","newValue","maxUserNumber","SysAdminUserMembershipEditor","updateMembership","toggleResetPasswordDialog","isResetPasswordDialogOpen","statusValue","membershipValue","is_org_staff","OrgUsers","newUserInfo","sysAdminAddOrgUser","sysAdminDeleteOrgUser","sysAdminUpdateOrgUser","isOrgStaff","sysAdminListOrgUsers","OrgGroups","sysAdminListOrgGroups","OrgRepos","sysAdminListOrgRepos","SysAdminAddInstitutionDialog","addInstitution","getInstitutionsByPage","deleteInstitution","institutionName","Institutions","sysAdminListInstitutions","institutionList","institution_list","toggleAddInstitutionDialog","isAddInstitutionDialogOpen","sysAdminAddInstitution","institutionID","sysAdminDeleteInstitution","institutionInfo","user_count","quota_used","InstitutionInfo","sysAdminUpdateInstitution","newInstitutionInfo","sysAdminGetInstitution","getInstitutionUsersByPage","setAdmin","toggleSetAdminDialog","isSetAdminDialogOpen","is_institution_admin","InstitutionUsers","sysAdminListInstitutionUsers","sysAdminUpdateInstitutionUser","sysAdminAddInstitutionUserBatch","successArray","failedArray","sysAdminDeleteInstitutionUser","InstitutionAdmins","sysAdminListInstitutionAdmins","LogsExportExcelDialog","downloadExcel","isValidDateStr","startDateStr","endDateStr","logType","handleStartChange","handleEndChange","getLogsByPage","login_ip","log_success","login_time","LoginLogs","toggleExportExcelDialog","isExportExcelDialogOpen","sysAdminListLoginLogs","logList","login_log_list","FilterMenu","toggleMenu","isMenuShown","toggleFreezeItem","onItemClick","filterItems","filterBy","ToggleFilter","toggleFilter","toggleFilterByUser","filterByUser","toggleFilterByRepo","filterByRepo","freezed","userFilteredBy","repoFilteredBy","isHighlighted","event_type","ip","device","file_or_dir_name","FileAccessLogs","sysAdminListFileAccessLogs","file_access_log_list","updateURL","delete","toggleCommitDetailsDialog","isCommitDetailsDialogOpen","showCommitDetails","file_operation","repo_encrypted","commitID","commit_id","commitTime","FileUpdateLogs","sysAdminListFileUpdateLogs","file_update_log_list","getActionTextByEType","etype","getShareTo","share_type","to_user_email","to_user_name","to_group_id","to_group_name","from_user_email","from_user_name","sharePerms","folder","SharePermissionLogs","sysAdminListSharePermissionLogs","share_permission_log_list","Section","headingText","SettingItemBase","helpTip","displayName","mainContent","extraContent","md","WebSettingInput","toggleBtns","isBtnsShown","hideBtns","onInputChange","saveSetting","keyText","inputType","onFocus","onBlur","onMouseDown","WebSettingFile","postFile","filePath","fileWidth","fileHeight","WebSettingCheckbox","valueToNum","WebSettings","sysAdminSetSysSettingInfo","config_dict","fileType","sysAdminUpdateLogo","sysAdminUpdateFavicon","sysAdminUpdateLoginBG","logoPath","logo_path","faviconPath","favicon_path","loginBGPath","login_bg_image_path","mediaUrl","sysAdminGetSysSettingInfo","SysAdminAddSysNotificationDialog","addNotification","deleteNotification","setToCurrent","is_current","Notifications","toggleAddNotificationDialog","isAddNotificationDialogOpen","sysAdminAddSysNotification","notificationList","notification","sysAdminDeleteSysNotification","sysAdminSetSysNotificationToCurrent","sysAdminListAllSysNotifications","notifications","Table","records","record","suggestion","FileScanRecords","listFileScanRecords","record_list","Fragment","WorkWeixinDepartmentMembersList","newUsersTempObj","checkedDepartmentId","isMembersListLoading","canCheckUserIds","membersList","avatar","onUserChecked","userid","mobile","isCheckedAll","onAllUsersChecked","WorkWeixinDepartmentsTreeNode","toggleChildren","stopPropagation","isChildrenShow","dropdownToggle","dropdownOpen","importDepartmentDialogToggle","depart","renderTreeNodes","departmentsTree","onChangeDepartment","changeDept","toggleClass","classNames","nodeInnerClass","WorkWeixinDepartmentsTreePanel","isTreeLoading","ImportWorkWeixinDepartmentDialog","onImportDepartmentSubmit","departmentsCount","membersCount","WorkWeixinDepartments","getDepartmentsTree","childIds","parentIds","parentid","intersection","rootIds","cloneData","_","cloneDeep","father","branchArr","child","getWorkWeixinDepartmentsList","adminListWorkWeixinDepartments","importDepartmentChildrenCount","importDepartmentMembersCount","membersTempObj","getWorkWeixinDepartmentMembersList","department_id","adminListWorkWeixinDepartmentMembers","fetch_child","userlist","getCanCheckUserIds","userIds","newUsersTempList","JSON","stringify","adminAddWorkWeixinUsersBatch","handleSubmitSuccess","fails","departmentId","importDepartment","isImportDepartmentDialogShow","adminImportWorkWeixinDepartment","handleImportDepartmentSubmitSuccess","handleImportDepartmentSubmitFailed","successes","successMsg","department_name","api_user_name","fail","failName","btnClass","canImportDepartment","renderNav","DingtalkDepartmentMembersList","DingtalkDepartmentsTreeNode","DingtalkDepartmentsTreePanel","ImportDingtalkDepartmentDialog","DingtalkDepartments","getDingtalkDepartmentsList","adminListDingtalkDepartments","getDingtalkDepartmentMembersList","adminListDingtalkDepartmentMembers","adminAddDingtalkUsersBatch","adminImportDingtalkDepartment","getInviteTypeText","invite_type","inviter_email","inviter_name","accept_time","accepter_email","accepter_name","invite_time","Invitations","sysAdminListInvitations","invitation_list","targetItem","sysAdminDeleteInvitation","deleteItemInBatch","sysAdminDeleteExpiredInvitations","prevItems","totalItemCount","TermsEditorDialog","isContentChanged","currentContent","getCurrentContent","onCommit","onCloseEditorDialog","simpleEditor","hasContentChange","getMarkdown","setSimpleEditorRef","editor","content","wrapClassName","contentClassName","onRef","defaultProps","AddOrUpdateTermDialog","handleNameChange","handleVersionNumberChange","versionNumber","handleTextChange","setActive","setInActive","addTerm","isUpdate","updateTerm","onContentClick","isConditionsEditorDialogShow","onUpdateContent","oldTermObj","version_number","activate_time","hrefReg","imageReg1","imageReg2","linkReg1","linkReg2","getPreviewContent","markdownContent","previewText","newMarkdownContent","hrefs","hrefObj","links","images","imageSrcs","imageSrcs1","getLinks","TermsPreviewDialog","onClosePreviewDialog","toggleUpdateDialog","isUpdateDialogOpen","toggleTermsContentDialog","isTermsPerviewDialogOpen","deleteTerm","itemContent","mdFile","processor","innerHtml","previewContent","TermsAndConditions","toggleAddTermDialog","isAddTermDialogOpen","sysAdminAddTermAndCondition","reload","termID","sysAdminUpdateTermAndCondition","termList","sysAdminDeleteTermAndCondition","sysAdminListTermsAndConditions","term_and_condition_list","VirusFileItem","handleFile","virusFile","virus_id","fileStatus","fileOpList","has_deleted","has_ignored","repo_owner","virusFiles","AllVirusFiles","listVirusFiles","virus_file_list","virusID","op","deleteVirusFile","toggleIgnoreVirusFile","virus_file","toggleItemSelected","isAllItemsSelected","toggleAllSelected","UnhandledVirusFiles","prevState","handleSelectedItems","virusIDs","batchProcessVirusFiles","fileList","find","deleteSelectedItems","ignoreSelectedItems","selectedItems","LogsNav","getOperationText","operationType","getOperationDetail","ownerPageUrl","userPageUrl","detailText","repoPageUrl","groupPageUrl","AdminOperationLogs","sysAdminListAdminLogs","login_success","AdminLoginLogs","sysAdminListAdminLoginLogs","SysAdmin","getCurrentTabForPageList","pageList","urlPartList","urlBase","tmpTab","ReactDOM","baseIsNative","getValue","ShareAdminLink","copyToClipboard","copy","getScrollbarWidth","scrollDiv","scrollbarWidth","setScrollbarWidth","isBodyOverflowing","getOriginalBodyPadding","conditionallyUpdateScrollbar","fixedContent","bodyPadding","globalCssModule","mapToCssModules","cssModule","omit","omitKeys","pick","pickKeys","warned","warnOnce","propType","explanation","propName","componentName","rest","DOMElement","getTarget","selection","TransitionTimeouts","TransitionPropTypeKeys","TransitionStatuses","keyCodes","PopperPlacements","canUseDOM","propTypes","Container","fluid","Tag","attributes","classes","Row","noGutters","stringOrNumberProp","columnProps","getColumnSizeClass","isXs","colWidth","colSize","Col","colClasses","columnProp","isobject","colSizeInterfix","colClass","toggleableToExpand","Navbar","toggleable","inverse","fixed","sticky","getExpandClass","getToggleableClass","NavbarBrand","NavbarToggler","tabs","justified","navbar","card","getVerticalClass","NavItem","bool","childContextTypes","Dropdown","inNavbar","prevProps","menuClass","itemClass","disabledClass","dropup","nav","attrs","any","NavLink","Breadcrumb","BreadcrumbItem","Button","block","outline","ButtonDropdown","ButtonGroup","ButtonToolbar","contextTypes","DropdownItem","divider","noFlipModifier","directionPositionMap","DropdownMenu","position1","position2","DropdownToggle","caret","ariaLabel","timeoutPropName","transitionType","enabledPropName","_propTypes2","oneOfType","shape","newObj","_interopRequireWildcard","_react2","_reactDom2","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","instance","ReferenceError","_possibleConstructorReturn","appear","initialStatus","superClass","subClass","writable","transitionGroup","pendingState","timeout","exit","enter","mounting","nextStatus","unmountOnExit","_this2","appearing","timeouts","_this3","nextCallback","nextState","_this4","setNextCallback","_this5","_props","childProps","_objectWithoutProperties","Fade","baseClass","baseClassActive","otherProps","transitionProps","Badge","pill","Card","CardGroup","CardDeck","CardColumns","CardBody","CardLink","CardFooter","CardHeader","CardImg","cardImgClassName","CardImgOverlay","CarouselItem","isAppearing","startAnimation","offsetHeight","CustomEvent","isIn","slide","onExited","directionClassName","orderClassName","itemClasses","Carousel","ride","activeIndex","indicatorClicked","setInterval","pause","carouselItems","outerClasses","innerClasses","every","controlLeft","controlRight","indicators","wrappedIndicators","onClickHandler","CarouselControl","directionText","anchorClasses","iconClasses","screenReaderClasses","CarouselIndicators","listClasses","indicatorClasses","CarouselCaption","captionHeader","captionText","UncontrolledCarousel","nextIndex","newIndex","autoPlay","controls","goToIndex","slides","CardSubtitle","CardText","CardTitle","PopperContent","getTargetNode","placement","childNodes","fallbackPlacement","placementPrefix","hideArrow","modifiers","arrowClassName","popperClassName","extendedModifiers","behavior","handlePlacementChange","component","PopperTargetHelper","show","hide","DEFAULT_DELAYS","Popover","delay","getDelay","_target","contains","_popover","popperClasses","PopoverHeader","PopoverBody","Progress","barClassName","animated","striped","multi","toNumber","progressClasses","progressBarClasses","ProgressBar","Portal","FadePropTypes","propsToOmit","Modal","autoFocus","modalTransition","onEntered","_dialog","backdrop","modalOpenClassName","modalOpenClassNameRegex","dialogBaseClass","modalClassName","backdropClassName","labelledBy","external","modalAttributes","hasTransition","backdropTransition","ModalHeader","closeButton","WrapTag","closeAriaLabel","aria-label","ModalBody","ModalFooter","onMouseLeaveTooltipContent","bordered","ResponsiveTag","responsiveClassName","ListGroup","flush","Form","inline","FormFeedback","FormGroup","FormText","Input","bsSize","invalid","addon","staticInput","plaintext","checkInput","isNotaNumber","formControlClass","InputGroup","InputGroupText","InputGroupAddon","Label","Pagination","PaginationItem","PaginationLink","defaultAriaLabel","defaultCaret","TabContent","TabPane","Jumbotron","Alert","closeClassName","closeClasses","in","Collapse","transitionStatusToClassHash","getHeight","collapseClass","getTransitionClass","handleDisabledOnClick","ListGroupItem","ListGroupItemHeading","ListGroupItemText","UncontrolledAlert","UncontrolledButtonDropdown","UncontrolledDropdown","UncontrolledTooltip","EmptyTip","forDialog","getRawTag","objectToString","protocolAndDomainRE","everythingAfterProtocol","localhostDomainRE","nonLocalhostDomainRE","CommitDetails","getCommitDetails","commitDetails","centered","renderDetails","detailsData","showDesc","cmt_desc","HeaderList","_React$PureComponent","_inherits","_super","_createSuper","_classCallCheck","handleClick","getContainer","_createClass","findDOMNode","headerType","onClickHeader","PureComponent","withTranslation","IconButton","tooltipOpen","that","_assertThisInitialized","getClassName","isRichEditor","icon","AddLinkDialog","setInitialValue","editorUtils","getSelectedText","isLinkActive","linkNode","getCurrentLinkNode","getLinkText","handleUrlChange","handleTitleChange","setLink","editorSelection","insertLink","EditorUtils","AddImageDialog","insertImage","onToggleImageDialog","AddFormulaDialog","nodes","Editor","formula","formulaNode","handleFormulaChange","renderFormula","formulaPreviewer","innerHTML","dom","MathJax","tex2svg","setFormula","at","onAddFormula","toggleFormulaDialog","_ref","TableToolBar","DropList","handle","onSetAlign","onInsertColumn","onRemoveColumn","onInsertRow","onRemoveRow","onRemoveTable","_React$PureComponent2","_super2","marginRight","UploadImg","_len","_key","imgtoggle","uploadLocalImage","editorApi","onInsertImage","handleFileChange","onInputFile","stopImmediatePropagation","isSimpleEditor","insertRepoFile","accept","ToolBar","onToggleLink","unwrapLink","onToggleLinkDialog","toolbarStatus","isTableActive","isHeadActive","isCodeActive","isBoldActive","isItalicActive","isInlineCodeActive","isBlockquoteActive","isOrderedListActive","isUnorderedListActive","isCheckListActive","isFormulaActive","isListActive","onClickMark","onClickBlock","onToggleCheckItem","onAddTable","canInsertFormula","onToggleFormulaDialog","hasSidePanel","isShowSidePanel","toggleSidePanel","isShowLinkDialog","isShowFormulaDialog","isShowImageDialog","History","isPlainObject","Operation","HistoryCommand","Command","SAVING","MERGING","HistoryEditor","isHistoryEditor","isMerging","isSaving","withoutMerging","withoutSaving","withHistory","undos","redos","command","batch","inverseOps","lastBatch","lastOp","overwrite","shouldOverwrite","shouldSave","shouldMerge","shouldClear","Path","isRangeCollapsed","Range","isCollapsed","TextLinkHoverMenu","saveRef","refDom","getLinkUrl","linkUrl","setMenuPosition","getSelection","anchorOffset","focusOffset","getRangeAt","navigator","userAgent","collapsed","startOffset","setEnd","endContainer","setStart","startContainer","getClientRects","zIndex","componentDidMount","componentWillUnmount","componentWillMount","ContextMenu","menuHeight","menu","contextStyle","tableUtils","contextMenuPosition","insertRow","insertColumn","removeRow","removeColumn","Link","generateLinkElement","Image","generateImage","withBlock","listUtils","ListUtils","codeUtils","CodeUtils","TableUtils","blockquoteUtils","BlockquoteUtils","formulaUtils","FormulaUtils","setNodes","_getEventTransfer","getEventTransfer","fragment","html","isUrl","isInCodeBlock","endsWith","img","generateImageElement","insertNodes","isInternalFileLink","decodeURIComponent","SfEditor","isInternalDirLink","dirName","isInTable","pasteContentInTable","isInlist","pasteContentInList","pasteContentInCodeBlock","isInBlockquote","pasteContentInBlockquote","insertText","_Editor$match","_Editor$match2","_slicedToArray","currentBlock","insertFragment","isEmptyParagraph","_fragment","htmlDeserializer","newText","wrapBlockquote","unwrapBlockquote","wrapList","unwrapList","getCurrentListItem","nearestItem","_step","listItems","_iterator","_createForOfIteratorHelper","done","wrapCodeBlock","unwrapCodeBlock","splitNodes","always","anchor","_toConsumableArray","insertTable","removeTable","setAlign","exitTable","insertFormula","withInline","isInline","elementData","wrapNodes","collapse","unwrapNodes","removeNodes","newNodeLink","linkPath","voids","includes","withVoid","isVoid","VOID_ELEMENTS","BOLDITALICREG","BOLDREG","ITALICREG","CODEREG","TextUtils","_editor","getTextInfoBeforeSelection","_Editor$nodes","beforeText","setTextMarkByShortCut","marks","markText","matched","_Editor$node","_Editor$node2","textNode","textPath","lastChart","BOLD","ITALIC","CODE","_objectSpread","selectedPath","SHORTCUTS","withMarkdownShortcut","textUtils","_node","isEnd","_Editor$nodes3","image","imagePath","imageIndex","_Editor$nodes5","Node","_node2","getNodesByTypeAtRange","splitNodesAtPoint","splitCodeLine","_textUtils$getTextInf","_block","_textUtils$getTextInf2","_beforeText","_range","increaseListDepth","_Editor$nodes7","_block2","blockDepth","_Editor$nodes9","listNode","codeBlock","_block3","blockPath","blockNode","normalizeNode","_ref2","previousSibling","currentNodeIndex","mergeNodes","nextSiblings","childPath","Text","isText","TRANSFER_TYPES","setEventTransfer","mime","transfer","dataTransfer","clipboardData","encodedContent","btoa","setData","texts","textItem","getData","Plugin","keyCode","isHotKey","onSave","properties","byKey","richMarkdownEditor","voidNode","anchorPoint","focusPoint","anchorCodeBlock","focusCodeBlock","equals","onCut","onCopy","getSelectedTableCells","codeLine","controlKey","KeyboardShortcuts","renderShortcut","renderContainer","shortcutData","_this$props","toggleShortcutDialog","userHelp","userHelpData","SimpleEditor","isShowContextMenu","o","contentChanged","foucsEditor","editorRef","focusText","focusEnd","onContextMenu","isShowShortcutDialog","withReact","createEditor","deserialize","isShowBigImage","serialize","_this$state","getToolbarStatus","_this$props2","selectionCollapsed","Slate","Editable","renderElement","renderNode","renderLeaf","decorate","decorationNode","ModalPortal","returnObjects","ShortCut","platfrom","shortcutName","ShortCutRight","shortcuts","shortcut","shortcutFirKey","shortcutSecnKey","HelpShortcutList","_super3","shortcutType","dataList","liArr","shortcutKeyArr","UserHelpDialog","_React$PureComponent3","_super4","hideHelpDialog","CommentDialog","handleCommentChange","comment","submitComment","commentPosition","detailJSON","postComment","onCommentAdded","setQuoteText","mdQuote","toggleCommentDialog","ParticipantsList","openDialogs","tooltipToggle","participants","Participant","_React$Component2","toggleAvatarTooltip","showAvatarTooltip","defaultStyle","control","fontWeight","highlighter","overflow","minHeight","borderRadius","overfflowY","outlineOffset","outlineColor","outlineStyle","outlineWidth","suggestions","overflowX","borderBottom","CommentPanel","toggleResolvedComment","showResolvedComment","listComments","isScroll","commentsList","comments","scrollTo","resolveComment","updateComment","deleteComment","editComment","commentID","newComment","listRepoRelatedUsers","showParticipants","relatedUsers","addComment","addParticipant","toBeAddedParticipant","addFileParticipants","onParticipantsChange","checkParticipant","participant","renderUserSuggestion","highlightedDisplay","focused","relistComment","oldTime","CommentItem","scrollToQuote","MentionsInput","Mention","trigger","displayTransform","renderSuggestion","onAdd","appendSpaceOnAdd","clos","rows","warp","toggleDropDownMenu","convertComment","toggleEditComment","editable","resolved","DetailListView","onEditFileTagToggle","onListRelatedFileToggle","bytes","fileTagList","relatedFiles","fileInfo","_this$props$editorApi","serviceUrl","fileTag","tag_color","tag_name","relatedFile","rel","navItem","onOutlineClick","toggleCommentBtn","onMarkdownHintClick","onDetailClick","onCommentsPanelClick","openMarkdownHint","issues","issue_list","outlineActive","commentsPanel","detailList","OutlineView","getDomNodeByPath","querySelector","setBtnPosition","showCommentBtn","timmer","commentbtn","clearTimeout","focusNodePath","focusNode","offsetTop","initialSidePanel","mainPanelWidth","getCookie","scrollToNode","editorContainer","encodeURI","showHelpDialog","isShowHelpDialog","insertRepoImage","onResizeMouseUp","resizeFlag","setCookie","onResizeMouseDown","onResizeMouseMove","movementX","innerWidth","handleCommentOpen","cookie","getQuote","showCommentDialog","ca","ReactEditor","toDOMNode","addLink","isImage","leftNavMode","resetRichValue","collabUsers","ele","is_editing","myself","warning","_this$state2","onResizeMove","mainPanelClass","mainPanelStyle","onMouseMove","onMouseUp","onSelect","lodash","CodeMirror","isFocused","codeMirror","focusChanged","onFocusChange","cursorActivity","cm","onCursorActivity","scrollChanged","getScrollInfo","codemirrorValueChanged","doc","codeMirrorInstance","getCodeMirrorInstance","fromTextArea","textareaNode","on","toTextArea","initialValue","preserveScrollPosition","prevScrollPosition","setValue","editorClassName","PlainMarkdownEditor","leftIsBindScroll","rightIsBindScroll","scrollData","scrollPercentage","leftPanel","rightPanel","updateCode","newCode","onLeftScroll","scrollHeight","onRightScroll","onEnterLeftPanel","onLeaveLeftPanel","onEnterRightPanel","onLeaveRightPanel","onHotKey","isHotkey","lineNumbers","lineWrapping","scrollbarStyle","setContent","throttle","vfile","Prism","highlightAll","typesetPromise","querySelectorAll","SeafileEditor","switchToPlainTextEditor","editorMode","richValue","setEditorMode","initialPlainValue","collabServer","emitSwitchEditor","switchToRichTextEditor","onUnload","confirmationMessage","clearTimer","deleteDraft","returnValue","setDraftValue","onContentChanged","autoSave","autoSaveDraft","saveContent","onSaving","lastModifyTime","getFileInfo","setFileInfoMtime","addParticipants","isParticipant","onRichEditorSave","onPlainEditorSave","resetContentChanged","isEditMode","isDraft","seafileEditor","isTreeDataLoaded","firstNode","RichMarkdownEditor","saving","switchToMarkDownViewer","toggleStar","draftID","SimpleEditorWithErrorBoundary","forceUpdate","SeafileEditorWithErrorBundary","LoadScript","scriptSource","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","isKeyable","defineProperties","Constructor","protoProps","staticProps","_react","_propTypes","_Component","_temp","getPrototypeOf","_setTargetNode","_targetNode","_getTargetNode","setPrototypeOf","popperManager","setTargetNode","restProps","_extends","_props$component","targetRef","targetProps","componentProps","_popper2","_setArrowNode","_arrowNode","_getOffsets","_isDataDirty","_updateStateModifier","_getPopperStyle","_popper","popper","styles","pointerEvents","_getPopperPlacement","_getPopperHide","_getArrowStyle","arrow","_this$state$data$offs","_handlePopperRef","_popperNode","_createPopper","_destroyPopper","_scheduleUpdate","scheduleUpdate","setArrowNode","getArrowStyle","lastProps","eventsEnabled","applyStyle","updateState","_props2","popperStyle","popperPlacement","popperHide","popperProps","oneOf","placements","arrowRef","arrowStyle","arrowProps","defineMode","cmCfg","modeCfg","htmlMode","getMode","htmlModeMissing","findModeByName","found","mimes","highlightFormatting","maxBlockquoteDepth","taskLists","strikethrough","emoji","fencedCodeBlockHighlighting","fencedCodeBlockDefaultMode","xml","tokenTypeOverrides","tokenTypes","code","list1","list2","list3","imageAltText","imageMarker","formatting","linkInline","linkEmail","linkText","linkHref","em","strong","tokenType","hrRE","listRE","taskListRE","atxHeaderRE","allowAtxHeaderWithoutSpace","setextHeaderRE","textRE","fencedCodeRE","linkDefRE","punctuation","expandedTab","switchInline","stream","switchBlock","lineIsEmpty","blankLine","linkTitle","indentedCode","htmlBlock","innerMode","htmlState","tagStart","tokenize","isInText","inlineNormal","blockNormal","trailingSpace","trailingSpaceNewLine","prevLine","thisLine","firstTokenOnLine","column","indentation","prevLineLineIsEmpty","prevLineIsIndentedCode","prevLineIsHr","prevLineIsList","maxNonCodeIndentation","listStack","lineIndentation","indentationDiff","allowsInlineContinuation","fencedCodeEnd","isHr","skipToEnd","eatSpace","getType","eat","setext","listType","taskList","fencedEndRE","localMode","localState","startState","local","lookAhead","peek","footnoteLink","md_inside","returnType","currListInd","hasExitedList","maxFencedEndInd","taskOpen","taskClosed","listMod","handleText","matchCh","regex","previousFormatting","eatWhile","formattingEscape","atts","backUp","leftFlanking","rightFlanking","setEm","setStrong","retType","getLinkHrefInside","linkRE","endChar","returnState","footnoteLinkInside","footnoteUrl","copyState","indent","textAfter","Pass","blockCommentStart","blockCommentEnd","closeBrackets","fold","defineMIME","mod","modeInfo","ext","alias","findModeByMIME","findModeByExtension","findModeByFileName","filename","dot","baseIsEqualDeep","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","arrayLikeKeys","baseKeys","reIsDeepProp","reIsPlainProp","containerStyle","boxSizing","boxShadow","justifyContent","flexDirection","containerBorderSuccess","borderLeft","containerBorderWarn","containerBorderDanger","containerBorderNotify","toastTextTitle","toastTextChild","toastClose","marginLeft","toastIcon","intent","borderStyle","iconColor","iconClass","toastStyle","getContainerStyle","toastTextContainer","onRemove","animationEasing","openAnimation","keyframes","closeAnimation","animationStyles","alignItems","Toast","isShown","close","clearCloseTimer","startCloseTimer","closeTimer","marginBottom","isRemoveable","hasCloseButton","wrapperClass","hasCustomId","settings","ToastManager","getToasts","toasts","closeAll","toast","startsWith","closeToast","createToastInstance","previousState","uniqueId","idCounter","removeToast","bindNotify","bindGetToasts","bindCloseAll","isBrowser","Toaster","_bindNotify","notifyHandler","_bindGetToasts","getToastsHandler","_bindCloseAll","closeAllHandler","stackClear","stackDelete","stackGet","stackHas","stackSet","arraySome","cacheHas","arrLength","othLength","arrStacked","seen","arrValue","othIndex","baseIsArguments","stubFalse","Buffer","reIsUint","baseIsTypedArray","baseUnary","nodeIsTypedArray","Scatter","Bubble","Polar","Radar","HorizontalBar","Bar","Pie","Doughnut","_isEqual","_keyBy","_typeof","iterator","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","ownKeys","enumerableOnly","symbols","sym","getOwnPropertyDescriptor","_defineProperty","getOwnPropertyDescriptors","_defineProperties","_setPrototypeOf","Derived","hasNativeReflectConstruct","Reflect","sham","Proxy","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","NODE_ENV","ChartComponent","chartInstance","onElementsClick","renderChart","redraw","destroyChart","updateChart","nextData","transformDataProp","shadowDataProp","saveCurrentDatasets","isDev","usingCustomKeyProvider","datasetKeyProvider","getLabelAsKey","multipleDatasets","shouldWarn","getCurrentDatasets","memoizeDataProps","currentDatasets","nextDatasets","checkDatasets","currentDatasetsIndexed","pid","_this$props3","_this$props4","handleOnClick","arrayOf","_default","_React$Component3","_React$Component4","_this6","_ref3","_React$Component5","_super5","_this7","_ref4","_React$Component6","_super6","_this8","_ref5","_React$Component7","_super7","_this9","_ref6","_React$Component8","_super8","_this10","_ref7","_React$Component9","_super9","_this11","_ref8","_React$Component10","_super10","_this12","_ref9"],"mappings":"2HAEAA,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAETD,EAAQE,MAAQF,EAAQG,OAASH,EAAQI,OAASJ,EAAQK,aAAUC,EAEpE,IAEIC,EAAYC,EAFAC,EAAQ,MAMpBC,EAAWF,EAFAC,EAAQ,MAMnBE,EAAWH,EAFAC,EAAQ,MAMnBG,EAAUJ,EAFAC,EAAQ,MAItB,SAASD,EAAuBK,GAAO,OAAOA,GAAOA,EAAIC,WAAaD,EAAM,CAAEE,QAASF,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AAIr4I,EAAWgK,EAAM,QAAYhK,SACjChd,EAAQgd,SAAWA,I","file":"static/js/sysAdmin.chunk.js","sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Arrow = exports.Popper = exports.Target = exports.Manager = undefined;\n\nvar _Manager2 = require('./Manager');\n\nvar _Manager3 = _interopRequireDefault(_Manager2);\n\nvar _Target2 = require('./Target');\n\nvar _Target3 = _interopRequireDefault(_Target2);\n\nvar _Popper2 = require('./Popper');\n\nvar _Popper3 = _interopRequireDefault(_Popper2);\n\nvar _Arrow2 = require('./Arrow');\n\nvar _Arrow3 = _interopRequireDefault(_Arrow2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Manager = _Manager3.default;\nexports.Target = _Target3.default;\nexports.Popper = _Popper3.default;\nexports.Arrow = _Arrow3.default;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Alert } from 'reactstrap';\nimport { gettext } from '../../utils/constants';\nimport { Utils } from '../../utils/utils';\n\nconst propTypes = {\n fileType: PropTypes.string,\n parentPath: PropTypes.string.isRequired,\n onAddFolder: PropTypes.func.isRequired,\n checkDuplicatedName: PropTypes.func.isRequired,\n addFolderCancel: PropTypes.func.isRequired,\n};\n\nclass CreateForder extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n parentPath: '',\n childName: '',\n errMessage: '',\n isSubmitBtnActive: false,\n };\n this.newInput = React.createRef();\n }\n\n componentDidMount() {\n let parentPath = this.props.parentPath;\n if (parentPath[parentPath.length - 1] === '/') { // mainPanel\n this.setState({parentPath: parentPath});\n } else {\n this.setState({parentPath: parentPath + '/'}); // sidePanel\n }\n this.newInput.focus();\n this.newInput.setSelectionRange(0,0);\n }\n\n handleChange = (e) => {\n if (!e.target.value.trim()) {\n this.setState({isSubmitBtnActive: false});\n } else {\n this.setState({isSubmitBtnActive: true});\n }\n\n this.setState({childName: e.target.value});\n }\n\n handleSubmit = () => {\n if (!this.state.isSubmitBtnActive) {\n return;\n }\n\n let newName = this.state.childName;\n let isDuplicated = this.checkDuplicatedName();\n\n if (isDuplicated) {\n let errMessage = gettext('The name \"{name}\" is already taken. Please choose a different name.');\n errMessage = errMessage.replace('{name}', Utils.HTMLescape(newName));\n this.setState({errMessage: errMessage});\n } else {\n let path = this.state.parentPath + newName;\n this.props.onAddFolder(path);\n }\n }\n\n handleKeyPress = (e) => {\n if (e.key === 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n toggle = () => {\n this.props.addFolderCancel();\n }\n\n checkDuplicatedName = () => {\n let isDuplicated = this.props.checkDuplicatedName(this.state.childName);\n return isDuplicated;\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('New Folder')}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Label for=\"folderName\">{gettext('Name')}</Label>\n <Input\n id=\"folderName\"\n value={this.state.childName}\n innerRef={input => {this.newInput = input;}}\n onKeyPress={this.handleKeyPress}\n onChange={this.handleChange}\n />\n </FormGroup>\n </Form>\n {this.state.errMessage && <Alert color=\"danger\" className=\"mt-2\">{this.state.errMessage}</Alert>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!this.state.isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nCreateForder.propTypes = propTypes;\n\nexport default CreateForder;\n","/*!\n * Chart.js v2.9.4\n * https://www.chartjs.org\n * (c) 2020 Chart.js Contributors\n * Released under the MIT License\n */\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(function() { try { return require('moment'); } catch(e) { } }()) :\ntypeof define === 'function' && define.amd ? define(['require'], function(require) { return factory(function() { try { return require('moment'); } catch(e) { } }()); }) :\n(global = global || self, global.Chart = factory(global.moment));\n}(this, (function (moment) { 'use strict';\n\nmoment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nfunction getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n\nvar colorName = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n\nvar conversions = createCommonjsModule(function (module) {\n/* MIT license */\n\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in colorName) {\n\tif (colorName.hasOwnProperty(key)) {\n\t\treverseKeywords[colorName[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in colorName) {\n\t\tif (colorName.hasOwnProperty(keyword)) {\n\t\t\tvar value = colorName[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn colorName[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n});\nvar conversions_1 = conversions.rgb;\nvar conversions_2 = conversions.hsl;\nvar conversions_3 = conversions.hsv;\nvar conversions_4 = conversions.hwb;\nvar conversions_5 = conversions.cmyk;\nvar conversions_6 = conversions.xyz;\nvar conversions_7 = conversions.lab;\nvar conversions_8 = conversions.lch;\nvar conversions_9 = conversions.hex;\nvar conversions_10 = conversions.keyword;\nvar conversions_11 = conversions.ansi16;\nvar conversions_12 = conversions.ansi256;\nvar conversions_13 = conversions.hcg;\nvar conversions_14 = conversions.apple;\nvar conversions_15 = conversions.gray;\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nvar route = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nvar colorConvert = convert;\n\nvar colorName$1 = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n\n/* MIT license */\n\n\nvar colorString = {\n getRgba: getRgba,\n getHsla: getHsla,\n getRgb: getRgb,\n getHsl: getHsl,\n getHwb: getHwb,\n getAlpha: getAlpha,\n\n hexString: hexString,\n rgbString: rgbString,\n rgbaString: rgbaString,\n percentString: percentString,\n percentaString: percentaString,\n hslString: hslString,\n hslaString: hslaString,\n hwbString: hwbString,\n keyword: keyword\n};\n\nfunction getRgba(string) {\n if (!string) {\n return;\n }\n var abbr = /^#([a-fA-F0-9]{3,4})$/i,\n hex = /^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,\n rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n keyword = /(\\w+)/;\n\n var rgb = [0, 0, 0],\n a = 1,\n match = string.match(abbr),\n hexAlpha = \"\";\n if (match) {\n match = match[1];\n hexAlpha = match[3];\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i] + match[i], 16);\n }\n if (hexAlpha) {\n a = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100;\n }\n }\n else if (match = string.match(hex)) {\n hexAlpha = match[2];\n match = match[1];\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);\n }\n if (hexAlpha) {\n a = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100;\n }\n }\n else if (match = string.match(rgba)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i + 1]);\n }\n a = parseFloat(match[4]);\n }\n else if (match = string.match(per)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n }\n a = parseFloat(match[4]);\n }\n else if (match = string.match(keyword)) {\n if (match[1] == \"transparent\") {\n return [0, 0, 0, 0];\n }\n rgb = colorName$1[match[1]];\n if (!rgb) {\n return;\n }\n }\n\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = scale(rgb[i], 0, 255);\n }\n if (!a && a != 0) {\n a = 1;\n }\n else {\n a = scale(a, 0, 1);\n }\n rgb[3] = a;\n return rgb;\n}\n\nfunction getHsla(string) {\n if (!string) {\n return;\n }\n var hsl = /^hsla?\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hsl);\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n s = scale(parseFloat(match[2]), 0, 100),\n l = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, s, l, a];\n }\n}\n\nfunction getHwb(string) {\n if (!string) {\n return;\n }\n var hwb = /^hwb\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hwb);\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n w = scale(parseFloat(match[2]), 0, 100),\n b = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, w, b, a];\n }\n}\n\nfunction getRgb(string) {\n var rgba = getRgba(string);\n return rgba && rgba.slice(0, 3);\n}\n\nfunction getHsl(string) {\n var hsla = getHsla(string);\n return hsla && hsla.slice(0, 3);\n}\n\nfunction getAlpha(string) {\n var vals = getRgba(string);\n if (vals) {\n return vals[3];\n }\n else if (vals = getHsla(string)) {\n return vals[3];\n }\n else if (vals = getHwb(string)) {\n return vals[3];\n }\n}\n\n// generators\nfunction hexString(rgba, a) {\n var a = (a !== undefined && rgba.length === 3) ? a : rgba[3];\n return \"#\" + hexDouble(rgba[0]) \n + hexDouble(rgba[1])\n + hexDouble(rgba[2])\n + (\n (a >= 0 && a < 1)\n ? hexDouble(Math.round(a * 255))\n : \"\"\n );\n}\n\nfunction rgbString(rgba, alpha) {\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n return rgbaString(rgba, alpha);\n }\n return \"rgb(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2] + \")\";\n}\n\nfunction rgbaString(rgba, alpha) {\n if (alpha === undefined) {\n alpha = (rgba[3] !== undefined ? rgba[3] : 1);\n }\n return \"rgba(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2]\n + \", \" + alpha + \")\";\n}\n\nfunction percentString(rgba, alpha) {\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n return percentaString(rgba, alpha);\n }\n var r = Math.round(rgba[0]/255 * 100),\n g = Math.round(rgba[1]/255 * 100),\n b = Math.round(rgba[2]/255 * 100);\n\n return \"rgb(\" + r + \"%, \" + g + \"%, \" + b + \"%)\";\n}\n\nfunction percentaString(rgba, alpha) {\n var r = Math.round(rgba[0]/255 * 100),\n g = Math.round(rgba[1]/255 * 100),\n b = Math.round(rgba[2]/255 * 100);\n return \"rgba(\" + r + \"%, \" + g + \"%, \" + b + \"%, \" + (alpha || rgba[3] || 1) + \")\";\n}\n\nfunction hslString(hsla, alpha) {\n if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {\n return hslaString(hsla, alpha);\n }\n return \"hsl(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%)\";\n}\n\nfunction hslaString(hsla, alpha) {\n if (alpha === undefined) {\n alpha = (hsla[3] !== undefined ? hsla[3] : 1);\n }\n return \"hsla(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%, \"\n + alpha + \")\";\n}\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\nfunction hwbString(hwb, alpha) {\n if (alpha === undefined) {\n alpha = (hwb[3] !== undefined ? hwb[3] : 1);\n }\n return \"hwb(\" + hwb[0] + \", \" + hwb[1] + \"%, \" + hwb[2] + \"%\"\n + (alpha !== undefined && alpha !== 1 ? \", \" + alpha : \"\") + \")\";\n}\n\nfunction keyword(rgb) {\n return reverseNames[rgb.slice(0, 3)];\n}\n\n// helpers\nfunction scale(num, min, max) {\n return Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n var str = num.toString(16).toUpperCase();\n return (str.length < 2) ? \"0\" + str : str;\n}\n\n\n//create a list of reverse color names\nvar reverseNames = {};\nfor (var name in colorName$1) {\n reverseNames[colorName$1[name]] = name;\n}\n\n/* MIT license */\n\n\n\nvar Color = function (obj) {\n\tif (obj instanceof Color) {\n\t\treturn obj;\n\t}\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj);\n\t}\n\n\tthis.valid = false;\n\tthis.values = {\n\t\trgb: [0, 0, 0],\n\t\thsl: [0, 0, 0],\n\t\thsv: [0, 0, 0],\n\t\thwb: [0, 0, 0],\n\t\tcmyk: [0, 0, 0, 0],\n\t\talpha: 1\n\t};\n\n\t// parse Color() argument\n\tvar vals;\n\tif (typeof obj === 'string') {\n\t\tvals = colorString.getRgba(obj);\n\t\tif (vals) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals = colorString.getHsla(obj)) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals = colorString.getHwb(obj)) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t}\n\t} else if (typeof obj === 'object') {\n\t\tvals = obj;\n\t\tif (vals.r !== undefined || vals.red !== undefined) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals.l !== undefined || vals.lightness !== undefined) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals.v !== undefined || vals.value !== undefined) {\n\t\t\tthis.setValues('hsv', vals);\n\t\t} else if (vals.w !== undefined || vals.whiteness !== undefined) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t} else if (vals.c !== undefined || vals.cyan !== undefined) {\n\t\t\tthis.setValues('cmyk', vals);\n\t\t}\n\t}\n};\n\nColor.prototype = {\n\tisValid: function () {\n\t\treturn this.valid;\n\t},\n\trgb: function () {\n\t\treturn this.setSpace('rgb', arguments);\n\t},\n\thsl: function () {\n\t\treturn this.setSpace('hsl', arguments);\n\t},\n\thsv: function () {\n\t\treturn this.setSpace('hsv', arguments);\n\t},\n\thwb: function () {\n\t\treturn this.setSpace('hwb', arguments);\n\t},\n\tcmyk: function () {\n\t\treturn this.setSpace('cmyk', arguments);\n\t},\n\n\trgbArray: function () {\n\t\treturn this.values.rgb;\n\t},\n\thslArray: function () {\n\t\treturn this.values.hsl;\n\t},\n\thsvArray: function () {\n\t\treturn this.values.hsv;\n\t},\n\thwbArray: function () {\n\t\tvar values = this.values;\n\t\tif (values.alpha !== 1) {\n\t\t\treturn values.hwb.concat([values.alpha]);\n\t\t}\n\t\treturn values.hwb;\n\t},\n\tcmykArray: function () {\n\t\treturn this.values.cmyk;\n\t},\n\trgbaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.rgb.concat([values.alpha]);\n\t},\n\thslaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.hsl.concat([values.alpha]);\n\t},\n\talpha: function (val) {\n\t\tif (val === undefined) {\n\t\t\treturn this.values.alpha;\n\t\t}\n\t\tthis.setValues('alpha', val);\n\t\treturn this;\n\t},\n\n\tred: function (val) {\n\t\treturn this.setChannel('rgb', 0, val);\n\t},\n\tgreen: function (val) {\n\t\treturn this.setChannel('rgb', 1, val);\n\t},\n\tblue: function (val) {\n\t\treturn this.setChannel('rgb', 2, val);\n\t},\n\thue: function (val) {\n\t\tif (val) {\n\t\t\tval %= 360;\n\t\t\tval = val < 0 ? 360 + val : val;\n\t\t}\n\t\treturn this.setChannel('hsl', 0, val);\n\t},\n\tsaturation: function (val) {\n\t\treturn this.setChannel('hsl', 1, val);\n\t},\n\tlightness: function (val) {\n\t\treturn this.setChannel('hsl', 2, val);\n\t},\n\tsaturationv: function (val) {\n\t\treturn this.setChannel('hsv', 1, val);\n\t},\n\twhiteness: function (val) {\n\t\treturn this.setChannel('hwb', 1, val);\n\t},\n\tblackness: function (val) {\n\t\treturn this.setChannel('hwb', 2, val);\n\t},\n\tvalue: function (val) {\n\t\treturn this.setChannel('hsv', 2, val);\n\t},\n\tcyan: function (val) {\n\t\treturn this.setChannel('cmyk', 0, val);\n\t},\n\tmagenta: function (val) {\n\t\treturn this.setChannel('cmyk', 1, val);\n\t},\n\tyellow: function (val) {\n\t\treturn this.setChannel('cmyk', 2, val);\n\t},\n\tblack: function (val) {\n\t\treturn this.setChannel('cmyk', 3, val);\n\t},\n\n\thexString: function () {\n\t\treturn colorString.hexString(this.values.rgb);\n\t},\n\trgbString: function () {\n\t\treturn colorString.rgbString(this.values.rgb, this.values.alpha);\n\t},\n\trgbaString: function () {\n\t\treturn colorString.rgbaString(this.values.rgb, this.values.alpha);\n\t},\n\tpercentString: function () {\n\t\treturn colorString.percentString(this.values.rgb, this.values.alpha);\n\t},\n\thslString: function () {\n\t\treturn colorString.hslString(this.values.hsl, this.values.alpha);\n\t},\n\thslaString: function () {\n\t\treturn colorString.hslaString(this.values.hsl, this.values.alpha);\n\t},\n\thwbString: function () {\n\t\treturn colorString.hwbString(this.values.hwb, this.values.alpha);\n\t},\n\tkeyword: function () {\n\t\treturn colorString.keyword(this.values.rgb, this.values.alpha);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.values.rgb;\n\t\treturn (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.values.rgb;\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tdark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.values.rgb;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tlight: function () {\n\t\treturn !this.dark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = [];\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb[i] = 255 - this.values.rgb[i];\n\t\t}\n\t\tthis.setValues('rgb', rgb);\n\t\treturn this;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] += hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] -= hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] += hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] -= hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[1] += hwb[1] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[2] += hwb[2] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tgreyscale: function () {\n\t\tvar rgb = this.values.rgb;\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\tthis.setValues('rgb', [val, val, val]);\n\t\treturn this;\n\t},\n\n\tclearer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha - (alpha * ratio));\n\t\treturn this;\n\t},\n\n\topaquer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha + (alpha * ratio));\n\t\treturn this;\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.values.hsl;\n\t\tvar hue = (hsl[0] + degrees) % 360;\n\t\thsl[0] = hue < 0 ? 360 + hue : hue;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\t/**\n\t * Ported from sass implementation in C\n\t * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t */\n\tmix: function (mixinColor, weight) {\n\t\tvar color1 = this;\n\t\tvar color2 = mixinColor;\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn this\n\t\t\t.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue()\n\t\t\t)\n\t\t\t.alpha(color1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n\n\ttoJSON: function () {\n\t\treturn this.rgb();\n\t},\n\n\tclone: function () {\n\t\t// NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,\n\t\t// making the final build way to big to embed in Chart.js. So let's do it manually,\n\t\t// assuming that values to clone are 1 dimension arrays containing only numbers,\n\t\t// except 'alpha' which is a number.\n\t\tvar result = new Color();\n\t\tvar source = this.values;\n\t\tvar target = result.values;\n\t\tvar value, type;\n\n\t\tfor (var prop in source) {\n\t\t\tif (source.hasOwnProperty(prop)) {\n\t\t\t\tvalue = source[prop];\n\t\t\t\ttype = ({}).toString.call(value);\n\t\t\t\tif (type === '[object Array]') {\n\t\t\t\t\ttarget[prop] = value.slice(0);\n\t\t\t\t} else if (type === '[object Number]') {\n\t\t\t\t\ttarget[prop] = value;\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error('unexpected color value:', value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n};\n\nColor.prototype.spaces = {\n\trgb: ['red', 'green', 'blue'],\n\thsl: ['hue', 'saturation', 'lightness'],\n\thsv: ['hue', 'saturation', 'value'],\n\thwb: ['hue', 'whiteness', 'blackness'],\n\tcmyk: ['cyan', 'magenta', 'yellow', 'black']\n};\n\nColor.prototype.maxes = {\n\trgb: [255, 255, 255],\n\thsl: [360, 100, 100],\n\thsv: [360, 100, 100],\n\thwb: [360, 100, 100],\n\tcmyk: [100, 100, 100, 100]\n};\n\nColor.prototype.getValues = function (space) {\n\tvar values = this.values;\n\tvar vals = {};\n\n\tfor (var i = 0; i < space.length; i++) {\n\t\tvals[space.charAt(i)] = values[space][i];\n\t}\n\n\tif (values.alpha !== 1) {\n\t\tvals.a = values.alpha;\n\t}\n\n\t// {r: 255, g: 255, b: 255, a: 0.4}\n\treturn vals;\n};\n\nColor.prototype.setValues = function (space, vals) {\n\tvar values = this.values;\n\tvar spaces = this.spaces;\n\tvar maxes = this.maxes;\n\tvar alpha = 1;\n\tvar i;\n\n\tthis.valid = true;\n\n\tif (space === 'alpha') {\n\t\talpha = vals;\n\t} else if (vals.length) {\n\t\t// [10, 10, 10]\n\t\tvalues[space] = vals.slice(0, space.length);\n\t\talpha = vals[space.length];\n\t} else if (vals[space.charAt(0)] !== undefined) {\n\t\t// {r: 10, g: 10, b: 10}\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[space.charAt(i)];\n\t\t}\n\n\t\talpha = vals.a;\n\t} else if (vals[spaces[space][0]] !== undefined) {\n\t\t// {red: 10, green: 10, blue: 10}\n\t\tvar chans = spaces[space];\n\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[chans[i]];\n\t\t}\n\n\t\talpha = vals.alpha;\n\t}\n\n\tvalues.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));\n\n\tif (space === 'alpha') {\n\t\treturn false;\n\t}\n\n\tvar capped;\n\n\t// cap values of the space prior converting all values\n\tfor (i = 0; i < space.length; i++) {\n\t\tcapped = Math.max(0, Math.min(maxes[space][i], values[space][i]));\n\t\tvalues[space][i] = Math.round(capped);\n\t}\n\n\t// convert to all the other color spaces\n\tfor (var sname in spaces) {\n\t\tif (sname !== space) {\n\t\t\tvalues[sname] = colorConvert[space][sname](values[space]);\n\t\t}\n\t}\n\n\treturn true;\n};\n\nColor.prototype.setSpace = function (space, args) {\n\tvar vals = args[0];\n\n\tif (vals === undefined) {\n\t\t// color.rgb()\n\t\treturn this.getValues(space);\n\t}\n\n\t// color.rgb(10, 10, 10)\n\tif (typeof vals === 'number') {\n\t\tvals = Array.prototype.slice.call(args);\n\t}\n\n\tthis.setValues(space, vals);\n\treturn this;\n};\n\nColor.prototype.setChannel = function (space, index, val) {\n\tvar svalues = this.values[space];\n\tif (val === undefined) {\n\t\t// color.red()\n\t\treturn svalues[index];\n\t} else if (val === svalues[index]) {\n\t\t// color.red(color.red())\n\t\treturn this;\n\t}\n\n\t// color.red(100)\n\tsvalues[index] = val;\n\tthis.setValues(space, svalues);\n\n\treturn this;\n};\n\nif (typeof window !== 'undefined') {\n\twindow.Color = Color;\n}\n\nvar chartjsColor = Color;\n\nfunction isValidKey(key) {\r\n\treturn ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;\r\n}\r\n\r\n/**\r\n * @namespace Chart.helpers\r\n */\r\nvar helpers = {\r\n\t/**\r\n\t * An empty function that can be used, for example, for optional callback.\r\n\t */\r\n\tnoop: function() {},\r\n\r\n\t/**\r\n\t * Returns a unique id, sequentially generated from a global variable.\r\n\t * @returns {number}\r\n\t * @function\r\n\t */\r\n\tuid: (function() {\r\n\t\tvar id = 0;\r\n\t\treturn function() {\r\n\t\t\treturn id++;\r\n\t\t};\r\n\t}()),\r\n\r\n\t/**\r\n\t * Returns true if `value` is neither null nor undefined, else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @since 2.7.0\r\n\t */\r\n\tisNullOrUndef: function(value) {\r\n\t\treturn value === null || typeof value === 'undefined';\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is an array (including typed arrays), else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @function\r\n\t */\r\n\tisArray: function(value) {\r\n\t\tif (Array.isArray && Array.isArray(value)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar type = Object.prototype.toString.call(value);\r\n\t\tif (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is an object (excluding null), else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @since 2.7.0\r\n\t */\r\n\tisObject: function(value) {\r\n\t\treturn value !== null && Object.prototype.toString.call(value) === '[object Object]';\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is a finite number, else returns false\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t */\r\n\tisFinite: function(value) {\r\n\t\treturn (typeof value === 'number' || value instanceof Number) && isFinite(value);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns `value` if defined, else returns `defaultValue`.\r\n\t * @param {*} value - The value to return if defined.\r\n\t * @param {*} defaultValue - The value to return if `value` is undefined.\r\n\t * @returns {*}\r\n\t */\r\n\tvalueOrDefault: function(value, defaultValue) {\r\n\t\treturn typeof value === 'undefined' ? defaultValue : value;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns value at the given `index` in array if defined, else returns `defaultValue`.\r\n\t * @param {Array} value - The array to lookup for value at `index`.\r\n\t * @param {number} index - The index in `value` to lookup for value.\r\n\t * @param {*} defaultValue - The value to return if `value[index]` is undefined.\r\n\t * @returns {*}\r\n\t */\r\n\tvalueAtIndexOrDefault: function(value, index, defaultValue) {\r\n\t\treturn helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue);\r\n\t},\r\n\r\n\t/**\r\n\t * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\r\n\t * value returned by `fn`. If `fn` is not a function, this method returns undefined.\r\n\t * @param {function} fn - The function to call.\r\n\t * @param {Array|undefined|null} args - The arguments with which `fn` should be called.\r\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n\t * @returns {*}\r\n\t */\r\n\tcallback: function(fn, args, thisArg) {\r\n\t\tif (fn && typeof fn.call === 'function') {\r\n\t\t\treturn fn.apply(thisArg, args);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Note(SB) for performance sake, this method should only be used when loopable type\r\n\t * is unknown or in none intensive code (not called often and small loopable). Else\r\n\t * it's preferable to use a regular for() loop and save extra function calls.\r\n\t * @param {object|Array} loopable - The object or array to be iterated.\r\n\t * @param {function} fn - The function to call for each item.\r\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n\t * @param {boolean} [reverse] - If true, iterates backward on the loopable.\r\n\t */\r\n\teach: function(loopable, fn, thisArg, reverse) {\r\n\t\tvar i, len, keys;\r\n\t\tif (helpers.isArray(loopable)) {\r\n\t\t\tlen = loopable.length;\r\n\t\t\tif (reverse) {\r\n\t\t\t\tfor (i = len - 1; i >= 0; i--) {\r\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (helpers.isObject(loopable)) {\r\n\t\t\tkeys = Object.keys(loopable);\r\n\t\t\tlen = keys.length;\r\n\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\tfn.call(thisArg, loopable[keys[i]], keys[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\r\n\t * @see https://stackoverflow.com/a/14853974\r\n\t * @param {Array} a0 - The array to compare\r\n\t * @param {Array} a1 - The array to compare\r\n\t * @returns {boolean}\r\n\t */\r\n\tarrayEquals: function(a0, a1) {\r\n\t\tvar i, ilen, v0, v1;\r\n\r\n\t\tif (!a0 || !a1 || a0.length !== a1.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = a0.length; i < ilen; ++i) {\r\n\t\t\tv0 = a0[i];\r\n\t\t\tv1 = a1[i];\r\n\r\n\t\t\tif (v0 instanceof Array && v1 instanceof Array) {\r\n\t\t\t\tif (!helpers.arrayEquals(v0, v1)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (v0 !== v1) {\r\n\t\t\t\t// NOTE: two different object instances will never be equal: {x:20} != {x:20}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a deep copy of `source` without keeping references on objects and arrays.\r\n\t * @param {*} source - The value to clone.\r\n\t * @returns {*}\r\n\t */\r\n\tclone: function(source) {\r\n\t\tif (helpers.isArray(source)) {\r\n\t\t\treturn source.map(helpers.clone);\r\n\t\t}\r\n\r\n\t\tif (helpers.isObject(source)) {\r\n\t\t\tvar target = Object.create(source);\r\n\t\t\tvar keys = Object.keys(source);\r\n\t\t\tvar klen = keys.length;\r\n\t\t\tvar k = 0;\r\n\r\n\t\t\tfor (; k < klen; ++k) {\r\n\t\t\t\ttarget[keys[k]] = helpers.clone(source[keys[k]]);\r\n\t\t\t}\r\n\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\treturn source;\r\n\t},\r\n\r\n\t/**\r\n\t * The default merger when Chart.helpers.merge is called without merger option.\r\n\t * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\r\n\t * @private\r\n\t */\r\n\t_merger: function(key, target, source, options) {\r\n\t\tif (!isValidKey(key)) {\r\n\t\t\t// We want to ensure we do not copy prototypes over\r\n\t\t\t// as this can pollute global namespaces\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tval = target[key];\r\n\t\tvar sval = source[key];\r\n\r\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\r\n\t\t\thelpers.merge(tval, sval, options);\r\n\t\t} else {\r\n\t\t\ttarget[key] = helpers.clone(sval);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Merges source[key] in target[key] only if target[key] is undefined.\r\n\t * @private\r\n\t */\r\n\t_mergerIf: function(key, target, source) {\r\n\t\tif (!isValidKey(key)) {\r\n\t\t\t// We want to ensure we do not copy prototypes over\r\n\t\t\t// as this can pollute global namespaces\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tval = target[key];\r\n\t\tvar sval = source[key];\r\n\r\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\r\n\t\t\thelpers.mergeIf(tval, sval);\r\n\t\t} else if (!target.hasOwnProperty(key)) {\r\n\t\t\ttarget[key] = helpers.clone(sval);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Recursively deep copies `source` properties into `target` with the given `options`.\r\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n\t * @param {object} target - The target object in which all sources are merged into.\r\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\r\n\t * @param {object} [options] - Merging options:\r\n\t * @param {function} [options.merger] - The merge method (key, target, source, options)\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\tmerge: function(target, source, options) {\r\n\t\tvar sources = helpers.isArray(source) ? source : [source];\r\n\t\tvar ilen = sources.length;\r\n\t\tvar merge, i, keys, klen, k;\r\n\r\n\t\tif (!helpers.isObject(target)) {\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\toptions = options || {};\r\n\t\tmerge = options.merger || helpers._merger;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tsource = sources[i];\r\n\t\t\tif (!helpers.isObject(source)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tkeys = Object.keys(source);\r\n\t\t\tfor (k = 0, klen = keys.length; k < klen; ++k) {\r\n\t\t\t\tmerge(keys[k], target, source, options);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t},\r\n\r\n\t/**\r\n\t * Recursively deep copies `source` properties into `target` *only* if not defined in target.\r\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n\t * @param {object} target - The target object in which all sources are merged into.\r\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\tmergeIf: function(target, source) {\r\n\t\treturn helpers.merge(target, source, {merger: helpers._mergerIf});\r\n\t},\r\n\r\n\t/**\r\n\t * Applies the contents of two or more objects together into the first object.\r\n\t * @param {object} target - The target object in which all objects are merged into.\r\n\t * @param {object} arg1 - Object containing additional properties to merge in target.\r\n\t * @param {object} argN - Additional objects containing properties to merge in target.\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\textend: Object.assign || function(target) {\r\n\t\treturn helpers.merge(target, [].slice.call(arguments, 1), {\r\n\t\t\tmerger: function(key, dst, src) {\r\n\t\t\t\tdst[key] = src[key];\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Basic javascript inheritance based on the model created in Backbone.js\r\n\t */\r\n\tinherits: function(extensions) {\r\n\t\tvar me = this;\r\n\t\tvar ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() {\r\n\t\t\treturn me.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tvar Surrogate = function() {\r\n\t\t\tthis.constructor = ChartElement;\r\n\t\t};\r\n\r\n\t\tSurrogate.prototype = me.prototype;\r\n\t\tChartElement.prototype = new Surrogate();\r\n\t\tChartElement.extend = helpers.inherits;\r\n\r\n\t\tif (extensions) {\r\n\t\t\thelpers.extend(ChartElement.prototype, extensions);\r\n\t\t}\r\n\r\n\t\tChartElement.__super__ = me.prototype;\r\n\t\treturn ChartElement;\r\n\t},\r\n\r\n\t_deprecated: function(scope, value, previous, current) {\r\n\t\tif (value !== undefined) {\r\n\t\t\tconsole.warn(scope + ': \"' + previous +\r\n\t\t\t\t'\" is deprecated. Please use \"' + current + '\" instead');\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar helpers_core = helpers;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.callback instead.\r\n * @function Chart.helpers.callCallback\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.callCallback = helpers.callback;\r\n\r\n/**\r\n * Provided for backward compatibility, use Array.prototype.indexOf instead.\r\n * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+\r\n * @function Chart.helpers.indexOf\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.indexOf = function(array, item, fromIndex) {\r\n\treturn Array.prototype.indexOf.call(array, item, fromIndex);\r\n};\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead.\r\n * @function Chart.helpers.getValueOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.getValueOrDefault = helpers.valueOrDefault;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead.\r\n * @function Chart.helpers.getValueAtIndexOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault;\n\n/**\r\n * Easing functions adapted from Robert Penner's easing equations.\r\n * @namespace Chart.helpers.easingEffects\r\n * @see http://www.robertpenner.com/easing/\r\n */\r\nvar effects = {\r\n\tlinear: function(t) {\r\n\t\treturn t;\r\n\t},\r\n\r\n\teaseInQuad: function(t) {\r\n\t\treturn t * t;\r\n\t},\r\n\r\n\teaseOutQuad: function(t) {\r\n\t\treturn -t * (t - 2);\r\n\t},\r\n\r\n\teaseInOutQuad: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t;\r\n\t\t}\r\n\t\treturn -0.5 * ((--t) * (t - 2) - 1);\r\n\t},\r\n\r\n\teaseInCubic: function(t) {\r\n\t\treturn t * t * t;\r\n\t},\r\n\r\n\teaseOutCubic: function(t) {\r\n\t\treturn (t = t - 1) * t * t + 1;\r\n\t},\r\n\r\n\teaseInOutCubic: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t;\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * t + 2);\r\n\t},\r\n\r\n\teaseInQuart: function(t) {\r\n\t\treturn t * t * t * t;\r\n\t},\r\n\r\n\teaseOutQuart: function(t) {\r\n\t\treturn -((t = t - 1) * t * t * t - 1);\r\n\t},\r\n\r\n\teaseInOutQuart: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t * t;\r\n\t\t}\r\n\t\treturn -0.5 * ((t -= 2) * t * t * t - 2);\r\n\t},\r\n\r\n\teaseInQuint: function(t) {\r\n\t\treturn t * t * t * t * t;\r\n\t},\r\n\r\n\teaseOutQuint: function(t) {\r\n\t\treturn (t = t - 1) * t * t * t * t + 1;\r\n\t},\r\n\r\n\teaseInOutQuint: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t * t * t;\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * t * t * t + 2);\r\n\t},\r\n\r\n\teaseInSine: function(t) {\r\n\t\treturn -Math.cos(t * (Math.PI / 2)) + 1;\r\n\t},\r\n\r\n\teaseOutSine: function(t) {\r\n\t\treturn Math.sin(t * (Math.PI / 2));\r\n\t},\r\n\r\n\teaseInOutSine: function(t) {\r\n\t\treturn -0.5 * (Math.cos(Math.PI * t) - 1);\r\n\t},\r\n\r\n\teaseInExpo: function(t) {\r\n\t\treturn (t === 0) ? 0 : Math.pow(2, 10 * (t - 1));\r\n\t},\r\n\r\n\teaseOutExpo: function(t) {\r\n\t\treturn (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1;\r\n\t},\r\n\r\n\teaseInOutExpo: function(t) {\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * Math.pow(2, 10 * (t - 1));\r\n\t\t}\r\n\t\treturn 0.5 * (-Math.pow(2, -10 * --t) + 2);\r\n\t},\r\n\r\n\teaseInCirc: function(t) {\r\n\t\tif (t >= 1) {\r\n\t\t\treturn t;\r\n\t\t}\r\n\t\treturn -(Math.sqrt(1 - t * t) - 1);\r\n\t},\r\n\r\n\teaseOutCirc: function(t) {\r\n\t\treturn Math.sqrt(1 - (t = t - 1) * t);\r\n\t},\r\n\r\n\teaseInOutCirc: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn -0.5 * (Math.sqrt(1 - t * t) - 1);\r\n\t\t}\r\n\t\treturn 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\r\n\t},\r\n\r\n\teaseInElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.3;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\treturn -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\r\n\t},\r\n\r\n\teaseOutElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.3;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\treturn a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1;\r\n\t},\r\n\r\n\teaseInOutElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif ((t /= 0.5) === 2) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.45;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\tif (t < 1) {\r\n\t\t\treturn -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\r\n\t\t}\r\n\t\treturn a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1;\r\n\t},\r\n\teaseInBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\treturn t * t * ((s + 1) * t - s);\r\n\t},\r\n\r\n\teaseOutBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\treturn (t = t - 1) * t * ((s + 1) * t + s) + 1;\r\n\t},\r\n\r\n\teaseInOutBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\r\n\t},\r\n\r\n\teaseInBounce: function(t) {\r\n\t\treturn 1 - effects.easeOutBounce(1 - t);\r\n\t},\r\n\r\n\teaseOutBounce: function(t) {\r\n\t\tif (t < (1 / 2.75)) {\r\n\t\t\treturn 7.5625 * t * t;\r\n\t\t}\r\n\t\tif (t < (2 / 2.75)) {\r\n\t\t\treturn 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75;\r\n\t\t}\r\n\t\tif (t < (2.5 / 2.75)) {\r\n\t\t\treturn 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375;\r\n\t\t}\r\n\t\treturn 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375;\r\n\t},\r\n\r\n\teaseInOutBounce: function(t) {\r\n\t\tif (t < 0.5) {\r\n\t\t\treturn effects.easeInBounce(t * 2) * 0.5;\r\n\t\t}\r\n\t\treturn effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5;\r\n\t}\r\n};\r\n\r\nvar helpers_easing = {\r\n\teffects: effects\r\n};\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.easing.effects instead.\r\n * @function Chart.helpers.easingEffects\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.easingEffects = effects;\n\nvar PI = Math.PI;\r\nvar RAD_PER_DEG = PI / 180;\r\nvar DOUBLE_PI = PI * 2;\r\nvar HALF_PI = PI / 2;\r\nvar QUARTER_PI = PI / 4;\r\nvar TWO_THIRDS_PI = PI * 2 / 3;\r\n\r\n/**\r\n * @namespace Chart.helpers.canvas\r\n */\r\nvar exports$1 = {\r\n\t/**\r\n\t * Clears the entire canvas associated to the given `chart`.\r\n\t * @param {Chart} chart - The chart for which to clear the canvas.\r\n\t */\r\n\tclear: function(chart) {\r\n\t\tchart.ctx.clearRect(0, 0, chart.width, chart.height);\r\n\t},\r\n\r\n\t/**\r\n\t * Creates a \"path\" for a rectangle with rounded corners at position (x, y) with a\r\n\t * given size (width, height) and the same `radius` for all corners.\r\n\t * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context.\r\n\t * @param {number} x - The x axis of the coordinate for the rectangle starting point.\r\n\t * @param {number} y - The y axis of the coordinate for the rectangle starting point.\r\n\t * @param {number} width - The rectangle's width.\r\n\t * @param {number} height - The rectangle's height.\r\n\t * @param {number} radius - The rounded amount (in pixels) for the four corners.\r\n\t * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object?\r\n\t */\r\n\troundedRect: function(ctx, x, y, width, height, radius) {\r\n\t\tif (radius) {\r\n\t\t\tvar r = Math.min(radius, height / 2, width / 2);\r\n\t\t\tvar left = x + r;\r\n\t\t\tvar top = y + r;\r\n\t\t\tvar right = x + width - r;\r\n\t\t\tvar bottom = y + height - r;\r\n\r\n\t\t\tctx.moveTo(x, top);\r\n\t\t\tif (left < right && top < bottom) {\r\n\t\t\t\tctx.arc(left, top, r, -PI, -HALF_PI);\r\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, 0);\r\n\t\t\t\tctx.arc(right, bottom, r, 0, HALF_PI);\r\n\t\t\t\tctx.arc(left, bottom, r, HALF_PI, PI);\r\n\t\t\t} else if (left < right) {\r\n\t\t\t\tctx.moveTo(left, y);\r\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, HALF_PI);\r\n\t\t\t\tctx.arc(left, top, r, HALF_PI, PI + HALF_PI);\r\n\t\t\t} else if (top < bottom) {\r\n\t\t\t\tctx.arc(left, top, r, -PI, 0);\r\n\t\t\t\tctx.arc(left, bottom, r, 0, PI);\r\n\t\t\t} else {\r\n\t\t\t\tctx.arc(left, top, r, -PI, PI);\r\n\t\t\t}\r\n\t\t\tctx.closePath();\r\n\t\t\tctx.moveTo(x, y);\r\n\t\t} else {\r\n\t\t\tctx.rect(x, y, width, height);\r\n\t\t}\r\n\t},\r\n\r\n\tdrawPoint: function(ctx, style, radius, x, y, rotation) {\r\n\t\tvar type, xOffset, yOffset, size, cornerRadius;\r\n\t\tvar rad = (rotation || 0) * RAD_PER_DEG;\r\n\r\n\t\tif (style && typeof style === 'object') {\r\n\t\t\ttype = style.toString();\r\n\t\t\tif (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\r\n\t\t\t\tctx.save();\r\n\t\t\t\tctx.translate(x, y);\r\n\t\t\t\tctx.rotate(rad);\r\n\t\t\t\tctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\r\n\t\t\t\tctx.restore();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isNaN(radius) || radius <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.beginPath();\r\n\r\n\t\tswitch (style) {\r\n\t\t// Default includes circle\r\n\t\tdefault:\r\n\t\t\tctx.arc(x, y, radius, 0, DOUBLE_PI);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'triangle':\r\n\t\t\tctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\trad += TWO_THIRDS_PI;\r\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\trad += TWO_THIRDS_PI;\r\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'rectRounded':\r\n\t\t\t// NOTE: the rounded rect implementation changed to use `arc` instead of\r\n\t\t\t// `quadraticCurveTo` since it generates better results when rect is\r\n\t\t\t// almost a circle. 0.516 (instead of 0.5) produces results with visually\r\n\t\t\t// closer proportion to the previous impl and it is inscribed in the\r\n\t\t\t// circle with `radius`. For more details, see the following PRs:\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5597\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5858\r\n\t\t\tcornerRadius = radius * 0.516;\r\n\t\t\tsize = radius - cornerRadius;\r\n\t\t\txOffset = Math.cos(rad + QUARTER_PI) * size;\r\n\t\t\tyOffset = Math.sin(rad + QUARTER_PI) * size;\r\n\t\t\tctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\r\n\t\t\tctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);\r\n\t\t\tctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);\r\n\t\t\tctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'rect':\r\n\t\t\tif (!rotation) {\r\n\t\t\t\tsize = Math.SQRT1_2 * radius;\r\n\t\t\t\tctx.rect(x - size, y - size, 2 * size, 2 * size);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\t/* falls through */\r\n\t\tcase 'rectRot':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'crossRot':\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\t/* falls through */\r\n\t\tcase 'cross':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'star':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'line':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'dash':\r\n\t\t\tctx.moveTo(x, y);\r\n\t\t\tctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tctx.fill();\r\n\t\tctx.stroke();\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if the point is inside the rectangle\r\n\t * @param {object} point - The point to test\r\n\t * @param {object} area - The rectangle\r\n\t * @returns {boolean}\r\n\t * @private\r\n\t */\r\n\t_isPointInArea: function(point, area) {\r\n\t\tvar epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.\r\n\r\n\t\treturn point.x > area.left - epsilon && point.x < area.right + epsilon &&\r\n\t\t\tpoint.y > area.top - epsilon && point.y < area.bottom + epsilon;\r\n\t},\r\n\r\n\tclipArea: function(ctx, area) {\r\n\t\tctx.save();\r\n\t\tctx.beginPath();\r\n\t\tctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\r\n\t\tctx.clip();\r\n\t},\r\n\r\n\tunclipArea: function(ctx) {\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\tlineTo: function(ctx, previous, target, flip) {\r\n\t\tvar stepped = target.steppedLine;\r\n\t\tif (stepped) {\r\n\t\t\tif (stepped === 'middle') {\r\n\t\t\t\tvar midpoint = (previous.x + target.x) / 2.0;\r\n\t\t\t\tctx.lineTo(midpoint, flip ? target.y : previous.y);\r\n\t\t\t\tctx.lineTo(midpoint, flip ? previous.y : target.y);\r\n\t\t\t} else if ((stepped === 'after' && !flip) || (stepped !== 'after' && flip)) {\r\n\t\t\t\tctx.lineTo(previous.x, target.y);\r\n\t\t\t} else {\r\n\t\t\t\tctx.lineTo(target.x, previous.y);\r\n\t\t\t}\r\n\t\t\tctx.lineTo(target.x, target.y);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!target.tension) {\r\n\t\t\tctx.lineTo(target.x, target.y);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.bezierCurveTo(\r\n\t\t\tflip ? previous.controlPointPreviousX : previous.controlPointNextX,\r\n\t\t\tflip ? previous.controlPointPreviousY : previous.controlPointNextY,\r\n\t\t\tflip ? target.controlPointNextX : target.controlPointPreviousX,\r\n\t\t\tflip ? target.controlPointNextY : target.controlPointPreviousY,\r\n\t\t\ttarget.x,\r\n\t\t\ttarget.y);\r\n\t}\r\n};\r\n\r\nvar helpers_canvas = exports$1;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.clear instead.\r\n * @namespace Chart.helpers.clear\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.clear = exports$1.clear;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead.\r\n * @namespace Chart.helpers.drawRoundedRectangle\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.drawRoundedRectangle = function(ctx) {\r\n\tctx.beginPath();\r\n\texports$1.roundedRect.apply(exports$1, arguments);\r\n};\n\nvar defaults = {\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_set: function(scope, values) {\r\n\t\treturn helpers_core.merge(this[scope] || (this[scope] = {}), values);\r\n\t}\r\n};\r\n\r\n// TODO(v3): remove 'global' from namespace. all default are global and\r\n// there's inconsistency around which options are under 'global'\r\ndefaults._set('global', {\r\n\tdefaultColor: 'rgba(0,0,0,0.1)',\r\n\tdefaultFontColor: '#666',\r\n\tdefaultFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\r\n\tdefaultFontSize: 12,\r\n\tdefaultFontStyle: 'normal',\r\n\tdefaultLineHeight: 1.2,\r\n\tshowLines: true\r\n});\r\n\r\nvar core_defaults = defaults;\n\nvar valueOrDefault = helpers_core.valueOrDefault;\r\n\r\n/**\r\n * Converts the given font object into a CSS font string.\r\n * @param {object} font - A font object.\r\n * @return {string} The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\r\n * @private\r\n */\r\nfunction toFontString(font) {\r\n\tif (!font || helpers_core.isNullOrUndef(font.size) || helpers_core.isNullOrUndef(font.family)) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (font.style ? font.style + ' ' : '')\r\n\t\t+ (font.weight ? font.weight + ' ' : '')\r\n\t\t+ font.size + 'px '\r\n\t\t+ font.family;\r\n}\r\n\r\n/**\r\n * @alias Chart.helpers.options\r\n * @namespace\r\n */\r\nvar helpers_options = {\r\n\t/**\r\n\t * Converts the given line height `value` in pixels for a specific font `size`.\r\n\t * @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\r\n\t * @param {number} size - The font size (in pixels) used to resolve relative `value`.\r\n\t * @returns {number} The effective line height in pixels (size * 1.2 if value is invalid).\r\n\t * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\r\n\t * @since 2.7.0\r\n\t */\r\n\ttoLineHeight: function(value, size) {\r\n\t\tvar matches = ('' + value).match(/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/);\r\n\t\tif (!matches || matches[1] === 'normal') {\r\n\t\t\treturn size * 1.2;\r\n\t\t}\r\n\r\n\t\tvalue = +matches[2];\r\n\r\n\t\tswitch (matches[3]) {\r\n\t\tcase 'px':\r\n\t\t\treturn value;\r\n\t\tcase '%':\r\n\t\t\tvalue /= 100;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn size * value;\r\n\t},\r\n\r\n\t/**\r\n\t * Converts the given value into a padding object with pre-computed width/height.\r\n\t * @param {number|object} value - If a number, set the value to all TRBL component,\r\n\t * else, if and object, use defined properties and sets undefined ones to 0.\r\n\t * @returns {object} The padding values (top, right, bottom, left, width, height)\r\n\t * @since 2.7.0\r\n\t */\r\n\ttoPadding: function(value) {\r\n\t\tvar t, r, b, l;\r\n\r\n\t\tif (helpers_core.isObject(value)) {\r\n\t\t\tt = +value.top || 0;\r\n\t\t\tr = +value.right || 0;\r\n\t\t\tb = +value.bottom || 0;\r\n\t\t\tl = +value.left || 0;\r\n\t\t} else {\r\n\t\t\tt = r = b = l = +value || 0;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttop: t,\r\n\t\t\tright: r,\r\n\t\t\tbottom: b,\r\n\t\t\tleft: l,\r\n\t\t\theight: t + b,\r\n\t\t\twidth: l + r\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Parses font options and returns the font object.\r\n\t * @param {object} options - A object that contains font options to be parsed.\r\n\t * @return {object} The font object.\r\n\t * @todo Support font.* options and renamed to toFont().\r\n\t * @private\r\n\t */\r\n\t_parseFont: function(options) {\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize);\r\n\t\tvar font = {\r\n\t\t\tfamily: valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily),\r\n\t\t\tlineHeight: helpers_core.options.toLineHeight(valueOrDefault(options.lineHeight, globalDefaults.defaultLineHeight), size),\r\n\t\t\tsize: size,\r\n\t\t\tstyle: valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle),\r\n\t\t\tweight: null,\r\n\t\t\tstring: ''\r\n\t\t};\r\n\r\n\t\tfont.string = toFontString(font);\r\n\t\treturn font;\r\n\t},\r\n\r\n\t/**\r\n\t * Evaluates the given `inputs` sequentially and returns the first defined value.\r\n\t * @param {Array} inputs - An array of values, falling back to the last value.\r\n\t * @param {object} [context] - If defined and the current value is a function, the value\r\n\t * is called with `context` as first argument and the result becomes the new input.\r\n\t * @param {number} [index] - If defined and the current value is an array, the value\r\n\t * at `index` become the new input.\r\n\t * @param {object} [info] - object to return information about resolution in\r\n\t * @param {boolean} [info.cacheable] - Will be set to `false` if option is not cacheable.\r\n\t * @since 2.7.0\r\n\t */\r\n\tresolve: function(inputs, context, index, info) {\r\n\t\tvar cacheable = true;\r\n\t\tvar i, ilen, value;\r\n\r\n\t\tfor (i = 0, ilen = inputs.length; i < ilen; ++i) {\r\n\t\t\tvalue = inputs[i];\r\n\t\t\tif (value === undefined) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (context !== undefined && typeof value === 'function') {\r\n\t\t\t\tvalue = value(context);\r\n\t\t\t\tcacheable = false;\r\n\t\t\t}\r\n\t\t\tif (index !== undefined && helpers_core.isArray(value)) {\r\n\t\t\t\tvalue = value[index];\r\n\t\t\t\tcacheable = false;\r\n\t\t\t}\r\n\t\t\tif (value !== undefined) {\r\n\t\t\t\tif (info && !cacheable) {\r\n\t\t\t\t\tinfo.cacheable = false;\r\n\t\t\t\t}\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\n/**\r\n * @alias Chart.helpers.math\r\n * @namespace\r\n */\r\nvar exports$2 = {\r\n\t/**\r\n\t * Returns an array of factors sorted from 1 to sqrt(value)\r\n\t * @private\r\n\t */\r\n\t_factorize: function(value) {\r\n\t\tvar result = [];\r\n\t\tvar sqrt = Math.sqrt(value);\r\n\t\tvar i;\r\n\r\n\t\tfor (i = 1; i < sqrt; i++) {\r\n\t\t\tif (value % i === 0) {\r\n\t\t\t\tresult.push(i);\r\n\t\t\t\tresult.push(value / i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (sqrt === (sqrt | 0)) { // if value is a square number\r\n\t\t\tresult.push(sqrt);\r\n\t\t}\r\n\r\n\t\tresult.sort(function(a, b) {\r\n\t\t\treturn a - b;\r\n\t\t}).pop();\r\n\t\treturn result;\r\n\t},\r\n\r\n\tlog10: Math.log10 || function(x) {\r\n\t\tvar exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10.\r\n\t\t// Check for whole powers of 10,\r\n\t\t// which due to floating point rounding error should be corrected.\r\n\t\tvar powerOf10 = Math.round(exponent);\r\n\t\tvar isPowerOf10 = x === Math.pow(10, powerOf10);\r\n\r\n\t\treturn isPowerOf10 ? powerOf10 : exponent;\r\n\t}\r\n};\r\n\r\nvar helpers_math = exports$2;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.math.log10 instead.\r\n * @namespace Chart.helpers.log10\r\n * @deprecated since version 2.9.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.log10 = exports$2.log10;\n\nvar getRtlAdapter = function(rectX, width) {\r\n\treturn {\r\n\t\tx: function(x) {\r\n\t\t\treturn rectX + rectX + width - x;\r\n\t\t},\r\n\t\tsetWidth: function(w) {\r\n\t\t\twidth = w;\r\n\t\t},\r\n\t\ttextAlign: function(align) {\r\n\t\t\tif (align === 'center') {\r\n\t\t\t\treturn align;\r\n\t\t\t}\r\n\t\t\treturn align === 'right' ? 'left' : 'right';\r\n\t\t},\r\n\t\txPlus: function(x, value) {\r\n\t\t\treturn x - value;\r\n\t\t},\r\n\t\tleftForLtr: function(x, itemWidth) {\r\n\t\t\treturn x - itemWidth;\r\n\t\t},\r\n\t};\r\n};\r\n\r\nvar getLtrAdapter = function() {\r\n\treturn {\r\n\t\tx: function(x) {\r\n\t\t\treturn x;\r\n\t\t},\r\n\t\tsetWidth: function(w) { // eslint-disable-line no-unused-vars\r\n\t\t},\r\n\t\ttextAlign: function(align) {\r\n\t\t\treturn align;\r\n\t\t},\r\n\t\txPlus: function(x, value) {\r\n\t\t\treturn x + value;\r\n\t\t},\r\n\t\tleftForLtr: function(x, _itemWidth) { // eslint-disable-line no-unused-vars\r\n\t\t\treturn x;\r\n\t\t},\r\n\t};\r\n};\r\n\r\nvar getAdapter = function(rtl, rectX, width) {\r\n\treturn rtl ? getRtlAdapter(rectX, width) : getLtrAdapter();\r\n};\r\n\r\nvar overrideTextDirection = function(ctx, direction) {\r\n\tvar style, original;\r\n\tif (direction === 'ltr' || direction === 'rtl') {\r\n\t\tstyle = ctx.canvas.style;\r\n\t\toriginal = [\r\n\t\t\tstyle.getPropertyValue('direction'),\r\n\t\t\tstyle.getPropertyPriority('direction'),\r\n\t\t];\r\n\r\n\t\tstyle.setProperty('direction', direction, 'important');\r\n\t\tctx.prevTextDirection = original;\r\n\t}\r\n};\r\n\r\nvar restoreTextDirection = function(ctx) {\r\n\tvar original = ctx.prevTextDirection;\r\n\tif (original !== undefined) {\r\n\t\tdelete ctx.prevTextDirection;\r\n\t\tctx.canvas.style.setProperty('direction', original[0], original[1]);\r\n\t}\r\n};\r\n\r\nvar helpers_rtl = {\r\n\tgetRtlAdapter: getAdapter,\r\n\toverrideTextDirection: overrideTextDirection,\r\n\trestoreTextDirection: restoreTextDirection,\r\n};\n\nvar helpers$1 = helpers_core;\r\nvar easing = helpers_easing;\r\nvar canvas = helpers_canvas;\r\nvar options = helpers_options;\r\nvar math = helpers_math;\r\nvar rtl = helpers_rtl;\nhelpers$1.easing = easing;\nhelpers$1.canvas = canvas;\nhelpers$1.options = options;\nhelpers$1.math = math;\nhelpers$1.rtl = rtl;\n\nfunction interpolate(start, view, model, ease) {\r\n\tvar keys = Object.keys(model);\r\n\tvar i, ilen, key, actual, origin, target, type, c0, c1;\r\n\r\n\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\tkey = keys[i];\r\n\r\n\t\ttarget = model[key];\r\n\r\n\t\t// if a value is added to the model after pivot() has been called, the view\r\n\t\t// doesn't contain it, so let's initialize the view to the target value.\r\n\t\tif (!view.hasOwnProperty(key)) {\r\n\t\t\tview[key] = target;\r\n\t\t}\r\n\r\n\t\tactual = view[key];\r\n\r\n\t\tif (actual === target || key[0] === '_') {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!start.hasOwnProperty(key)) {\r\n\t\t\tstart[key] = actual;\r\n\t\t}\r\n\r\n\t\torigin = start[key];\r\n\r\n\t\ttype = typeof target;\r\n\r\n\t\tif (type === typeof origin) {\r\n\t\t\tif (type === 'string') {\r\n\t\t\t\tc0 = chartjsColor(origin);\r\n\t\t\t\tif (c0.valid) {\r\n\t\t\t\t\tc1 = chartjsColor(target);\r\n\t\t\t\t\tif (c1.valid) {\r\n\t\t\t\t\t\tview[key] = c1.mix(c0, ease).rgbString();\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (helpers$1.isFinite(origin) && helpers$1.isFinite(target)) {\r\n\t\t\t\tview[key] = origin + (target - origin) * ease;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tview[key] = target;\r\n\t}\r\n}\r\n\r\nvar Element = function(configuration) {\r\n\thelpers$1.extend(this, configuration);\r\n\tthis.initialize.apply(this, arguments);\r\n};\r\n\r\nhelpers$1.extend(Element.prototype, {\r\n\t_type: undefined,\r\n\r\n\tinitialize: function() {\r\n\t\tthis.hidden = false;\r\n\t},\r\n\r\n\tpivot: function() {\r\n\t\tvar me = this;\r\n\t\tif (!me._view) {\r\n\t\t\tme._view = helpers$1.extend({}, me._model);\r\n\t\t}\r\n\t\tme._start = {};\r\n\t\treturn me;\r\n\t},\r\n\r\n\ttransition: function(ease) {\r\n\t\tvar me = this;\r\n\t\tvar model = me._model;\r\n\t\tvar start = me._start;\r\n\t\tvar view = me._view;\r\n\r\n\t\t// No animation -> No Transition\r\n\t\tif (!model || ease === 1) {\r\n\t\t\tme._view = helpers$1.extend({}, model);\r\n\t\t\tme._start = null;\r\n\t\t\treturn me;\r\n\t\t}\r\n\r\n\t\tif (!view) {\r\n\t\t\tview = me._view = {};\r\n\t\t}\r\n\r\n\t\tif (!start) {\r\n\t\t\tstart = me._start = {};\r\n\t\t}\r\n\r\n\t\tinterpolate(start, view, model, ease);\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\treturn {\r\n\t\t\tx: this._model.x,\r\n\t\t\ty: this._model.y\r\n\t\t};\r\n\t},\r\n\r\n\thasValue: function() {\r\n\t\treturn helpers$1.isNumber(this._model.x) && helpers$1.isNumber(this._model.y);\r\n\t}\r\n});\r\n\r\nElement.extend = helpers$1.inherits;\r\n\r\nvar core_element = Element;\n\nvar exports$3 = core_element.extend({\r\n\tchart: null, // the animation associated chart instance\r\n\tcurrentStep: 0, // the current animation step\r\n\tnumSteps: 60, // default number of steps\r\n\teasing: '', // the easing to use for this animation\r\n\trender: null, // render function used by the animation service\r\n\r\n\tonAnimationProgress: null, // user specified callback to fire on each step of the animation\r\n\tonAnimationComplete: null, // user specified callback to fire when the animation finishes\r\n});\r\n\r\nvar core_animation = exports$3;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.Animation instead\r\n * @prop Chart.Animation#animationObject\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\r\nObject.defineProperty(exports$3.prototype, 'animationObject', {\r\n\tget: function() {\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.Animation#chart instead\r\n * @prop Chart.Animation#chartInstance\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\r\nObject.defineProperty(exports$3.prototype, 'chartInstance', {\r\n\tget: function() {\r\n\t\treturn this.chart;\r\n\t},\r\n\tset: function(value) {\r\n\t\tthis.chart = value;\r\n\t}\r\n});\n\ncore_defaults._set('global', {\r\n\tanimation: {\r\n\t\tduration: 1000,\r\n\t\teasing: 'easeOutQuart',\r\n\t\tonProgress: helpers$1.noop,\r\n\t\tonComplete: helpers$1.noop\r\n\t}\r\n});\r\n\r\nvar core_animations = {\r\n\tanimations: [],\r\n\trequest: null,\r\n\r\n\t/**\r\n\t * @param {Chart} chart - The chart to animate.\r\n\t * @param {Chart.Animation} animation - The animation that we will animate.\r\n\t * @param {number} duration - The animation duration in ms.\r\n\t * @param {boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions\r\n\t */\r\n\taddAnimation: function(chart, animation, duration, lazy) {\r\n\t\tvar animations = this.animations;\r\n\t\tvar i, ilen;\r\n\r\n\t\tanimation.chart = chart;\r\n\t\tanimation.startTime = Date.now();\r\n\t\tanimation.duration = duration;\r\n\r\n\t\tif (!lazy) {\r\n\t\t\tchart.animating = true;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = animations.length; i < ilen; ++i) {\r\n\t\t\tif (animations[i].chart === chart) {\r\n\t\t\t\tanimations[i] = animation;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tanimations.push(animation);\r\n\r\n\t\t// If there are no animations queued, manually kickstart a digest, for lack of a better word\r\n\t\tif (animations.length === 1) {\r\n\t\t\tthis.requestAnimationFrame();\r\n\t\t}\r\n\t},\r\n\r\n\tcancelAnimation: function(chart) {\r\n\t\tvar index = helpers$1.findIndex(this.animations, function(animation) {\r\n\t\t\treturn animation.chart === chart;\r\n\t\t});\r\n\r\n\t\tif (index !== -1) {\r\n\t\t\tthis.animations.splice(index, 1);\r\n\t\t\tchart.animating = false;\r\n\t\t}\r\n\t},\r\n\r\n\trequestAnimationFrame: function() {\r\n\t\tvar me = this;\r\n\t\tif (me.request === null) {\r\n\t\t\t// Skip animation frame requests until the active one is executed.\r\n\t\t\t// This can happen when processing mouse events, e.g. 'mousemove'\r\n\t\t\t// and 'mouseout' events will trigger multiple renders.\r\n\t\t\tme.request = helpers$1.requestAnimFrame.call(window, function() {\r\n\t\t\t\tme.request = null;\r\n\t\t\t\tme.startDigest();\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tstartDigest: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tme.advance();\r\n\r\n\t\t// Do we have more stuff to animate?\r\n\t\tif (me.animations.length > 0) {\r\n\t\t\tme.requestAnimationFrame();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tadvance: function() {\r\n\t\tvar animations = this.animations;\r\n\t\tvar animation, chart, numSteps, nextStep;\r\n\t\tvar i = 0;\r\n\r\n\t\t// 1 animation per chart, so we are looping charts here\r\n\t\twhile (i < animations.length) {\r\n\t\t\tanimation = animations[i];\r\n\t\t\tchart = animation.chart;\r\n\t\t\tnumSteps = animation.numSteps;\r\n\r\n\t\t\t// Make sure that currentStep starts at 1\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/6104\r\n\t\t\tnextStep = Math.floor((Date.now() - animation.startTime) / animation.duration * numSteps) + 1;\r\n\t\t\tanimation.currentStep = Math.min(nextStep, numSteps);\r\n\r\n\t\t\thelpers$1.callback(animation.render, [chart, animation], chart);\r\n\t\t\thelpers$1.callback(animation.onAnimationProgress, [animation], chart);\r\n\r\n\t\t\tif (animation.currentStep >= numSteps) {\r\n\t\t\t\thelpers$1.callback(animation.onAnimationComplete, [animation], chart);\r\n\t\t\t\tchart.animating = false;\r\n\t\t\t\tanimations.splice(i, 1);\r\n\t\t\t} else {\r\n\t\t\t\t++i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\nvar resolve = helpers$1.options.resolve;\r\n\r\nvar arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];\r\n\r\n/**\r\n * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',\r\n * 'unshift') and notify the listener AFTER the array has been altered. Listeners are\r\n * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments.\r\n */\r\nfunction listenArrayEvents(array, listener) {\r\n\tif (array._chartjs) {\r\n\t\tarray._chartjs.listeners.push(listener);\r\n\t\treturn;\r\n\t}\r\n\r\n\tObject.defineProperty(array, '_chartjs', {\r\n\t\tconfigurable: true,\r\n\t\tenumerable: false,\r\n\t\tvalue: {\r\n\t\t\tlisteners: [listener]\r\n\t\t}\r\n\t});\r\n\r\n\tarrayEvents.forEach(function(key) {\r\n\t\tvar method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1);\r\n\t\tvar base = array[key];\r\n\r\n\t\tObject.defineProperty(array, key, {\r\n\t\t\tconfigurable: true,\r\n\t\t\tenumerable: false,\r\n\t\t\tvalue: function() {\r\n\t\t\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\t\t\tvar res = base.apply(this, args);\r\n\r\n\t\t\t\thelpers$1.each(array._chartjs.listeners, function(object) {\r\n\t\t\t\t\tif (typeof object[method] === 'function') {\r\n\t\t\t\t\t\tobject[method].apply(object, args);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Removes the given array event listener and cleanup extra attached properties (such as\r\n * the _chartjs stub and overridden methods) if array doesn't have any more listeners.\r\n */\r\nfunction unlistenArrayEvents(array, listener) {\r\n\tvar stub = array._chartjs;\r\n\tif (!stub) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar listeners = stub.listeners;\r\n\tvar index = listeners.indexOf(listener);\r\n\tif (index !== -1) {\r\n\t\tlisteners.splice(index, 1);\r\n\t}\r\n\r\n\tif (listeners.length > 0) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tarrayEvents.forEach(function(key) {\r\n\t\tdelete array[key];\r\n\t});\r\n\r\n\tdelete array._chartjs;\r\n}\r\n\r\n// Base class for all dataset controllers (line, bar, etc)\r\nvar DatasetController = function(chart, datasetIndex) {\r\n\tthis.initialize(chart, datasetIndex);\r\n};\r\n\r\nhelpers$1.extend(DatasetController.prototype, {\r\n\r\n\t/**\r\n\t * Element type used to generate a meta dataset (e.g. Chart.element.Line).\r\n\t * @type {Chart.core.element}\r\n\t */\r\n\tdatasetElementType: null,\r\n\r\n\t/**\r\n\t * Element type used to generate a meta data (e.g. Chart.element.Point).\r\n\t * @type {Chart.core.element}\r\n\t */\r\n\tdataElementType: null,\r\n\r\n\t/**\r\n\t * Dataset element option keys to be resolved in _resolveDatasetElementOptions.\r\n\t * A derived controller may override this to resolve controller-specific options.\r\n\t * The keys defined here are for backward compatibility for legend styles.\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderColor',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'borderWidth'\r\n\t],\r\n\r\n\t/**\r\n\t * Data element option keys to be resolved in _resolveDataElementOptions.\r\n\t * A derived controller may override this to resolve controller-specific options.\r\n\t * The keys defined here are for backward compatibility for legend styles.\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'pointStyle'\r\n\t],\r\n\r\n\tinitialize: function(chart, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tme.chart = chart;\r\n\t\tme.index = datasetIndex;\r\n\t\tme.linkScales();\r\n\t\tme.addElements();\r\n\t\tme._type = me.getMeta().type;\r\n\t},\r\n\r\n\tupdateIndex: function(datasetIndex) {\r\n\t\tthis.index = datasetIndex;\r\n\t},\r\n\r\n\tlinkScales: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar chart = me.chart;\r\n\t\tvar scales = chart.scales;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar scalesOpts = chart.options.scales;\r\n\r\n\t\tif (meta.xAxisID === null || !(meta.xAxisID in scales) || dataset.xAxisID) {\r\n\t\t\tmeta.xAxisID = dataset.xAxisID || scalesOpts.xAxes[0].id;\r\n\t\t}\r\n\t\tif (meta.yAxisID === null || !(meta.yAxisID in scales) || dataset.yAxisID) {\r\n\t\t\tmeta.yAxisID = dataset.yAxisID || scalesOpts.yAxes[0].id;\r\n\t\t}\r\n\t},\r\n\r\n\tgetDataset: function() {\r\n\t\treturn this.chart.data.datasets[this.index];\r\n\t},\r\n\r\n\tgetMeta: function() {\r\n\t\treturn this.chart.getDatasetMeta(this.index);\r\n\t},\r\n\r\n\tgetScaleForId: function(scaleID) {\r\n\t\treturn this.chart.scales[scaleID];\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.getMeta().yAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.getMeta().xAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScale: function() {\r\n\t\treturn this.getScaleForId(this._getValueScaleId());\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScale: function() {\r\n\t\treturn this.getScaleForId(this._getIndexScaleId());\r\n\t},\r\n\r\n\treset: function() {\r\n\t\tthis._update(true);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tdestroy: function() {\r\n\t\tif (this._data) {\r\n\t\t\tunlistenArrayEvents(this._data, this);\r\n\t\t}\r\n\t},\r\n\r\n\tcreateMetaDataset: function() {\r\n\t\tvar me = this;\r\n\t\tvar type = me.datasetElementType;\r\n\t\treturn type && new type({\r\n\t\t\t_chart: me.chart,\r\n\t\t\t_datasetIndex: me.index\r\n\t\t});\r\n\t},\r\n\r\n\tcreateMetaData: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar type = me.dataElementType;\r\n\t\treturn type && new type({\r\n\t\t\t_chart: me.chart,\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index\r\n\t\t});\r\n\t},\r\n\r\n\taddElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar data = me.getDataset().data || [];\r\n\t\tvar metaData = meta.data;\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = data.length; i < ilen; ++i) {\r\n\t\t\tmetaData[i] = metaData[i] || me.createMetaData(i);\r\n\t\t}\r\n\r\n\t\tmeta.dataset = meta.dataset || me.createMetaDataset();\r\n\t},\r\n\r\n\taddElementAndReset: function(index) {\r\n\t\tvar element = this.createMetaData(index);\r\n\t\tthis.getMeta().data.splice(index, 0, element);\r\n\t\tthis.updateElement(element, index, true);\r\n\t},\r\n\r\n\tbuildOrUpdateElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar data = dataset.data || (dataset.data = []);\r\n\r\n\t\t// In order to correctly handle data addition/deletion animation (an thus simulate\r\n\t\t// real-time charts), we need to monitor these data modifications and synchronize\r\n\t\t// the internal meta data accordingly.\r\n\t\tif (me._data !== data) {\r\n\t\t\tif (me._data) {\r\n\t\t\t\t// This case happens when the user replaced the data array instance.\r\n\t\t\t\tunlistenArrayEvents(me._data, me);\r\n\t\t\t}\r\n\r\n\t\t\tif (data && Object.isExtensible(data)) {\r\n\t\t\t\tlistenArrayEvents(data, me);\r\n\t\t\t}\r\n\t\t\tme._data = data;\r\n\t\t}\r\n\r\n\t\t// Re-sync meta data in case the user replaced the data array or if we missed\r\n\t\t// any updates and so make sure that we handle number of datapoints changing.\r\n\t\tme.resyncElements();\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the merged user-supplied and default dataset-level options\r\n\t * @private\r\n\t */\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tme._config = helpers$1.merge(Object.create(null), [\r\n\t\t\tme.chart.options.datasets[me._type],\r\n\t\t\tme.getDataset(),\r\n\t\t], {\r\n\t\t\tmerger: function(key, target, source) {\r\n\t\t\t\tif (key !== '_meta' && key !== 'data') {\r\n\t\t\t\t\thelpers$1._merger(key, target, source);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t_update: function(reset) {\r\n\t\tvar me = this;\r\n\t\tme._configure();\r\n\t\tme._cachedDataOpts = null;\r\n\t\tme.update(reset);\r\n\t},\r\n\r\n\tupdate: helpers$1.noop,\r\n\r\n\ttransition: function(easingValue) {\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar elements = meta.data || [];\r\n\t\tvar ilen = elements.length;\r\n\t\tvar i = 0;\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\telements[i].transition(easingValue);\r\n\t\t}\r\n\r\n\t\tif (meta.dataset) {\r\n\t\t\tmeta.dataset.transition(easingValue);\r\n\t\t}\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar elements = meta.data || [];\r\n\t\tvar ilen = elements.length;\r\n\t\tvar i = 0;\r\n\r\n\t\tif (meta.dataset) {\r\n\t\t\tmeta.dataset.draw();\r\n\t\t}\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\telements[i].draw();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a set of predefined style properties that should be used to represent the dataset\r\n\t * or the data if the index is specified\r\n\t * @param {number} index - data index\r\n\t * @return {IStyleInterface} style object\r\n\t */\r\n\tgetStyle: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar dataset = meta.dataset;\r\n\t\tvar style;\r\n\r\n\t\tme._configure();\r\n\t\tif (dataset && index === undefined) {\r\n\t\t\tstyle = me._resolveDatasetElementOptions(dataset || {});\r\n\t\t} else {\r\n\t\t\tindex = index || 0;\r\n\t\t\tstyle = me._resolveDataElementOptions(meta.data[index] || {}, index);\r\n\t\t}\r\n\r\n\t\tif (style.fill === false || style.fill === null) {\r\n\t\t\tstyle.backgroundColor = style.borderColor;\r\n\t\t}\r\n\r\n\t\treturn style;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function(element, hover) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasetOpts = me._config;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar options = chart.options.elements[me.datasetElementType.prototype._type] || {};\r\n\t\tvar elementOptions = me._datasetElementOptions;\r\n\t\tvar values = {};\r\n\t\tvar i, ilen, key, readKey;\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataset: me.getDataset(),\r\n\t\t\tdatasetIndex: me.index,\r\n\t\t\thover: hover\r\n\t\t};\r\n\r\n\t\tfor (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\r\n\t\t\tkey = elementOptions[i];\r\n\t\t\treadKey = hover ? 'hover' + key.charAt(0).toUpperCase() + key.slice(1) : key;\r\n\t\t\tvalues[key] = resolve([\r\n\t\t\t\tcustom[readKey],\r\n\t\t\t\tdatasetOpts[readKey],\r\n\t\t\t\toptions[readKey]\r\n\t\t\t], context);\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function(element, index) {\r\n\t\tvar me = this;\r\n\t\tvar custom = element && element.custom;\r\n\t\tvar cached = me._cachedDataOpts;\r\n\t\tif (cached && !custom) {\r\n\t\t\treturn cached;\r\n\t\t}\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasetOpts = me._config;\r\n\t\tvar options = chart.options.elements[me.dataElementType.prototype._type] || {};\r\n\t\tvar elementOptions = me._dataElementOptions;\r\n\t\tvar values = {};\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: me.getDataset(),\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\t// `resolve` sets cacheable to `false` if any option is indexed or scripted\r\n\t\tvar info = {cacheable: !custom};\r\n\r\n\t\tvar keys, i, ilen, key;\r\n\r\n\t\tcustom = custom || {};\r\n\r\n\t\tif (helpers$1.isArray(elementOptions)) {\r\n\t\t\tfor (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\r\n\t\t\t\tkey = elementOptions[i];\r\n\t\t\t\tvalues[key] = resolve([\r\n\t\t\t\t\tcustom[key],\r\n\t\t\t\t\tdatasetOpts[key],\r\n\t\t\t\t\toptions[key]\r\n\t\t\t\t], context, index, info);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkeys = Object.keys(elementOptions);\r\n\t\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\t\t\tkey = keys[i];\r\n\t\t\t\tvalues[key] = resolve([\r\n\t\t\t\t\tcustom[key],\r\n\t\t\t\t\tdatasetOpts[elementOptions[key]],\r\n\t\t\t\t\tdatasetOpts[key],\r\n\t\t\t\t\toptions[key]\r\n\t\t\t\t], context, index, info);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (info.cacheable) {\r\n\t\t\tme._cachedDataOpts = Object.freeze(values);\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tremoveHoverStyle: function(element) {\r\n\t\thelpers$1.merge(element._model, element.$previousStyle || {});\r\n\t\tdelete element.$previousStyle;\r\n\t},\r\n\r\n\tsetHoverStyle: function(element) {\r\n\t\tvar dataset = this.chart.data.datasets[element._datasetIndex];\r\n\t\tvar index = element._index;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar model = element._model;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\telement.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = resolve([custom.hoverBackgroundColor, dataset.hoverBackgroundColor, getHoverColor(model.backgroundColor)], undefined, index);\r\n\t\tmodel.borderColor = resolve([custom.hoverBorderColor, dataset.hoverBorderColor, getHoverColor(model.borderColor)], undefined, index);\r\n\t\tmodel.borderWidth = resolve([custom.hoverBorderWidth, dataset.hoverBorderWidth, model.borderWidth], undefined, index);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_removeDatasetHoverStyle: function() {\r\n\t\tvar element = this.getMeta().dataset;\r\n\r\n\t\tif (element) {\r\n\t\t\tthis.removeHoverStyle(element);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_setDatasetHoverStyle: function() {\r\n\t\tvar element = this.getMeta().dataset;\r\n\t\tvar prev = {};\r\n\t\tvar i, ilen, key, keys, hoverOptions, model;\r\n\r\n\t\tif (!element) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmodel = element._model;\r\n\t\thoverOptions = this._resolveDatasetElementOptions(element, true);\r\n\r\n\t\tkeys = Object.keys(hoverOptions);\r\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\t\tkey = keys[i];\r\n\t\t\tprev[key] = model[key];\r\n\t\t\tmodel[key] = hoverOptions[key];\r\n\t\t}\r\n\r\n\t\telement.$previousStyle = prev;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tresyncElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar data = me.getDataset().data;\r\n\t\tvar numMeta = meta.data.length;\r\n\t\tvar numData = data.length;\r\n\r\n\t\tif (numData < numMeta) {\r\n\t\t\tmeta.data.splice(numData, numMeta - numData);\r\n\t\t} else if (numData > numMeta) {\r\n\t\t\tme.insertElements(numMeta, numData - numMeta);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tinsertElements: function(start, count) {\r\n\t\tfor (var i = 0; i < count; ++i) {\r\n\t\t\tthis.addElementAndReset(start + i);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataPush: function() {\r\n\t\tvar count = arguments.length;\r\n\t\tthis.insertElements(this.getDataset().data.length - count, count);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataPop: function() {\r\n\t\tthis.getMeta().data.pop();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataShift: function() {\r\n\t\tthis.getMeta().data.shift();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataSplice: function(start, count) {\r\n\t\tthis.getMeta().data.splice(start, count);\r\n\t\tthis.insertElements(start, arguments.length - 2);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataUnshift: function() {\r\n\t\tthis.insertElements(0, arguments.length);\r\n\t}\r\n});\r\n\r\nDatasetController.extend = helpers$1.inherits;\r\n\r\nvar core_datasetController = DatasetController;\n\nvar TAU = Math.PI * 2;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tarc: {\r\n\t\t\tbackgroundColor: core_defaults.global.defaultColor,\r\n\t\t\tborderColor: '#fff',\r\n\t\t\tborderWidth: 2,\r\n\t\t\tborderAlign: 'center'\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction clipArc(ctx, arc) {\r\n\tvar startAngle = arc.startAngle;\r\n\tvar endAngle = arc.endAngle;\r\n\tvar pixelMargin = arc.pixelMargin;\r\n\tvar angleMargin = pixelMargin / arc.outerRadius;\r\n\tvar x = arc.x;\r\n\tvar y = arc.y;\r\n\r\n\t// Draw an inner border by cliping the arc and drawing a double-width border\r\n\t// Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\r\n\tctx.beginPath();\r\n\tctx.arc(x, y, arc.outerRadius, startAngle - angleMargin, endAngle + angleMargin);\r\n\tif (arc.innerRadius > pixelMargin) {\r\n\t\tangleMargin = pixelMargin / arc.innerRadius;\r\n\t\tctx.arc(x, y, arc.innerRadius - pixelMargin, endAngle + angleMargin, startAngle - angleMargin, true);\r\n\t} else {\r\n\t\tctx.arc(x, y, pixelMargin, endAngle + Math.PI / 2, startAngle - Math.PI / 2);\r\n\t}\r\n\tctx.closePath();\r\n\tctx.clip();\r\n}\r\n\r\nfunction drawFullCircleBorders(ctx, vm, arc, inner) {\r\n\tvar endAngle = arc.endAngle;\r\n\tvar i;\r\n\r\n\tif (inner) {\r\n\t\tarc.endAngle = arc.startAngle + TAU;\r\n\t\tclipArc(ctx, arc);\r\n\t\tarc.endAngle = endAngle;\r\n\t\tif (arc.endAngle === arc.startAngle && arc.fullCircles) {\r\n\t\t\tarc.endAngle += TAU;\r\n\t\t\tarc.fullCircles--;\r\n\t\t}\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.startAngle + TAU, arc.startAngle, true);\r\n\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\tctx.stroke();\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.startAngle + TAU);\r\n\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\tctx.stroke();\r\n\t}\r\n}\r\n\r\nfunction drawBorder(ctx, vm, arc) {\r\n\tvar inner = vm.borderAlign === 'inner';\r\n\r\n\tif (inner) {\r\n\t\tctx.lineWidth = vm.borderWidth * 2;\r\n\t\tctx.lineJoin = 'round';\r\n\t} else {\r\n\t\tctx.lineWidth = vm.borderWidth;\r\n\t\tctx.lineJoin = 'bevel';\r\n\t}\r\n\r\n\tif (arc.fullCircles) {\r\n\t\tdrawFullCircleBorders(ctx, vm, arc, inner);\r\n\t}\r\n\r\n\tif (inner) {\r\n\t\tclipArc(ctx, arc);\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.endAngle);\r\n\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\tctx.closePath();\r\n\tctx.stroke();\r\n}\r\n\r\nvar element_arc = core_element.extend({\r\n\t_type: 'arc',\r\n\r\n\tinLabelRange: function(mouseX) {\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm) {\r\n\t\t\treturn (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2));\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tinRange: function(chartX, chartY) {\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm) {\r\n\t\t\tvar pointRelativePosition = helpers$1.getAngleFromPoint(vm, {x: chartX, y: chartY});\r\n\t\t\tvar angle = pointRelativePosition.angle;\r\n\t\t\tvar distance = pointRelativePosition.distance;\r\n\r\n\t\t\t// Sanitise angle range\r\n\t\t\tvar startAngle = vm.startAngle;\r\n\t\t\tvar endAngle = vm.endAngle;\r\n\t\t\twhile (endAngle < startAngle) {\r\n\t\t\t\tendAngle += TAU;\r\n\t\t\t}\r\n\t\t\twhile (angle > endAngle) {\r\n\t\t\t\tangle -= TAU;\r\n\t\t\t}\r\n\t\t\twhile (angle < startAngle) {\r\n\t\t\t\tangle += TAU;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if within the range of the open/close angle\r\n\t\t\tvar betweenAngles = (angle >= startAngle && angle <= endAngle);\r\n\t\t\tvar withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius);\r\n\r\n\t\t\treturn (betweenAngles && withinRadius);\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar halfAngle = (vm.startAngle + vm.endAngle) / 2;\r\n\t\tvar halfRadius = (vm.innerRadius + vm.outerRadius) / 2;\r\n\t\treturn {\r\n\t\t\tx: vm.x + Math.cos(halfAngle) * halfRadius,\r\n\t\t\ty: vm.y + Math.sin(halfAngle) * halfRadius\r\n\t\t};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2));\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2);\r\n\t\tvar rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;\r\n\r\n\t\treturn {\r\n\t\t\tx: vm.x + (Math.cos(centreAngle) * rangeFromCentre),\r\n\t\t\ty: vm.y + (Math.sin(centreAngle) * rangeFromCentre)\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar pixelMargin = (vm.borderAlign === 'inner') ? 0.33 : 0;\r\n\t\tvar arc = {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y,\r\n\t\t\tinnerRadius: vm.innerRadius,\r\n\t\t\touterRadius: Math.max(vm.outerRadius - pixelMargin, 0),\r\n\t\t\tpixelMargin: pixelMargin,\r\n\t\t\tstartAngle: vm.startAngle,\r\n\t\t\tendAngle: vm.endAngle,\r\n\t\t\tfullCircles: Math.floor(vm.circumference / TAU)\r\n\t\t};\r\n\t\tvar i;\r\n\r\n\t\tctx.save();\r\n\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.strokeStyle = vm.borderColor;\r\n\r\n\t\tif (arc.fullCircles) {\r\n\t\t\tarc.endAngle = arc.startAngle + TAU;\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\r\n\t\t\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\t\t\tctx.closePath();\r\n\t\t\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\t\t\tctx.fill();\r\n\t\t\t}\r\n\t\t\tarc.endAngle = arc.startAngle + vm.circumference % TAU;\r\n\t\t}\r\n\r\n\t\tctx.beginPath();\r\n\t\tctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\r\n\t\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\t\tctx.closePath();\r\n\t\tctx.fill();\r\n\r\n\t\tif (vm.borderWidth) {\r\n\t\t\tdrawBorder(ctx, vm, arc);\r\n\t\t}\r\n\r\n\t\tctx.restore();\r\n\t}\r\n});\n\nvar valueOrDefault$1 = helpers$1.valueOrDefault;\r\n\r\nvar defaultColor = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tline: {\r\n\t\t\ttension: 0.4,\r\n\t\t\tbackgroundColor: defaultColor,\r\n\t\t\tborderWidth: 3,\r\n\t\t\tborderColor: defaultColor,\r\n\t\t\tborderCapStyle: 'butt',\r\n\t\t\tborderDash: [],\r\n\t\t\tborderDashOffset: 0.0,\r\n\t\t\tborderJoinStyle: 'miter',\r\n\t\t\tcapBezierPoints: true,\r\n\t\t\tfill: true, // do we fill in the area between the line and its base axis\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar element_line = core_element.extend({\r\n\t_type: 'line',\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar vm = me._view;\r\n\t\tvar ctx = me._chart.ctx;\r\n\t\tvar spanGaps = vm.spanGaps;\r\n\t\tvar points = me._children.slice(); // clone array\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar globalOptionLineElements = globalDefaults.elements.line;\r\n\t\tvar lastDrawnIndex = -1;\r\n\t\tvar closePath = me._loop;\r\n\t\tvar index, previous, currentVM;\r\n\r\n\t\tif (!points.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (me._loop) {\r\n\t\t\tfor (index = 0; index < points.length; ++index) {\r\n\t\t\t\tprevious = helpers$1.previousItem(points, index);\r\n\t\t\t\t// If the line has an open path, shift the point array\r\n\t\t\t\tif (!points[index]._view.skip && previous._view.skip) {\r\n\t\t\t\t\tpoints = points.slice(index).concat(points.slice(0, index));\r\n\t\t\t\t\tclosePath = spanGaps;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If the line has a close path, add the first point again\r\n\t\t\tif (closePath) {\r\n\t\t\t\tpoints.push(points[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\r\n\t\t// Stroke Line Options\r\n\t\tctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle;\r\n\r\n\t\t// IE 9 and 10 do not support line dash\r\n\t\tif (ctx.setLineDash) {\r\n\t\t\tctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);\r\n\t\t}\r\n\r\n\t\tctx.lineDashOffset = valueOrDefault$1(vm.borderDashOffset, globalOptionLineElements.borderDashOffset);\r\n\t\tctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;\r\n\t\tctx.lineWidth = valueOrDefault$1(vm.borderWidth, globalOptionLineElements.borderWidth);\r\n\t\tctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor;\r\n\r\n\t\t// Stroke Line\r\n\t\tctx.beginPath();\r\n\r\n\t\t// First point moves to it's starting position no matter what\r\n\t\tcurrentVM = points[0]._view;\r\n\t\tif (!currentVM.skip) {\r\n\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\tlastDrawnIndex = 0;\r\n\t\t}\r\n\r\n\t\tfor (index = 1; index < points.length; ++index) {\r\n\t\t\tcurrentVM = points[index]._view;\r\n\t\t\tprevious = lastDrawnIndex === -1 ? helpers$1.previousItem(points, index) : points[lastDrawnIndex];\r\n\r\n\t\t\tif (!currentVM.skip) {\r\n\t\t\t\tif ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) {\r\n\t\t\t\t\t// There was a gap and this is the first point after the gap\r\n\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Line to next point\r\n\t\t\t\t\thelpers$1.canvas.lineTo(ctx, previous._view, currentVM);\r\n\t\t\t\t}\r\n\t\t\t\tlastDrawnIndex = index;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (closePath) {\r\n\t\t\tctx.closePath();\r\n\t\t}\r\n\r\n\t\tctx.stroke();\r\n\t\tctx.restore();\r\n\t}\r\n});\n\nvar valueOrDefault$2 = helpers$1.valueOrDefault;\r\n\r\nvar defaultColor$1 = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tpoint: {\r\n\t\t\tradius: 3,\r\n\t\t\tpointStyle: 'circle',\r\n\t\t\tbackgroundColor: defaultColor$1,\r\n\t\t\tborderColor: defaultColor$1,\r\n\t\t\tborderWidth: 1,\r\n\t\t\t// Hover\r\n\t\t\thitRadius: 1,\r\n\t\t\thoverRadius: 4,\r\n\t\t\thoverBorderWidth: 1\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction xRange(mouseX) {\r\n\tvar vm = this._view;\r\n\treturn vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false;\r\n}\r\n\r\nfunction yRange(mouseY) {\r\n\tvar vm = this._view;\r\n\treturn vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false;\r\n}\r\n\r\nvar element_point = core_element.extend({\r\n\t_type: 'point',\r\n\r\n\tinRange: function(mouseX, mouseY) {\r\n\t\tvar vm = this._view;\r\n\t\treturn vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false;\r\n\t},\r\n\r\n\tinLabelRange: xRange,\r\n\tinXRange: xRange,\r\n\tinYRange: yRange,\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\treturn Math.PI * Math.pow(this._view.radius, 2);\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y,\r\n\t\t\tpadding: vm.radius + vm.borderWidth\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function(chartArea) {\r\n\t\tvar vm = this._view;\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar pointStyle = vm.pointStyle;\r\n\t\tvar rotation = vm.rotation;\r\n\t\tvar radius = vm.radius;\r\n\t\tvar x = vm.x;\r\n\t\tvar y = vm.y;\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar defaultColor = globalDefaults.defaultColor; // eslint-disable-line no-shadow\r\n\r\n\t\tif (vm.skip) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Clipping for Points.\r\n\t\tif (chartArea === undefined || helpers$1.canvas._isPointInArea(vm, chartArea)) {\r\n\t\t\tctx.strokeStyle = vm.borderColor || defaultColor;\r\n\t\t\tctx.lineWidth = valueOrDefault$2(vm.borderWidth, globalDefaults.elements.point.borderWidth);\r\n\t\t\tctx.fillStyle = vm.backgroundColor || defaultColor;\r\n\t\t\thelpers$1.canvas.drawPoint(ctx, pointStyle, radius, x, y, rotation);\r\n\t\t}\r\n\t}\r\n});\n\nvar defaultColor$2 = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\trectangle: {\r\n\t\t\tbackgroundColor: defaultColor$2,\r\n\t\t\tborderColor: defaultColor$2,\r\n\t\t\tborderSkipped: 'bottom',\r\n\t\t\tborderWidth: 0\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction isVertical(vm) {\r\n\treturn vm && vm.width !== undefined;\r\n}\r\n\r\n/**\r\n * Helper function to get the bounds of the bar regardless of the orientation\r\n * @param bar {Chart.Element.Rectangle} the bar\r\n * @return {Bounds} bounds of the bar\r\n * @private\r\n */\r\nfunction getBarBounds(vm) {\r\n\tvar x1, x2, y1, y2, half;\r\n\r\n\tif (isVertical(vm)) {\r\n\t\thalf = vm.width / 2;\r\n\t\tx1 = vm.x - half;\r\n\t\tx2 = vm.x + half;\r\n\t\ty1 = Math.min(vm.y, vm.base);\r\n\t\ty2 = Math.max(vm.y, vm.base);\r\n\t} else {\r\n\t\thalf = vm.height / 2;\r\n\t\tx1 = Math.min(vm.x, vm.base);\r\n\t\tx2 = Math.max(vm.x, vm.base);\r\n\t\ty1 = vm.y - half;\r\n\t\ty2 = vm.y + half;\r\n\t}\r\n\r\n\treturn {\r\n\t\tleft: x1,\r\n\t\ttop: y1,\r\n\t\tright: x2,\r\n\t\tbottom: y2\r\n\t};\r\n}\r\n\r\nfunction swap(orig, v1, v2) {\r\n\treturn orig === v1 ? v2 : orig === v2 ? v1 : orig;\r\n}\r\n\r\nfunction parseBorderSkipped(vm) {\r\n\tvar edge = vm.borderSkipped;\r\n\tvar res = {};\r\n\r\n\tif (!edge) {\r\n\t\treturn res;\r\n\t}\r\n\r\n\tif (vm.horizontal) {\r\n\t\tif (vm.base > vm.x) {\r\n\t\t\tedge = swap(edge, 'left', 'right');\r\n\t\t}\r\n\t} else if (vm.base < vm.y) {\r\n\t\tedge = swap(edge, 'bottom', 'top');\r\n\t}\r\n\r\n\tres[edge] = true;\r\n\treturn res;\r\n}\r\n\r\nfunction parseBorderWidth(vm, maxW, maxH) {\r\n\tvar value = vm.borderWidth;\r\n\tvar skip = parseBorderSkipped(vm);\r\n\tvar t, r, b, l;\r\n\r\n\tif (helpers$1.isObject(value)) {\r\n\t\tt = +value.top || 0;\r\n\t\tr = +value.right || 0;\r\n\t\tb = +value.bottom || 0;\r\n\t\tl = +value.left || 0;\r\n\t} else {\r\n\t\tt = r = b = l = +value || 0;\r\n\t}\r\n\r\n\treturn {\r\n\t\tt: skip.top || (t < 0) ? 0 : t > maxH ? maxH : t,\r\n\t\tr: skip.right || (r < 0) ? 0 : r > maxW ? maxW : r,\r\n\t\tb: skip.bottom || (b < 0) ? 0 : b > maxH ? maxH : b,\r\n\t\tl: skip.left || (l < 0) ? 0 : l > maxW ? maxW : l\r\n\t};\r\n}\r\n\r\nfunction boundingRects(vm) {\r\n\tvar bounds = getBarBounds(vm);\r\n\tvar width = bounds.right - bounds.left;\r\n\tvar height = bounds.bottom - bounds.top;\r\n\tvar border = parseBorderWidth(vm, width / 2, height / 2);\r\n\r\n\treturn {\r\n\t\touter: {\r\n\t\t\tx: bounds.left,\r\n\t\t\ty: bounds.top,\r\n\t\t\tw: width,\r\n\t\t\th: height\r\n\t\t},\r\n\t\tinner: {\r\n\t\t\tx: bounds.left + border.l,\r\n\t\t\ty: bounds.top + border.t,\r\n\t\t\tw: width - border.l - border.r,\r\n\t\t\th: height - border.t - border.b\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction inRange(vm, x, y) {\r\n\tvar skipX = x === null;\r\n\tvar skipY = y === null;\r\n\tvar bounds = !vm || (skipX && skipY) ? false : getBarBounds(vm);\r\n\r\n\treturn bounds\r\n\t\t&& (skipX || x >= bounds.left && x <= bounds.right)\r\n\t\t&& (skipY || y >= bounds.top && y <= bounds.bottom);\r\n}\r\n\r\nvar element_rectangle = core_element.extend({\r\n\t_type: 'rectangle',\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar rects = boundingRects(vm);\r\n\t\tvar outer = rects.outer;\r\n\t\tvar inner = rects.inner;\r\n\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.fillRect(outer.x, outer.y, outer.w, outer.h);\r\n\r\n\t\tif (outer.w === inner.w && outer.h === inner.h) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\t\tctx.beginPath();\r\n\t\tctx.rect(outer.x, outer.y, outer.w, outer.h);\r\n\t\tctx.clip();\r\n\t\tctx.fillStyle = vm.borderColor;\r\n\t\tctx.rect(inner.x, inner.y, inner.w, inner.h);\r\n\t\tctx.fill('evenodd');\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\theight: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn vm.base - vm.y;\r\n\t},\r\n\r\n\tinRange: function(mouseX, mouseY) {\r\n\t\treturn inRange(this._view, mouseX, mouseY);\r\n\t},\r\n\r\n\tinLabelRange: function(mouseX, mouseY) {\r\n\t\tvar vm = this._view;\r\n\t\treturn isVertical(vm)\r\n\t\t\t? inRange(vm, mouseX, null)\r\n\t\t\t: inRange(vm, null, mouseY);\r\n\t},\r\n\r\n\tinXRange: function(mouseX) {\r\n\t\treturn inRange(this._view, mouseX, null);\r\n\t},\r\n\r\n\tinYRange: function(mouseY) {\r\n\t\treturn inRange(this._view, null, mouseY);\r\n\t},\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar x, y;\r\n\t\tif (isVertical(vm)) {\r\n\t\t\tx = vm.x;\r\n\t\t\ty = (vm.y + vm.base) / 2;\r\n\t\t} else {\r\n\t\t\tx = (vm.x + vm.base) / 2;\r\n\t\t\ty = vm.y;\r\n\t\t}\r\n\r\n\t\treturn {x: x, y: y};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\tvar vm = this._view;\r\n\r\n\t\treturn isVertical(vm)\r\n\t\t\t? vm.width * Math.abs(vm.y - vm.base)\r\n\t\t\t: vm.height * Math.abs(vm.x - vm.base);\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\t}\r\n});\n\nvar elements = {};\r\nvar Arc = element_arc;\r\nvar Line = element_line;\r\nvar Point = element_point;\r\nvar Rectangle = element_rectangle;\nelements.Arc = Arc;\nelements.Line = Line;\nelements.Point = Point;\nelements.Rectangle = Rectangle;\n\nvar deprecated = helpers$1._deprecated;\r\nvar valueOrDefault$3 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('bar', {\r\n\thover: {\r\n\t\tmode: 'label'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\toffset: true,\r\n\t\t\tgridLines: {\r\n\t\t\t\toffsetGridLines: true\r\n\t\t\t}\r\n\t\t}],\r\n\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear'\r\n\t\t}]\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\tbar: {\r\n\t\t\tcategoryPercentage: 0.8,\r\n\t\t\tbarPercentage: 0.9\r\n\t\t}\r\n\t}\r\n});\r\n\r\n/**\r\n * Computes the \"optimal\" sample size to maintain bars equally sized while preventing overlap.\r\n * @private\r\n */\r\nfunction computeMinSampleSize(scale, pixels) {\r\n\tvar min = scale._length;\r\n\tvar prev, curr, i, ilen;\r\n\r\n\tfor (i = 1, ilen = pixels.length; i < ilen; ++i) {\r\n\t\tmin = Math.min(min, Math.abs(pixels[i] - pixels[i - 1]));\r\n\t}\r\n\r\n\tfor (i = 0, ilen = scale.getTicks().length; i < ilen; ++i) {\r\n\t\tcurr = scale.getPixelForTick(i);\r\n\t\tmin = i > 0 ? Math.min(min, Math.abs(curr - prev)) : min;\r\n\t\tprev = curr;\r\n\t}\r\n\r\n\treturn min;\r\n}\r\n\r\n/**\r\n * Computes an \"ideal\" category based on the absolute bar thickness or, if undefined or null,\r\n * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This\r\n * mode currently always generates bars equally sized (until we introduce scriptable options?).\r\n * @private\r\n */\r\nfunction computeFitCategoryTraits(index, ruler, options) {\r\n\tvar thickness = options.barThickness;\r\n\tvar count = ruler.stackCount;\r\n\tvar curr = ruler.pixels[index];\r\n\tvar min = helpers$1.isNullOrUndef(thickness)\r\n\t\t? computeMinSampleSize(ruler.scale, ruler.pixels)\r\n\t\t: -1;\r\n\tvar size, ratio;\r\n\r\n\tif (helpers$1.isNullOrUndef(thickness)) {\r\n\t\tsize = min * options.categoryPercentage;\r\n\t\tratio = options.barPercentage;\r\n\t} else {\r\n\t\t// When bar thickness is enforced, category and bar percentages are ignored.\r\n\t\t// Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%')\r\n\t\t// and deprecate barPercentage since this value is ignored when thickness is absolute.\r\n\t\tsize = thickness * count;\r\n\t\tratio = 1;\r\n\t}\r\n\r\n\treturn {\r\n\t\tchunk: size / count,\r\n\t\tratio: ratio,\r\n\t\tstart: curr - (size / 2)\r\n\t};\r\n}\r\n\r\n/**\r\n * Computes an \"optimal\" category that globally arranges bars side by side (no gap when\r\n * percentage options are 1), based on the previous and following categories. This mode\r\n * generates bars with different widths when data are not evenly spaced.\r\n * @private\r\n */\r\nfunction computeFlexCategoryTraits(index, ruler, options) {\r\n\tvar pixels = ruler.pixels;\r\n\tvar curr = pixels[index];\r\n\tvar prev = index > 0 ? pixels[index - 1] : null;\r\n\tvar next = index < pixels.length - 1 ? pixels[index + 1] : null;\r\n\tvar percent = options.categoryPercentage;\r\n\tvar start, size;\r\n\r\n\tif (prev === null) {\r\n\t\t// first data: its size is double based on the next point or,\r\n\t\t// if it's also the last data, we use the scale size.\r\n\t\tprev = curr - (next === null ? ruler.end - ruler.start : next - curr);\r\n\t}\r\n\r\n\tif (next === null) {\r\n\t\t// last data: its size is also double based on the previous point.\r\n\t\tnext = curr + curr - prev;\r\n\t}\r\n\r\n\tstart = curr - (curr - Math.min(prev, next)) / 2 * percent;\r\n\tsize = Math.abs(next - prev) / 2 * percent;\r\n\r\n\treturn {\r\n\t\tchunk: size / ruler.stackCount,\r\n\t\tratio: options.barPercentage,\r\n\t\tstart: start\r\n\t};\r\n}\r\n\r\nvar controller_bar = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Rectangle,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderSkipped',\r\n\t\t'borderWidth',\r\n\t\t'barPercentage',\r\n\t\t'barThickness',\r\n\t\t'categoryPercentage',\r\n\t\t'maxBarThickness',\r\n\t\t'minBarLength'\r\n\t],\r\n\r\n\tinitialize: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta, scaleOpts;\r\n\r\n\t\tcore_datasetController.prototype.initialize.apply(me, arguments);\r\n\r\n\t\tmeta = me.getMeta();\r\n\t\tmeta.stack = me.getDataset().stack;\r\n\t\tmeta.bar = true;\r\n\r\n\t\tscaleOpts = me._getIndexScale().options;\r\n\t\tdeprecated('bar chart', scaleOpts.barPercentage, 'scales.[x/y]Axes.barPercentage', 'dataset.barPercentage');\r\n\t\tdeprecated('bar chart', scaleOpts.barThickness, 'scales.[x/y]Axes.barThickness', 'dataset.barThickness');\r\n\t\tdeprecated('bar chart', scaleOpts.categoryPercentage, 'scales.[x/y]Axes.categoryPercentage', 'dataset.categoryPercentage');\r\n\t\tdeprecated('bar chart', me._getValueScale().options.minBarLength, 'scales.[x/y]Axes.minBarLength', 'dataset.minBarLength');\r\n\t\tdeprecated('bar chart', scaleOpts.maxBarThickness, 'scales.[x/y]Axes.maxBarThickness', 'dataset.maxBarThickness');\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar rects = me.getMeta().data;\r\n\t\tvar i, ilen;\r\n\r\n\t\tme._ruler = me.getRuler();\r\n\r\n\t\tfor (i = 0, ilen = rects.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(rects[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(rectangle, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar options = me._resolveDataElementOptions(rectangle, index);\r\n\r\n\t\trectangle._xScale = me.getScaleForId(meta.xAxisID);\r\n\t\trectangle._yScale = me.getScaleForId(meta.yAxisID);\r\n\t\trectangle._datasetIndex = me.index;\r\n\t\trectangle._index = index;\r\n\t\trectangle._model = {\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderSkipped: options.borderSkipped,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\tdatasetLabel: dataset.label,\r\n\t\t\tlabel: me.chart.data.labels[index]\r\n\t\t};\r\n\r\n\t\tif (helpers$1.isArray(dataset.data[index])) {\r\n\t\t\trectangle._model.borderSkipped = null;\r\n\t\t}\r\n\r\n\t\tme._updateElementGeometry(rectangle, index, reset, options);\r\n\r\n\t\trectangle.pivot();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_updateElementGeometry: function(rectangle, index, reset, options) {\r\n\t\tvar me = this;\r\n\t\tvar model = rectangle._model;\r\n\t\tvar vscale = me._getValueScale();\r\n\t\tvar base = vscale.getBasePixel();\r\n\t\tvar horizontal = vscale.isHorizontal();\r\n\t\tvar ruler = me._ruler || me.getRuler();\r\n\t\tvar vpixels = me.calculateBarValuePixels(me.index, index, options);\r\n\t\tvar ipixels = me.calculateBarIndexPixels(me.index, index, ruler, options);\r\n\r\n\t\tmodel.horizontal = horizontal;\r\n\t\tmodel.base = reset ? base : vpixels.base;\r\n\t\tmodel.x = horizontal ? reset ? base : vpixels.head : ipixels.center;\r\n\t\tmodel.y = horizontal ? ipixels.center : reset ? base : vpixels.head;\r\n\t\tmodel.height = horizontal ? ipixels.size : undefined;\r\n\t\tmodel.width = horizontal ? undefined : ipixels.size;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the stacks based on groups and bar visibility.\r\n\t * @param {number} [last] - The dataset index\r\n\t * @returns {string[]} The list of stack IDs\r\n\t * @private\r\n\t */\r\n\t_getStacks: function(last) {\r\n\t\tvar me = this;\r\n\t\tvar scale = me._getIndexScale();\r\n\t\tvar metasets = scale._getMatchingVisibleMetas(me._type);\r\n\t\tvar stacked = scale.options.stacked;\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar stacks = [];\r\n\t\tvar i, meta;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tmeta = metasets[i];\r\n\t\t\t// stacked | meta.stack\r\n\t\t\t// | found | not found | undefined\r\n\t\t\t// false | x | x | x\r\n\t\t\t// true | | x |\r\n\t\t\t// undefined | | x | x\r\n\t\t\tif (stacked === false || stacks.indexOf(meta.stack) === -1 ||\r\n\t\t\t\t(stacked === undefined && meta.stack === undefined)) {\r\n\t\t\t\tstacks.push(meta.stack);\r\n\t\t\t}\r\n\t\t\tif (meta.index === last) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn stacks;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the effective number of stacks based on groups and bar visibility.\r\n\t * @private\r\n\t */\r\n\tgetStackCount: function() {\r\n\t\treturn this._getStacks().length;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the stack index for the given dataset based on groups and bar visibility.\r\n\t * @param {number} [datasetIndex] - The dataset index\r\n\t * @param {string} [name] - The stack name to find\r\n\t * @returns {number} The stack index\r\n\t * @private\r\n\t */\r\n\tgetStackIndex: function(datasetIndex, name) {\r\n\t\tvar stacks = this._getStacks(datasetIndex);\r\n\t\tvar index = (name !== undefined)\r\n\t\t\t? stacks.indexOf(name)\r\n\t\t\t: -1; // indexOf returns -1 if element is not present\r\n\r\n\t\treturn (index === -1)\r\n\t\t\t? stacks.length - 1\r\n\t\t\t: index;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tgetRuler: function() {\r\n\t\tvar me = this;\r\n\t\tvar scale = me._getIndexScale();\r\n\t\tvar pixels = [];\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) {\r\n\t\t\tpixels.push(scale.getPixelForValue(null, i, me.index));\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tpixels: pixels,\r\n\t\t\tstart: scale._startPixel,\r\n\t\t\tend: scale._endPixel,\r\n\t\t\tstackCount: me.getStackCount(),\r\n\t\t\tscale: scale\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Note: pixel values are not clamped to the scale area.\r\n\t * @private\r\n\t */\r\n\tcalculateBarValuePixels: function(datasetIndex, index, options) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar scale = me._getValueScale();\r\n\t\tvar isHorizontal = scale.isHorizontal();\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar metasets = scale._getMatchingVisibleMetas(me._type);\r\n\t\tvar value = scale._parseValue(datasets[datasetIndex].data[index]);\r\n\t\tvar minBarLength = options.minBarLength;\r\n\t\tvar stacked = scale.options.stacked;\r\n\t\tvar stack = me.getMeta().stack;\r\n\t\tvar start = value.start === undefined ? 0 : value.max >= 0 && value.min >= 0 ? value.min : value.max;\r\n\t\tvar length = value.start === undefined ? value.end : value.max >= 0 && value.min >= 0 ? value.max - value.min : value.min - value.max;\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar i, imeta, ivalue, base, head, size, stackLength;\r\n\r\n\t\tif (stacked || (stacked === undefined && stack !== undefined)) {\r\n\t\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\t\timeta = metasets[i];\r\n\r\n\t\t\t\tif (imeta.index === datasetIndex) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (imeta.stack === stack) {\r\n\t\t\t\t\tstackLength = scale._parseValue(datasets[imeta.index].data[index]);\r\n\t\t\t\t\tivalue = stackLength.start === undefined ? stackLength.end : stackLength.min >= 0 && stackLength.max >= 0 ? stackLength.max : stackLength.min;\r\n\r\n\t\t\t\t\tif ((value.min < 0 && ivalue < 0) || (value.max >= 0 && ivalue > 0)) {\r\n\t\t\t\t\t\tstart += ivalue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbase = scale.getPixelForValue(start);\r\n\t\thead = scale.getPixelForValue(start + length);\r\n\t\tsize = head - base;\r\n\r\n\t\tif (minBarLength !== undefined && Math.abs(size) < minBarLength) {\r\n\t\t\tsize = minBarLength;\r\n\t\t\tif (length >= 0 && !isHorizontal || length < 0 && isHorizontal) {\r\n\t\t\t\thead = base - minBarLength;\r\n\t\t\t} else {\r\n\t\t\t\thead = base + minBarLength;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tsize: size,\r\n\t\t\tbase: base,\r\n\t\t\thead: head,\r\n\t\t\tcenter: head + size / 2\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tcalculateBarIndexPixels: function(datasetIndex, index, ruler, options) {\r\n\t\tvar me = this;\r\n\t\tvar range = options.barThickness === 'flex'\r\n\t\t\t? computeFlexCategoryTraits(index, ruler, options)\r\n\t\t\t: computeFitCategoryTraits(index, ruler, options);\r\n\r\n\t\tvar stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack);\r\n\t\tvar center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);\r\n\t\tvar size = Math.min(\r\n\t\t\tvalueOrDefault$3(options.maxBarThickness, Infinity),\r\n\t\t\trange.chunk * range.ratio);\r\n\r\n\t\treturn {\r\n\t\t\tbase: center - size / 2,\r\n\t\t\thead: center + size / 2,\r\n\t\t\tcenter: center,\r\n\t\t\tsize: size\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar scale = me._getValueScale();\r\n\t\tvar rects = me.getMeta().data;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar ilen = rects.length;\r\n\t\tvar i = 0;\r\n\r\n\t\thelpers$1.canvas.clipArea(chart.ctx, chart.chartArea);\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tvar val = scale._parseValue(dataset.data[i]);\r\n\t\t\tif (!isNaN(val.min) && !isNaN(val.max)) {\r\n\t\t\t\trects[i].draw();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thelpers$1.canvas.unclipArea(chart.ctx);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar values = helpers$1.extend({}, core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments));\r\n\t\tvar indexOpts = me._getIndexScale().options;\r\n\t\tvar valueOpts = me._getValueScale().options;\r\n\r\n\t\tvalues.barPercentage = valueOrDefault$3(indexOpts.barPercentage, values.barPercentage);\r\n\t\tvalues.barThickness = valueOrDefault$3(indexOpts.barThickness, values.barThickness);\r\n\t\tvalues.categoryPercentage = valueOrDefault$3(indexOpts.categoryPercentage, values.categoryPercentage);\r\n\t\tvalues.maxBarThickness = valueOrDefault$3(indexOpts.maxBarThickness, values.maxBarThickness);\r\n\t\tvalues.minBarLength = valueOrDefault$3(valueOpts.minBarLength, values.minBarLength);\r\n\r\n\t\treturn values;\r\n\t}\r\n\r\n});\n\nvar valueOrDefault$4 = helpers$1.valueOrDefault;\r\nvar resolve$1 = helpers$1.options.resolve;\r\n\r\ncore_defaults._set('bubble', {\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'linear', // bubble should probably use a linear scale by default\r\n\t\t\tposition: 'bottom',\r\n\t\t\tid: 'x-axis-0' // need an ID so datasets can reference the scale\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'left',\r\n\t\t\tid: 'y-axis-0'\r\n\t\t}]\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\t// Title doesn't make sense for scatter since we format the data as a point\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(item, data) {\r\n\t\t\t\tvar datasetLabel = data.datasets[item.datasetIndex].label || '';\r\n\t\t\t\tvar dataPoint = data.datasets[item.datasetIndex].data[item.index];\r\n\t\t\t\treturn datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_bubble = core_datasetController.extend({\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tdataElementType: elements.Point,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t\t'hoverRadius',\r\n\t\t'hitRadius',\r\n\t\t'pointStyle',\r\n\t\t'rotation'\r\n\t],\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar points = meta.data;\r\n\r\n\t\t// Update Points\r\n\t\thelpers$1.each(points, function(point, index) {\r\n\t\t\tme.updateElement(point, index, reset);\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\t\tvar data = me.getDataset().data[index];\r\n\t\tvar dsIndex = me.index;\r\n\r\n\t\tvar x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex);\r\n\t\tvar y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex);\r\n\r\n\t\tpoint._xScale = xScale;\r\n\t\tpoint._yScale = yScale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = dsIndex;\r\n\t\tpoint._index = index;\r\n\t\tpoint._model = {\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\thitRadius: options.hitRadius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tradius: reset ? 0 : options.radius,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t};\r\n\r\n\t\tpoint.pivot();\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$4(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$4(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$4(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = options.radius + options.hoverRadius;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function(point, index) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar data = dataset.data[index] || {};\r\n\t\tvar values = core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments);\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: dataset,\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\t// In case values were cached (and thus frozen), we need to clone the values\r\n\t\tif (me._cachedDataOpts === values) {\r\n\t\t\tvalues = helpers$1.extend({}, values);\r\n\t\t}\r\n\r\n\t\t// Custom radius resolution\r\n\t\tvalues.radius = resolve$1([\r\n\t\t\tcustom.radius,\r\n\t\t\tdata.r,\r\n\t\t\tme._config.radius,\r\n\t\t\tchart.options.elements.point.radius\r\n\t\t], context, index);\r\n\r\n\t\treturn values;\r\n\t}\r\n});\n\nvar valueOrDefault$5 = helpers$1.valueOrDefault;\r\n\r\nvar PI$1 = Math.PI;\r\nvar DOUBLE_PI$1 = PI$1 * 2;\r\nvar HALF_PI$1 = PI$1 / 2;\r\n\r\ncore_defaults._set('doughnut', {\r\n\tanimation: {\r\n\t\t// Boolean - Whether we animate the rotation of the Doughnut\r\n\t\tanimateRotate: true,\r\n\t\t// Boolean - Whether we animate scaling the Doughnut from the centre\r\n\t\tanimateScale: false\r\n\t},\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar data = chart.data;\r\n\t\tvar datasets = data.datasets;\r\n\t\tvar labels = data.labels;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\t\tif (datasets.length) {\r\n\t\t\tfor (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\r\n\t\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\t\tlistItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\r\n\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\tlistItem.appendChild(document.createTextNode(labels[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t},\r\n\tlegend: {\r\n\t\tlabels: {\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar data = chart.data;\r\n\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\tvar style = meta.controller.getStyle(i);\r\n\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\t\thidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.index;\r\n\t\t\tvar chart = this.chart;\r\n\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t// toggle visibility of index if exists\r\n\t\t\t\tif (meta.data[index]) {\r\n\t\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tchart.update();\r\n\t\t}\r\n\t},\r\n\r\n\t// The percentage of the chart that we cut out of the middle.\r\n\tcutoutPercentage: 50,\r\n\r\n\t// The rotation of the chart, where the first data arc begins.\r\n\trotation: -HALF_PI$1,\r\n\r\n\t// The total circumference of the chart.\r\n\tcircumference: DOUBLE_PI$1,\r\n\r\n\t// Need to override these to give a nice default\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\tvar dataLabel = data.labels[tooltipItem.index];\r\n\t\t\t\tvar value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n\r\n\t\t\t\tif (helpers$1.isArray(dataLabel)) {\r\n\t\t\t\t\t// show value on first line of multiline label\r\n\t\t\t\t\t// need to clone because we are changing the value\r\n\t\t\t\t\tdataLabel = dataLabel.slice();\r\n\t\t\t\t\tdataLabel[0] += value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdataLabel += value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn dataLabel;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_doughnut = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Arc,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'borderAlign',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t],\r\n\r\n\t// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly\r\n\tgetRingIndex: function(datasetIndex) {\r\n\t\tvar ringIndex = 0;\r\n\r\n\t\tfor (var j = 0; j < datasetIndex; ++j) {\r\n\t\t\tif (this.chart.isDatasetVisible(j)) {\r\n\t\t\t\t++ringIndex;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ringIndex;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar ratioX = 1;\r\n\t\tvar ratioY = 1;\r\n\t\tvar offsetX = 0;\r\n\t\tvar offsetY = 0;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar arcs = meta.data;\r\n\t\tvar cutout = opts.cutoutPercentage / 100 || 0;\r\n\t\tvar circumference = opts.circumference;\r\n\t\tvar chartWeight = me._getRingWeight(me.index);\r\n\t\tvar maxWidth, maxHeight, i, ilen;\r\n\r\n\t\t// If the chart's circumference isn't a full circle, calculate size as a ratio of the width/height of the arc\r\n\t\tif (circumference < DOUBLE_PI$1) {\r\n\t\t\tvar startAngle = opts.rotation % DOUBLE_PI$1;\r\n\t\t\tstartAngle += startAngle >= PI$1 ? -DOUBLE_PI$1 : startAngle < -PI$1 ? DOUBLE_PI$1 : 0;\r\n\t\t\tvar endAngle = startAngle + circumference;\r\n\t\t\tvar startX = Math.cos(startAngle);\r\n\t\t\tvar startY = Math.sin(startAngle);\r\n\t\t\tvar endX = Math.cos(endAngle);\r\n\t\t\tvar endY = Math.sin(endAngle);\r\n\t\t\tvar contains0 = (startAngle <= 0 && endAngle >= 0) || endAngle >= DOUBLE_PI$1;\r\n\t\t\tvar contains90 = (startAngle <= HALF_PI$1 && endAngle >= HALF_PI$1) || endAngle >= DOUBLE_PI$1 + HALF_PI$1;\r\n\t\t\tvar contains180 = startAngle === -PI$1 || endAngle >= PI$1;\r\n\t\t\tvar contains270 = (startAngle <= -HALF_PI$1 && endAngle >= -HALF_PI$1) || endAngle >= PI$1 + HALF_PI$1;\r\n\t\t\tvar minX = contains180 ? -1 : Math.min(startX, startX * cutout, endX, endX * cutout);\r\n\t\t\tvar minY = contains270 ? -1 : Math.min(startY, startY * cutout, endY, endY * cutout);\r\n\t\t\tvar maxX = contains0 ? 1 : Math.max(startX, startX * cutout, endX, endX * cutout);\r\n\t\t\tvar maxY = contains90 ? 1 : Math.max(startY, startY * cutout, endY, endY * cutout);\r\n\t\t\tratioX = (maxX - minX) / 2;\r\n\t\t\tratioY = (maxY - minY) / 2;\r\n\t\t\toffsetX = -(maxX + minX) / 2;\r\n\t\t\toffsetY = -(maxY + minY) / 2;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\r\n\t\t}\r\n\r\n\t\tchart.borderWidth = me.getMaxBorderWidth();\r\n\t\tmaxWidth = (chartArea.right - chartArea.left - chart.borderWidth) / ratioX;\r\n\t\tmaxHeight = (chartArea.bottom - chartArea.top - chart.borderWidth) / ratioY;\r\n\t\tchart.outerRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\r\n\t\tchart.innerRadius = Math.max(chart.outerRadius * cutout, 0);\r\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / (me._getVisibleDatasetWeightTotal() || 1);\r\n\t\tchart.offsetX = offsetX * chart.outerRadius;\r\n\t\tchart.offsetY = offsetY * chart.outerRadius;\r\n\r\n\t\tmeta.total = me.calculateTotal();\r\n\r\n\t\tme.outerRadius = chart.outerRadius - chart.radiusLength * me._getRingWeightOffset(me.index);\r\n\t\tme.innerRadius = Math.max(me.outerRadius - chart.radiusLength * chartWeight, 0);\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(arcs[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(arc, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar animationOpts = opts.animation;\r\n\t\tvar centerX = (chartArea.left + chartArea.right) / 2;\r\n\t\tvar centerY = (chartArea.top + chartArea.bottom) / 2;\r\n\t\tvar startAngle = opts.rotation; // non reset case handled later\r\n\t\tvar endAngle = opts.rotation; // non reset case handled later\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / DOUBLE_PI$1);\r\n\t\tvar innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius;\r\n\t\tvar outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius;\r\n\t\tvar options = arc._options || {};\r\n\r\n\t\thelpers$1.extend(arc, {\r\n\t\t\t// Utility\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index,\r\n\r\n\t\t\t// Desired view properties\r\n\t\t\t_model: {\r\n\t\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\t\tborderColor: options.borderColor,\r\n\t\t\t\tborderWidth: options.borderWidth,\r\n\t\t\t\tborderAlign: options.borderAlign,\r\n\t\t\t\tx: centerX + chart.offsetX,\r\n\t\t\t\ty: centerY + chart.offsetY,\r\n\t\t\t\tstartAngle: startAngle,\r\n\t\t\t\tendAngle: endAngle,\r\n\t\t\t\tcircumference: circumference,\r\n\t\t\t\touterRadius: outerRadius,\r\n\t\t\t\tinnerRadius: innerRadius,\r\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tvar model = arc._model;\r\n\r\n\t\t// Set correct angles if not resetting\r\n\t\tif (!reset || !animationOpts.animateRotate) {\r\n\t\t\tif (index === 0) {\r\n\t\t\t\tmodel.startAngle = opts.rotation;\r\n\t\t\t} else {\r\n\t\t\t\tmodel.startAngle = me.getMeta().data[index - 1]._model.endAngle;\r\n\t\t\t}\r\n\r\n\t\t\tmodel.endAngle = model.startAngle + model.circumference;\r\n\t\t}\r\n\r\n\t\tarc.pivot();\r\n\t},\r\n\r\n\tcalculateTotal: function() {\r\n\t\tvar dataset = this.getDataset();\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar total = 0;\r\n\t\tvar value;\r\n\r\n\t\thelpers$1.each(meta.data, function(element, index) {\r\n\t\t\tvalue = dataset.data[index];\r\n\t\t\tif (!isNaN(value) && !element.hidden) {\r\n\t\t\t\ttotal += Math.abs(value);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t/* if (total === 0) {\r\n\t\t\ttotal = NaN;\r\n\t\t}*/\r\n\r\n\t\treturn total;\r\n\t},\r\n\r\n\tcalculateCircumference: function(value) {\r\n\t\tvar total = this.getMeta().total;\r\n\t\tif (total > 0 && !isNaN(value)) {\r\n\t\t\treturn DOUBLE_PI$1 * (Math.abs(value) / total);\r\n\t\t}\r\n\t\treturn 0;\r\n\t},\r\n\r\n\t// gets the max border or hover width to properly scale pie charts\r\n\tgetMaxBorderWidth: function(arcs) {\r\n\t\tvar me = this;\r\n\t\tvar max = 0;\r\n\t\tvar chart = me.chart;\r\n\t\tvar i, ilen, meta, arc, controller, options, borderWidth, hoverWidth;\r\n\r\n\t\tif (!arcs) {\r\n\t\t\t// Find the outmost visible dataset\r\n\t\t\tfor (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\r\n\t\t\t\tif (chart.isDatasetVisible(i)) {\r\n\t\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t\tarcs = meta.data;\r\n\t\t\t\t\tif (i !== me.index) {\r\n\t\t\t\t\t\tcontroller = meta.controller;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!arcs) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarc = arcs[i];\r\n\t\t\tif (controller) {\r\n\t\t\t\tcontroller._configure();\r\n\t\t\t\toptions = controller._resolveDataElementOptions(arc, i);\r\n\t\t\t} else {\r\n\t\t\t\toptions = arc._options;\r\n\t\t\t}\r\n\t\t\tif (options.borderAlign !== 'inner') {\r\n\t\t\t\tborderWidth = options.borderWidth;\r\n\t\t\t\thoverWidth = options.hoverBorderWidth;\r\n\r\n\t\t\t\tmax = borderWidth > max ? borderWidth : max;\r\n\t\t\t\tmax = hoverWidth > max ? hoverWidth : max;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(arc) {\r\n\t\tvar model = arc._model;\r\n\t\tvar options = arc._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tarc.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$5(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$5(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$5(options.hoverBorderWidth, options.borderWidth);\r\n\t},\r\n\r\n\t/**\r\n\t * Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly\r\n\t * @private\r\n\t */\r\n\t_getRingWeightOffset: function(datasetIndex) {\r\n\t\tvar ringWeightOffset = 0;\r\n\r\n\t\tfor (var i = 0; i < datasetIndex; ++i) {\r\n\t\t\tif (this.chart.isDatasetVisible(i)) {\r\n\t\t\t\tringWeightOffset += this._getRingWeight(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ringWeightOffset;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getRingWeight: function(dataSetIndex) {\r\n\t\treturn Math.max(valueOrDefault$5(this.chart.data.datasets[dataSetIndex].weight, 1), 0);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the sum of all visibile data set weights. This value can be 0.\r\n\t * @private\r\n\t */\r\n\t_getVisibleDatasetWeightTotal: function() {\r\n\t\treturn this._getRingWeightOffset(this.chart.data.datasets.length);\r\n\t}\r\n});\n\ncore_defaults._set('horizontalBar', {\r\n\thover: {\r\n\t\tmode: 'index',\r\n\t\taxis: 'y'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'bottom'\r\n\t\t}],\r\n\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\tposition: 'left',\r\n\t\t\toffset: true,\r\n\t\t\tgridLines: {\r\n\t\t\t\toffsetGridLines: true\r\n\t\t\t}\r\n\t\t}]\r\n\t},\r\n\r\n\telements: {\r\n\t\trectangle: {\r\n\t\t\tborderSkipped: 'left'\r\n\t\t}\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tmode: 'index',\r\n\t\taxis: 'y'\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\thorizontalBar: {\r\n\t\t\tcategoryPercentage: 0.8,\r\n\t\t\tbarPercentage: 0.9\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_horizontalBar = controller_bar.extend({\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.getMeta().xAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.getMeta().yAxisID;\r\n\t}\r\n});\n\nvar valueOrDefault$6 = helpers$1.valueOrDefault;\r\nvar resolve$2 = helpers$1.options.resolve;\r\nvar isPointInArea = helpers$1.canvas._isPointInArea;\r\n\r\ncore_defaults._set('line', {\r\n\tshowLines: true,\r\n\tspanGaps: false,\r\n\r\n\thover: {\r\n\t\tmode: 'label'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\tid: 'x-axis-0'\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tid: 'y-axis-0'\r\n\t\t}]\r\n\t}\r\n});\r\n\r\nfunction scaleClip(scale, halfBorderWidth) {\r\n\tvar tickOpts = scale && scale.options.ticks || {};\r\n\tvar reverse = tickOpts.reverse;\r\n\tvar min = tickOpts.min === undefined ? halfBorderWidth : 0;\r\n\tvar max = tickOpts.max === undefined ? halfBorderWidth : 0;\r\n\treturn {\r\n\t\tstart: reverse ? max : min,\r\n\t\tend: reverse ? min : max\r\n\t};\r\n}\r\n\r\nfunction defaultClip(xScale, yScale, borderWidth) {\r\n\tvar halfBorderWidth = borderWidth / 2;\r\n\tvar x = scaleClip(xScale, halfBorderWidth);\r\n\tvar y = scaleClip(yScale, halfBorderWidth);\r\n\r\n\treturn {\r\n\t\ttop: y.end,\r\n\t\tright: x.end,\r\n\t\tbottom: y.start,\r\n\t\tleft: x.start\r\n\t};\r\n}\r\n\r\nfunction toClip(value) {\r\n\tvar t, r, b, l;\r\n\r\n\tif (helpers$1.isObject(value)) {\r\n\t\tt = value.top;\r\n\t\tr = value.right;\r\n\t\tb = value.bottom;\r\n\t\tl = value.left;\r\n\t} else {\r\n\t\tt = r = b = l = value;\r\n\t}\r\n\r\n\treturn {\r\n\t\ttop: t,\r\n\t\tright: r,\r\n\t\tbottom: b,\r\n\t\tleft: l\r\n\t};\r\n}\r\n\r\n\r\nvar controller_line = core_datasetController.extend({\r\n\r\n\tdatasetElementType: elements.Line,\r\n\r\n\tdataElementType: elements.Point,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderColor',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'borderWidth',\r\n\t\t'cubicInterpolationMode',\r\n\t\t'fill'\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: {\r\n\t\tbackgroundColor: 'pointBackgroundColor',\r\n\t\tborderColor: 'pointBorderColor',\r\n\t\tborderWidth: 'pointBorderWidth',\r\n\t\thitRadius: 'pointHitRadius',\r\n\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\r\n\t\thoverBorderColor: 'pointHoverBorderColor',\r\n\t\thoverBorderWidth: 'pointHoverBorderWidth',\r\n\t\thoverRadius: 'pointHoverRadius',\r\n\t\tpointStyle: 'pointStyle',\r\n\t\tradius: 'pointRadius',\r\n\t\trotation: 'pointRotation'\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar line = meta.dataset;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar options = me.chart.options;\r\n\t\tvar config = me._config;\r\n\t\tvar showLine = me._showLine = valueOrDefault$6(config.showLine, options.showLines);\r\n\t\tvar i, ilen;\r\n\r\n\t\tme._xScale = me.getScaleForId(meta.xAxisID);\r\n\t\tme._yScale = me.getScaleForId(meta.yAxisID);\r\n\r\n\t\t// Update Line\r\n\t\tif (showLine) {\r\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\t\tif (config.tension !== undefined && config.lineTension === undefined) {\r\n\t\t\t\tconfig.lineTension = config.tension;\r\n\t\t\t}\r\n\r\n\t\t\t// Utility\r\n\t\t\tline._scale = me._yScale;\r\n\t\t\tline._datasetIndex = me.index;\r\n\t\t\t// Data\r\n\t\t\tline._children = points;\r\n\t\t\t// Model\r\n\t\t\tline._model = me._resolveDatasetElementOptions(line);\r\n\r\n\t\t\tline.pivot();\r\n\t\t}\r\n\r\n\t\t// Update Points\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(points[i], i, reset);\r\n\t\t}\r\n\r\n\t\tif (showLine && line._model.tension !== 0) {\r\n\t\t\tme.updateBezierControlPoints();\r\n\t\t}\r\n\r\n\t\t// Now pivot the point for animation\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tpoints[i].pivot();\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar datasetIndex = me.index;\r\n\t\tvar value = dataset.data[index];\r\n\t\tvar xScale = me._xScale;\r\n\t\tvar yScale = me._yScale;\r\n\t\tvar lineModel = meta.dataset._model;\r\n\t\tvar x, y;\r\n\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\r\n\t\tx = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex);\r\n\t\ty = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex);\r\n\r\n\t\t// Utility\r\n\t\tpoint._xScale = xScale;\r\n\t\tpoint._yScale = yScale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = datasetIndex;\r\n\t\tpoint._index = index;\r\n\r\n\t\t// Desired view properties\r\n\t\tpoint._model = {\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\t// Appearance\r\n\t\t\tradius: options.radius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\ttension: valueOrDefault$6(custom.tension, lineModel ? lineModel.tension : 0),\r\n\t\t\tsteppedLine: lineModel ? lineModel.steppedLine : false,\r\n\t\t\t// Tooltip\r\n\t\t\thitRadius: options.hitRadius\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function(element) {\r\n\t\tvar me = this;\r\n\t\tvar config = me._config;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar options = me.chart.options;\r\n\t\tvar lineOptions = options.elements.line;\r\n\t\tvar values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);\r\n\r\n\t\t// The default behavior of lines is to break at null values, according\r\n\t\t// to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158\r\n\t\t// This option gives lines the ability to span gaps\r\n\t\tvalues.spanGaps = valueOrDefault$6(config.spanGaps, options.spanGaps);\r\n\t\tvalues.tension = valueOrDefault$6(config.lineTension, lineOptions.tension);\r\n\t\tvalues.steppedLine = resolve$2([custom.steppedLine, config.steppedLine, lineOptions.stepped]);\r\n\t\tvalues.clip = toClip(valueOrDefault$6(config.clip, defaultClip(me._xScale, me._yScale, values.borderWidth)));\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tcalculatePointY: function(value, index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar yScale = me._yScale;\r\n\t\tvar sumPos = 0;\r\n\t\tvar sumNeg = 0;\r\n\t\tvar i, ds, dsMeta, stackedRightValue, rightValue, metasets, ilen;\r\n\r\n\t\tif (yScale.options.stacked) {\r\n\t\t\trightValue = +yScale.getRightValue(value);\r\n\t\t\tmetasets = chart._getSortedVisibleDatasetMetas();\r\n\t\t\tilen = metasets.length;\r\n\r\n\t\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\t\tdsMeta = metasets[i];\r\n\t\t\t\tif (dsMeta.index === datasetIndex) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tds = chart.data.datasets[dsMeta.index];\r\n\t\t\t\tif (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id) {\r\n\t\t\t\t\tstackedRightValue = +yScale.getRightValue(ds.data[index]);\r\n\t\t\t\t\tif (stackedRightValue < 0) {\r\n\t\t\t\t\t\tsumNeg += stackedRightValue || 0;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsumPos += stackedRightValue || 0;\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 (rightValue < 0) {\r\n\t\t\t\treturn yScale.getPixelForValue(sumNeg + rightValue);\r\n\t\t\t}\r\n\t\t\treturn yScale.getPixelForValue(sumPos + rightValue);\r\n\t\t}\r\n\t\treturn yScale.getPixelForValue(value);\r\n\t},\r\n\r\n\tupdateBezierControlPoints: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar lineModel = meta.dataset._model;\r\n\t\tvar area = chart.chartArea;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar i, ilen, model, controlPoints;\r\n\r\n\t\t// Only consider points that are drawn in case the spanGaps option is used\r\n\t\tif (lineModel.spanGaps) {\r\n\t\t\tpoints = points.filter(function(pt) {\r\n\t\t\t\treturn !pt._model.skip;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction capControlPoint(pt, min, max) {\r\n\t\t\treturn Math.max(Math.min(pt, max), min);\r\n\t\t}\r\n\r\n\t\tif (lineModel.cubicInterpolationMode === 'monotone') {\r\n\t\t\thelpers$1.splineCurveMonotone(points);\r\n\t\t} else {\r\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\tmodel = points[i]._model;\r\n\t\t\t\tcontrolPoints = helpers$1.splineCurve(\r\n\t\t\t\t\thelpers$1.previousItem(points, i)._model,\r\n\t\t\t\t\tmodel,\r\n\t\t\t\t\thelpers$1.nextItem(points, i)._model,\r\n\t\t\t\t\tlineModel.tension\r\n\t\t\t\t);\r\n\t\t\t\tmodel.controlPointPreviousX = controlPoints.previous.x;\r\n\t\t\t\tmodel.controlPointPreviousY = controlPoints.previous.y;\r\n\t\t\t\tmodel.controlPointNextX = controlPoints.next.x;\r\n\t\t\t\tmodel.controlPointNextY = controlPoints.next.y;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (chart.options.elements.line.capBezierPoints) {\r\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\tmodel = points[i]._model;\r\n\t\t\t\tif (isPointInArea(model, area)) {\r\n\t\t\t\t\tif (i > 0 && isPointInArea(points[i - 1]._model, area)) {\r\n\t\t\t\t\t\tmodel.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);\r\n\t\t\t\t\t\tmodel.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (i < points.length - 1 && isPointInArea(points[i + 1]._model, area)) {\r\n\t\t\t\t\t\tmodel.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);\r\n\t\t\t\t\t\tmodel.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);\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\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar points = meta.data || [];\r\n\t\tvar area = chart.chartArea;\r\n\t\tvar canvas = chart.canvas;\r\n\t\tvar i = 0;\r\n\t\tvar ilen = points.length;\r\n\t\tvar clip;\r\n\r\n\t\tif (me._showLine) {\r\n\t\t\tclip = meta.dataset._model.clip;\r\n\r\n\t\t\thelpers$1.canvas.clipArea(chart.ctx, {\r\n\t\t\t\tleft: clip.left === false ? 0 : area.left - clip.left,\r\n\t\t\t\tright: clip.right === false ? canvas.width : area.right + clip.right,\r\n\t\t\t\ttop: clip.top === false ? 0 : area.top - clip.top,\r\n\t\t\t\tbottom: clip.bottom === false ? canvas.height : area.bottom + clip.bottom\r\n\t\t\t});\r\n\r\n\t\t\tmeta.dataset.draw();\r\n\r\n\t\t\thelpers$1.canvas.unclipArea(chart.ctx);\r\n\t\t}\r\n\r\n\t\t// Draw the points\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tpoints[i].draw(area);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$6(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$6(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$6(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = valueOrDefault$6(options.hoverRadius, options.radius);\r\n\t},\r\n});\n\nvar resolve$3 = helpers$1.options.resolve;\r\n\r\ncore_defaults._set('polarArea', {\r\n\tscale: {\r\n\t\ttype: 'radialLinear',\r\n\t\tangleLines: {\r\n\t\t\tdisplay: false\r\n\t\t},\r\n\t\tgridLines: {\r\n\t\t\tcircular: true\r\n\t\t},\r\n\t\tpointLabels: {\r\n\t\t\tdisplay: false\r\n\t\t},\r\n\t\tticks: {\r\n\t\t\tbeginAtZero: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Boolean - Whether to animate the rotation of the chart\r\n\tanimation: {\r\n\t\tanimateRotate: true,\r\n\t\tanimateScale: true\r\n\t},\r\n\r\n\tstartAngle: -0.5 * Math.PI,\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar data = chart.data;\r\n\t\tvar datasets = data.datasets;\r\n\t\tvar labels = data.labels;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\t\tif (datasets.length) {\r\n\t\t\tfor (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\r\n\t\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\t\tlistItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\r\n\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\tlistItem.appendChild(document.createTextNode(labels[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t},\r\n\tlegend: {\r\n\t\tlabels: {\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar data = chart.data;\r\n\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\tvar style = meta.controller.getStyle(i);\r\n\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\t\thidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.index;\r\n\t\t\tvar chart = this.chart;\r\n\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t}\r\n\r\n\t\t\tchart.update();\r\n\t\t}\r\n\t},\r\n\r\n\t// Need to override these to give a nice default\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(item, data) {\r\n\t\t\t\treturn data.labels[item.index] + ': ' + item.yLabel;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_polarArea = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Arc,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'borderAlign',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar start = me.chart.options.startAngle || 0;\r\n\t\tvar starts = me._starts = [];\r\n\t\tvar angles = me._angles = [];\r\n\t\tvar arcs = meta.data;\r\n\t\tvar i, ilen, angle;\r\n\r\n\t\tme._updateRadius();\r\n\r\n\t\tmeta.count = me.countVisibleElements();\r\n\r\n\t\tfor (i = 0, ilen = dataset.data.length; i < ilen; i++) {\r\n\t\t\tstarts[i] = start;\r\n\t\t\tangle = me._computeAngle(i);\r\n\t\t\tangles[i] = angle;\r\n\t\t\tstart += angle;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\r\n\t\t\tme.updateElement(arcs[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_updateRadius: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\r\n\r\n\t\tchart.outerRadius = Math.max(minSize / 2, 0);\r\n\t\tchart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);\r\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\r\n\r\n\t\tme.outerRadius = chart.outerRadius - (chart.radiusLength * me.index);\r\n\t\tme.innerRadius = me.outerRadius - chart.radiusLength;\r\n\t},\r\n\r\n\tupdateElement: function(arc, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar opts = chart.options;\r\n\t\tvar animationOpts = opts.animation;\r\n\t\tvar scale = chart.scale;\r\n\t\tvar labels = chart.data.labels;\r\n\r\n\t\tvar centerX = scale.xCenter;\r\n\t\tvar centerY = scale.yCenter;\r\n\r\n\t\t// var negHalfPI = -0.5 * Math.PI;\r\n\t\tvar datasetStartAngle = opts.startAngle;\r\n\t\tvar distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\t\tvar startAngle = me._starts[index];\r\n\t\tvar endAngle = startAngle + (arc.hidden ? 0 : me._angles[index]);\r\n\r\n\t\tvar resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\t\tvar options = arc._options || {};\r\n\r\n\t\thelpers$1.extend(arc, {\r\n\t\t\t// Utility\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index,\r\n\t\t\t_scale: scale,\r\n\r\n\t\t\t// Desired view properties\r\n\t\t\t_model: {\r\n\t\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\t\tborderColor: options.borderColor,\r\n\t\t\t\tborderWidth: options.borderWidth,\r\n\t\t\t\tborderAlign: options.borderAlign,\r\n\t\t\t\tx: centerX,\r\n\t\t\t\ty: centerY,\r\n\t\t\t\tinnerRadius: 0,\r\n\t\t\t\touterRadius: reset ? resetRadius : distance,\r\n\t\t\t\tstartAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,\r\n\t\t\t\tendAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,\r\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(labels, index, labels[index])\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tarc.pivot();\r\n\t},\r\n\r\n\tcountVisibleElements: function() {\r\n\t\tvar dataset = this.getDataset();\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar count = 0;\r\n\r\n\t\thelpers$1.each(meta.data, function(element, index) {\r\n\t\t\tif (!isNaN(dataset.data[index]) && !element.hidden) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn count;\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(arc) {\r\n\t\tvar model = arc._model;\r\n\t\tvar options = arc._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\t\tvar valueOrDefault = helpers$1.valueOrDefault;\r\n\r\n\t\tarc.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault(options.hoverBorderWidth, options.borderWidth);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_computeAngle: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar count = this.getMeta().count;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar meta = me.getMeta();\r\n\r\n\t\tif (isNaN(dataset.data[index]) || meta.data[index].hidden) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: me.chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: dataset,\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\treturn resolve$3([\r\n\t\t\tme.chart.options.elements.arc.angle,\r\n\t\t\t(2 * Math.PI) / count\r\n\t\t], context, index);\r\n\t}\r\n});\n\ncore_defaults._set('pie', helpers$1.clone(core_defaults.doughnut));\r\ncore_defaults._set('pie', {\r\n\tcutoutPercentage: 0\r\n});\r\n\r\n// Pie charts are Doughnut chart with different defaults\r\nvar controller_pie = controller_doughnut;\n\nvar valueOrDefault$7 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('radar', {\r\n\tspanGaps: false,\r\n\tscale: {\r\n\t\ttype: 'radialLinear'\r\n\t},\r\n\telements: {\r\n\t\tline: {\r\n\t\t\tfill: 'start',\r\n\t\t\ttension: 0 // no bezier in radar\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_radar = core_datasetController.extend({\r\n\tdatasetElementType: elements.Line,\r\n\r\n\tdataElementType: elements.Point,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderWidth',\r\n\t\t'borderColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'fill'\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: {\r\n\t\tbackgroundColor: 'pointBackgroundColor',\r\n\t\tborderColor: 'pointBorderColor',\r\n\t\tborderWidth: 'pointBorderWidth',\r\n\t\thitRadius: 'pointHitRadius',\r\n\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\r\n\t\thoverBorderColor: 'pointHoverBorderColor',\r\n\t\thoverBorderWidth: 'pointHoverBorderWidth',\r\n\t\thoverRadius: 'pointHoverRadius',\r\n\t\tpointStyle: 'pointStyle',\r\n\t\tradius: 'pointRadius',\r\n\t\trotation: 'pointRotation'\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar line = meta.dataset;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar scale = me.chart.scale;\r\n\t\tvar config = me._config;\r\n\t\tvar i, ilen;\r\n\r\n\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\tif (config.tension !== undefined && config.lineTension === undefined) {\r\n\t\t\tconfig.lineTension = config.tension;\r\n\t\t}\r\n\r\n\t\t// Utility\r\n\t\tline._scale = scale;\r\n\t\tline._datasetIndex = me.index;\r\n\t\t// Data\r\n\t\tline._children = points;\r\n\t\tline._loop = true;\r\n\t\t// Model\r\n\t\tline._model = me._resolveDatasetElementOptions(line);\r\n\r\n\t\tline.pivot();\r\n\r\n\t\t// Update Points\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(points[i], i, reset);\r\n\t\t}\r\n\r\n\t\t// Update bezier control points\r\n\t\tme.updateBezierControlPoints();\r\n\r\n\t\t// Now pivot the point for animation\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tpoints[i].pivot();\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar scale = me.chart.scale;\r\n\t\tvar pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\t\tvar lineModel = me.getMeta().dataset._model;\r\n\t\tvar x = reset ? scale.xCenter : pointPosition.x;\r\n\t\tvar y = reset ? scale.yCenter : pointPosition.y;\r\n\r\n\t\t// Utility\r\n\t\tpoint._scale = scale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = me.index;\r\n\t\tpoint._index = index;\r\n\r\n\t\t// Desired view properties\r\n\t\tpoint._model = {\r\n\t\t\tx: x, // value not used in dataset scale, but we want a consistent API between scales\r\n\t\t\ty: y,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\t// Appearance\r\n\t\t\tradius: options.radius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\ttension: valueOrDefault$7(custom.tension, lineModel ? lineModel.tension : 0),\r\n\r\n\t\t\t// Tooltip\r\n\t\t\thitRadius: options.hitRadius\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar config = me._config;\r\n\t\tvar options = me.chart.options;\r\n\t\tvar values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);\r\n\r\n\t\tvalues.spanGaps = valueOrDefault$7(config.spanGaps, options.spanGaps);\r\n\t\tvalues.tension = valueOrDefault$7(config.lineTension, options.elements.line.tension);\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tupdateBezierControlPoints: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar area = me.chart.chartArea;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar i, ilen, model, controlPoints;\r\n\r\n\t\t// Only consider points that are drawn in case the spanGaps option is used\r\n\t\tif (meta.dataset._model.spanGaps) {\r\n\t\t\tpoints = points.filter(function(pt) {\r\n\t\t\t\treturn !pt._model.skip;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction capControlPoint(pt, min, max) {\r\n\t\t\treturn Math.max(Math.min(pt, max), min);\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tmodel = points[i]._model;\r\n\t\t\tcontrolPoints = helpers$1.splineCurve(\r\n\t\t\t\thelpers$1.previousItem(points, i, true)._model,\r\n\t\t\t\tmodel,\r\n\t\t\t\thelpers$1.nextItem(points, i, true)._model,\r\n\t\t\t\tmodel.tension\r\n\t\t\t);\r\n\r\n\t\t\t// Prevent the bezier going outside of the bounds of the graph\r\n\t\t\tmodel.controlPointPreviousX = capControlPoint(controlPoints.previous.x, area.left, area.right);\r\n\t\t\tmodel.controlPointPreviousY = capControlPoint(controlPoints.previous.y, area.top, area.bottom);\r\n\t\t\tmodel.controlPointNextX = capControlPoint(controlPoints.next.x, area.left, area.right);\r\n\t\t\tmodel.controlPointNextY = capControlPoint(controlPoints.next.y, area.top, area.bottom);\r\n\t\t}\r\n\t},\r\n\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$7(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$7(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$7(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = valueOrDefault$7(options.hoverRadius, options.radius);\r\n\t}\r\n});\n\ncore_defaults._set('scatter', {\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\tid: 'x-axis-1', // need an ID so datasets can reference the scale\r\n\t\t\ttype: 'linear', // scatter should not use a category axis\r\n\t\t\tposition: 'bottom'\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\tid: 'y-axis-1',\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'left'\r\n\t\t}]\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn ''; // doesn't make sense for scatter since data are formatted as a point\r\n\t\t\t},\r\n\t\t\tlabel: function(item) {\r\n\t\t\t\treturn '(' + item.xLabel + ', ' + item.yLabel + ')';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\tscatter: {\r\n\t\t\tshowLine: false\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Scatter charts use line controllers\r\nvar controller_scatter = controller_line;\n\n// NOTE export a map in which the key represents the controller type, not\r\n// the class, and so must be CamelCase in order to be correctly retrieved\r\n// by the controller in core.controller.js (`controllers[meta.type]`).\r\n\r\nvar controllers = {\r\n\tbar: controller_bar,\r\n\tbubble: controller_bubble,\r\n\tdoughnut: controller_doughnut,\r\n\thorizontalBar: controller_horizontalBar,\r\n\tline: controller_line,\r\n\tpolarArea: controller_polarArea,\r\n\tpie: controller_pie,\r\n\tradar: controller_radar,\r\n\tscatter: controller_scatter\r\n};\n\n/**\r\n * Helper function to get relative position for an event\r\n * @param {Event|IEvent} event - The event to get the position for\r\n * @param {Chart} chart - The chart\r\n * @returns {object} the event position\r\n */\r\nfunction getRelativePosition(e, chart) {\r\n\tif (e.native) {\r\n\t\treturn {\r\n\t\t\tx: e.x,\r\n\t\t\ty: e.y\r\n\t\t};\r\n\t}\r\n\r\n\treturn helpers$1.getRelativePosition(e, chart);\r\n}\r\n\r\n/**\r\n * Helper function to traverse all of the visible elements in the chart\r\n * @param {Chart} chart - the chart\r\n * @param {function} handler - the callback to execute for each visible item\r\n */\r\nfunction parseVisibleItems(chart, handler) {\r\n\tvar metasets = chart._getSortedVisibleDatasetMetas();\r\n\tvar metadata, i, j, ilen, jlen, element;\r\n\r\n\tfor (i = 0, ilen = metasets.length; i < ilen; ++i) {\r\n\t\tmetadata = metasets[i].data;\r\n\t\tfor (j = 0, jlen = metadata.length; j < jlen; ++j) {\r\n\t\t\telement = metadata[j];\r\n\t\t\tif (!element._view.skip) {\r\n\t\t\t\thandler(element);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Helper function to get the items that intersect the event position\r\n * @param {ChartElement[]} items - elements to filter\r\n * @param {object} position - the point to be nearest to\r\n * @return {ChartElement[]} the nearest items\r\n */\r\nfunction getIntersectItems(chart, position) {\r\n\tvar elements = [];\r\n\r\n\tparseVisibleItems(chart, function(element) {\r\n\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\telements.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn elements;\r\n}\r\n\r\n/**\r\n * Helper function to get the items nearest to the event position considering all visible items in teh chart\r\n * @param {Chart} chart - the chart to look at elements from\r\n * @param {object} position - the point to be nearest to\r\n * @param {boolean} intersect - if true, only consider items that intersect the position\r\n * @param {function} distanceMetric - function to provide the distance between points\r\n * @return {ChartElement[]} the nearest items\r\n */\r\nfunction getNearestItems(chart, position, intersect, distanceMetric) {\r\n\tvar minDistance = Number.POSITIVE_INFINITY;\r\n\tvar nearestItems = [];\r\n\r\n\tparseVisibleItems(chart, function(element) {\r\n\t\tif (intersect && !element.inRange(position.x, position.y)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar center = element.getCenterPoint();\r\n\t\tvar distance = distanceMetric(position, center);\r\n\t\tif (distance < minDistance) {\r\n\t\t\tnearestItems = [element];\r\n\t\t\tminDistance = distance;\r\n\t\t} else if (distance === minDistance) {\r\n\t\t\t// Can have multiple items at the same distance in which case we sort by size\r\n\t\t\tnearestItems.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn nearestItems;\r\n}\r\n\r\n/**\r\n * Get a distance metric function for two points based on the\r\n * axis mode setting\r\n * @param {string} axis - the axis mode. x|y|xy\r\n */\r\nfunction getDistanceMetricForAxis(axis) {\r\n\tvar useX = axis.indexOf('x') !== -1;\r\n\tvar useY = axis.indexOf('y') !== -1;\r\n\r\n\treturn function(pt1, pt2) {\r\n\t\tvar deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\r\n\t\tvar deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\r\n\t\treturn Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\r\n\t};\r\n}\r\n\r\nfunction indexMode(chart, e, options) {\r\n\tvar position = getRelativePosition(e, chart);\r\n\t// Default axis for index mode is 'x' to match old behaviour\r\n\toptions.axis = options.axis || 'x';\r\n\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\r\n\tvar elements = [];\r\n\r\n\tif (!items.length) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tchart._getSortedVisibleDatasetMetas().forEach(function(meta) {\r\n\t\tvar element = meta.data[items[0]._index];\r\n\r\n\t\t// don't count items that are skipped (null data)\r\n\t\tif (element && !element._view.skip) {\r\n\t\t\telements.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn elements;\r\n}\r\n\r\n/**\r\n * @interface IInteractionOptions\r\n */\r\n/**\r\n * If true, only consider items that intersect the point\r\n * @name IInterfaceOptions#boolean\r\n * @type Boolean\r\n */\r\n\r\n/**\r\n * Contains interaction related functions\r\n * @namespace Chart.Interaction\r\n */\r\nvar core_interaction = {\r\n\t// Helper function for different modes\r\n\tmodes: {\r\n\t\tsingle: function(chart, e) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar elements = [];\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\telements.push(element);\r\n\t\t\t\t\treturn elements;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn elements.slice(0, 1);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @function Chart.Interaction.modes.label\r\n\t\t * @deprecated since version 2.4.0\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\tlabel: indexMode,\r\n\r\n\t\t/**\r\n\t\t * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something\r\n\t\t * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item\r\n\t\t * @function Chart.Interaction.modes.index\r\n\t\t * @since v2.4.0\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use during interaction\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tindex: indexMode,\r\n\r\n\t\t/**\r\n\t\t * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something\r\n\t\t * If the options.intersect is false, we find the nearest item and return the items in that dataset\r\n\t\t * @function Chart.Interaction.modes.dataset\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use during interaction\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tdataset: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\toptions.axis = options.axis || 'xy';\r\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\t\t\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\r\n\r\n\t\t\tif (items.length > 0) {\r\n\t\t\t\titems = chart.getDatasetMeta(items[0]._datasetIndex).data;\r\n\t\t\t}\r\n\r\n\t\t\treturn items;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @function Chart.Interaction.modes.x-axis\r\n\t\t * @deprecated since version 2.4.0. Use index mode and intersect == true\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\t'x-axis': function(chart, e) {\r\n\t\t\treturn indexMode(chart, e, {intersect: false});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Point mode returns all elements that hit test based on the event position\r\n\t\t * of the event\r\n\t\t * @function Chart.Interaction.modes.intersect\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tpoint: function(chart, e) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\treturn getIntersectItems(chart, position);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * nearest mode returns the element closest to the point\r\n\t\t * @function Chart.Interaction.modes.intersect\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tnearest: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\toptions.axis = options.axis || 'xy';\r\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\t\t\treturn getNearestItems(chart, position, options.intersect, distanceMetric);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * x mode returns the elements that hit-test at the current x coordinate\r\n\t\t * @function Chart.Interaction.modes.x\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tx: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar items = [];\r\n\t\t\tvar intersectsItem = false;\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inXRange(position.x)) {\r\n\t\t\t\t\titems.push(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\tintersectsItem = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// If we want to trigger on an intersect and we don't have any items\r\n\t\t\t// that intersect the position, return nothing\r\n\t\t\tif (options.intersect && !intersectsItem) {\r\n\t\t\t\titems = [];\r\n\t\t\t}\r\n\t\t\treturn items;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * y mode returns the elements that hit-test at the current y coordinate\r\n\t\t * @function Chart.Interaction.modes.y\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\ty: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar items = [];\r\n\t\t\tvar intersectsItem = false;\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inYRange(position.y)) {\r\n\t\t\t\t\titems.push(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\tintersectsItem = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// If we want to trigger on an intersect and we don't have any items\r\n\t\t\t// that intersect the position, return nothing\r\n\t\t\tif (options.intersect && !intersectsItem) {\r\n\t\t\t\titems = [];\r\n\t\t\t}\r\n\t\t\treturn items;\r\n\t\t}\r\n\t}\r\n};\n\nvar extend = helpers$1.extend;\r\n\r\nfunction filterByPosition(array, position) {\r\n\treturn helpers$1.where(array, function(v) {\r\n\t\treturn v.pos === position;\r\n\t});\r\n}\r\n\r\nfunction sortByWeight(array, reverse) {\r\n\treturn array.sort(function(a, b) {\r\n\t\tvar v0 = reverse ? b : a;\r\n\t\tvar v1 = reverse ? a : b;\r\n\t\treturn v0.weight === v1.weight ?\r\n\t\t\tv0.index - v1.index :\r\n\t\t\tv0.weight - v1.weight;\r\n\t});\r\n}\r\n\r\nfunction wrapBoxes(boxes) {\r\n\tvar layoutBoxes = [];\r\n\tvar i, ilen, box;\r\n\r\n\tfor (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {\r\n\t\tbox = boxes[i];\r\n\t\tlayoutBoxes.push({\r\n\t\t\tindex: i,\r\n\t\t\tbox: box,\r\n\t\t\tpos: box.position,\r\n\t\t\thorizontal: box.isHorizontal(),\r\n\t\t\tweight: box.weight\r\n\t\t});\r\n\t}\r\n\treturn layoutBoxes;\r\n}\r\n\r\nfunction setLayoutDims(layouts, params) {\r\n\tvar i, ilen, layout;\r\n\tfor (i = 0, ilen = layouts.length; i < ilen; ++i) {\r\n\t\tlayout = layouts[i];\r\n\t\t// store width used instead of chartArea.w in fitBoxes\r\n\t\tlayout.width = layout.horizontal\r\n\t\t\t? layout.box.fullWidth && params.availableWidth\r\n\t\t\t: params.vBoxMaxWidth;\r\n\t\t// store height used instead of chartArea.h in fitBoxes\r\n\t\tlayout.height = layout.horizontal && params.hBoxMaxHeight;\r\n\t}\r\n}\r\n\r\nfunction buildLayoutBoxes(boxes) {\r\n\tvar layoutBoxes = wrapBoxes(boxes);\r\n\tvar left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\r\n\tvar right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\r\n\tvar top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\r\n\tvar bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\r\n\r\n\treturn {\r\n\t\tleftAndTop: left.concat(top),\r\n\t\trightAndBottom: right.concat(bottom),\r\n\t\tchartArea: filterByPosition(layoutBoxes, 'chartArea'),\r\n\t\tvertical: left.concat(right),\r\n\t\thorizontal: top.concat(bottom)\r\n\t};\r\n}\r\n\r\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\r\n\treturn Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\r\n}\r\n\r\nfunction updateDims(chartArea, params, layout) {\r\n\tvar box = layout.box;\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\tvar newWidth, newHeight;\r\n\r\n\tif (layout.size) {\r\n\t\t// this layout was already counted for, lets first reduce old size\r\n\t\tchartArea[layout.pos] -= layout.size;\r\n\t}\r\n\tlayout.size = layout.horizontal ? box.height : box.width;\r\n\tchartArea[layout.pos] += layout.size;\r\n\r\n\tif (box.getPadding) {\r\n\t\tvar boxPadding = box.getPadding();\r\n\t\tmaxPadding.top = Math.max(maxPadding.top, boxPadding.top);\r\n\t\tmaxPadding.left = Math.max(maxPadding.left, boxPadding.left);\r\n\t\tmaxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\r\n\t\tmaxPadding.right = Math.max(maxPadding.right, boxPadding.right);\r\n\t}\r\n\r\n\tnewWidth = params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right');\r\n\tnewHeight = params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom');\r\n\r\n\tif (newWidth !== chartArea.w || newHeight !== chartArea.h) {\r\n\t\tchartArea.w = newWidth;\r\n\t\tchartArea.h = newHeight;\r\n\r\n\t\t// return true if chart area changed in layout's direction\r\n\t\tvar sizes = layout.horizontal ? [newWidth, chartArea.w] : [newHeight, chartArea.h];\r\n\t\treturn sizes[0] !== sizes[1] && (!isNaN(sizes[0]) || !isNaN(sizes[1]));\r\n\t}\r\n}\r\n\r\nfunction handleMaxPadding(chartArea) {\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\r\n\tfunction updatePos(pos) {\r\n\t\tvar change = Math.max(maxPadding[pos] - chartArea[pos], 0);\r\n\t\tchartArea[pos] += change;\r\n\t\treturn change;\r\n\t}\r\n\tchartArea.y += updatePos('top');\r\n\tchartArea.x += updatePos('left');\r\n\tupdatePos('right');\r\n\tupdatePos('bottom');\r\n}\r\n\r\nfunction getMargins(horizontal, chartArea) {\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\r\n\tfunction marginForPositions(positions) {\r\n\t\tvar margin = {left: 0, top: 0, right: 0, bottom: 0};\r\n\t\tpositions.forEach(function(pos) {\r\n\t\t\tmargin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\r\n\t\t});\r\n\t\treturn margin;\r\n\t}\r\n\r\n\treturn horizontal\r\n\t\t? marginForPositions(['left', 'right'])\r\n\t\t: marginForPositions(['top', 'bottom']);\r\n}\r\n\r\nfunction fitBoxes(boxes, chartArea, params) {\r\n\tvar refitBoxes = [];\r\n\tvar i, ilen, layout, box, refit, changed;\r\n\r\n\tfor (i = 0, ilen = boxes.length; i < ilen; ++i) {\r\n\t\tlayout = boxes[i];\r\n\t\tbox = layout.box;\r\n\r\n\t\tbox.update(\r\n\t\t\tlayout.width || chartArea.w,\r\n\t\t\tlayout.height || chartArea.h,\r\n\t\t\tgetMargins(layout.horizontal, chartArea)\r\n\t\t);\r\n\t\tif (updateDims(chartArea, params, layout)) {\r\n\t\t\tchanged = true;\r\n\t\t\tif (refitBoxes.length) {\r\n\t\t\t\t// Dimensions changed and there were non full width boxes before this\r\n\t\t\t\t// -> we have to refit those\r\n\t\t\t\trefit = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!box.fullWidth) { // fullWidth boxes don't need to be re-fitted in any case\r\n\t\t\trefitBoxes.push(layout);\r\n\t\t}\r\n\t}\r\n\r\n\treturn refit ? fitBoxes(refitBoxes, chartArea, params) || changed : changed;\r\n}\r\n\r\nfunction placeBoxes(boxes, chartArea, params) {\r\n\tvar userPadding = params.padding;\r\n\tvar x = chartArea.x;\r\n\tvar y = chartArea.y;\r\n\tvar i, ilen, layout, box;\r\n\r\n\tfor (i = 0, ilen = boxes.length; i < ilen; ++i) {\r\n\t\tlayout = boxes[i];\r\n\t\tbox = layout.box;\r\n\t\tif (layout.horizontal) {\r\n\t\t\tbox.left = box.fullWidth ? userPadding.left : chartArea.left;\r\n\t\t\tbox.right = box.fullWidth ? params.outerWidth - userPadding.right : chartArea.left + chartArea.w;\r\n\t\t\tbox.top = y;\r\n\t\t\tbox.bottom = y + box.height;\r\n\t\t\tbox.width = box.right - box.left;\r\n\t\t\ty = box.bottom;\r\n\t\t} else {\r\n\t\t\tbox.left = x;\r\n\t\t\tbox.right = x + box.width;\r\n\t\t\tbox.top = chartArea.top;\r\n\t\t\tbox.bottom = chartArea.top + chartArea.h;\r\n\t\t\tbox.height = box.bottom - box.top;\r\n\t\t\tx = box.right;\r\n\t\t}\r\n\t}\r\n\r\n\tchartArea.x = x;\r\n\tchartArea.y = y;\r\n}\r\n\r\ncore_defaults._set('global', {\r\n\tlayout: {\r\n\t\tpadding: {\r\n\t\t\ttop: 0,\r\n\t\t\tright: 0,\r\n\t\t\tbottom: 0,\r\n\t\t\tleft: 0\r\n\t\t}\r\n\t}\r\n});\r\n\r\n/**\r\n * @interface ILayoutItem\r\n * @prop {string} position - The position of the item in the chart layout. Possible values are\r\n * 'left', 'top', 'right', 'bottom', and 'chartArea'\r\n * @prop {number} weight - The weight used to sort the item. Higher weights are further away from the chart area\r\n * @prop {boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down\r\n * @prop {function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom)\r\n * @prop {function} update - Takes two parameters: width and height. Returns size of item\r\n * @prop {function} getPadding - Returns an object with padding on the edges\r\n * @prop {number} width - Width of item. Must be valid after update()\r\n * @prop {number} height - Height of item. Must be valid after update()\r\n * @prop {number} left - Left edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} top - Top edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} right - Right edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update\r\n */\r\n\r\n// The layout service is very self explanatory. It's responsible for the layout within a chart.\r\n// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need\r\n// It is this service's responsibility of carrying out that layout.\r\nvar core_layouts = {\r\n\tdefaults: {},\r\n\r\n\t/**\r\n\t * Register a box to a chart.\r\n\t * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title.\r\n\t * @param {Chart} chart - the chart to use\r\n\t * @param {ILayoutItem} item - the item to add to be layed out\r\n\t */\r\n\taddBox: function(chart, item) {\r\n\t\tif (!chart.boxes) {\r\n\t\t\tchart.boxes = [];\r\n\t\t}\r\n\r\n\t\t// initialize item with default values\r\n\t\titem.fullWidth = item.fullWidth || false;\r\n\t\titem.position = item.position || 'top';\r\n\t\titem.weight = item.weight || 0;\r\n\t\titem._layers = item._layers || function() {\r\n\t\t\treturn [{\r\n\t\t\t\tz: 0,\r\n\t\t\t\tdraw: function() {\r\n\t\t\t\t\titem.draw.apply(item, arguments);\r\n\t\t\t\t}\r\n\t\t\t}];\r\n\t\t};\r\n\r\n\t\tchart.boxes.push(item);\r\n\t},\r\n\r\n\t/**\r\n\t * Remove a layoutItem from a chart\r\n\t * @param {Chart} chart - the chart to remove the box from\r\n\t * @param {ILayoutItem} layoutItem - the item to remove from the layout\r\n\t */\r\n\tremoveBox: function(chart, layoutItem) {\r\n\t\tvar index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\r\n\t\tif (index !== -1) {\r\n\t\t\tchart.boxes.splice(index, 1);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Sets (or updates) options on the given `item`.\r\n\t * @param {Chart} chart - the chart in which the item lives (or will be added to)\r\n\t * @param {ILayoutItem} item - the item to configure with the given options\r\n\t * @param {object} options - the new item options.\r\n\t */\r\n\tconfigure: function(chart, item, options) {\r\n\t\tvar props = ['fullWidth', 'position', 'weight'];\r\n\t\tvar ilen = props.length;\r\n\t\tvar i = 0;\r\n\t\tvar prop;\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tprop = props[i];\r\n\t\t\tif (options.hasOwnProperty(prop)) {\r\n\t\t\t\titem[prop] = options[prop];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Fits boxes of the given chart into the given size by having each box measure itself\r\n\t * then running a fitting algorithm\r\n\t * @param {Chart} chart - the chart\r\n\t * @param {number} width - the width to fit into\r\n\t * @param {number} height - the height to fit into\r\n\t */\r\n\tupdate: function(chart, width, height) {\r\n\t\tif (!chart) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar layoutOptions = chart.options.layout || {};\r\n\t\tvar padding = helpers$1.options.toPadding(layoutOptions.padding);\r\n\r\n\t\tvar availableWidth = width - padding.width;\r\n\t\tvar availableHeight = height - padding.height;\r\n\t\tvar boxes = buildLayoutBoxes(chart.boxes);\r\n\t\tvar verticalBoxes = boxes.vertical;\r\n\t\tvar horizontalBoxes = boxes.horizontal;\r\n\r\n\t\t// Essentially we now have any number of boxes on each of the 4 sides.\r\n\t\t// Our canvas looks like the following.\r\n\t\t// The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and\r\n\t\t// B1 is the bottom axis\r\n\t\t// There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays\r\n\t\t// These locations are single-box locations only, when trying to register a chartArea location that is already taken,\r\n\t\t// an error will be thrown.\r\n\t\t//\r\n\t\t// |----------------------------------------------------|\r\n\t\t// | T1 (Full Width) |\r\n\t\t// |----------------------------------------------------|\r\n\t\t// | | | T2 | |\r\n\t\t// | |----|-------------------------------------|----|\r\n\t\t// | | | C1 | | C2 | |\r\n\t\t// | | |----| |----| |\r\n\t\t// | | | | |\r\n\t\t// | L1 | L2 | ChartArea (C0) | R1 |\r\n\t\t// | | | | |\r\n\t\t// | | |----| |----| |\r\n\t\t// | | | C3 | | C4 | |\r\n\t\t// | |----|-------------------------------------|----|\r\n\t\t// | | | B1 | |\r\n\t\t// |----------------------------------------------------|\r\n\t\t// | B2 (Full Width) |\r\n\t\t// |----------------------------------------------------|\r\n\t\t//\r\n\r\n\t\tvar params = Object.freeze({\r\n\t\t\touterWidth: width,\r\n\t\t\touterHeight: height,\r\n\t\t\tpadding: padding,\r\n\t\t\tavailableWidth: availableWidth,\r\n\t\t\tvBoxMaxWidth: availableWidth / 2 / verticalBoxes.length,\r\n\t\t\thBoxMaxHeight: availableHeight / 2\r\n\t\t});\r\n\t\tvar chartArea = extend({\r\n\t\t\tmaxPadding: extend({}, padding),\r\n\t\t\tw: availableWidth,\r\n\t\t\th: availableHeight,\r\n\t\t\tx: padding.left,\r\n\t\t\ty: padding.top\r\n\t\t}, padding);\r\n\r\n\t\tsetLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\r\n\r\n\t\t// First fit vertical boxes\r\n\t\tfitBoxes(verticalBoxes, chartArea, params);\r\n\r\n\t\t// Then fit horizontal boxes\r\n\t\tif (fitBoxes(horizontalBoxes, chartArea, params)) {\r\n\t\t\t// if the area changed, re-fit vertical boxes\r\n\t\t\tfitBoxes(verticalBoxes, chartArea, params);\r\n\t\t}\r\n\r\n\t\thandleMaxPadding(chartArea);\r\n\r\n\t\t// Finally place the boxes to correct coordinates\r\n\t\tplaceBoxes(boxes.leftAndTop, chartArea, params);\r\n\r\n\t\t// Move to opposite side of chart\r\n\t\tchartArea.x += chartArea.w;\r\n\t\tchartArea.y += chartArea.h;\r\n\r\n\t\tplaceBoxes(boxes.rightAndBottom, chartArea, params);\r\n\r\n\t\tchart.chartArea = {\r\n\t\t\tleft: chartArea.left,\r\n\t\t\ttop: chartArea.top,\r\n\t\t\tright: chartArea.left + chartArea.w,\r\n\t\t\tbottom: chartArea.top + chartArea.h\r\n\t\t};\r\n\r\n\t\t// Finally update boxes in chartArea (radial scale for example)\r\n\t\thelpers$1.each(boxes.chartArea, function(layout) {\r\n\t\t\tvar box = layout.box;\r\n\t\t\textend(box, chart.chartArea);\r\n\t\t\tbox.update(chartArea.w, chartArea.h);\r\n\t\t});\r\n\t}\r\n};\n\n/**\r\n * Platform fallback implementation (minimal).\r\n * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939\r\n */\r\n\r\nvar platform_basic = {\r\n\tacquireContext: function(item) {\r\n\t\tif (item && item.canvas) {\r\n\t\t\t// Support for any object associated to a canvas (including a context2d)\r\n\t\t\titem = item.canvas;\r\n\t\t}\r\n\r\n\t\treturn item && item.getContext('2d') || null;\r\n\t}\r\n};\n\nvar platform_dom = \"/*\\r\\n * DOM element rendering detection\\r\\n * https://davidwalsh.name/detect-node-insertion\\r\\n */\\r\\n@keyframes chartjs-render-animation {\\r\\n\\tfrom { opacity: 0.99; }\\r\\n\\tto { opacity: 1; }\\r\\n}\\r\\n\\r\\n.chartjs-render-monitor {\\r\\n\\tanimation: chartjs-render-animation 0.001s;\\r\\n}\\r\\n\\r\\n/*\\r\\n * DOM element resizing detection\\r\\n * https://github.com/marcj/css-element-queries\\r\\n */\\r\\n.chartjs-size-monitor,\\r\\n.chartjs-size-monitor-expand,\\r\\n.chartjs-size-monitor-shrink {\\r\\n\\tposition: absolute;\\r\\n\\tdirection: ltr;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n\\tright: 0;\\r\\n\\tbottom: 0;\\r\\n\\toverflow: hidden;\\r\\n\\tpointer-events: none;\\r\\n\\tvisibility: hidden;\\r\\n\\tz-index: -1;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-expand > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 1000000px;\\r\\n\\theight: 1000000px;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-shrink > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 200%;\\r\\n\\theight: 200%;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\";\n\nvar platform_dom$1 = /*#__PURE__*/Object.freeze({\n__proto__: null,\n'default': platform_dom\n});\n\nvar stylesheet = getCjsExportFromNamespace(platform_dom$1);\n\nvar EXPANDO_KEY = '$chartjs';\r\nvar CSS_PREFIX = 'chartjs-';\r\nvar CSS_SIZE_MONITOR = CSS_PREFIX + 'size-monitor';\r\nvar CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor';\r\nvar CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation';\r\nvar ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart'];\r\n\r\n/**\r\n * DOM event types -> Chart.js event types.\r\n * Note: only events with different types are mapped.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/Events\r\n */\r\nvar EVENT_TYPES = {\r\n\ttouchstart: 'mousedown',\r\n\ttouchmove: 'mousemove',\r\n\ttouchend: 'mouseup',\r\n\tpointerenter: 'mouseenter',\r\n\tpointerdown: 'mousedown',\r\n\tpointermove: 'mousemove',\r\n\tpointerup: 'mouseup',\r\n\tpointerleave: 'mouseout',\r\n\tpointerout: 'mouseout'\r\n};\r\n\r\n/**\r\n * The \"used\" size is the final value of a dimension property after all calculations have\r\n * been performed. This method uses the computed style of `element` but returns undefined\r\n * if the computed style is not expressed in pixels. That can happen in some cases where\r\n * `element` has a size relative to its parent and this last one is not yet displayed,\r\n * for example because of `display: none` on a parent node.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\r\n * @returns {number} Size in pixels or undefined if unknown.\r\n */\r\nfunction readUsedSize(element, property) {\r\n\tvar value = helpers$1.getStyle(element, property);\r\n\tvar matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\r\n\treturn matches ? Number(matches[1]) : undefined;\r\n}\r\n\r\n/**\r\n * Initializes the canvas style and render size without modifying the canvas display size,\r\n * since responsiveness is handled by the controller.resize() method. The config is used\r\n * to determine the aspect ratio to apply in case no explicit height has been specified.\r\n */\r\nfunction initCanvas(canvas, config) {\r\n\tvar style = canvas.style;\r\n\r\n\t// NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it\r\n\t// returns null or '' if no explicit value has been set to the canvas attribute.\r\n\tvar renderHeight = canvas.getAttribute('height');\r\n\tvar renderWidth = canvas.getAttribute('width');\r\n\r\n\t// Chart.js modifies some canvas values that we want to restore on destroy\r\n\tcanvas[EXPANDO_KEY] = {\r\n\t\tinitial: {\r\n\t\t\theight: renderHeight,\r\n\t\t\twidth: renderWidth,\r\n\t\t\tstyle: {\r\n\t\t\t\tdisplay: style.display,\r\n\t\t\t\theight: style.height,\r\n\t\t\t\twidth: style.width\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// Force canvas to display as block to avoid extra space caused by inline\r\n\t// elements, which would interfere with the responsive resize process.\r\n\t// https://github.com/chartjs/Chart.js/issues/2538\r\n\tstyle.display = style.display || 'block';\r\n\r\n\tif (renderWidth === null || renderWidth === '') {\r\n\t\tvar displayWidth = readUsedSize(canvas, 'width');\r\n\t\tif (displayWidth !== undefined) {\r\n\t\t\tcanvas.width = displayWidth;\r\n\t\t}\r\n\t}\r\n\r\n\tif (renderHeight === null || renderHeight === '') {\r\n\t\tif (canvas.style.height === '') {\r\n\t\t\t// If no explicit render height and style height, let's apply the aspect ratio,\r\n\t\t\t// which one can be specified by the user but also by charts as default option\r\n\t\t\t// (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.\r\n\t\t\tcanvas.height = canvas.width / (config.options.aspectRatio || 2);\r\n\t\t} else {\r\n\t\t\tvar displayHeight = readUsedSize(canvas, 'height');\r\n\t\t\tif (displayWidth !== undefined) {\r\n\t\t\t\tcanvas.height = displayHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn canvas;\r\n}\r\n\r\n/**\r\n * Detects support for options object argument in addEventListener.\r\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\r\n * @private\r\n */\r\nvar supportsEventListenerOptions = (function() {\r\n\tvar supports = false;\r\n\ttry {\r\n\t\tvar options = Object.defineProperty({}, 'passive', {\r\n\t\t\t// eslint-disable-next-line getter-return\r\n\t\t\tget: function() {\r\n\t\t\t\tsupports = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\twindow.addEventListener('e', null, options);\r\n\t} catch (e) {\r\n\t\t// continue regardless of error\r\n\t}\r\n\treturn supports;\r\n}());\r\n\r\n// Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events.\r\n// https://github.com/chartjs/Chart.js/issues/4287\r\nvar eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;\r\n\r\nfunction addListener(node, type, listener) {\r\n\tnode.addEventListener(type, listener, eventListenerOptions);\r\n}\r\n\r\nfunction removeListener(node, type, listener) {\r\n\tnode.removeEventListener(type, listener, eventListenerOptions);\r\n}\r\n\r\nfunction createEvent(type, chart, x, y, nativeEvent) {\r\n\treturn {\r\n\t\ttype: type,\r\n\t\tchart: chart,\r\n\t\tnative: nativeEvent || null,\r\n\t\tx: x !== undefined ? x : null,\r\n\t\ty: y !== undefined ? y : null,\r\n\t};\r\n}\r\n\r\nfunction fromNativeEvent(event, chart) {\r\n\tvar type = EVENT_TYPES[event.type] || event.type;\r\n\tvar pos = helpers$1.getRelativePosition(event, chart);\r\n\treturn createEvent(type, chart, pos.x, pos.y, event);\r\n}\r\n\r\nfunction throttled(fn, thisArg) {\r\n\tvar ticking = false;\r\n\tvar args = [];\r\n\r\n\treturn function() {\r\n\t\targs = Array.prototype.slice.call(arguments);\r\n\t\tthisArg = thisArg || this;\r\n\r\n\t\tif (!ticking) {\r\n\t\t\tticking = true;\r\n\t\t\thelpers$1.requestAnimFrame.call(window, function() {\r\n\t\t\t\tticking = false;\r\n\t\t\t\tfn.apply(thisArg, args);\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction createDiv(cls) {\r\n\tvar el = document.createElement('div');\r\n\tel.className = cls || '';\r\n\treturn el;\r\n}\r\n\r\n// Implementation based on https://github.com/marcj/css-element-queries\r\nfunction createResizer(handler) {\r\n\tvar maxSize = 1000000;\r\n\r\n\t// NOTE(SB) Don't use innerHTML because it could be considered unsafe.\r\n\t// https://github.com/chartjs/Chart.js/issues/5902\r\n\tvar resizer = createDiv(CSS_SIZE_MONITOR);\r\n\tvar expand = createDiv(CSS_SIZE_MONITOR + '-expand');\r\n\tvar shrink = createDiv(CSS_SIZE_MONITOR + '-shrink');\r\n\r\n\texpand.appendChild(createDiv());\r\n\tshrink.appendChild(createDiv());\r\n\r\n\tresizer.appendChild(expand);\r\n\tresizer.appendChild(shrink);\r\n\tresizer._reset = function() {\r\n\t\texpand.scrollLeft = maxSize;\r\n\t\texpand.scrollTop = maxSize;\r\n\t\tshrink.scrollLeft = maxSize;\r\n\t\tshrink.scrollTop = maxSize;\r\n\t};\r\n\r\n\tvar onScroll = function() {\r\n\t\tresizer._reset();\r\n\t\thandler();\r\n\t};\r\n\r\n\taddListener(expand, 'scroll', onScroll.bind(expand, 'expand'));\r\n\taddListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink'));\r\n\r\n\treturn resizer;\r\n}\r\n\r\n// https://davidwalsh.name/detect-node-insertion\r\nfunction watchForRender(node, handler) {\r\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\r\n\tvar proxy = expando.renderProxy = function(e) {\r\n\t\tif (e.animationName === CSS_RENDER_ANIMATION) {\r\n\t\t\thandler();\r\n\t\t}\r\n\t};\r\n\r\n\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\r\n\t\taddListener(node, type, proxy);\r\n\t});\r\n\r\n\t// #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class\r\n\t// is removed then added back immediately (same animation frame?). Accessing the\r\n\t// `offsetParent` property will force a reflow and re-evaluate the CSS animation.\r\n\t// https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics\r\n\t// https://github.com/chartjs/Chart.js/issues/4737\r\n\texpando.reflow = !!node.offsetParent;\r\n\r\n\tnode.classList.add(CSS_RENDER_MONITOR);\r\n}\r\n\r\nfunction unwatchForRender(node) {\r\n\tvar expando = node[EXPANDO_KEY] || {};\r\n\tvar proxy = expando.renderProxy;\r\n\r\n\tif (proxy) {\r\n\t\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\r\n\t\t\tremoveListener(node, type, proxy);\r\n\t\t});\r\n\r\n\t\tdelete expando.renderProxy;\r\n\t}\r\n\r\n\tnode.classList.remove(CSS_RENDER_MONITOR);\r\n}\r\n\r\nfunction addResizeListener(node, listener, chart) {\r\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\r\n\r\n\t// Let's keep track of this added resizer and thus avoid DOM query when removing it.\r\n\tvar resizer = expando.resizer = createResizer(throttled(function() {\r\n\t\tif (expando.resizer) {\r\n\t\t\tvar container = chart.options.maintainAspectRatio && node.parentNode;\r\n\t\t\tvar w = container ? container.clientWidth : 0;\r\n\t\t\tlistener(createEvent('resize', chart));\r\n\t\t\tif (container && container.clientWidth < w && chart.canvas) {\r\n\t\t\t\t// If the container size shrank during chart resize, let's assume\r\n\t\t\t\t// scrollbar appeared. So we resize again with the scrollbar visible -\r\n\t\t\t\t// effectively making chart smaller and the scrollbar hidden again.\r\n\t\t\t\t// Because we are inside `throttled`, and currently `ticking`, scroll\r\n\t\t\t\t// events are ignored during this whole 2 resize process.\r\n\t\t\t\t// If we assumed wrong and something else happened, we are resizing\r\n\t\t\t\t// twice in a frame (potential performance issue)\r\n\t\t\t\tlistener(createEvent('resize', chart));\r\n\t\t\t}\r\n\t\t}\r\n\t}));\r\n\r\n\t// The resizer needs to be attached to the node parent, so we first need to be\r\n\t// sure that `node` is attached to the DOM before injecting the resizer element.\r\n\twatchForRender(node, function() {\r\n\t\tif (expando.resizer) {\r\n\t\t\tvar container = node.parentNode;\r\n\t\t\tif (container && container !== resizer.parentNode) {\r\n\t\t\t\tcontainer.insertBefore(resizer, container.firstChild);\r\n\t\t\t}\r\n\r\n\t\t\t// The container size might have changed, let's reset the resizer state.\r\n\t\t\tresizer._reset();\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction removeResizeListener(node) {\r\n\tvar expando = node[EXPANDO_KEY] || {};\r\n\tvar resizer = expando.resizer;\r\n\r\n\tdelete expando.resizer;\r\n\tunwatchForRender(node);\r\n\r\n\tif (resizer && resizer.parentNode) {\r\n\t\tresizer.parentNode.removeChild(resizer);\r\n\t}\r\n}\r\n\r\n/**\r\n * Injects CSS styles inline if the styles are not already present.\r\n * @param {HTMLDocument|ShadowRoot} rootNode - the node to contain the <style>.\r\n * @param {string} css - the CSS to be injected.\r\n */\r\nfunction injectCSS(rootNode, css) {\r\n\t// https://stackoverflow.com/q/3922139\r\n\tvar expando = rootNode[EXPANDO_KEY] || (rootNode[EXPANDO_KEY] = {});\r\n\tif (!expando.containsStyles) {\r\n\t\texpando.containsStyles = true;\r\n\t\tcss = '/* Chart.js */\\n' + css;\r\n\t\tvar style = document.createElement('style');\r\n\t\tstyle.setAttribute('type', 'text/css');\r\n\t\tstyle.appendChild(document.createTextNode(css));\r\n\t\trootNode.appendChild(style);\r\n\t}\r\n}\r\n\r\nvar platform_dom$2 = {\r\n\t/**\r\n\t * When `true`, prevents the automatic injection of the stylesheet required to\r\n\t * correctly detect when the chart is added to the DOM and then resized. This\r\n\t * switch has been added to allow external stylesheet (`dist/Chart(.min)?.js`)\r\n\t * to be manually imported to make this library compatible with any CSP.\r\n\t * See https://github.com/chartjs/Chart.js/issues/5208\r\n\t */\r\n\tdisableCSSInjection: false,\r\n\r\n\t/**\r\n\t * This property holds whether this platform is enabled for the current environment.\r\n\t * Currently used by platform.js to select the proper implementation.\r\n\t * @private\r\n\t */\r\n\t_enabled: typeof window !== 'undefined' && typeof document !== 'undefined',\r\n\r\n\t/**\r\n\t * Initializes resources that depend on platform options.\r\n\t * @param {HTMLCanvasElement} canvas - The Canvas element.\r\n\t * @private\r\n\t */\r\n\t_ensureLoaded: function(canvas) {\r\n\t\tif (!this.disableCSSInjection) {\r\n\t\t\t// If the canvas is in a shadow DOM, then the styles must also be inserted\r\n\t\t\t// into the same shadow DOM.\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5763\r\n\t\t\tvar root = canvas.getRootNode ? canvas.getRootNode() : document;\r\n\t\t\tvar targetNode = root.host ? root : document.head;\r\n\t\t\tinjectCSS(targetNode, stylesheet);\r\n\t\t}\r\n\t},\r\n\r\n\tacquireContext: function(item, config) {\r\n\t\tif (typeof item === 'string') {\r\n\t\t\titem = document.getElementById(item);\r\n\t\t} else if (item.length) {\r\n\t\t\t// Support for array based queries (such as jQuery)\r\n\t\t\titem = item[0];\r\n\t\t}\r\n\r\n\t\tif (item && item.canvas) {\r\n\t\t\t// Support for any object associated to a canvas (including a context2d)\r\n\t\t\titem = item.canvas;\r\n\t\t}\r\n\r\n\t\t// To prevent canvas fingerprinting, some add-ons undefine the getContext\r\n\t\t// method, for example: https://github.com/kkapsner/CanvasBlocker\r\n\t\t// https://github.com/chartjs/Chart.js/issues/2807\r\n\t\tvar context = item && item.getContext && item.getContext('2d');\r\n\r\n\t\t// `instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the item is\r\n\t\t// inside an iframe or when running in a protected environment. We could guess the\r\n\t\t// types from their toString() value but let's keep things flexible and assume it's\r\n\t\t// a sufficient condition if the item has a context2D which has item as `canvas`.\r\n\t\t// https://github.com/chartjs/Chart.js/issues/3887\r\n\t\t// https://github.com/chartjs/Chart.js/issues/4102\r\n\t\t// https://github.com/chartjs/Chart.js/issues/4152\r\n\t\tif (context && context.canvas === item) {\r\n\t\t\t// Load platform resources on first chart creation, to make it possible to\r\n\t\t\t// import the library before setting platform options.\r\n\t\t\tthis._ensureLoaded(item);\r\n\t\t\tinitCanvas(item, config);\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\treleaseContext: function(context) {\r\n\t\tvar canvas = context.canvas;\r\n\t\tif (!canvas[EXPANDO_KEY]) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar initial = canvas[EXPANDO_KEY].initial;\r\n\t\t['height', 'width'].forEach(function(prop) {\r\n\t\t\tvar value = initial[prop];\r\n\t\t\tif (helpers$1.isNullOrUndef(value)) {\r\n\t\t\t\tcanvas.removeAttribute(prop);\r\n\t\t\t} else {\r\n\t\t\t\tcanvas.setAttribute(prop, value);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\thelpers$1.each(initial.style || {}, function(value, key) {\r\n\t\t\tcanvas.style[key] = value;\r\n\t\t});\r\n\r\n\t\t// The canvas render size might have been changed (and thus the state stack discarded),\r\n\t\t// we can't use save() and restore() to restore the initial state. So make sure that at\r\n\t\t// least the canvas context is reset to the default state by setting the canvas width.\r\n\t\t// https://www.w3.org/TR/2011/WD-html5-20110525/the-canvas-element.html\r\n\t\t// eslint-disable-next-line no-self-assign\r\n\t\tcanvas.width = canvas.width;\r\n\r\n\t\tdelete canvas[EXPANDO_KEY];\r\n\t},\r\n\r\n\taddEventListener: function(chart, type, listener) {\r\n\t\tvar canvas = chart.canvas;\r\n\t\tif (type === 'resize') {\r\n\t\t\t// Note: the resize event is not supported on all browsers.\r\n\t\t\taddResizeListener(canvas, listener, chart);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar expando = listener[EXPANDO_KEY] || (listener[EXPANDO_KEY] = {});\r\n\t\tvar proxies = expando.proxies || (expando.proxies = {});\r\n\t\tvar proxy = proxies[chart.id + '_' + type] = function(event) {\r\n\t\t\tlistener(fromNativeEvent(event, chart));\r\n\t\t};\r\n\r\n\t\taddListener(canvas, type, proxy);\r\n\t},\r\n\r\n\tremoveEventListener: function(chart, type, listener) {\r\n\t\tvar canvas = chart.canvas;\r\n\t\tif (type === 'resize') {\r\n\t\t\t// Note: the resize event is not supported on all browsers.\r\n\t\t\tremoveResizeListener(canvas);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar expando = listener[EXPANDO_KEY] || {};\r\n\t\tvar proxies = expando.proxies || {};\r\n\t\tvar proxy = proxies[chart.id + '_' + type];\r\n\t\tif (!proxy) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tremoveListener(canvas, type, proxy);\r\n\t}\r\n};\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use EventTarget.addEventListener instead.\r\n * EventTarget.addEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\r\n * @function Chart.helpers.addEvent\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers$1.addEvent = addListener;\r\n\r\n/**\r\n * Provided for backward compatibility, use EventTarget.removeEventListener instead.\r\n * EventTarget.removeEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener\r\n * @function Chart.helpers.removeEvent\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers$1.removeEvent = removeListener;\n\n// @TODO Make possible to select another platform at build time.\r\nvar implementation = platform_dom$2._enabled ? platform_dom$2 : platform_basic;\r\n\r\n/**\r\n * @namespace Chart.platform\r\n * @see https://chartjs.gitbooks.io/proposals/content/Platform.html\r\n * @since 2.4.0\r\n */\r\nvar platform = helpers$1.extend({\r\n\t/**\r\n\t * @since 2.7.0\r\n\t */\r\n\tinitialize: function() {},\r\n\r\n\t/**\r\n\t * Called at chart construction time, returns a context2d instance implementing\r\n\t * the [W3C Canvas 2D Context API standard]{@link https://www.w3.org/TR/2dcontext/}.\r\n\t * @param {*} item - The native item from which to acquire context (platform specific)\r\n\t * @param {object} options - The chart options\r\n\t * @returns {CanvasRenderingContext2D} context2d instance\r\n\t */\r\n\tacquireContext: function() {},\r\n\r\n\t/**\r\n\t * Called at chart destruction time, releases any resources associated to the context\r\n\t * previously returned by the acquireContext() method.\r\n\t * @param {CanvasRenderingContext2D} context - The context2d instance\r\n\t * @returns {boolean} true if the method succeeded, else false\r\n\t */\r\n\treleaseContext: function() {},\r\n\r\n\t/**\r\n\t * Registers the specified listener on the given chart.\r\n\t * @param {Chart} chart - Chart from which to listen for event\r\n\t * @param {string} type - The ({@link IEvent}) type to listen for\r\n\t * @param {function} listener - Receives a notification (an object that implements\r\n\t * the {@link IEvent} interface) when an event of the specified type occurs.\r\n\t */\r\n\taddEventListener: function() {},\r\n\r\n\t/**\r\n\t * Removes the specified listener previously registered with addEventListener.\r\n\t * @param {Chart} chart - Chart from which to remove the listener\r\n\t * @param {string} type - The ({@link IEvent}) type to remove\r\n\t * @param {function} listener - The listener function to remove from the event target.\r\n\t */\r\n\tremoveEventListener: function() {}\r\n\r\n}, implementation);\n\ncore_defaults._set('global', {\r\n\tplugins: {}\r\n});\r\n\r\n/**\r\n * The plugin service singleton\r\n * @namespace Chart.plugins\r\n * @since 2.1.0\r\n */\r\nvar core_plugins = {\r\n\t/**\r\n\t * Globally registered plugins.\r\n\t * @private\r\n\t */\r\n\t_plugins: [],\r\n\r\n\t/**\r\n\t * This identifier is used to invalidate the descriptors cache attached to each chart\r\n\t * when a global plugin is registered or unregistered. In this case, the cache ID is\r\n\t * incremented and descriptors are regenerated during following API calls.\r\n\t * @private\r\n\t */\r\n\t_cacheId: 0,\r\n\r\n\t/**\r\n\t * Registers the given plugin(s) if not already registered.\r\n\t * @param {IPlugin[]|IPlugin} plugins plugin instance(s).\r\n\t */\r\n\tregister: function(plugins) {\r\n\t\tvar p = this._plugins;\r\n\t\t([]).concat(plugins).forEach(function(plugin) {\r\n\t\t\tif (p.indexOf(plugin) === -1) {\r\n\t\t\t\tp.push(plugin);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis._cacheId++;\r\n\t},\r\n\r\n\t/**\r\n\t * Unregisters the given plugin(s) only if registered.\r\n\t * @param {IPlugin[]|IPlugin} plugins plugin instance(s).\r\n\t */\r\n\tunregister: function(plugins) {\r\n\t\tvar p = this._plugins;\r\n\t\t([]).concat(plugins).forEach(function(plugin) {\r\n\t\t\tvar idx = p.indexOf(plugin);\r\n\t\t\tif (idx !== -1) {\r\n\t\t\t\tp.splice(idx, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis._cacheId++;\r\n\t},\r\n\r\n\t/**\r\n\t * Remove all registered plugins.\r\n\t * @since 2.1.5\r\n\t */\r\n\tclear: function() {\r\n\t\tthis._plugins = [];\r\n\t\tthis._cacheId++;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the number of registered plugins?\r\n\t * @returns {number}\r\n\t * @since 2.1.5\r\n\t */\r\n\tcount: function() {\r\n\t\treturn this._plugins.length;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns all registered plugin instances.\r\n\t * @returns {IPlugin[]} array of plugin objects.\r\n\t * @since 2.1.5\r\n\t */\r\n\tgetAll: function() {\r\n\t\treturn this._plugins;\r\n\t},\r\n\r\n\t/**\r\n\t * Calls enabled plugins for `chart` on the specified hook and with the given args.\r\n\t * This method immediately returns as soon as a plugin explicitly returns false. The\r\n\t * returned value can be used, for instance, to interrupt the current action.\r\n\t * @param {Chart} chart - The chart instance for which plugins should be called.\r\n\t * @param {string} hook - The name of the plugin method to call (e.g. 'beforeUpdate').\r\n\t * @param {Array} [args] - Extra arguments to apply to the hook call.\r\n\t * @returns {boolean} false if any of the plugins return false, else returns true.\r\n\t */\r\n\tnotify: function(chart, hook, args) {\r\n\t\tvar descriptors = this.descriptors(chart);\r\n\t\tvar ilen = descriptors.length;\r\n\t\tvar i, descriptor, plugin, params, method;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tdescriptor = descriptors[i];\r\n\t\t\tplugin = descriptor.plugin;\r\n\t\t\tmethod = plugin[hook];\r\n\t\t\tif (typeof method === 'function') {\r\n\t\t\t\tparams = [chart].concat(args || []);\r\n\t\t\t\tparams.push(descriptor.options);\r\n\t\t\t\tif (method.apply(plugin, params) === false) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns descriptors of enabled plugins for the given chart.\r\n\t * @returns {object[]} [{ plugin, options }]\r\n\t * @private\r\n\t */\r\n\tdescriptors: function(chart) {\r\n\t\tvar cache = chart.$plugins || (chart.$plugins = {});\r\n\t\tif (cache.id === this._cacheId) {\r\n\t\t\treturn cache.descriptors;\r\n\t\t}\r\n\r\n\t\tvar plugins = [];\r\n\t\tvar descriptors = [];\r\n\t\tvar config = (chart && chart.config) || {};\r\n\t\tvar options = (config.options && config.options.plugins) || {};\r\n\r\n\t\tthis._plugins.concat(config.plugins || []).forEach(function(plugin) {\r\n\t\t\tvar idx = plugins.indexOf(plugin);\r\n\t\t\tif (idx !== -1) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar id = plugin.id;\r\n\t\t\tvar opts = options[id];\r\n\t\t\tif (opts === false) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (opts === true) {\r\n\t\t\t\topts = helpers$1.clone(core_defaults.global.plugins[id]);\r\n\t\t\t}\r\n\r\n\t\t\tplugins.push(plugin);\r\n\t\t\tdescriptors.push({\r\n\t\t\t\tplugin: plugin,\r\n\t\t\t\toptions: opts || {}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tcache.descriptors = descriptors;\r\n\t\tcache.id = this._cacheId;\r\n\t\treturn descriptors;\r\n\t},\r\n\r\n\t/**\r\n\t * Invalidates cache for the given chart: descriptors hold a reference on plugin option,\r\n\t * but in some cases, this reference can be changed by the user when updating options.\r\n\t * https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167\r\n\t * @private\r\n\t */\r\n\t_invalidate: function(chart) {\r\n\t\tdelete chart.$plugins;\r\n\t}\r\n};\n\nvar core_scaleService = {\r\n\t// Scale registration object. Extensions can register new scale types (such as log or DB scales) and then\r\n\t// use the new chart options to grab the correct scale\r\n\tconstructors: {},\r\n\t// Use a registration function so that we can move to an ES6 map when we no longer need to support\r\n\t// old browsers\r\n\r\n\t// Scale config defaults\r\n\tdefaults: {},\r\n\tregisterScaleType: function(type, scaleConstructor, scaleDefaults) {\r\n\t\tthis.constructors[type] = scaleConstructor;\r\n\t\tthis.defaults[type] = helpers$1.clone(scaleDefaults);\r\n\t},\r\n\tgetScaleConstructor: function(type) {\r\n\t\treturn this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined;\r\n\t},\r\n\tgetScaleDefaults: function(type) {\r\n\t\t// Return the scale defaults merged with the global settings so that we always use the latest ones\r\n\t\treturn this.defaults.hasOwnProperty(type) ? helpers$1.merge(Object.create(null), [core_defaults.scale, this.defaults[type]]) : {};\r\n\t},\r\n\tupdateScaleDefaults: function(type, additions) {\r\n\t\tvar me = this;\r\n\t\tif (me.defaults.hasOwnProperty(type)) {\r\n\t\t\tme.defaults[type] = helpers$1.extend(me.defaults[type], additions);\r\n\t\t}\r\n\t},\r\n\taddScalesToLayout: function(chart) {\r\n\t\t// Adds each scale to the chart.boxes array to be sized accordingly\r\n\t\thelpers$1.each(chart.scales, function(scale) {\r\n\t\t\t// Set ILayoutItem parameters for backwards compatibility\r\n\t\t\tscale.fullWidth = scale.options.fullWidth;\r\n\t\t\tscale.position = scale.options.position;\r\n\t\t\tscale.weight = scale.options.weight;\r\n\t\t\tcore_layouts.addBox(chart, scale);\r\n\t\t});\r\n\t}\r\n};\n\nvar valueOrDefault$8 = helpers$1.valueOrDefault;\r\nvar getRtlHelper = helpers$1.rtl.getRtlAdapter;\r\n\r\ncore_defaults._set('global', {\r\n\ttooltips: {\r\n\t\tenabled: true,\r\n\t\tcustom: null,\r\n\t\tmode: 'nearest',\r\n\t\tposition: 'average',\r\n\t\tintersect: true,\r\n\t\tbackgroundColor: 'rgba(0,0,0,0.8)',\r\n\t\ttitleFontStyle: 'bold',\r\n\t\ttitleSpacing: 2,\r\n\t\ttitleMarginBottom: 6,\r\n\t\ttitleFontColor: '#fff',\r\n\t\ttitleAlign: 'left',\r\n\t\tbodySpacing: 2,\r\n\t\tbodyFontColor: '#fff',\r\n\t\tbodyAlign: 'left',\r\n\t\tfooterFontStyle: 'bold',\r\n\t\tfooterSpacing: 2,\r\n\t\tfooterMarginTop: 6,\r\n\t\tfooterFontColor: '#fff',\r\n\t\tfooterAlign: 'left',\r\n\t\tyPadding: 6,\r\n\t\txPadding: 6,\r\n\t\tcaretPadding: 2,\r\n\t\tcaretSize: 5,\r\n\t\tcornerRadius: 6,\r\n\t\tmultiKeyBackground: '#fff',\r\n\t\tdisplayColors: true,\r\n\t\tborderColor: 'rgba(0,0,0,0)',\r\n\t\tborderWidth: 0,\r\n\t\tcallbacks: {\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tbeforeTitle: helpers$1.noop,\r\n\t\t\ttitle: function(tooltipItems, data) {\r\n\t\t\t\tvar title = '';\r\n\t\t\t\tvar labels = data.labels;\r\n\t\t\t\tvar labelCount = labels ? labels.length : 0;\r\n\r\n\t\t\t\tif (tooltipItems.length > 0) {\r\n\t\t\t\t\tvar item = tooltipItems[0];\r\n\t\t\t\t\tif (item.label) {\r\n\t\t\t\t\t\ttitle = item.label;\r\n\t\t\t\t\t} else if (item.xLabel) {\r\n\t\t\t\t\t\ttitle = item.xLabel;\r\n\t\t\t\t\t} else if (labelCount > 0 && item.index < labelCount) {\r\n\t\t\t\t\t\ttitle = labels[item.index];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn title;\r\n\t\t\t},\r\n\t\t\tafterTitle: helpers$1.noop,\r\n\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tbeforeBody: helpers$1.noop,\r\n\r\n\t\t\t// Args are: (tooltipItem, data)\r\n\t\t\tbeforeLabel: helpers$1.noop,\r\n\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\tvar label = data.datasets[tooltipItem.datasetIndex].label || '';\r\n\r\n\t\t\t\tif (label) {\r\n\t\t\t\t\tlabel += ': ';\r\n\t\t\t\t}\r\n\t\t\t\tif (!helpers$1.isNullOrUndef(tooltipItem.value)) {\r\n\t\t\t\t\tlabel += tooltipItem.value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlabel += tooltipItem.yLabel;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t},\r\n\t\t\tlabelColor: function(tooltipItem, chart) {\r\n\t\t\t\tvar meta = chart.getDatasetMeta(tooltipItem.datasetIndex);\r\n\t\t\t\tvar activeElement = meta.data[tooltipItem.index];\r\n\t\t\t\tvar view = activeElement._view;\r\n\t\t\t\treturn {\r\n\t\t\t\t\tborderColor: view.borderColor,\r\n\t\t\t\t\tbackgroundColor: view.backgroundColor\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tlabelTextColor: function() {\r\n\t\t\t\treturn this._options.bodyFontColor;\r\n\t\t\t},\r\n\t\t\tafterLabel: helpers$1.noop,\r\n\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tafterBody: helpers$1.noop,\r\n\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tbeforeFooter: helpers$1.noop,\r\n\t\t\tfooter: helpers$1.noop,\r\n\t\t\tafterFooter: helpers$1.noop\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar positioners = {\r\n\t/**\r\n\t * Average mode places the tooltip at the average position of the elements shown\r\n\t * @function Chart.Tooltip.positioners.average\r\n\t * @param elements {ChartElement[]} the elements being displayed in the tooltip\r\n\t * @returns {object} tooltip position\r\n\t */\r\n\taverage: function(elements) {\r\n\t\tif (!elements.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar i, len;\r\n\t\tvar x = 0;\r\n\t\tvar y = 0;\r\n\t\tvar count = 0;\r\n\r\n\t\tfor (i = 0, len = elements.length; i < len; ++i) {\r\n\t\t\tvar el = elements[i];\r\n\t\t\tif (el && el.hasValue()) {\r\n\t\t\t\tvar pos = el.tooltipPosition();\r\n\t\t\t\tx += pos.x;\r\n\t\t\t\ty += pos.y;\r\n\t\t\t\t++count;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tx: x / count,\r\n\t\t\ty: y / count\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Gets the tooltip position nearest of the item nearest to the event position\r\n\t * @function Chart.Tooltip.positioners.nearest\r\n\t * @param elements {Chart.Element[]} the tooltip elements\r\n\t * @param eventPosition {object} the position of the event in canvas coordinates\r\n\t * @returns {object} the tooltip position\r\n\t */\r\n\tnearest: function(elements, eventPosition) {\r\n\t\tvar x = eventPosition.x;\r\n\t\tvar y = eventPosition.y;\r\n\t\tvar minDistance = Number.POSITIVE_INFINITY;\r\n\t\tvar i, len, nearestElement;\r\n\r\n\t\tfor (i = 0, len = elements.length; i < len; ++i) {\r\n\t\t\tvar el = elements[i];\r\n\t\t\tif (el && el.hasValue()) {\r\n\t\t\t\tvar center = el.getCenterPoint();\r\n\t\t\t\tvar d = helpers$1.distanceBetweenPoints(eventPosition, center);\r\n\r\n\t\t\t\tif (d < minDistance) {\r\n\t\t\t\t\tminDistance = d;\r\n\t\t\t\t\tnearestElement = el;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (nearestElement) {\r\n\t\t\tvar tp = nearestElement.tooltipPosition();\r\n\t\t\tx = tp.x;\r\n\t\t\ty = tp.y;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tx: x,\r\n\t\t\ty: y\r\n\t\t};\r\n\t}\r\n};\r\n\r\n// Helper to push or concat based on if the 2nd parameter is an array or not\r\nfunction pushOrConcat(base, toPush) {\r\n\tif (toPush) {\r\n\t\tif (helpers$1.isArray(toPush)) {\r\n\t\t\t// base = base.concat(toPush);\r\n\t\t\tArray.prototype.push.apply(base, toPush);\r\n\t\t} else {\r\n\t\t\tbase.push(toPush);\r\n\t\t}\r\n\t}\r\n\r\n\treturn base;\r\n}\r\n\r\n/**\r\n * Returns array of strings split by newline\r\n * @param {string} value - The value to split by newline.\r\n * @returns {string[]} value if newline present - Returned from String split() method\r\n * @function\r\n */\r\nfunction splitNewlines(str) {\r\n\tif ((typeof str === 'string' || str instanceof String) && str.indexOf('\\n') > -1) {\r\n\t\treturn str.split('\\n');\r\n\t}\r\n\treturn str;\r\n}\r\n\r\n\r\n/**\r\n * Private helper to create a tooltip item model\r\n * @param element - the chart element (point, arc, bar) to create the tooltip item for\r\n * @return new tooltip item\r\n */\r\nfunction createTooltipItem(element) {\r\n\tvar xScale = element._xScale;\r\n\tvar yScale = element._yScale || element._scale; // handle radar || polarArea charts\r\n\tvar index = element._index;\r\n\tvar datasetIndex = element._datasetIndex;\r\n\tvar controller = element._chart.getDatasetMeta(datasetIndex).controller;\r\n\tvar indexScale = controller._getIndexScale();\r\n\tvar valueScale = controller._getValueScale();\r\n\r\n\treturn {\r\n\t\txLabel: xScale ? xScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\tyLabel: yScale ? yScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\tlabel: indexScale ? '' + indexScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\tvalue: valueScale ? '' + valueScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\tindex: index,\r\n\t\tdatasetIndex: datasetIndex,\r\n\t\tx: element._model.x,\r\n\t\ty: element._model.y\r\n\t};\r\n}\r\n\r\n/**\r\n * Helper to get the reset model for the tooltip\r\n * @param tooltipOpts {object} the tooltip options\r\n */\r\nfunction getBaseModel(tooltipOpts) {\r\n\tvar globalDefaults = core_defaults.global;\r\n\r\n\treturn {\r\n\t\t// Positioning\r\n\t\txPadding: tooltipOpts.xPadding,\r\n\t\tyPadding: tooltipOpts.yPadding,\r\n\t\txAlign: tooltipOpts.xAlign,\r\n\t\tyAlign: tooltipOpts.yAlign,\r\n\r\n\t\t// Drawing direction and text direction\r\n\t\trtl: tooltipOpts.rtl,\r\n\t\ttextDirection: tooltipOpts.textDirection,\r\n\r\n\t\t// Body\r\n\t\tbodyFontColor: tooltipOpts.bodyFontColor,\r\n\t\t_bodyFontFamily: valueOrDefault$8(tooltipOpts.bodyFontFamily, globalDefaults.defaultFontFamily),\r\n\t\t_bodyFontStyle: valueOrDefault$8(tooltipOpts.bodyFontStyle, globalDefaults.defaultFontStyle),\r\n\t\t_bodyAlign: tooltipOpts.bodyAlign,\r\n\t\tbodyFontSize: valueOrDefault$8(tooltipOpts.bodyFontSize, globalDefaults.defaultFontSize),\r\n\t\tbodySpacing: tooltipOpts.bodySpacing,\r\n\r\n\t\t// Title\r\n\t\ttitleFontColor: tooltipOpts.titleFontColor,\r\n\t\t_titleFontFamily: valueOrDefault$8(tooltipOpts.titleFontFamily, globalDefaults.defaultFontFamily),\r\n\t\t_titleFontStyle: valueOrDefault$8(tooltipOpts.titleFontStyle, globalDefaults.defaultFontStyle),\r\n\t\ttitleFontSize: valueOrDefault$8(tooltipOpts.titleFontSize, globalDefaults.defaultFontSize),\r\n\t\t_titleAlign: tooltipOpts.titleAlign,\r\n\t\ttitleSpacing: tooltipOpts.titleSpacing,\r\n\t\ttitleMarginBottom: tooltipOpts.titleMarginBottom,\r\n\r\n\t\t// Footer\r\n\t\tfooterFontColor: tooltipOpts.footerFontColor,\r\n\t\t_footerFontFamily: valueOrDefault$8(tooltipOpts.footerFontFamily, globalDefaults.defaultFontFamily),\r\n\t\t_footerFontStyle: valueOrDefault$8(tooltipOpts.footerFontStyle, globalDefaults.defaultFontStyle),\r\n\t\tfooterFontSize: valueOrDefault$8(tooltipOpts.footerFontSize, globalDefaults.defaultFontSize),\r\n\t\t_footerAlign: tooltipOpts.footerAlign,\r\n\t\tfooterSpacing: tooltipOpts.footerSpacing,\r\n\t\tfooterMarginTop: tooltipOpts.footerMarginTop,\r\n\r\n\t\t// Appearance\r\n\t\tcaretSize: tooltipOpts.caretSize,\r\n\t\tcornerRadius: tooltipOpts.cornerRadius,\r\n\t\tbackgroundColor: tooltipOpts.backgroundColor,\r\n\t\topacity: 0,\r\n\t\tlegendColorBackground: tooltipOpts.multiKeyBackground,\r\n\t\tdisplayColors: tooltipOpts.displayColors,\r\n\t\tborderColor: tooltipOpts.borderColor,\r\n\t\tborderWidth: tooltipOpts.borderWidth\r\n\t};\r\n}\r\n\r\n/**\r\n * Get the size of the tooltip\r\n */\r\nfunction getTooltipSize(tooltip, model) {\r\n\tvar ctx = tooltip._chart.ctx;\r\n\r\n\tvar height = model.yPadding * 2; // Tooltip Padding\r\n\tvar width = 0;\r\n\r\n\t// Count of all lines in the body\r\n\tvar body = model.body;\r\n\tvar combinedBodyLength = body.reduce(function(count, bodyItem) {\r\n\t\treturn count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length;\r\n\t}, 0);\r\n\tcombinedBodyLength += model.beforeBody.length + model.afterBody.length;\r\n\r\n\tvar titleLineCount = model.title.length;\r\n\tvar footerLineCount = model.footer.length;\r\n\tvar titleFontSize = model.titleFontSize;\r\n\tvar bodyFontSize = model.bodyFontSize;\r\n\tvar footerFontSize = model.footerFontSize;\r\n\r\n\theight += titleLineCount * titleFontSize; // Title Lines\r\n\theight += titleLineCount ? (titleLineCount - 1) * model.titleSpacing : 0; // Title Line Spacing\r\n\theight += titleLineCount ? model.titleMarginBottom : 0; // Title's bottom Margin\r\n\theight += combinedBodyLength * bodyFontSize; // Body Lines\r\n\theight += combinedBodyLength ? (combinedBodyLength - 1) * model.bodySpacing : 0; // Body Line Spacing\r\n\theight += footerLineCount ? model.footerMarginTop : 0; // Footer Margin\r\n\theight += footerLineCount * (footerFontSize); // Footer Lines\r\n\theight += footerLineCount ? (footerLineCount - 1) * model.footerSpacing : 0; // Footer Line Spacing\r\n\r\n\t// Title width\r\n\tvar widthPadding = 0;\r\n\tvar maxLineWidth = function(line) {\r\n\t\twidth = Math.max(width, ctx.measureText(line).width + widthPadding);\r\n\t};\r\n\r\n\tctx.font = helpers$1.fontString(titleFontSize, model._titleFontStyle, model._titleFontFamily);\r\n\thelpers$1.each(model.title, maxLineWidth);\r\n\r\n\t// Body width\r\n\tctx.font = helpers$1.fontString(bodyFontSize, model._bodyFontStyle, model._bodyFontFamily);\r\n\thelpers$1.each(model.beforeBody.concat(model.afterBody), maxLineWidth);\r\n\r\n\t// Body lines may include some extra width due to the color box\r\n\twidthPadding = model.displayColors ? (bodyFontSize + 2) : 0;\r\n\thelpers$1.each(body, function(bodyItem) {\r\n\t\thelpers$1.each(bodyItem.before, maxLineWidth);\r\n\t\thelpers$1.each(bodyItem.lines, maxLineWidth);\r\n\t\thelpers$1.each(bodyItem.after, maxLineWidth);\r\n\t});\r\n\r\n\t// Reset back to 0\r\n\twidthPadding = 0;\r\n\r\n\t// Footer width\r\n\tctx.font = helpers$1.fontString(footerFontSize, model._footerFontStyle, model._footerFontFamily);\r\n\thelpers$1.each(model.footer, maxLineWidth);\r\n\r\n\t// Add padding\r\n\twidth += 2 * model.xPadding;\r\n\r\n\treturn {\r\n\t\twidth: width,\r\n\t\theight: height\r\n\t};\r\n}\r\n\r\n/**\r\n * Helper to get the alignment of a tooltip given the size\r\n */\r\nfunction determineAlignment(tooltip, size) {\r\n\tvar model = tooltip._model;\r\n\tvar chart = tooltip._chart;\r\n\tvar chartArea = tooltip._chart.chartArea;\r\n\tvar xAlign = 'center';\r\n\tvar yAlign = 'center';\r\n\r\n\tif (model.y < size.height) {\r\n\t\tyAlign = 'top';\r\n\t} else if (model.y > (chart.height - size.height)) {\r\n\t\tyAlign = 'bottom';\r\n\t}\r\n\r\n\tvar lf, rf; // functions to determine left, right alignment\r\n\tvar olf, orf; // functions to determine if left/right alignment causes tooltip to go outside chart\r\n\tvar yf; // function to get the y alignment if the tooltip goes outside of the left or right edges\r\n\tvar midX = (chartArea.left + chartArea.right) / 2;\r\n\tvar midY = (chartArea.top + chartArea.bottom) / 2;\r\n\r\n\tif (yAlign === 'center') {\r\n\t\tlf = function(x) {\r\n\t\t\treturn x <= midX;\r\n\t\t};\r\n\t\trf = function(x) {\r\n\t\t\treturn x > midX;\r\n\t\t};\r\n\t} else {\r\n\t\tlf = function(x) {\r\n\t\t\treturn x <= (size.width / 2);\r\n\t\t};\r\n\t\trf = function(x) {\r\n\t\t\treturn x >= (chart.width - (size.width / 2));\r\n\t\t};\r\n\t}\r\n\r\n\tolf = function(x) {\r\n\t\treturn x + size.width + model.caretSize + model.caretPadding > chart.width;\r\n\t};\r\n\torf = function(x) {\r\n\t\treturn x - size.width - model.caretSize - model.caretPadding < 0;\r\n\t};\r\n\tyf = function(y) {\r\n\t\treturn y <= midY ? 'top' : 'bottom';\r\n\t};\r\n\r\n\tif (lf(model.x)) {\r\n\t\txAlign = 'left';\r\n\r\n\t\t// Is tooltip too wide and goes over the right side of the chart.?\r\n\t\tif (olf(model.x)) {\r\n\t\t\txAlign = 'center';\r\n\t\t\tyAlign = yf(model.y);\r\n\t\t}\r\n\t} else if (rf(model.x)) {\r\n\t\txAlign = 'right';\r\n\r\n\t\t// Is tooltip too wide and goes outside left edge of canvas?\r\n\t\tif (orf(model.x)) {\r\n\t\t\txAlign = 'center';\r\n\t\t\tyAlign = yf(model.y);\r\n\t\t}\r\n\t}\r\n\r\n\tvar opts = tooltip._options;\r\n\treturn {\r\n\t\txAlign: opts.xAlign ? opts.xAlign : xAlign,\r\n\t\tyAlign: opts.yAlign ? opts.yAlign : yAlign\r\n\t};\r\n}\r\n\r\n/**\r\n * Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment\r\n */\r\nfunction getBackgroundPoint(vm, size, alignment, chart) {\r\n\t// Background Position\r\n\tvar x = vm.x;\r\n\tvar y = vm.y;\r\n\r\n\tvar caretSize = vm.caretSize;\r\n\tvar caretPadding = vm.caretPadding;\r\n\tvar cornerRadius = vm.cornerRadius;\r\n\tvar xAlign = alignment.xAlign;\r\n\tvar yAlign = alignment.yAlign;\r\n\tvar paddingAndSize = caretSize + caretPadding;\r\n\tvar radiusAndPadding = cornerRadius + caretPadding;\r\n\r\n\tif (xAlign === 'right') {\r\n\t\tx -= size.width;\r\n\t} else if (xAlign === 'center') {\r\n\t\tx -= (size.width / 2);\r\n\t\tif (x + size.width > chart.width) {\r\n\t\t\tx = chart.width - size.width;\r\n\t\t}\r\n\t\tif (x < 0) {\r\n\t\t\tx = 0;\r\n\t\t}\r\n\t}\r\n\r\n\tif (yAlign === 'top') {\r\n\t\ty += paddingAndSize;\r\n\t} else if (yAlign === 'bottom') {\r\n\t\ty -= size.height + paddingAndSize;\r\n\t} else {\r\n\t\ty -= (size.height / 2);\r\n\t}\r\n\r\n\tif (yAlign === 'center') {\r\n\t\tif (xAlign === 'left') {\r\n\t\t\tx += paddingAndSize;\r\n\t\t} else if (xAlign === 'right') {\r\n\t\t\tx -= paddingAndSize;\r\n\t\t}\r\n\t} else if (xAlign === 'left') {\r\n\t\tx -= radiusAndPadding;\r\n\t} else if (xAlign === 'right') {\r\n\t\tx += radiusAndPadding;\r\n\t}\r\n\r\n\treturn {\r\n\t\tx: x,\r\n\t\ty: y\r\n\t};\r\n}\r\n\r\nfunction getAlignedX(vm, align) {\r\n\treturn align === 'center'\r\n\t\t? vm.x + vm.width / 2\r\n\t\t: align === 'right'\r\n\t\t\t? vm.x + vm.width - vm.xPadding\r\n\t\t\t: vm.x + vm.xPadding;\r\n}\r\n\r\n/**\r\n * Helper to build before and after body lines\r\n */\r\nfunction getBeforeAfterBodyLines(callback) {\r\n\treturn pushOrConcat([], splitNewlines(callback));\r\n}\r\n\r\nvar exports$4 = core_element.extend({\r\n\tinitialize: function() {\r\n\t\tthis._model = getBaseModel(this._options);\r\n\t\tthis._lastActive = [];\r\n\t},\r\n\r\n\t// Get the title\r\n\t// Args are: (tooltipItem, data)\r\n\tgetTitle: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me._options;\r\n\t\tvar callbacks = opts.callbacks;\r\n\r\n\t\tvar beforeTitle = callbacks.beforeTitle.apply(me, arguments);\r\n\t\tvar title = callbacks.title.apply(me, arguments);\r\n\t\tvar afterTitle = callbacks.afterTitle.apply(me, arguments);\r\n\r\n\t\tvar lines = [];\r\n\t\tlines = pushOrConcat(lines, splitNewlines(beforeTitle));\r\n\t\tlines = pushOrConcat(lines, splitNewlines(title));\r\n\t\tlines = pushOrConcat(lines, splitNewlines(afterTitle));\r\n\r\n\t\treturn lines;\r\n\t},\r\n\r\n\t// Args are: (tooltipItem, data)\r\n\tgetBeforeBody: function() {\r\n\t\treturn getBeforeAfterBodyLines(this._options.callbacks.beforeBody.apply(this, arguments));\r\n\t},\r\n\r\n\t// Args are: (tooltipItem, data)\r\n\tgetBody: function(tooltipItems, data) {\r\n\t\tvar me = this;\r\n\t\tvar callbacks = me._options.callbacks;\r\n\t\tvar bodyItems = [];\r\n\r\n\t\thelpers$1.each(tooltipItems, function(tooltipItem) {\r\n\t\t\tvar bodyItem = {\r\n\t\t\t\tbefore: [],\r\n\t\t\t\tlines: [],\r\n\t\t\t\tafter: []\r\n\t\t\t};\r\n\t\t\tpushOrConcat(bodyItem.before, splitNewlines(callbacks.beforeLabel.call(me, tooltipItem, data)));\r\n\t\t\tpushOrConcat(bodyItem.lines, callbacks.label.call(me, tooltipItem, data));\r\n\t\t\tpushOrConcat(bodyItem.after, splitNewlines(callbacks.afterLabel.call(me, tooltipItem, data)));\r\n\r\n\t\t\tbodyItems.push(bodyItem);\r\n\t\t});\r\n\r\n\t\treturn bodyItems;\r\n\t},\r\n\r\n\t// Args are: (tooltipItem, data)\r\n\tgetAfterBody: function() {\r\n\t\treturn getBeforeAfterBodyLines(this._options.callbacks.afterBody.apply(this, arguments));\r\n\t},\r\n\r\n\t// Get the footer and beforeFooter and afterFooter lines\r\n\t// Args are: (tooltipItem, data)\r\n\tgetFooter: function() {\r\n\t\tvar me = this;\r\n\t\tvar callbacks = me._options.callbacks;\r\n\r\n\t\tvar beforeFooter = callbacks.beforeFooter.apply(me, arguments);\r\n\t\tvar footer = callbacks.footer.apply(me, arguments);\r\n\t\tvar afterFooter = callbacks.afterFooter.apply(me, arguments);\r\n\r\n\t\tvar lines = [];\r\n\t\tlines = pushOrConcat(lines, splitNewlines(beforeFooter));\r\n\t\tlines = pushOrConcat(lines, splitNewlines(footer));\r\n\t\tlines = pushOrConcat(lines, splitNewlines(afterFooter));\r\n\r\n\t\treturn lines;\r\n\t},\r\n\r\n\tupdate: function(changed) {\r\n\t\tvar me = this;\r\n\t\tvar opts = me._options;\r\n\r\n\t\t// Need to regenerate the model because its faster than using extend and it is necessary due to the optimization in Chart.Element.transition\r\n\t\t// that does _view = _model if ease === 1. This causes the 2nd tooltip update to set properties in both the view and model at the same time\r\n\t\t// which breaks any animations.\r\n\t\tvar existingModel = me._model;\r\n\t\tvar model = me._model = getBaseModel(opts);\r\n\t\tvar active = me._active;\r\n\r\n\t\tvar data = me._data;\r\n\r\n\t\t// In the case where active.length === 0 we need to keep these at existing values for good animations\r\n\t\tvar alignment = {\r\n\t\t\txAlign: existingModel.xAlign,\r\n\t\t\tyAlign: existingModel.yAlign\r\n\t\t};\r\n\t\tvar backgroundPoint = {\r\n\t\t\tx: existingModel.x,\r\n\t\t\ty: existingModel.y\r\n\t\t};\r\n\t\tvar tooltipSize = {\r\n\t\t\twidth: existingModel.width,\r\n\t\t\theight: existingModel.height\r\n\t\t};\r\n\t\tvar tooltipPosition = {\r\n\t\t\tx: existingModel.caretX,\r\n\t\t\ty: existingModel.caretY\r\n\t\t};\r\n\r\n\t\tvar i, len;\r\n\r\n\t\tif (active.length) {\r\n\t\t\tmodel.opacity = 1;\r\n\r\n\t\t\tvar labelColors = [];\r\n\t\t\tvar labelTextColors = [];\r\n\t\t\ttooltipPosition = positioners[opts.position].call(me, active, me._eventPosition);\r\n\r\n\t\t\tvar tooltipItems = [];\r\n\t\t\tfor (i = 0, len = active.length; i < len; ++i) {\r\n\t\t\t\ttooltipItems.push(createTooltipItem(active[i]));\r\n\t\t\t}\r\n\r\n\t\t\t// If the user provided a filter function, use it to modify the tooltip items\r\n\t\t\tif (opts.filter) {\r\n\t\t\t\ttooltipItems = tooltipItems.filter(function(a) {\r\n\t\t\t\t\treturn opts.filter(a, data);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// If the user provided a sorting function, use it to modify the tooltip items\r\n\t\t\tif (opts.itemSort) {\r\n\t\t\t\ttooltipItems = tooltipItems.sort(function(a, b) {\r\n\t\t\t\t\treturn opts.itemSort(a, b, data);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// Determine colors for boxes\r\n\t\t\thelpers$1.each(tooltipItems, function(tooltipItem) {\r\n\t\t\t\tlabelColors.push(opts.callbacks.labelColor.call(me, tooltipItem, me._chart));\r\n\t\t\t\tlabelTextColors.push(opts.callbacks.labelTextColor.call(me, tooltipItem, me._chart));\r\n\t\t\t});\r\n\r\n\r\n\t\t\t// Build the Text Lines\r\n\t\t\tmodel.title = me.getTitle(tooltipItems, data);\r\n\t\t\tmodel.beforeBody = me.getBeforeBody(tooltipItems, data);\r\n\t\t\tmodel.body = me.getBody(tooltipItems, data);\r\n\t\t\tmodel.afterBody = me.getAfterBody(tooltipItems, data);\r\n\t\t\tmodel.footer = me.getFooter(tooltipItems, data);\r\n\r\n\t\t\t// Initial positioning and colors\r\n\t\t\tmodel.x = tooltipPosition.x;\r\n\t\t\tmodel.y = tooltipPosition.y;\r\n\t\t\tmodel.caretPadding = opts.caretPadding;\r\n\t\t\tmodel.labelColors = labelColors;\r\n\t\t\tmodel.labelTextColors = labelTextColors;\r\n\r\n\t\t\t// data points\r\n\t\t\tmodel.dataPoints = tooltipItems;\r\n\r\n\t\t\t// We need to determine alignment of the tooltip\r\n\t\t\ttooltipSize = getTooltipSize(this, model);\r\n\t\t\talignment = determineAlignment(this, tooltipSize);\r\n\t\t\t// Final Size and Position\r\n\t\t\tbackgroundPoint = getBackgroundPoint(model, tooltipSize, alignment, me._chart);\r\n\t\t} else {\r\n\t\t\tmodel.opacity = 0;\r\n\t\t}\r\n\r\n\t\tmodel.xAlign = alignment.xAlign;\r\n\t\tmodel.yAlign = alignment.yAlign;\r\n\t\tmodel.x = backgroundPoint.x;\r\n\t\tmodel.y = backgroundPoint.y;\r\n\t\tmodel.width = tooltipSize.width;\r\n\t\tmodel.height = tooltipSize.height;\r\n\r\n\t\t// Point where the caret on the tooltip points to\r\n\t\tmodel.caretX = tooltipPosition.x;\r\n\t\tmodel.caretY = tooltipPosition.y;\r\n\r\n\t\tme._model = model;\r\n\r\n\t\tif (changed && opts.custom) {\r\n\t\t\topts.custom.call(me, model);\r\n\t\t}\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\tdrawCaret: function(tooltipPoint, size) {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar caretPosition = this.getCaretPosition(tooltipPoint, size, vm);\r\n\r\n\t\tctx.lineTo(caretPosition.x1, caretPosition.y1);\r\n\t\tctx.lineTo(caretPosition.x2, caretPosition.y2);\r\n\t\tctx.lineTo(caretPosition.x3, caretPosition.y3);\r\n\t},\r\n\tgetCaretPosition: function(tooltipPoint, size, vm) {\r\n\t\tvar x1, x2, x3, y1, y2, y3;\r\n\t\tvar caretSize = vm.caretSize;\r\n\t\tvar cornerRadius = vm.cornerRadius;\r\n\t\tvar xAlign = vm.xAlign;\r\n\t\tvar yAlign = vm.yAlign;\r\n\t\tvar ptX = tooltipPoint.x;\r\n\t\tvar ptY = tooltipPoint.y;\r\n\t\tvar width = size.width;\r\n\t\tvar height = size.height;\r\n\r\n\t\tif (yAlign === 'center') {\r\n\t\t\ty2 = ptY + (height / 2);\r\n\r\n\t\t\tif (xAlign === 'left') {\r\n\t\t\t\tx1 = ptX;\r\n\t\t\t\tx2 = x1 - caretSize;\r\n\t\t\t\tx3 = x1;\r\n\r\n\t\t\t\ty1 = y2 + caretSize;\r\n\t\t\t\ty3 = y2 - caretSize;\r\n\t\t\t} else {\r\n\t\t\t\tx1 = ptX + width;\r\n\t\t\t\tx2 = x1 + caretSize;\r\n\t\t\t\tx3 = x1;\r\n\r\n\t\t\t\ty1 = y2 - caretSize;\r\n\t\t\t\ty3 = y2 + caretSize;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (xAlign === 'left') {\r\n\t\t\t\tx2 = ptX + cornerRadius + (caretSize);\r\n\t\t\t\tx1 = x2 - caretSize;\r\n\t\t\t\tx3 = x2 + caretSize;\r\n\t\t\t} else if (xAlign === 'right') {\r\n\t\t\t\tx2 = ptX + width - cornerRadius - caretSize;\r\n\t\t\t\tx1 = x2 - caretSize;\r\n\t\t\t\tx3 = x2 + caretSize;\r\n\t\t\t} else {\r\n\t\t\t\tx2 = vm.caretX;\r\n\t\t\t\tx1 = x2 - caretSize;\r\n\t\t\t\tx3 = x2 + caretSize;\r\n\t\t\t}\r\n\t\t\tif (yAlign === 'top') {\r\n\t\t\t\ty1 = ptY;\r\n\t\t\t\ty2 = y1 - caretSize;\r\n\t\t\t\ty3 = y1;\r\n\t\t\t} else {\r\n\t\t\t\ty1 = ptY + height;\r\n\t\t\t\ty2 = y1 + caretSize;\r\n\t\t\t\ty3 = y1;\r\n\t\t\t\t// invert drawing order\r\n\t\t\t\tvar tmp = x3;\r\n\t\t\t\tx3 = x1;\r\n\t\t\t\tx1 = tmp;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn {x1: x1, x2: x2, x3: x3, y1: y1, y2: y2, y3: y3};\r\n\t},\r\n\r\n\tdrawTitle: function(pt, vm, ctx) {\r\n\t\tvar title = vm.title;\r\n\t\tvar length = title.length;\r\n\t\tvar titleFontSize, titleSpacing, i;\r\n\r\n\t\tif (length) {\r\n\t\t\tvar rtlHelper = getRtlHelper(vm.rtl, vm.x, vm.width);\r\n\r\n\t\t\tpt.x = getAlignedX(vm, vm._titleAlign);\r\n\r\n\t\t\tctx.textAlign = rtlHelper.textAlign(vm._titleAlign);\r\n\t\t\tctx.textBaseline = 'middle';\r\n\r\n\t\t\ttitleFontSize = vm.titleFontSize;\r\n\t\t\ttitleSpacing = vm.titleSpacing;\r\n\r\n\t\t\tctx.fillStyle = vm.titleFontColor;\r\n\t\t\tctx.font = helpers$1.fontString(titleFontSize, vm._titleFontStyle, vm._titleFontFamily);\r\n\r\n\t\t\tfor (i = 0; i < length; ++i) {\r\n\t\t\t\tctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFontSize / 2);\r\n\t\t\t\tpt.y += titleFontSize + titleSpacing; // Line Height and spacing\r\n\r\n\t\t\t\tif (i + 1 === length) {\r\n\t\t\t\t\tpt.y += vm.titleMarginBottom - titleSpacing; // If Last, add margin, remove spacing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tdrawBody: function(pt, vm, ctx) {\r\n\t\tvar bodyFontSize = vm.bodyFontSize;\r\n\t\tvar bodySpacing = vm.bodySpacing;\r\n\t\tvar bodyAlign = vm._bodyAlign;\r\n\t\tvar body = vm.body;\r\n\t\tvar drawColorBoxes = vm.displayColors;\r\n\t\tvar xLinePadding = 0;\r\n\t\tvar colorX = drawColorBoxes ? getAlignedX(vm, 'left') : 0;\r\n\r\n\t\tvar rtlHelper = getRtlHelper(vm.rtl, vm.x, vm.width);\r\n\r\n\t\tvar fillLineOfText = function(line) {\r\n\t\t\tctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyFontSize / 2);\r\n\t\t\tpt.y += bodyFontSize + bodySpacing;\r\n\t\t};\r\n\r\n\t\tvar bodyItem, textColor, labelColors, lines, i, j, ilen, jlen;\r\n\t\tvar bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);\r\n\r\n\t\tctx.textAlign = bodyAlign;\r\n\t\tctx.textBaseline = 'middle';\r\n\t\tctx.font = helpers$1.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);\r\n\r\n\t\tpt.x = getAlignedX(vm, bodyAlignForCalculation);\r\n\r\n\t\t// Before body lines\r\n\t\tctx.fillStyle = vm.bodyFontColor;\r\n\t\thelpers$1.each(vm.beforeBody, fillLineOfText);\r\n\r\n\t\txLinePadding = drawColorBoxes && bodyAlignForCalculation !== 'right'\r\n\t\t\t? bodyAlign === 'center' ? (bodyFontSize / 2 + 1) : (bodyFontSize + 2)\r\n\t\t\t: 0;\r\n\r\n\t\t// Draw body lines now\r\n\t\tfor (i = 0, ilen = body.length; i < ilen; ++i) {\r\n\t\t\tbodyItem = body[i];\r\n\t\t\ttextColor = vm.labelTextColors[i];\r\n\t\t\tlabelColors = vm.labelColors[i];\r\n\r\n\t\t\tctx.fillStyle = textColor;\r\n\t\t\thelpers$1.each(bodyItem.before, fillLineOfText);\r\n\r\n\t\t\tlines = bodyItem.lines;\r\n\t\t\tfor (j = 0, jlen = lines.length; j < jlen; ++j) {\r\n\t\t\t\t// Draw Legend-like boxes if needed\r\n\t\t\t\tif (drawColorBoxes) {\r\n\t\t\t\t\tvar rtlColorX = rtlHelper.x(colorX);\r\n\r\n\t\t\t\t\t// Fill a white rect so that colours merge nicely if the opacity is < 1\r\n\t\t\t\t\tctx.fillStyle = vm.legendColorBackground;\r\n\t\t\t\t\tctx.fillRect(rtlHelper.leftForLtr(rtlColorX, bodyFontSize), pt.y, bodyFontSize, bodyFontSize);\r\n\r\n\t\t\t\t\t// Border\r\n\t\t\t\t\tctx.lineWidth = 1;\r\n\t\t\t\t\tctx.strokeStyle = labelColors.borderColor;\r\n\t\t\t\t\tctx.strokeRect(rtlHelper.leftForLtr(rtlColorX, bodyFontSize), pt.y, bodyFontSize, bodyFontSize);\r\n\r\n\t\t\t\t\t// Inner square\r\n\t\t\t\t\tctx.fillStyle = labelColors.backgroundColor;\r\n\t\t\t\t\tctx.fillRect(rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), bodyFontSize - 2), pt.y + 1, bodyFontSize - 2, bodyFontSize - 2);\r\n\t\t\t\t\tctx.fillStyle = textColor;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfillLineOfText(lines[j]);\r\n\t\t\t}\r\n\r\n\t\t\thelpers$1.each(bodyItem.after, fillLineOfText);\r\n\t\t}\r\n\r\n\t\t// Reset back to 0 for after body\r\n\t\txLinePadding = 0;\r\n\r\n\t\t// After body lines\r\n\t\thelpers$1.each(vm.afterBody, fillLineOfText);\r\n\t\tpt.y -= bodySpacing; // Remove last body spacing\r\n\t},\r\n\r\n\tdrawFooter: function(pt, vm, ctx) {\r\n\t\tvar footer = vm.footer;\r\n\t\tvar length = footer.length;\r\n\t\tvar footerFontSize, i;\r\n\r\n\t\tif (length) {\r\n\t\t\tvar rtlHelper = getRtlHelper(vm.rtl, vm.x, vm.width);\r\n\r\n\t\t\tpt.x = getAlignedX(vm, vm._footerAlign);\r\n\t\t\tpt.y += vm.footerMarginTop;\r\n\r\n\t\t\tctx.textAlign = rtlHelper.textAlign(vm._footerAlign);\r\n\t\t\tctx.textBaseline = 'middle';\r\n\r\n\t\t\tfooterFontSize = vm.footerFontSize;\r\n\r\n\t\t\tctx.fillStyle = vm.footerFontColor;\r\n\t\t\tctx.font = helpers$1.fontString(footerFontSize, vm._footerFontStyle, vm._footerFontFamily);\r\n\r\n\t\t\tfor (i = 0; i < length; ++i) {\r\n\t\t\t\tctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFontSize / 2);\r\n\t\t\t\tpt.y += footerFontSize + vm.footerSpacing;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tdrawBackground: function(pt, vm, ctx, tooltipSize) {\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.strokeStyle = vm.borderColor;\r\n\t\tctx.lineWidth = vm.borderWidth;\r\n\t\tvar xAlign = vm.xAlign;\r\n\t\tvar yAlign = vm.yAlign;\r\n\t\tvar x = pt.x;\r\n\t\tvar y = pt.y;\r\n\t\tvar width = tooltipSize.width;\r\n\t\tvar height = tooltipSize.height;\r\n\t\tvar radius = vm.cornerRadius;\r\n\r\n\t\tctx.beginPath();\r\n\t\tctx.moveTo(x + radius, y);\r\n\t\tif (yAlign === 'top') {\r\n\t\t\tthis.drawCaret(pt, tooltipSize);\r\n\t\t}\r\n\t\tctx.lineTo(x + width - radius, y);\r\n\t\tctx.quadraticCurveTo(x + width, y, x + width, y + radius);\r\n\t\tif (yAlign === 'center' && xAlign === 'right') {\r\n\t\t\tthis.drawCaret(pt, tooltipSize);\r\n\t\t}\r\n\t\tctx.lineTo(x + width, y + height - radius);\r\n\t\tctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\r\n\t\tif (yAlign === 'bottom') {\r\n\t\t\tthis.drawCaret(pt, tooltipSize);\r\n\t\t}\r\n\t\tctx.lineTo(x + radius, y + height);\r\n\t\tctx.quadraticCurveTo(x, y + height, x, y + height - radius);\r\n\t\tif (yAlign === 'center' && xAlign === 'left') {\r\n\t\t\tthis.drawCaret(pt, tooltipSize);\r\n\t\t}\r\n\t\tctx.lineTo(x, y + radius);\r\n\t\tctx.quadraticCurveTo(x, y, x + radius, y);\r\n\t\tctx.closePath();\r\n\r\n\t\tctx.fill();\r\n\r\n\t\tif (vm.borderWidth > 0) {\r\n\t\t\tctx.stroke();\r\n\t\t}\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm.opacity === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tooltipSize = {\r\n\t\t\twidth: vm.width,\r\n\t\t\theight: vm.height\r\n\t\t};\r\n\t\tvar pt = {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\r\n\t\t// IE11/Edge does not like very small opacities, so snap to 0\r\n\t\tvar opacity = Math.abs(vm.opacity < 1e-3) ? 0 : vm.opacity;\r\n\r\n\t\t// Truthy/falsey value for empty tooltip\r\n\t\tvar hasTooltipContent = vm.title.length || vm.beforeBody.length || vm.body.length || vm.afterBody.length || vm.footer.length;\r\n\r\n\t\tif (this._options.enabled && hasTooltipContent) {\r\n\t\t\tctx.save();\r\n\t\t\tctx.globalAlpha = opacity;\r\n\r\n\t\t\t// Draw Background\r\n\t\t\tthis.drawBackground(pt, vm, ctx, tooltipSize);\r\n\r\n\t\t\t// Draw Title, Body, and Footer\r\n\t\t\tpt.y += vm.yPadding;\r\n\r\n\t\t\thelpers$1.rtl.overrideTextDirection(ctx, vm.textDirection);\r\n\r\n\t\t\t// Titles\r\n\t\t\tthis.drawTitle(pt, vm, ctx);\r\n\r\n\t\t\t// Body\r\n\t\t\tthis.drawBody(pt, vm, ctx);\r\n\r\n\t\t\t// Footer\r\n\t\t\tthis.drawFooter(pt, vm, ctx);\r\n\r\n\t\t\thelpers$1.rtl.restoreTextDirection(ctx, vm.textDirection);\r\n\r\n\t\t\tctx.restore();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Handle an event\r\n\t * @private\r\n\t * @param {IEvent} event - The event to handle\r\n\t * @returns {boolean} true if the tooltip changed\r\n\t */\r\n\thandleEvent: function(e) {\r\n\t\tvar me = this;\r\n\t\tvar options = me._options;\r\n\t\tvar changed = false;\r\n\r\n\t\tme._lastActive = me._lastActive || [];\r\n\r\n\t\t// Find Active Elements for tooltips\r\n\t\tif (e.type === 'mouseout') {\r\n\t\t\tme._active = [];\r\n\t\t} else {\r\n\t\t\tme._active = me._chart.getElementsAtEventForMode(e, options.mode, options);\r\n\t\t\tif (options.reverse) {\r\n\t\t\t\tme._active.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remember Last Actives\r\n\t\tchanged = !helpers$1.arrayEquals(me._active, me._lastActive);\r\n\r\n\t\t// Only handle target event on tooltip change\r\n\t\tif (changed) {\r\n\t\t\tme._lastActive = me._active;\r\n\r\n\t\t\tif (options.enabled || options.custom) {\r\n\t\t\t\tme._eventPosition = {\r\n\t\t\t\t\tx: e.x,\r\n\t\t\t\t\ty: e.y\r\n\t\t\t\t};\r\n\r\n\t\t\t\tme.update(true);\r\n\t\t\t\tme.pivot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n});\r\n\r\n/**\r\n * @namespace Chart.Tooltip.positioners\r\n */\r\nvar positioners_1 = positioners;\r\n\r\nvar core_tooltip = exports$4;\ncore_tooltip.positioners = positioners_1;\n\nvar valueOrDefault$9 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {},\r\n\tevents: [\r\n\t\t'mousemove',\r\n\t\t'mouseout',\r\n\t\t'click',\r\n\t\t'touchstart',\r\n\t\t'touchmove'\r\n\t],\r\n\thover: {\r\n\t\tonHover: null,\r\n\t\tmode: 'nearest',\r\n\t\tintersect: true,\r\n\t\tanimationDuration: 400\r\n\t},\r\n\tonClick: null,\r\n\tmaintainAspectRatio: true,\r\n\tresponsive: true,\r\n\tresponsiveAnimationDuration: 0\r\n});\r\n\r\n/**\r\n * Recursively merge the given config objects representing the `scales` option\r\n * by incorporating scale defaults in `xAxes` and `yAxes` array items, then\r\n * returns a deep copy of the result, thus doesn't alter inputs.\r\n */\r\nfunction mergeScaleConfig(/* config objects ... */) {\r\n\treturn helpers$1.merge(Object.create(null), [].slice.call(arguments), {\r\n\t\tmerger: function(key, target, source, options) {\r\n\t\t\tif (key === 'xAxes' || key === 'yAxes') {\r\n\t\t\t\tvar slen = source[key].length;\r\n\t\t\t\tvar i, type, scale;\r\n\r\n\t\t\t\tif (!target[key]) {\r\n\t\t\t\t\ttarget[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (i = 0; i < slen; ++i) {\r\n\t\t\t\t\tscale = source[key][i];\r\n\t\t\t\t\ttype = valueOrDefault$9(scale.type, key === 'xAxes' ? 'category' : 'linear');\r\n\r\n\t\t\t\t\tif (i >= target[key].length) {\r\n\t\t\t\t\t\ttarget[key].push({});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!target[key][i].type || (scale.type && scale.type !== target[key][i].type)) {\r\n\t\t\t\t\t\t// new/untyped scale or type changed: let's apply the new defaults\r\n\t\t\t\t\t\t// then merge source scale to correctly overwrite the defaults.\r\n\t\t\t\t\t\thelpers$1.merge(target[key][i], [core_scaleService.getScaleDefaults(type), scale]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// scales type are the same\r\n\t\t\t\t\t\thelpers$1.merge(target[key][i], scale);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\thelpers$1._merger(key, target, source, options);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\n/**\r\n * Recursively merge the given config objects as the root options by handling\r\n * default scale options for the `scales` and `scale` properties, then returns\r\n * a deep copy of the result, thus doesn't alter inputs.\r\n */\r\nfunction mergeConfig(/* config objects ... */) {\r\n\treturn helpers$1.merge(Object.create(null), [].slice.call(arguments), {\r\n\t\tmerger: function(key, target, source, options) {\r\n\t\t\tvar tval = target[key] || Object.create(null);\r\n\t\t\tvar sval = source[key];\r\n\r\n\t\t\tif (key === 'scales') {\r\n\t\t\t\t// scale config merging is complex. Add our own function here for that\r\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\r\n\t\t\t} else if (key === 'scale') {\r\n\t\t\t\t// used in polar area & radar charts since there is only one scale\r\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\r\n\t\t\t} else {\r\n\t\t\t\thelpers$1._merger(key, target, source, options);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction initConfig(config) {\r\n\tconfig = config || Object.create(null);\r\n\r\n\t// Do NOT use mergeConfig for the data object because this method merges arrays\r\n\t// and so would change references to labels and datasets, preventing data updates.\r\n\tvar data = config.data = config.data || {};\r\n\tdata.datasets = data.datasets || [];\r\n\tdata.labels = data.labels || [];\r\n\r\n\tconfig.options = mergeConfig(\r\n\t\tcore_defaults.global,\r\n\t\tcore_defaults[config.type],\r\n\t\tconfig.options || {});\r\n\r\n\treturn config;\r\n}\r\n\r\nfunction updateConfig(chart) {\r\n\tvar newOptions = chart.options;\r\n\r\n\thelpers$1.each(chart.scales, function(scale) {\r\n\t\tcore_layouts.removeBox(chart, scale);\r\n\t});\r\n\r\n\tnewOptions = mergeConfig(\r\n\t\tcore_defaults.global,\r\n\t\tcore_defaults[chart.config.type],\r\n\t\tnewOptions);\r\n\r\n\tchart.options = chart.config.options = newOptions;\r\n\tchart.ensureScalesHaveIDs();\r\n\tchart.buildOrUpdateScales();\r\n\r\n\t// Tooltip\r\n\tchart.tooltip._options = newOptions.tooltips;\r\n\tchart.tooltip.initialize();\r\n}\r\n\r\nfunction nextAvailableScaleId(axesOpts, prefix, index) {\r\n\tvar id;\r\n\tvar hasId = function(obj) {\r\n\t\treturn obj.id === id;\r\n\t};\r\n\r\n\tdo {\r\n\t\tid = prefix + index++;\r\n\t} while (helpers$1.findIndex(axesOpts, hasId) >= 0);\r\n\r\n\treturn id;\r\n}\r\n\r\nfunction positionIsHorizontal(position) {\r\n\treturn position === 'top' || position === 'bottom';\r\n}\r\n\r\nfunction compare2Level(l1, l2) {\r\n\treturn function(a, b) {\r\n\t\treturn a[l1] === b[l1]\r\n\t\t\t? a[l2] - b[l2]\r\n\t\t\t: a[l1] - b[l1];\r\n\t};\r\n}\r\n\r\nvar Chart = function(item, config) {\r\n\tthis.construct(item, config);\r\n\treturn this;\r\n};\r\n\r\nhelpers$1.extend(Chart.prototype, /** @lends Chart */ {\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tconstruct: function(item, config) {\r\n\t\tvar me = this;\r\n\r\n\t\tconfig = initConfig(config);\r\n\r\n\t\tvar context = platform.acquireContext(item, config);\r\n\t\tvar canvas = context && context.canvas;\r\n\t\tvar height = canvas && canvas.height;\r\n\t\tvar width = canvas && canvas.width;\r\n\r\n\t\tme.id = helpers$1.uid();\r\n\t\tme.ctx = context;\r\n\t\tme.canvas = canvas;\r\n\t\tme.config = config;\r\n\t\tme.width = width;\r\n\t\tme.height = height;\r\n\t\tme.aspectRatio = height ? width / height : null;\r\n\t\tme.options = config.options;\r\n\t\tme._bufferedRender = false;\r\n\t\tme._layers = [];\r\n\r\n\t\t/**\r\n\t\t * Provided for backward compatibility, Chart and Chart.Controller have been merged,\r\n\t\t * the \"instance\" still need to be defined since it might be called from plugins.\r\n\t\t * @prop Chart#chart\r\n\t\t * @deprecated since version 2.6.0\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\tme.chart = me;\r\n\t\tme.controller = me; // chart.chart.controller #inception\r\n\r\n\t\t// Add the chart instance to the global namespace\r\n\t\tChart.instances[me.id] = me;\r\n\r\n\t\t// Define alias to the config data: `chart.data === chart.config.data`\r\n\t\tObject.defineProperty(me, 'data', {\r\n\t\t\tget: function() {\r\n\t\t\t\treturn me.config.data;\r\n\t\t\t},\r\n\t\t\tset: function(value) {\r\n\t\t\t\tme.config.data = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (!context || !canvas) {\r\n\t\t\t// The given item is not a compatible context2d element, let's return before finalizing\r\n\t\t\t// the chart initialization but after setting basic chart / controller properties that\r\n\t\t\t// can help to figure out that the chart is not valid (e.g chart.canvas !== null);\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/2807\r\n\t\t\tconsole.error(\"Failed to create chart: can't acquire context from the given item\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tme.initialize();\r\n\t\tme.update();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tinitialize: function() {\r\n\t\tvar me = this;\r\n\r\n\t\t// Before init plugin notification\r\n\t\tcore_plugins.notify(me, 'beforeInit');\r\n\r\n\t\thelpers$1.retinaScale(me, me.options.devicePixelRatio);\r\n\r\n\t\tme.bindEvents();\r\n\r\n\t\tif (me.options.responsive) {\r\n\t\t\t// Initial resize before chart draws (must be silent to preserve initial animations).\r\n\t\t\tme.resize(true);\r\n\t\t}\r\n\r\n\t\tme.initToolTip();\r\n\r\n\t\t// After init plugin notification\r\n\t\tcore_plugins.notify(me, 'afterInit');\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\tclear: function() {\r\n\t\thelpers$1.canvas.clear(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tstop: function() {\r\n\t\t// Stops any current animation loop occurring\r\n\t\tcore_animations.cancelAnimation(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tresize: function(silent) {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar canvas = me.canvas;\r\n\t\tvar aspectRatio = (options.maintainAspectRatio && me.aspectRatio) || null;\r\n\r\n\t\t// the canvas render width and height will be casted to integers so make sure that\r\n\t\t// the canvas display style uses the same integer values to avoid blurring effect.\r\n\r\n\t\t// Set to 0 instead of canvas.size because the size defaults to 300x150 if the element is collapsed\r\n\t\tvar newWidth = Math.max(0, Math.floor(helpers$1.getMaximumWidth(canvas)));\r\n\t\tvar newHeight = Math.max(0, Math.floor(aspectRatio ? newWidth / aspectRatio : helpers$1.getMaximumHeight(canvas)));\r\n\r\n\t\tif (me.width === newWidth && me.height === newHeight) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcanvas.width = me.width = newWidth;\r\n\t\tcanvas.height = me.height = newHeight;\r\n\t\tcanvas.style.width = newWidth + 'px';\r\n\t\tcanvas.style.height = newHeight + 'px';\r\n\r\n\t\thelpers$1.retinaScale(me, options.devicePixelRatio);\r\n\r\n\t\tif (!silent) {\r\n\t\t\t// Notify any plugins about the resize\r\n\t\t\tvar newSize = {width: newWidth, height: newHeight};\r\n\t\t\tcore_plugins.notify(me, 'resize', [newSize]);\r\n\r\n\t\t\t// Notify of resize\r\n\t\t\tif (options.onResize) {\r\n\t\t\t\toptions.onResize(me, newSize);\r\n\t\t\t}\r\n\r\n\t\t\tme.stop();\r\n\t\t\tme.update({\r\n\t\t\t\tduration: options.responsiveAnimationDuration\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\tensureScalesHaveIDs: function() {\r\n\t\tvar options = this.options;\r\n\t\tvar scalesOptions = options.scales || {};\r\n\t\tvar scaleOptions = options.scale;\r\n\r\n\t\thelpers$1.each(scalesOptions.xAxes, function(xAxisOptions, index) {\r\n\t\t\tif (!xAxisOptions.id) {\r\n\t\t\t\txAxisOptions.id = nextAvailableScaleId(scalesOptions.xAxes, 'x-axis-', index);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\thelpers$1.each(scalesOptions.yAxes, function(yAxisOptions, index) {\r\n\t\t\tif (!yAxisOptions.id) {\r\n\t\t\t\tyAxisOptions.id = nextAvailableScaleId(scalesOptions.yAxes, 'y-axis-', index);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (scaleOptions) {\r\n\t\t\tscaleOptions.id = scaleOptions.id || 'scale';\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Builds a map of scale ID to scale object for future lookup.\r\n\t */\r\n\tbuildOrUpdateScales: function() {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar scales = me.scales || {};\r\n\t\tvar items = [];\r\n\t\tvar updated = Object.keys(scales).reduce(function(obj, id) {\r\n\t\t\tobj[id] = false;\r\n\t\t\treturn obj;\r\n\t\t}, {});\r\n\r\n\t\tif (options.scales) {\r\n\t\t\titems = items.concat(\r\n\t\t\t\t(options.scales.xAxes || []).map(function(xAxisOptions) {\r\n\t\t\t\t\treturn {options: xAxisOptions, dtype: 'category', dposition: 'bottom'};\r\n\t\t\t\t}),\r\n\t\t\t\t(options.scales.yAxes || []).map(function(yAxisOptions) {\r\n\t\t\t\t\treturn {options: yAxisOptions, dtype: 'linear', dposition: 'left'};\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (options.scale) {\r\n\t\t\titems.push({\r\n\t\t\t\toptions: options.scale,\r\n\t\t\t\tdtype: 'radialLinear',\r\n\t\t\t\tisDefault: true,\r\n\t\t\t\tdposition: 'chartArea'\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\thelpers$1.each(items, function(item) {\r\n\t\t\tvar scaleOptions = item.options;\r\n\t\t\tvar id = scaleOptions.id;\r\n\t\t\tvar scaleType = valueOrDefault$9(scaleOptions.type, item.dtype);\r\n\r\n\t\t\tif (positionIsHorizontal(scaleOptions.position) !== positionIsHorizontal(item.dposition)) {\r\n\t\t\t\tscaleOptions.position = item.dposition;\r\n\t\t\t}\r\n\r\n\t\t\tupdated[id] = true;\r\n\t\t\tvar scale = null;\r\n\t\t\tif (id in scales && scales[id].type === scaleType) {\r\n\t\t\t\tscale = scales[id];\r\n\t\t\t\tscale.options = scaleOptions;\r\n\t\t\t\tscale.ctx = me.ctx;\r\n\t\t\t\tscale.chart = me;\r\n\t\t\t} else {\r\n\t\t\t\tvar scaleClass = core_scaleService.getScaleConstructor(scaleType);\r\n\t\t\t\tif (!scaleClass) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tscale = new scaleClass({\r\n\t\t\t\t\tid: id,\r\n\t\t\t\t\ttype: scaleType,\r\n\t\t\t\t\toptions: scaleOptions,\r\n\t\t\t\t\tctx: me.ctx,\r\n\t\t\t\t\tchart: me\r\n\t\t\t\t});\r\n\t\t\t\tscales[scale.id] = scale;\r\n\t\t\t}\r\n\r\n\t\t\tscale.mergeTicksOptions();\r\n\r\n\t\t\t// TODO(SB): I think we should be able to remove this custom case (options.scale)\r\n\t\t\t// and consider it as a regular scale part of the \"scales\"\" map only! This would\r\n\t\t\t// make the logic easier and remove some useless? custom code.\r\n\t\t\tif (item.isDefault) {\r\n\t\t\t\tme.scale = scale;\r\n\t\t\t}\r\n\t\t});\r\n\t\t// clear up discarded scales\r\n\t\thelpers$1.each(updated, function(hasUpdated, id) {\r\n\t\t\tif (!hasUpdated) {\r\n\t\t\t\tdelete scales[id];\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tme.scales = scales;\r\n\r\n\t\tcore_scaleService.addScalesToLayout(this);\r\n\t},\r\n\r\n\tbuildOrUpdateControllers: function() {\r\n\t\tvar me = this;\r\n\t\tvar newControllers = [];\r\n\t\tvar datasets = me.data.datasets;\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = datasets.length; i < ilen; i++) {\r\n\t\t\tvar dataset = datasets[i];\r\n\t\t\tvar meta = me.getDatasetMeta(i);\r\n\t\t\tvar type = dataset.type || me.config.type;\r\n\r\n\t\t\tif (meta.type && meta.type !== type) {\r\n\t\t\t\tme.destroyDatasetMeta(i);\r\n\t\t\t\tmeta = me.getDatasetMeta(i);\r\n\t\t\t}\r\n\t\t\tmeta.type = type;\r\n\t\t\tmeta.order = dataset.order || 0;\r\n\t\t\tmeta.index = i;\r\n\r\n\t\t\tif (meta.controller) {\r\n\t\t\t\tmeta.controller.updateIndex(i);\r\n\t\t\t\tmeta.controller.linkScales();\r\n\t\t\t} else {\r\n\t\t\t\tvar ControllerClass = controllers[meta.type];\r\n\t\t\t\tif (ControllerClass === undefined) {\r\n\t\t\t\t\tthrow new Error('\"' + meta.type + '\" is not a chart type.');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmeta.controller = new ControllerClass(me, i);\r\n\t\t\t\tnewControllers.push(meta.controller);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn newControllers;\r\n\t},\r\n\r\n\t/**\r\n\t * Reset the elements of all datasets\r\n\t * @private\r\n\t */\r\n\tresetElements: function() {\r\n\t\tvar me = this;\r\n\t\thelpers$1.each(me.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\tme.getDatasetMeta(datasetIndex).controller.reset();\r\n\t\t}, me);\r\n\t},\r\n\r\n\t/**\r\n\t* Resets the chart back to it's state before the initial animation\r\n\t*/\r\n\treset: function() {\r\n\t\tthis.resetElements();\r\n\t\tthis.tooltip.initialize();\r\n\t},\r\n\r\n\tupdate: function(config) {\r\n\t\tvar me = this;\r\n\t\tvar i, ilen;\r\n\r\n\t\tif (!config || typeof config !== 'object') {\r\n\t\t\t// backwards compatibility\r\n\t\t\tconfig = {\r\n\t\t\t\tduration: config,\r\n\t\t\t\tlazy: arguments[1]\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tupdateConfig(me);\r\n\r\n\t\t// plugins options references might have change, let's invalidate the cache\r\n\t\t// https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167\r\n\t\tcore_plugins._invalidate(me);\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeUpdate') === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// In case the entire data object changed\r\n\t\tme.tooltip._data = me.data;\r\n\r\n\t\t// Make sure dataset controllers are updated and new controllers are reset\r\n\t\tvar newControllers = me.buildOrUpdateControllers();\r\n\r\n\t\t// Make sure all dataset controllers have correct meta data counts\r\n\t\tfor (i = 0, ilen = me.data.datasets.length; i < ilen; i++) {\r\n\t\t\tme.getDatasetMeta(i).controller.buildOrUpdateElements();\r\n\t\t}\r\n\r\n\t\tme.updateLayout();\r\n\r\n\t\t// Can only reset the new controllers after the scales have been updated\r\n\t\tif (me.options.animation && me.options.animation.duration) {\r\n\t\t\thelpers$1.each(newControllers, function(controller) {\r\n\t\t\t\tcontroller.reset();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tme.updateDatasets();\r\n\r\n\t\t// Need to reset tooltip in case it is displayed with elements that are removed\r\n\t\t// after update.\r\n\t\tme.tooltip.initialize();\r\n\r\n\t\t// Last active contains items that were previously in the tooltip.\r\n\t\t// When we reset the tooltip, we need to clear it\r\n\t\tme.lastActive = [];\r\n\r\n\t\t// Do this before render so that any plugins that need final scale updates can use it\r\n\t\tcore_plugins.notify(me, 'afterUpdate');\r\n\r\n\t\tme._layers.sort(compare2Level('z', '_idx'));\r\n\r\n\t\tif (me._bufferedRender) {\r\n\t\t\tme._bufferedRequest = {\r\n\t\t\t\tduration: config.duration,\r\n\t\t\t\teasing: config.easing,\r\n\t\t\t\tlazy: config.lazy\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tme.render(config);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Updates the chart layout unless a plugin returns `false` to the `beforeLayout`\r\n\t * hook, in which case, plugins will not be called on `afterLayout`.\r\n\t * @private\r\n\t */\r\n\tupdateLayout: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeLayout') === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcore_layouts.update(this, this.width, this.height);\r\n\r\n\t\tme._layers = [];\r\n\t\thelpers$1.each(me.boxes, function(box) {\r\n\t\t\t// _configure is called twice, once in core.scale.update and once here.\r\n\t\t\t// Here the boxes are fully updated and at their final positions.\r\n\t\t\tif (box._configure) {\r\n\t\t\t\tbox._configure();\r\n\t\t\t}\r\n\t\t\tme._layers.push.apply(me._layers, box._layers());\r\n\t\t}, me);\r\n\r\n\t\tme._layers.forEach(function(item, index) {\r\n\t\t\titem._idx = index;\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * Provided for backward compatibility, use `afterLayout` instead.\r\n\t\t * @method IPlugin#afterScaleUpdate\r\n\t\t * @deprecated since version 2.5.0\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\tcore_plugins.notify(me, 'afterScaleUpdate');\r\n\t\tcore_plugins.notify(me, 'afterLayout');\r\n\t},\r\n\r\n\t/**\r\n\t * Updates all datasets unless a plugin returns `false` to the `beforeDatasetsUpdate`\r\n\t * hook, in which case, plugins will not be called on `afterDatasetsUpdate`.\r\n\t * @private\r\n\t */\r\n\tupdateDatasets: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDatasetsUpdate') === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {\r\n\t\t\tme.updateDataset(i);\r\n\t\t}\r\n\r\n\t\tcore_plugins.notify(me, 'afterDatasetsUpdate');\r\n\t},\r\n\r\n\t/**\r\n\t * Updates dataset at index unless a plugin returns `false` to the `beforeDatasetUpdate`\r\n\t * hook, in which case, plugins will not be called on `afterDatasetUpdate`.\r\n\t * @private\r\n\t */\r\n\tupdateDataset: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getDatasetMeta(index);\r\n\t\tvar args = {\r\n\t\t\tmeta: meta,\r\n\t\t\tindex: index\r\n\t\t};\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDatasetUpdate', [args]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmeta.controller._update();\r\n\r\n\t\tcore_plugins.notify(me, 'afterDatasetUpdate', [args]);\r\n\t},\r\n\r\n\trender: function(config) {\r\n\t\tvar me = this;\r\n\r\n\t\tif (!config || typeof config !== 'object') {\r\n\t\t\t// backwards compatibility\r\n\t\t\tconfig = {\r\n\t\t\t\tduration: config,\r\n\t\t\t\tlazy: arguments[1]\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tvar animationOptions = me.options.animation;\r\n\t\tvar duration = valueOrDefault$9(config.duration, animationOptions && animationOptions.duration);\r\n\t\tvar lazy = config.lazy;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeRender') === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar onComplete = function(animation) {\r\n\t\t\tcore_plugins.notify(me, 'afterRender');\r\n\t\t\thelpers$1.callback(animationOptions && animationOptions.onComplete, [animation], me);\r\n\t\t};\r\n\r\n\t\tif (animationOptions && duration) {\r\n\t\t\tvar animation = new core_animation({\r\n\t\t\t\tnumSteps: duration / 16.66, // 60 fps\r\n\t\t\t\teasing: config.easing || animationOptions.easing,\r\n\r\n\t\t\t\trender: function(chart, animationObject) {\r\n\t\t\t\t\tvar easingFunction = helpers$1.easing.effects[animationObject.easing];\r\n\t\t\t\t\tvar currentStep = animationObject.currentStep;\r\n\t\t\t\t\tvar stepDecimal = currentStep / animationObject.numSteps;\r\n\r\n\t\t\t\t\tchart.draw(easingFunction(stepDecimal), stepDecimal, currentStep);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonAnimationProgress: animationOptions.onProgress,\r\n\t\t\t\tonAnimationComplete: onComplete\r\n\t\t\t});\r\n\r\n\t\t\tcore_animations.addAnimation(me, animation, duration, lazy);\r\n\t\t} else {\r\n\t\t\tme.draw();\r\n\r\n\t\t\t// See https://github.com/chartjs/Chart.js/issues/3781\r\n\t\t\tonComplete(new core_animation({numSteps: 0, chart: me}));\r\n\t\t}\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\tdraw: function(easingValue) {\r\n\t\tvar me = this;\r\n\t\tvar i, layers;\r\n\r\n\t\tme.clear();\r\n\r\n\t\tif (helpers$1.isNullOrUndef(easingValue)) {\r\n\t\t\teasingValue = 1;\r\n\t\t}\r\n\r\n\t\tme.transition(easingValue);\r\n\r\n\t\tif (me.width <= 0 || me.height <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDraw', [easingValue]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Because of plugin hooks (before/afterDatasetsDraw), datasets can't\r\n\t\t// currently be part of layers. Instead, we draw\r\n\t\t// layers <= 0 before(default, backward compat), and the rest after\r\n\t\tlayers = me._layers;\r\n\t\tfor (i = 0; i < layers.length && layers[i].z <= 0; ++i) {\r\n\t\t\tlayers[i].draw(me.chartArea);\r\n\t\t}\r\n\r\n\t\tme.drawDatasets(easingValue);\r\n\r\n\t\t// Rest of layers\r\n\t\tfor (; i < layers.length; ++i) {\r\n\t\t\tlayers[i].draw(me.chartArea);\r\n\t\t}\r\n\r\n\t\tme._drawTooltip(easingValue);\r\n\r\n\t\tcore_plugins.notify(me, 'afterDraw', [easingValue]);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\ttransition: function(easingValue) {\r\n\t\tvar me = this;\r\n\r\n\t\tfor (var i = 0, ilen = (me.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\tif (me.isDatasetVisible(i)) {\r\n\t\t\t\tme.getDatasetMeta(i).controller.transition(easingValue);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.tooltip.transition(easingValue);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getSortedDatasetMetas: function(filterVisible) {\r\n\t\tvar me = this;\r\n\t\tvar datasets = me.data.datasets || [];\r\n\t\tvar result = [];\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = datasets.length; i < ilen; ++i) {\r\n\t\t\tif (!filterVisible || me.isDatasetVisible(i)) {\r\n\t\t\t\tresult.push(me.getDatasetMeta(i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresult.sort(compare2Level('order', 'index'));\r\n\r\n\t\treturn result;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getSortedVisibleDatasetMetas: function() {\r\n\t\treturn this._getSortedDatasetMetas(true);\r\n\t},\r\n\r\n\t/**\r\n\t * Draws all datasets unless a plugin returns `false` to the `beforeDatasetsDraw`\r\n\t * hook, in which case, plugins will not be called on `afterDatasetsDraw`.\r\n\t * @private\r\n\t */\r\n\tdrawDatasets: function(easingValue) {\r\n\t\tvar me = this;\r\n\t\tvar metasets, i;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDatasetsDraw', [easingValue]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmetasets = me._getSortedVisibleDatasetMetas();\r\n\t\tfor (i = metasets.length - 1; i >= 0; --i) {\r\n\t\t\tme.drawDataset(metasets[i], easingValue);\r\n\t\t}\r\n\r\n\t\tcore_plugins.notify(me, 'afterDatasetsDraw', [easingValue]);\r\n\t},\r\n\r\n\t/**\r\n\t * Draws dataset at index unless a plugin returns `false` to the `beforeDatasetDraw`\r\n\t * hook, in which case, plugins will not be called on `afterDatasetDraw`.\r\n\t * @private\r\n\t */\r\n\tdrawDataset: function(meta, easingValue) {\r\n\t\tvar me = this;\r\n\t\tvar args = {\r\n\t\t\tmeta: meta,\r\n\t\t\tindex: meta.index,\r\n\t\t\teasingValue: easingValue\r\n\t\t};\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDatasetDraw', [args]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmeta.controller.draw(easingValue);\r\n\r\n\t\tcore_plugins.notify(me, 'afterDatasetDraw', [args]);\r\n\t},\r\n\r\n\t/**\r\n\t * Draws tooltip unless a plugin returns `false` to the `beforeTooltipDraw`\r\n\t * hook, in which case, plugins will not be called on `afterTooltipDraw`.\r\n\t * @private\r\n\t */\r\n\t_drawTooltip: function(easingValue) {\r\n\t\tvar me = this;\r\n\t\tvar tooltip = me.tooltip;\r\n\t\tvar args = {\r\n\t\t\ttooltip: tooltip,\r\n\t\t\teasingValue: easingValue\r\n\t\t};\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeTooltipDraw', [args]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\ttooltip.draw();\r\n\r\n\t\tcore_plugins.notify(me, 'afterTooltipDraw', [args]);\r\n\t},\r\n\r\n\t/**\r\n\t * Get the single element that was clicked on\r\n\t * @return An object containing the dataset index and element index of the matching element. Also contains the rectangle that was draw\r\n\t */\r\n\tgetElementAtEvent: function(e) {\r\n\t\treturn core_interaction.modes.single(this, e);\r\n\t},\r\n\r\n\tgetElementsAtEvent: function(e) {\r\n\t\treturn core_interaction.modes.label(this, e, {intersect: true});\r\n\t},\r\n\r\n\tgetElementsAtXAxis: function(e) {\r\n\t\treturn core_interaction.modes['x-axis'](this, e, {intersect: true});\r\n\t},\r\n\r\n\tgetElementsAtEventForMode: function(e, mode, options) {\r\n\t\tvar method = core_interaction.modes[mode];\r\n\t\tif (typeof method === 'function') {\r\n\t\t\treturn method(this, e, options);\r\n\t\t}\r\n\r\n\t\treturn [];\r\n\t},\r\n\r\n\tgetDatasetAtEvent: function(e) {\r\n\t\treturn core_interaction.modes.dataset(this, e, {intersect: true});\r\n\t},\r\n\r\n\tgetDatasetMeta: function(datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.data.datasets[datasetIndex];\r\n\t\tif (!dataset._meta) {\r\n\t\t\tdataset._meta = {};\r\n\t\t}\r\n\r\n\t\tvar meta = dataset._meta[me.id];\r\n\t\tif (!meta) {\r\n\t\t\tmeta = dataset._meta[me.id] = {\r\n\t\t\t\ttype: null,\r\n\t\t\t\tdata: [],\r\n\t\t\t\tdataset: null,\r\n\t\t\t\tcontroller: null,\r\n\t\t\t\thidden: null,\t\t\t// See isDatasetVisible() comment\r\n\t\t\t\txAxisID: null,\r\n\t\t\t\tyAxisID: null,\r\n\t\t\t\torder: dataset.order || 0,\r\n\t\t\t\tindex: datasetIndex\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn meta;\r\n\t},\r\n\r\n\tgetVisibleDatasetCount: function() {\r\n\t\tvar count = 0;\r\n\t\tfor (var i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\r\n\t\t\tif (this.isDatasetVisible(i)) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t},\r\n\r\n\tisDatasetVisible: function(datasetIndex) {\r\n\t\tvar meta = this.getDatasetMeta(datasetIndex);\r\n\r\n\t\t// meta.hidden is a per chart dataset hidden flag override with 3 states: if true or false,\r\n\t\t// the dataset.hidden value is ignored, else if null, the dataset hidden state is returned.\r\n\t\treturn typeof meta.hidden === 'boolean' ? !meta.hidden : !this.data.datasets[datasetIndex].hidden;\r\n\t},\r\n\r\n\tgenerateLegend: function() {\r\n\t\treturn this.options.legendCallback(this);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tdestroyDatasetMeta: function(datasetIndex) {\r\n\t\tvar id = this.id;\r\n\t\tvar dataset = this.data.datasets[datasetIndex];\r\n\t\tvar meta = dataset._meta && dataset._meta[id];\r\n\r\n\t\tif (meta) {\r\n\t\t\tmeta.controller.destroy();\r\n\t\t\tdelete dataset._meta[id];\r\n\t\t}\r\n\t},\r\n\r\n\tdestroy: function() {\r\n\t\tvar me = this;\r\n\t\tvar canvas = me.canvas;\r\n\t\tvar i, ilen;\r\n\r\n\t\tme.stop();\r\n\r\n\t\t// dataset controllers need to cleanup associated data\r\n\t\tfor (i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {\r\n\t\t\tme.destroyDatasetMeta(i);\r\n\t\t}\r\n\r\n\t\tif (canvas) {\r\n\t\t\tme.unbindEvents();\r\n\t\t\thelpers$1.canvas.clear(me);\r\n\t\t\tplatform.releaseContext(me.ctx);\r\n\t\t\tme.canvas = null;\r\n\t\t\tme.ctx = null;\r\n\t\t}\r\n\r\n\t\tcore_plugins.notify(me, 'destroy');\r\n\r\n\t\tdelete Chart.instances[me.id];\r\n\t},\r\n\r\n\ttoBase64Image: function() {\r\n\t\treturn this.canvas.toDataURL.apply(this.canvas, arguments);\r\n\t},\r\n\r\n\tinitToolTip: function() {\r\n\t\tvar me = this;\r\n\t\tme.tooltip = new core_tooltip({\r\n\t\t\t_chart: me,\r\n\t\t\t_chartInstance: me, // deprecated, backward compatibility\r\n\t\t\t_data: me.data,\r\n\t\t\t_options: me.options.tooltips\r\n\t\t}, me);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tbindEvents: function() {\r\n\t\tvar me = this;\r\n\t\tvar listeners = me._listeners = {};\r\n\t\tvar listener = function() {\r\n\t\t\tme.eventHandler.apply(me, arguments);\r\n\t\t};\r\n\r\n\t\thelpers$1.each(me.options.events, function(type) {\r\n\t\t\tplatform.addEventListener(me, type, listener);\r\n\t\t\tlisteners[type] = listener;\r\n\t\t});\r\n\r\n\t\t// Elements used to detect size change should not be injected for non responsive charts.\r\n\t\t// See https://github.com/chartjs/Chart.js/issues/2210\r\n\t\tif (me.options.responsive) {\r\n\t\t\tlistener = function() {\r\n\t\t\t\tme.resize();\r\n\t\t\t};\r\n\r\n\t\t\tplatform.addEventListener(me, 'resize', listener);\r\n\t\t\tlisteners.resize = listener;\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tunbindEvents: function() {\r\n\t\tvar me = this;\r\n\t\tvar listeners = me._listeners;\r\n\t\tif (!listeners) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tdelete me._listeners;\r\n\t\thelpers$1.each(listeners, function(listener, type) {\r\n\t\t\tplatform.removeEventListener(me, type, listener);\r\n\t\t});\r\n\t},\r\n\r\n\tupdateHoverStyle: function(elements, mode, enabled) {\r\n\t\tvar prefix = enabled ? 'set' : 'remove';\r\n\t\tvar element, i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = elements.length; i < ilen; ++i) {\r\n\t\t\telement = elements[i];\r\n\t\t\tif (element) {\r\n\t\t\t\tthis.getDatasetMeta(element._datasetIndex).controller[prefix + 'HoverStyle'](element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (mode === 'dataset') {\r\n\t\t\tthis.getDatasetMeta(elements[0]._datasetIndex).controller['_' + prefix + 'DatasetHoverStyle']();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\teventHandler: function(e) {\r\n\t\tvar me = this;\r\n\t\tvar tooltip = me.tooltip;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeEvent', [e]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Buffer any update calls so that renders do not occur\r\n\t\tme._bufferedRender = true;\r\n\t\tme._bufferedRequest = null;\r\n\r\n\t\tvar changed = me.handleEvent(e);\r\n\t\t// for smooth tooltip animations issue #4989\r\n\t\t// the tooltip should be the source of change\r\n\t\t// Animation check workaround:\r\n\t\t// tooltip._start will be null when tooltip isn't animating\r\n\t\tif (tooltip) {\r\n\t\t\tchanged = tooltip._start\r\n\t\t\t\t? tooltip.handleEvent(e)\r\n\t\t\t\t: changed | tooltip.handleEvent(e);\r\n\t\t}\r\n\r\n\t\tcore_plugins.notify(me, 'afterEvent', [e]);\r\n\r\n\t\tvar bufferedRequest = me._bufferedRequest;\r\n\t\tif (bufferedRequest) {\r\n\t\t\t// If we have an update that was triggered, we need to do a normal render\r\n\t\t\tme.render(bufferedRequest);\r\n\t\t} else if (changed && !me.animating) {\r\n\t\t\t// If entering, leaving, or changing elements, animate the change via pivot\r\n\t\t\tme.stop();\r\n\r\n\t\t\t// We only need to render at this point. Updating will cause scales to be\r\n\t\t\t// recomputed generating flicker & using more memory than necessary.\r\n\t\t\tme.render({\r\n\t\t\t\tduration: me.options.hover.animationDuration,\r\n\t\t\t\tlazy: true\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tme._bufferedRender = false;\r\n\t\tme._bufferedRequest = null;\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\t/**\r\n\t * Handle an event\r\n\t * @private\r\n\t * @param {IEvent} event the event to handle\r\n\t * @return {boolean} true if the chart needs to re-render\r\n\t */\r\n\thandleEvent: function(e) {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options || {};\r\n\t\tvar hoverOptions = options.hover;\r\n\t\tvar changed = false;\r\n\r\n\t\tme.lastActive = me.lastActive || [];\r\n\r\n\t\t// Find Active Elements for hover and tooltips\r\n\t\tif (e.type === 'mouseout') {\r\n\t\t\tme.active = [];\r\n\t\t} else {\r\n\t\t\tme.active = me.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions);\r\n\t\t}\r\n\r\n\t\t// Invoke onHover hook\r\n\t\t// Need to call with native event here to not break backwards compatibility\r\n\t\thelpers$1.callback(options.onHover || options.hover.onHover, [e.native, me.active], me);\r\n\r\n\t\tif (e.type === 'mouseup' || e.type === 'click') {\r\n\t\t\tif (options.onClick) {\r\n\t\t\t\t// Use e.native here for backwards compatibility\r\n\t\t\t\toptions.onClick.call(me, e.native, me.active);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove styling for last active (even if it may still be active)\r\n\t\tif (me.lastActive.length) {\r\n\t\t\tme.updateHoverStyle(me.lastActive, hoverOptions.mode, false);\r\n\t\t}\r\n\r\n\t\t// Built in hover styling\r\n\t\tif (me.active.length && hoverOptions.mode) {\r\n\t\t\tme.updateHoverStyle(me.active, hoverOptions.mode, true);\r\n\t\t}\r\n\r\n\t\tchanged = !helpers$1.arrayEquals(me.active, me.lastActive);\r\n\r\n\t\t// Remember Last Actives\r\n\t\tme.lastActive = me.active;\r\n\r\n\t\treturn changed;\r\n\t}\r\n});\r\n\r\n/**\r\n * NOTE(SB) We actually don't use this container anymore but we need to keep it\r\n * for backward compatibility. Though, it can still be useful for plugins that\r\n * would need to work on multiple charts?!\r\n */\r\nChart.instances = {};\r\n\r\nvar core_controller = Chart;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart instead.\r\n * @class Chart.Controller\r\n * @deprecated since version 2.6\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nChart.Controller = Chart;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore.\r\n * @namespace Chart\r\n * @deprecated since version 2.8\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nChart.types = {};\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore.\r\n * @namespace Chart.helpers.configMerge\r\n * @deprecated since version 2.8.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers$1.configMerge = mergeConfig;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore.\r\n * @namespace Chart.helpers.scaleMerge\r\n * @deprecated since version 2.8.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers$1.scaleMerge = mergeScaleConfig;\n\nvar core_helpers = function() {\r\n\r\n\t// -- Basic js utility methods\r\n\r\n\thelpers$1.where = function(collection, filterCallback) {\r\n\t\tif (helpers$1.isArray(collection) && Array.prototype.filter) {\r\n\t\t\treturn collection.filter(filterCallback);\r\n\t\t}\r\n\t\tvar filtered = [];\r\n\r\n\t\thelpers$1.each(collection, function(item) {\r\n\t\t\tif (filterCallback(item)) {\r\n\t\t\t\tfiltered.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filtered;\r\n\t};\r\n\thelpers$1.findIndex = Array.prototype.findIndex ?\r\n\t\tfunction(array, callback, scope) {\r\n\t\t\treturn array.findIndex(callback, scope);\r\n\t\t} :\r\n\t\tfunction(array, callback, scope) {\r\n\t\t\tscope = scope === undefined ? array : scope;\r\n\t\t\tfor (var i = 0, ilen = array.length; i < ilen; ++i) {\r\n\t\t\t\tif (callback.call(scope, array[i], i, array)) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t};\r\n\thelpers$1.findNextWhere = function(arrayToSearch, filterCallback, startIndex) {\r\n\t\t// Default to start of the array\r\n\t\tif (helpers$1.isNullOrUndef(startIndex)) {\r\n\t\t\tstartIndex = -1;\r\n\t\t}\r\n\t\tfor (var i = startIndex + 1; i < arrayToSearch.length; i++) {\r\n\t\t\tvar currentItem = arrayToSearch[i];\r\n\t\t\tif (filterCallback(currentItem)) {\r\n\t\t\t\treturn currentItem;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\thelpers$1.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex) {\r\n\t\t// Default to end of the array\r\n\t\tif (helpers$1.isNullOrUndef(startIndex)) {\r\n\t\t\tstartIndex = arrayToSearch.length;\r\n\t\t}\r\n\t\tfor (var i = startIndex - 1; i >= 0; i--) {\r\n\t\t\tvar currentItem = arrayToSearch[i];\r\n\t\t\tif (filterCallback(currentItem)) {\r\n\t\t\t\treturn currentItem;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// -- Math methods\r\n\thelpers$1.isNumber = function(n) {\r\n\t\treturn !isNaN(parseFloat(n)) && isFinite(n);\r\n\t};\r\n\thelpers$1.almostEquals = function(x, y, epsilon) {\r\n\t\treturn Math.abs(x - y) < epsilon;\r\n\t};\r\n\thelpers$1.almostWhole = function(x, epsilon) {\r\n\t\tvar rounded = Math.round(x);\r\n\t\treturn ((rounded - epsilon) <= x) && ((rounded + epsilon) >= x);\r\n\t};\r\n\thelpers$1.max = function(array) {\r\n\t\treturn array.reduce(function(max, value) {\r\n\t\t\tif (!isNaN(value)) {\r\n\t\t\t\treturn Math.max(max, value);\r\n\t\t\t}\r\n\t\t\treturn max;\r\n\t\t}, Number.NEGATIVE_INFINITY);\r\n\t};\r\n\thelpers$1.min = function(array) {\r\n\t\treturn array.reduce(function(min, value) {\r\n\t\t\tif (!isNaN(value)) {\r\n\t\t\t\treturn Math.min(min, value);\r\n\t\t\t}\r\n\t\t\treturn min;\r\n\t\t}, Number.POSITIVE_INFINITY);\r\n\t};\r\n\thelpers$1.sign = Math.sign ?\r\n\t\tfunction(x) {\r\n\t\t\treturn Math.sign(x);\r\n\t\t} :\r\n\t\tfunction(x) {\r\n\t\t\tx = +x; // convert to a number\r\n\t\t\tif (x === 0 || isNaN(x)) {\r\n\t\t\t\treturn x;\r\n\t\t\t}\r\n\t\t\treturn x > 0 ? 1 : -1;\r\n\t\t};\r\n\thelpers$1.toRadians = function(degrees) {\r\n\t\treturn degrees * (Math.PI / 180);\r\n\t};\r\n\thelpers$1.toDegrees = function(radians) {\r\n\t\treturn radians * (180 / Math.PI);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the number of decimal places\r\n\t * i.e. the number of digits after the decimal point, of the value of this Number.\r\n\t * @param {number} x - A number.\r\n\t * @returns {number} The number of decimal places.\r\n\t * @private\r\n\t */\r\n\thelpers$1._decimalPlaces = function(x) {\r\n\t\tif (!helpers$1.isFinite(x)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar e = 1;\r\n\t\tvar p = 0;\r\n\t\twhile (Math.round(x * e) / e !== x) {\r\n\t\t\te *= 10;\r\n\t\t\tp++;\r\n\t\t}\r\n\t\treturn p;\r\n\t};\r\n\r\n\t// Gets the angle from vertical upright to the point about a centre.\r\n\thelpers$1.getAngleFromPoint = function(centrePoint, anglePoint) {\r\n\t\tvar distanceFromXCenter = anglePoint.x - centrePoint.x;\r\n\t\tvar distanceFromYCenter = anglePoint.y - centrePoint.y;\r\n\t\tvar radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\r\n\r\n\t\tvar angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\r\n\r\n\t\tif (angle < (-0.5 * Math.PI)) {\r\n\t\t\tangle += 2.0 * Math.PI; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tangle: angle,\r\n\t\t\tdistance: radialDistanceFromCenter\r\n\t\t};\r\n\t};\r\n\thelpers$1.distanceBetweenPoints = function(pt1, pt2) {\r\n\t\treturn Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\r\n\t};\r\n\r\n\t/**\r\n\t * Provided for backward compatibility, not available anymore\r\n\t * @function Chart.helpers.aliasPixel\r\n\t * @deprecated since version 2.8.0\r\n\t * @todo remove at version 3\r\n\t */\r\n\thelpers$1.aliasPixel = function(pixelWidth) {\r\n\t\treturn (pixelWidth % 2 === 0) ? 0 : 0.5;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the aligned pixel value to avoid anti-aliasing blur\r\n\t * @param {Chart} chart - The chart instance.\r\n\t * @param {number} pixel - A pixel value.\r\n\t * @param {number} width - The width of the element.\r\n\t * @returns {number} The aligned pixel value.\r\n\t * @private\r\n\t */\r\n\thelpers$1._alignPixel = function(chart, pixel, width) {\r\n\t\tvar devicePixelRatio = chart.currentDevicePixelRatio;\r\n\t\tvar halfWidth = width / 2;\r\n\t\treturn Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\r\n\t};\r\n\r\n\thelpers$1.splineCurve = function(firstPoint, middlePoint, afterPoint, t) {\r\n\t\t// Props to Rob Spencer at scaled innovation for his post on splining between points\r\n\t\t// http://scaledinnovation.com/analytics/splines/aboutSplines.html\r\n\r\n\t\t// This function must also respect \"skipped\" points\r\n\r\n\t\tvar previous = firstPoint.skip ? middlePoint : firstPoint;\r\n\t\tvar current = middlePoint;\r\n\t\tvar next = afterPoint.skip ? middlePoint : afterPoint;\r\n\r\n\t\tvar d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2));\r\n\t\tvar d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2));\r\n\r\n\t\tvar s01 = d01 / (d01 + d12);\r\n\t\tvar s12 = d12 / (d01 + d12);\r\n\r\n\t\t// If all points are the same, s01 & s02 will be inf\r\n\t\ts01 = isNaN(s01) ? 0 : s01;\r\n\t\ts12 = isNaN(s12) ? 0 : s12;\r\n\r\n\t\tvar fa = t * s01; // scaling factor for triangle Ta\r\n\t\tvar fb = t * s12;\r\n\r\n\t\treturn {\r\n\t\t\tprevious: {\r\n\t\t\t\tx: current.x - fa * (next.x - previous.x),\r\n\t\t\t\ty: current.y - fa * (next.y - previous.y)\r\n\t\t\t},\r\n\t\t\tnext: {\r\n\t\t\t\tx: current.x + fb * (next.x - previous.x),\r\n\t\t\t\ty: current.y + fb * (next.y - previous.y)\r\n\t\t\t}\r\n\t\t};\r\n\t};\r\n\thelpers$1.EPSILON = Number.EPSILON || 1e-14;\r\n\thelpers$1.splineCurveMonotone = function(points) {\r\n\t\t// This function calculates Bézier control points in a similar way than |splineCurve|,\r\n\t\t// but preserves monotonicity of the provided data and ensures no local extremums are added\r\n\t\t// between the dataset discrete points due to the interpolation.\r\n\t\t// See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\r\n\r\n\t\tvar pointsWithTangents = (points || []).map(function(point) {\r\n\t\t\treturn {\r\n\t\t\t\tmodel: point._model,\r\n\t\t\t\tdeltaK: 0,\r\n\t\t\t\tmK: 0\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\t// Calculate slopes (deltaK) and initialize tangents (mK)\r\n\t\tvar pointsLen = pointsWithTangents.length;\r\n\t\tvar i, pointBefore, pointCurrent, pointAfter;\r\n\t\tfor (i = 0; i < pointsLen; ++i) {\r\n\t\t\tpointCurrent = pointsWithTangents[i];\r\n\t\t\tif (pointCurrent.model.skip) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\r\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\r\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\r\n\t\t\t\tvar slopeDeltaX = (pointAfter.model.x - pointCurrent.model.x);\r\n\r\n\t\t\t\t// In the case of two points that appear at the same x pixel, slopeDeltaX is 0\r\n\t\t\t\tpointCurrent.deltaK = slopeDeltaX !== 0 ? (pointAfter.model.y - pointCurrent.model.y) / slopeDeltaX : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif (!pointBefore || pointBefore.model.skip) {\r\n\t\t\t\tpointCurrent.mK = pointCurrent.deltaK;\r\n\t\t\t} else if (!pointAfter || pointAfter.model.skip) {\r\n\t\t\t\tpointCurrent.mK = pointBefore.deltaK;\r\n\t\t\t} else if (this.sign(pointBefore.deltaK) !== this.sign(pointCurrent.deltaK)) {\r\n\t\t\t\tpointCurrent.mK = 0;\r\n\t\t\t} else {\r\n\t\t\t\tpointCurrent.mK = (pointBefore.deltaK + pointCurrent.deltaK) / 2;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Adjust tangents to ensure monotonic properties\r\n\t\tvar alphaK, betaK, tauK, squaredMagnitude;\r\n\t\tfor (i = 0; i < pointsLen - 1; ++i) {\r\n\t\t\tpointCurrent = pointsWithTangents[i];\r\n\t\t\tpointAfter = pointsWithTangents[i + 1];\r\n\t\t\tif (pointCurrent.model.skip || pointAfter.model.skip) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (helpers$1.almostEquals(pointCurrent.deltaK, 0, this.EPSILON)) {\r\n\t\t\t\tpointCurrent.mK = pointAfter.mK = 0;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\talphaK = pointCurrent.mK / pointCurrent.deltaK;\r\n\t\t\tbetaK = pointAfter.mK / pointCurrent.deltaK;\r\n\t\t\tsquaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\r\n\t\t\tif (squaredMagnitude <= 9) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\ttauK = 3 / Math.sqrt(squaredMagnitude);\r\n\t\t\tpointCurrent.mK = alphaK * tauK * pointCurrent.deltaK;\r\n\t\t\tpointAfter.mK = betaK * tauK * pointCurrent.deltaK;\r\n\t\t}\r\n\r\n\t\t// Compute control points\r\n\t\tvar deltaX;\r\n\t\tfor (i = 0; i < pointsLen; ++i) {\r\n\t\t\tpointCurrent = pointsWithTangents[i];\r\n\t\t\tif (pointCurrent.model.skip) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\r\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\r\n\t\t\tif (pointBefore && !pointBefore.model.skip) {\r\n\t\t\t\tdeltaX = (pointCurrent.model.x - pointBefore.model.x) / 3;\r\n\t\t\t\tpointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX;\r\n\t\t\t\tpointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK;\r\n\t\t\t}\r\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\r\n\t\t\t\tdeltaX = (pointAfter.model.x - pointCurrent.model.x) / 3;\r\n\t\t\t\tpointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX;\r\n\t\t\t\tpointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\thelpers$1.nextItem = function(collection, index, loop) {\r\n\t\tif (loop) {\r\n\t\t\treturn index >= collection.length - 1 ? collection[0] : collection[index + 1];\r\n\t\t}\r\n\t\treturn index >= collection.length - 1 ? collection[collection.length - 1] : collection[index + 1];\r\n\t};\r\n\thelpers$1.previousItem = function(collection, index, loop) {\r\n\t\tif (loop) {\r\n\t\t\treturn index <= 0 ? collection[collection.length - 1] : collection[index - 1];\r\n\t\t}\r\n\t\treturn index <= 0 ? collection[0] : collection[index - 1];\r\n\t};\r\n\t// Implementation of the nice number algorithm used in determining where axis labels will go\r\n\thelpers$1.niceNum = function(range, round) {\r\n\t\tvar exponent = Math.floor(helpers$1.log10(range));\r\n\t\tvar fraction = range / Math.pow(10, exponent);\r\n\t\tvar niceFraction;\r\n\r\n\t\tif (round) {\r\n\t\t\tif (fraction < 1.5) {\r\n\t\t\t\tniceFraction = 1;\r\n\t\t\t} else if (fraction < 3) {\r\n\t\t\t\tniceFraction = 2;\r\n\t\t\t} else if (fraction < 7) {\r\n\t\t\t\tniceFraction = 5;\r\n\t\t\t} else {\r\n\t\t\t\tniceFraction = 10;\r\n\t\t\t}\r\n\t\t} else if (fraction <= 1.0) {\r\n\t\t\tniceFraction = 1;\r\n\t\t} else if (fraction <= 2) {\r\n\t\t\tniceFraction = 2;\r\n\t\t} else if (fraction <= 5) {\r\n\t\t\tniceFraction = 5;\r\n\t\t} else {\r\n\t\t\tniceFraction = 10;\r\n\t\t}\r\n\r\n\t\treturn niceFraction * Math.pow(10, exponent);\r\n\t};\r\n\t// Request animation polyfill - https://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\thelpers$1.requestAnimFrame = (function() {\r\n\t\tif (typeof window === 'undefined') {\r\n\t\t\treturn function(callback) {\r\n\t\t\t\tcallback();\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn window.requestAnimationFrame ||\r\n\t\t\twindow.webkitRequestAnimationFrame ||\r\n\t\t\twindow.mozRequestAnimationFrame ||\r\n\t\t\twindow.oRequestAnimationFrame ||\r\n\t\t\twindow.msRequestAnimationFrame ||\r\n\t\t\tfunction(callback) {\r\n\t\t\t\treturn window.setTimeout(callback, 1000 / 60);\r\n\t\t\t};\r\n\t}());\r\n\t// -- DOM methods\r\n\thelpers$1.getRelativePosition = function(evt, chart) {\r\n\t\tvar mouseX, mouseY;\r\n\t\tvar e = evt.originalEvent || evt;\r\n\t\tvar canvas = evt.target || evt.srcElement;\r\n\t\tvar boundingRect = canvas.getBoundingClientRect();\r\n\r\n\t\tvar touches = e.touches;\r\n\t\tif (touches && touches.length > 0) {\r\n\t\t\tmouseX = touches[0].clientX;\r\n\t\t\tmouseY = touches[0].clientY;\r\n\r\n\t\t} else {\r\n\t\t\tmouseX = e.clientX;\r\n\t\t\tmouseY = e.clientY;\r\n\t\t}\r\n\r\n\t\t// Scale mouse coordinates into canvas coordinates\r\n\t\t// by following the pattern laid out by 'jerryj' in the comments of\r\n\t\t// https://www.html5canvastutorials.com/advanced/html5-canvas-mouse-coordinates/\r\n\t\tvar paddingLeft = parseFloat(helpers$1.getStyle(canvas, 'padding-left'));\r\n\t\tvar paddingTop = parseFloat(helpers$1.getStyle(canvas, 'padding-top'));\r\n\t\tvar paddingRight = parseFloat(helpers$1.getStyle(canvas, 'padding-right'));\r\n\t\tvar paddingBottom = parseFloat(helpers$1.getStyle(canvas, 'padding-bottom'));\r\n\t\tvar width = boundingRect.right - boundingRect.left - paddingLeft - paddingRight;\r\n\t\tvar height = boundingRect.bottom - boundingRect.top - paddingTop - paddingBottom;\r\n\r\n\t\t// We divide by the current device pixel ratio, because the canvas is scaled up by that amount in each direction. However\r\n\t\t// the backend model is in unscaled coordinates. Since we are going to deal with our model coordinates, we go back here\r\n\t\tmouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio);\r\n\t\tmouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio);\r\n\r\n\t\treturn {\r\n\t\t\tx: mouseX,\r\n\t\t\ty: mouseY\r\n\t\t};\r\n\r\n\t};\r\n\r\n\t// Private helper function to convert max-width/max-height values that may be percentages into a number\r\n\tfunction parseMaxStyle(styleValue, node, parentProperty) {\r\n\t\tvar valueInPixels;\r\n\t\tif (typeof styleValue === 'string') {\r\n\t\t\tvalueInPixels = parseInt(styleValue, 10);\r\n\r\n\t\t\tif (styleValue.indexOf('%') !== -1) {\r\n\t\t\t\t// percentage * size in dimension\r\n\t\t\t\tvalueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvalueInPixels = styleValue;\r\n\t\t}\r\n\r\n\t\treturn valueInPixels;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns if the given value contains an effective constraint.\r\n\t * @private\r\n\t */\r\n\tfunction isConstrainedValue(value) {\r\n\t\treturn value !== undefined && value !== null && value !== 'none';\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the max width or height of the given DOM node in a cross-browser compatible fashion\r\n\t * @param {HTMLElement} domNode - the node to check the constraint on\r\n\t * @param {string} maxStyle - the style that defines the maximum for the direction we are using ('max-width' / 'max-height')\r\n\t * @param {string} percentageProperty - property of parent to use when calculating width as a percentage\r\n\t * @see {@link https://www.nathanaeljones.com/blog/2013/reading-max-width-cross-browser}\r\n\t */\r\n\tfunction getConstraintDimension(domNode, maxStyle, percentageProperty) {\r\n\t\tvar view = document.defaultView;\r\n\t\tvar parentNode = helpers$1._getParentNode(domNode);\r\n\t\tvar constrainedNode = view.getComputedStyle(domNode)[maxStyle];\r\n\t\tvar constrainedContainer = view.getComputedStyle(parentNode)[maxStyle];\r\n\t\tvar hasCNode = isConstrainedValue(constrainedNode);\r\n\t\tvar hasCContainer = isConstrainedValue(constrainedContainer);\r\n\t\tvar infinity = Number.POSITIVE_INFINITY;\r\n\r\n\t\tif (hasCNode || hasCContainer) {\r\n\t\t\treturn Math.min(\r\n\t\t\t\thasCNode ? parseMaxStyle(constrainedNode, domNode, percentageProperty) : infinity,\r\n\t\t\t\thasCContainer ? parseMaxStyle(constrainedContainer, parentNode, percentageProperty) : infinity);\r\n\t\t}\r\n\r\n\t\treturn 'none';\r\n\t}\r\n\t// returns Number or undefined if no constraint\r\n\thelpers$1.getConstraintWidth = function(domNode) {\r\n\t\treturn getConstraintDimension(domNode, 'max-width', 'clientWidth');\r\n\t};\r\n\t// returns Number or undefined if no constraint\r\n\thelpers$1.getConstraintHeight = function(domNode) {\r\n\t\treturn getConstraintDimension(domNode, 'max-height', 'clientHeight');\r\n\t};\r\n\t/**\r\n\t * @private\r\n \t */\r\n\thelpers$1._calculatePadding = function(container, padding, parentDimension) {\r\n\t\tpadding = helpers$1.getStyle(container, padding);\r\n\r\n\t\treturn padding.indexOf('%') > -1 ? parentDimension * parseInt(padding, 10) / 100 : parseInt(padding, 10);\r\n\t};\r\n\t/**\r\n\t * @private\r\n\t */\r\n\thelpers$1._getParentNode = function(domNode) {\r\n\t\tvar parent = domNode.parentNode;\r\n\t\tif (parent && parent.toString() === '[object ShadowRoot]') {\r\n\t\t\tparent = parent.host;\r\n\t\t}\r\n\t\treturn parent;\r\n\t};\r\n\thelpers$1.getMaximumWidth = function(domNode) {\r\n\t\tvar container = helpers$1._getParentNode(domNode);\r\n\t\tif (!container) {\r\n\t\t\treturn domNode.clientWidth;\r\n\t\t}\r\n\r\n\t\tvar clientWidth = container.clientWidth;\r\n\t\tvar paddingLeft = helpers$1._calculatePadding(container, 'padding-left', clientWidth);\r\n\t\tvar paddingRight = helpers$1._calculatePadding(container, 'padding-right', clientWidth);\r\n\r\n\t\tvar w = clientWidth - paddingLeft - paddingRight;\r\n\t\tvar cw = helpers$1.getConstraintWidth(domNode);\r\n\t\treturn isNaN(cw) ? w : Math.min(w, cw);\r\n\t};\r\n\thelpers$1.getMaximumHeight = function(domNode) {\r\n\t\tvar container = helpers$1._getParentNode(domNode);\r\n\t\tif (!container) {\r\n\t\t\treturn domNode.clientHeight;\r\n\t\t}\r\n\r\n\t\tvar clientHeight = container.clientHeight;\r\n\t\tvar paddingTop = helpers$1._calculatePadding(container, 'padding-top', clientHeight);\r\n\t\tvar paddingBottom = helpers$1._calculatePadding(container, 'padding-bottom', clientHeight);\r\n\r\n\t\tvar h = clientHeight - paddingTop - paddingBottom;\r\n\t\tvar ch = helpers$1.getConstraintHeight(domNode);\r\n\t\treturn isNaN(ch) ? h : Math.min(h, ch);\r\n\t};\r\n\thelpers$1.getStyle = function(el, property) {\r\n\t\treturn el.currentStyle ?\r\n\t\t\tel.currentStyle[property] :\r\n\t\t\tdocument.defaultView.getComputedStyle(el, null).getPropertyValue(property);\r\n\t};\r\n\thelpers$1.retinaScale = function(chart, forceRatio) {\r\n\t\tvar pixelRatio = chart.currentDevicePixelRatio = forceRatio || (typeof window !== 'undefined' && window.devicePixelRatio) || 1;\r\n\t\tif (pixelRatio === 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar canvas = chart.canvas;\r\n\t\tvar height = chart.height;\r\n\t\tvar width = chart.width;\r\n\r\n\t\tcanvas.height = height * pixelRatio;\r\n\t\tcanvas.width = width * pixelRatio;\r\n\t\tchart.ctx.scale(pixelRatio, pixelRatio);\r\n\r\n\t\t// If no style has been set on the canvas, the render size is used as display size,\r\n\t\t// making the chart visually bigger, so let's enforce it to the \"correct\" values.\r\n\t\t// See https://github.com/chartjs/Chart.js/issues/3575\r\n\t\tif (!canvas.style.height && !canvas.style.width) {\r\n\t\t\tcanvas.style.height = height + 'px';\r\n\t\t\tcanvas.style.width = width + 'px';\r\n\t\t}\r\n\t};\r\n\t// -- Canvas methods\r\n\thelpers$1.fontString = function(pixelSize, fontStyle, fontFamily) {\r\n\t\treturn fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\r\n\t};\r\n\thelpers$1.longestText = function(ctx, font, arrayOfThings, cache) {\r\n\t\tcache = cache || {};\r\n\t\tvar data = cache.data = cache.data || {};\r\n\t\tvar gc = cache.garbageCollect = cache.garbageCollect || [];\r\n\r\n\t\tif (cache.font !== font) {\r\n\t\t\tdata = cache.data = {};\r\n\t\t\tgc = cache.garbageCollect = [];\r\n\t\t\tcache.font = font;\r\n\t\t}\r\n\r\n\t\tctx.font = font;\r\n\t\tvar longest = 0;\r\n\t\tvar ilen = arrayOfThings.length;\r\n\t\tvar i, j, jlen, thing, nestedThing;\r\n\t\tfor (i = 0; i < ilen; i++) {\r\n\t\t\tthing = arrayOfThings[i];\r\n\r\n\t\t\t// Undefined strings and arrays should not be measured\r\n\t\t\tif (thing !== undefined && thing !== null && helpers$1.isArray(thing) !== true) {\r\n\t\t\t\tlongest = helpers$1.measureText(ctx, data, gc, longest, thing);\r\n\t\t\t} else if (helpers$1.isArray(thing)) {\r\n\t\t\t\t// if it is an array lets measure each element\r\n\t\t\t\t// to do maybe simplify this function a bit so we can do this more recursively?\r\n\t\t\t\tfor (j = 0, jlen = thing.length; j < jlen; j++) {\r\n\t\t\t\t\tnestedThing = thing[j];\r\n\t\t\t\t\t// Undefined strings and arrays should not be measured\r\n\t\t\t\t\tif (nestedThing !== undefined && nestedThing !== null && !helpers$1.isArray(nestedThing)) {\r\n\t\t\t\t\t\tlongest = helpers$1.measureText(ctx, data, gc, longest, nestedThing);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar gcLen = gc.length / 2;\r\n\t\tif (gcLen > arrayOfThings.length) {\r\n\t\t\tfor (i = 0; i < gcLen; i++) {\r\n\t\t\t\tdelete data[gc[i]];\r\n\t\t\t}\r\n\t\t\tgc.splice(0, gcLen);\r\n\t\t}\r\n\t\treturn longest;\r\n\t};\r\n\thelpers$1.measureText = function(ctx, data, gc, longest, string) {\r\n\t\tvar textWidth = data[string];\r\n\t\tif (!textWidth) {\r\n\t\t\ttextWidth = data[string] = ctx.measureText(string).width;\r\n\t\t\tgc.push(string);\r\n\t\t}\r\n\t\tif (textWidth > longest) {\r\n\t\t\tlongest = textWidth;\r\n\t\t}\r\n\t\treturn longest;\r\n\t};\r\n\r\n\t/**\r\n\t * @deprecated\r\n\t */\r\n\thelpers$1.numberOfLabelLines = function(arrayOfThings) {\r\n\t\tvar numberOfLines = 1;\r\n\t\thelpers$1.each(arrayOfThings, function(thing) {\r\n\t\t\tif (helpers$1.isArray(thing)) {\r\n\t\t\t\tif (thing.length > numberOfLines) {\r\n\t\t\t\t\tnumberOfLines = thing.length;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn numberOfLines;\r\n\t};\r\n\r\n\thelpers$1.color = !chartjsColor ?\r\n\t\tfunction(value) {\r\n\t\t\tconsole.error('Color.js not found!');\r\n\t\t\treturn value;\r\n\t\t} :\r\n\t\tfunction(value) {\r\n\t\t\t/* global CanvasGradient */\r\n\t\t\tif (value instanceof CanvasGradient) {\r\n\t\t\t\tvalue = core_defaults.global.defaultColor;\r\n\t\t\t}\r\n\r\n\t\t\treturn chartjsColor(value);\r\n\t\t};\r\n\r\n\thelpers$1.getHoverColor = function(colorValue) {\r\n\t\t/* global CanvasPattern */\r\n\t\treturn (colorValue instanceof CanvasPattern || colorValue instanceof CanvasGradient) ?\r\n\t\t\tcolorValue :\r\n\t\t\thelpers$1.color(colorValue).saturate(0.5).darken(0.1).rgbString();\r\n\t};\r\n};\n\nfunction abstract() {\r\n\tthrow new Error(\r\n\t\t'This method is not implemented: either no adapter can ' +\r\n\t\t'be found or an incomplete integration was provided.'\r\n\t);\r\n}\r\n\r\n/**\r\n * Date adapter (current used by the time scale)\r\n * @namespace Chart._adapters._date\r\n * @memberof Chart._adapters\r\n * @private\r\n */\r\n\r\n/**\r\n * Currently supported unit string values.\r\n * @typedef {('millisecond'|'second'|'minute'|'hour'|'day'|'week'|'month'|'quarter'|'year')}\r\n * @memberof Chart._adapters._date\r\n * @name Unit\r\n */\r\n\r\n/**\r\n * @class\r\n */\r\nfunction DateAdapter(options) {\r\n\tthis.options = options || {};\r\n}\r\n\r\nhelpers$1.extend(DateAdapter.prototype, /** @lends DateAdapter */ {\r\n\t/**\r\n\t * Returns a map of time formats for the supported formatting units defined\r\n\t * in Unit as well as 'datetime' representing a detailed date/time string.\r\n\t * @returns {{string: string}}\r\n\t */\r\n\tformats: abstract,\r\n\r\n\t/**\r\n\t * Parses the given `value` and return the associated timestamp.\r\n\t * @param {any} value - the value to parse (usually comes from the data)\r\n\t * @param {string} [format] - the expected data format\r\n\t * @returns {(number|null)}\r\n\t * @function\r\n\t */\r\n\tparse: abstract,\r\n\r\n\t/**\r\n\t * Returns the formatted date in the specified `format` for a given `timestamp`.\r\n\t * @param {number} timestamp - the timestamp to format\r\n\t * @param {string} format - the date/time token\r\n\t * @return {string}\r\n\t * @function\r\n\t */\r\n\tformat: abstract,\r\n\r\n\t/**\r\n\t * Adds the specified `amount` of `unit` to the given `timestamp`.\r\n\t * @param {number} timestamp - the input timestamp\r\n\t * @param {number} amount - the amount to add\r\n\t * @param {Unit} unit - the unit as string\r\n\t * @return {number}\r\n\t * @function\r\n\t */\r\n\tadd: abstract,\r\n\r\n\t/**\r\n\t * Returns the number of `unit` between the given timestamps.\r\n\t * @param {number} max - the input timestamp (reference)\r\n\t * @param {number} min - the timestamp to substract\r\n\t * @param {Unit} unit - the unit as string\r\n\t * @return {number}\r\n\t * @function\r\n\t */\r\n\tdiff: abstract,\r\n\r\n\t/**\r\n\t * Returns start of `unit` for the given `timestamp`.\r\n\t * @param {number} timestamp - the input timestamp\r\n\t * @param {Unit} unit - the unit as string\r\n\t * @param {number} [weekday] - the ISO day of the week with 1 being Monday\r\n\t * and 7 being Sunday (only needed if param *unit* is `isoWeek`).\r\n\t * @function\r\n\t */\r\n\tstartOf: abstract,\r\n\r\n\t/**\r\n\t * Returns end of `unit` for the given `timestamp`.\r\n\t * @param {number} timestamp - the input timestamp\r\n\t * @param {Unit} unit - the unit as string\r\n\t * @function\r\n\t */\r\n\tendOf: abstract,\r\n\r\n\t// DEPRECATIONS\r\n\r\n\t/**\r\n\t * Provided for backward compatibility for scale.getValueForPixel(),\r\n\t * this method should be overridden only by the moment adapter.\r\n\t * @deprecated since version 2.8.0\r\n\t * @todo remove at version 3\r\n\t * @private\r\n\t */\r\n\t_create: function(value) {\r\n\t\treturn value;\r\n\t}\r\n});\r\n\r\nDateAdapter.override = function(members) {\r\n\thelpers$1.extend(DateAdapter.prototype, members);\r\n};\r\n\r\nvar _date = DateAdapter;\n\nvar core_adapters = {\n\t_date: _date\n};\n\n/**\r\n * Namespace to hold static tick generation functions\r\n * @namespace Chart.Ticks\r\n */\r\nvar core_ticks = {\r\n\t/**\r\n\t * Namespace to hold formatters for different types of ticks\r\n\t * @namespace Chart.Ticks.formatters\r\n\t */\r\n\tformatters: {\r\n\t\t/**\r\n\t\t * Formatter for value labels\r\n\t\t * @method Chart.Ticks.formatters.values\r\n\t\t * @param value the value to display\r\n\t\t * @return {string|string[]} the label to display\r\n\t\t */\r\n\t\tvalues: function(value) {\r\n\t\t\treturn helpers$1.isArray(value) ? value : '' + value;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Formatter for linear numeric ticks\r\n\t\t * @method Chart.Ticks.formatters.linear\r\n\t\t * @param tickValue {number} the value to be formatted\r\n\t\t * @param index {number} the position of the tickValue parameter in the ticks array\r\n\t\t * @param ticks {number[]} the list of ticks being converted\r\n\t\t * @return {string} string representation of the tickValue parameter\r\n\t\t */\r\n\t\tlinear: function(tickValue, index, ticks) {\r\n\t\t\t// If we have lots of ticks, don't use the ones\r\n\t\t\tvar delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0];\r\n\r\n\t\t\t// If we have a number like 2.5 as the delta, figure out how many decimal places we need\r\n\t\t\tif (Math.abs(delta) > 1) {\r\n\t\t\t\tif (tickValue !== Math.floor(tickValue)) {\r\n\t\t\t\t\t// not an integer\r\n\t\t\t\t\tdelta = tickValue - Math.floor(tickValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar logDelta = helpers$1.log10(Math.abs(delta));\r\n\t\t\tvar tickString = '';\r\n\r\n\t\t\tif (tickValue !== 0) {\r\n\t\t\t\tvar maxTick = Math.max(Math.abs(ticks[0]), Math.abs(ticks[ticks.length - 1]));\r\n\t\t\t\tif (maxTick < 1e-4) { // all ticks are small numbers; use scientific notation\r\n\t\t\t\t\tvar logTick = helpers$1.log10(Math.abs(tickValue));\r\n\t\t\t\t\tvar numExponential = Math.floor(logTick) - Math.floor(logDelta);\r\n\t\t\t\t\tnumExponential = Math.max(Math.min(numExponential, 20), 0);\r\n\t\t\t\t\ttickString = tickValue.toExponential(numExponential);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar numDecimal = -1 * Math.floor(logDelta);\r\n\t\t\t\t\tnumDecimal = Math.max(Math.min(numDecimal, 20), 0); // toFixed has a max of 20 decimal places\r\n\t\t\t\t\ttickString = tickValue.toFixed(numDecimal);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\ttickString = '0'; // never show decimal places for 0\r\n\t\t\t}\r\n\r\n\t\t\treturn tickString;\r\n\t\t},\r\n\r\n\t\tlogarithmic: function(tickValue, index, ticks) {\r\n\t\t\tvar remain = tickValue / (Math.pow(10, Math.floor(helpers$1.log10(tickValue))));\r\n\r\n\t\t\tif (tickValue === 0) {\r\n\t\t\t\treturn '0';\r\n\t\t\t} else if (remain === 1 || remain === 2 || remain === 5 || index === 0 || index === ticks.length - 1) {\r\n\t\t\t\treturn tickValue.toExponential();\r\n\t\t\t}\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}\r\n};\n\nvar isArray = helpers$1.isArray;\r\nvar isNullOrUndef = helpers$1.isNullOrUndef;\r\nvar valueOrDefault$a = helpers$1.valueOrDefault;\r\nvar valueAtIndexOrDefault = helpers$1.valueAtIndexOrDefault;\r\n\r\ncore_defaults._set('scale', {\r\n\tdisplay: true,\r\n\tposition: 'left',\r\n\toffset: false,\r\n\r\n\t// grid line settings\r\n\tgridLines: {\r\n\t\tdisplay: true,\r\n\t\tcolor: 'rgba(0,0,0,0.1)',\r\n\t\tlineWidth: 1,\r\n\t\tdrawBorder: true,\r\n\t\tdrawOnChartArea: true,\r\n\t\tdrawTicks: true,\r\n\t\ttickMarkLength: 10,\r\n\t\tzeroLineWidth: 1,\r\n\t\tzeroLineColor: 'rgba(0,0,0,0.25)',\r\n\t\tzeroLineBorderDash: [],\r\n\t\tzeroLineBorderDashOffset: 0.0,\r\n\t\toffsetGridLines: false,\r\n\t\tborderDash: [],\r\n\t\tborderDashOffset: 0.0\r\n\t},\r\n\r\n\t// scale label\r\n\tscaleLabel: {\r\n\t\t// display property\r\n\t\tdisplay: false,\r\n\r\n\t\t// actual label\r\n\t\tlabelString: '',\r\n\r\n\t\t// top/bottom padding\r\n\t\tpadding: {\r\n\t\t\ttop: 4,\r\n\t\t\tbottom: 4\r\n\t\t}\r\n\t},\r\n\r\n\t// label settings\r\n\tticks: {\r\n\t\tbeginAtZero: false,\r\n\t\tminRotation: 0,\r\n\t\tmaxRotation: 50,\r\n\t\tmirror: false,\r\n\t\tpadding: 0,\r\n\t\treverse: false,\r\n\t\tdisplay: true,\r\n\t\tautoSkip: true,\r\n\t\tautoSkipPadding: 0,\r\n\t\tlabelOffset: 0,\r\n\t\t// We pass through arrays to be rendered as multiline labels, we convert Others to strings here.\r\n\t\tcallback: core_ticks.formatters.values,\r\n\t\tminor: {},\r\n\t\tmajor: {}\r\n\t}\r\n});\r\n\r\n/** Returns a new array containing numItems from arr */\r\nfunction sample(arr, numItems) {\r\n\tvar result = [];\r\n\tvar increment = arr.length / numItems;\r\n\tvar i = 0;\r\n\tvar len = arr.length;\r\n\r\n\tfor (; i < len; i += increment) {\r\n\t\tresult.push(arr[Math.floor(i)]);\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nfunction getPixelForGridLine(scale, index, offsetGridLines) {\r\n\tvar length = scale.getTicks().length;\r\n\tvar validIndex = Math.min(index, length - 1);\r\n\tvar lineValue = scale.getPixelForTick(validIndex);\r\n\tvar start = scale._startPixel;\r\n\tvar end = scale._endPixel;\r\n\tvar epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.\r\n\tvar offset;\r\n\r\n\tif (offsetGridLines) {\r\n\t\tif (length === 1) {\r\n\t\t\toffset = Math.max(lineValue - start, end - lineValue);\r\n\t\t} else if (index === 0) {\r\n\t\t\toffset = (scale.getPixelForTick(1) - lineValue) / 2;\r\n\t\t} else {\r\n\t\t\toffset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;\r\n\t\t}\r\n\t\tlineValue += validIndex < index ? offset : -offset;\r\n\r\n\t\t// Return undefined if the pixel is out of the range\r\n\t\tif (lineValue < start - epsilon || lineValue > end + epsilon) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\treturn lineValue;\r\n}\r\n\r\nfunction garbageCollect(caches, length) {\r\n\thelpers$1.each(caches, function(cache) {\r\n\t\tvar gc = cache.gc;\r\n\t\tvar gcLen = gc.length / 2;\r\n\t\tvar i;\r\n\t\tif (gcLen > length) {\r\n\t\t\tfor (i = 0; i < gcLen; ++i) {\r\n\t\t\t\tdelete cache.data[gc[i]];\r\n\t\t\t}\r\n\t\t\tgc.splice(0, gcLen);\r\n\t\t}\r\n\t});\r\n}\r\n\r\n/**\r\n * Returns {width, height, offset} objects for the first, last, widest, highest tick\r\n * labels where offset indicates the anchor point offset from the top in pixels.\r\n */\r\nfunction computeLabelSizes(ctx, tickFonts, ticks, caches) {\r\n\tvar length = ticks.length;\r\n\tvar widths = [];\r\n\tvar heights = [];\r\n\tvar offsets = [];\r\n\tvar widestLabelSize = 0;\r\n\tvar highestLabelSize = 0;\r\n\tvar i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel, widest, highest;\r\n\r\n\tfor (i = 0; i < length; ++i) {\r\n\t\tlabel = ticks[i].label;\r\n\t\ttickFont = ticks[i].major ? tickFonts.major : tickFonts.minor;\r\n\t\tctx.font = fontString = tickFont.string;\r\n\t\tcache = caches[fontString] = caches[fontString] || {data: {}, gc: []};\r\n\t\tlineHeight = tickFont.lineHeight;\r\n\t\twidth = height = 0;\r\n\t\t// Undefined labels and arrays should not be measured\r\n\t\tif (!isNullOrUndef(label) && !isArray(label)) {\r\n\t\t\twidth = helpers$1.measureText(ctx, cache.data, cache.gc, width, label);\r\n\t\t\theight = lineHeight;\r\n\t\t} else if (isArray(label)) {\r\n\t\t\t// if it is an array let's measure each element\r\n\t\t\tfor (j = 0, jlen = label.length; j < jlen; ++j) {\r\n\t\t\t\tnestedLabel = label[j];\r\n\t\t\t\t// Undefined labels and arrays should not be measured\r\n\t\t\t\tif (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {\r\n\t\t\t\t\twidth = helpers$1.measureText(ctx, cache.data, cache.gc, width, nestedLabel);\r\n\t\t\t\t\theight += lineHeight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\twidths.push(width);\r\n\t\theights.push(height);\r\n\t\toffsets.push(lineHeight / 2);\r\n\t\twidestLabelSize = Math.max(width, widestLabelSize);\r\n\t\thighestLabelSize = Math.max(height, highestLabelSize);\r\n\t}\r\n\tgarbageCollect(caches, length);\r\n\r\n\twidest = widths.indexOf(widestLabelSize);\r\n\thighest = heights.indexOf(highestLabelSize);\r\n\r\n\tfunction valueAt(idx) {\r\n\t\treturn {\r\n\t\t\twidth: widths[idx] || 0,\r\n\t\t\theight: heights[idx] || 0,\r\n\t\t\toffset: offsets[idx] || 0\r\n\t\t};\r\n\t}\r\n\r\n\treturn {\r\n\t\tfirst: valueAt(0),\r\n\t\tlast: valueAt(length - 1),\r\n\t\twidest: valueAt(widest),\r\n\t\thighest: valueAt(highest)\r\n\t};\r\n}\r\n\r\nfunction getTickMarkLength(options) {\r\n\treturn options.drawTicks ? options.tickMarkLength : 0;\r\n}\r\n\r\nfunction getScaleLabelHeight(options) {\r\n\tvar font, padding;\r\n\r\n\tif (!options.display) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tfont = helpers$1.options._parseFont(options);\r\n\tpadding = helpers$1.options.toPadding(options.padding);\r\n\r\n\treturn font.lineHeight + padding.height;\r\n}\r\n\r\nfunction parseFontOptions(options, nestedOpts) {\r\n\treturn helpers$1.extend(helpers$1.options._parseFont({\r\n\t\tfontFamily: valueOrDefault$a(nestedOpts.fontFamily, options.fontFamily),\r\n\t\tfontSize: valueOrDefault$a(nestedOpts.fontSize, options.fontSize),\r\n\t\tfontStyle: valueOrDefault$a(nestedOpts.fontStyle, options.fontStyle),\r\n\t\tlineHeight: valueOrDefault$a(nestedOpts.lineHeight, options.lineHeight)\r\n\t}), {\r\n\t\tcolor: helpers$1.options.resolve([nestedOpts.fontColor, options.fontColor, core_defaults.global.defaultFontColor])\r\n\t});\r\n}\r\n\r\nfunction parseTickFontOptions(options) {\r\n\tvar minor = parseFontOptions(options, options.minor);\r\n\tvar major = options.major.enabled ? parseFontOptions(options, options.major) : minor;\r\n\r\n\treturn {minor: minor, major: major};\r\n}\r\n\r\nfunction nonSkipped(ticksToFilter) {\r\n\tvar filtered = [];\r\n\tvar item, index, len;\r\n\tfor (index = 0, len = ticksToFilter.length; index < len; ++index) {\r\n\t\titem = ticksToFilter[index];\r\n\t\tif (typeof item._index !== 'undefined') {\r\n\t\t\tfiltered.push(item);\r\n\t\t}\r\n\t}\r\n\treturn filtered;\r\n}\r\n\r\nfunction getEvenSpacing(arr) {\r\n\tvar len = arr.length;\r\n\tvar i, diff;\r\n\r\n\tif (len < 2) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfor (diff = arr[0], i = 1; i < len; ++i) {\r\n\t\tif (arr[i] - arr[i - 1] !== diff) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn diff;\r\n}\r\n\r\nfunction calculateSpacing(majorIndices, ticks, axisLength, ticksLimit) {\r\n\tvar evenMajorSpacing = getEvenSpacing(majorIndices);\r\n\tvar spacing = (ticks.length - 1) / ticksLimit;\r\n\tvar factors, factor, i, ilen;\r\n\r\n\t// If the major ticks are evenly spaced apart, place the minor ticks\r\n\t// so that they divide the major ticks into even chunks\r\n\tif (!evenMajorSpacing) {\r\n\t\treturn Math.max(spacing, 1);\r\n\t}\r\n\r\n\tfactors = helpers$1.math._factorize(evenMajorSpacing);\r\n\tfor (i = 0, ilen = factors.length - 1; i < ilen; i++) {\r\n\t\tfactor = factors[i];\r\n\t\tif (factor > spacing) {\r\n\t\t\treturn factor;\r\n\t\t}\r\n\t}\r\n\treturn Math.max(spacing, 1);\r\n}\r\n\r\nfunction getMajorIndices(ticks) {\r\n\tvar result = [];\r\n\tvar i, ilen;\r\n\tfor (i = 0, ilen = ticks.length; i < ilen; i++) {\r\n\t\tif (ticks[i].major) {\r\n\t\t\tresult.push(i);\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nfunction skipMajors(ticks, majorIndices, spacing) {\r\n\tvar count = 0;\r\n\tvar next = majorIndices[0];\r\n\tvar i, tick;\r\n\r\n\tspacing = Math.ceil(spacing);\r\n\tfor (i = 0; i < ticks.length; i++) {\r\n\t\ttick = ticks[i];\r\n\t\tif (i === next) {\r\n\t\t\ttick._index = i;\r\n\t\t\tcount++;\r\n\t\t\tnext = majorIndices[count * spacing];\r\n\t\t} else {\r\n\t\t\tdelete tick.label;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction skip(ticks, spacing, majorStart, majorEnd) {\r\n\tvar start = valueOrDefault$a(majorStart, 0);\r\n\tvar end = Math.min(valueOrDefault$a(majorEnd, ticks.length), ticks.length);\r\n\tvar count = 0;\r\n\tvar length, i, tick, next;\r\n\r\n\tspacing = Math.ceil(spacing);\r\n\tif (majorEnd) {\r\n\t\tlength = majorEnd - majorStart;\r\n\t\tspacing = length / Math.floor(length / spacing);\r\n\t}\r\n\r\n\tnext = start;\r\n\r\n\twhile (next < 0) {\r\n\t\tcount++;\r\n\t\tnext = Math.round(start + count * spacing);\r\n\t}\r\n\r\n\tfor (i = Math.max(start, 0); i < end; i++) {\r\n\t\ttick = ticks[i];\r\n\t\tif (i === next) {\r\n\t\t\ttick._index = i;\r\n\t\t\tcount++;\r\n\t\t\tnext = Math.round(start + count * spacing);\r\n\t\t} else {\r\n\t\t\tdelete tick.label;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvar Scale = core_element.extend({\r\n\r\n\tzeroLineIndex: 0,\r\n\r\n\t/**\r\n\t * Get the padding needed for the scale\r\n\t * @method getPadding\r\n\t * @private\r\n\t * @returns {Padding} the necessary padding\r\n\t */\r\n\tgetPadding: function() {\r\n\t\tvar me = this;\r\n\t\treturn {\r\n\t\t\tleft: me.paddingLeft || 0,\r\n\t\t\ttop: me.paddingTop || 0,\r\n\t\t\tright: me.paddingRight || 0,\r\n\t\t\tbottom: me.paddingBottom || 0\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the scale tick objects ({label, major})\r\n\t * @since 2.7\r\n\t */\r\n\tgetTicks: function() {\r\n\t\treturn this._ticks;\r\n\t},\r\n\r\n\t/**\r\n\t* @private\r\n\t*/\r\n\t_getLabels: function() {\r\n\t\tvar data = this.chart.data;\r\n\t\treturn this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];\r\n\t},\r\n\r\n\t// These methods are ordered by lifecyle. Utilities then follow.\r\n\t// Any function defined here is inherited by all scale types.\r\n\t// Any function can be extended by the scale type\r\n\r\n\t/**\r\n\t * Provided for backward compatibility, not available anymore\r\n\t * @function Chart.Scale.mergeTicksOptions\r\n\t * @deprecated since version 2.8.0\r\n\t * @todo remove at version 3\r\n\t */\r\n\tmergeTicksOptions: function() {\r\n\t\t// noop\r\n\t},\r\n\r\n\tbeforeUpdate: function() {\r\n\t\thelpers$1.callback(this.options.beforeUpdate, [this]);\r\n\t},\r\n\r\n\t/**\r\n\t * @param {number} maxWidth - the max width in pixels\r\n\t * @param {number} maxHeight - the max height in pixels\r\n\t * @param {object} margins - the space between the edge of the other scales and edge of the chart\r\n\t * This space comes from two sources:\r\n\t * - padding - space that's required to show the labels at the edges of the scale\r\n\t * - thickness of scales or legends in another orientation\r\n\t */\r\n\tupdate: function(maxWidth, maxHeight, margins) {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar sampleSize = tickOpts.sampleSize;\r\n\t\tvar i, ilen, labels, ticks, samplingEnabled;\r\n\r\n\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\r\n\t\tme.beforeUpdate();\r\n\r\n\t\t// Absorb the master measurements\r\n\t\tme.maxWidth = maxWidth;\r\n\t\tme.maxHeight = maxHeight;\r\n\t\tme.margins = helpers$1.extend({\r\n\t\t\tleft: 0,\r\n\t\t\tright: 0,\r\n\t\t\ttop: 0,\r\n\t\t\tbottom: 0\r\n\t\t}, margins);\r\n\r\n\t\tme._ticks = null;\r\n\t\tme.ticks = null;\r\n\t\tme._labelSizes = null;\r\n\t\tme._maxLabelLines = 0;\r\n\t\tme.longestLabelWidth = 0;\r\n\t\tme.longestTextCache = me.longestTextCache || {};\r\n\t\tme._gridLineItems = null;\r\n\t\tme._labelItems = null;\r\n\r\n\t\t// Dimensions\r\n\t\tme.beforeSetDimensions();\r\n\t\tme.setDimensions();\r\n\t\tme.afterSetDimensions();\r\n\r\n\t\t// Data min/max\r\n\t\tme.beforeDataLimits();\r\n\t\tme.determineDataLimits();\r\n\t\tme.afterDataLimits();\r\n\r\n\t\t// Ticks - `this.ticks` is now DEPRECATED!\r\n\t\t// Internal ticks are now stored as objects in the PRIVATE `this._ticks` member\r\n\t\t// and must not be accessed directly from outside this class. `this.ticks` being\r\n\t\t// around for long time and not marked as private, we can't change its structure\r\n\t\t// without unexpected breaking changes. If you need to access the scale ticks,\r\n\t\t// use scale.getTicks() instead.\r\n\r\n\t\tme.beforeBuildTicks();\r\n\r\n\t\t// New implementations should return an array of objects but for BACKWARD COMPAT,\r\n\t\t// we still support no return (`this.ticks` internally set by calling this method).\r\n\t\tticks = me.buildTicks() || [];\r\n\r\n\t\t// Allow modification of ticks in callback.\r\n\t\tticks = me.afterBuildTicks(ticks) || ticks;\r\n\r\n\t\t// Ensure ticks contains ticks in new tick format\r\n\t\tif ((!ticks || !ticks.length) && me.ticks) {\r\n\t\t\tticks = [];\r\n\t\t\tfor (i = 0, ilen = me.ticks.length; i < ilen; ++i) {\r\n\t\t\t\tticks.push({\r\n\t\t\t\t\tvalue: me.ticks[i],\r\n\t\t\t\t\tmajor: false\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme._ticks = ticks;\r\n\r\n\t\t// Compute tick rotation and fit using a sampled subset of labels\r\n\t\t// We generally don't need to compute the size of every single label for determining scale size\r\n\t\tsamplingEnabled = sampleSize < ticks.length;\r\n\t\tlabels = me._convertTicksToLabels(samplingEnabled ? sample(ticks, sampleSize) : ticks);\r\n\r\n\t\t// _configure is called twice, once here, once from core.controller.updateLayout.\r\n\t\t// Here we haven't been positioned yet, but dimensions are correct.\r\n\t\t// Variables set in _configure are needed for calculateTickRotation, and\r\n\t\t// it's ok that coordinates are not correct there, only dimensions matter.\r\n\t\tme._configure();\r\n\r\n\t\t// Tick Rotation\r\n\t\tme.beforeCalculateTickRotation();\r\n\t\tme.calculateTickRotation();\r\n\t\tme.afterCalculateTickRotation();\r\n\r\n\t\tme.beforeFit();\r\n\t\tme.fit();\r\n\t\tme.afterFit();\r\n\r\n\t\t// Auto-skip\r\n\t\tme._ticksToDraw = tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto') ? me._autoSkip(ticks) : ticks;\r\n\r\n\t\tif (samplingEnabled) {\r\n\t\t\t// Generate labels using all non-skipped ticks\r\n\t\t\tlabels = me._convertTicksToLabels(me._ticksToDraw);\r\n\t\t}\r\n\r\n\t\tme.ticks = labels; // BACKWARD COMPATIBILITY\r\n\r\n\t\t// IMPORTANT: after this point, we consider that `this.ticks` will NEVER change!\r\n\r\n\t\tme.afterUpdate();\r\n\r\n\t\t// TODO(v3): remove minSize as a public property and return value from all layout boxes. It is unused\r\n\t\t// make maxWidth and maxHeight private\r\n\t\treturn me.minSize;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tvar reversePixels = me.options.ticks.reverse;\r\n\t\tvar startPixel, endPixel;\r\n\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\tstartPixel = me.left;\r\n\t\t\tendPixel = me.right;\r\n\t\t} else {\r\n\t\t\tstartPixel = me.top;\r\n\t\t\tendPixel = me.bottom;\r\n\t\t\t// by default vertical scales are from bottom to top, so pixels are reversed\r\n\t\t\treversePixels = !reversePixels;\r\n\t\t}\r\n\t\tme._startPixel = startPixel;\r\n\t\tme._endPixel = endPixel;\r\n\t\tme._reversePixels = reversePixels;\r\n\t\tme._length = endPixel - startPixel;\r\n\t},\r\n\r\n\tafterUpdate: function() {\r\n\t\thelpers$1.callback(this.options.afterUpdate, [this]);\r\n\t},\r\n\r\n\t//\r\n\r\n\tbeforeSetDimensions: function() {\r\n\t\thelpers$1.callback(this.options.beforeSetDimensions, [this]);\r\n\t},\r\n\tsetDimensions: function() {\r\n\t\tvar me = this;\r\n\t\t// Set the unconstrained dimension before label rotation\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.width = me.maxWidth;\r\n\t\t\tme.left = 0;\r\n\t\t\tme.right = me.width;\r\n\t\t} else {\r\n\t\t\tme.height = me.maxHeight;\r\n\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.top = 0;\r\n\t\t\tme.bottom = me.height;\r\n\t\t}\r\n\r\n\t\t// Reset padding\r\n\t\tme.paddingLeft = 0;\r\n\t\tme.paddingTop = 0;\r\n\t\tme.paddingRight = 0;\r\n\t\tme.paddingBottom = 0;\r\n\t},\r\n\tafterSetDimensions: function() {\r\n\t\thelpers$1.callback(this.options.afterSetDimensions, [this]);\r\n\t},\r\n\r\n\t// Data limits\r\n\tbeforeDataLimits: function() {\r\n\t\thelpers$1.callback(this.options.beforeDataLimits, [this]);\r\n\t},\r\n\tdetermineDataLimits: helpers$1.noop,\r\n\tafterDataLimits: function() {\r\n\t\thelpers$1.callback(this.options.afterDataLimits, [this]);\r\n\t},\r\n\r\n\t//\r\n\tbeforeBuildTicks: function() {\r\n\t\thelpers$1.callback(this.options.beforeBuildTicks, [this]);\r\n\t},\r\n\tbuildTicks: helpers$1.noop,\r\n\tafterBuildTicks: function(ticks) {\r\n\t\tvar me = this;\r\n\t\t// ticks is empty for old axis implementations here\r\n\t\tif (isArray(ticks) && ticks.length) {\r\n\t\t\treturn helpers$1.callback(me.options.afterBuildTicks, [me, ticks]);\r\n\t\t}\r\n\t\t// Support old implementations (that modified `this.ticks` directly in buildTicks)\r\n\t\tme.ticks = helpers$1.callback(me.options.afterBuildTicks, [me, me.ticks]) || me.ticks;\r\n\t\treturn ticks;\r\n\t},\r\n\r\n\tbeforeTickToLabelConversion: function() {\r\n\t\thelpers$1.callback(this.options.beforeTickToLabelConversion, [this]);\r\n\t},\r\n\tconvertTicksToLabels: function() {\r\n\t\tvar me = this;\r\n\t\t// Convert ticks to strings\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tme.ticks = me.ticks.map(tickOpts.userCallback || tickOpts.callback, this);\r\n\t},\r\n\tafterTickToLabelConversion: function() {\r\n\t\thelpers$1.callback(this.options.afterTickToLabelConversion, [this]);\r\n\t},\r\n\r\n\t//\r\n\r\n\tbeforeCalculateTickRotation: function() {\r\n\t\thelpers$1.callback(this.options.beforeCalculateTickRotation, [this]);\r\n\t},\r\n\tcalculateTickRotation: function() {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar tickOpts = options.ticks;\r\n\t\tvar numTicks = me.getTicks().length;\r\n\t\tvar minRotation = tickOpts.minRotation || 0;\r\n\t\tvar maxRotation = tickOpts.maxRotation;\r\n\t\tvar labelRotation = minRotation;\r\n\t\tvar labelSizes, maxLabelWidth, maxLabelHeight, maxWidth, tickWidth, maxHeight, maxLabelDiagonal;\r\n\r\n\t\tif (!me._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !me.isHorizontal()) {\r\n\t\t\tme.labelRotation = minRotation;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlabelSizes = me._getLabelSizes();\r\n\t\tmaxLabelWidth = labelSizes.widest.width;\r\n\t\tmaxLabelHeight = labelSizes.highest.height - labelSizes.highest.offset;\r\n\r\n\t\t// Estimate the width of each grid based on the canvas width, the maximum\r\n\t\t// label width and the number of tick intervals\r\n\t\tmaxWidth = Math.min(me.maxWidth, me.chart.width - maxLabelWidth);\r\n\t\ttickWidth = options.offset ? me.maxWidth / numTicks : maxWidth / (numTicks - 1);\r\n\r\n\t\t// Allow 3 pixels x2 padding either side for label readability\r\n\t\tif (maxLabelWidth + 6 > tickWidth) {\r\n\t\t\ttickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));\r\n\t\t\tmaxHeight = me.maxHeight - getTickMarkLength(options.gridLines)\r\n\t\t\t\t- tickOpts.padding - getScaleLabelHeight(options.scaleLabel);\r\n\t\t\tmaxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);\r\n\t\t\tlabelRotation = helpers$1.toDegrees(Math.min(\r\n\t\t\t\tMath.asin(Math.min((labelSizes.highest.height + 6) / tickWidth, 1)),\r\n\t\t\t\tMath.asin(Math.min(maxHeight / maxLabelDiagonal, 1)) - Math.asin(maxLabelHeight / maxLabelDiagonal)\r\n\t\t\t));\r\n\t\t\tlabelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));\r\n\t\t}\r\n\r\n\t\tme.labelRotation = labelRotation;\r\n\t},\r\n\tafterCalculateTickRotation: function() {\r\n\t\thelpers$1.callback(this.options.afterCalculateTickRotation, [this]);\r\n\t},\r\n\r\n\t//\r\n\r\n\tbeforeFit: function() {\r\n\t\thelpers$1.callback(this.options.beforeFit, [this]);\r\n\t},\r\n\tfit: function() {\r\n\t\tvar me = this;\r\n\t\t// Reset\r\n\t\tvar minSize = me.minSize = {\r\n\t\t\twidth: 0,\r\n\t\t\theight: 0\r\n\t\t};\r\n\r\n\t\tvar chart = me.chart;\r\n\t\tvar opts = me.options;\r\n\t\tvar tickOpts = opts.ticks;\r\n\t\tvar scaleLabelOpts = opts.scaleLabel;\r\n\t\tvar gridLineOpts = opts.gridLines;\r\n\t\tvar display = me._isVisible();\r\n\t\tvar isBottom = opts.position === 'bottom';\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\r\n\t\t// Width\r\n\t\tif (isHorizontal) {\r\n\t\t\tminSize.width = me.maxWidth;\r\n\t\t} else if (display) {\r\n\t\t\tminSize.width = getTickMarkLength(gridLineOpts) + getScaleLabelHeight(scaleLabelOpts);\r\n\t\t}\r\n\r\n\t\t// height\r\n\t\tif (!isHorizontal) {\r\n\t\t\tminSize.height = me.maxHeight; // fill all the height\r\n\t\t} else if (display) {\r\n\t\t\tminSize.height = getTickMarkLength(gridLineOpts) + getScaleLabelHeight(scaleLabelOpts);\r\n\t\t}\r\n\r\n\t\t// Don't bother fitting the ticks if we are not showing the labels\r\n\t\tif (tickOpts.display && display) {\r\n\t\t\tvar tickFonts = parseTickFontOptions(tickOpts);\r\n\t\t\tvar labelSizes = me._getLabelSizes();\r\n\t\t\tvar firstLabelSize = labelSizes.first;\r\n\t\t\tvar lastLabelSize = labelSizes.last;\r\n\t\t\tvar widestLabelSize = labelSizes.widest;\r\n\t\t\tvar highestLabelSize = labelSizes.highest;\r\n\t\t\tvar lineSpace = tickFonts.minor.lineHeight * 0.4;\r\n\t\t\tvar tickPadding = tickOpts.padding;\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\t// A horizontal axis is more constrained by the height.\r\n\t\t\t\tvar isRotated = me.labelRotation !== 0;\r\n\t\t\t\tvar angleRadians = helpers$1.toRadians(me.labelRotation);\r\n\t\t\t\tvar cosRotation = Math.cos(angleRadians);\r\n\t\t\t\tvar sinRotation = Math.sin(angleRadians);\r\n\r\n\t\t\t\tvar labelHeight = sinRotation * widestLabelSize.width\r\n\t\t\t\t\t+ cosRotation * (highestLabelSize.height - (isRotated ? highestLabelSize.offset : 0))\r\n\t\t\t\t\t+ (isRotated ? 0 : lineSpace); // padding\r\n\r\n\t\t\t\tminSize.height = Math.min(me.maxHeight, minSize.height + labelHeight + tickPadding);\r\n\r\n\t\t\t\tvar offsetLeft = me.getPixelForTick(0) - me.left;\r\n\t\t\t\tvar offsetRight = me.right - me.getPixelForTick(me.getTicks().length - 1);\r\n\t\t\t\tvar paddingLeft, paddingRight;\r\n\r\n\t\t\t\t// Ensure that our ticks are always inside the canvas. When rotated, ticks are right aligned\r\n\t\t\t\t// which means that the right padding is dominated by the font height\r\n\t\t\t\tif (isRotated) {\r\n\t\t\t\t\tpaddingLeft = isBottom ?\r\n\t\t\t\t\t\tcosRotation * firstLabelSize.width + sinRotation * firstLabelSize.offset :\r\n\t\t\t\t\t\tsinRotation * (firstLabelSize.height - firstLabelSize.offset);\r\n\t\t\t\t\tpaddingRight = isBottom ?\r\n\t\t\t\t\t\tsinRotation * (lastLabelSize.height - lastLabelSize.offset) :\r\n\t\t\t\t\t\tcosRotation * lastLabelSize.width + sinRotation * lastLabelSize.offset;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpaddingLeft = firstLabelSize.width / 2;\r\n\t\t\t\t\tpaddingRight = lastLabelSize.width / 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Adjust padding taking into account changes in offsets\r\n\t\t\t\t// and add 3 px to move away from canvas edges\r\n\t\t\t\tme.paddingLeft = Math.max((paddingLeft - offsetLeft) * me.width / (me.width - offsetLeft), 0) + 3;\r\n\t\t\t\tme.paddingRight = Math.max((paddingRight - offsetRight) * me.width / (me.width - offsetRight), 0) + 3;\r\n\t\t\t} else {\r\n\t\t\t\t// A vertical axis is more constrained by the width. Labels are the\r\n\t\t\t\t// dominant factor here, so get that length first and account for padding\r\n\t\t\t\tvar labelWidth = tickOpts.mirror ? 0 :\r\n\t\t\t\t\t// use lineSpace for consistency with horizontal axis\r\n\t\t\t\t\t// tickPadding is not implemented for horizontal\r\n\t\t\t\t\twidestLabelSize.width + tickPadding + lineSpace;\r\n\r\n\t\t\t\tminSize.width = Math.min(me.maxWidth, minSize.width + labelWidth);\r\n\r\n\t\t\t\tme.paddingTop = firstLabelSize.height / 2;\r\n\t\t\t\tme.paddingBottom = lastLabelSize.height / 2;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.handleMargins();\r\n\r\n\t\tif (isHorizontal) {\r\n\t\t\tme.width = me._length = chart.width - me.margins.left - me.margins.right;\r\n\t\t\tme.height = minSize.height;\r\n\t\t} else {\r\n\t\t\tme.width = minSize.width;\r\n\t\t\tme.height = me._length = chart.height - me.margins.top - me.margins.bottom;\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Handle margins and padding interactions\r\n\t * @private\r\n\t */\r\n\thandleMargins: function() {\r\n\t\tvar me = this;\r\n\t\tif (me.margins) {\r\n\t\t\tme.margins.left = Math.max(me.paddingLeft, me.margins.left);\r\n\t\t\tme.margins.top = Math.max(me.paddingTop, me.margins.top);\r\n\t\t\tme.margins.right = Math.max(me.paddingRight, me.margins.right);\r\n\t\t\tme.margins.bottom = Math.max(me.paddingBottom, me.margins.bottom);\r\n\t\t}\r\n\t},\r\n\r\n\tafterFit: function() {\r\n\t\thelpers$1.callback(this.options.afterFit, [this]);\r\n\t},\r\n\r\n\t// Shared Methods\r\n\tisHorizontal: function() {\r\n\t\tvar pos = this.options.position;\r\n\t\treturn pos === 'top' || pos === 'bottom';\r\n\t},\r\n\tisFullWidth: function() {\r\n\t\treturn this.options.fullWidth;\r\n\t},\r\n\r\n\t// Get the correct value. NaN bad inputs, If the value type is object get the x or y based on whether we are horizontal or not\r\n\tgetRightValue: function(rawValue) {\r\n\t\t// Null and undefined values first\r\n\t\tif (isNullOrUndef(rawValue)) {\r\n\t\t\treturn NaN;\r\n\t\t}\r\n\t\t// isNaN(object) returns true, so make sure NaN is checking for a number; Discard Infinite values\r\n\t\tif ((typeof rawValue === 'number' || rawValue instanceof Number) && !isFinite(rawValue)) {\r\n\t\t\treturn NaN;\r\n\t\t}\r\n\r\n\t\t// If it is in fact an object, dive in one more level\r\n\t\tif (rawValue) {\r\n\t\t\tif (this.isHorizontal()) {\r\n\t\t\t\tif (rawValue.x !== undefined) {\r\n\t\t\t\t\treturn this.getRightValue(rawValue.x);\r\n\t\t\t\t}\r\n\t\t\t} else if (rawValue.y !== undefined) {\r\n\t\t\t\treturn this.getRightValue(rawValue.y);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Value is good, return it\r\n\t\treturn rawValue;\r\n\t},\r\n\r\n\t_convertTicksToLabels: function(ticks) {\r\n\t\tvar me = this;\r\n\t\tvar labels, i, ilen;\r\n\r\n\t\tme.ticks = ticks.map(function(tick) {\r\n\t\t\treturn tick.value;\r\n\t\t});\r\n\r\n\t\tme.beforeTickToLabelConversion();\r\n\r\n\t\t// New implementations should return the formatted tick labels but for BACKWARD\r\n\t\t// COMPAT, we still support no return (`this.ticks` internally changed by calling\r\n\t\t// this method and supposed to contain only string values).\r\n\t\tlabels = me.convertTicksToLabels(ticks) || me.ticks;\r\n\r\n\t\tme.afterTickToLabelConversion();\r\n\r\n\t\t// BACKWARD COMPAT: synchronize `_ticks` with labels (so potentially `this.ticks`)\r\n\t\tfor (i = 0, ilen = ticks.length; i < ilen; ++i) {\r\n\t\t\tticks[i].label = labels[i];\r\n\t\t}\r\n\r\n\t\treturn labels;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getLabelSizes: function() {\r\n\t\tvar me = this;\r\n\t\tvar labelSizes = me._labelSizes;\r\n\r\n\t\tif (!labelSizes) {\r\n\t\t\tme._labelSizes = labelSizes = computeLabelSizes(me.ctx, parseTickFontOptions(me.options.ticks), me.getTicks(), me.longestTextCache);\r\n\t\t\tme.longestLabelWidth = labelSizes.widest.width;\r\n\t\t}\r\n\r\n\t\treturn labelSizes;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_parseValue: function(value) {\r\n\t\tvar start, end, min, max;\r\n\r\n\t\tif (isArray(value)) {\r\n\t\t\tstart = +this.getRightValue(value[0]);\r\n\t\t\tend = +this.getRightValue(value[1]);\r\n\t\t\tmin = Math.min(start, end);\r\n\t\t\tmax = Math.max(start, end);\r\n\t\t} else {\r\n\t\t\tvalue = +this.getRightValue(value);\r\n\t\t\tstart = undefined;\r\n\t\t\tend = value;\r\n\t\t\tmin = value;\r\n\t\t\tmax = value;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tmin: min,\r\n\t\t\tmax: max,\r\n\t\t\tstart: start,\r\n\t\t\tend: end\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t* @private\r\n\t*/\r\n\t_getScaleLabel: function(rawValue) {\r\n\t\tvar v = this._parseValue(rawValue);\r\n\t\tif (v.start !== undefined) {\r\n\t\t\treturn '[' + v.start + ', ' + v.end + ']';\r\n\t\t}\r\n\r\n\t\treturn +this.getRightValue(rawValue);\r\n\t},\r\n\r\n\t/**\r\n\t * Used to get the value to display in the tooltip for the data at the given index\r\n\t * @param index\r\n\t * @param datasetIndex\r\n\t */\r\n\tgetLabelForIndex: helpers$1.noop,\r\n\r\n\t/**\r\n\t * Returns the location of the given data point. Value can either be an index or a numerical value\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t * @param value\r\n\t * @param index\r\n\t * @param datasetIndex\r\n\t */\r\n\tgetPixelForValue: helpers$1.noop,\r\n\r\n\t/**\r\n\t * Used to get the data value from a given pixel. This is the inverse of getPixelForValue\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t * @param pixel\r\n\t */\r\n\tgetValueForPixel: helpers$1.noop,\r\n\r\n\t/**\r\n\t * Returns the location of the tick at the given index\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t */\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar offset = me.options.offset;\r\n\t\tvar numTicks = me._ticks.length;\r\n\t\tvar tickWidth = 1 / Math.max(numTicks - (offset ? 0 : 1), 1);\r\n\r\n\t\treturn index < 0 || index > numTicks - 1\r\n\t\t\t? null\r\n\t\t\t: me.getPixelForDecimal(index * tickWidth + (offset ? tickWidth / 2 : 0));\r\n\t},\r\n\r\n\t/**\r\n\t * Utility for getting the pixel location of a percentage of scale\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t */\r\n\tgetPixelForDecimal: function(decimal) {\r\n\t\tvar me = this;\r\n\r\n\t\tif (me._reversePixels) {\r\n\t\t\tdecimal = 1 - decimal;\r\n\t\t}\r\n\r\n\t\treturn me._startPixel + decimal * me._length;\r\n\t},\r\n\r\n\tgetDecimalForPixel: function(pixel) {\r\n\t\tvar decimal = (pixel - this._startPixel) / this._length;\r\n\t\treturn this._reversePixels ? 1 - decimal : decimal;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the pixel for the minimum chart value\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t */\r\n\tgetBasePixel: function() {\r\n\t\treturn this.getPixelForValue(this.getBaseValue());\r\n\t},\r\n\r\n\tgetBaseValue: function() {\r\n\t\tvar me = this;\r\n\t\tvar min = me.min;\r\n\t\tvar max = me.max;\r\n\r\n\t\treturn me.beginAtZero ? 0 :\r\n\t\t\tmin < 0 && max < 0 ? max :\r\n\t\t\tmin > 0 && max > 0 ? min :\r\n\t\t\t0;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a subset of ticks to be plotted to avoid overlapping labels.\r\n\t * @private\r\n\t */\r\n\t_autoSkip: function(ticks) {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar axisLength = me._length;\r\n\t\tvar ticksLimit = tickOpts.maxTicksLimit || axisLength / me._tickSize() + 1;\r\n\t\tvar majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];\r\n\t\tvar numMajorIndices = majorIndices.length;\r\n\t\tvar first = majorIndices[0];\r\n\t\tvar last = majorIndices[numMajorIndices - 1];\r\n\t\tvar i, ilen, spacing, avgMajorSpacing;\r\n\r\n\t\t// If there are too many major ticks to display them all\r\n\t\tif (numMajorIndices > ticksLimit) {\r\n\t\t\tskipMajors(ticks, majorIndices, numMajorIndices / ticksLimit);\r\n\t\t\treturn nonSkipped(ticks);\r\n\t\t}\r\n\r\n\t\tspacing = calculateSpacing(majorIndices, ticks, axisLength, ticksLimit);\r\n\r\n\t\tif (numMajorIndices > 0) {\r\n\t\t\tfor (i = 0, ilen = numMajorIndices - 1; i < ilen; i++) {\r\n\t\t\t\tskip(ticks, spacing, majorIndices[i], majorIndices[i + 1]);\r\n\t\t\t}\r\n\t\t\tavgMajorSpacing = numMajorIndices > 1 ? (last - first) / (numMajorIndices - 1) : null;\r\n\t\t\tskip(ticks, spacing, helpers$1.isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);\r\n\t\t\tskip(ticks, spacing, last, helpers$1.isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);\r\n\t\t\treturn nonSkipped(ticks);\r\n\t\t}\r\n\t\tskip(ticks, spacing);\r\n\t\treturn nonSkipped(ticks);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_tickSize: function() {\r\n\t\tvar me = this;\r\n\t\tvar optionTicks = me.options.ticks;\r\n\r\n\t\t// Calculate space needed by label in axis direction.\r\n\t\tvar rot = helpers$1.toRadians(me.labelRotation);\r\n\t\tvar cos = Math.abs(Math.cos(rot));\r\n\t\tvar sin = Math.abs(Math.sin(rot));\r\n\r\n\t\tvar labelSizes = me._getLabelSizes();\r\n\t\tvar padding = optionTicks.autoSkipPadding || 0;\r\n\t\tvar w = labelSizes ? labelSizes.widest.width + padding : 0;\r\n\t\tvar h = labelSizes ? labelSizes.highest.height + padding : 0;\r\n\r\n\t\t// Calculate space needed for 1 tick in axis direction.\r\n\t\treturn me.isHorizontal()\r\n\t\t\t? h * cos > w * sin ? w / cos : h / sin\r\n\t\t\t: h * sin < w * cos ? h / cos : w / sin;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_isVisible: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar display = me.options.display;\r\n\t\tvar i, ilen, meta;\r\n\r\n\t\tif (display !== 'auto') {\r\n\t\t\treturn !!display;\r\n\t\t}\r\n\r\n\t\t// When 'auto', the scale is visible if at least one associated dataset is visible.\r\n\t\tfor (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\r\n\t\t\tif (chart.isDatasetVisible(i)) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\tif (meta.xAxisID === me.id || meta.yAxisID === me.id) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_computeGridLineItems: function(chartArea) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar options = me.options;\r\n\t\tvar gridLines = options.gridLines;\r\n\t\tvar position = options.position;\r\n\t\tvar offsetGridLines = gridLines.offsetGridLines;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tvar ticks = me._ticksToDraw;\r\n\t\tvar ticksLength = ticks.length + (offsetGridLines ? 1 : 0);\r\n\r\n\t\tvar tl = getTickMarkLength(gridLines);\r\n\t\tvar items = [];\r\n\t\tvar axisWidth = gridLines.drawBorder ? valueAtIndexOrDefault(gridLines.lineWidth, 0, 0) : 0;\r\n\t\tvar axisHalfWidth = axisWidth / 2;\r\n\t\tvar alignPixel = helpers$1._alignPixel;\r\n\t\tvar alignBorderValue = function(pixel) {\r\n\t\t\treturn alignPixel(chart, pixel, axisWidth);\r\n\t\t};\r\n\t\tvar borderValue, i, tick, lineValue, alignedLineValue;\r\n\t\tvar tx1, ty1, tx2, ty2, x1, y1, x2, y2, lineWidth, lineColor, borderDash, borderDashOffset;\r\n\r\n\t\tif (position === 'top') {\r\n\t\t\tborderValue = alignBorderValue(me.bottom);\r\n\t\t\tty1 = me.bottom - tl;\r\n\t\t\tty2 = borderValue - axisHalfWidth;\r\n\t\t\ty1 = alignBorderValue(chartArea.top) + axisHalfWidth;\r\n\t\t\ty2 = chartArea.bottom;\r\n\t\t} else if (position === 'bottom') {\r\n\t\t\tborderValue = alignBorderValue(me.top);\r\n\t\t\ty1 = chartArea.top;\r\n\t\t\ty2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;\r\n\t\t\tty1 = borderValue + axisHalfWidth;\r\n\t\t\tty2 = me.top + tl;\r\n\t\t} else if (position === 'left') {\r\n\t\t\tborderValue = alignBorderValue(me.right);\r\n\t\t\ttx1 = me.right - tl;\r\n\t\t\ttx2 = borderValue - axisHalfWidth;\r\n\t\t\tx1 = alignBorderValue(chartArea.left) + axisHalfWidth;\r\n\t\t\tx2 = chartArea.right;\r\n\t\t} else {\r\n\t\t\tborderValue = alignBorderValue(me.left);\r\n\t\t\tx1 = chartArea.left;\r\n\t\t\tx2 = alignBorderValue(chartArea.right) - axisHalfWidth;\r\n\t\t\ttx1 = borderValue + axisHalfWidth;\r\n\t\t\ttx2 = me.left + tl;\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < ticksLength; ++i) {\r\n\t\t\ttick = ticks[i] || {};\r\n\r\n\t\t\t// autoskipper skipped this tick (#4635)\r\n\t\t\tif (isNullOrUndef(tick.label) && i < ticks.length) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (i === me.zeroLineIndex && options.offset === offsetGridLines) {\r\n\t\t\t\t// Draw the first index specially\r\n\t\t\t\tlineWidth = gridLines.zeroLineWidth;\r\n\t\t\t\tlineColor = gridLines.zeroLineColor;\r\n\t\t\t\tborderDash = gridLines.zeroLineBorderDash || [];\r\n\t\t\t\tborderDashOffset = gridLines.zeroLineBorderDashOffset || 0.0;\r\n\t\t\t} else {\r\n\t\t\t\tlineWidth = valueAtIndexOrDefault(gridLines.lineWidth, i, 1);\r\n\t\t\t\tlineColor = valueAtIndexOrDefault(gridLines.color, i, 'rgba(0,0,0,0.1)');\r\n\t\t\t\tborderDash = gridLines.borderDash || [];\r\n\t\t\t\tborderDashOffset = gridLines.borderDashOffset || 0.0;\r\n\t\t\t}\r\n\r\n\t\t\tlineValue = getPixelForGridLine(me, tick._index || i, offsetGridLines);\r\n\r\n\t\t\t// Skip if the pixel is out of the range\r\n\t\t\tif (lineValue === undefined) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\talignedLineValue = alignPixel(chart, lineValue, lineWidth);\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\ttx1 = tx2 = x1 = x2 = alignedLineValue;\r\n\t\t\t} else {\r\n\t\t\t\tty1 = ty2 = y1 = y2 = alignedLineValue;\r\n\t\t\t}\r\n\r\n\t\t\titems.push({\r\n\t\t\t\ttx1: tx1,\r\n\t\t\t\tty1: ty1,\r\n\t\t\t\ttx2: tx2,\r\n\t\t\t\tty2: ty2,\r\n\t\t\t\tx1: x1,\r\n\t\t\t\ty1: y1,\r\n\t\t\t\tx2: x2,\r\n\t\t\t\ty2: y2,\r\n\t\t\t\twidth: lineWidth,\r\n\t\t\t\tcolor: lineColor,\r\n\t\t\t\tborderDash: borderDash,\r\n\t\t\t\tborderDashOffset: borderDashOffset,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\titems.ticksLength = ticksLength;\r\n\t\titems.borderValue = borderValue;\r\n\r\n\t\treturn items;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_computeLabelItems: function() {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar optionTicks = options.ticks;\r\n\t\tvar position = options.position;\r\n\t\tvar isMirrored = optionTicks.mirror;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tvar ticks = me._ticksToDraw;\r\n\t\tvar fonts = parseTickFontOptions(optionTicks);\r\n\t\tvar tickPadding = optionTicks.padding;\r\n\t\tvar tl = getTickMarkLength(options.gridLines);\r\n\t\tvar rotation = -helpers$1.toRadians(me.labelRotation);\r\n\t\tvar items = [];\r\n\t\tvar i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;\r\n\r\n\t\tif (position === 'top') {\r\n\t\t\ty = me.bottom - tl - tickPadding;\r\n\t\t\ttextAlign = !rotation ? 'center' : 'left';\r\n\t\t} else if (position === 'bottom') {\r\n\t\t\ty = me.top + tl + tickPadding;\r\n\t\t\ttextAlign = !rotation ? 'center' : 'right';\r\n\t\t} else if (position === 'left') {\r\n\t\t\tx = me.right - (isMirrored ? 0 : tl) - tickPadding;\r\n\t\t\ttextAlign = isMirrored ? 'left' : 'right';\r\n\t\t} else {\r\n\t\t\tx = me.left + (isMirrored ? 0 : tl) + tickPadding;\r\n\t\t\ttextAlign = isMirrored ? 'right' : 'left';\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = ticks.length; i < ilen; ++i) {\r\n\t\t\ttick = ticks[i];\r\n\t\t\tlabel = tick.label;\r\n\r\n\t\t\t// autoskipper skipped this tick (#4635)\r\n\t\t\tif (isNullOrUndef(label)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tpixel = me.getPixelForTick(tick._index || i) + optionTicks.labelOffset;\r\n\t\t\tfont = tick.major ? fonts.major : fonts.minor;\r\n\t\t\tlineHeight = font.lineHeight;\r\n\t\t\tlineCount = isArray(label) ? label.length : 1;\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\tx = pixel;\r\n\t\t\t\ttextOffset = position === 'top'\r\n\t\t\t\t\t? ((!rotation ? 0.5 : 1) - lineCount) * lineHeight\r\n\t\t\t\t\t: (!rotation ? 0.5 : 0) * lineHeight;\r\n\t\t\t} else {\r\n\t\t\t\ty = pixel;\r\n\t\t\t\ttextOffset = (1 - lineCount) * lineHeight / 2;\r\n\t\t\t}\r\n\r\n\t\t\titems.push({\r\n\t\t\t\tx: x,\r\n\t\t\t\ty: y,\r\n\t\t\t\trotation: rotation,\r\n\t\t\t\tlabel: label,\r\n\t\t\t\tfont: font,\r\n\t\t\t\ttextOffset: textOffset,\r\n\t\t\t\ttextAlign: textAlign\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn items;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawGrid: function(chartArea) {\r\n\t\tvar me = this;\r\n\t\tvar gridLines = me.options.gridLines;\r\n\r\n\t\tif (!gridLines.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar chart = me.chart;\r\n\t\tvar alignPixel = helpers$1._alignPixel;\r\n\t\tvar axisWidth = gridLines.drawBorder ? valueAtIndexOrDefault(gridLines.lineWidth, 0, 0) : 0;\r\n\t\tvar items = me._gridLineItems || (me._gridLineItems = me._computeGridLineItems(chartArea));\r\n\t\tvar width, color, i, ilen, item;\r\n\r\n\t\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\r\n\t\t\titem = items[i];\r\n\t\t\twidth = item.width;\r\n\t\t\tcolor = item.color;\r\n\r\n\t\t\tif (width && color) {\r\n\t\t\t\tctx.save();\r\n\t\t\t\tctx.lineWidth = width;\r\n\t\t\t\tctx.strokeStyle = color;\r\n\t\t\t\tif (ctx.setLineDash) {\r\n\t\t\t\t\tctx.setLineDash(item.borderDash);\r\n\t\t\t\t\tctx.lineDashOffset = item.borderDashOffset;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tctx.beginPath();\r\n\r\n\t\t\t\tif (gridLines.drawTicks) {\r\n\t\t\t\t\tctx.moveTo(item.tx1, item.ty1);\r\n\t\t\t\t\tctx.lineTo(item.tx2, item.ty2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (gridLines.drawOnChartArea) {\r\n\t\t\t\t\tctx.moveTo(item.x1, item.y1);\r\n\t\t\t\t\tctx.lineTo(item.x2, item.y2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tctx.stroke();\r\n\t\t\t\tctx.restore();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (axisWidth) {\r\n\t\t\t// Draw the line at the edge of the axis\r\n\t\t\tvar firstLineWidth = axisWidth;\r\n\t\t\tvar lastLineWidth = valueAtIndexOrDefault(gridLines.lineWidth, items.ticksLength - 1, 1);\r\n\t\t\tvar borderValue = items.borderValue;\r\n\t\t\tvar x1, x2, y1, y2;\r\n\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\tx1 = alignPixel(chart, me.left, firstLineWidth) - firstLineWidth / 2;\r\n\t\t\t\tx2 = alignPixel(chart, me.right, lastLineWidth) + lastLineWidth / 2;\r\n\t\t\t\ty1 = y2 = borderValue;\r\n\t\t\t} else {\r\n\t\t\t\ty1 = alignPixel(chart, me.top, firstLineWidth) - firstLineWidth / 2;\r\n\t\t\t\ty2 = alignPixel(chart, me.bottom, lastLineWidth) + lastLineWidth / 2;\r\n\t\t\t\tx1 = x2 = borderValue;\r\n\t\t\t}\r\n\r\n\t\t\tctx.lineWidth = axisWidth;\r\n\t\t\tctx.strokeStyle = valueAtIndexOrDefault(gridLines.color, 0);\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.moveTo(x1, y1);\r\n\t\t\tctx.lineTo(x2, y2);\r\n\t\t\tctx.stroke();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawLabels: function() {\r\n\t\tvar me = this;\r\n\t\tvar optionTicks = me.options.ticks;\r\n\r\n\t\tif (!optionTicks.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar items = me._labelItems || (me._labelItems = me._computeLabelItems());\r\n\t\tvar i, j, ilen, jlen, item, tickFont, label, y;\r\n\r\n\t\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\r\n\t\t\titem = items[i];\r\n\t\t\ttickFont = item.font;\r\n\r\n\t\t\t// Make sure we draw text in the correct color and font\r\n\t\t\tctx.save();\r\n\t\t\tctx.translate(item.x, item.y);\r\n\t\t\tctx.rotate(item.rotation);\r\n\t\t\tctx.font = tickFont.string;\r\n\t\t\tctx.fillStyle = tickFont.color;\r\n\t\t\tctx.textBaseline = 'middle';\r\n\t\t\tctx.textAlign = item.textAlign;\r\n\r\n\t\t\tlabel = item.label;\r\n\t\t\ty = item.textOffset;\r\n\t\t\tif (isArray(label)) {\r\n\t\t\t\tfor (j = 0, jlen = label.length; j < jlen; ++j) {\r\n\t\t\t\t\t// We just make sure the multiline element is a string here..\r\n\t\t\t\t\tctx.fillText('' + label[j], 0, y);\r\n\t\t\t\t\ty += tickFont.lineHeight;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tctx.fillText(label, 0, y);\r\n\t\t\t}\r\n\t\t\tctx.restore();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawTitle: function() {\r\n\t\tvar me = this;\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar options = me.options;\r\n\t\tvar scaleLabel = options.scaleLabel;\r\n\r\n\t\tif (!scaleLabel.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar scaleLabelFontColor = valueOrDefault$a(scaleLabel.fontColor, core_defaults.global.defaultFontColor);\r\n\t\tvar scaleLabelFont = helpers$1.options._parseFont(scaleLabel);\r\n\t\tvar scaleLabelPadding = helpers$1.options.toPadding(scaleLabel.padding);\r\n\t\tvar halfLineHeight = scaleLabelFont.lineHeight / 2;\r\n\t\tvar position = options.position;\r\n\t\tvar rotation = 0;\r\n\t\tvar scaleLabelX, scaleLabelY;\r\n\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\tscaleLabelX = me.left + me.width / 2; // midpoint of the width\r\n\t\t\tscaleLabelY = position === 'bottom'\r\n\t\t\t\t? me.bottom - halfLineHeight - scaleLabelPadding.bottom\r\n\t\t\t\t: me.top + halfLineHeight + scaleLabelPadding.top;\r\n\t\t} else {\r\n\t\t\tvar isLeft = position === 'left';\r\n\t\t\tscaleLabelX = isLeft\r\n\t\t\t\t? me.left + halfLineHeight + scaleLabelPadding.top\r\n\t\t\t\t: me.right - halfLineHeight - scaleLabelPadding.top;\r\n\t\t\tscaleLabelY = me.top + me.height / 2;\r\n\t\t\trotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI;\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\t\tctx.translate(scaleLabelX, scaleLabelY);\r\n\t\tctx.rotate(rotation);\r\n\t\tctx.textAlign = 'center';\r\n\t\tctx.textBaseline = 'middle';\r\n\t\tctx.fillStyle = scaleLabelFontColor; // render in correct colour\r\n\t\tctx.font = scaleLabelFont.string;\r\n\t\tctx.fillText(scaleLabel.labelString, 0, 0);\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\tdraw: function(chartArea) {\r\n\t\tvar me = this;\r\n\r\n\t\tif (!me._isVisible()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tme._drawGrid(chartArea);\r\n\t\tme._drawTitle();\r\n\t\tme._drawLabels();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_layers: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar tz = opts.ticks && opts.ticks.z || 0;\r\n\t\tvar gz = opts.gridLines && opts.gridLines.z || 0;\r\n\r\n\t\tif (!me._isVisible() || tz === gz || me.draw !== me._draw) {\r\n\t\t\t// backward compatibility: draw has been overridden by custom scale\r\n\t\t\treturn [{\r\n\t\t\t\tz: tz,\r\n\t\t\t\tdraw: function() {\r\n\t\t\t\t\tme.draw.apply(me, arguments);\r\n\t\t\t\t}\r\n\t\t\t}];\r\n\t\t}\r\n\r\n\t\treturn [{\r\n\t\t\tz: gz,\r\n\t\t\tdraw: function() {\r\n\t\t\t\tme._drawGrid.apply(me, arguments);\r\n\t\t\t\tme._drawTitle.apply(me, arguments);\r\n\t\t\t}\r\n\t\t}, {\r\n\t\t\tz: tz,\r\n\t\t\tdraw: function() {\r\n\t\t\t\tme._drawLabels.apply(me, arguments);\r\n\t\t\t}\r\n\t\t}];\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getMatchingVisibleMetas: function(type) {\r\n\t\tvar me = this;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\treturn me.chart._getSortedVisibleDatasetMetas()\r\n\t\t\t.filter(function(meta) {\r\n\t\t\t\treturn (!type || meta.type === type)\r\n\t\t\t\t\t&& (isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id);\r\n\t\t\t});\r\n\t}\r\n});\r\n\r\nScale.prototype._draw = Scale.prototype.draw;\r\n\r\nvar core_scale = Scale;\n\nvar isNullOrUndef$1 = helpers$1.isNullOrUndef;\r\n\r\nvar defaultConfig = {\r\n\tposition: 'bottom'\r\n};\r\n\r\nvar scale_category = core_scale.extend({\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar labels = me._getLabels();\r\n\t\tvar ticksOpts = me.options.ticks;\r\n\t\tvar min = ticksOpts.min;\r\n\t\tvar max = ticksOpts.max;\r\n\t\tvar minIndex = 0;\r\n\t\tvar maxIndex = labels.length - 1;\r\n\t\tvar findIndex;\r\n\r\n\t\tif (min !== undefined) {\r\n\t\t\t// user specified min value\r\n\t\t\tfindIndex = labels.indexOf(min);\r\n\t\t\tif (findIndex >= 0) {\r\n\t\t\t\tminIndex = findIndex;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (max !== undefined) {\r\n\t\t\t// user specified max value\r\n\t\t\tfindIndex = labels.indexOf(max);\r\n\t\t\tif (findIndex >= 0) {\r\n\t\t\t\tmaxIndex = findIndex;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.minIndex = minIndex;\r\n\t\tme.maxIndex = maxIndex;\r\n\t\tme.min = labels[minIndex];\r\n\t\tme.max = labels[maxIndex];\r\n\t},\r\n\r\n\tbuildTicks: function() {\r\n\t\tvar me = this;\r\n\t\tvar labels = me._getLabels();\r\n\t\tvar minIndex = me.minIndex;\r\n\t\tvar maxIndex = me.maxIndex;\r\n\r\n\t\t// If we are viewing some subset of labels, slice the original array\r\n\t\tme.ticks = (minIndex === 0 && maxIndex === labels.length - 1) ? labels : labels.slice(minIndex, maxIndex + 1);\r\n\t},\r\n\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\r\n\t\tif (chart.getDatasetMeta(datasetIndex).controller._getValueScaleId() === me.id) {\r\n\t\t\treturn me.getRightValue(chart.data.datasets[datasetIndex].data[index]);\r\n\t\t}\r\n\r\n\t\treturn me._getLabels()[index];\r\n\t},\r\n\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tvar offset = me.options.offset;\r\n\t\tvar ticks = me.ticks;\r\n\r\n\t\tcore_scale.prototype._configure.call(me);\r\n\r\n\t\tif (!me.isHorizontal()) {\r\n\t\t\t// For backward compatibility, vertical category scale reverse is inverted.\r\n\t\t\tme._reversePixels = !me._reversePixels;\r\n\t\t}\r\n\r\n\t\tif (!ticks) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tme._startValue = me.minIndex - (offset ? 0.5 : 0);\r\n\t\tme._valueRange = Math.max(ticks.length - (offset ? 0 : 1), 1);\r\n\t},\r\n\r\n\t// Used to get data value locations. Value can either be an index or a numerical value\r\n\tgetPixelForValue: function(value, index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar valueCategory, labels, idx;\r\n\r\n\t\tif (!isNullOrUndef$1(index) && !isNullOrUndef$1(datasetIndex)) {\r\n\t\t\tvalue = me.chart.data.datasets[datasetIndex].data[index];\r\n\t\t}\r\n\r\n\t\t// If value is a data object, then index is the index in the data array,\r\n\t\t// not the index of the scale. We need to change that.\r\n\t\tif (!isNullOrUndef$1(value)) {\r\n\t\t\tvalueCategory = me.isHorizontal() ? value.x : value.y;\r\n\t\t}\r\n\t\tif (valueCategory !== undefined || (value !== undefined && isNaN(index))) {\r\n\t\t\tlabels = me._getLabels();\r\n\t\t\tvalue = helpers$1.valueOrDefault(valueCategory, value);\r\n\t\t\tidx = labels.indexOf(value);\r\n\t\t\tindex = idx !== -1 ? idx : index;\r\n\t\t\tif (isNaN(index)) {\r\n\t\t\t\tindex = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn me.getPixelForDecimal((index - me._startValue) / me._valueRange);\r\n\t},\r\n\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar ticks = this.ticks;\r\n\t\treturn index < 0 || index > ticks.length - 1\r\n\t\t\t? null\r\n\t\t\t: this.getPixelForValue(ticks[index], index + this.minIndex);\r\n\t},\r\n\r\n\tgetValueForPixel: function(pixel) {\r\n\t\tvar me = this;\r\n\t\tvar value = Math.round(me._startValue + me.getDecimalForPixel(pixel) * me._valueRange);\r\n\t\treturn Math.min(Math.max(value, 0), me.ticks.length - 1);\r\n\t},\r\n\r\n\tgetBasePixel: function() {\r\n\t\treturn this.bottom;\r\n\t}\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults = defaultConfig;\nscale_category._defaults = _defaults;\n\nvar noop = helpers$1.noop;\r\nvar isNullOrUndef$2 = helpers$1.isNullOrUndef;\r\n\r\n/**\r\n * Generate a set of linear ticks\r\n * @param generationOptions the options used to generate the ticks\r\n * @param dataRange the range of the data\r\n * @returns {number[]} array of tick values\r\n */\r\nfunction generateTicks(generationOptions, dataRange) {\r\n\tvar ticks = [];\r\n\t// To get a \"nice\" value for the tick spacing, we will use the appropriately named\r\n\t// \"nice number\" algorithm. See https://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks\r\n\t// for details.\r\n\r\n\tvar MIN_SPACING = 1e-14;\r\n\tvar stepSize = generationOptions.stepSize;\r\n\tvar unit = stepSize || 1;\r\n\tvar maxNumSpaces = generationOptions.maxTicks - 1;\r\n\tvar min = generationOptions.min;\r\n\tvar max = generationOptions.max;\r\n\tvar precision = generationOptions.precision;\r\n\tvar rmin = dataRange.min;\r\n\tvar rmax = dataRange.max;\r\n\tvar spacing = helpers$1.niceNum((rmax - rmin) / maxNumSpaces / unit) * unit;\r\n\tvar factor, niceMin, niceMax, numSpaces;\r\n\r\n\t// Beyond MIN_SPACING floating point numbers being to lose precision\r\n\t// such that we can't do the math necessary to generate ticks\r\n\tif (spacing < MIN_SPACING && isNullOrUndef$2(min) && isNullOrUndef$2(max)) {\r\n\t\treturn [rmin, rmax];\r\n\t}\r\n\r\n\tnumSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\r\n\tif (numSpaces > maxNumSpaces) {\r\n\t\t// If the calculated num of spaces exceeds maxNumSpaces, recalculate it\r\n\t\tspacing = helpers$1.niceNum(numSpaces * spacing / maxNumSpaces / unit) * unit;\r\n\t}\r\n\r\n\tif (stepSize || isNullOrUndef$2(precision)) {\r\n\t\t// If a precision is not specified, calculate factor based on spacing\r\n\t\tfactor = Math.pow(10, helpers$1._decimalPlaces(spacing));\r\n\t} else {\r\n\t\t// If the user specified a precision, round to that number of decimal places\r\n\t\tfactor = Math.pow(10, precision);\r\n\t\tspacing = Math.ceil(spacing * factor) / factor;\r\n\t}\r\n\r\n\tniceMin = Math.floor(rmin / spacing) * spacing;\r\n\tniceMax = Math.ceil(rmax / spacing) * spacing;\r\n\r\n\t// If min, max and stepSize is set and they make an evenly spaced scale use it.\r\n\tif (stepSize) {\r\n\t\t// If very close to our whole number, use it.\r\n\t\tif (!isNullOrUndef$2(min) && helpers$1.almostWhole(min / spacing, spacing / 1000)) {\r\n\t\t\tniceMin = min;\r\n\t\t}\r\n\t\tif (!isNullOrUndef$2(max) && helpers$1.almostWhole(max / spacing, spacing / 1000)) {\r\n\t\t\tniceMax = max;\r\n\t\t}\r\n\t}\r\n\r\n\tnumSpaces = (niceMax - niceMin) / spacing;\r\n\t// If very close to our rounded value, use it.\r\n\tif (helpers$1.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\r\n\t\tnumSpaces = Math.round(numSpaces);\r\n\t} else {\r\n\t\tnumSpaces = Math.ceil(numSpaces);\r\n\t}\r\n\r\n\tniceMin = Math.round(niceMin * factor) / factor;\r\n\tniceMax = Math.round(niceMax * factor) / factor;\r\n\tticks.push(isNullOrUndef$2(min) ? niceMin : min);\r\n\tfor (var j = 1; j < numSpaces; ++j) {\r\n\t\tticks.push(Math.round((niceMin + j * spacing) * factor) / factor);\r\n\t}\r\n\tticks.push(isNullOrUndef$2(max) ? niceMax : max);\r\n\r\n\treturn ticks;\r\n}\r\n\r\nvar scale_linearbase = core_scale.extend({\r\n\tgetRightValue: function(value) {\r\n\t\tif (typeof value === 'string') {\r\n\t\t\treturn +value;\r\n\t\t}\r\n\t\treturn core_scale.prototype.getRightValue.call(this, value);\r\n\t},\r\n\r\n\thandleTickRangeOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar tickOpts = opts.ticks;\r\n\r\n\t\t// If we are forcing it to begin at 0, but 0 will already be rendered on the chart,\r\n\t\t// do nothing since that would make the chart weird. If the user really wants a weird chart\r\n\t\t// axis, they can manually override it\r\n\t\tif (tickOpts.beginAtZero) {\r\n\t\t\tvar minSign = helpers$1.sign(me.min);\r\n\t\t\tvar maxSign = helpers$1.sign(me.max);\r\n\r\n\t\t\tif (minSign < 0 && maxSign < 0) {\r\n\t\t\t\t// move the top up to 0\r\n\t\t\t\tme.max = 0;\r\n\t\t\t} else if (minSign > 0 && maxSign > 0) {\r\n\t\t\t\t// move the bottom down to 0\r\n\t\t\t\tme.min = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar setMin = tickOpts.min !== undefined || tickOpts.suggestedMin !== undefined;\r\n\t\tvar setMax = tickOpts.max !== undefined || tickOpts.suggestedMax !== undefined;\r\n\r\n\t\tif (tickOpts.min !== undefined) {\r\n\t\t\tme.min = tickOpts.min;\r\n\t\t} else if (tickOpts.suggestedMin !== undefined) {\r\n\t\t\tif (me.min === null) {\r\n\t\t\t\tme.min = tickOpts.suggestedMin;\r\n\t\t\t} else {\r\n\t\t\t\tme.min = Math.min(me.min, tickOpts.suggestedMin);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tickOpts.max !== undefined) {\r\n\t\t\tme.max = tickOpts.max;\r\n\t\t} else if (tickOpts.suggestedMax !== undefined) {\r\n\t\t\tif (me.max === null) {\r\n\t\t\t\tme.max = tickOpts.suggestedMax;\r\n\t\t\t} else {\r\n\t\t\t\tme.max = Math.max(me.max, tickOpts.suggestedMax);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (setMin !== setMax) {\r\n\t\t\t// We set the min or the max but not both.\r\n\t\t\t// So ensure that our range is good\r\n\t\t\t// Inverted or 0 length range can happen when\r\n\t\t\t// ticks.min is set, and no datasets are visible\r\n\t\t\tif (me.min >= me.max) {\r\n\t\t\t\tif (setMin) {\r\n\t\t\t\t\tme.max = me.min + 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tme.min = me.max - 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (me.min === me.max) {\r\n\t\t\tme.max++;\r\n\r\n\t\t\tif (!tickOpts.beginAtZero) {\r\n\t\t\t\tme.min--;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tgetTickLimit: function() {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar stepSize = tickOpts.stepSize;\r\n\t\tvar maxTicksLimit = tickOpts.maxTicksLimit;\r\n\t\tvar maxTicks;\r\n\r\n\t\tif (stepSize) {\r\n\t\t\tmaxTicks = Math.ceil(me.max / stepSize) - Math.floor(me.min / stepSize) + 1;\r\n\t\t} else {\r\n\t\t\tmaxTicks = me._computeTickLimit();\r\n\t\t\tmaxTicksLimit = maxTicksLimit || 11;\r\n\t\t}\r\n\r\n\t\tif (maxTicksLimit) {\r\n\t\t\tmaxTicks = Math.min(maxTicksLimit, maxTicks);\r\n\t\t}\r\n\r\n\t\treturn maxTicks;\r\n\t},\r\n\r\n\t_computeTickLimit: function() {\r\n\t\treturn Number.POSITIVE_INFINITY;\r\n\t},\r\n\r\n\thandleDirectionalChanges: noop,\r\n\r\n\tbuildTicks: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar tickOpts = opts.ticks;\r\n\r\n\t\t// Figure out what the max number of ticks we can support it is based on the size of\r\n\t\t// the axis area. For now, we say that the minimum tick spacing in pixels must be 40\r\n\t\t// We also limit the maximum number of ticks to 11 which gives a nice 10 squares on\r\n\t\t// the graph. Make sure we always have at least 2 ticks\r\n\t\tvar maxTicks = me.getTickLimit();\r\n\t\tmaxTicks = Math.max(2, maxTicks);\r\n\r\n\t\tvar numericGeneratorOptions = {\r\n\t\t\tmaxTicks: maxTicks,\r\n\t\t\tmin: tickOpts.min,\r\n\t\t\tmax: tickOpts.max,\r\n\t\t\tprecision: tickOpts.precision,\r\n\t\t\tstepSize: helpers$1.valueOrDefault(tickOpts.fixedStepSize, tickOpts.stepSize)\r\n\t\t};\r\n\t\tvar ticks = me.ticks = generateTicks(numericGeneratorOptions, me);\r\n\r\n\t\tme.handleDirectionalChanges();\r\n\r\n\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\r\n\t\t// range of the scale\r\n\t\tme.max = helpers$1.max(ticks);\r\n\t\tme.min = helpers$1.min(ticks);\r\n\r\n\t\tif (tickOpts.reverse) {\r\n\t\t\tticks.reverse();\r\n\r\n\t\t\tme.start = me.max;\r\n\t\t\tme.end = me.min;\r\n\t\t} else {\r\n\t\t\tme.start = me.min;\r\n\t\t\tme.end = me.max;\r\n\t\t}\r\n\t},\r\n\r\n\tconvertTicksToLabels: function() {\r\n\t\tvar me = this;\r\n\t\tme.ticksAsNumbers = me.ticks.slice();\r\n\t\tme.zeroLineIndex = me.ticks.indexOf(0);\r\n\r\n\t\tcore_scale.prototype.convertTicksToLabels.call(me);\r\n\t},\r\n\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tvar ticks = me.getTicks();\r\n\t\tvar start = me.min;\r\n\t\tvar end = me.max;\r\n\t\tvar offset;\r\n\r\n\t\tcore_scale.prototype._configure.call(me);\r\n\r\n\t\tif (me.options.offset && ticks.length) {\r\n\t\t\toffset = (end - start) / Math.max(ticks.length - 1, 1) / 2;\r\n\t\t\tstart -= offset;\r\n\t\t\tend += offset;\r\n\t\t}\r\n\t\tme._startValue = start;\r\n\t\tme._endValue = end;\r\n\t\tme._valueRange = end - start;\r\n\t}\r\n});\n\nvar defaultConfig$1 = {\r\n\tposition: 'left',\r\n\tticks: {\r\n\t\tcallback: core_ticks.formatters.linear\r\n\t}\r\n};\r\n\r\nvar DEFAULT_MIN = 0;\r\nvar DEFAULT_MAX = 1;\r\n\r\nfunction getOrCreateStack(stacks, stacked, meta) {\r\n\tvar key = [\r\n\t\tmeta.type,\r\n\t\t// we have a separate stack for stack=undefined datasets when the opts.stacked is undefined\r\n\t\tstacked === undefined && meta.stack === undefined ? meta.index : '',\r\n\t\tmeta.stack\r\n\t].join('.');\r\n\r\n\tif (stacks[key] === undefined) {\r\n\t\tstacks[key] = {\r\n\t\t\tpos: [],\r\n\t\t\tneg: []\r\n\t\t};\r\n\t}\r\n\r\n\treturn stacks[key];\r\n}\r\n\r\nfunction stackData(scale, stacks, meta, data) {\r\n\tvar opts = scale.options;\r\n\tvar stacked = opts.stacked;\r\n\tvar stack = getOrCreateStack(stacks, stacked, meta);\r\n\tvar pos = stack.pos;\r\n\tvar neg = stack.neg;\r\n\tvar ilen = data.length;\r\n\tvar i, value;\r\n\r\n\tfor (i = 0; i < ilen; ++i) {\r\n\t\tvalue = scale._parseValue(data[i]);\r\n\t\tif (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tpos[i] = pos[i] || 0;\r\n\t\tneg[i] = neg[i] || 0;\r\n\r\n\t\tif (opts.relativePoints) {\r\n\t\t\tpos[i] = 100;\r\n\t\t} else if (value.min < 0 || value.max < 0) {\r\n\t\t\tneg[i] += value.min;\r\n\t\t} else {\r\n\t\t\tpos[i] += value.max;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction updateMinMax(scale, meta, data) {\r\n\tvar ilen = data.length;\r\n\tvar i, value;\r\n\r\n\tfor (i = 0; i < ilen; ++i) {\r\n\t\tvalue = scale._parseValue(data[i]);\r\n\t\tif (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tscale.min = Math.min(scale.min, value.min);\r\n\t\tscale.max = Math.max(scale.max, value.max);\r\n\t}\r\n}\r\n\r\nvar scale_linear = scale_linearbase.extend({\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar metasets = me._getMatchingVisibleMetas();\r\n\t\tvar hasStacks = opts.stacked;\r\n\t\tvar stacks = {};\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar i, meta, data, values;\r\n\r\n\t\tme.min = Number.POSITIVE_INFINITY;\r\n\t\tme.max = Number.NEGATIVE_INFINITY;\r\n\r\n\t\tif (hasStacks === undefined) {\r\n\t\t\tfor (i = 0; !hasStacks && i < ilen; ++i) {\r\n\t\t\t\tmeta = metasets[i];\r\n\t\t\t\thasStacks = meta.stack !== undefined;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tmeta = metasets[i];\r\n\t\t\tdata = datasets[meta.index].data;\r\n\t\t\tif (hasStacks) {\r\n\t\t\t\tstackData(me, stacks, meta, data);\r\n\t\t\t} else {\r\n\t\t\t\tupdateMinMax(me, meta, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thelpers$1.each(stacks, function(stackValues) {\r\n\t\t\tvalues = stackValues.pos.concat(stackValues.neg);\r\n\t\t\tme.min = Math.min(me.min, helpers$1.min(values));\r\n\t\t\tme.max = Math.max(me.max, helpers$1.max(values));\r\n\t\t});\r\n\r\n\t\tme.min = helpers$1.isFinite(me.min) && !isNaN(me.min) ? me.min : DEFAULT_MIN;\r\n\t\tme.max = helpers$1.isFinite(me.max) && !isNaN(me.max) ? me.max : DEFAULT_MAX;\r\n\r\n\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\r\n\t\tme.handleTickRangeOptions();\r\n\t},\r\n\r\n\t// Returns the maximum number of ticks based on the scale dimension\r\n\t_computeTickLimit: function() {\r\n\t\tvar me = this;\r\n\t\tvar tickFont;\r\n\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\treturn Math.ceil(me.width / 40);\r\n\t\t}\r\n\t\ttickFont = helpers$1.options._parseFont(me.options.ticks);\r\n\t\treturn Math.ceil(me.height / tickFont.lineHeight);\r\n\t},\r\n\r\n\t// Called after the ticks are built. We need\r\n\thandleDirectionalChanges: function() {\r\n\t\tif (!this.isHorizontal()) {\r\n\t\t\t// We are in a vertical orientation. The top value is the highest. So reverse the array\r\n\t\t\tthis.ticks.reverse();\r\n\t\t}\r\n\t},\r\n\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\treturn this._getScaleLabel(this.chart.data.datasets[datasetIndex].data[index]);\r\n\t},\r\n\r\n\t// Utils\r\n\tgetPixelForValue: function(value) {\r\n\t\tvar me = this;\r\n\t\treturn me.getPixelForDecimal((+me.getRightValue(value) - me._startValue) / me._valueRange);\r\n\t},\r\n\r\n\tgetValueForPixel: function(pixel) {\r\n\t\treturn this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;\r\n\t},\r\n\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar ticks = this.ticksAsNumbers;\r\n\t\tif (index < 0 || index > ticks.length - 1) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn this.getPixelForValue(ticks[index]);\r\n\t}\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults$1 = defaultConfig$1;\nscale_linear._defaults = _defaults$1;\n\nvar valueOrDefault$b = helpers$1.valueOrDefault;\r\nvar log10 = helpers$1.math.log10;\r\n\r\n/**\r\n * Generate a set of logarithmic ticks\r\n * @param generationOptions the options used to generate the ticks\r\n * @param dataRange the range of the data\r\n * @returns {number[]} array of tick values\r\n */\r\nfunction generateTicks$1(generationOptions, dataRange) {\r\n\tvar ticks = [];\r\n\r\n\tvar tickVal = valueOrDefault$b(generationOptions.min, Math.pow(10, Math.floor(log10(dataRange.min))));\r\n\r\n\tvar endExp = Math.floor(log10(dataRange.max));\r\n\tvar endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));\r\n\tvar exp, significand;\r\n\r\n\tif (tickVal === 0) {\r\n\t\texp = Math.floor(log10(dataRange.minNotZero));\r\n\t\tsignificand = Math.floor(dataRange.minNotZero / Math.pow(10, exp));\r\n\r\n\t\tticks.push(tickVal);\r\n\t\ttickVal = significand * Math.pow(10, exp);\r\n\t} else {\r\n\t\texp = Math.floor(log10(tickVal));\r\n\t\tsignificand = Math.floor(tickVal / Math.pow(10, exp));\r\n\t}\r\n\tvar precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;\r\n\r\n\tdo {\r\n\t\tticks.push(tickVal);\r\n\r\n\t\t++significand;\r\n\t\tif (significand === 10) {\r\n\t\t\tsignificand = 1;\r\n\t\t\t++exp;\r\n\t\t\tprecision = exp >= 0 ? 1 : precision;\r\n\t\t}\r\n\r\n\t\ttickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision;\r\n\t} while (exp < endExp || (exp === endExp && significand < endSignificand));\r\n\r\n\tvar lastTick = valueOrDefault$b(generationOptions.max, tickVal);\r\n\tticks.push(lastTick);\r\n\r\n\treturn ticks;\r\n}\r\n\r\nvar defaultConfig$2 = {\r\n\tposition: 'left',\r\n\r\n\t// label settings\r\n\tticks: {\r\n\t\tcallback: core_ticks.formatters.logarithmic\r\n\t}\r\n};\r\n\r\n// TODO(v3): change this to positiveOrDefault\r\nfunction nonNegativeOrDefault(value, defaultValue) {\r\n\treturn helpers$1.isFinite(value) && value >= 0 ? value : defaultValue;\r\n}\r\n\r\nvar scale_logarithmic = core_scale.extend({\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tfunction IDMatches(meta) {\r\n\t\t\treturn isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;\r\n\t\t}\r\n\t\tvar datasetIndex, meta, value, data, i, ilen;\r\n\r\n\t\t// Calculate Range\r\n\t\tme.min = Number.POSITIVE_INFINITY;\r\n\t\tme.max = Number.NEGATIVE_INFINITY;\r\n\t\tme.minNotZero = Number.POSITIVE_INFINITY;\r\n\r\n\t\tvar hasStacks = opts.stacked;\r\n\t\tif (hasStacks === undefined) {\r\n\t\t\tfor (datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) &&\r\n\t\t\t\t\tmeta.stack !== undefined) {\r\n\t\t\t\t\thasStacks = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (opts.stacked || hasStacks) {\r\n\t\t\tvar valuesPerStack = {};\r\n\r\n\t\t\tfor (datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\tvar key = [\r\n\t\t\t\t\tmeta.type,\r\n\t\t\t\t\t// we have a separate stack for stack=undefined datasets when the opts.stacked is undefined\r\n\t\t\t\t\t((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),\r\n\t\t\t\t\tmeta.stack\r\n\t\t\t\t].join('.');\r\n\r\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\r\n\t\t\t\t\tif (valuesPerStack[key] === undefined) {\r\n\t\t\t\t\t\tvaluesPerStack[key] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdata = datasets[datasetIndex].data;\r\n\t\t\t\t\tfor (i = 0, ilen = data.length; i < ilen; i++) {\r\n\t\t\t\t\t\tvar values = valuesPerStack[key];\r\n\t\t\t\t\t\tvalue = me._parseValue(data[i]);\r\n\t\t\t\t\t\t// invalid, hidden and negative values are ignored\r\n\t\t\t\t\t\tif (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvalues[i] = values[i] || 0;\r\n\t\t\t\t\t\tvalues[i] += value.max;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\thelpers$1.each(valuesPerStack, function(valuesForType) {\r\n\t\t\t\tif (valuesForType.length > 0) {\r\n\t\t\t\t\tvar minVal = helpers$1.min(valuesForType);\r\n\t\t\t\t\tvar maxVal = helpers$1.max(valuesForType);\r\n\t\t\t\t\tme.min = Math.min(me.min, minVal);\r\n\t\t\t\t\tme.max = Math.max(me.max, maxVal);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t} else {\r\n\t\t\tfor (datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\r\n\t\t\t\t\tdata = datasets[datasetIndex].data;\r\n\t\t\t\t\tfor (i = 0, ilen = data.length; i < ilen; i++) {\r\n\t\t\t\t\t\tvalue = me._parseValue(data[i]);\r\n\t\t\t\t\t\t// invalid, hidden and negative values are ignored\r\n\t\t\t\t\t\tif (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tme.min = Math.min(value.min, me.min);\r\n\t\t\t\t\t\tme.max = Math.max(value.max, me.max);\r\n\r\n\t\t\t\t\t\tif (value.min !== 0) {\r\n\t\t\t\t\t\t\tme.minNotZero = Math.min(value.min, me.minNotZero);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.min = helpers$1.isFinite(me.min) ? me.min : null;\r\n\t\tme.max = helpers$1.isFinite(me.max) ? me.max : null;\r\n\t\tme.minNotZero = helpers$1.isFinite(me.minNotZero) ? me.minNotZero : null;\r\n\r\n\t\t// Common base implementation to handle ticks.min, ticks.max\r\n\t\tthis.handleTickRangeOptions();\r\n\t},\r\n\r\n\thandleTickRangeOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar DEFAULT_MIN = 1;\r\n\t\tvar DEFAULT_MAX = 10;\r\n\r\n\t\tme.min = nonNegativeOrDefault(tickOpts.min, me.min);\r\n\t\tme.max = nonNegativeOrDefault(tickOpts.max, me.max);\r\n\r\n\t\tif (me.min === me.max) {\r\n\t\t\tif (me.min !== 0 && me.min !== null) {\r\n\t\t\t\tme.min = Math.pow(10, Math.floor(log10(me.min)) - 1);\r\n\t\t\t\tme.max = Math.pow(10, Math.floor(log10(me.max)) + 1);\r\n\t\t\t} else {\r\n\t\t\t\tme.min = DEFAULT_MIN;\r\n\t\t\t\tme.max = DEFAULT_MAX;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (me.min === null) {\r\n\t\t\tme.min = Math.pow(10, Math.floor(log10(me.max)) - 1);\r\n\t\t}\r\n\t\tif (me.max === null) {\r\n\t\t\tme.max = me.min !== 0\r\n\t\t\t\t? Math.pow(10, Math.floor(log10(me.min)) + 1)\r\n\t\t\t\t: DEFAULT_MAX;\r\n\t\t}\r\n\t\tif (me.minNotZero === null) {\r\n\t\t\tif (me.min > 0) {\r\n\t\t\t\tme.minNotZero = me.min;\r\n\t\t\t} else if (me.max < 1) {\r\n\t\t\t\tme.minNotZero = Math.pow(10, Math.floor(log10(me.max)));\r\n\t\t\t} else {\r\n\t\t\t\tme.minNotZero = DEFAULT_MIN;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbuildTicks: function() {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar reverse = !me.isHorizontal();\r\n\r\n\t\tvar generationOptions = {\r\n\t\t\tmin: nonNegativeOrDefault(tickOpts.min),\r\n\t\t\tmax: nonNegativeOrDefault(tickOpts.max)\r\n\t\t};\r\n\t\tvar ticks = me.ticks = generateTicks$1(generationOptions, me);\r\n\r\n\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\r\n\t\t// range of the scale\r\n\t\tme.max = helpers$1.max(ticks);\r\n\t\tme.min = helpers$1.min(ticks);\r\n\r\n\t\tif (tickOpts.reverse) {\r\n\t\t\treverse = !reverse;\r\n\t\t\tme.start = me.max;\r\n\t\t\tme.end = me.min;\r\n\t\t} else {\r\n\t\t\tme.start = me.min;\r\n\t\t\tme.end = me.max;\r\n\t\t}\r\n\t\tif (reverse) {\r\n\t\t\tticks.reverse();\r\n\t\t}\r\n\t},\r\n\r\n\tconvertTicksToLabels: function() {\r\n\t\tthis.tickValues = this.ticks.slice();\r\n\r\n\t\tcore_scale.prototype.convertTicksToLabels.call(this);\r\n\t},\r\n\r\n\t// Get the correct tooltip label\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\treturn this._getScaleLabel(this.chart.data.datasets[datasetIndex].data[index]);\r\n\t},\r\n\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar ticks = this.tickValues;\r\n\t\tif (index < 0 || index > ticks.length - 1) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn this.getPixelForValue(ticks[index]);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the value of the first tick.\r\n\t * @param {number} value - The minimum not zero value.\r\n\t * @return {number} The first tick value.\r\n\t * @private\r\n\t */\r\n\t_getFirstTickValue: function(value) {\r\n\t\tvar exp = Math.floor(log10(value));\r\n\t\tvar significand = Math.floor(value / Math.pow(10, exp));\r\n\r\n\t\treturn significand * Math.pow(10, exp);\r\n\t},\r\n\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tvar start = me.min;\r\n\t\tvar offset = 0;\r\n\r\n\t\tcore_scale.prototype._configure.call(me);\r\n\r\n\t\tif (start === 0) {\r\n\t\t\tstart = me._getFirstTickValue(me.minNotZero);\r\n\t\t\toffset = valueOrDefault$b(me.options.ticks.fontSize, core_defaults.global.defaultFontSize) / me._length;\r\n\t\t}\r\n\r\n\t\tme._startValue = log10(start);\r\n\t\tme._valueOffset = offset;\r\n\t\tme._valueRange = (log10(me.max) - log10(start)) / (1 - offset);\r\n\t},\r\n\r\n\tgetPixelForValue: function(value) {\r\n\t\tvar me = this;\r\n\t\tvar decimal = 0;\r\n\r\n\t\tvalue = +me.getRightValue(value);\r\n\r\n\t\tif (value > me.min && value > 0) {\r\n\t\t\tdecimal = (log10(value) - me._startValue) / me._valueRange + me._valueOffset;\r\n\t\t}\r\n\t\treturn me.getPixelForDecimal(decimal);\r\n\t},\r\n\r\n\tgetValueForPixel: function(pixel) {\r\n\t\tvar me = this;\r\n\t\tvar decimal = me.getDecimalForPixel(pixel);\r\n\t\treturn decimal === 0 && me.min === 0\r\n\t\t\t? 0\r\n\t\t\t: Math.pow(10, me._startValue + (decimal - me._valueOffset) * me._valueRange);\r\n\t}\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults$2 = defaultConfig$2;\nscale_logarithmic._defaults = _defaults$2;\n\nvar valueOrDefault$c = helpers$1.valueOrDefault;\r\nvar valueAtIndexOrDefault$1 = helpers$1.valueAtIndexOrDefault;\r\nvar resolve$4 = helpers$1.options.resolve;\r\n\r\nvar defaultConfig$3 = {\r\n\tdisplay: true,\r\n\r\n\t// Boolean - Whether to animate scaling the chart from the centre\r\n\tanimate: true,\r\n\tposition: 'chartArea',\r\n\r\n\tangleLines: {\r\n\t\tdisplay: true,\r\n\t\tcolor: 'rgba(0,0,0,0.1)',\r\n\t\tlineWidth: 1,\r\n\t\tborderDash: [],\r\n\t\tborderDashOffset: 0.0\r\n\t},\r\n\r\n\tgridLines: {\r\n\t\tcircular: false\r\n\t},\r\n\r\n\t// label settings\r\n\tticks: {\r\n\t\t// Boolean - Show a backdrop to the scale label\r\n\t\tshowLabelBackdrop: true,\r\n\r\n\t\t// String - The colour of the label backdrop\r\n\t\tbackdropColor: 'rgba(255,255,255,0.75)',\r\n\r\n\t\t// Number - The backdrop padding above & below the label in pixels\r\n\t\tbackdropPaddingY: 2,\r\n\r\n\t\t// Number - The backdrop padding to the side of the label in pixels\r\n\t\tbackdropPaddingX: 2,\r\n\r\n\t\tcallback: core_ticks.formatters.linear\r\n\t},\r\n\r\n\tpointLabels: {\r\n\t\t// Boolean - if true, show point labels\r\n\t\tdisplay: true,\r\n\r\n\t\t// Number - Point label font size in pixels\r\n\t\tfontSize: 10,\r\n\r\n\t\t// Function - Used to convert point labels\r\n\t\tcallback: function(label) {\r\n\t\t\treturn label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction getTickBackdropHeight(opts) {\r\n\tvar tickOpts = opts.ticks;\r\n\r\n\tif (tickOpts.display && opts.display) {\r\n\t\treturn valueOrDefault$c(tickOpts.fontSize, core_defaults.global.defaultFontSize) + tickOpts.backdropPaddingY * 2;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nfunction measureLabelSize(ctx, lineHeight, label) {\r\n\tif (helpers$1.isArray(label)) {\r\n\t\treturn {\r\n\t\t\tw: helpers$1.longestText(ctx, ctx.font, label),\r\n\t\t\th: label.length * lineHeight\r\n\t\t};\r\n\t}\r\n\r\n\treturn {\r\n\t\tw: ctx.measureText(label).width,\r\n\t\th: lineHeight\r\n\t};\r\n}\r\n\r\nfunction determineLimits(angle, pos, size, min, max) {\r\n\tif (angle === min || angle === max) {\r\n\t\treturn {\r\n\t\t\tstart: pos - (size / 2),\r\n\t\t\tend: pos + (size / 2)\r\n\t\t};\r\n\t} else if (angle < min || angle > max) {\r\n\t\treturn {\r\n\t\t\tstart: pos - size,\r\n\t\t\tend: pos\r\n\t\t};\r\n\t}\r\n\r\n\treturn {\r\n\t\tstart: pos,\r\n\t\tend: pos + size\r\n\t};\r\n}\r\n\r\n/**\r\n * Helper function to fit a radial linear scale with point labels\r\n */\r\nfunction fitWithPointLabels(scale) {\r\n\r\n\t// Right, this is really confusing and there is a lot of maths going on here\r\n\t// The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9\r\n\t//\r\n\t// Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif\r\n\t//\r\n\t// Solution:\r\n\t//\r\n\t// We assume the radius of the polygon is half the size of the canvas at first\r\n\t// at each index we check if the text overlaps.\r\n\t//\r\n\t// Where it does, we store that angle and that index.\r\n\t//\r\n\t// After finding the largest index and angle we calculate how much we need to remove\r\n\t// from the shape radius to move the point inwards by that x.\r\n\t//\r\n\t// We average the left and right distances to get the maximum shape radius that can fit in the box\r\n\t// along with labels.\r\n\t//\r\n\t// Once we have that, we can find the centre point for the chart, by taking the x text protrusion\r\n\t// on each side, removing that from the size, halving it and adding the left x protrusion width.\r\n\t//\r\n\t// This will mean we have a shape fitted to the canvas, as large as it can be with the labels\r\n\t// and position it in the most space efficient manner\r\n\t//\r\n\t// https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif\r\n\r\n\tvar plFont = helpers$1.options._parseFont(scale.options.pointLabels);\r\n\r\n\t// Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.\r\n\t// Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points\r\n\tvar furthestLimits = {\r\n\t\tl: 0,\r\n\t\tr: scale.width,\r\n\t\tt: 0,\r\n\t\tb: scale.height - scale.paddingTop\r\n\t};\r\n\tvar furthestAngles = {};\r\n\tvar i, textSize, pointPosition;\r\n\r\n\tscale.ctx.font = plFont.string;\r\n\tscale._pointLabelSizes = [];\r\n\r\n\tvar valueCount = scale.chart.data.labels.length;\r\n\tfor (i = 0; i < valueCount; i++) {\r\n\t\tpointPosition = scale.getPointPosition(i, scale.drawingArea + 5);\r\n\t\ttextSize = measureLabelSize(scale.ctx, plFont.lineHeight, scale.pointLabels[i]);\r\n\t\tscale._pointLabelSizes[i] = textSize;\r\n\r\n\t\t// Add quarter circle to make degree 0 mean top of circle\r\n\t\tvar angleRadians = scale.getIndexAngle(i);\r\n\t\tvar angle = helpers$1.toDegrees(angleRadians) % 360;\r\n\t\tvar hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\r\n\t\tvar vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\r\n\r\n\t\tif (hLimits.start < furthestLimits.l) {\r\n\t\t\tfurthestLimits.l = hLimits.start;\r\n\t\t\tfurthestAngles.l = angleRadians;\r\n\t\t}\r\n\r\n\t\tif (hLimits.end > furthestLimits.r) {\r\n\t\t\tfurthestLimits.r = hLimits.end;\r\n\t\t\tfurthestAngles.r = angleRadians;\r\n\t\t}\r\n\r\n\t\tif (vLimits.start < furthestLimits.t) {\r\n\t\t\tfurthestLimits.t = vLimits.start;\r\n\t\t\tfurthestAngles.t = angleRadians;\r\n\t\t}\r\n\r\n\t\tif (vLimits.end > furthestLimits.b) {\r\n\t\t\tfurthestLimits.b = vLimits.end;\r\n\t\t\tfurthestAngles.b = angleRadians;\r\n\t\t}\r\n\t}\r\n\r\n\tscale.setReductions(scale.drawingArea, furthestLimits, furthestAngles);\r\n}\r\n\r\nfunction getTextAlignForAngle(angle) {\r\n\tif (angle === 0 || angle === 180) {\r\n\t\treturn 'center';\r\n\t} else if (angle < 180) {\r\n\t\treturn 'left';\r\n\t}\r\n\r\n\treturn 'right';\r\n}\r\n\r\nfunction fillText(ctx, text, position, lineHeight) {\r\n\tvar y = position.y + lineHeight / 2;\r\n\tvar i, ilen;\r\n\r\n\tif (helpers$1.isArray(text)) {\r\n\t\tfor (i = 0, ilen = text.length; i < ilen; ++i) {\r\n\t\t\tctx.fillText(text[i], position.x, y);\r\n\t\t\ty += lineHeight;\r\n\t\t}\r\n\t} else {\r\n\t\tctx.fillText(text, position.x, y);\r\n\t}\r\n}\r\n\r\nfunction adjustPointPositionForLabelHeight(angle, textSize, position) {\r\n\tif (angle === 90 || angle === 270) {\r\n\t\tposition.y -= (textSize.h / 2);\r\n\t} else if (angle > 270 || angle < 90) {\r\n\t\tposition.y -= textSize.h;\r\n\t}\r\n}\r\n\r\nfunction drawPointLabels(scale) {\r\n\tvar ctx = scale.ctx;\r\n\tvar opts = scale.options;\r\n\tvar pointLabelOpts = opts.pointLabels;\r\n\tvar tickBackdropHeight = getTickBackdropHeight(opts);\r\n\tvar outerDistance = scale.getDistanceFromCenterForValue(opts.ticks.reverse ? scale.min : scale.max);\r\n\tvar plFont = helpers$1.options._parseFont(pointLabelOpts);\r\n\r\n\tctx.save();\r\n\r\n\tctx.font = plFont.string;\r\n\tctx.textBaseline = 'middle';\r\n\r\n\tfor (var i = scale.chart.data.labels.length - 1; i >= 0; i--) {\r\n\t\t// Extra pixels out for some label spacing\r\n\t\tvar extra = (i === 0 ? tickBackdropHeight / 2 : 0);\r\n\t\tvar pointLabelPosition = scale.getPointPosition(i, outerDistance + extra + 5);\r\n\r\n\t\t// Keep this in loop since we may support array properties here\r\n\t\tvar pointLabelFontColor = valueAtIndexOrDefault$1(pointLabelOpts.fontColor, i, core_defaults.global.defaultFontColor);\r\n\t\tctx.fillStyle = pointLabelFontColor;\r\n\r\n\t\tvar angleRadians = scale.getIndexAngle(i);\r\n\t\tvar angle = helpers$1.toDegrees(angleRadians);\r\n\t\tctx.textAlign = getTextAlignForAngle(angle);\r\n\t\tadjustPointPositionForLabelHeight(angle, scale._pointLabelSizes[i], pointLabelPosition);\r\n\t\tfillText(ctx, scale.pointLabels[i], pointLabelPosition, plFont.lineHeight);\r\n\t}\r\n\tctx.restore();\r\n}\r\n\r\nfunction drawRadiusLine(scale, gridLineOpts, radius, index) {\r\n\tvar ctx = scale.ctx;\r\n\tvar circular = gridLineOpts.circular;\r\n\tvar valueCount = scale.chart.data.labels.length;\r\n\tvar lineColor = valueAtIndexOrDefault$1(gridLineOpts.color, index - 1);\r\n\tvar lineWidth = valueAtIndexOrDefault$1(gridLineOpts.lineWidth, index - 1);\r\n\tvar pointPosition;\r\n\r\n\tif ((!circular && !valueCount) || !lineColor || !lineWidth) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tctx.save();\r\n\tctx.strokeStyle = lineColor;\r\n\tctx.lineWidth = lineWidth;\r\n\tif (ctx.setLineDash) {\r\n\t\tctx.setLineDash(gridLineOpts.borderDash || []);\r\n\t\tctx.lineDashOffset = gridLineOpts.borderDashOffset || 0.0;\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tif (circular) {\r\n\t\t// Draw circular arcs between the points\r\n\t\tctx.arc(scale.xCenter, scale.yCenter, radius, 0, Math.PI * 2);\r\n\t} else {\r\n\t\t// Draw straight lines connecting each index\r\n\t\tpointPosition = scale.getPointPosition(0, radius);\r\n\t\tctx.moveTo(pointPosition.x, pointPosition.y);\r\n\r\n\t\tfor (var i = 1; i < valueCount; i++) {\r\n\t\t\tpointPosition = scale.getPointPosition(i, radius);\r\n\t\t\tctx.lineTo(pointPosition.x, pointPosition.y);\r\n\t\t}\r\n\t}\r\n\tctx.closePath();\r\n\tctx.stroke();\r\n\tctx.restore();\r\n}\r\n\r\nfunction numberOrZero(param) {\r\n\treturn helpers$1.isNumber(param) ? param : 0;\r\n}\r\n\r\nvar scale_radialLinear = scale_linearbase.extend({\r\n\tsetDimensions: function() {\r\n\t\tvar me = this;\r\n\r\n\t\t// Set the unconstrained dimension before label rotation\r\n\t\tme.width = me.maxWidth;\r\n\t\tme.height = me.maxHeight;\r\n\t\tme.paddingTop = getTickBackdropHeight(me.options) / 2;\r\n\t\tme.xCenter = Math.floor(me.width / 2);\r\n\t\tme.yCenter = Math.floor((me.height - me.paddingTop) / 2);\r\n\t\tme.drawingArea = Math.min(me.height - me.paddingTop, me.width) / 2;\r\n\t},\r\n\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar min = Number.POSITIVE_INFINITY;\r\n\t\tvar max = Number.NEGATIVE_INFINITY;\r\n\r\n\t\thelpers$1.each(chart.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\tif (chart.isDatasetVisible(datasetIndex)) {\r\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\r\n\r\n\t\t\t\thelpers$1.each(dataset.data, function(rawValue, index) {\r\n\t\t\t\t\tvar value = +me.getRightValue(rawValue);\r\n\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tmin = Math.min(value, min);\r\n\t\t\t\t\tmax = Math.max(value, max);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tme.min = (min === Number.POSITIVE_INFINITY ? 0 : min);\r\n\t\tme.max = (max === Number.NEGATIVE_INFINITY ? 0 : max);\r\n\r\n\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\r\n\t\tme.handleTickRangeOptions();\r\n\t},\r\n\r\n\t// Returns the maximum number of ticks based on the scale dimension\r\n\t_computeTickLimit: function() {\r\n\t\treturn Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\r\n\t},\r\n\r\n\tconvertTicksToLabels: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tscale_linearbase.prototype.convertTicksToLabels.call(me);\r\n\r\n\t\t// Point labels\r\n\t\tme.pointLabels = me.chart.data.labels.map(function() {\r\n\t\t\tvar label = helpers$1.callback(me.options.pointLabels.callback, arguments, me);\r\n\t\t\treturn label || label === 0 ? label : '';\r\n\t\t});\r\n\t},\r\n\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\r\n\t},\r\n\r\n\tfit: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\r\n\t\tif (opts.display && opts.pointLabels.display) {\r\n\t\t\tfitWithPointLabels(me);\r\n\t\t} else {\r\n\t\t\tme.setCenterPoint(0, 0, 0, 0);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Set radius reductions and determine new radius and center point\r\n\t * @private\r\n\t */\r\n\tsetReductions: function(largestPossibleRadius, furthestLimits, furthestAngles) {\r\n\t\tvar me = this;\r\n\t\tvar radiusReductionLeft = furthestLimits.l / Math.sin(furthestAngles.l);\r\n\t\tvar radiusReductionRight = Math.max(furthestLimits.r - me.width, 0) / Math.sin(furthestAngles.r);\r\n\t\tvar radiusReductionTop = -furthestLimits.t / Math.cos(furthestAngles.t);\r\n\t\tvar radiusReductionBottom = -Math.max(furthestLimits.b - (me.height - me.paddingTop), 0) / Math.cos(furthestAngles.b);\r\n\r\n\t\tradiusReductionLeft = numberOrZero(radiusReductionLeft);\r\n\t\tradiusReductionRight = numberOrZero(radiusReductionRight);\r\n\t\tradiusReductionTop = numberOrZero(radiusReductionTop);\r\n\t\tradiusReductionBottom = numberOrZero(radiusReductionBottom);\r\n\r\n\t\tme.drawingArea = Math.min(\r\n\t\t\tMath.floor(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2),\r\n\t\t\tMath.floor(largestPossibleRadius - (radiusReductionTop + radiusReductionBottom) / 2));\r\n\t\tme.setCenterPoint(radiusReductionLeft, radiusReductionRight, radiusReductionTop, radiusReductionBottom);\r\n\t},\r\n\r\n\tsetCenterPoint: function(leftMovement, rightMovement, topMovement, bottomMovement) {\r\n\t\tvar me = this;\r\n\t\tvar maxRight = me.width - rightMovement - me.drawingArea;\r\n\t\tvar maxLeft = leftMovement + me.drawingArea;\r\n\t\tvar maxTop = topMovement + me.drawingArea;\r\n\t\tvar maxBottom = (me.height - me.paddingTop) - bottomMovement - me.drawingArea;\r\n\r\n\t\tme.xCenter = Math.floor(((maxLeft + maxRight) / 2) + me.left);\r\n\t\tme.yCenter = Math.floor(((maxTop + maxBottom) / 2) + me.top + me.paddingTop);\r\n\t},\r\n\r\n\tgetIndexAngle: function(index) {\r\n\t\tvar chart = this.chart;\r\n\t\tvar angleMultiplier = 360 / chart.data.labels.length;\r\n\t\tvar options = chart.options || {};\r\n\t\tvar startAngle = options.startAngle || 0;\r\n\r\n\t\t// Start from the top instead of right, so remove a quarter of the circle\r\n\t\tvar angle = (index * angleMultiplier + startAngle) % 360;\r\n\r\n\t\treturn (angle < 0 ? angle + 360 : angle) * Math.PI * 2 / 360;\r\n\t},\r\n\r\n\tgetDistanceFromCenterForValue: function(value) {\r\n\t\tvar me = this;\r\n\r\n\t\tif (helpers$1.isNullOrUndef(value)) {\r\n\t\t\treturn NaN;\r\n\t\t}\r\n\r\n\t\t// Take into account half font size + the yPadding of the top value\r\n\t\tvar scalingFactor = me.drawingArea / (me.max - me.min);\r\n\t\tif (me.options.ticks.reverse) {\r\n\t\t\treturn (me.max - value) * scalingFactor;\r\n\t\t}\r\n\t\treturn (value - me.min) * scalingFactor;\r\n\t},\r\n\r\n\tgetPointPosition: function(index, distanceFromCenter) {\r\n\t\tvar me = this;\r\n\t\tvar thisAngle = me.getIndexAngle(index) - (Math.PI / 2);\r\n\t\treturn {\r\n\t\t\tx: Math.cos(thisAngle) * distanceFromCenter + me.xCenter,\r\n\t\t\ty: Math.sin(thisAngle) * distanceFromCenter + me.yCenter\r\n\t\t};\r\n\t},\r\n\r\n\tgetPointPositionForValue: function(index, value) {\r\n\t\treturn this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\r\n\t},\r\n\r\n\tgetBasePosition: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar min = me.min;\r\n\t\tvar max = me.max;\r\n\r\n\t\treturn me.getPointPositionForValue(index || 0,\r\n\t\t\tme.beginAtZero ? 0 :\r\n\t\t\tmin < 0 && max < 0 ? max :\r\n\t\t\tmin > 0 && max > 0 ? min :\r\n\t\t\t0);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawGrid: function() {\r\n\t\tvar me = this;\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar opts = me.options;\r\n\t\tvar gridLineOpts = opts.gridLines;\r\n\t\tvar angleLineOpts = opts.angleLines;\r\n\t\tvar lineWidth = valueOrDefault$c(angleLineOpts.lineWidth, gridLineOpts.lineWidth);\r\n\t\tvar lineColor = valueOrDefault$c(angleLineOpts.color, gridLineOpts.color);\r\n\t\tvar i, offset, position;\r\n\r\n\t\tif (opts.pointLabels.display) {\r\n\t\t\tdrawPointLabels(me);\r\n\t\t}\r\n\r\n\t\tif (gridLineOpts.display) {\r\n\t\t\thelpers$1.each(me.ticks, function(label, index) {\r\n\t\t\t\tif (index !== 0) {\r\n\t\t\t\t\toffset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);\r\n\t\t\t\t\tdrawRadiusLine(me, gridLineOpts, offset, index);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (angleLineOpts.display && lineWidth && lineColor) {\r\n\t\t\tctx.save();\r\n\t\t\tctx.lineWidth = lineWidth;\r\n\t\t\tctx.strokeStyle = lineColor;\r\n\t\t\tif (ctx.setLineDash) {\r\n\t\t\t\tctx.setLineDash(resolve$4([angleLineOpts.borderDash, gridLineOpts.borderDash, []]));\r\n\t\t\t\tctx.lineDashOffset = resolve$4([angleLineOpts.borderDashOffset, gridLineOpts.borderDashOffset, 0.0]);\r\n\t\t\t}\r\n\r\n\t\t\tfor (i = me.chart.data.labels.length - 1; i >= 0; i--) {\r\n\t\t\t\toffset = me.getDistanceFromCenterForValue(opts.ticks.reverse ? me.min : me.max);\r\n\t\t\t\tposition = me.getPointPosition(i, offset);\r\n\t\t\t\tctx.beginPath();\r\n\t\t\t\tctx.moveTo(me.xCenter, me.yCenter);\r\n\t\t\t\tctx.lineTo(position.x, position.y);\r\n\t\t\t\tctx.stroke();\r\n\t\t\t}\r\n\r\n\t\t\tctx.restore();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawLabels: function() {\r\n\t\tvar me = this;\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar opts = me.options;\r\n\t\tvar tickOpts = opts.ticks;\r\n\r\n\t\tif (!tickOpts.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar startAngle = me.getIndexAngle(0);\r\n\t\tvar tickFont = helpers$1.options._parseFont(tickOpts);\r\n\t\tvar tickFontColor = valueOrDefault$c(tickOpts.fontColor, core_defaults.global.defaultFontColor);\r\n\t\tvar offset, width;\r\n\r\n\t\tctx.save();\r\n\t\tctx.font = tickFont.string;\r\n\t\tctx.translate(me.xCenter, me.yCenter);\r\n\t\tctx.rotate(startAngle);\r\n\t\tctx.textAlign = 'center';\r\n\t\tctx.textBaseline = 'middle';\r\n\r\n\t\thelpers$1.each(me.ticks, function(label, index) {\r\n\t\t\tif (index === 0 && !tickOpts.reverse) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\toffset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);\r\n\r\n\t\t\tif (tickOpts.showLabelBackdrop) {\r\n\t\t\t\twidth = ctx.measureText(label).width;\r\n\t\t\t\tctx.fillStyle = tickOpts.backdropColor;\r\n\r\n\t\t\t\tctx.fillRect(\r\n\t\t\t\t\t-width / 2 - tickOpts.backdropPaddingX,\r\n\t\t\t\t\t-offset - tickFont.size / 2 - tickOpts.backdropPaddingY,\r\n\t\t\t\t\twidth + tickOpts.backdropPaddingX * 2,\r\n\t\t\t\t\ttickFont.size + tickOpts.backdropPaddingY * 2\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tctx.fillStyle = tickFontColor;\r\n\t\t\tctx.fillText(label, 0, -offset);\r\n\t\t});\r\n\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawTitle: helpers$1.noop\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults$3 = defaultConfig$3;\nscale_radialLinear._defaults = _defaults$3;\n\nvar deprecated$1 = helpers$1._deprecated;\r\nvar resolve$5 = helpers$1.options.resolve;\r\nvar valueOrDefault$d = helpers$1.valueOrDefault;\r\n\r\n// Integer constants are from the ES6 spec.\r\nvar MIN_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991;\r\nvar MAX_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;\r\n\r\nvar INTERVALS = {\r\n\tmillisecond: {\r\n\t\tcommon: true,\r\n\t\tsize: 1,\r\n\t\tsteps: 1000\r\n\t},\r\n\tsecond: {\r\n\t\tcommon: true,\r\n\t\tsize: 1000,\r\n\t\tsteps: 60\r\n\t},\r\n\tminute: {\r\n\t\tcommon: true,\r\n\t\tsize: 60000,\r\n\t\tsteps: 60\r\n\t},\r\n\thour: {\r\n\t\tcommon: true,\r\n\t\tsize: 3600000,\r\n\t\tsteps: 24\r\n\t},\r\n\tday: {\r\n\t\tcommon: true,\r\n\t\tsize: 86400000,\r\n\t\tsteps: 30\r\n\t},\r\n\tweek: {\r\n\t\tcommon: false,\r\n\t\tsize: 604800000,\r\n\t\tsteps: 4\r\n\t},\r\n\tmonth: {\r\n\t\tcommon: true,\r\n\t\tsize: 2.628e9,\r\n\t\tsteps: 12\r\n\t},\r\n\tquarter: {\r\n\t\tcommon: false,\r\n\t\tsize: 7.884e9,\r\n\t\tsteps: 4\r\n\t},\r\n\tyear: {\r\n\t\tcommon: true,\r\n\t\tsize: 3.154e10\r\n\t}\r\n};\r\n\r\nvar UNITS = Object.keys(INTERVALS);\r\n\r\nfunction sorter(a, b) {\r\n\treturn a - b;\r\n}\r\n\r\nfunction arrayUnique(items) {\r\n\tvar hash = {};\r\n\tvar out = [];\r\n\tvar i, ilen, item;\r\n\r\n\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\r\n\t\titem = items[i];\r\n\t\tif (!hash[item]) {\r\n\t\t\thash[item] = true;\r\n\t\t\tout.push(item);\r\n\t\t}\r\n\t}\r\n\r\n\treturn out;\r\n}\r\n\r\nfunction getMin(options) {\r\n\treturn helpers$1.valueOrDefault(options.time.min, options.ticks.min);\r\n}\r\n\r\nfunction getMax(options) {\r\n\treturn helpers$1.valueOrDefault(options.time.max, options.ticks.max);\r\n}\r\n\r\n/**\r\n * Returns an array of {time, pos} objects used to interpolate a specific `time` or position\r\n * (`pos`) on the scale, by searching entries before and after the requested value. `pos` is\r\n * a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other\r\n * extremity (left + width or top + height). Note that it would be more optimized to directly\r\n * store pre-computed pixels, but the scale dimensions are not guaranteed at the time we need\r\n * to create the lookup table. The table ALWAYS contains at least two items: min and max.\r\n *\r\n * @param {number[]} timestamps - timestamps sorted from lowest to highest.\r\n * @param {string} distribution - If 'linear', timestamps will be spread linearly along the min\r\n * and max range, so basically, the table will contains only two items: {min, 0} and {max, 1}.\r\n * If 'series', timestamps will be positioned at the same distance from each other. In this\r\n * case, only timestamps that break the time linearity are registered, meaning that in the\r\n * best case, all timestamps are linear, the table contains only min and max.\r\n */\r\nfunction buildLookupTable(timestamps, min, max, distribution) {\r\n\tif (distribution === 'linear' || !timestamps.length) {\r\n\t\treturn [\r\n\t\t\t{time: min, pos: 0},\r\n\t\t\t{time: max, pos: 1}\r\n\t\t];\r\n\t}\r\n\r\n\tvar table = [];\r\n\tvar items = [min];\r\n\tvar i, ilen, prev, curr, next;\r\n\r\n\tfor (i = 0, ilen = timestamps.length; i < ilen; ++i) {\r\n\t\tcurr = timestamps[i];\r\n\t\tif (curr > min && curr < max) {\r\n\t\t\titems.push(curr);\r\n\t\t}\r\n\t}\r\n\r\n\titems.push(max);\r\n\r\n\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\r\n\t\tnext = items[i + 1];\r\n\t\tprev = items[i - 1];\r\n\t\tcurr = items[i];\r\n\r\n\t\t// only add points that breaks the scale linearity\r\n\t\tif (prev === undefined || next === undefined || Math.round((next + prev) / 2) !== curr) {\r\n\t\t\ttable.push({time: curr, pos: i / (ilen - 1)});\r\n\t\t}\r\n\t}\r\n\r\n\treturn table;\r\n}\r\n\r\n// @see adapted from https://www.anujgakhar.com/2014/03/01/binary-search-in-javascript/\r\nfunction lookup(table, key, value) {\r\n\tvar lo = 0;\r\n\tvar hi = table.length - 1;\r\n\tvar mid, i0, i1;\r\n\r\n\twhile (lo >= 0 && lo <= hi) {\r\n\t\tmid = (lo + hi) >> 1;\r\n\t\ti0 = table[mid - 1] || null;\r\n\t\ti1 = table[mid];\r\n\r\n\t\tif (!i0) {\r\n\t\t\t// given value is outside table (before first item)\r\n\t\t\treturn {lo: null, hi: i1};\r\n\t\t} else if (i1[key] < value) {\r\n\t\t\tlo = mid + 1;\r\n\t\t} else if (i0[key] > value) {\r\n\t\t\thi = mid - 1;\r\n\t\t} else {\r\n\t\t\treturn {lo: i0, hi: i1};\r\n\t\t}\r\n\t}\r\n\r\n\t// given value is outside table (after last item)\r\n\treturn {lo: i1, hi: null};\r\n}\r\n\r\n/**\r\n * Linearly interpolates the given source `value` using the table items `skey` values and\r\n * returns the associated `tkey` value. For example, interpolate(table, 'time', 42, 'pos')\r\n * returns the position for a timestamp equal to 42. If value is out of bounds, values at\r\n * index [0, 1] or [n - 1, n] are used for the interpolation.\r\n */\r\nfunction interpolate$1(table, skey, sval, tkey) {\r\n\tvar range = lookup(table, skey, sval);\r\n\r\n\t// Note: the lookup table ALWAYS contains at least 2 items (min and max)\r\n\tvar prev = !range.lo ? table[0] : !range.hi ? table[table.length - 2] : range.lo;\r\n\tvar next = !range.lo ? table[1] : !range.hi ? table[table.length - 1] : range.hi;\r\n\r\n\tvar span = next[skey] - prev[skey];\r\n\tvar ratio = span ? (sval - prev[skey]) / span : 0;\r\n\tvar offset = (next[tkey] - prev[tkey]) * ratio;\r\n\r\n\treturn prev[tkey] + offset;\r\n}\r\n\r\nfunction toTimestamp(scale, input) {\r\n\tvar adapter = scale._adapter;\r\n\tvar options = scale.options.time;\r\n\tvar parser = options.parser;\r\n\tvar format = parser || options.format;\r\n\tvar value = input;\r\n\r\n\tif (typeof parser === 'function') {\r\n\t\tvalue = parser(value);\r\n\t}\r\n\r\n\t// Only parse if its not a timestamp already\r\n\tif (!helpers$1.isFinite(value)) {\r\n\t\tvalue = typeof format === 'string'\r\n\t\t\t? adapter.parse(value, format)\r\n\t\t\t: adapter.parse(value);\r\n\t}\r\n\r\n\tif (value !== null) {\r\n\t\treturn +value;\r\n\t}\r\n\r\n\t// Labels are in an incompatible format and no `parser` has been provided.\r\n\t// The user might still use the deprecated `format` option for parsing.\r\n\tif (!parser && typeof format === 'function') {\r\n\t\tvalue = format(input);\r\n\r\n\t\t// `format` could return something else than a timestamp, if so, parse it\r\n\t\tif (!helpers$1.isFinite(value)) {\r\n\t\t\tvalue = adapter.parse(value);\r\n\t\t}\r\n\t}\r\n\r\n\treturn value;\r\n}\r\n\r\nfunction parse(scale, input) {\r\n\tif (helpers$1.isNullOrUndef(input)) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar options = scale.options.time;\r\n\tvar value = toTimestamp(scale, scale.getRightValue(input));\r\n\tif (value === null) {\r\n\t\treturn value;\r\n\t}\r\n\r\n\tif (options.round) {\r\n\t\tvalue = +scale._adapter.startOf(value, options.round);\r\n\t}\r\n\r\n\treturn value;\r\n}\r\n\r\n/**\r\n * Figures out what unit results in an appropriate number of auto-generated ticks\r\n */\r\nfunction determineUnitForAutoTicks(minUnit, min, max, capacity) {\r\n\tvar ilen = UNITS.length;\r\n\tvar i, interval, factor;\r\n\r\n\tfor (i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {\r\n\t\tinterval = INTERVALS[UNITS[i]];\r\n\t\tfactor = interval.steps ? interval.steps : MAX_INTEGER;\r\n\r\n\t\tif (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {\r\n\t\t\treturn UNITS[i];\r\n\t\t}\r\n\t}\r\n\r\n\treturn UNITS[ilen - 1];\r\n}\r\n\r\n/**\r\n * Figures out what unit to format a set of ticks with\r\n */\r\nfunction determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\r\n\tvar i, unit;\r\n\r\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\r\n\t\tunit = UNITS[i];\r\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\r\n\t\t\treturn unit;\r\n\t\t}\r\n\t}\r\n\r\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\r\n}\r\n\r\nfunction determineMajorUnit(unit) {\r\n\tfor (var i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {\r\n\t\tif (INTERVALS[UNITS[i]].common) {\r\n\t\t\treturn UNITS[i];\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Generates a maximum of `capacity` timestamps between min and max, rounded to the\r\n * `minor` unit using the given scale time `options`.\r\n * Important: this method can return ticks outside the min and max range, it's the\r\n * responsibility of the calling code to clamp values if needed.\r\n */\r\nfunction generate(scale, min, max, capacity) {\r\n\tvar adapter = scale._adapter;\r\n\tvar options = scale.options;\r\n\tvar timeOpts = options.time;\r\n\tvar minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, capacity);\r\n\tvar stepSize = resolve$5([timeOpts.stepSize, timeOpts.unitStepSize, 1]);\r\n\tvar weekday = minor === 'week' ? timeOpts.isoWeekday : false;\r\n\tvar first = min;\r\n\tvar ticks = [];\r\n\tvar time;\r\n\r\n\t// For 'week' unit, handle the first day of week option\r\n\tif (weekday) {\r\n\t\tfirst = +adapter.startOf(first, 'isoWeek', weekday);\r\n\t}\r\n\r\n\t// Align first ticks on unit\r\n\tfirst = +adapter.startOf(first, weekday ? 'day' : minor);\r\n\r\n\t// Prevent browser from freezing in case user options request millions of milliseconds\r\n\tif (adapter.diff(max, min, minor) > 100000 * stepSize) {\r\n\t\tthrow min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor;\r\n\t}\r\n\r\n\tfor (time = first; time < max; time = +adapter.add(time, stepSize, minor)) {\r\n\t\tticks.push(time);\r\n\t}\r\n\r\n\tif (time === max || options.bounds === 'ticks') {\r\n\t\tticks.push(time);\r\n\t}\r\n\r\n\treturn ticks;\r\n}\r\n\r\n/**\r\n * Returns the start and end offsets from edges in the form of {start, end}\r\n * where each value is a relative width to the scale and ranges between 0 and 1.\r\n * They add extra margins on the both sides by scaling down the original scale.\r\n * Offsets are added when the `offset` option is true.\r\n */\r\nfunction computeOffsets(table, ticks, min, max, options) {\r\n\tvar start = 0;\r\n\tvar end = 0;\r\n\tvar first, last;\r\n\r\n\tif (options.offset && ticks.length) {\r\n\t\tfirst = interpolate$1(table, 'time', ticks[0], 'pos');\r\n\t\tif (ticks.length === 1) {\r\n\t\t\tstart = 1 - first;\r\n\t\t} else {\r\n\t\t\tstart = (interpolate$1(table, 'time', ticks[1], 'pos') - first) / 2;\r\n\t\t}\r\n\t\tlast = interpolate$1(table, 'time', ticks[ticks.length - 1], 'pos');\r\n\t\tif (ticks.length === 1) {\r\n\t\t\tend = last;\r\n\t\t} else {\r\n\t\t\tend = (last - interpolate$1(table, 'time', ticks[ticks.length - 2], 'pos')) / 2;\r\n\t\t}\r\n\t}\r\n\r\n\treturn {start: start, end: end, factor: 1 / (start + 1 + end)};\r\n}\r\n\r\nfunction setMajorTicks(scale, ticks, map, majorUnit) {\r\n\tvar adapter = scale._adapter;\r\n\tvar first = +adapter.startOf(ticks[0].value, majorUnit);\r\n\tvar last = ticks[ticks.length - 1].value;\r\n\tvar major, index;\r\n\r\n\tfor (major = first; major <= last; major = +adapter.add(major, 1, majorUnit)) {\r\n\t\tindex = map[major];\r\n\t\tif (index >= 0) {\r\n\t\t\tticks[index].major = true;\r\n\t\t}\r\n\t}\r\n\treturn ticks;\r\n}\r\n\r\nfunction ticksFromTimestamps(scale, values, majorUnit) {\r\n\tvar ticks = [];\r\n\tvar map = {};\r\n\tvar ilen = values.length;\r\n\tvar i, value;\r\n\r\n\tfor (i = 0; i < ilen; ++i) {\r\n\t\tvalue = values[i];\r\n\t\tmap[value] = i;\r\n\r\n\t\tticks.push({\r\n\t\t\tvalue: value,\r\n\t\t\tmajor: false\r\n\t\t});\r\n\t}\r\n\r\n\t// We set the major ticks separately from the above loop because calling startOf for every tick\r\n\t// is expensive when there is a large number of ticks\r\n\treturn (ilen === 0 || !majorUnit) ? ticks : setMajorTicks(scale, ticks, map, majorUnit);\r\n}\r\n\r\nvar defaultConfig$4 = {\r\n\tposition: 'bottom',\r\n\r\n\t/**\r\n\t * Data distribution along the scale:\r\n\t * - 'linear': data are spread according to their time (distances can vary),\r\n\t * - 'series': data are spread at the same distance from each other.\r\n\t * @see https://github.com/chartjs/Chart.js/pull/4507\r\n\t * @since 2.7.0\r\n\t */\r\n\tdistribution: 'linear',\r\n\r\n\t/**\r\n\t * Scale boundary strategy (bypassed by min/max time options)\r\n\t * - `data`: make sure data are fully visible, ticks outside are removed\r\n\t * - `ticks`: make sure ticks are fully visible, data outside are truncated\r\n\t * @see https://github.com/chartjs/Chart.js/pull/4556\r\n\t * @since 2.7.0\r\n\t */\r\n\tbounds: 'data',\r\n\r\n\tadapters: {},\r\n\ttime: {\r\n\t\tparser: false, // false == a pattern string from https://momentjs.com/docs/#/parsing/string-format/ or a custom callback that converts its argument to a moment\r\n\t\tunit: false, // false == automatic or override with week, month, year, etc.\r\n\t\tround: false, // none, or override with week, month, year, etc.\r\n\t\tdisplayFormat: false, // DEPRECATED\r\n\t\tisoWeekday: false, // override week start day - see https://momentjs.com/docs/#/get-set/iso-weekday/\r\n\t\tminUnit: 'millisecond',\r\n\t\tdisplayFormats: {}\r\n\t},\r\n\tticks: {\r\n\t\tautoSkip: false,\r\n\r\n\t\t/**\r\n\t\t * Ticks generation input values:\r\n\t\t * - 'auto': generates \"optimal\" ticks based on scale size and time options.\r\n\t\t * - 'data': generates ticks from data (including labels from data {t|x|y} objects).\r\n\t\t * - 'labels': generates ticks from user given `data.labels` values ONLY.\r\n\t\t * @see https://github.com/chartjs/Chart.js/pull/4507\r\n\t\t * @since 2.7.0\r\n\t\t */\r\n\t\tsource: 'auto',\r\n\r\n\t\tmajor: {\r\n\t\t\tenabled: false\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar scale_time = core_scale.extend({\r\n\tinitialize: function() {\r\n\t\tthis.mergeTicksOptions();\r\n\t\tcore_scale.prototype.initialize.call(this);\r\n\t},\r\n\r\n\tupdate: function() {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar time = options.time || (options.time = {});\r\n\t\tvar adapter = me._adapter = new core_adapters._date(options.adapters.date);\r\n\r\n\t\t// DEPRECATIONS: output a message only one time per update\r\n\t\tdeprecated$1('time scale', time.format, 'time.format', 'time.parser');\r\n\t\tdeprecated$1('time scale', time.min, 'time.min', 'ticks.min');\r\n\t\tdeprecated$1('time scale', time.max, 'time.max', 'ticks.max');\r\n\r\n\t\t// Backward compatibility: before introducing adapter, `displayFormats` was\r\n\t\t// supposed to contain *all* unit/string pairs but this can't be resolved\r\n\t\t// when loading the scale (adapters are loaded afterward), so let's populate\r\n\t\t// missing formats on update\r\n\t\thelpers$1.mergeIf(time.displayFormats, adapter.formats());\r\n\r\n\t\treturn core_scale.prototype.update.apply(me, arguments);\r\n\t},\r\n\r\n\t/**\r\n\t * Allows data to be referenced via 't' attribute\r\n\t */\r\n\tgetRightValue: function(rawValue) {\r\n\t\tif (rawValue && rawValue.t !== undefined) {\r\n\t\t\trawValue = rawValue.t;\r\n\t\t}\r\n\t\treturn core_scale.prototype.getRightValue.call(this, rawValue);\r\n\t},\r\n\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar adapter = me._adapter;\r\n\t\tvar options = me.options;\r\n\t\tvar unit = options.time.unit || 'day';\r\n\t\tvar min = MAX_INTEGER;\r\n\t\tvar max = MIN_INTEGER;\r\n\t\tvar timestamps = [];\r\n\t\tvar datasets = [];\r\n\t\tvar labels = [];\r\n\t\tvar i, j, ilen, jlen, data, timestamp, labelsAdded;\r\n\t\tvar dataLabels = me._getLabels();\r\n\r\n\t\tfor (i = 0, ilen = dataLabels.length; i < ilen; ++i) {\r\n\t\t\tlabels.push(parse(me, dataLabels[i]));\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\tif (chart.isDatasetVisible(i)) {\r\n\t\t\t\tdata = chart.data.datasets[i].data;\r\n\r\n\t\t\t\t// Let's consider that all data have the same format.\r\n\t\t\t\tif (helpers$1.isObject(data[0])) {\r\n\t\t\t\t\tdatasets[i] = [];\r\n\r\n\t\t\t\t\tfor (j = 0, jlen = data.length; j < jlen; ++j) {\r\n\t\t\t\t\t\ttimestamp = parse(me, data[j]);\r\n\t\t\t\t\t\ttimestamps.push(timestamp);\r\n\t\t\t\t\t\tdatasets[i][j] = timestamp;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdatasets[i] = labels.slice(0);\r\n\t\t\t\t\tif (!labelsAdded) {\r\n\t\t\t\t\t\ttimestamps = timestamps.concat(labels);\r\n\t\t\t\t\t\tlabelsAdded = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdatasets[i] = [];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (labels.length) {\r\n\t\t\tmin = Math.min(min, labels[0]);\r\n\t\t\tmax = Math.max(max, labels[labels.length - 1]);\r\n\t\t}\r\n\r\n\t\tif (timestamps.length) {\r\n\t\t\ttimestamps = ilen > 1 ? arrayUnique(timestamps).sort(sorter) : timestamps.sort(sorter);\r\n\t\t\tmin = Math.min(min, timestamps[0]);\r\n\t\t\tmax = Math.max(max, timestamps[timestamps.length - 1]);\r\n\t\t}\r\n\r\n\t\tmin = parse(me, getMin(options)) || min;\r\n\t\tmax = parse(me, getMax(options)) || max;\r\n\r\n\t\t// In case there is no valid min/max, set limits based on unit time option\r\n\t\tmin = min === MAX_INTEGER ? +adapter.startOf(Date.now(), unit) : min;\r\n\t\tmax = max === MIN_INTEGER ? +adapter.endOf(Date.now(), unit) + 1 : max;\r\n\r\n\t\t// Make sure that max is strictly higher than min (required by the lookup table)\r\n\t\tme.min = Math.min(min, max);\r\n\t\tme.max = Math.max(min + 1, max);\r\n\r\n\t\t// PRIVATE\r\n\t\tme._table = [];\r\n\t\tme._timestamps = {\r\n\t\t\tdata: timestamps,\r\n\t\t\tdatasets: datasets,\r\n\t\t\tlabels: labels\r\n\t\t};\r\n\t},\r\n\r\n\tbuildTicks: function() {\r\n\t\tvar me = this;\r\n\t\tvar min = me.min;\r\n\t\tvar max = me.max;\r\n\t\tvar options = me.options;\r\n\t\tvar tickOpts = options.ticks;\r\n\t\tvar timeOpts = options.time;\r\n\t\tvar timestamps = me._timestamps;\r\n\t\tvar ticks = [];\r\n\t\tvar capacity = me.getLabelCapacity(min);\r\n\t\tvar source = tickOpts.source;\r\n\t\tvar distribution = options.distribution;\r\n\t\tvar i, ilen, timestamp;\r\n\r\n\t\tif (source === 'data' || (source === 'auto' && distribution === 'series')) {\r\n\t\t\ttimestamps = timestamps.data;\r\n\t\t} else if (source === 'labels') {\r\n\t\t\ttimestamps = timestamps.labels;\r\n\t\t} else {\r\n\t\t\ttimestamps = generate(me, min, max, capacity);\r\n\t\t}\r\n\r\n\t\tif (options.bounds === 'ticks' && timestamps.length) {\r\n\t\t\tmin = timestamps[0];\r\n\t\t\tmax = timestamps[timestamps.length - 1];\r\n\t\t}\r\n\r\n\t\t// Enforce limits with user min/max options\r\n\t\tmin = parse(me, getMin(options)) || min;\r\n\t\tmax = parse(me, getMax(options)) || max;\r\n\r\n\t\t// Remove ticks outside the min/max range\r\n\t\tfor (i = 0, ilen = timestamps.length; i < ilen; ++i) {\r\n\t\t\ttimestamp = timestamps[i];\r\n\t\t\tif (timestamp >= min && timestamp <= max) {\r\n\t\t\t\tticks.push(timestamp);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.min = min;\r\n\t\tme.max = max;\r\n\r\n\t\t// PRIVATE\r\n\t\t// determineUnitForFormatting relies on the number of ticks so we don't use it when\r\n\t\t// autoSkip is enabled because we don't yet know what the final number of ticks will be\r\n\t\tme._unit = timeOpts.unit || (tickOpts.autoSkip\r\n\t\t\t? determineUnitForAutoTicks(timeOpts.minUnit, me.min, me.max, capacity)\r\n\t\t\t: determineUnitForFormatting(me, ticks.length, timeOpts.minUnit, me.min, me.max));\r\n\t\tme._majorUnit = !tickOpts.major.enabled || me._unit === 'year' ? undefined\r\n\t\t\t: determineMajorUnit(me._unit);\r\n\t\tme._table = buildLookupTable(me._timestamps.data, min, max, distribution);\r\n\t\tme._offsets = computeOffsets(me._table, ticks, min, max, options);\r\n\r\n\t\tif (tickOpts.reverse) {\r\n\t\t\tticks.reverse();\r\n\t\t}\r\n\r\n\t\treturn ticksFromTimestamps(me, ticks, me._majorUnit);\r\n\t},\r\n\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar adapter = me._adapter;\r\n\t\tvar data = me.chart.data;\r\n\t\tvar timeOpts = me.options.time;\r\n\t\tvar label = data.labels && index < data.labels.length ? data.labels[index] : '';\r\n\t\tvar value = data.datasets[datasetIndex].data[index];\r\n\r\n\t\tif (helpers$1.isObject(value)) {\r\n\t\t\tlabel = me.getRightValue(value);\r\n\t\t}\r\n\t\tif (timeOpts.tooltipFormat) {\r\n\t\t\treturn adapter.format(toTimestamp(me, label), timeOpts.tooltipFormat);\r\n\t\t}\r\n\t\tif (typeof label === 'string') {\r\n\t\t\treturn label;\r\n\t\t}\r\n\t\treturn adapter.format(toTimestamp(me, label), timeOpts.displayFormats.datetime);\r\n\t},\r\n\r\n\t/**\r\n\t * Function to format an individual tick mark\r\n\t * @private\r\n\t */\r\n\ttickFormatFunction: function(time, index, ticks, format) {\r\n\t\tvar me = this;\r\n\t\tvar adapter = me._adapter;\r\n\t\tvar options = me.options;\r\n\t\tvar formats = options.time.displayFormats;\r\n\t\tvar minorFormat = formats[me._unit];\r\n\t\tvar majorUnit = me._majorUnit;\r\n\t\tvar majorFormat = formats[majorUnit];\r\n\t\tvar tick = ticks[index];\r\n\t\tvar tickOpts = options.ticks;\r\n\t\tvar major = majorUnit && majorFormat && tick && tick.major;\r\n\t\tvar label = adapter.format(time, format ? format : major ? majorFormat : minorFormat);\r\n\t\tvar nestedTickOpts = major ? tickOpts.major : tickOpts.minor;\r\n\t\tvar formatter = resolve$5([\r\n\t\t\tnestedTickOpts.callback,\r\n\t\t\tnestedTickOpts.userCallback,\r\n\t\t\ttickOpts.callback,\r\n\t\t\ttickOpts.userCallback\r\n\t\t]);\r\n\r\n\t\treturn formatter ? formatter(label, index, ticks) : label;\r\n\t},\r\n\r\n\tconvertTicksToLabels: function(ticks) {\r\n\t\tvar labels = [];\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = ticks.length; i < ilen; ++i) {\r\n\t\t\tlabels.push(this.tickFormatFunction(ticks[i].value, i, ticks));\r\n\t\t}\r\n\r\n\t\treturn labels;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tgetPixelForOffset: function(time) {\r\n\t\tvar me = this;\r\n\t\tvar offsets = me._offsets;\r\n\t\tvar pos = interpolate$1(me._table, 'time', time, 'pos');\r\n\t\treturn me.getPixelForDecimal((offsets.start + pos) * offsets.factor);\r\n\t},\r\n\r\n\tgetPixelForValue: function(value, index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar time = null;\r\n\r\n\t\tif (index !== undefined && datasetIndex !== undefined) {\r\n\t\t\ttime = me._timestamps.datasets[datasetIndex][index];\r\n\t\t}\r\n\r\n\t\tif (time === null) {\r\n\t\t\ttime = parse(me, value);\r\n\t\t}\r\n\r\n\t\tif (time !== null) {\r\n\t\t\treturn me.getPixelForOffset(time);\r\n\t\t}\r\n\t},\r\n\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar ticks = this.getTicks();\r\n\t\treturn index >= 0 && index < ticks.length ?\r\n\t\t\tthis.getPixelForOffset(ticks[index].value) :\r\n\t\t\tnull;\r\n\t},\r\n\r\n\tgetValueForPixel: function(pixel) {\r\n\t\tvar me = this;\r\n\t\tvar offsets = me._offsets;\r\n\t\tvar pos = me.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\r\n\t\tvar time = interpolate$1(me._table, 'pos', pos, 'time');\r\n\r\n\t\t// DEPRECATION, we should return time directly\r\n\t\treturn me._adapter._create(time);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getLabelSize: function(label) {\r\n\t\tvar me = this;\r\n\t\tvar ticksOpts = me.options.ticks;\r\n\t\tvar tickLabelWidth = me.ctx.measureText(label).width;\r\n\t\tvar angle = helpers$1.toRadians(me.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);\r\n\t\tvar cosRotation = Math.cos(angle);\r\n\t\tvar sinRotation = Math.sin(angle);\r\n\t\tvar tickFontSize = valueOrDefault$d(ticksOpts.fontSize, core_defaults.global.defaultFontSize);\r\n\r\n\t\treturn {\r\n\t\t\tw: (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation),\r\n\t\t\th: (tickLabelWidth * sinRotation) + (tickFontSize * cosRotation)\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Crude approximation of what the label width might be\r\n\t * @private\r\n\t */\r\n\tgetLabelWidth: function(label) {\r\n\t\treturn this._getLabelSize(label).w;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tgetLabelCapacity: function(exampleTime) {\r\n\t\tvar me = this;\r\n\t\tvar timeOpts = me.options.time;\r\n\t\tvar displayFormats = timeOpts.displayFormats;\r\n\r\n\t\t// pick the longest format (milliseconds) for guestimation\r\n\t\tvar format = displayFormats[timeOpts.unit] || displayFormats.millisecond;\r\n\t\tvar exampleLabel = me.tickFormatFunction(exampleTime, 0, ticksFromTimestamps(me, [exampleTime], me._majorUnit), format);\r\n\t\tvar size = me._getLabelSize(exampleLabel);\r\n\t\tvar capacity = Math.floor(me.isHorizontal() ? me.width / size.w : me.height / size.h);\r\n\r\n\t\tif (me.options.offset) {\r\n\t\t\tcapacity--;\r\n\t\t}\r\n\r\n\t\treturn capacity > 0 ? capacity : 1;\r\n\t}\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults$4 = defaultConfig$4;\nscale_time._defaults = _defaults$4;\n\nvar scales = {\r\n\tcategory: scale_category,\r\n\tlinear: scale_linear,\r\n\tlogarithmic: scale_logarithmic,\r\n\tradialLinear: scale_radialLinear,\r\n\ttime: scale_time\r\n};\n\nvar FORMATS = {\r\n\tdatetime: 'MMM D, YYYY, h:mm:ss a',\r\n\tmillisecond: 'h:mm:ss.SSS a',\r\n\tsecond: 'h:mm:ss a',\r\n\tminute: 'h:mm a',\r\n\thour: 'hA',\r\n\tday: 'MMM D',\r\n\tweek: 'll',\r\n\tmonth: 'MMM YYYY',\r\n\tquarter: '[Q]Q - YYYY',\r\n\tyear: 'YYYY'\r\n};\r\n\r\ncore_adapters._date.override(typeof moment === 'function' ? {\r\n\t_id: 'moment', // DEBUG ONLY\r\n\r\n\tformats: function() {\r\n\t\treturn FORMATS;\r\n\t},\r\n\r\n\tparse: function(value, format) {\r\n\t\tif (typeof value === 'string' && typeof format === 'string') {\r\n\t\t\tvalue = moment(value, format);\r\n\t\t} else if (!(value instanceof moment)) {\r\n\t\t\tvalue = moment(value);\r\n\t\t}\r\n\t\treturn value.isValid() ? value.valueOf() : null;\r\n\t},\r\n\r\n\tformat: function(time, format) {\r\n\t\treturn moment(time).format(format);\r\n\t},\r\n\r\n\tadd: function(time, amount, unit) {\r\n\t\treturn moment(time).add(amount, unit).valueOf();\r\n\t},\r\n\r\n\tdiff: function(max, min, unit) {\r\n\t\treturn moment(max).diff(moment(min), unit);\r\n\t},\r\n\r\n\tstartOf: function(time, unit, weekday) {\r\n\t\ttime = moment(time);\r\n\t\tif (unit === 'isoWeek') {\r\n\t\t\treturn time.isoWeekday(weekday).valueOf();\r\n\t\t}\r\n\t\treturn time.startOf(unit).valueOf();\r\n\t},\r\n\r\n\tendOf: function(time, unit) {\r\n\t\treturn moment(time).endOf(unit).valueOf();\r\n\t},\r\n\r\n\t// DEPRECATIONS\r\n\r\n\t/**\r\n\t * Provided for backward compatibility with scale.getValueForPixel().\r\n\t * @deprecated since version 2.8.0\r\n\t * @todo remove at version 3\r\n\t * @private\r\n\t */\r\n\t_create: function(time) {\r\n\t\treturn moment(time);\r\n\t},\r\n} : {});\n\ncore_defaults._set('global', {\r\n\tplugins: {\r\n\t\tfiller: {\r\n\t\t\tpropagate: true\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar mappers = {\r\n\tdataset: function(source) {\r\n\t\tvar index = source.fill;\r\n\t\tvar chart = source.chart;\r\n\t\tvar meta = chart.getDatasetMeta(index);\r\n\t\tvar visible = meta && chart.isDatasetVisible(index);\r\n\t\tvar points = (visible && meta.dataset._children) || [];\r\n\t\tvar length = points.length || 0;\r\n\r\n\t\treturn !length ? null : function(point, i) {\r\n\t\t\treturn (i < length && points[i]._view) || null;\r\n\t\t};\r\n\t},\r\n\r\n\tboundary: function(source) {\r\n\t\tvar boundary = source.boundary;\r\n\t\tvar x = boundary ? boundary.x : null;\r\n\t\tvar y = boundary ? boundary.y : null;\r\n\r\n\t\tif (helpers$1.isArray(boundary)) {\r\n\t\t\treturn function(point, i) {\r\n\t\t\t\treturn boundary[i];\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn function(point) {\r\n\t\t\treturn {\r\n\t\t\t\tx: x === null ? point.x : x,\r\n\t\t\t\ty: y === null ? point.y : y,\r\n\t\t\t};\r\n\t\t};\r\n\t}\r\n};\r\n\r\n// @todo if (fill[0] === '#')\r\nfunction decodeFill(el, index, count) {\r\n\tvar model = el._model || {};\r\n\tvar fill = model.fill;\r\n\tvar target;\r\n\r\n\tif (fill === undefined) {\r\n\t\tfill = !!model.backgroundColor;\r\n\t}\r\n\r\n\tif (fill === false || fill === null) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif (fill === true) {\r\n\t\treturn 'origin';\r\n\t}\r\n\r\n\ttarget = parseFloat(fill, 10);\r\n\tif (isFinite(target) && Math.floor(target) === target) {\r\n\t\tif (fill[0] === '-' || fill[0] === '+') {\r\n\t\t\ttarget = index + target;\r\n\t\t}\r\n\r\n\t\tif (target === index || target < 0 || target >= count) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t}\r\n\r\n\tswitch (fill) {\r\n\t// compatibility\r\n\tcase 'bottom':\r\n\t\treturn 'start';\r\n\tcase 'top':\r\n\t\treturn 'end';\r\n\tcase 'zero':\r\n\t\treturn 'origin';\r\n\t// supported boundaries\r\n\tcase 'origin':\r\n\tcase 'start':\r\n\tcase 'end':\r\n\t\treturn fill;\r\n\t// invalid fill values\r\n\tdefault:\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction computeLinearBoundary(source) {\r\n\tvar model = source.el._model || {};\r\n\tvar scale = source.el._scale || {};\r\n\tvar fill = source.fill;\r\n\tvar target = null;\r\n\tvar horizontal;\r\n\r\n\tif (isFinite(fill)) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\t// Backward compatibility: until v3, we still need to support boundary values set on\r\n\t// the model (scaleTop, scaleBottom and scaleZero) because some external plugins and\r\n\t// controllers might still use it (e.g. the Smith chart).\r\n\r\n\tif (fill === 'start') {\r\n\t\ttarget = model.scaleBottom === undefined ? scale.bottom : model.scaleBottom;\r\n\t} else if (fill === 'end') {\r\n\t\ttarget = model.scaleTop === undefined ? scale.top : model.scaleTop;\r\n\t} else if (model.scaleZero !== undefined) {\r\n\t\ttarget = model.scaleZero;\r\n\t} else if (scale.getBasePixel) {\r\n\t\ttarget = scale.getBasePixel();\r\n\t}\r\n\r\n\tif (target !== undefined && target !== null) {\r\n\t\tif (target.x !== undefined && target.y !== undefined) {\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\tif (helpers$1.isFinite(target)) {\r\n\t\t\thorizontal = scale.isHorizontal();\r\n\t\t\treturn {\r\n\t\t\t\tx: horizontal ? target : null,\r\n\t\t\t\ty: horizontal ? null : target\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\treturn null;\r\n}\r\n\r\nfunction computeCircularBoundary(source) {\r\n\tvar scale = source.el._scale;\r\n\tvar options = scale.options;\r\n\tvar length = scale.chart.data.labels.length;\r\n\tvar fill = source.fill;\r\n\tvar target = [];\r\n\tvar start, end, center, i, point;\r\n\r\n\tif (!length) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tstart = options.ticks.reverse ? scale.max : scale.min;\r\n\tend = options.ticks.reverse ? scale.min : scale.max;\r\n\tcenter = scale.getPointPositionForValue(0, start);\r\n\tfor (i = 0; i < length; ++i) {\r\n\t\tpoint = fill === 'start' || fill === 'end'\r\n\t\t\t? scale.getPointPositionForValue(i, fill === 'start' ? start : end)\r\n\t\t\t: scale.getBasePosition(i);\r\n\t\tif (options.gridLines.circular) {\r\n\t\t\tpoint.cx = center.x;\r\n\t\t\tpoint.cy = center.y;\r\n\t\t\tpoint.angle = scale.getIndexAngle(i) - Math.PI / 2;\r\n\t\t}\r\n\t\ttarget.push(point);\r\n\t}\r\n\treturn target;\r\n}\r\n\r\nfunction computeBoundary(source) {\r\n\tvar scale = source.el._scale || {};\r\n\r\n\tif (scale.getPointPositionForValue) {\r\n\t\treturn computeCircularBoundary(source);\r\n\t}\r\n\treturn computeLinearBoundary(source);\r\n}\r\n\r\nfunction resolveTarget(sources, index, propagate) {\r\n\tvar source = sources[index];\r\n\tvar fill = source.fill;\r\n\tvar visited = [index];\r\n\tvar target;\r\n\r\n\tif (!propagate) {\r\n\t\treturn fill;\r\n\t}\r\n\r\n\twhile (fill !== false && visited.indexOf(fill) === -1) {\r\n\t\tif (!isFinite(fill)) {\r\n\t\t\treturn fill;\r\n\t\t}\r\n\r\n\t\ttarget = sources[fill];\r\n\t\tif (!target) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (target.visible) {\r\n\t\t\treturn fill;\r\n\t\t}\r\n\r\n\t\tvisited.push(fill);\r\n\t\tfill = target.fill;\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\nfunction createMapper(source) {\r\n\tvar fill = source.fill;\r\n\tvar type = 'dataset';\r\n\r\n\tif (fill === false) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tif (!isFinite(fill)) {\r\n\t\ttype = 'boundary';\r\n\t}\r\n\r\n\treturn mappers[type](source);\r\n}\r\n\r\nfunction isDrawable(point) {\r\n\treturn point && !point.skip;\r\n}\r\n\r\nfunction drawArea(ctx, curve0, curve1, len0, len1) {\r\n\tvar i, cx, cy, r;\r\n\r\n\tif (!len0 || !len1) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// building first area curve (normal)\r\n\tctx.moveTo(curve0[0].x, curve0[0].y);\r\n\tfor (i = 1; i < len0; ++i) {\r\n\t\thelpers$1.canvas.lineTo(ctx, curve0[i - 1], curve0[i]);\r\n\t}\r\n\r\n\tif (curve1[0].angle !== undefined) {\r\n\t\tcx = curve1[0].cx;\r\n\t\tcy = curve1[0].cy;\r\n\t\tr = Math.sqrt(Math.pow(curve1[0].x - cx, 2) + Math.pow(curve1[0].y - cy, 2));\r\n\t\tfor (i = len1 - 1; i > 0; --i) {\r\n\t\t\tctx.arc(cx, cy, r, curve1[i].angle, curve1[i - 1].angle, true);\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\t// joining the two area curves\r\n\tctx.lineTo(curve1[len1 - 1].x, curve1[len1 - 1].y);\r\n\r\n\t// building opposite area curve (reverse)\r\n\tfor (i = len1 - 1; i > 0; --i) {\r\n\t\thelpers$1.canvas.lineTo(ctx, curve1[i], curve1[i - 1], true);\r\n\t}\r\n}\r\n\r\nfunction doFill(ctx, points, mapper, view, color, loop) {\r\n\tvar count = points.length;\r\n\tvar span = view.spanGaps;\r\n\tvar curve0 = [];\r\n\tvar curve1 = [];\r\n\tvar len0 = 0;\r\n\tvar len1 = 0;\r\n\tvar i, ilen, index, p0, p1, d0, d1, loopOffset;\r\n\r\n\tctx.beginPath();\r\n\r\n\tfor (i = 0, ilen = count; i < ilen; ++i) {\r\n\t\tindex = i % count;\r\n\t\tp0 = points[index]._view;\r\n\t\tp1 = mapper(p0, index, view);\r\n\t\td0 = isDrawable(p0);\r\n\t\td1 = isDrawable(p1);\r\n\r\n\t\tif (loop && loopOffset === undefined && d0) {\r\n\t\t\tloopOffset = i + 1;\r\n\t\t\tilen = count + loopOffset;\r\n\t\t}\r\n\r\n\t\tif (d0 && d1) {\r\n\t\t\tlen0 = curve0.push(p0);\r\n\t\t\tlen1 = curve1.push(p1);\r\n\t\t} else if (len0 && len1) {\r\n\t\t\tif (!span) {\r\n\t\t\t\tdrawArea(ctx, curve0, curve1, len0, len1);\r\n\t\t\t\tlen0 = len1 = 0;\r\n\t\t\t\tcurve0 = [];\r\n\t\t\t\tcurve1 = [];\r\n\t\t\t} else {\r\n\t\t\t\tif (d0) {\r\n\t\t\t\t\tcurve0.push(p0);\r\n\t\t\t\t}\r\n\t\t\t\tif (d1) {\r\n\t\t\t\t\tcurve1.push(p1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdrawArea(ctx, curve0, curve1, len0, len1);\r\n\r\n\tctx.closePath();\r\n\tctx.fillStyle = color;\r\n\tctx.fill();\r\n}\r\n\r\nvar plugin_filler = {\r\n\tid: 'filler',\r\n\r\n\tafterDatasetsUpdate: function(chart, options) {\r\n\t\tvar count = (chart.data.datasets || []).length;\r\n\t\tvar propagate = options.propagate;\r\n\t\tvar sources = [];\r\n\t\tvar meta, i, el, source;\r\n\r\n\t\tfor (i = 0; i < count; ++i) {\r\n\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\tel = meta.dataset;\r\n\t\t\tsource = null;\r\n\r\n\t\t\tif (el && el._model && el instanceof elements.Line) {\r\n\t\t\t\tsource = {\r\n\t\t\t\t\tvisible: chart.isDatasetVisible(i),\r\n\t\t\t\t\tfill: decodeFill(el, i, count),\r\n\t\t\t\t\tchart: chart,\r\n\t\t\t\t\tel: el\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tmeta.$filler = source;\r\n\t\t\tsources.push(source);\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < count; ++i) {\r\n\t\t\tsource = sources[i];\r\n\t\t\tif (!source) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tsource.fill = resolveTarget(sources, i, propagate);\r\n\t\t\tsource.boundary = computeBoundary(source);\r\n\t\t\tsource.mapper = createMapper(source);\r\n\t\t}\r\n\t},\r\n\r\n\tbeforeDatasetsDraw: function(chart) {\r\n\t\tvar metasets = chart._getSortedVisibleDatasetMetas();\r\n\t\tvar ctx = chart.ctx;\r\n\t\tvar meta, i, el, view, points, mapper, color;\r\n\r\n\t\tfor (i = metasets.length - 1; i >= 0; --i) {\r\n\t\t\tmeta = metasets[i].$filler;\r\n\r\n\t\t\tif (!meta || !meta.visible) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tel = meta.el;\r\n\t\t\tview = el._view;\r\n\t\t\tpoints = el._children || [];\r\n\t\t\tmapper = meta.mapper;\r\n\t\t\tcolor = view.backgroundColor || core_defaults.global.defaultColor;\r\n\r\n\t\t\tif (mapper && color && points.length) {\r\n\t\t\t\thelpers$1.canvas.clipArea(ctx, chart.chartArea);\r\n\t\t\t\tdoFill(ctx, points, mapper, view, color, el._loop);\r\n\t\t\t\thelpers$1.canvas.unclipArea(ctx);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\nvar getRtlHelper$1 = helpers$1.rtl.getRtlAdapter;\r\nvar noop$1 = helpers$1.noop;\r\nvar valueOrDefault$e = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('global', {\r\n\tlegend: {\r\n\t\tdisplay: true,\r\n\t\tposition: 'top',\r\n\t\talign: 'center',\r\n\t\tfullWidth: true,\r\n\t\treverse: false,\r\n\t\tweight: 1000,\r\n\r\n\t\t// a callback that will handle\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.datasetIndex;\r\n\t\t\tvar ci = this.chart;\r\n\t\t\tvar meta = ci.getDatasetMeta(index);\r\n\r\n\t\t\t// See controller.isDatasetVisible comment\r\n\t\t\tmeta.hidden = meta.hidden === null ? !ci.data.datasets[index].hidden : null;\r\n\r\n\t\t\t// We hid a dataset ... rerender the chart\r\n\t\t\tci.update();\r\n\t\t},\r\n\r\n\t\tonHover: null,\r\n\t\tonLeave: null,\r\n\r\n\t\tlabels: {\r\n\t\t\tboxWidth: 40,\r\n\t\t\tpadding: 10,\r\n\t\t\t// Generates labels shown in the legend\r\n\t\t\t// Valid properties to return:\r\n\t\t\t// text : text to display\r\n\t\t\t// fillStyle : fill of coloured box\r\n\t\t\t// strokeStyle: stroke of coloured box\r\n\t\t\t// hidden : if this legend item refers to a hidden item\r\n\t\t\t// lineCap : cap style for line\r\n\t\t\t// lineDash\r\n\t\t\t// lineDashOffset :\r\n\t\t\t// lineJoin :\r\n\t\t\t// lineWidth :\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar datasets = chart.data.datasets;\r\n\t\t\t\tvar options = chart.options.legend || {};\r\n\t\t\t\tvar usePointStyle = options.labels && options.labels.usePointStyle;\r\n\r\n\t\t\t\treturn chart._getSortedDatasetMetas().map(function(meta) {\r\n\t\t\t\t\tvar style = meta.controller.getStyle(usePointStyle ? 0 : undefined);\r\n\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttext: datasets[meta.index].label,\r\n\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\thidden: !chart.isDatasetVisible(meta.index),\r\n\t\t\t\t\t\tlineCap: style.borderCapStyle,\r\n\t\t\t\t\t\tlineDash: style.borderDash,\r\n\t\t\t\t\t\tlineDashOffset: style.borderDashOffset,\r\n\t\t\t\t\t\tlineJoin: style.borderJoinStyle,\r\n\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\tpointStyle: style.pointStyle,\r\n\t\t\t\t\t\trotation: style.rotation,\r\n\r\n\t\t\t\t\t\t// Below is extra data used for toggling the datasets\r\n\t\t\t\t\t\tdatasetIndex: meta.index\r\n\t\t\t\t\t};\r\n\t\t\t\t}, this);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\r\n\t\tfor (i = 0, ilen = datasets.length; i < ilen; i++) {\r\n\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\tlistItemSpan.style.backgroundColor = datasets[i].backgroundColor;\r\n\t\t\tif (datasets[i].label) {\r\n\t\t\t\tlistItem.appendChild(document.createTextNode(datasets[i].label));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t}\r\n});\r\n\r\n/**\r\n * Helper function to get the box width based on the usePointStyle option\r\n * @param {object} labelopts - the label options on the legend\r\n * @param {number} fontSize - the label font size\r\n * @return {number} width of the color box area\r\n */\r\nfunction getBoxWidth(labelOpts, fontSize) {\r\n\treturn labelOpts.usePointStyle && labelOpts.boxWidth > fontSize ?\r\n\t\tfontSize :\r\n\t\tlabelOpts.boxWidth;\r\n}\r\n\r\n/**\r\n * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!\r\n */\r\nvar Legend = core_element.extend({\r\n\r\n\tinitialize: function(config) {\r\n\t\tvar me = this;\r\n\t\thelpers$1.extend(me, config);\r\n\r\n\t\t// Contains hit boxes for each dataset (in dataset order)\r\n\t\tme.legendHitBoxes = [];\r\n\r\n\t\t/**\r\n \t\t * @private\r\n \t\t */\r\n\t\tme._hoveredItem = null;\r\n\r\n\t\t// Are we in doughnut mode which has a different data type\r\n\t\tme.doughnutMode = false;\r\n\t},\r\n\r\n\t// These methods are ordered by lifecycle. Utilities then follow.\r\n\t// Any function defined here is inherited by all legend types.\r\n\t// Any function can be extended by the legend type\r\n\r\n\tbeforeUpdate: noop$1,\r\n\tupdate: function(maxWidth, maxHeight, margins) {\r\n\t\tvar me = this;\r\n\r\n\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\r\n\t\tme.beforeUpdate();\r\n\r\n\t\t// Absorb the master measurements\r\n\t\tme.maxWidth = maxWidth;\r\n\t\tme.maxHeight = maxHeight;\r\n\t\tme.margins = margins;\r\n\r\n\t\t// Dimensions\r\n\t\tme.beforeSetDimensions();\r\n\t\tme.setDimensions();\r\n\t\tme.afterSetDimensions();\r\n\t\t// Labels\r\n\t\tme.beforeBuildLabels();\r\n\t\tme.buildLabels();\r\n\t\tme.afterBuildLabels();\r\n\r\n\t\t// Fit\r\n\t\tme.beforeFit();\r\n\t\tme.fit();\r\n\t\tme.afterFit();\r\n\t\t//\r\n\t\tme.afterUpdate();\r\n\r\n\t\treturn me.minSize;\r\n\t},\r\n\tafterUpdate: noop$1,\r\n\r\n\t//\r\n\r\n\tbeforeSetDimensions: noop$1,\r\n\tsetDimensions: function() {\r\n\t\tvar me = this;\r\n\t\t// Set the unconstrained dimension before label rotation\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.width = me.maxWidth;\r\n\t\t\tme.left = 0;\r\n\t\t\tme.right = me.width;\r\n\t\t} else {\r\n\t\t\tme.height = me.maxHeight;\r\n\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.top = 0;\r\n\t\t\tme.bottom = me.height;\r\n\t\t}\r\n\r\n\t\t// Reset padding\r\n\t\tme.paddingLeft = 0;\r\n\t\tme.paddingTop = 0;\r\n\t\tme.paddingRight = 0;\r\n\t\tme.paddingBottom = 0;\r\n\r\n\t\t// Reset minSize\r\n\t\tme.minSize = {\r\n\t\t\twidth: 0,\r\n\t\t\theight: 0\r\n\t\t};\r\n\t},\r\n\tafterSetDimensions: noop$1,\r\n\r\n\t//\r\n\r\n\tbeforeBuildLabels: noop$1,\r\n\tbuildLabels: function() {\r\n\t\tvar me = this;\r\n\t\tvar labelOpts = me.options.labels || {};\r\n\t\tvar legendItems = helpers$1.callback(labelOpts.generateLabels, [me.chart], me) || [];\r\n\r\n\t\tif (labelOpts.filter) {\r\n\t\t\tlegendItems = legendItems.filter(function(item) {\r\n\t\t\t\treturn labelOpts.filter(item, me.chart.data);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (me.options.reverse) {\r\n\t\t\tlegendItems.reverse();\r\n\t\t}\r\n\r\n\t\tme.legendItems = legendItems;\r\n\t},\r\n\tafterBuildLabels: noop$1,\r\n\r\n\t//\r\n\r\n\tbeforeFit: noop$1,\r\n\tfit: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar labelOpts = opts.labels;\r\n\t\tvar display = opts.display;\r\n\r\n\t\tvar ctx = me.ctx;\r\n\r\n\t\tvar labelFont = helpers$1.options._parseFont(labelOpts);\r\n\t\tvar fontSize = labelFont.size;\r\n\r\n\t\t// Reset hit boxes\r\n\t\tvar hitboxes = me.legendHitBoxes = [];\r\n\r\n\t\tvar minSize = me.minSize;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\r\n\t\tif (isHorizontal) {\r\n\t\t\tminSize.width = me.maxWidth; // fill all the width\r\n\t\t\tminSize.height = display ? 10 : 0;\r\n\t\t} else {\r\n\t\t\tminSize.width = display ? 10 : 0;\r\n\t\t\tminSize.height = me.maxHeight; // fill all the height\r\n\t\t}\r\n\r\n\t\t// Increase sizes here\r\n\t\tif (!display) {\r\n\t\t\tme.width = minSize.width = me.height = minSize.height = 0;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tctx.font = labelFont.string;\r\n\r\n\t\tif (isHorizontal) {\r\n\t\t\t// Labels\r\n\r\n\t\t\t// Width of each line of legend boxes. Labels wrap onto multiple lines when there are too many to fit on one\r\n\t\t\tvar lineWidths = me.lineWidths = [0];\r\n\t\t\tvar totalHeight = 0;\r\n\r\n\t\t\tctx.textAlign = 'left';\r\n\t\t\tctx.textBaseline = 'middle';\r\n\r\n\t\t\thelpers$1.each(me.legendItems, function(legendItem, i) {\r\n\t\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\r\n\t\t\t\tvar width = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\r\n\r\n\t\t\t\tif (i === 0 || lineWidths[lineWidths.length - 1] + width + 2 * labelOpts.padding > minSize.width) {\r\n\t\t\t\t\ttotalHeight += fontSize + labelOpts.padding;\r\n\t\t\t\t\tlineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\r\n\t\t\t\thitboxes[i] = {\r\n\t\t\t\t\tleft: 0,\r\n\t\t\t\t\ttop: 0,\r\n\t\t\t\t\twidth: width,\r\n\t\t\t\t\theight: fontSize\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlineWidths[lineWidths.length - 1] += width + labelOpts.padding;\r\n\t\t\t});\r\n\r\n\t\t\tminSize.height += totalHeight;\r\n\r\n\t\t} else {\r\n\t\t\tvar vPadding = labelOpts.padding;\r\n\t\t\tvar columnWidths = me.columnWidths = [];\r\n\t\t\tvar columnHeights = me.columnHeights = [];\r\n\t\t\tvar totalWidth = labelOpts.padding;\r\n\t\t\tvar currentColWidth = 0;\r\n\t\t\tvar currentColHeight = 0;\r\n\r\n\t\t\thelpers$1.each(me.legendItems, function(legendItem, i) {\r\n\t\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\r\n\t\t\t\tvar itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\r\n\r\n\t\t\t\t// If too tall, go to new column\r\n\t\t\t\tif (i > 0 && currentColHeight + fontSize + 2 * vPadding > minSize.height) {\r\n\t\t\t\t\ttotalWidth += currentColWidth + labelOpts.padding;\r\n\t\t\t\t\tcolumnWidths.push(currentColWidth); // previous column width\r\n\t\t\t\t\tcolumnHeights.push(currentColHeight);\r\n\t\t\t\t\tcurrentColWidth = 0;\r\n\t\t\t\t\tcurrentColHeight = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get max width\r\n\t\t\t\tcurrentColWidth = Math.max(currentColWidth, itemWidth);\r\n\t\t\t\tcurrentColHeight += fontSize + vPadding;\r\n\r\n\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\r\n\t\t\t\thitboxes[i] = {\r\n\t\t\t\t\tleft: 0,\r\n\t\t\t\t\ttop: 0,\r\n\t\t\t\t\twidth: itemWidth,\r\n\t\t\t\t\theight: fontSize\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\ttotalWidth += currentColWidth;\r\n\t\t\tcolumnWidths.push(currentColWidth);\r\n\t\t\tcolumnHeights.push(currentColHeight);\r\n\t\t\tminSize.width += totalWidth;\r\n\t\t}\r\n\r\n\t\tme.width = minSize.width;\r\n\t\tme.height = minSize.height;\r\n\t},\r\n\tafterFit: noop$1,\r\n\r\n\t// Shared Methods\r\n\tisHorizontal: function() {\r\n\t\treturn this.options.position === 'top' || this.options.position === 'bottom';\r\n\t},\r\n\r\n\t// Actually draw the legend on the canvas\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar labelOpts = opts.labels;\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar defaultColor = globalDefaults.defaultColor;\r\n\t\tvar lineDefault = globalDefaults.elements.line;\r\n\t\tvar legendHeight = me.height;\r\n\t\tvar columnHeights = me.columnHeights;\r\n\t\tvar legendWidth = me.width;\r\n\t\tvar lineWidths = me.lineWidths;\r\n\r\n\t\tif (!opts.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar rtlHelper = getRtlHelper$1(opts.rtl, me.left, me.minSize.width);\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar fontColor = valueOrDefault$e(labelOpts.fontColor, globalDefaults.defaultFontColor);\r\n\t\tvar labelFont = helpers$1.options._parseFont(labelOpts);\r\n\t\tvar fontSize = labelFont.size;\r\n\t\tvar cursor;\r\n\r\n\t\t// Canvas setup\r\n\t\tctx.textAlign = rtlHelper.textAlign('left');\r\n\t\tctx.textBaseline = 'middle';\r\n\t\tctx.lineWidth = 0.5;\r\n\t\tctx.strokeStyle = fontColor; // for strikethrough effect\r\n\t\tctx.fillStyle = fontColor; // render in correct colour\r\n\t\tctx.font = labelFont.string;\r\n\r\n\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\r\n\t\tvar hitboxes = me.legendHitBoxes;\r\n\r\n\t\t// current position\r\n\t\tvar drawLegendBox = function(x, y, legendItem) {\r\n\t\t\tif (isNaN(boxWidth) || boxWidth <= 0) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Set the ctx for the box\r\n\t\t\tctx.save();\r\n\r\n\t\t\tvar lineWidth = valueOrDefault$e(legendItem.lineWidth, lineDefault.borderWidth);\r\n\t\t\tctx.fillStyle = valueOrDefault$e(legendItem.fillStyle, defaultColor);\r\n\t\t\tctx.lineCap = valueOrDefault$e(legendItem.lineCap, lineDefault.borderCapStyle);\r\n\t\t\tctx.lineDashOffset = valueOrDefault$e(legendItem.lineDashOffset, lineDefault.borderDashOffset);\r\n\t\t\tctx.lineJoin = valueOrDefault$e(legendItem.lineJoin, lineDefault.borderJoinStyle);\r\n\t\t\tctx.lineWidth = lineWidth;\r\n\t\t\tctx.strokeStyle = valueOrDefault$e(legendItem.strokeStyle, defaultColor);\r\n\r\n\t\t\tif (ctx.setLineDash) {\r\n\t\t\t\t// IE 9 and 10 do not support line dash\r\n\t\t\t\tctx.setLineDash(valueOrDefault$e(legendItem.lineDash, lineDefault.borderDash));\r\n\t\t\t}\r\n\r\n\t\t\tif (labelOpts && labelOpts.usePointStyle) {\r\n\t\t\t\t// Recalculate x and y for drawPoint() because its expecting\r\n\t\t\t\t// x and y to be center of figure (instead of top left)\r\n\t\t\t\tvar radius = boxWidth * Math.SQRT2 / 2;\r\n\t\t\t\tvar centerX = rtlHelper.xPlus(x, boxWidth / 2);\r\n\t\t\t\tvar centerY = y + fontSize / 2;\r\n\r\n\t\t\t\t// Draw pointStyle as legend symbol\r\n\t\t\t\thelpers$1.canvas.drawPoint(ctx, legendItem.pointStyle, radius, centerX, centerY, legendItem.rotation);\r\n\t\t\t} else {\r\n\t\t\t\t// Draw box as legend symbol\r\n\t\t\t\tctx.fillRect(rtlHelper.leftForLtr(x, boxWidth), y, boxWidth, fontSize);\r\n\t\t\t\tif (lineWidth !== 0) {\r\n\t\t\t\t\tctx.strokeRect(rtlHelper.leftForLtr(x, boxWidth), y, boxWidth, fontSize);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tctx.restore();\r\n\t\t};\r\n\r\n\t\tvar fillText = function(x, y, legendItem, textWidth) {\r\n\t\t\tvar halfFontSize = fontSize / 2;\r\n\t\t\tvar xLeft = rtlHelper.xPlus(x, boxWidth + halfFontSize);\r\n\t\t\tvar yMiddle = y + halfFontSize;\r\n\r\n\t\t\tctx.fillText(legendItem.text, xLeft, yMiddle);\r\n\r\n\t\t\tif (legendItem.hidden) {\r\n\t\t\t\t// Strikethrough the text if hidden\r\n\t\t\t\tctx.beginPath();\r\n\t\t\t\tctx.lineWidth = 2;\r\n\t\t\t\tctx.moveTo(xLeft, yMiddle);\r\n\t\t\t\tctx.lineTo(rtlHelper.xPlus(xLeft, textWidth), yMiddle);\r\n\t\t\t\tctx.stroke();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar alignmentOffset = function(dimension, blockSize) {\r\n\t\t\tswitch (opts.align) {\r\n\t\t\tcase 'start':\r\n\t\t\t\treturn labelOpts.padding;\r\n\t\t\tcase 'end':\r\n\t\t\t\treturn dimension - blockSize;\r\n\t\t\tdefault: // center\r\n\t\t\t\treturn (dimension - blockSize + labelOpts.padding) / 2;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// Horizontal\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tif (isHorizontal) {\r\n\t\t\tcursor = {\r\n\t\t\t\tx: me.left + alignmentOffset(legendWidth, lineWidths[0]),\r\n\t\t\t\ty: me.top + labelOpts.padding,\r\n\t\t\t\tline: 0\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tcursor = {\r\n\t\t\t\tx: me.left + labelOpts.padding,\r\n\t\t\t\ty: me.top + alignmentOffset(legendHeight, columnHeights[0]),\r\n\t\t\t\tline: 0\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\thelpers$1.rtl.overrideTextDirection(me.ctx, opts.textDirection);\r\n\r\n\t\tvar itemHeight = fontSize + labelOpts.padding;\r\n\t\thelpers$1.each(me.legendItems, function(legendItem, i) {\r\n\t\t\tvar textWidth = ctx.measureText(legendItem.text).width;\r\n\t\t\tvar width = boxWidth + (fontSize / 2) + textWidth;\r\n\t\t\tvar x = cursor.x;\r\n\t\t\tvar y = cursor.y;\r\n\r\n\t\t\trtlHelper.setWidth(me.minSize.width);\r\n\r\n\t\t\t// Use (me.left + me.minSize.width) and (me.top + me.minSize.height)\r\n\t\t\t// instead of me.right and me.bottom because me.width and me.height\r\n\t\t\t// may have been changed since me.minSize was calculated\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\tif (i > 0 && x + width + labelOpts.padding > me.left + me.minSize.width) {\r\n\t\t\t\t\ty = cursor.y += itemHeight;\r\n\t\t\t\t\tcursor.line++;\r\n\t\t\t\t\tx = cursor.x = me.left + alignmentOffset(legendWidth, lineWidths[cursor.line]);\r\n\t\t\t\t}\r\n\t\t\t} else if (i > 0 && y + itemHeight > me.top + me.minSize.height) {\r\n\t\t\t\tx = cursor.x = x + me.columnWidths[cursor.line] + labelOpts.padding;\r\n\t\t\t\tcursor.line++;\r\n\t\t\t\ty = cursor.y = me.top + alignmentOffset(legendHeight, columnHeights[cursor.line]);\r\n\t\t\t}\r\n\r\n\t\t\tvar realX = rtlHelper.x(x);\r\n\r\n\t\t\tdrawLegendBox(realX, y, legendItem);\r\n\r\n\t\t\thitboxes[i].left = rtlHelper.leftForLtr(realX, hitboxes[i].width);\r\n\t\t\thitboxes[i].top = y;\r\n\r\n\t\t\t// Fill the actual label\r\n\t\t\tfillText(realX, y, legendItem, textWidth);\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\tcursor.x += width + labelOpts.padding;\r\n\t\t\t} else {\r\n\t\t\t\tcursor.y += itemHeight;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\thelpers$1.rtl.restoreTextDirection(me.ctx, opts.textDirection);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getLegendItemAt: function(x, y) {\r\n\t\tvar me = this;\r\n\t\tvar i, hitBox, lh;\r\n\r\n\t\tif (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) {\r\n\t\t\t// See if we are touching one of the dataset boxes\r\n\t\t\tlh = me.legendHitBoxes;\r\n\t\t\tfor (i = 0; i < lh.length; ++i) {\r\n\t\t\t\thitBox = lh[i];\r\n\r\n\t\t\t\tif (x >= hitBox.left && x <= hitBox.left + hitBox.width && y >= hitBox.top && y <= hitBox.top + hitBox.height) {\r\n\t\t\t\t\t// Touching an element\r\n\t\t\t\t\treturn me.legendItems[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\t/**\r\n\t * Handle an event\r\n\t * @private\r\n\t * @param {IEvent} event - The event to handle\r\n\t */\r\n\thandleEvent: function(e) {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar type = e.type === 'mouseup' ? 'click' : e.type;\r\n\t\tvar hoveredItem;\r\n\r\n\t\tif (type === 'mousemove') {\r\n\t\t\tif (!opts.onHover && !opts.onLeave) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} else if (type === 'click') {\r\n\t\t\tif (!opts.onClick) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Chart event already has relative position in it\r\n\t\thoveredItem = me._getLegendItemAt(e.x, e.y);\r\n\r\n\t\tif (type === 'click') {\r\n\t\t\tif (hoveredItem && opts.onClick) {\r\n\t\t\t\t// use e.native for backwards compatibility\r\n\t\t\t\topts.onClick.call(me, e.native, hoveredItem);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (opts.onLeave && hoveredItem !== me._hoveredItem) {\r\n\t\t\t\tif (me._hoveredItem) {\r\n\t\t\t\t\topts.onLeave.call(me, e.native, me._hoveredItem);\r\n\t\t\t\t}\r\n\t\t\t\tme._hoveredItem = hoveredItem;\r\n\t\t\t}\r\n\r\n\t\t\tif (opts.onHover && hoveredItem) {\r\n\t\t\t\t// use e.native for backwards compatibility\r\n\t\t\t\topts.onHover.call(me, e.native, hoveredItem);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction createNewLegendAndAttach(chart, legendOpts) {\r\n\tvar legend = new Legend({\r\n\t\tctx: chart.ctx,\r\n\t\toptions: legendOpts,\r\n\t\tchart: chart\r\n\t});\r\n\r\n\tcore_layouts.configure(chart, legend, legendOpts);\r\n\tcore_layouts.addBox(chart, legend);\r\n\tchart.legend = legend;\r\n}\r\n\r\nvar plugin_legend = {\r\n\tid: 'legend',\r\n\r\n\t/**\r\n\t * Backward compatibility: since 2.1.5, the legend is registered as a plugin, making\r\n\t * Chart.Legend obsolete. To avoid a breaking change, we export the Legend as part of\r\n\t * the plugin, which one will be re-exposed in the chart.js file.\r\n\t * https://github.com/chartjs/Chart.js/pull/2640\r\n\t * @private\r\n\t */\r\n\t_element: Legend,\r\n\r\n\tbeforeInit: function(chart) {\r\n\t\tvar legendOpts = chart.options.legend;\r\n\r\n\t\tif (legendOpts) {\r\n\t\t\tcreateNewLegendAndAttach(chart, legendOpts);\r\n\t\t}\r\n\t},\r\n\r\n\tbeforeUpdate: function(chart) {\r\n\t\tvar legendOpts = chart.options.legend;\r\n\t\tvar legend = chart.legend;\r\n\r\n\t\tif (legendOpts) {\r\n\t\t\thelpers$1.mergeIf(legendOpts, core_defaults.global.legend);\r\n\r\n\t\t\tif (legend) {\r\n\t\t\t\tcore_layouts.configure(chart, legend, legendOpts);\r\n\t\t\t\tlegend.options = legendOpts;\r\n\t\t\t} else {\r\n\t\t\t\tcreateNewLegendAndAttach(chart, legendOpts);\r\n\t\t\t}\r\n\t\t} else if (legend) {\r\n\t\t\tcore_layouts.removeBox(chart, legend);\r\n\t\t\tdelete chart.legend;\r\n\t\t}\r\n\t},\r\n\r\n\tafterEvent: function(chart, e) {\r\n\t\tvar legend = chart.legend;\r\n\t\tif (legend) {\r\n\t\t\tlegend.handleEvent(e);\r\n\t\t}\r\n\t}\r\n};\n\nvar noop$2 = helpers$1.noop;\r\n\r\ncore_defaults._set('global', {\r\n\ttitle: {\r\n\t\tdisplay: false,\r\n\t\tfontStyle: 'bold',\r\n\t\tfullWidth: true,\r\n\t\tpadding: 10,\r\n\t\tposition: 'top',\r\n\t\ttext: '',\r\n\t\tweight: 2000 // by default greater than legend (1000) to be above\r\n\t}\r\n});\r\n\r\n/**\r\n * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!\r\n */\r\nvar Title = core_element.extend({\r\n\tinitialize: function(config) {\r\n\t\tvar me = this;\r\n\t\thelpers$1.extend(me, config);\r\n\r\n\t\t// Contains hit boxes for each dataset (in dataset order)\r\n\t\tme.legendHitBoxes = [];\r\n\t},\r\n\r\n\t// These methods are ordered by lifecycle. Utilities then follow.\r\n\r\n\tbeforeUpdate: noop$2,\r\n\tupdate: function(maxWidth, maxHeight, margins) {\r\n\t\tvar me = this;\r\n\r\n\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\r\n\t\tme.beforeUpdate();\r\n\r\n\t\t// Absorb the master measurements\r\n\t\tme.maxWidth = maxWidth;\r\n\t\tme.maxHeight = maxHeight;\r\n\t\tme.margins = margins;\r\n\r\n\t\t// Dimensions\r\n\t\tme.beforeSetDimensions();\r\n\t\tme.setDimensions();\r\n\t\tme.afterSetDimensions();\r\n\t\t// Labels\r\n\t\tme.beforeBuildLabels();\r\n\t\tme.buildLabels();\r\n\t\tme.afterBuildLabels();\r\n\r\n\t\t// Fit\r\n\t\tme.beforeFit();\r\n\t\tme.fit();\r\n\t\tme.afterFit();\r\n\t\t//\r\n\t\tme.afterUpdate();\r\n\r\n\t\treturn me.minSize;\r\n\r\n\t},\r\n\tafterUpdate: noop$2,\r\n\r\n\t//\r\n\r\n\tbeforeSetDimensions: noop$2,\r\n\tsetDimensions: function() {\r\n\t\tvar me = this;\r\n\t\t// Set the unconstrained dimension before label rotation\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.width = me.maxWidth;\r\n\t\t\tme.left = 0;\r\n\t\t\tme.right = me.width;\r\n\t\t} else {\r\n\t\t\tme.height = me.maxHeight;\r\n\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.top = 0;\r\n\t\t\tme.bottom = me.height;\r\n\t\t}\r\n\r\n\t\t// Reset padding\r\n\t\tme.paddingLeft = 0;\r\n\t\tme.paddingTop = 0;\r\n\t\tme.paddingRight = 0;\r\n\t\tme.paddingBottom = 0;\r\n\r\n\t\t// Reset minSize\r\n\t\tme.minSize = {\r\n\t\t\twidth: 0,\r\n\t\t\theight: 0\r\n\t\t};\r\n\t},\r\n\tafterSetDimensions: noop$2,\r\n\r\n\t//\r\n\r\n\tbeforeBuildLabels: noop$2,\r\n\tbuildLabels: noop$2,\r\n\tafterBuildLabels: noop$2,\r\n\r\n\t//\r\n\r\n\tbeforeFit: noop$2,\r\n\tfit: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar minSize = me.minSize = {};\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tvar lineCount, textSize;\r\n\r\n\t\tif (!opts.display) {\r\n\t\t\tme.width = minSize.width = me.height = minSize.height = 0;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlineCount = helpers$1.isArray(opts.text) ? opts.text.length : 1;\r\n\t\ttextSize = lineCount * helpers$1.options._parseFont(opts).lineHeight + opts.padding * 2;\r\n\r\n\t\tme.width = minSize.width = isHorizontal ? me.maxWidth : textSize;\r\n\t\tme.height = minSize.height = isHorizontal ? textSize : me.maxHeight;\r\n\t},\r\n\tafterFit: noop$2,\r\n\r\n\t// Shared Methods\r\n\tisHorizontal: function() {\r\n\t\tvar pos = this.options.position;\r\n\t\treturn pos === 'top' || pos === 'bottom';\r\n\t},\r\n\r\n\t// Actually draw the title block on the canvas\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar opts = me.options;\r\n\r\n\t\tif (!opts.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar fontOpts = helpers$1.options._parseFont(opts);\r\n\t\tvar lineHeight = fontOpts.lineHeight;\r\n\t\tvar offset = lineHeight / 2 + opts.padding;\r\n\t\tvar rotation = 0;\r\n\t\tvar top = me.top;\r\n\t\tvar left = me.left;\r\n\t\tvar bottom = me.bottom;\r\n\t\tvar right = me.right;\r\n\t\tvar maxWidth, titleX, titleY;\r\n\r\n\t\tctx.fillStyle = helpers$1.valueOrDefault(opts.fontColor, core_defaults.global.defaultFontColor); // render in correct colour\r\n\t\tctx.font = fontOpts.string;\r\n\r\n\t\t// Horizontal\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\ttitleX = left + ((right - left) / 2); // midpoint of the width\r\n\t\t\ttitleY = top + offset;\r\n\t\t\tmaxWidth = right - left;\r\n\t\t} else {\r\n\t\t\ttitleX = opts.position === 'left' ? left + offset : right - offset;\r\n\t\t\ttitleY = top + ((bottom - top) / 2);\r\n\t\t\tmaxWidth = bottom - top;\r\n\t\t\trotation = Math.PI * (opts.position === 'left' ? -0.5 : 0.5);\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\t\tctx.translate(titleX, titleY);\r\n\t\tctx.rotate(rotation);\r\n\t\tctx.textAlign = 'center';\r\n\t\tctx.textBaseline = 'middle';\r\n\r\n\t\tvar text = opts.text;\r\n\t\tif (helpers$1.isArray(text)) {\r\n\t\t\tvar y = 0;\r\n\t\t\tfor (var i = 0; i < text.length; ++i) {\r\n\t\t\t\tctx.fillText(text[i], 0, y, maxWidth);\r\n\t\t\t\ty += lineHeight;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tctx.fillText(text, 0, 0, maxWidth);\r\n\t\t}\r\n\r\n\t\tctx.restore();\r\n\t}\r\n});\r\n\r\nfunction createNewTitleBlockAndAttach(chart, titleOpts) {\r\n\tvar title = new Title({\r\n\t\tctx: chart.ctx,\r\n\t\toptions: titleOpts,\r\n\t\tchart: chart\r\n\t});\r\n\r\n\tcore_layouts.configure(chart, title, titleOpts);\r\n\tcore_layouts.addBox(chart, title);\r\n\tchart.titleBlock = title;\r\n}\r\n\r\nvar plugin_title = {\r\n\tid: 'title',\r\n\r\n\t/**\r\n\t * Backward compatibility: since 2.1.5, the title is registered as a plugin, making\r\n\t * Chart.Title obsolete. To avoid a breaking change, we export the Title as part of\r\n\t * the plugin, which one will be re-exposed in the chart.js file.\r\n\t * https://github.com/chartjs/Chart.js/pull/2640\r\n\t * @private\r\n\t */\r\n\t_element: Title,\r\n\r\n\tbeforeInit: function(chart) {\r\n\t\tvar titleOpts = chart.options.title;\r\n\r\n\t\tif (titleOpts) {\r\n\t\t\tcreateNewTitleBlockAndAttach(chart, titleOpts);\r\n\t\t}\r\n\t},\r\n\r\n\tbeforeUpdate: function(chart) {\r\n\t\tvar titleOpts = chart.options.title;\r\n\t\tvar titleBlock = chart.titleBlock;\r\n\r\n\t\tif (titleOpts) {\r\n\t\t\thelpers$1.mergeIf(titleOpts, core_defaults.global.title);\r\n\r\n\t\t\tif (titleBlock) {\r\n\t\t\t\tcore_layouts.configure(chart, titleBlock, titleOpts);\r\n\t\t\t\ttitleBlock.options = titleOpts;\r\n\t\t\t} else {\r\n\t\t\t\tcreateNewTitleBlockAndAttach(chart, titleOpts);\r\n\t\t\t}\r\n\t\t} else if (titleBlock) {\r\n\t\t\tcore_layouts.removeBox(chart, titleBlock);\r\n\t\t\tdelete chart.titleBlock;\r\n\t\t}\r\n\t}\r\n};\n\nvar plugins = {};\r\nvar filler = plugin_filler;\r\nvar legend = plugin_legend;\r\nvar title = plugin_title;\nplugins.filler = filler;\nplugins.legend = legend;\nplugins.title = title;\n\n/**\r\n * @namespace Chart\r\n */\r\n\r\n\r\ncore_controller.helpers = helpers$1;\r\n\r\n// @todo dispatch these helpers into appropriated helpers/helpers.* file and write unit tests!\r\ncore_helpers();\r\n\r\ncore_controller._adapters = core_adapters;\r\ncore_controller.Animation = core_animation;\r\ncore_controller.animationService = core_animations;\r\ncore_controller.controllers = controllers;\r\ncore_controller.DatasetController = core_datasetController;\r\ncore_controller.defaults = core_defaults;\r\ncore_controller.Element = core_element;\r\ncore_controller.elements = elements;\r\ncore_controller.Interaction = core_interaction;\r\ncore_controller.layouts = core_layouts;\r\ncore_controller.platform = platform;\r\ncore_controller.plugins = core_plugins;\r\ncore_controller.Scale = core_scale;\r\ncore_controller.scaleService = core_scaleService;\r\ncore_controller.Ticks = core_ticks;\r\ncore_controller.Tooltip = core_tooltip;\r\n\r\n// Register built-in scales\r\n\r\ncore_controller.helpers.each(scales, function(scale, type) {\r\n\tcore_controller.scaleService.registerScaleType(type, scale, scale._defaults);\r\n});\r\n\r\n// Load to register built-in adapters (as side effects)\r\n\r\n\r\n// Loading built-in plugins\r\n\r\nfor (var k in plugins) {\r\n\tif (plugins.hasOwnProperty(k)) {\r\n\t\tcore_controller.plugins.register(plugins[k]);\r\n\t}\r\n}\r\n\r\ncore_controller.platform.initialize();\r\n\r\nvar src = core_controller;\r\nif (typeof window !== 'undefined') {\r\n\twindow.Chart = core_controller;\r\n}\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore\r\n * @namespace Chart.Chart\r\n * @deprecated since version 2.8.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.Chart = core_controller;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore\r\n * @namespace Chart.Legend\r\n * @deprecated since version 2.1.5\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.Legend = plugins.legend._element;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore\r\n * @namespace Chart.Title\r\n * @deprecated since version 2.1.5\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.Title = plugins.title._element;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.plugins instead\r\n * @namespace Chart.pluginService\r\n * @deprecated since version 2.1.5\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.pluginService = core_controller.plugins;\r\n\r\n/**\r\n * Provided for backward compatibility, inheriting from Chart.PlugingBase has no\r\n * effect, instead simply create/register plugins via plain JavaScript objects.\r\n * @interface Chart.PluginBase\r\n * @deprecated since version 2.5.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.PluginBase = core_controller.Element.extend({});\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas instead.\r\n * @namespace Chart.canvasHelpers\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.canvasHelpers = core_controller.helpers.canvas;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.layouts instead.\r\n * @namespace Chart.layoutService\r\n * @deprecated since version 2.7.3\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.layoutService = core_controller.layouts;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore.\r\n * @namespace Chart.LinearScaleBase\r\n * @deprecated since version 2.8\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.LinearScaleBase = scale_linearbase;\r\n\r\n/**\r\n * Provided for backward compatibility, instead we should create a new Chart\r\n * by setting the type in the config (`new Chart(id, {type: '{chart-type}'}`).\r\n * @deprecated since version 2.8.0\r\n * @todo remove at version 3\r\n */\r\ncore_controller.helpers.each(\r\n\t[\r\n\t\t'Bar',\r\n\t\t'Bubble',\r\n\t\t'Doughnut',\r\n\t\t'Line',\r\n\t\t'PolarArea',\r\n\t\t'Radar',\r\n\t\t'Scatter'\r\n\t],\r\n\tfunction(klass) {\r\n\t\tcore_controller[klass] = function(ctx, cfg) {\r\n\t\t\treturn new core_controller(ctx, core_controller.helpers.merge(cfg || {}, {\r\n\t\t\t\ttype: klass.charAt(0).toLowerCase() + klass.slice(1)\r\n\t\t\t}));\r\n\t\t};\r\n\t}\r\n);\n\nreturn src;\n\n})));\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\nvar keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n});\n\nmodule.exports = keyBy;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport Logo from '../../components/logo';\nimport { gettext, siteRoot, isPro, otherPermission, canViewSystemInfo, canViewStatistic,\n canConfigSystem, canManageLibrary, canManageUser, canManageGroup, canViewUserLog,\n canViewAdminLog, constanceEnabled, multiTenancy, multiInstitution, sysadminExtraEnabled,\n enableGuestInvitation, enableTermsAndConditions, enableFileScan, enableWorkWeixin, enableDingtalk,\n enableShareLinkReportAbuse } from '../../utils/constants';\n\nconst propTypes = {\n isSidePanelClosed: PropTypes.bool.isRequired,\n onCloseSidePanel: PropTypes.func.isRequired,\n currentTab: PropTypes.string.isRequired,\n tabItemClick: PropTypes.func.isRequired\n};\n\nclass SidePanel extends React.Component {\n\n getActiveClass = (tab) => {\n return this.props.currentTab == tab ? 'active' : '';\n }\n\n render() {\n return (\n <div className={`side-panel ${this.props.isSidePanelClosed ? '' : 'left-zero'}`}>\n <div className=\"side-panel-north\">\n <Logo onCloseSidePanel={this.props.onCloseSidePanel}/>\n </div>\n <div className=\"side-panel-center\">\n <div className=\"side-nav\">\n <div className=\"side-nav-con\">\n <h3 className=\"sf-heading\">{gettext('System Admin')}</h3>\n <ul className=\"nav nav-pills flex-column nav-container\">\n {canViewSystemInfo &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('info')}`}\n to={siteRoot + 'sys/info/'}\n onClick={() => this.props.tabItemClick('info')}\n >\n <span className=\"sf2-icon-info\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Info')}</span>\n </Link>\n </li>\n }\n {isPro && canViewStatistic &&\n <li className=\"nav-item\">\n <Link className={`nav-link ellipsis ${this.getActiveClass('statistic')}`}\n to={siteRoot + 'sys/statistics/file/'}\n onClick={() => this.props.tabItemClick('statistic')}\n >\n <span className=\"sf2-icon-histogram\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Statistic')}</span>\n </Link>\n </li>\n }\n {otherPermission &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('devices')}`}\n to={siteRoot + 'sys/desktop-devices/'}\n onClick={() => this.props.tabItemClick('devices')}\n >\n <span className=\"sf2-icon-monitor\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Devices')}</span>\n </Link>\n </li>\n }\n {constanceEnabled && canConfigSystem &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('web-settings')}`}\n to={siteRoot + 'sys/web-settings/'}\n onClick={() => this.props.tabItemClick('web-settings')}\n >\n <span className=\"sf2-icon-cog2\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Settings')}</span>\n </Link>\n </li>\n }\n {canManageLibrary &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('libraries')}`}\n to={siteRoot + 'sys/all-libraries/'}\n onClick={() => this.props.tabItemClick('libraries')}\n >\n <span className=\"sf2-icon-library\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Libraries')}</span>\n </Link>\n </li>\n }\n {canManageUser &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('users')}`}\n to={siteRoot + 'sys/users/'}\n onClick={() => this.props.tabItemClick('users')}\n >\n <span className=\"sf2-icon-user\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Users')}</span>\n </Link>\n </li>\n }\n {canManageGroup &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('groups')}`}\n to={siteRoot + 'sys/groups/'}\n onClick={() => this.props.tabItemClick('groups')}\n >\n <span className=\"sf2-icon-group\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Groups')}</span>\n </Link>\n </li>\n }\n {isPro && canManageGroup &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('departments')}`}\n to={siteRoot + 'sys/departments/'}\n onClick={() => this.props.tabItemClick('departments')}\n >\n <span className=\"sf2-icon-organization\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Departments')}</span>\n </Link>\n </li>\n }\n {multiTenancy && otherPermission &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('organizations')}`}\n to={siteRoot + 'sys/organizations/'}\n onClick={() => this.props.tabItemClick('organizations')}\n >\n <span className=\"sf2-icon-organization\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Organizations')}</span>\n </Link>\n </li>\n }\n {multiInstitution && otherPermission &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('institutions')}`}\n to={siteRoot + 'sys/institutions/'}\n onClick={() => this.props.tabItemClick('institutions')}\n >\n <span className=\"sf2-icon-organization\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Institutions')}</span>\n </Link>\n </li>\n }\n {otherPermission &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('notifications')}`}\n to={siteRoot + 'sys/notifications/'}\n onClick={() => this.props.tabItemClick('notifications')}\n >\n <span className=\"sf2-icon-msgs\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Notifications')}</span>\n </Link>\n </li>\n }\n {otherPermission &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('links')}`}\n to={siteRoot + 'sys/share-links/'}\n onClick={() => this.props.tabItemClick('links')}\n >\n <span className=\"sf2-icon-link\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Links')}</span>\n </Link>\n </li>\n }\n {sysadminExtraEnabled && canViewUserLog &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('logs')}`}\n to={siteRoot + 'sys/logs/login'}\n onClick={() => this.props.tabItemClick('logs')}\n >\n <span className=\"sf2-icon-clock\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Logs')}</span>\n </Link>\n </li>\n }\n {isPro && otherPermission && enableFileScan &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('file-scan-records')}`}\n to={siteRoot + 'sys/file-scan-records/'}\n onClick={() => this.props.tabItemClick('file-scan-records')}\n >\n <span className=\"sf2-icon-security\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('File Scan')}</span>\n </Link>\n </li>\n }\n {isPro && otherPermission &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('virus-files')}`}\n to={siteRoot + 'sys/virus-files/all/'}\n onClick={() => this.props.tabItemClick('virus-files')}\n >\n <span className=\"sf2-icon-security\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Virus Scan')}</span>\n </Link>\n </li>\n }\n {isPro && enableGuestInvitation && otherPermission &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('invitations')}`}\n to={siteRoot + 'sys/invitations/'}\n onClick={() => this.props.tabItemClick('invitations')}\n >\n <span className=\"sf2-icon-invite\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Invitations')}</span>\n </Link>\n </li>\n }\n {otherPermission && enableTermsAndConditions &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('termsandconditions')}`}\n to={siteRoot + 'sys/terms-and-conditions/'}\n onClick={() => this.props.tabItemClick('termsandconditions')}\n >\n <span className=\"sf2-icon-wiki\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Terms and Conditions')}</span>\n </Link>\n </li>\n }\n {isPro && canViewAdminLog &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('adminLogs')}`}\n to={siteRoot + 'sys/admin-logs/operation'}\n onClick={() => this.props.tabItemClick('adminLogs')}\n >\n <span className=\"sf2-icon-admin-log\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Admin Logs')}</span>\n </Link>\n </li>\n }\n {otherPermission && enableWorkWeixin &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('work-weixin')}`}\n to={siteRoot + 'sys/work-weixin/'}\n onClick={() => this.props.tabItemClick('work-weixin')}\n >\n <span className=\"sf3-font-enterprise-wechat sf3-font\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{'企业微信集成'}</span>\n </Link>\n </li>\n }\n\n {otherPermission && enableDingtalk &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('dingtalk')}`}\n to={siteRoot + 'sys/dingtalk/'}\n onClick={() => this.props.tabItemClick('dingtalk')}\n >\n <span className=\"sf3-font-dingtalk sf3-font\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{'钉钉集成'}</span>\n </Link>\n </li>\n }\n\n {otherPermission && enableShareLinkReportAbuse &&\n <li className=\"nav-item\">\n <Link\n className={`nav-link ellipsis ${this.getActiveClass('abuse-reports')}`}\n to={siteRoot + 'sys/abuse-reports/'}\n onClick={() => this.props.tabItemClick('abuse-reports')}\n >\n <span className=\"sf2-icon-monitor\" aria-hidden=\"true\"></span>\n <span className=\"nav-text\">{gettext('Abuse Reports')}</span>\n </Link>\n </li>\n }\n </ul>\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nSidePanel.propTypes = propTypes;\n\nexport default SidePanel;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n children: PropTypes.object.isRequired,\n};\n\nclass MainPanel extends Component {\n\n render() {\n return (\n <div className=\"main-panel o-hidden\">\n {this.props.children}\n </div>\n );\n }\n}\n\nMainPanel.propTypes = propTypes;\n\nexport default MainPanel;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Account from '../../components/common/account';\n\nconst propTypes = {\n children: PropTypes.object\n};\n\nclass MainPanelTopbar extends Component {\n\n render() {\n return (\n <div className={`main-panel-north ${this.props.children ? 'border-left-show' : ''}`}>\n <div className=\"cur-view-toolbar\">\n <span className=\"sf2-icon-menu side-nav-toggle hidden-md-up d-md-none\" title=\"Side Nav Menu\"></span>\n <div className=\"operation\">\n {this.props.children}\n </div>\n </div>\n <div className=\"common-toolbar\">\n {this.props.search && this.props.search}\n <Account isAdminPanel={true} />\n </div>\n </div>\n );\n }\n}\n\nMainPanelTopbar.propTypes = propTypes;\n\nexport default MainPanelTopbar;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport { seafileAPI } from '../../utils/seafile-api';\nimport { gettext, isPro, isDefaultAdmin } from '../../utils/constants';\nimport toaster from '../../components/toast';\nimport { Utils } from '../../utils/utils';\nimport Loading from '../../components/loading';\nimport MainPanelTopbar from './main-panel-topbar';\n\nimport '../../css/system-info.css';\n\nclass Info extends Component {\n\n constructor(props) {\n super(props);\n this.fileInput = React.createRef();\n this.state = {\n loading: true,\n errorMsg: '',\n sysInfo: {}\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetSysInfo().then((res) => {\n this.setState({\n loading: false,\n sysInfo: res.data\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n uploadLicenseFile = (e) => {\n\n // no file selected\n if (!this.fileInput.current.files.length) {\n return;\n }\n const file = this.fileInput.current.files[0];\n seafileAPI.sysAdminUploadLicense(file).then((res) => {\n let info = this.state.sysInfo;\n Object.assign(info, res.data, {with_license: true});\n this.setState({\n sysInfo: info\n });\n }).catch((error) => {\n let errMsg = Utils.getErrorMsg(error);\n toaster.danger(errMsg);\n });\n }\n\n openFileInput = () => {\n this.fileInput.current.click();\n }\n\n renderLicenseDescString = (license_mode, license_to, license_expiration) => {\n if (license_mode == 'life-time') {\n if (window.app.config.lang == 'zh-cn') {\n return '永久授权给 ' + license_to + ',技术支持服务至 ' + license_expiration + ' 到期';\n } else {\n return gettext('licensed to {placeholder_license_to}, upgrade service expired in {placeholder_license_expiration}')\n .replace('{placeholder_license_to}', license_to).replace('{placeholder_license_expiration}', license_expiration);\n }\n } else {\n return gettext('licensed to {placeholder_license_to}, expires on {placeholder_license_expiration}')\n .replace('{placeholder_license_to}', license_to).replace('{placeholder_license_expiration}', license_expiration);\n }\n }\n\n render() {\n let { license_mode, license_to, license_expiration, org_count,\n repos_count, total_files_count, total_storage, total_devices_count,\n current_connected_devices_count, license_maxusers, multi_tenancy_enabled,\n active_users_count, users_count, groups_count, with_license } = this.state.sysInfo;\n let { loading, errorMsg } = this.state;\n\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container system-admin-info\">\n <h2 className=\"heading\">{gettext('Info')}</h2>\n <div className=\"content\">\n {loading && <Loading />}\n {errorMsg && <p className=\"error text-center mt-4\">{errorMsg}</p>}\n {(!loading && !errorMsg) &&\n <dl className=\"flex-1 m-0\">\n <dt className=\"info-item-heading\">{gettext('System Info')}</dt>\n {isPro ?\n <dd className=\"info-item-content\">\n {gettext('Professional Edition')}\n {with_license &&\n ' ' + this.renderLicenseDescString(license_mode, license_to, license_expiration)\n }<br/>\n {isDefaultAdmin &&\n <Fragment>\n <Button type=\"button\" className=\"mt-2\" onClick={this.openFileInput}>{gettext('Upload license')}</Button>\n <input className=\"d-none\" type=\"file\" onChange={this.uploadLicenseFile} ref={this.fileInput} />\n </Fragment>\n }\n </dd> :\n <dd className=\"info-item-content\">\n {gettext('Community Edition')}\n <a className=\"ml-1\" href=\"https://download.seafile.com/published/seafile-manual/deploy_pro/migrate_from_seafile_community_server.md\" target=\"_blank\">{gettext('Upgrade to Pro Edition')}</a>\n </dd>\n }\n <dt className=\"info-item-heading\">{gettext('Libraries')} / {gettext('Files')}</dt>\n <dd className=\"info-item-content\">{repos_count} / {total_files_count}</dd>\n\n <dt className=\"info-item-heading\">{gettext('Storage Used')}</dt>\n <dd className=\"info-item-content\">{Utils.bytesToSize(total_storage)}</dd>\n\n <dt className=\"info-item-heading\">{gettext('Total Devices')} / {gettext('Current Connected Devices')}</dt>\n <dd className=\"info-item-content\">{total_devices_count} / {current_connected_devices_count}</dd>\n\n {isPro ?\n <Fragment>\n <dt className=\"info-item-heading\">{gettext('Activated Users')} / {gettext('Total Users')} / {gettext('Limits')}</dt>\n <dd className=\"info-item-content\">{active_users_count}{' / '}{users_count}{' / '}{with_license ? license_maxusers : '--'}</dd>\n </Fragment> :\n <Fragment>\n <dt className=\"info-item-heading\">{gettext('Activated Users')} / {gettext('Total Users')}</dt>\n <dd className=\"info-item-content\">{active_users_count} / {users_count}</dd>\n </Fragment>\n }\n\n <dt className=\"info-item-heading\">{gettext('Groups')}</dt>\n <dd className=\"info-item-content\">{groups_count}</dd>\n\n {multi_tenancy_enabled &&\n <Fragment>\n <dt className=\"info-item-heading\">{gettext('Organizations')}</dt>\n <dd className=\"info-item-content\">{org_count}</dd>\n </Fragment>\n }\n </dl>\n }\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default Info;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'fileStatistic', urlPart: 'statistics/file', text: gettext('File')},\n {name: 'storageStatistic', urlPart: 'statistics/storage', text: gettext('Storage')},\n {name: 'usersStatistic', urlPart: 'statistics/user', text: gettext('Users')},\n {name: 'trafficStatistic', urlPart: 'statistics/traffic', text: gettext('Traffic')},\n {name: 'reportsStatistic', urlPart: 'statistics/reports', text: gettext('Reports')},\n ];\n }\n\n render() {\n const { currentItem } = this.props;\n return (\n <div className=\"cur-view-path tab-nav-container\">\n <ul className=\"nav\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item\" key={index}>\n <Link to={`${siteRoot}sys/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport Calendar from '@seafile/seafile-calendar';\nimport DatePicker from '@seafile/seafile-calendar/lib/Picker';\nimport { translateCalendar } from '../../../utils/date-format-utils';\n\nimport '@seafile/seafile-calendar/assets/index.css';\n\nconst propsTypes = {\n disabledDate: PropTypes.func.isRequired,\n value: PropTypes.object,\n onChange: PropTypes.func.isRequired,\n};\n\nconst FORMAT = 'YYYY-MM-DD';\n\nclass Picker extends React.Component {\n\n constructor(props) {\n super(props);\n this.defaultCalendarValue = null;\n }\n\n componentDidMount() {\n let lang = window.app.config.lang;\n this.defaultCalendarValue = moment().locale(lang).clone();\n }\n\n render() {\n const props = this.props;\n const calendar = (<Calendar\n defaultValue={this.defaultCalendarValue}\n disabledDate={props.disabledDate}\n format={FORMAT}\n locale={translateCalendar()}\n />);\n return (\n <DatePicker\n calendar={calendar}\n value={props.value}\n onChange={props.onChange}\n >\n {\n ({value}) => {\n return (\n <span>\n <input\n placeholder=\"yyyy-mm-dd\"\n tabIndex=\"-1\"\n readOnly\n value={value && value.format(FORMAT) || ''}\n className=\"form-control system-statistic-input\"\n />\n </span>\n );\n }\n }\n </DatePicker>\n );\n }\n}\n\nPicker.propsTypes = propsTypes;\n\nexport default Picker;\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from 'reactstrap';\nimport moment from 'moment';\nimport { gettext } from '../../../utils/constants';\nimport Picker from './picker';\n\nconst propTypes = {\n getActiviesFiles: PropTypes.func.isRequired,\n children: PropTypes.object,\n};\n\nclass StatisticCommonTool extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n statisticType: 'oneWeek',\n startValue: null,\n endValue: null,\n };\n }\n\n componentDidMount() {\n let today = moment().format('YYYY-MM-DD 00:00:00');\n let endTime = today;\n let startTime = moment().subtract(6,'d').format('YYYY-MM-DD 00:00:00');\n let group_by = 'day';\n this.props.getActiviesFiles(startTime, endTime, group_by);\n }\n\n changeActive = (statisticTypeName) => {\n let { statisticType } = this.state;\n if (statisticType === statisticTypeName) {\n return;\n }\n let today = moment().format('YYYY-MM-DD 00:00:00');\n let endTime = today;\n let startTime;\n switch(statisticTypeName) {\n case 'oneWeek' :\n startTime = moment().subtract(6,'d').format('YYYY-MM-DD 00:00:00');\n break;\n case 'oneMonth' :\n startTime = moment().subtract(29,'d').format('YYYY-MM-DD 00:00:00');\n break;\n case 'oneYear' :\n startTime = moment().subtract(364,'d').format('YYYY-MM-DD 00:00:00');\n break;\n }\n this.setState({\n statisticType: statisticTypeName,\n });\n let group_by = 'day';\n this.props.getActiviesFiles(startTime, endTime, group_by);\n }\n\n disabledStartDate = (startValue) => {\n if (!startValue) {\n return false;\n }\n let today = moment().format();\n\n const endValue = this.state.endValue;\n if (!endValue) {\n let startTime = moment(startValue).format();\n return today < startTime;\n }\n return endValue.isBefore(startValue) || moment(startValue).format() > today;\n }\n\n disabledEndDate = (endValue) => {\n if (!endValue) {\n return false;\n }\n let today = moment().format();\n const startValue = this.state.startValue;\n if (!startValue) {\n let endTime = moment(endValue).format();\n return today < endTime;\n }\n return endValue.isBefore(startValue) || moment(endValue).format() > today;\n }\n\n onChange = (field, value) => {\n this.setState({\n [field]: value,\n });\n }\n\n onSubmit = () => {\n let { startValue, endValue } = this.state;\n if(!startValue || !endValue) {\n return;\n }\n this.setState({\n statisticType: 'itemButton',\n });\n let startTime = moment(startValue).format('YYYY-MM-DD 00:00:00');\n let endTime = moment(endValue).format('YYYY-MM-DD 00:00:00');\n let group_by = 'day';\n this.props.getActiviesFiles(startTime, endTime, group_by);\n }\n\n render() {\n let { statisticType, endValue, startValue } = this.state;\n return(\n <Fragment>\n {this.props.children}\n <div className=\"system-statistic-time-range\">\n <div className=\"sys-stat-tool\">\n <div className={`system-statistic-item border-right-0 rounded-left ${statisticType === 'oneWeek' ? 'item-active' : ''}`} onClick={this.changeActive.bind(this, 'oneWeek')}>{gettext('7 Days')}</div>\n <div className={`system-statistic-item border-right-0 ${statisticType === 'oneMonth' ? 'item-active' : ''}`} onClick={this.changeActive.bind(this, 'oneMonth')}>{gettext('30 Days')}</div>\n <div className={`system-statistic-item rounded-right ${statisticType === 'oneYear' ? 'item-active' : ''}`} onClick={this.changeActive.bind(this, 'oneYear')}>{gettext('1 Year')}</div>\n </div>\n <div className=\"system-statistic-input-container\">\n <Picker\n disabledDate={this.disabledStartDate}\n value={startValue}\n onChange={this.onChange.bind(this, 'startValue')}\n />\n <span className=\"system-statistic-connect\">-</span>\n <Picker\n disabledDate={this.disabledEndDate}\n value={endValue}\n onChange={this.onChange.bind(this, 'endValue')}\n />\n <Button className=\"operation-item system-statistic-button\" onClick={this.onSubmit}>{gettext('Submit')}</Button>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nStatisticCommonTool.propTypes = propTypes;\n\nexport default StatisticCommonTool;\n","import React from 'react';\nimport { Line } from 'react-chartjs-2';\nimport PropTypes from 'prop-types';\nimport { Utils } from '../../../utils/utils';\n\nconst propTypes = {\n labels: PropTypes.array.isRequired,\n filesData: PropTypes.array.isRequired,\n suggestedMaxNumbers: PropTypes.number.isRequired,\n isLegendStatus: PropTypes.bool.isRequired,\n chartTitle: PropTypes.string.isRequired,\n isTitleCallback: PropTypes.bool,\n isTicksCallback: PropTypes.bool,\n};\n\nclass StatisticChart extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: {},\n opations: {}\n };\n }\n\n componentDidMount() {\n let { labels, filesData, isTitleCallback, isTicksCallback, suggestedMaxNumbers, isLegendStatus, chartTitle } = this.props;\n let _this = this;\n let data = {\n labels: labels,\n datasets: filesData\n };\n let options = {\n title: {\n display: true,\n fontSize: 14,\n text: chartTitle,\n },\n elements: {\n line: {\n fill: false,\n tension: 0, // disable bezier curves, i.e, draw straight lines\n borderWidth: 2\n }\n },\n legend: {\n display: isLegendStatus,\n labels: {\n usePointStyle: true\n }\n },\n tooltips: {\n callbacks: {\n label: function(tooltipItem, data) {\n if (isTitleCallback) {\n return _this.titleCallback(tooltipItem, data);\n }\n return data.datasets[tooltipItem.datasetIndex].label + ': ' + tooltipItem.yLabel;\n }\n }\n },\n layout: {\n padding: {\n right: 100,\n }\n },\n scales: {\n yAxes: [{\n ticks: {\n beginAtZero: true,\n suggestedMax: suggestedMaxNumbers,\n callback: function(value, index, values) {\n if (isTicksCallback) {\n return _this.ticksCallback(value, index, values);\n }\n return value;\n }\n }\n }],\n xAxes: [{\n ticks: {\n maxTicksLimit: 20\n }\n }]\n }\n };\n this.setState({\n data: data,\n options: options\n });\n }\n\n componentWillReceiveProps(nextProps) {\n let data = {\n labels: nextProps.labels,\n datasets: nextProps.filesData\n };\n this.setState({data: data});\n }\n\n titleCallback = (tooltipItem, data) => {\n return data.datasets[tooltipItem.datasetIndex].label + ': ' + Utils.bytesToSize(tooltipItem.yLabel);\n }\n\n ticksCallback = (value, index, values) => {\n return Utils.bytesToSize(value);\n }\n\n render() {\n\n let { data, options } = this.state;\n return (\n <Line\n data={data}\n options={options}\n />\n );\n }\n}\n\nStatisticChart.propTypes = propTypes;\n\nexport default StatisticChart;\n","import React, { Fragment } from 'react';\nimport moment from 'moment';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport StatisticNav from './statistic-nav';\nimport StatisticCommonTool from './statistic-common-tool';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport StatisticChart from './statistic-chart';\nimport Loading from '../../../components/loading';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\n\nimport '../../../css/system-stat.css';\n\nclass StatisticFile extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n filesData: [],\n labels: [],\n isLoading: true\n };\n }\n\n getActiviesFiles = (startTime, endTime, groupBy) => {\n let { filesData } = this.state;\n seafileAPI.sysAdminStatisticFiles(startTime, endTime, groupBy).then((res) => {\n let labels = [],\n added = [],\n deleted = [],\n visited = [],\n modified = [];\n let data = res.data;\n if (Array.isArray(data)) {\n data.forEach(item => {\n labels.push(moment(item.datetime).format('YYYY-MM-DD'));\n added.push(item.added);\n deleted.push(item.deleted);\n modified.push(item.modified);\n visited.push(item.visited);\n });\n let addedData = {\n label: gettext('Added'),\n data: added,\n borderColor: '#57cd6b',\n backgroundColor: '#57cd6b'};\n let visitedData = {\n label: gettext('Visited'),\n data: visited,\n borderColor: '#fd913a',\n backgroundColor: '#fd913a'};\n let modifiedData = {\n label: gettext('Modified'),\n data: modified,\n borderColor: '#72c3fc',\n backgroundColor: '#72c3fc'};\n let deletedData = {\n label: gettext('Deleted'),\n data: deleted,\n borderColor: '#f75356',\n backgroundColor: '#f75356'};\n filesData = [visitedData, addedData, modifiedData, deletedData];\n }\n this.setState({\n filesData: filesData,\n labels: labels,\n isLoading: false\n });\n }).catch(err => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n let { labels, filesData, isLoading } = this.state;\n\n return(\n <Fragment>\n <MainPanelTopbar />\n <div className=\"cur-view-container\">\n <StatisticNav currentItem=\"fileStatistic\" />\n <div className=\"cur-view-content\">\n <StatisticCommonTool getActiviesFiles={this.getActiviesFiles} />\n {isLoading && <Loading />}\n {!isLoading && labels.length > 0 &&\n <StatisticChart\n labels={labels}\n filesData={filesData}\n suggestedMaxNumbers={10}\n isLegendStatus={true}\n chartTitle={gettext('File Operations')}\n />\n }\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default StatisticFile;\n","import React, { Fragment } from 'react';\nimport moment from 'moment';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport StatisticNav from './statistic-nav';\nimport StatisticCommonTool from './statistic-common-tool';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport StatisticChart from './statistic-chart';\nimport Loading from '../../../components/loading';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\n\nclass StatisticStorage extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n filesData: [],\n labels: [],\n isLoading: true\n };\n }\n\n getActiviesFiles = (startTime, endTime, groupBy) => {\n let { filesData } = this.state;\n seafileAPI.sysAdminStatisticStorages(startTime, endTime, groupBy).then((res) => {\n let labels = [],\n totalStorage = [];\n let data = res.data;\n if (Array.isArray(data)) {\n data.forEach(item => {\n labels.push(moment(item.datetime).format('YYYY-MM-DD'));\n totalStorage.push(item.total_storage);\n });\n let total_storage = {\n label: gettext('Total Storage'),\n data: totalStorage,\n borderColor: '#fd913a',\n backgroundColor: '#fd913a'};\n filesData = [total_storage];\n }\n this.setState({\n filesData: filesData,\n labels: labels,\n isLoading: false\n });\n }).catch(err => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n let { labels, filesData, isLoading } = this.state;\n return(\n <Fragment>\n <MainPanelTopbar />\n <div className=\"cur-view-container\">\n <StatisticNav currentItem=\"storageStatistic\" />\n <div className=\"cur-view-content\">\n <StatisticCommonTool getActiviesFiles={this.getActiviesFiles} />\n {isLoading && <Loading />}\n {!isLoading && labels.length > 0 &&\n <StatisticChart\n labels={labels}\n filesData={filesData}\n suggestedMaxNumbers={10*1000*1000}\n isTitleCallback={true}\n isTicksCallback={true}\n isLegendStatus={false}\n chartTitle={gettext('Total Storage')}\n />\n }\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default StatisticStorage;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { gettext } from '../../../utils/constants';\n\nconst propTypes = {\n type: PropTypes.string.isRequired,\n sortBy: PropTypes.string.isRequired,\n sortOrder: PropTypes.string.isRequired,\n sortItems: PropTypes.func.isRequired,\n children: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),\n};\n\nclass TrafficTable extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { type, sortBy, sortOrder } = this.props;\n const sortIcon = sortOrder == 'asc' ? <span className=\"fas fa-caret-up\"></span> : <span className=\"fas fa-caret-down\"></span>;\n\n return (\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"16%\">{type == 'user' ? gettext('User') : gettext('Organization')}</th>\n <th width=\"11%\"><div className=\"d-block table-sort-op cursor-pointer\" onClick={this.props.sortItems.bind(this, 'sync_file_upload')}>{gettext('Sync Upload')} {sortBy === 'sync_file_upload' && sortIcon}</div></th>\n <th width=\"14%\"><div className=\"d-block table-sort-op cursor-pointer\" onClick={this.props.sortItems.bind(this, 'sync_file_download')}>{gettext('Sync Download')} {sortBy === 'sync_file_download' && sortIcon}</div></th>\n <th width=\"11%\"><div className=\"d-block table-sort-op cursor-pointer\" onClick={this.props.sortItems.bind(this, 'web_file_upload')}>{gettext('Web Upload')} {sortBy === 'web_file_upload' && sortIcon}</div></th>\n <th width=\"14%\"><div className=\"d-block table-sort-op cursor-pointer\" onClick={this.props.sortItems.bind(this, 'web_file_download')}>{gettext('Web Download')} {sortBy === 'web_file_download' && sortIcon}</div></th>\n <th width=\"17%\"><div className=\"d-block table-sort-op cursor-pointer\" onClick={this.props.sortItems.bind(this, 'link_file_upload')}>{gettext('Share link upload')} {sortBy === 'link_file_upload' && sortIcon}</div></th>\n <th width=\"17%\"><div className=\"d-block table-sort-op cursor-pointer\" onClick={this.props.sortItems.bind(this, 'link_file_download')}>{gettext('Share link download')} {sortBy === 'link_file_download' && sortIcon}</div></th>\n </tr>\n </thead>\n <tbody>\n {this.props.children}\n </tbody>\n </table>\n );\n }\n}\n\nTrafficTable.propTypes = propTypes;\n\nexport default TrafficTable;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Utils } from '../../../utils/utils';\nimport { siteRoot } from '../../../utils/constants';\n\nconst propTypes = {\n type: PropTypes.string.isRequired,\n userTrafficItem: PropTypes.object.isRequired,\n};\n\nclass TrafficTableBody extends React.Component {\n\n trafficName = () => {\n let { userTrafficItem, type } = this.props;\n switch(type) {\n case 'user':\n if (userTrafficItem.name) {\n return (\n <a href={siteRoot + 'useradmin/info/' + userTrafficItem.email + '/'}>{userTrafficItem.name}</a>\n );\n }\n return(<span>{'--'}</span>);\n case 'org':\n return(<span>{userTrafficItem.org_name}</span>);\n }\n }\n\n render() {\n let { userTrafficItem } = this.props;\n\n let syncUploadSize = Utils.bytesToSize(userTrafficItem.sync_file_upload);\n let syncDownloadSize = Utils.bytesToSize(userTrafficItem.sync_file_download);\n let webUploadSize = Utils.bytesToSize(userTrafficItem.web_file_upload);\n let webDownloadSize = Utils.bytesToSize(userTrafficItem.web_file_download);\n let linkUploadSize = Utils.bytesToSize(userTrafficItem.link_file_upload);\n let linkDownloadSize = Utils.bytesToSize(userTrafficItem.link_file_download);\n\n return(\n <tr>\n <td>{this.trafficName()}</td>\n <td>{syncUploadSize}</td>\n <td>{syncDownloadSize}</td>\n <td>{webUploadSize}</td>\n <td>{webDownloadSize}</td>\n <td>{linkUploadSize}</td>\n <td>{linkDownloadSize}</td>\n </tr>\n );\n }\n}\n\nTrafficTableBody.propTypes = propTypes;\n\nexport default TrafficTableBody;\n","import React, { Fragment } from 'react';\nimport { Input } from 'reactstrap';\nimport moment from 'moment';\nimport { gettext } from '../../../utils/constants';\nimport TrafficTable from './traffic-table';\nimport TrafficTableBody from './traffic-table-body';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport Paginator from '../../../components/paginator';\nimport Loading from '../../../components/loading';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\n\nclass OrgsTraffic extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n orgTrafficList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n month: moment().format('YYYYMM'),\n isLoading: false,\n errorMessage: '',\n sortBy: 'link_file_download',\n sortOrder: 'desc'\n };\n this.initPage = 1;\n this.initMonth = moment().format('YYYYMM');\n }\n\n componentDidMount() {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getTrafficList(this.initMonth, this.state.currentPage);\n });\n }\n\n getPreviousPage = () => {\n this.getTrafficList(this.state.month, this.state.currentPage - 1);\n }\n\n getNextPage = () => {\n this.getTrafficList(this.state.month, this.state.currentPage + 1);\n }\n\n handleChange = (e) => {\n let month = e.target.value;\n this.setState({\n month: month\n });\n }\n\n handleKeyPress = (e) => {\n let { month } = this.state;\n if (e.key === 'Enter') {\n let pattern = /^([012]\\d{3})(0[1-9]|1[012])$/;\n if (!pattern.test(month)) {\n let errorMessage = gettext('Invalid month, should be yyyymm.');\n this.setState({\n errorMessage: errorMessage\n });\n return;\n }\n this.getTrafficList(month, this.initPage);\n e.target.blur();\n e.preventDefault();\n }\n }\n\n getTrafficList = (month, page) => {\n const { perPage, sortBy, sortOrder } = this.state;\n const orderBy = sortOrder == 'asc' ? sortBy : `${sortBy}_${sortOrder}`;\n this.setState({isLoading: true, errorMessage: ''});\n seafileAPI.sysAdminListOrgTraffic(month, page, perPage, orderBy).then(res => {\n let orgTrafficList = res.data.org_monthly_traffic_list.slice(0);\n this.setState({\n month: month,\n currentPage: page,\n orgTrafficList: orgTrafficList,\n hasNextPage: res.data.has_next_page,\n isLoading: false\n });\n }).catch(err => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n sortItems = (sortBy) => {\n this.setState({\n sortBy: sortBy,\n sortOrder: this.state.sortOrder == 'asc' ? 'desc' : 'asc'\n }, () => {\n const { month, currentPage } = this.state;\n this.getTrafficList(month, currentPage);\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getTrafficList(this.initPage, this.initMonth));\n }\n\n render() {\n const {\n isLoading, errorMessage, orgTrafficList,\n currentPage, hasNextPage, perPage,\n sortBy, sortOrder\n } = this.state;\n return (\n <Fragment>\n <div className=\"d-flex align-items-center mt-4\">\n <span className=\"statistic-reports-tip\">{gettext('Month:')}</span>\n <Input\n className=\"statistic-reports-input\"\n defaultValue={moment().format('YYYYMM')}\n onChange={this.handleChange}\n onKeyPress={this.handleKeyPress}\n />\n {errorMessage && <div className=\"error\">{errorMessage}</div>}\n </div>\n {isLoading && <Loading />}\n {!isLoading &&\n <TrafficTable type={'org'} sortItems={this.sortItems} sortBy={sortBy} sortOrder={sortOrder}>\n {orgTrafficList.length > 0 && orgTrafficList.map((item, index) => {\n return(\n <TrafficTableBody\n key={index}\n userTrafficItem={item}\n type={'org'}\n />\n );\n })}\n </TrafficTable>\n }\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.resetPerPage}\n />\n </Fragment>\n );\n }\n}\n\nexport default OrgsTraffic;\n","import React, { Fragment } from 'react';\nimport { Input } from 'reactstrap';\nimport TrafficTable from './traffic-table';\nimport TrafficTableBody from './traffic-table-body';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport Paginator from '../../../components/paginator';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\n\nclass UsersTraffic extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n userTrafficList: [],\n hasNextPage: false,\n perPage: 25,\n currentPage: 1,\n month: moment().format('YYYYMM'),\n isLoading: false,\n errorMessage: '',\n sortBy: 'link_file_download',\n sortOrder: 'desc'\n };\n this.initPage = 1;\n this.initMonth = moment().format('YYYYMM');\n }\n\n componentDidMount() {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getTrafficList(this.initMonth, this.state.currentPage);\n });\n }\n\n getPreviousPage = () => {\n this.getTrafficList(this.state.month, this.state.currentPage - 1);\n }\n\n getNextPage = () => {\n this.getTrafficList(this.state.month, this.state.currentPage + 1);\n }\n\n handleChange = (e) => {\n let month = e.target.value;\n this.setState({\n month: month\n });\n }\n\n handleKeyPress = (e) => {\n let { month } = this.state;\n if (e.key === 'Enter') {\n let pattern = /^([012]\\d{3})(0[1-9]|1[012])$/;\n if (!pattern.test(month)) {\n let errorMessage = gettext('Invalid month, should be yyyymm.');\n this.setState({\n errorMessage: errorMessage\n });\n return;\n }\n this.getTrafficList(month, this.initPage);\n e.target.blur();\n e.preventDefault();\n }\n }\n\n getTrafficList = (month, page) => {\n const { perPage, sortBy, sortOrder } = this.state;\n const orderBy = sortOrder == 'asc' ? sortBy : `${sortBy}_${sortOrder}`;\n this.setState({\n isLoading: true,\n errorMessage: ''\n });\n seafileAPI.sysAdminListUserTraffic(month, page, perPage, orderBy).then(res => {\n let userTrafficList = res.data.user_monthly_traffic_list.slice(0);\n this.setState({\n month: month,\n currentPage: page,\n userTrafficList: userTrafficList,\n hasNextPage: res.data.has_next_page,\n isLoading: false\n });\n }).catch(err => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n sortItems = (sortBy) => {\n this.setState({\n sortBy: sortBy,\n sortOrder: this.state.sortOrder == 'asc' ? 'desc' : 'asc'\n }, () => {\n const { month, currentPage } = this.state;\n this.getTrafficList(month, currentPage);\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getTrafficList(this.initMonth, this.initPage));\n }\n\n render() {\n const {\n isLoading, errorMessage, userTrafficList,\n currentPage, hasNextPage, perPage,\n sortBy, sortOrder\n } = this.state;\n return (\n <Fragment>\n <div className=\"d-flex align-items-center mt-4\">\n <span className=\"statistic-reports-tip\">{gettext('Month:')}</span>\n <Input\n className=\"statistic-reports-input\"\n defaultValue={moment().format('YYYYMM')}\n onChange={this.handleChange}\n onKeyPress={this.handleKeyPress}\n />\n {errorMessage && <div className=\"error\">{errorMessage}</div>}\n </div>\n {isLoading && <Loading />}\n {!isLoading &&\n <TrafficTable type={'user'} sortItems={this.sortItems} sortBy={sortBy} sortOrder={sortOrder}>\n {userTrafficList.length > 0 && userTrafficList.map((item, index) => {\n return(\n <TrafficTableBody\n key={index}\n userTrafficItem={item}\n type={'user'}\n />\n );\n })}\n </TrafficTable>\n }\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.resetPerPage}\n />\n </Fragment>\n );\n }\n}\n\nexport default UsersTraffic;\n","import React, { Fragment } from 'react';\nimport moment from 'moment';\nimport { gettext } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport StatisticNav from './statistic-nav';\nimport StatisticCommonTool from './statistic-common-tool';\nimport Loading from '../../../components/loading';\nimport OrgsTraffic from './statistic-traffic-orgs';\nimport UsersTraffic from './statistic-traffic-users';\nimport StatisticChart from './statistic-chart';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\n\nclass StatisticTraffic extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n filesData: [],\n linkData: [],\n syncData: [],\n webData: [],\n labels: [],\n isLoading: true,\n tabActive: 'system'\n };\n }\n\n changeTabActive = activeName => {\n this.setState({tabActive: activeName});\n }\n\n getActiviesFiles = (startTime, endTime, groupBy) => {\n seafileAPI.sysAdminStatisticTraffic(startTime, endTime, groupBy).then((res) => {\n let labels = [];\n let total_upload = [],\n total_download = [],\n link_upload = [],\n link_download = [],\n sync_upload = [],\n sync_download = [],\n web_upload = [],\n web_download = [];\n let data = res.data;\n if (Array.isArray(data)) {\n data.forEach(item => {\n labels.push(moment(item.datetime).format('YYYY-MM-DD'));\n link_upload.push(item['link-file-upload']);\n link_download.push(item['link-file-download']);\n sync_upload.push(item['sync-file-upload']);\n sync_download.push(item['sync-file-download']);\n web_upload.push(item['web-file-upload']);\n web_download.push(item['web-file-download']);\n total_upload.push(item['link-file-upload'] + item['sync-file-upload'] + item['web-file-upload']);\n total_download.push(item['link-file-download'] + item['sync-file-download'] + item['web-file-download']);\n });\n let linkUpload = {\n label: gettext('Upload'),\n data: link_upload,\n borderColor: '#fd913a',\n backgroundColor: '#fd913a'};\n let linkDownload = {\n label: gettext('Download'),\n data: link_download,\n borderColor: '#57cd6b',\n backgroundColor: '#57cd6b'};\n let syncUpload = {\n label: gettext('Upload'),\n data: sync_upload,\n borderColor: '#fd913a',\n backgroundColor: '#fd913a'};\n let syncDownload = {\n label: gettext('Download'),\n data: sync_download,\n borderColor: '#57cd6b',\n backgroundColor: '#57cd6b'};\n let webUpload = {\n label: gettext('Upload'),\n data: web_upload,\n borderColor: '#fd913a',\n backgroundColor: '#fd913a'};\n let webDownload = {\n label: gettext('Download'),\n data: web_download,\n borderColor: '#57cd6b',\n backgroundColor: '#57cd6b'};\n let totalUpload = {\n label: gettext('Upload'),\n data: total_upload,\n borderColor: '#fd913a',\n backgroundColor: '#fd913a'};\n let totalDownload = {\n label: gettext('Download'),\n data: total_download,\n borderColor: '#57cd6b',\n backgroundColor: '#57cd6b'};\n let linkData = [linkUpload, linkDownload];\n let syncData = [syncUpload, syncDownload];\n let webData = [webUpload, webDownload];\n let filesData = [totalUpload, totalDownload];\n this.setState({\n linkData: linkData,\n syncData: syncData,\n webData: webData,\n filesData: filesData,\n labels: labels,\n isLoading: false\n });\n }\n }).catch(err => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n renderCommonTool = () => {\n let { tabActive } = this.state;\n if (tabActive === 'system') {\n return (\n <StatisticCommonTool getActiviesFiles={this.getActiviesFiles}>\n <div className=\"statistic-traffic-tab\">\n <div className={`statistic-traffic-tab-item ${tabActive === 'system' ? 'active' : ''}`} onClick={this.changeTabActive.bind(this, 'system')}>{gettext('System')}</div>\n <div className={`statistic-traffic-tab-item ${tabActive === 'user' ? 'active' : ''}`} onClick={this.changeTabActive.bind(this, 'user')}>{gettext('Users')}</div>\n <div className={`statistic-traffic-tab-item ${tabActive === 'organizations' ? 'active' : ''}`} onClick={this.changeTabActive.bind(this, 'organizations')}>{gettext('Organizations')}</div>\n </div>\n </StatisticCommonTool>\n );\n }\n return (\n <div className=\"statistic-traffic-tab\">\n <div className={`statistic-traffic-tab-item ${tabActive === 'system' ? 'active' : ''}`} onClick={this.changeTabActive.bind(this, 'system')}>{gettext('System')}</div>\n <div className={`statistic-traffic-tab-item ${tabActive === 'user' ? 'active' : ''}`} onClick={this.changeTabActive.bind(this, 'user')}>{gettext('Users')}</div>\n <div className={`statistic-traffic-tab-item ${tabActive === 'organizations' ? 'active' : ''}`} onClick={this.changeTabActive.bind(this, 'organizations')}>{gettext('Organizations')}</div>\n </div>\n );\n }\n\n render() {\n let { labels, filesData, linkData, syncData, webData, isLoading, tabActive } = this.state;\n\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"cur-view-container\">\n <StatisticNav currentItem=\"trafficStatistic\" />\n <div className=\"cur-view-content\">\n {this.renderCommonTool()}\n {isLoading && <Loading />}\n {!isLoading && tabActive === 'system' &&\n <div className=\"statistic-traffic-chart-container\">\n <div className=\"mb-4\">\n {labels.length > 0 &&\n <StatisticChart\n labels={labels}\n filesData={filesData}\n chartTitle={gettext('Total Traffic')}\n suggestedMaxNumbers={10*1000*1000}\n isTitleCallback={true}\n isTicksCallback={true}\n isLegendStatus={true}\n />\n }\n </div>\n <div className=\"mb-4\">\n {labels.length > 0 &&\n <StatisticChart\n labels={labels}\n filesData={webData}\n chartTitle={gettext('Web Traffic')}\n suggestedMaxNumbers={10*1000*1000}\n isTitleCallback={true}\n isTicksCallback={true}\n isLegendStatus={true}\n />\n }\n </div>\n <div className=\"mb-4\">\n {labels.length > 0 &&\n <StatisticChart\n labels={labels}\n filesData={linkData}\n chartTitle={gettext('Share Link Traffic')}\n suggestedMaxNumbers={10*1000*1000}\n isTitleCallback={true}\n isTicksCallback={true}\n isLegendStatus={true}\n />\n }\n </div>\n <div className=\"mb-4\">\n {labels.length > 0 &&\n <StatisticChart\n labels={labels}\n filesData={syncData}\n chartTitle={gettext('Sync Traffic')}\n suggestedMaxNumbers={10*1000*1000}\n isTitleCallback={true}\n isTicksCallback={true}\n isLegendStatus={true}\n />\n }\n </div>\n </div>\n }\n {!isLoading && tabActive === 'user' &&\n <UsersTraffic />\n }\n {!isLoading && tabActive === 'organizations' &&\n <OrgsTraffic />\n }\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default StatisticTraffic;\n","import React, { Fragment } from 'react';\nimport moment from 'moment';\nimport { gettext } from '../../../utils/constants';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport StatisticNav from './statistic-nav';\nimport StatisticCommonTool from './statistic-common-tool';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport StatisticChart from './statistic-chart';\nimport Loading from '../../../components/loading';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\n\nclass StatisticUsers extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n filesData: [],\n labels: [],\n isLoading: true,\n };\n }\n\n getActiviesFiles = (startTime, endTime, groupBy) => {\n let { filesData } = this.state;\n seafileAPI.sysAdminStatisticActiveUsers(startTime, endTime, groupBy).then((res) => {\n let labels = [],\n count = [];\n let data = res.data;\n if (Array.isArray(data)) {\n data.forEach(item => {\n labels.push(moment(item.datetime).format('YYYY-MM-DD'));\n count.push(item.count);\n });\n let userCount = {\n label: gettext('Active Users'),\n data: count,\n borderColor: '#fd913a',\n backgroundColor: '#fd913a'};\n filesData = [userCount];\n }\n this.setState({\n filesData: filesData,\n labels: labels,\n isLoading: false\n });\n }).catch(err => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n let { labels, filesData, isLoading } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"cur-view-container\">\n <StatisticNav currentItem=\"usersStatistic\" />\n <div className=\"cur-view-content\">\n <StatisticCommonTool getActiviesFiles={this.getActiviesFiles} />\n {isLoading && <Loading />}\n {!isLoading && labels.length > 0 &&\n <StatisticChart\n labels={labels}\n filesData={filesData}\n suggestedMaxNumbers={10}\n isLegendStatus={false}\n chartTitle={gettext('Active Users')}\n />\n }\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default StatisticUsers;\n","import React, { Fragment } from 'react';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport moment from 'moment';\nimport StatisticNav from './statistic-nav';\nimport { Button, Input } from 'reactstrap';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nclass StatisticReports extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n month: moment().format('YYYYMM'),\n errorMessage: ''\n };\n }\n\n handleChange = (e) => {\n let month = e.target.value;\n this.setState({\n month: month\n });\n }\n\n onGenerateReports = (type) => {\n let url = siteRoot + 'api/v2.1/admin/statistics/';\n let { month } = this.state;\n if (!month) {\n let errorMessage = gettext('It is required.');\n this.setState({\n errorMessage: errorMessage\n });\n return;\n }\n if (type === 'month') {\n let pattern = /^([012]\\d{3})(0[1-9]|1[012])$/;\n if (!pattern.test(month)) {\n let errorMessage = gettext('Invalid month, should be yyyymm.');\n this.setState({\n errorMessage: errorMessage\n });\n return;\n }\n }\n switch(type) {\n case 'month':\n url += 'system-user-traffic/excel/?month=' + month;\n break;\n case 'storage':\n url += 'system-user-storage/excel/?';\n break;\n }\n this.setState({\n errorMessage: ''\n });\n window.location.href = url;\n }\n\n render() {\n\n let { errorMessage } = this.state;\n return(\n <Fragment>\n <MainPanelTopbar />\n <div className=\"cur-view-container\">\n <StatisticNav currentItem=\"reportsStatistic\" />\n <div className=\"cur-view-content\">\n <div className=\"statistic-reports\">\n <div className=\"statistic-reports-title\">{gettext('Monthly User Traffic')}</div>\n <div className=\"d-flex align-items-center mt-4\">\n <span className=\"statistic-reports-tip\">{gettext('Month:')}</span>\n <Input className=\"statistic-reports-input\" defaultValue={moment().format('YYYYMM')} onChange={this.handleChange} />\n <Button className=\"statistic-reports-submit operation-item\" onClick={this.onGenerateReports.bind(this, 'month')}>{gettext('Create Report')}</Button>\n </div>\n {errorMessage && <div className=\"error\">{errorMessage}</div>}\n </div>\n <div className=\"statistic-reports\">\n <div className=\"statistic-reports-title\">{gettext('User Storage')}</div>\n <Button className=\"mt-4 operation-item\" onClick={this.onGenerateReports.bind(this, 'storage')}>{gettext('Create Report')}</Button>\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default StatisticReports;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext, isPro } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'desktop', urlPart:'desktop-devices', text: gettext('Desktop')},\n {name: 'mobile', urlPart:'mobile-devices', text: gettext('Mobile')}\n ];\n if (isPro) {\n this.navItems.push({name: 'errors', urlPart:'device-errors', text: gettext('Errors')});\n }\n }\n\n render() {\n const { currentItem } = this.props;\n return (\n <div className=\"cur-view-path tab-nav-container\">\n <ul className=\"nav\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item\" key={index}>\n <Link to={`${siteRoot}sys/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { gettext, isPro } from '../../../utils/constants';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\n\nconst propTypes = {\n unlinkDevice: PropTypes.func.isRequired,\n toggleDialog: PropTypes.func.isRequired\n};\n\nclass SysAdminUnlinkDevice extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n inputChecked: false\n };\n }\n\n handleInputChange = (e) => {\n this.setState({\n inputChecked: e.target.checked\n });\n }\n\n unlinkDevice = () => {\n this.props.toggleDialog();\n this.props.unlinkDevice(this.state.inputChecked);\n }\n\n render() {\n const { inputChecked } = this.state;\n const toggle = this.props.toggleDialog;\n return (\n <Modal isOpen={true} toggle={toggle}>\n <ModalHeader toggle={toggle}>{gettext('Unlink device')}</ModalHeader>\n <ModalBody>\n <p>{gettext('Are you sure you want to unlink this device?')}</p>\n {isPro &&\n <div className=\"d-flex align-items-center\">\n <input id=\"delete-files\" className=\"mr-1\" type=\"checkbox\" checked={inputChecked} onChange={this.handleInputChange} />\n <label htmlFor=\"delete-files\" className=\"m-0\">{gettext('Delete files from this device the next time it comes online.')}</label>\n </div>\n }\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.unlinkDevice}>{gettext('Unlink')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminUnlinkDevice.propTypes = propTypes;\n\nexport default SysAdminUnlinkDevice;\n","import React, { Component, Fragment } from 'react';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport { Utils } from '../../../utils/utils';\nimport EmptyTip from '../../../components/empty-tip';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport SysAdminUnlinkDevice from '../../../components/dialog/sysadmin-dialog/sysadmin-unlink-device-dialog';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPageDevicesList = () => {\n this.props.getDevicesListByPage(this.props.pageInfo.current_page - 1);\n }\n\n getNextPageDevicesList = () => {\n this.props.getDevicesListByPage(this.props.pageInfo.current_page + 1);\n }\n\n render() {\n const { loading, errorMsg, items, pageInfo, curPerPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No connected devices')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"19%\">{gettext('User')}</th>\n <th width=\"19%\">{gettext('Platform')}{' / '}{gettext('Version')}</th>\n <th width=\"19%\">{gettext('Device Name')}</th>\n <th width=\"19%\">{gettext('IP')}</th>\n <th width=\"19%\">{gettext('Last Access')}</th>\n <th width=\"5%\">{/*Operations*/}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item key={index} item={item} />);\n })}\n </tbody>\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPageDevicesList}\n gotoNextPage={this.getNextPageDevicesList}\n currentPage={pageInfo.current_page}\n hasNextPage={pageInfo.has_next_page}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n unlinked: false,\n isOpIconShown: false,\n isUnlinkDeviceDialogOpen: false\n };\n }\n\n handleMouseOver = () => {\n this.setState({isOpIconShown: true});\n }\n\n handleMouseOut = () => {\n this.setState({isOpIconShown: false});\n }\n\n handleUnlink = (e) => {\n e.preventDefault();\n if (this.props.item.is_desktop_client) {\n this.toggleUnlinkDeviceDialog();\n } else {\n this.unlinkDevice(true);\n }\n }\n\n toggleUnlinkDeviceDialog = () => {\n this.setState({isUnlinkDeviceDialogOpen: !this.state.isUnlinkDeviceDialogOpen});\n }\n\n unlinkDevice = (deleteFiles) => {\n const { platform, device_id, user } = this.props.item;\n seafileAPI.sysAdminUnlinkDevice(platform, device_id, user, deleteFiles).then((res) => {\n this.setState({unlinked: true});\n let message = gettext('Successfully unlinked the device.');\n toaster.success(message);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n const item = this.props.item;\n const { unlinked, isUnlinkDeviceDialogOpen, isOpIconShown } = this.state;\n\n if (unlinked) {\n return null;\n }\n\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>\n <td>{item.user_name}</td>\n <td>{item.platform}{' / '}{item.client_version}</td>\n <td>{item.device_name}</td>\n <td>{item.last_login_ip}</td>\n <td>\n <span title={moment(item.last_accessed).format('llll')}>{moment(item.last_accessed).fromNow()}</span>\n </td>\n <td>\n <a href=\"#\" className={`sf2-icon-delete action-icon ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Unlink')} onClick={this.handleUnlink}></a>\n </td>\n </tr>\n {isUnlinkDeviceDialogOpen &&\n <SysAdminUnlinkDevice\n unlinkDevice={this.unlinkDevice}\n toggleDialog={this.toggleUnlinkDeviceDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass DevicesByPlatform extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n devicesData: {},\n pageInfo: {},\n perPage: 25\n };\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage = 1, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getDevicesListByPage(this.state.currentPage);\n });\n }\n\n getDevicesListByPage = (page) => {\n let platform = this.props.devicesPlatform;\n let per_page = this.state.perPage;\n seafileAPI.sysAdminListDevices(platform, page, per_page).then((res) => {\n this.setState({\n devicesData: res.data.devices,\n pageInfo: res.data.page_info,\n loading: false\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getDevicesListByPage(1);\n });\n }\n\n render() {\n return (\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.devicesData}\n getDevicesListByPage={this.getDevicesListByPage}\n curPerPage={this.state.perPage}\n resetPerPage={this.resetPerPage}\n pageInfo={this.state.pageInfo}\n />\n </div>\n );\n }\n}\n\nexport default DevicesByPlatform;\n","import React, { Component, Fragment } from 'react';\nimport DevicesNav from './devices-nav';\nimport DevicesByPlatform from './devices-by-platform';\nimport MainPanelTopbar from '../main-panel-topbar';\n\nclass DesktopDevices extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <DevicesNav currentItem=\"desktop\" />\n <DevicesByPlatform\n devicesPlatform={'desktop'}\n />\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default DesktopDevices;\n","import React, { Component, Fragment } from 'react';\nimport DevicesNav from './devices-nav';\nimport DevicesByPlatform from './devices-by-platform';\nimport MainPanelTopbar from '../main-panel-topbar';\n\nclass MobileDevices extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <DevicesNav currentItem=\"mobile\" />\n <DevicesByPlatform\n devicesPlatform={'mobile'}\n />\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default MobileDevices;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot } from '../../utils/constants';\n\nconst propTypes = {\n email: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired\n};\n\nclass UserLink extends Component {\n\n render() {\n return <Link to={`${siteRoot}sys/users/${encodeURIComponent(this.props.email)}/`}>{this.props.name}</Link>;\n }\n}\n\nUserLink.propTypes = propTypes;\n\nexport default UserLink;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport { Utils } from '../../../utils/utils';\nimport EmptyTip from '../../../components/empty-tip';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport { Link } from '@reach/router';\nimport DevicesNav from './devices-nav';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No sync errors')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"16%\">{gettext('User')}</th>\n <th width=\"20%\">{gettext('Device')}{' / '}{gettext('Version')}</th>\n <th width=\"16%\">{gettext('IP')}</th>\n <th width=\"16%\">{gettext('Library')}</th>\n <th width=\"16%\">{gettext('Error')}</th>\n <th width=\"16%\">{gettext('Time')}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item key={index} item={item} />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n };\n }\n\n handleMouseOver = () => {\n this.setState({isOpIconShown: true});\n }\n\n handleMouseOut = () => {\n this.setState({isOpIconShown: false});\n }\n\n render() {\n let item = this.props.item;\n return (\n <tr onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>\n <td><UserLink email={item.email} name={item.name} /></td>\n <td>{item.device_name}{' / '}{item.client_version}</td>\n <td>{item.device_ip}</td>\n <td><Link to={`${siteRoot}sysadmin/#libs/${item.repo_id}`}>{item.repo_name}</Link></td>\n <td>{item.error_msg}</td>\n <td>\n <span className=\"item-meta-info\" title={moment(item.last_accessed).format('llll')}>{moment(item.error_time).fromNow()}</span>\n </td>\n </tr>\n );\n }\n}\n\nclass DeviceErrors extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n devicesErrors: [],\n isCleanBtnShown: false\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminListDeviceErrors().then((res) => {\n this.setState({\n loading: false,\n devicesErrors: res.data,\n isCleanBtnShown: res.data.length > 0\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n clean = () => {\n seafileAPI.sysAdminClearDeviceErrors().then((res) => {\n this.setState({\n devicesErrors: [],\n isCleanBtnShown: false\n });\n let message = gettext('Successfully cleaned all errors.');\n toaster.success(message);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n return (\n <Fragment>\n {this.state.isCleanBtnShown ? (\n <MainPanelTopbar>\n <Button className=\"operation-item\" onClick={this.clean}>{gettext('Clean')}</Button>\n </MainPanelTopbar>\n ) : (\n <MainPanelTopbar />\n )}\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <DevicesNav currentItem=\"errors\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.devicesErrors}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default DeviceErrors;\n","import React, { Component, Fragment } from 'react';\nimport Account from '../../components/common/account';\nimport { gettext, siteRoot, mediaUrl } from '../../utils/constants';\nimport { Utils } from '../../utils/utils';\nimport { seafileAPI } from '../../utils/seafile-api';\nimport toaster from '../../components/toast';\nimport moment from 'moment';\n\nclass AbuseReports extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n abuseReportList: [],\n };\n }\n\n listAbuseReports = () => {\n seafileAPI.sysAdminListAbuseReports().then((res) => {\n this.setState({\n abuseReportList: res.data.abuse_report_list,\n });\n }).catch((error) => {\n this.handleError(error);\n });\n };\n\n updateAbuseReport = (handled, abuseReportId) => {\n seafileAPI.sysAdminUpdateAbuseReport(handled, abuseReportId).then((res) => {\n const abuseReportList = this.state.abuseReportList.map((item, index) => {\n if (item.id === abuseReportId) {\n item.handled = res.data.handled;\n }\n return item;\n });\n this.setState({\n abuseReportList: abuseReportList,\n });\n }).catch((error) => {\n this.handleError(error);\n });\n };\n\n handleError = (e) => {\n if (e.response) {\n toaster.danger(e.response.data.error_msg || e.response.data.detail || gettext('Error'), {duration: 3});\n } else {\n toaster.danger(gettext('Please check the network.'), {duration: 3});\n }\n };\n\n componentDidMount() {\n this.listAbuseReports();\n }\n\n render() {\n const isDesktop = Utils.isDesktop();\n const AbuseReportList = this.state.abuseReportList.map((item, index) => {\n const handled = (!item.handled).toString();\n const abuseReportId = item.id;\n const fileUrl = siteRoot + 'lib/' + item.repo_id + '/file' + item.file_path;\n return (\n <tr key={index}>\n <td>{item.repo_name}</td>\n <td><a href={fileUrl} target=\"_blank\">{item.file_path}</a></td>\n <td>{item.reporter}</td>\n <td>{item.abuse_type}</td>\n <td>{item.description}</td>\n <td>{moment(item.time).format('YYYY-MM-DD')}</td>\n <td><p onClick={this.updateAbuseReport.bind(this, handled, abuseReportId)}\n className=\"op-target ellipsis ellipsis-op-target cursor-pointer\"\n >{gettext(item.handled.toString())}</p></td>\n </tr>\n );\n });\n\n return (\n <Fragment>\n <div className=\"main-panel-north\">\n <div className=\"cur-view-toolbar\">\n <span className=\"sf2-icon-menu side-nav-toggle hidden-md-up d-md-none\" title=\"Side Nav Menu\"></span>\n </div>\n <div className=\"common-toolbar\">\n <Account isAdminPanel={true}/>\n </div>\n </div>\n <div className=\"main-panel-center\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Abuse Reports')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <table className={`table-hover${isDesktop ? '' : ' table-thead-hidden'}`}>\n <thead>\n {isDesktop ?\n <tr>\n <th width=\"20%\">{gettext('Library')}</th>\n <th width=\"20%\">{gettext('File')}</th>\n <th width=\"10%\">{gettext('Reporter')}</th>\n <th width=\"15%\">{gettext('Abuse Type')}</th>\n <th width=\"20%\">{gettext('Description')}</th>\n <th width=\"10%\">{gettext('Time')}</th>\n <th width=\"5%\">{gettext('Handled')}</th>\n </tr>\n :\n <tr>\n <th width=\"92%\"></th>\n <th width=\"8%\"></th>\n </tr>\n }\n </thead>\n <tbody>\n {AbuseReportList}\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default AbuseReports;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Alert, Modal, ModalHeader, ModalBody, ModalFooter, Button, Form, FormGroup, Input, InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n updateQuota: PropTypes.func.isRequired\n};\n\nclass SetQuotaDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n quota: '',\n isSubmitBtnActive: false\n };\n }\n\n toggle = () => {\n this.props.toggle();\n }\n\n handleQuotaChange = (e) => {\n const value = e.target.value;\n this.setState({\n quota: value,\n isSubmitBtnActive: value.trim() != ''\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key == 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n handleSubmit = () => {\n this.props.updateQuota(this.state.quota.trim());\n this.toggle();\n }\n\n render() {\n const { quota, isSubmitBtnActive } = this.state;\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('Set Quota')}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <InputGroup>\n <Input\n type=\"text\"\n className=\"form-control\"\n value={quota}\n onKeyPress={this.handleKeyPress}\n onChange={this.handleQuotaChange}\n />\n <InputGroupAddon addonType=\"append\">\n <InputGroupText>MB</InputGroupText>\n </InputGroupAddon>\n </InputGroup>\n <p className=\"small text-secondary mt-2 mb-2\">\n {gettext('An integer that is greater than or equal to 0.')}\n <br />\n {gettext('Tip: 0 means default limit')}\n </p>\n </FormGroup>\n </Form>\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSetQuotaDialog.propTypes = propTypes;\n\nexport default SetQuotaDialog;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Alert, Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap';\nimport { gettext, siteRoot } from '../../../utils/constants';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n importUserInBatch: PropTypes.func.isRequired,\n};\n\nclass SysAdminImportUserDialog extends React.Component {\n constructor(props) {\n super(props);\n this.fileInputRef = React.createRef();\n this.state = {\n errorMsg: ''\n };\n }\n\n toggle = () => {\n this.props.toggle();\n }\n\n openFileInput = () => {\n this.fileInputRef.current.click();\n }\n\n uploadFile = (e) => {\n // no file selected\n if (!this.fileInputRef.current.files.length) {\n return;\n }\n // check file extension\n let fileName = this.fileInputRef.current.files[0].name;\n if(fileName.substr(fileName.lastIndexOf('.') + 1) != 'xlsx') {\n this.setState({\n errorMsg: gettext('Please choose a .xlsx file.')\n });\n return;\n }\n const file = this.fileInputRef.current.files[0];\n this.props.importUserInBatch(file);\n this.toggle();\n }\n\n render() {\n let { errorMsg } = this.state;\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('Import users from a .xlsx file')}</ModalHeader>\n <ModalBody>\n <p><a className=\"text-secondary small\" href={`${siteRoot}useradmin/batchadduser/example/`}>{gettext('Download an example file')}</a></p>\n <button className=\"btn btn-outline-primary\" onClick={this.openFileInput}>{gettext('Upload file')}</button>\n <input className=\"d-none\" type=\"file\" onChange={this.uploadFile} ref={this.fileInputRef} />\n {errorMsg && <Alert color=\"danger\">{errorMsg}</Alert>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminImportUserDialog.propTypes = propTypes;\n\nexport default SysAdminImportUserDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { gettext } from '../../utils/constants';\nimport SelectEditor from './select-editor';\n\nconst propTypes = {\n isTextMode: PropTypes.bool.isRequired,\n isEditIconShow: PropTypes.bool.isRequired,\n roleOptions: PropTypes.array.isRequired,\n currentRole: PropTypes.string.isRequired,\n onRoleChanged: PropTypes.func.isRequired\n};\n\nclass SysAdminUserRoleEditor extends React.Component {\n\n translateRoles = (role) => {\n switch (role) {\n case 'default':\n return gettext('Default');\n case 'guest':\n return gettext('Guest');\n default:\n return role;\n }\n }\n\n render() {\n return (\n <SelectEditor\n isTextMode={this.props.isTextMode}\n isEditIconShow={this.props.isEditIconShow}\n options={this.props.roleOptions}\n currentOption={this.props.currentRole}\n onOptionChanged={this.props.onRoleChanged}\n translateOption={this.translateRoles}\n />\n );\n }\n}\n\nSysAdminUserRoleEditor.propTypes = propTypes;\n\nexport default SysAdminUserRoleEditor;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Alert, Modal, ModalHeader, ModalBody, ModalFooter, Button, Form, FormGroup, Label, Input, InputGroup, InputGroupAddon } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport SysAdminUserRoleEditor from '../../../components/select-editor/sysadmin-user-role-editor';\n\nconst propTypes = {\n toggleDialog: PropTypes.func.isRequired,\n addUser: PropTypes.func.isRequired\n};\n\nclass SysAdminAddUserDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n errorMsg: '',\n isPasswordVisible: false,\n password: '',\n passwordAgain: '',\n email: '',\n name: '',\n role: 'default',\n isSubmitBtnActive: false\n };\n }\n\n checkSubmitBtnActive = () => {\n const { email, password, passwordAgain } = this.state;\n let btnActive = true;\n if (email.trim() &&\n password.trim() &&\n passwordAgain.trim()) {\n btnActive = true;\n } else {\n btnActive = false;\n }\n this.setState({\n isSubmitBtnActive: btnActive\n });\n }\n\n toggle = () => {\n this.props.toggleDialog();\n }\n\n togglePasswordVisible = () => {\n this.setState({isPasswordVisible: !this.state.isPasswordVisible});\n }\n\n inputPassword = (e) => {\n let passwd = e.target.value;\n this.setState({\n password: passwd,\n errorMsg: ''\n }, this.checkSubmitBtnActive);\n }\n\n inputPasswordAgain = (e) => {\n let passwd = e.target.value;\n this.setState({\n passwordAgain: passwd,\n errorMsg: ''\n }, this.checkSubmitBtnActive);\n }\n\n generatePassword = () => {\n let val = Utils.generatePassword(8);\n this.setState({\n password: val,\n passwordAgain: val\n }, this.checkSubmitBtnActive);\n }\n\n inputEmail = (e) => {\n let email = e.target.value;\n this.setState({\n email: email\n }, this.checkSubmitBtnActive);\n }\n\n inputName = (e) => {\n let name = e.target.value;\n this.setState({\n name: name\n });\n }\n\n updateRole = (role) => {\n this.setState({\n role: role\n });\n }\n\n handleSubmit = () => {\n const { email, password, passwordAgain, name, role } = this.state;\n if (password != passwordAgain) {\n this.setState({errorMsg: gettext('Passwords do not match.')});\n return;\n }\n let data = {\n email: email.trim(),\n name: name.trim(),\n password: password.trim()\n };\n if (this.props.showRole) {\n data.role = role;\n }\n this.props.addUser(data);\n this.toggle();\n }\n\n render() {\n const { dialogTitle, showRole } = this.props;\n const {\n errorMsg, isPasswordVisible,\n email, name, role, password, passwordAgain,\n isSubmitBtnActive\n } = this.state;\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{dialogTitle || gettext('Add Member')}</ModalHeader>\n <ModalBody>\n <Form autoComplete=\"off\">\n <FormGroup>\n <Label>{gettext('Email')}</Label>\n <Input value={email} onChange={this.inputEmail} />\n </FormGroup>\n <FormGroup>\n <Label>{gettext('Name(optional)')}</Label>\n <Input type=\"text\" value={name} onChange={this.inputName} />\n </FormGroup>\n {showRole &&\n <FormGroup>\n <Label>\n {gettext('Role')}\n <span className=\"small text-secondary ml-1 fas fa-question-circle\" title={gettext('You can also add a user as a guest, who will not be allowed to create libraries and groups.')}></span>\n </Label>\n <SysAdminUserRoleEditor\n isTextMode={false}\n isEditIconShow={false}\n currentRole={role}\n roleOptions={this.props.availableRoles}\n onRoleChanged={this.updateRole}\n />\n </FormGroup>\n }\n <FormGroup>\n <Label>{gettext('Password')}</Label>\n <InputGroup>\n <Input autoComplete=\"new-password\" type={isPasswordVisible ? 'text' : 'password'} value={password || ''} onChange={this.inputPassword} />\n <InputGroupAddon addonType=\"append\">\n <Button className=\"mt-0\" onClick={this.togglePasswordVisible}><i className={`link-operation-icon fas ${this.state.isPasswordVisible ? 'fa-eye': 'fa-eye-slash'}`}></i></Button>\n <Button className=\"mt-0\" onClick={this.generatePassword}><i className=\"link-operation-icon fas fa-magic\"></i></Button>\n </InputGroupAddon>\n </InputGroup>\n </FormGroup>\n <FormGroup>\n <Label>{gettext('Password again')}</Label>\n <Input type={isPasswordVisible ? 'text' : 'password'} value={passwordAgain || ''} onChange={this.inputPasswordAgain} />\n </FormGroup>\n </Form>\n {errorMsg && <Alert color=\"danger\">{errorMsg}</Alert>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminAddUserDialog.propTypes = propTypes;\n\nexport default SysAdminAddUserDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap';\nimport UserSelect from '../../user-select';\nimport { gettext } from '../../../utils/constants';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n addAdminInBatch: PropTypes.func.isRequired,\n};\n\nclass SysAdminBatchAddAdminDialog extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n options: null,\n isSubmitBtnActive: false\n };\n }\n\n toggle = () => {\n this.props.toggle();\n }\n\n handleSelectChange = (options) => {\n this.setState({\n options: options,\n isSubmitBtnActive: options.length > 0\n });\n }\n\n handleSubmit = () => {\n this.props.addAdminInBatch(this.state.options.map(item => item.email));\n this.toggle();\n }\n\n handleKeyPress = (e) => {\n if (e.key === 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('Add Admin')}</ModalHeader>\n <ModalBody>\n <UserSelect\n isMulti={true}\n className=\"reviewer-select\"\n placeholder={gettext('Search users...')}\n onSelectChange={this.handleSelectChange}\n />\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!this.state.isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminBatchAddAdminDialog.propTypes = propTypes;\n\nexport default SysAdminBatchAddAdminDialog;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap';\nimport { gettext } from '../../utils/constants';\n\nconst propTypes = {\n title: PropTypes.string.isRequired,\n message: PropTypes.string.isRequired,\n confirmBtnText: PropTypes.string,\n executeOperation: PropTypes.func.isRequired,\n toggleDialog: PropTypes.func.isRequired\n};\n\nclass CommonOperationConfirmationDialog extends Component {\n\n toggle = () => {\n this.props.toggleDialog();\n }\n\n executeOperation = () => {\n this.toggle();\n this.props.executeOperation();\n }\n\n render() {\n let { title, message, confirmBtnText } = this.props;\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{title}</ModalHeader>\n <ModalBody>\n <p dangerouslySetInnerHTML={{__html: message}}></p>\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.executeOperation}>{confirmBtnText || gettext('Confirm')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nCommonOperationConfirmationDialog.propTypes = propTypes;\n\nexport default CommonOperationConfirmationDialog;\n","class SysAdminUser {\n constructor(object) {\n this.email = object.email;\n this.name = object.name;\n this.contact_email = object.contact_email;\n this.login_id = object.login_id;\n this.last_login = object.last_login;\n this.last_access_time = object.last_access_time;\n this.create_time = object.create_time;\n this.is_active = object.is_active;\n this.is_staff = object.is_staff;\n this.reference_id = object.reference_id;\n this.department = object.department;\n this.quota_total = object.quota_total;\n this.quota_usage = object.quota_usage;\n this.role = object.role;\n this.institution = object.institution;\n if (object.org_id) {\n this.org_id = object.org_id;\n }\n if (object.org_name) {\n this.org_name = object.org_name;\n }\n this.isSelected = false;\n }\n}\n\nexport default SysAdminUser;\n","\nclass SysAdminAdminUser {\n constructor(object) {\n this.email = object.email;\n this.name = object.name;\n this.contact_email = object.contact_email;\n this.login_id = object.login_id;\n this.last_login = object.last_login;\n this.last_access_time = object.last_access_time;\n this.create_time = object.create_time;\n this.is_active = object.is_active;\n this.is_staff = object.is_staff;\n this.quota_total = object.quota_total;\n this.quota_usage = object.quota_usage;\n this.admin_role = object.admin_role;\n this.isSelected = false;\n }\n}\n\nexport default SysAdminAdminUser;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n placeholder: PropTypes.string.isRequired,\n submit: PropTypes.func.isRequired\n};\n\nclass Search extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n value: ''\n };\n }\n\n handleInputChange = (e) => {\n this.setState({\n value: e.target.value\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key == 'Enter') {\n e.preventDefault();\n this.handleSubmit();\n }\n }\n\n handleSubmit = () => {\n const value = this.state.value.trim();\n if (!value) {\n return false;\n }\n this.props.submit(value);\n }\n\n render() {\n return (\n <div className=\"input-icon\">\n <i className=\"d-flex input-icon-addon fas fa-search\"></i>\n <input\n type=\"text\"\n className=\"form-control search-input h-6 mr-1\"\n style={{width: '15rem'}}\n placeholder={this.props.placeholder}\n value={this.state.value}\n onChange={this.handleInputChange}\n onKeyPress={this.handleKeyPress}\n autoComplete=\"off\"\n />\n </div>\n );\n }\n}\n\nSearch.propTypes = propTypes;\n\nexport default Search;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext, haveLDAP, isDefaultAdmin } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'database', urlPart: 'users', text: gettext('Database')}\n ];\n if (haveLDAP) {\n this.navItems.push(\n {name: 'ldap', urlPart: 'users/ldap', text: gettext('LDAP')},\n {name: 'ldap-imported', urlPart: 'users/ldap-imported', text: gettext('LDAP(imported)')}\n );\n }\n if (isDefaultAdmin) {\n this.navItems.push(\n {name: 'admin', urlPart: 'users/admins', text: gettext('Admin')}\n );\n }\n }\n\n render() {\n const { currentItem } = this.props;\n return (\n <div className=\"cur-view-path tab-nav-container\">\n <ul className=\"nav\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item\" key={index}>\n <Link to={`${siteRoot}sys/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { gettext } from '../../utils/constants';\nimport SelectEditor from './select-editor';\n\nconst propTypes = {\n isTextMode: PropTypes.bool.isRequired,\n isEditIconShow: PropTypes.bool.isRequired,\n statusOptions: PropTypes.array.isRequired,\n currentStatus: PropTypes.string.isRequired,\n onStatusChanged: PropTypes.func.isRequired\n};\n\nclass SysAdminUserStatusEditor extends React.Component {\n\n translateStatus = (status) => {\n switch (status) {\n case 'active':\n return gettext('Active');\n case 'inactive':\n return gettext('Inactive');\n }\n }\n\n render() {\n return (\n <SelectEditor\n isTextMode={this.props.isTextMode}\n isEditIconShow={this.props.isEditIconShow}\n options={this.props.statusOptions}\n currentOption={this.props.currentStatus}\n onOptionChanged={this.props.onStatusChanged}\n translateOption={this.translateStatus}\n />\n );\n }\n}\n\nSysAdminUserStatusEditor.propTypes = propTypes;\n\nexport default SysAdminUserStatusEditor;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Dropdown, DropdownMenu, DropdownToggle, DropdownItem } from 'reactstrap';\nimport { gettext } from '../../utils/constants';\nimport { Utils } from '../../utils/utils';\n\nconst propTypes = {\n onFreezedItem: PropTypes.func.isRequired,\n onUnfreezedItem: PropTypes.func.isRequired,\n onMenuItemClick: PropTypes.func.isRequired,\n operations: PropTypes.array.isRequired,\n translateOperations: PropTypes.func.isRequired\n};\n\nclass OpMenu extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemMenuShow: false\n };\n }\n\n onMenuItemClick = (e) => {\n let operation = Utils.getEventData(e, 'op');\n this.props.onMenuItemClick(operation);\n }\n\n onDropdownToggleClick = (e) => {\n this.toggleOperationMenu(e);\n }\n\n toggleOperationMenu = (e) => {\n this.setState(\n {isItemMenuShow: !this.state.isItemMenuShow},\n () => {\n if (this.state.isItemMenuShow) {\n this.props.onFreezedItem();\n } else {\n this.props.onUnfreezedItem();\n }\n }\n );\n }\n\n render() {\n const { operations, translateOperations } = this.props;\n return (\n <Dropdown isOpen={this.state.isItemMenuShow} toggle={this.toggleOperationMenu}>\n <DropdownToggle\n tag=\"i\"\n className=\"d-flex w-5 h-5 align-items-center justify-content-center sf-dropdown-toggle fa fa-ellipsis-v\"\n title={gettext('More Operations')}\n data-toggle=\"dropdown\"\n aria-expanded={this.state.isItemMenuShow}\n />\n <DropdownMenu className=\"my-1 mr-2\">\n {operations.map((item, index )=> {\n return (<DropdownItem key={index} data-op={item} onClick={this.onMenuItemClick}>{translateOperations(item)}</DropdownItem>);\n })}\n </DropdownMenu>\n </Dropdown>\n );\n }\n}\n\nOpMenu.propTypes = propTypes;\n\nexport default OpMenu;\n","import React, { Component, Fragment } from 'react';\nimport moment from 'moment';\nimport { Link } from '@reach/router';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { isPro, username, gettext, multiInstitution, siteRoot } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport SysAdminUserStatusEditor from '../../../components/select-editor/sysadmin-user-status-editor';\nimport SysAdminUserRoleEditor from '../../../components/select-editor/sysadmin-user-role-editor';\nimport SelectEditor from '../../../components/select-editor/select-editor';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport SysAdminUserSetQuotaDialog from '../../../components/dialog/sysadmin-dialog/set-quota';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport UserLink from '../user-link';\n\nconst { availableRoles, availableAdminRoles, institutions } = window.sysadmin.pageOptions;\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n getPreviousPage = () => {\n this.props.getListByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getListByPage(this.props.currentPage + 1);\n }\n\n sortByQuotaUsage = (e) => {\n e.preventDefault();\n this.props.sortByQuotaUsage();\n }\n\n render() {\n const {\n isAdmin, loading, errorMsg, items, isAllUsersSelected,\n curPerPage, hasNextPage, currentPage,\n sortBy, sortOrder\n } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No users')}</h2>\n </EmptyTip>\n );\n\n\n let columns = [];\n\n let sortIcon;\n if (sortBy == '') {\n // initial sort icon\n sortIcon = <span className=\"fas fa-sort\"></span>;\n } else {\n sortIcon = <span className={`fas ${sortOrder == 'asc' ? 'fa-caret-up' : 'fa-caret-down'}`}></span>;\n }\n const spaceText = gettext('Space Used');\n const spaceEl =\n sortBy != undefined ? // only offer 'sort' for 'DB' & 'LDAPImported' users\n <a className=\"d-inline-block table-sort-op\" href=\"#\" onClick={this.sortByQuotaUsage}>{spaceText} {sortIcon}</a> :\n spaceText;\n const colSpaceText = <Fragment>{spaceEl}{` / ${gettext('Quota')}`}</Fragment>;\n\n const colNameText = `${gettext('Name')} / ${gettext('Contact Email')}`;\n const colCreatedText = `${gettext('Created At')} / ${gettext('Last Login')} / ${gettext('Last Access')}`;\n if (isPro) {\n columns.push(\n {width: '20%', text: colNameText},\n {width: '15%', text: gettext('Status')},\n {width: '15%', text: gettext('Role')}\n );\n } else {\n columns.push(\n {width: '30%', text: colNameText},\n {width: '20%', text: gettext('Status')}\n );\n }\n if (multiInstitution && !isAdmin) {\n columns.push(\n {width: '14%', text: colSpaceText},\n {width: '14%', text: gettext('Institution')},\n {width: '14%', text: colCreatedText},\n {width: '5%', text: ''}\n );\n } else {\n columns.push(\n {width: '20%', text: colSpaceText},\n {width: '22%', text: colCreatedText},\n {width: '5%', text: ''}\n );\n }\n\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"3%\" className=\"pl-2\">\n <input type=\"checkbox\" className=\"vam\" onChange={this.props.toggleSelectAllUsers} checked={isAllUsersSelected} />\n </th>\n {columns.map((item, index) => {\n return <th width={item.width} key={index}>{item.text}</th>;\n })}\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n updateUser={this.props.updateUser}\n deleteUser={this.props.deleteUser}\n updateAdminRole={this.props.updateAdminRole}\n revokeAdmin={this.props.revokeAdmin}\n onUserSelected={this.props.onUserSelected}\n isAdmin={this.props.isAdmin}\n isLDAPImported={this.props.isLDAPImported}\n />);\n })}\n </tbody>\n </table>\n {(!this.props.isAdmin && !this.props.isSearchResult) &&\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n }\n </Fragment>\n );\n\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isSetQuotaDialogOpen: false,\n isDeleteUserDialogOpen: false,\n isResetUserPasswordDialogOpen: false,\n isRevokeAdminDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n toggleSetQuotaDialog = () => {\n this.setState({isSetQuotaDialogOpen: !this.state.isSetQuotaDialogOpen});\n }\n\n toggleDeleteUserDialog = () => {\n this.setState({isDeleteUserDialogOpen: !this.state.isDeleteUserDialogOpen});\n }\n\n toggleResetUserPasswordDialog = () => {\n this.setState({isResetUserPasswordDialogOpen: !this.state.isResetUserPasswordDialogOpen});\n }\n\n toggleRevokeAdminDialog = () => {\n this.setState({isRevokeAdminDialogOpen: !this.state.isRevokeAdminDialogOpen});\n }\n\n onUserSelected = () => {\n this.props.onUserSelected(this.props.item);\n }\n\n updateStatus= (value) => {\n const isActive = value == 'active';\n if (isActive) {\n toaster.notify(gettext('It may take some time, please wait.'));\n }\n this.props.updateUser(this.props.item.email, 'is_active', isActive);\n }\n\n updateRole = (value) => {\n this.props.updateUser(this.props.item.email, 'role', value);\n }\n\n updateAdminRole = (value) => {\n this.props.updateAdminRole(this.props.item.email, value);\n }\n\n translateAdminRole = (role) => {\n switch (role) {\n case 'default_admin':\n return gettext('Default Admin');\n case 'system_admin':\n return gettext('System Admin');\n case 'daily_admin':\n return gettext('Daily Admin');\n case 'audit_admin':\n return gettext('Audit Admin');\n default:\n return role;\n }\n }\n\n updateInstitution = (value) => {\n this.props.updateUser(this.props.item.email, 'institution', value);\n }\n\n translateInstitution = (inst) => {\n return inst;\n }\n\n updateQuota = (value) => {\n this.props.updateUser(this.props.item.email, 'quota_total', value);\n }\n\n deleteUser = () => {\n toaster.notify(gettext('It may take some time, please wait.'));\n this.props.deleteUser(this.props.item.email);\n }\n\n resetPassword = () => {\n toaster.notify(gettext('It may take some time, please wait.'));\n seafileAPI.sysAdminResetUserPassword(this.props.item.email).then(res => {\n toaster.success(res.data.reset_tip);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n revokeAdmin = () => {\n const { item } = this.props;\n this.props.revokeAdmin(item.email, item.name);\n }\n\n getMenuOperations = () => {\n const {\n isAdmin, isLDAPImported,\n isSearchResult, item\n } = this.props;\n let list = ['Delete'];\n if (!isLDAPImported ||\n (isSearchResult && item.source == 'db')) {\n list.push('Reset Password');\n }\n if (isAdmin) {\n list = ['Revoke Admin'];\n }\n return list;\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch (item) {\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n case 'Reset Password':\n translateResult = gettext('Reset Password');\n break;\n case 'Revoke Admin':\n translateResult = gettext('Revoke Admin');\n break;\n }\n\n return translateResult;\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Delete':\n this.toggleDeleteUserDialog();\n break;\n case 'Reset Password':\n this.toggleResetUserPasswordDialog();\n break;\n case 'Revoke Admin':\n this.toggleRevokeAdminDialog();\n break;\n default:\n break;\n }\n }\n\n render() {\n const { item, isAdmin } = this.props;\n const {\n isOpIconShown,\n isSetQuotaDialogOpen,\n isDeleteUserDialogOpen,\n isResetUserPasswordDialogOpen,\n isRevokeAdminDialogOpen\n } = this.state;\n\n const itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n const deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', itemName);\n const resetPasswordDialogMsg = gettext('Are you sure you want to reset the password of {placeholder} ?').replace('{placeholder}', itemName);\n const revokeAdminDialogMsg = gettext('Are you sure you want to revoke the admin permission of {placeholder} ?').replace('{placeholder}', itemName);\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td className=\"pl-2\">\n <input type=\"checkbox\" className=\"vam\" onChange={this.onUserSelected} checked={item.isSelected} />\n </td>\n <td>\n <UserLink email={item.email} name={item.name} />\n {item.contact_email &&\n <Fragment>\n <br />\n {item.contact_email}\n </Fragment>}\n {item.org_id &&\n <Fragment>\n <br />\n <Link to={`${siteRoot}sys/organizations/${item.org_id}/info/`}>({item.org_name})</Link>\n </Fragment>\n }\n </td>\n <td>\n <SysAdminUserStatusEditor\n isTextMode={true}\n isEditIconShow={isOpIconShown}\n currentStatus={item.is_active ? 'active' : 'inactive'}\n statusOptions={['active', 'inactive']}\n onStatusChanged={this.updateStatus}\n />\n </td>\n {isPro &&\n <td>\n {isAdmin ?\n <SelectEditor\n isTextMode={true}\n isEditIconShow={isOpIconShown}\n options={availableAdminRoles}\n currentOption={item.admin_role}\n onOptionChanged={this.updateAdminRole}\n translateOption={this.translateAdminRole}\n /> :\n <SysAdminUserRoleEditor\n isTextMode={true}\n isEditIconShow={isOpIconShown}\n currentRole={item.role}\n roleOptions={availableRoles}\n onRoleChanged={this.updateRole}\n />\n }\n </td>\n }\n <td>\n {`${Utils.bytesToSize(item.quota_usage)} / ${item.quota_total > 0 ? Utils.bytesToSize(item.quota_total) : '--'}`}\n <span\n title={gettext('Edit')}\n className={`fa fa-pencil-alt attr-action-icon ${isOpIconShown ? '' : 'invisible'}`}\n onClick={this.toggleSetQuotaDialog}>\n </span>\n </td>\n {(multiInstitution && !isAdmin) &&\n <td>\n <SelectEditor\n isTextMode={true}\n isEditIconShow={isOpIconShown && institutions.length > 0}\n options={institutions}\n currentOption={item.institution}\n onOptionChanged={this.updateInstitution}\n translateOption={this.translateInstitution}\n />\n </td>\n }\n <td>\n {`${item.create_time ? moment(item.create_time).format('YYYY-MM-DD HH:mm') : '--'} /`}\n <br />\n {`${item.last_login ? moment(item.last_login).fromNow() : '--'}`}\n <br />\n {`${item.last_access_time ? moment(item.last_access_time).fromNow() : '--'}`}\n </td>\n <td>\n {(item.email != username && isOpIconShown) &&\n <OpMenu\n operations={this.getMenuOperations()}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isSetQuotaDialogOpen &&\n <SysAdminUserSetQuotaDialog\n toggle={this.toggleSetQuotaDialog}\n updateQuota={this.updateQuota}\n />\n }\n {isDeleteUserDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete User')}\n message={deleteDialogMsg}\n executeOperation={this.deleteUser}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteUserDialog}\n />\n }\n {isResetUserPasswordDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Reset Password')}\n message={resetPasswordDialogMsg}\n executeOperation={this.resetPassword}\n confirmBtnText={gettext('Reset')}\n toggleDialog={this.toggleResetUserPasswordDialog}\n />\n }\n {isRevokeAdminDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Revoke Admin')}\n message={revokeAdminDialogMsg}\n executeOperation={this.revokeAdmin}\n confirmBtnText={gettext('Revoke')}\n toggleDialog={this.toggleRevokeAdminDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default Content;\n","import React, { Component, Fragment } from 'react';\nimport { navigate } from '@reach/router';\nimport { Button } from 'reactstrap';\nimport PropTypes from 'prop-types';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { isPro, gettext, siteRoot } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport SysAdminUserSetQuotaDialog from '../../../components/dialog/sysadmin-dialog/set-quota';\nimport SysAdminImportUserDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-import-user-dialog';\nimport SysAdminAddUserDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-user-dialog';\nimport SysAdminBatchAddAdminDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-batch-add-admin-dialog';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport SysAdminUser from '../../../models/sysadmin-user';\nimport SysAdminAdminUser from '../../../models/sysadmin-admin-user';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Search from '../search';\nimport UsersNav from './users-nav';\nimport Content from './users-content';\n\nconst { availableRoles } = window.sysadmin.pageOptions;\n\nconst propTypes = {\n isAdmin: PropTypes.bool,\n isLDAPImported: PropTypes.bool\n};\n\nclass Users extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n userList: [],\n hasNextPage: false,\n currentPage: 1,\n perPage: 25,\n hasUserSelected: false,\n selectedUserList: [],\n isAllUsersSelected: false,\n isImportUserDialogOpen: false,\n isAddUserDialogOpen: false,\n isBatchSetQuotaDialogOpen: false,\n isBatchDeleteUserDialogOpen: false,\n isBatchAddAdminDialogOpen: false\n };\n }\n\n componentDidMount () {\n if (this.props.isAdmin) { // 'Admin' page\n this.getUserList(); // no pagination\n } else {\n let urlParams = (new URL(window.location)).searchParams;\n const {\n currentPage, perPage,\n sortBy = '',\n sortOrder = 'asc'\n } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage),\n sortBy: urlParams.get('order_by') || sortBy,\n sortOrder: urlParams.get('direction') || sortOrder\n }, () => {\n this.getUsersListByPage(this.state.currentPage);\n });\n }\n }\n\n toggleImportUserDialog = () => {\n this.setState({isImportUserDialogOpen: !this.state.isImportUserDialogOpen});\n }\n\n toggleAddUserDialog = () => {\n this.setState({isAddUserDialogOpen: !this.state.isAddUserDialogOpen});\n }\n\n toggleBatchSetQuotaDialog = () => {\n this.setState({isBatchSetQuotaDialogOpen: !this.state.isBatchSetQuotaDialogOpen});\n }\n\n toggleBatchDeleteUserDialog = () => {\n this.setState({isBatchDeleteUserDialogOpen: !this.state.isBatchDeleteUserDialogOpen});\n }\n\n onUserSelected = (item) => {\n let hasUserSelected = false;\n let selectedUserList = [];\n // traverse all users, toggle its selected status\n let users = this.state.userList.map(user => {\n // toggle status\n if (user.email === item.email) {\n user.isSelected = !user.isSelected;\n }\n // update selectedUserList\n // if current user is now selected, push it to selectedUserList\n // if current user is now not selected, drop it from selectedUserList\n if (user.isSelected == true) {\n hasUserSelected = true;\n selectedUserList.push(user);\n } else {\n selectedUserList = selectedUserList.filter(thisuser => {\n return thisuser.email != user.email;\n });\n }\n return user;\n });\n // finally update state\n this.setState({\n userList: users,\n hasUserSelected: hasUserSelected,\n selectedUserList: selectedUserList,\n });\n }\n\n toggleSelectAllUsers = () => {\n if (this.state.isAllUsersSelected) {\n // if previous state is allSelected, toggle to not select\n let users = this.state.userList.map(user => {\n user.isSelected = false;\n return user;\n });\n this.setState({\n userList: users,\n hasUserSelected: false,\n isAllUsersSelected: false,\n selectedUserList: [],\n });\n } else {\n // if previous state is not allSelected, toggle to selectAll\n let users = this.state.userList.map(user => {\n user.isSelected = true;\n return user;\n });\n this.setState({\n userList: users,\n hasUserSelected: true,\n isAllUsersSelected: true,\n selectedUserList: users\n });\n }\n }\n\n getUserList = () => {\n // get admins\n seafileAPI.sysAdminListAdmins().then(res => {\n let users = res.data.admin_user_list.map(user => {\n return new SysAdminAdminUser(user);\n });\n this.setState({\n userList: users,\n loading: false\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n getUsersListByPage = (page) => {\n const { perPage, sortBy, sortOrder } = this.state;\n const { isLDAPImported } = this.props;\n seafileAPI.sysAdminListUsers(page, perPage, isLDAPImported, sortBy, sortOrder).then(res => {\n let users = res.data.data.map(user => {return new SysAdminUser(user);});\n this.setState({\n userList: users,\n loading: false,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.total_count),\n currentPage: page\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n sortByQuotaUsage = () => {\n this.setState({\n sortBy: 'quota_usage',\n sortOrder: this.state.sortOrder == 'asc' ? 'desc' : 'asc',\n currentPage: 1\n }, () => {\n let url = new URL(location.href);\n let searchParams = new URLSearchParams(url.search);\n const { currentPage, sortBy, sortOrder } = this.state;\n searchParams.set('page', currentPage);\n searchParams.set('order_by', sortBy);\n searchParams.set('direction', sortOrder);\n url.search = searchParams.toString();\n navigate(url.toString());\n this.getUsersListByPage(currentPage);\n });\n }\n\n deleteUser = (email) => {\n seafileAPI.sysAdminDeleteUser(email).then(res => {\n let newUserList = this.state.userList.filter(item => {\n return item.email != email;\n });\n this.setState({userList: newUserList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n setUserQuotaInBatch = (quotaTotal) => {\n let emails = this.state.selectedUserList.map(user => {\n return user.email;\n });\n seafileAPI.sysAdminSetUserQuotaInBatch(emails, quotaTotal).then(res => {\n let userList = this.state.userList.map(item => {\n res.data.success.map(resultUser => {\n if (item.email == resultUser.email) {\n item.quota_total = resultUser.quota_total;\n }\n });\n return item;\n });\n this.setState({userList: userList});\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteUserInBatch = () => {\n let emails = this.state.selectedUserList.map(user => {\n return user.email;\n });\n seafileAPI.sysAdminDeleteUserInBatch(emails).then(res => {\n if (res.data.success.length) {\n let oldUserList = this.state.userList;\n let newUserList = oldUserList.filter(oldUser => {\n return !res.data.success.some(deletedUser =>{\n return deletedUser.email == oldUser.email;\n });\n });\n this.setState({\n userList: newUserList,\n hasUserSelected: emails.length != res.data.success.length\n });\n const length = res.data.success.length;\n const msg = length == 1 ?\n gettext('Successfully deleted 1 user.') :\n gettext('Successfully deleted {user_number_placeholder} users.')\n .replace('{user_number_placeholder}', length);\n toaster.success(msg);\n }\n res.data.failed.map(item => {\n const msg = `${item.email}: ${item.error_msg}`;\n toaster.danger(msg);\n });\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n importUserInBatch = (file) => {\n toaster.notify(gettext('It may take some time, please wait.'));\n seafileAPI.sysAdminImportUserViaFile(file).then((res) => {\n if (res.data.success.length) {\n const users = res.data.success.map(item => {\n if (item.institution == undefined) {\n item.institution = '';\n }\n return new SysAdminUser(item);\n });\n this.setState({\n userList: users.concat(this.state.userList)\n });\n }\n res.data.failed.map(item => {\n const msg = `${item.email}: ${item.error_msg}`;\n toaster.danger(msg);\n });\n }).catch((error) => {\n let errMsg = Utils.getErrorMsg(error);\n toaster.danger(errMsg);\n });\n }\n\n addUser = (data) => {\n toaster.notify(gettext('It may take some time, please wait.'));\n const { email, name, role, password } = data;\n seafileAPI.sysAdminAddUser(email, name, role, password).then((res) => {\n let userList = this.state.userList;\n userList.unshift(res.data);\n this.setState({\n userList: userList\n });\n toaster.success(res.data.add_user_tip);\n }).catch((error) => {\n let errMsg = Utils.getErrorMsg(error);\n toaster.danger(errMsg);\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getUsersListByPage(1);\n });\n }\n\n updateUser = (email, key, value) => {\n seafileAPI.sysAdminUpdateUser(email, key, value).then(res => {\n let newUserList = this.state.userList.map(item => {\n if (item.email == email) {\n item[key]= res.data[key];\n }\n return item;\n });\n this.setState({userList: newUserList});\n const msg = (key == 'is_active' && value) ?\n res.data.update_status_tip : gettext('Edit succeeded');\n toaster.success(msg);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateAdminRole = (email, role) => {\n seafileAPI.sysAdminUpdateAdminRole(email, role).then(res => {\n let newUserList = this.state.userList.map(item => {\n if (item.email == email) {\n item.admin_role = res.data.role;\n }\n return item;\n });\n this.setState({userList: newUserList});\n toaster.success(gettext('Edit succeeded'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n revokeAdmin = (email, name) => {\n seafileAPI.sysAdminUpdateUser(email, 'is_staff', false).then(res => {\n let userList = this.state.userList.filter(item => {\n return item.email != email;\n });\n this.setState({\n userList: userList\n });\n toaster.success(gettext('Successfully revoked the admin permission of {placeholder}.').replace('{placeholder}', name));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n getOperationsForAll = () => {\n const { isAdmin, isLDAPImported } = this.props;\n\n if (isAdmin) {\n return <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleBatchAddAdminDialog}>{gettext('Add Admin')}</Button>;\n }\n\n if (isLDAPImported) {\n return <a className=\"btn btn-secondary operation-item\" href={`${siteRoot}sys/useradmin/export-excel/`}>{gettext('Export Excel')}</a>;\n }\n\n // 'database'\n return (\n <Fragment>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleImportUserDialog}>{gettext('Import Users')}</Button>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleAddUserDialog}>{gettext('Add User')}</Button>\n <a className=\"btn btn-secondary operation-item\" href={`${siteRoot}sys/useradmin/export-excel/`}>{gettext('Export Excel')}</a>\n </Fragment>\n );\n }\n\n getCurrentNavItem = () => {\n const { isAdmin, isLDAPImported } = this.props;\n let item = 'database';\n if (isAdmin) {\n item = 'admin';\n } else if (isLDAPImported) {\n item = 'ldap-imported';\n }\n return item;\n }\n\n toggleBatchAddAdminDialog = () => {\n this.setState({isBatchAddAdminDialogOpen: !this.state.isBatchAddAdminDialogOpen});\n }\n\n addAdminInBatch = (emails) => {\n seafileAPI.sysAdminAddAdminInBatch(emails).then(res => {\n let users = res.data.success.map(user => {\n return new SysAdminAdminUser(user);\n });\n this.setState({\n userList: users.concat(this.state.userList)\n });\n res.data.failed.map(item => {\n const msg = `${item.email}: ${item.error_msg}`;\n toaster.danger(msg);\n });\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n getSearch = () => {\n if (this.props.isAdmin) {\n return null;\n }\n // offer 'Search' for 'DB' & 'LDAPImported' users\n return <Search\n placeholder={gettext('Search users')}\n submit={this.searchItems}\n />;\n }\n\n searchItems = (keyword) => {\n navigate(`${siteRoot}sys/search-users/?query=${encodeURIComponent(keyword)}`);\n }\n\n render() {\n const { isAdmin, isLDAPImported } = this.props;\n const {\n hasUserSelected,\n isImportUserDialogOpen,\n isAddUserDialogOpen,\n isBatchDeleteUserDialogOpen,\n isBatchSetQuotaDialogOpen,\n isBatchAddAdminDialogOpen\n } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar search={this.getSearch()}>\n {hasUserSelected ?\n <Fragment>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleBatchSetQuotaDialog}>{gettext('Set Quota')}</Button>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleBatchDeleteUserDialog}>{gettext('Delete Users')}</Button>\n </Fragment>\n : this.getOperationsForAll()\n }\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <UsersNav currentItem={this.getCurrentNavItem()} />\n <div className=\"cur-view-content\">\n <Content\n isAdmin={isAdmin}\n isLDAPImported={isLDAPImported}\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.userList}\n sortBy={this.state.sortBy}\n sortOrder={this.state.sortOrder}\n sortByQuotaUsage={this.sortByQuotaUsage}\n currentPage={this.state.currentPage}\n hasNextPage={this.state.hasNextPage}\n curPerPage={this.state.perPage}\n resetPerPage={this.resetPerPage}\n getListByPage={this.getUsersListByPage}\n updateUser={this.updateUser}\n deleteUser={this.deleteUser}\n updateAdminRole={this.updateAdminRole}\n revokeAdmin={this.revokeAdmin}\n onUserSelected={this.onUserSelected}\n isAllUsersSelected={this.isAllUsersSelected}\n toggleSelectAllUsers={this.toggleSelectAllUsers}\n />\n </div>\n </div>\n </div>\n {isImportUserDialogOpen &&\n <SysAdminImportUserDialog\n toggle={this.toggleImportUserDialog}\n importUserInBatch={this.importUserInBatch}\n />\n }\n {isAddUserDialogOpen &&\n <SysAdminAddUserDialog\n dialogTitle={gettext('Add User')}\n showRole={isPro}\n availableRoles={availableRoles}\n addUser={this.addUser}\n toggleDialog={this.toggleAddUserDialog}\n />\n }\n {isBatchSetQuotaDialogOpen &&\n <SysAdminUserSetQuotaDialog\n toggle={this.toggleBatchSetQuotaDialog}\n updateQuota={this.setUserQuotaInBatch}\n />\n }\n {isBatchDeleteUserDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Users')}\n message={gettext('Are you sure you want to delete the selected user(s) ?')}\n executeOperation={this.deleteUserInBatch}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleBatchDeleteUserDialog}\n />\n }\n {isBatchAddAdminDialogOpen &&\n <SysAdminBatchAddAdminDialog\n addAdminInBatch={this.addAdminInBatch}\n toggle={this.toggleBatchAddAdminDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nUsers.propTypes = propTypes;\n\nexport default Users;\n","import React, { Component, Fragment } from 'react';\nimport Users from './users';\n\nclass AdminUsers extends Component {\n\n render() {\n return <Users isAdmin={true} />;\n }\n}\n\nexport default AdminUsers;\n","import React, { Component, Fragment } from 'react';\nimport Users from './users';\n\nclass LDAPImportedUsers extends Component {\n\n render() {\n return <Users isLDAPImported={true} />;\n }\n}\n\nexport default LDAPImportedUsers;\n","import React, { Component, Fragment } from 'react';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport UsersNav from './users-nav';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getListByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getListByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, curPerPage, hasNextPage, currentPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No users')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"40%\">{gettext('Email')}</th>\n <th width=\"30%\">{gettext('Space Used')}{' / '}{gettext('Quota')}</th>\n <th width=\"30%\">{gettext('Last Login')}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n />);\n })}\n </tbody>\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { item } = this.props;\n let email = '<span class=\"op-target\">' + Utils.HTMLescape(item.email) + '</span>';\n return (\n <Fragment>\n <tr>\n <td><UserLink email={item.email} name={item.email} /></td>\n <td>\n {`${Utils.bytesToSize(item.quota_usage)} / ${item.quota_total > 0 ? Utils.bytesToSize(item.quota_total) : '--'}`}\n </td>\n <td>\n {item.last_login ? moment(item.last_login).fromNow() : '--'}\n </td>\n </tr>\n </Fragment>\n );\n }\n}\n\nclass Users extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n userList: {},\n hasNextPage: false,\n currentPage: 1,\n perPage: 25\n };\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getUsersListByPage(this.state.currentPage);\n });\n }\n\n getUsersListByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListLDAPUsers(page, perPage).then(res => {\n this.setState({\n loading: false,\n userList: res.data.ldap_user_list,\n hasNextPage: res.data.has_next_page,\n currentPage: page\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getUsersListByPage(1);\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <UsersNav currentItem=\"ldap\" />\n <div className=\"cur-view-content\">\n <Content\n resetPerPage={this.resetPerPage}\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.userList}\n currentPage={this.state.currentPage}\n hasNextPage={this.state.hasNextPage}\n curPerPage={this.state.perPage}\n getListByPage={this.getUsersListByPage}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default Users;\n","import React, { Component, Fragment } from 'react';\nimport { Button, Form, FormGroup, Input, Col } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport Paginator from '../../../components/paginator';\nimport toaster from '../../../components/toast';\nimport SysAdminUserSetQuotaDialog from '../../../components/dialog/sysadmin-dialog/set-quota';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Content from './users-content';\n\n\nclass SearchUsers extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n query: '',\n isSubmitBtnActive: false,\n loading: true,\n errorMsg: '',\n userList: [],\n pageInfo: {\n has_next_page: false,\n current_page: 1,\n },\n currentPage: 1,\n perPage: 25,\n hasUserSelected: false,\n selectedUserList: [],\n isAllUsersSelected: false,\n isBatchSetQuotaDialogOpen: false,\n isBatchDeleteUserDialogOpen: false\n };\n }\n\n componentDidMount () {\n let params = (new URL(document.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n query: params.get('query') || '',\n currentPage: parseInt(params.get('page') || currentPage),\n perPage: parseInt(params.get('per_page') || perPage)\n }, () => {this.getItems(this.state.currentPage);});\n }\n\n toggleBatchSetQuotaDialog = () => {\n this.setState({isBatchSetQuotaDialogOpen: !this.state.isBatchSetQuotaDialogOpen});\n }\n\n toggleBatchDeleteUserDialog = () => {\n this.setState({isBatchDeleteUserDialogOpen: !this.state.isBatchDeleteUserDialogOpen});\n }\n\n onUserSelected = (item) => {\n let hasUserSelected = false;\n let selectedUserList = [];\n // traverse all users, toggle its selected status\n let users = this.state.userList.map(user => {\n // toggle status\n if (user.email === item.email) {\n user.isSelected = !user.isSelected;\n }\n // update selectedUserList\n // if current user is now selected, push it to selectedUserList\n // if current user is now not selected, drop it from selectedUserList\n if (user.isSelected == true) {\n hasUserSelected = true;\n selectedUserList.push(user);\n } else {\n selectedUserList = selectedUserList.filter(thisuser => {\n return thisuser.email != user.email;\n });\n }\n return user;\n });\n // finally update state\n this.setState({\n userList: users,\n hasUserSelected: hasUserSelected,\n selectedUserList: selectedUserList,\n });\n }\n\n toggleSelectAllUsers = () => {\n if (this.state.isAllUsersSelected) {\n // if previous state is allSelected, toggle to not select\n let users = this.state.userList.map(user => {\n user.isSelected = false;\n return user;\n });\n this.setState({\n userList: users,\n hasUserSelected: false,\n isAllUsersSelected: false,\n selectedUserList: [],\n });\n } else {\n // if previous state is not allSelected, toggle to selectAll\n let users = this.state.userList.map(user => {\n user.isSelected = true;\n return user;\n });\n this.setState({\n userList: users,\n hasUserSelected: true,\n isAllUsersSelected: true,\n selectedUserList: users\n });\n }\n }\n\n getItems = (page) => {\n seafileAPI.sysAdminSearchUsers(this.state.query.trim(), page, this.state.perPage).then(res => {\n this.setState({\n userList: res.data.user_list,\n loading: false,\n pageInfo: res.data.page_info\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getItems(1);\n });\n }\n\n deleteUser = (email) => {\n seafileAPI.sysAdminDeleteUser(email).then(res => {\n let newUserList = this.state.userList.filter(item => {\n return item.email != email;\n });\n this.setState({userList: newUserList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n setUserQuotaInBatch = (quotaTotal) => {\n let emails = this.state.selectedUserList.map(user => {\n return user.email;\n });\n seafileAPI.sysAdminSetUserQuotaInBatch(emails, quotaTotal).then(res => {\n let userList = this.state.userList.map(item => {\n res.data.success.map(resultUser => {\n if (item.email == resultUser.email) {\n item.quota_total = resultUser.quota_total;\n }\n });\n return item;\n });\n this.setState({userList: userList});\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteUserInBatch = () => {\n let emails = this.state.selectedUserList.map(user => {\n return user.email;\n });\n seafileAPI.sysAdminDeleteUserInBatch(emails).then(res => {\n if (res.data.success.length) {\n let oldUserList = this.state.userList;\n let newUserList = oldUserList.filter(oldUser => {\n return !res.data.success.some(deletedUser =>{\n return deletedUser.email == oldUser.email;\n });\n });\n this.setState({\n userList: newUserList,\n hasUserSelected: emails.length != res.data.success.length\n });\n const length = res.data.success.length;\n const msg = length == 1 ?\n gettext('Successfully deleted 1 user.') :\n gettext('Successfully deleted {user_number_placeholder} users.')\n .replace('{user_number_placeholder}', length);\n toaster.success(msg);\n }\n res.data.failed.map(item => {\n const msg = `${item.email}: ${item.error_msg}`;\n toaster.danger(msg);\n });\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateUser = (email, key, value) => {\n seafileAPI.sysAdminUpdateUser(email, key, value).then(res => {\n let newUserList = this.state.userList.map(item => {\n if (item.email == email) {\n item[key]= res.data[key];\n }\n return item;\n });\n this.setState({userList: newUserList});\n const msg = (key == 'is_active' && value) ?\n res.data.update_status_tip : gettext('Edit succeeded');\n toaster.success(msg);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateAdminRole = (email, role) => {\n seafileAPI.sysAdminUpdateAdminRole(email, role).then(res => {\n let newUserList = this.state.userList.map(item => {\n if (item.email == email) {\n item.admin_role = res.data.role;\n }\n return item;\n });\n this.setState({userList: newUserList});\n toaster.success(gettext('Edit succeeded'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n revokeAdmin = (email, name) => {\n seafileAPI.sysAdminUpdateUser(email, 'is_staff', false).then(res => {\n let userList = this.state.userList.filter(item => {\n return item.email != email;\n });\n this.setState({\n userList: userList\n });\n toaster.success(gettext('Successfully revoked the admin permission of {placeholder}.').replace('{placeholder}', name));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n handleInputChange = (e) => {\n this.setState({\n query: e.target.value\n }, this.checkSubmitBtnActive);\n }\n\n checkSubmitBtnActive = () => {\n const { query } = this.state;\n this.setState({\n isSubmitBtnActive: query.trim()\n });\n }\n\n getPreviousPageList = () => {\n this.getItems(this.state.pageInfo.current_page - 1);\n }\n\n getNextPageList = () => {\n this.getItems(this.state.pageInfo.current_page + 1);\n }\n\n render() {\n const { query, isSubmitBtnActive } = this.state;\n const {\n hasUserSelected,\n isBatchDeleteUserDialogOpen,\n isBatchSetQuotaDialogOpen\n } = this.state;\n return (\n <Fragment>\n {hasUserSelected ?\n <MainPanelTopbar>\n <Fragment>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleBatchSetQuotaDialog}>{gettext('Set Quota')}</Button>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleBatchDeleteUserDialog}>{gettext('Delete Users')}</Button>\n </Fragment>\n </MainPanelTopbar> :\n <MainPanelTopbar />\n }\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Users')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <div className=\"mt-4 mb-6\">\n <h4 className=\"border-bottom font-weight-normal mb-2 pb-1\">{gettext('Search Users')}</h4>\n <Form>\n <FormGroup row>\n <Col sm={5}>\n <Input type=\"text\" name=\"query\" value={query} placeholder={gettext('Search users')} onChange={this.handleInputChange} />\n </Col>\n </FormGroup>\n <FormGroup row>\n <Col sm={{size: 5}}>\n <button className=\"btn btn-outline-primary\" disabled={!isSubmitBtnActive} onClick={this.getItems}>{gettext('Submit')}</button>\n </Col>\n </FormGroup>\n </Form>\n </div>\n <div className=\"mt-4 mb-6\">\n <h4 className=\"border-bottom font-weight-normal mb-2 pb-1\">{gettext('Result')}</h4>\n <Content\n isLDAPImported={false}\n isAdmin={false}\n isSearchResult={true}\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.userList}\n updateUser={this.updateUser}\n deleteUser={this.deleteUser}\n updateAdminRole={this.updateAdminRole}\n revokeAdmin={this.revokeAdmin}\n onUserSelected={this.onUserSelected}\n isAllUsersSelected={this.isAllUsersSelected}\n toggleSelectAllUsers={this.toggleSelectAllUsers}\n />\n </div>\n </div>\n </div>\n </div>\n {isBatchSetQuotaDialogOpen &&\n <SysAdminUserSetQuotaDialog\n toggle={this.toggleBatchSetQuotaDialog}\n updateQuota={this.setUserQuotaInBatch}\n />\n }\n {isBatchDeleteUserDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Users')}\n message={gettext('Are you sure you want to delete the selected user(s) ?')}\n executeOperation={this.deleteUserInBatch}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleBatchDeleteUserDialog}\n />\n }\n {this.state.pageInfo &&\n <Paginator\n gotoPreviousPage={this.getPreviousPageList}\n gotoNextPage={this.getNextPageList}\n currentPage={this.state.pageInfo.current_page}\n hasNextPage={this.state.pageInfo.has_next_page}\n curPerPage={this.state.perPage}\n resetPerPage={this.resetPerPage}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default SearchUsers;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Alert, Modal, ModalHeader, ModalBody, ModalFooter, Button, Form, FormGroup, Input, InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\n\nconst propTypes = {\n dialogTitle: PropTypes.string.isRequired,\n updateValue: PropTypes.func.isRequired,\n toggleDialog: PropTypes.func.isRequired\n};\n\nclass UpdateUser extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n value: this.props.value,\n isSubmitBtnActive: false\n };\n }\n\n handleInputChange = (e) => {\n const value = e.target.value;\n this.setState({\n value: value\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key == 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n handleSubmit = () => {\n this.props.updateValue(this.state.value.trim());\n this.props.toggleDialog();\n }\n\n render() {\n const { dialogTitle, toggleDialog } = this.props;\n return (\n <Modal isOpen={true} toggle={toggleDialog}>\n <ModalHeader toggle={toggleDialog}>{this.props.dialogTitle}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Input\n type=\"text\"\n value={this.state.value}\n onKeyPress={this.handleKeyPress}\n onChange={this.handleInputChange}\n />\n </FormGroup>\n </Form>\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={toggleDialog}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nUpdateUser.propTypes = propTypes;\n\nexport default UpdateUser;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'info', urlPart: '', text: gettext('Info')},\n {name: 'owned-repos', urlPart: 'owned-libraries', text: gettext('Owned Libraries')},\n {name: 'shared-repos', urlPart: 'shared-libraries', text: gettext('Shared Libraries')},\n {name: 'links', urlPart: 'shared-links', text: gettext('Shared Links')},\n {name: 'groups', urlPart: 'groups', text: gettext('Groups')}\n ];\n }\n\n render() {\n const { currentItem, email, userName } = this.props;\n return (\n <div>\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\"><Link to={`${siteRoot}sys/users/`}>{gettext('Users')}</Link> / {userName}</h3>\n </div>\n <ul className=\"nav border-bottom mx-4\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item mr-2\" key={index}>\n <Link to={`${siteRoot}sys/users/${encodeURIComponent(email)}/${item.urlPart}`} className={`nav-link ${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React, { Component, Fragment } from 'react';\nimport { FormGroup, Label, Input, Button } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport Loading from '../../../components/loading';\nimport SysAdminSetQuotaDialog from '../../../components/dialog/sysadmin-dialog/set-quota';\nimport SysAdminUpdateUserDialog from '../../../components/dialog/sysadmin-dialog/update-user';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Nav from './user-nav';\n\nconst { twoFactorAuthEnabled } = window.sysadmin.pageOptions;\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n currentKey: '',\n dialogTitle: '',\n isSetQuotaDialogOpen: false,\n isUpdateUserDialogOpen: false\n };\n }\n\n toggleSetQuotaDialog = () => {\n this.setState({isSetQuotaDialogOpen: !this.state.isSetQuotaDialogOpen});\n }\n\n updateQuota = (value) => {\n this.props.updateUser('quota_total', value);\n }\n\n toggleDialog = (key, dialogTitle) => {\n this.setState({\n currentKey: key,\n dialogTitle: dialogTitle,\n isUpdateUserDialogOpen: !this.state.isUpdateUserDialogOpen\n });\n }\n\n toggleSetNameDialog = () => {\n this.toggleDialog('name', gettext('Set Name'));\n }\n\n toggleSetUserLoginIDDialog = () => {\n this.toggleDialog('login_id', gettext('Set Login ID'));\n }\n\n toggleSetUserComtactEmailDialog = () => {\n this.toggleDialog('contact_email', gettext('Set Contact Email'));\n }\n\n toggleSetUserReferenceIDDialog = () => {\n this.toggleDialog('reference_id', gettext('Set Reference ID'));\n }\n\n updateValue = (value) => {\n this.props.updateUser(this.state.currentKey, value);\n }\n\n toggleUpdateUserDialog = () => {\n this.toggleDialog('', '');\n }\n\n showEditIcon = (action) => {\n return (\n <span\n title={gettext('Edit')}\n className=\"fa fa-pencil-alt attr-action-icon\"\n onClick={action}>\n </span>\n );\n }\n\n render() {\n const { loading, errorMsg, userInfo } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const user = this.props.userInfo;\n const {\n currentKey, dialogTitle,\n isSetQuotaDialogOpen, isUpdateUserDialogOpen\n } = this.state;\n return (\n <Fragment>\n <dl className=\"m-0\">\n <dt className=\"info-item-heading\">{gettext('Avatar')}</dt>\n <dd className=\"info-item-content\">\n <img src={user.avatar_url} alt={user.name} width=\"80\" className=\"rounded\" />\n </dd>\n\n <dt className=\"info-item-heading\">{gettext('Email')}</dt>\n <dd className=\"info-item-content\">{user.email}</dd>\n\n {user.org_name &&\n <Fragment>\n <dt className=\"info-item-heading\">{gettext('Organization')}</dt>\n <dd className=\"info-item-content\">{user.org_name}</dd>\n </Fragment>\n }\n\n <dt className=\"info-item-heading\">{gettext('Name')}</dt>\n <dd className=\"info-item-content\">\n {user.name || '--'}\n {this.showEditIcon(this.toggleSetNameDialog)}\n </dd>\n\n <dt className=\"info-item-heading\">{gettext('Login ID')}</dt>\n <dd className=\"info-item-content\">\n {user.login_id || '--'}\n {this.showEditIcon(this.toggleSetUserLoginIDDialog)}\n </dd>\n\n <dt className=\"info-item-heading\">{gettext('Contact Email')}</dt>\n <dd className=\"info-item-content\">\n {user.contact_email || '--'}\n {this.showEditIcon(this.toggleSetUserComtactEmailDialog)}\n </dd>\n\n <dt className=\"info-item-heading\">{gettext('Reference ID')}</dt>\n <dd className=\"info-item-content\">\n {user.reference_id|| '--'}\n {this.showEditIcon(this.toggleSetUserReferenceIDDialog)}\n </dd>\n\n <dt className=\"info-item-heading\">{gettext('Space Used / Quota')}</dt>\n <dd className=\"info-item-content\">\n {`${Utils.bytesToSize(user.quota_usage)} / ${user.quota_total > 0 ? Utils.bytesToSize(user.quota_total) : '--'}`}\n {this.showEditIcon(this.toggleSetQuotaDialog)}\n </dd>\n\n {twoFactorAuthEnabled &&\n <Fragment>\n <dt className=\"info-item-heading\">{gettext('Two-Factor Authentication')}</dt>\n <dd className=\"info-item-content\">\n {user.has_default_device ?\n <FormGroup>\n <p className=\"mb-1\">{gettext('Status: enabled')}</p>\n <Button onClick={this.props.disable2FA}>{gettext('Disable Two-Factor Authentication')}</Button>\n </FormGroup> :\n <FormGroup>\n <Button disabled={true}>{gettext('Disable Two-Factor Authentication')}</Button>\n </FormGroup>\n }\n <FormGroup check>\n <Label check>\n <Input type=\"checkbox\" checked={user.is_force_2fa} onChange={this.props.toggleForce2fa} />\n <span>{gettext('Force Two-Factor Authentication')}</span>\n </Label>\n </FormGroup>\n </dd>\n </Fragment>\n }\n </dl>\n {isSetQuotaDialogOpen &&\n <SysAdminSetQuotaDialog\n updateQuota={this.updateQuota}\n toggle={this.toggleSetQuotaDialog}\n />\n }\n {isUpdateUserDialogOpen &&\n <SysAdminUpdateUserDialog\n dialogTitle={dialogTitle}\n value={user[currentKey]}\n updateValue={this.updateValue}\n toggleDialog={this.toggleUpdateUserDialog}\n />\n }\n </Fragment>\n );\n }\n }\n}\n\nclass User extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n userInfo: {}\n };\n }\n\n componentDidMount () {\n // avatar size: 160\n seafileAPI.sysAdminGetUser(this.props.email, 160).then((res) => {\n this.setState({\n loading: false,\n userInfo: res.data\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n updateUser = (key, value) => {\n const email = this.state.userInfo.email;\n seafileAPI.sysAdminUpdateUser(email, key, value).then(res => {\n let userInfo = this.state.userInfo;\n userInfo[key]= res.data[key];\n this.setState({\n userInfo: userInfo\n });\n toaster.success(gettext('Edit succeeded'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n disable2FA = () => {\n const email = this.state.userInfo.email;\n seafileAPI.sysAdminDeleteTwoFactorAuth(email).then(res => {\n let userInfo = this.state.userInfo;\n userInfo.has_default_device = false;\n this.setState({\n userInfo: userInfo\n });\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n toggleForce2fa = (e) => {\n const email = this.state.userInfo.email;\n const checked = e.target.checked;\n seafileAPI.sysAdminSetForceTwoFactorAuth(email, checked).then(res => {\n let userInfo = this.state.userInfo;\n userInfo.is_force_2fa = checked;\n this.setState({\n userInfo: userInfo\n });\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n const { userInfo } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <Nav currentItem=\"info\" email={this.props.email} userName={userInfo.name} />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n userInfo={this.state.userInfo}\n updateUser={this.updateUser}\n disable2FA={this.disable2FA}\n toggleForce2fa={this.toggleForce2fa}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default User;\n","import React, { Component, Fragment } from 'react';\nimport { Link } from '@reach/router';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { isPro, siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport TransferDialog from '../../../components/dialog/transfer-dialog';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Nav from './user-nav';\n\nconst { enableSysAdminViewRepo } = window.sysadmin.pageOptions;\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No libraries')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"5%\"></th>\n <th width=\"35%\">{gettext('Name')}</th>\n <th width=\"30%\">{gettext('Size')}</th>\n <th width=\"25%\">{gettext('Last Update')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n deleteRepo={this.props.deleteRepo}\n transferRepo={this.props.transferRepo}\n />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isDeleteDialogOpen: false,\n isTransferDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n toggleDeleteDialog = () => {\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n deleteRepo = () => {\n this.props.deleteRepo(this.props.item.id);\n }\n\n toggleTransferDialog = () => {\n this.setState({isTransferDialogOpen: !this.state.isTransferDialogOpen});\n }\n\n transferRepo = (owner) => {\n this.props.transferRepo(this.props.item.id, owner.email);\n this.toggleTransferDialog();\n }\n\n renderRepoName = () => {\n const { item } = this.props;\n const repo = item;\n if (repo.name) {\n if (isPro && enableSysAdminViewRepo && !repo.encrypted) {\n return <Link to={`${siteRoot}sys/libraries/${repo.id}/`}>{repo.name}</Link>;\n } else {\n return repo.name;\n }\n } else {\n return gettext('Broken ({repo_id_placeholder})')\n .replace('{repo_id_placeholder}', repo.id);\n }\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch (item) {\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n case 'Transfer':\n translateResult = gettext('Transfer');\n break;\n }\n\n return translateResult;\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Delete':\n this.toggleDeleteDialog();\n break;\n case 'Transfer':\n this.toggleTransferDialog();\n break;\n }\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isDeleteDialogOpen, isTransferDialogOpen } = this.state;\n\n const iconUrl = Utils.getLibIconUrl(item);\n const iconTitle = Utils.getLibIconTitle(item);\n\n const itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n const deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', itemName);\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><img src={iconUrl} title={iconTitle} alt={iconTitle} width=\"24\" /></td>\n <td>{this.renderRepoName()}</td>\n <td>{Utils.bytesToSize(item.size)}</td>\n <td>{moment(item.last_modified).fromNow()}</td>\n <td>\n {isOpIconShown &&\n <OpMenu\n operations={['Delete', 'Transfer']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Library')}\n message={deleteDialogMsg}\n executeOperation={this.deleteRepo}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteDialog}\n />\n }\n {isTransferDialogOpen &&\n <TransferDialog\n itemName={item.name}\n submit={this.transferRepo}\n canTransferToDept={false}\n toggleDialog={this.toggleTransferDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass Repos extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n userInfo: {},\n repoList: []\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetUser(this.props.email).then((res) => {\n this.setState({\n userInfo: res.data\n });\n });\n seafileAPI.sysAdminListReposByOwner(this.props.email).then(res => {\n this.setState({\n loading: false,\n repoList: res.data.repos\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n deleteRepo = (repoID) => {\n seafileAPI.sysAdminDeleteRepo(repoID).then(res => {\n let newRepoList = this.state.repoList.filter(item => {\n return item.id != repoID;\n });\n this.setState({repoList: newRepoList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n transferRepo = (repoID, email) => {\n seafileAPI.sysAdminTransferRepo(repoID, email).then((res) => {\n let newRepoList = this.state.repoList.filter(item => {\n return item.id != repoID;\n });\n this.setState({repoList: newRepoList});\n let message = gettext('Successfully transferred the library.');\n toaster.success(message);\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <Nav currentItem=\"owned-repos\" email={this.props.email} userName={this.state.userInfo.name} />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.repoList}\n deleteRepo={this.deleteRepo}\n transferRepo={this.transferRepo}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default Repos;\n","import React, { Component, Fragment } from 'react';\nimport { Link } from '@reach/router';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { isPro, siteRoot, gettext } from '../../../utils/constants';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\nimport Nav from './user-nav';\n\nconst { enableSysAdminViewRepo } = window.sysadmin.pageOptions;\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No libraries')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"5%\"></th>\n <th width=\"35%\">{gettext('Name')}</th>\n <th width=\"20%\">{gettext('Share From')}</th>\n <th width=\"20%\">{gettext('Size')}</th>\n <th width=\"20%\">{gettext('Last Update')}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n }\n\n renderRepoName = () => {\n const { item } = this.props;\n const repo = item;\n if (repo.name) {\n if (isPro && enableSysAdminViewRepo && !repo.encrypted) {\n return <Link to={`${siteRoot}sys/libraries/${repo.id}/`}>{repo.name}</Link>;\n } else {\n return repo.name;\n }\n } else {\n return gettext('Broken ({repo_id_placeholder})')\n .replace('{repo_id_placeholder}', repo.id);\n }\n }\n\n getOwnerLink = () => {\n let link;\n const { item } = this.props;\n const index = item.owner_email.indexOf('@seafile_group');\n if (index == -1) {\n link = <UserLink email={item.owner_email} name={item.owner_name} />;\n } else {\n const groupID = item.owner_email.substring(0, index);\n link = <Link to={`${siteRoot}sys/departments/${groupID}/`}>{item.owner_name}</Link>;\n }\n return link;\n }\n\n render() {\n const { item } = this.props;\n const iconUrl = Utils.getLibIconUrl(item);\n const iconTitle = Utils.getLibIconTitle(item);\n return (\n <Fragment>\n <tr>\n <td><img src={iconUrl} title={iconTitle} alt={iconTitle} width=\"24\" /></td>\n <td>{this.renderRepoName()}</td>\n <td>{this.getOwnerLink()}</td>\n <td>{Utils.bytesToSize(item.size)}</td>\n <td>{moment(item.last_modify).fromNow()}</td>\n </tr>\n </Fragment>\n );\n }\n}\n\nclass Repos extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n userInfo: {},\n repoList: []\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetUser(this.props.email).then((res) => {\n this.setState({\n userInfo: res.data\n });\n });\n seafileAPI.sysAdminListShareInRepos(this.props.email).then(res => {\n this.setState({\n loading: false,\n repoList: res.data.repo_list\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <Nav currentItem=\"shared-repos\" email={this.props.email} userName={this.state.userInfo.name} />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.repoList}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default Repos;\n","import React, { Component, Fragment } from 'react';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport LinkDialog from '../../../components/dialog/share-admin-link';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Nav from './user-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No shared links')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"5%\">{/* icon */}</th>\n <th width=\"30%\">{gettext('Name')}</th>\n <th width=\"20%\">{gettext('Size')}</th>\n <th width=\"20%\">{gettext('Type')}</th>\n <th width=\"20%\">{gettext('Visits')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n deleteItem={this.props.deleteItem}\n />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isLinkDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n toggleLinkDialog = () => {\n this.setState({isLinkDialogOpen: !this.state.isLinkDialogOpen});\n }\n\n deleteItem = () => {\n this.props.deleteItem(this.props.item);\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch (item) {\n case 'View':\n translateResult = gettext('View');\n break;\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n }\n\n return translateResult;\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'View':\n this.toggleLinkDialog();\n break;\n case 'Delete':\n this.deleteItem();\n break;\n }\n }\n\n getRoleText = () => {\n let roleText;\n const { item } = this.props;\n switch(item.role) {\n case 'Owner':\n roleText = gettext('Owner');\n break;\n case 'Admin':\n roleText = gettext('Admin');\n break;\n case 'Member':\n roleText = gettext('Member');\n break;\n }\n return roleText;\n }\n\n getIconUrl = () => {\n const { item } = this.props;\n let url;\n if (item.type == 'upload') {\n url = Utils.getFolderIconUrl();\n } else { // share link\n if (item.is_dir) {\n url = Utils.getFolderIconUrl();\n } else {\n url = Utils.getFileIconUrl(item.obj_name);\n }\n }\n return url;\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isLinkDialogOpen } = this.state;\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><img src={this.getIconUrl()} alt=\"\" width=\"24\" /></td>\n <td>{item.obj_name == '/' ? item.repo_name : item.obj_name}</td>\n {item.type == 'upload' ?\n <Fragment>\n <td></td>\n <td>{gettext('Upload')}</td>\n </Fragment> :\n <Fragment>\n <td>{item.is_dir ? null : Utils.bytesToSize(item.size)}</td>\n <td>{gettext('Download')}</td>\n </Fragment>\n }\n <td>{item.view_cnt}</td>\n <td>\n {isOpIconShown &&\n <OpMenu\n operations={['View', 'Delete']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isLinkDialogOpen &&\n <LinkDialog\n link={item.link}\n toggleDialog={this.toggleLinkDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass Links extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n userInfo: {},\n uploadLinkItems: [],\n shareLinkItems: []\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetUser(this.props.email).then((res) => {\n this.setState({\n userInfo: res.data\n });\n });\n\n seafileAPI.sysAdminListShareLinksByUser(this.props.email).then(res => {\n const items = res.data.share_link_list.map(item => {\n item.type = 'download';\n return item;\n });\n items.sort((a, b) => {\n return a.is_dir ? -1 : 1;\n });\n this.setState({\n loading: false,\n shareLinkItems: items\n });\n });\n seafileAPI.sysAdminListUploadLinksByUser(this.props.email).then(res => {\n const items = res.data.upload_link_list.map(item => {\n item.type = 'upload';\n return item;\n });\n this.setState({\n loading: false,\n uploadLinkItems: items\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n deleteItem = (item) => {\n const type = item.type;\n const token = item.token;\n if (type == 'download') {\n seafileAPI.sysAdminDeleteShareLink(token).then(res => {\n let items = this.state.shareLinkItems.filter(item=> {\n return item.token != token;\n });\n this.setState({\n shareLinkItems: items\n });\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n } else {\n seafileAPI.sysAdminDeleteUploadLink(token).then(res => {\n let items = this.state.uploadLinkItems.filter(item=> {\n return item.token != token;\n });\n this.setState({\n uploadLinkItems: items\n });\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n }\n\n render() {\n const { shareLinkItems, uploadLinkItems } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <Nav currentItem=\"links\" email={this.props.email} userName={this.state.userInfo.name} />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={[].concat(uploadLinkItems, shareLinkItems)}\n deleteItem={this.deleteItem}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default Links;\n","import React, { Component, Fragment } from 'react';\nimport { Link } from '@reach/router';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Nav from './user-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No groups')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"35%\">{gettext('Name')}</th>\n <th width=\"30%\">{gettext('Role')}</th>\n <th width=\"30%\">{gettext('Created At')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n deleteItem={this.props.deleteItem}\n />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isDeleteDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n toggleDeleteDialog = () => {\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n deleteItem = () => {\n this.props.deleteItem(this.props.item.id);\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch (item) {\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n }\n\n return translateResult;\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Delete':\n this.toggleDeleteDialog();\n break;\n }\n }\n\n getRoleText = () => {\n let roleText;\n const { item } = this.props;\n switch(item.role) {\n case 'Owner':\n roleText = gettext('Owner');\n break;\n case 'Admin':\n roleText = gettext('Admin');\n break;\n case 'Member':\n roleText = gettext('Member');\n break;\n }\n return roleText;\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isDeleteDialogOpen } = this.state;\n\n const itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n const deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', itemName);\n\n const url = item.parent_group_id == 0 ?\n `${siteRoot}sys/groups/${item.id}/libraries/` :\n `${siteRoot}sys/departments/${item.id}/`;\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><Link to={url}>{item.name}</Link></td>\n <td>{this.getRoleText()}</td>\n <td>{moment(item.created_at).format('YYYY-MM-DD HH:mm')}</td>\n <td>\n {(isOpIconShown && item.parent_group_id == 0) &&\n <OpMenu\n operations={['Delete']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Group')}\n message={deleteDialogMsg}\n executeOperation={this.deleteItem}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass Groups extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n userInfo: {},\n items: []\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetUser(this.props.email).then((res) => {\n this.setState({\n userInfo: res.data\n });\n });\n seafileAPI.sysAdminListGroupsJoinedByUser(this.props.email).then(res => {\n this.setState({\n loading: false,\n items: res.data.group_list\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n deleteItem = (groupID) => {\n seafileAPI.sysAdminDismissGroupByID(groupID).then(res => {\n let items = this.state.items.filter(item => {\n return item.id != groupID;\n });\n this.setState({items: items});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <Nav currentItem=\"groups\" email={this.props.email} userName={this.state.userInfo.name} />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.items}\n deleteItem={this.deleteItem}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default Groups;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Alert } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport UserSelect from '../../user-select';\n\n\nconst propTypes = {\n createRepo: PropTypes.func.isRequired,\n toggleDialog: PropTypes.func.isRequired,\n};\n\nclass SysAdminCreateRepoDialog extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n repoName: '',\n ownerEmail: '',\n errMessage: '',\n isSubmitBtnActive: false\n };\n this.newInput = React.createRef();\n }\n\n handleRepoNameChange = (e) => {\n const value = e.target.value;\n this.setState({\n repoName: value,\n isSubmitBtnActive: value.trim()\n });\n }\n\n handleSubmit = () => {\n const { repoName, ownerEmail } = this.state;\n this.props.createRepo(repoName.trim(), ownerEmail);\n this.toggle();\n }\n\n handleSelectChange = (option) => {\n // option can be null\n this.setState({\n ownerEmail: option ? option.email : ''\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key === 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n toggle = () => {\n this.props.toggleDialog();\n }\n\n componentDidMount() {\n this.newInput.focus();\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('New Library')}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Label for=\"repoName\">{gettext('Name')}</Label>\n <Input\n id=\"repoName\"\n onKeyPress={this.handleKeyPress}\n innerRef={input => {this.newInput = input;}}\n value={this.state.repoName}\n onChange={this.handleRepoNameChange}\n />\n </FormGroup>\n <FormGroup>\n <Label for=\"userSelect\">\n {gettext('Owner')}\n <span className=\"small text-secondary\">{gettext('(If left blank, owner will be admin)')}</span>\n </Label>\n <UserSelect\n id=\"userSelect\"\n isMulti={false}\n className=\"reviewer-select\"\n placeholder={gettext('Select a user')}\n onSelectChange={this.handleSelectChange}\n />\n </FormGroup>\n </Form>\n {this.state.errMessage && <Alert color=\"danger\">{this.state.errMessage}</Alert>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!this.state.isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminCreateRepoDialog.propTypes = propTypes;\n\nexport default SysAdminCreateRepoDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'all', urlPart: 'all-libraries', text: gettext('All')},\n {name: 'system', urlPart: 'system-library', text: gettext('System')},\n {name: 'trash', urlPart: 'trash-libraries', text: gettext('Trash')}\n ];\n }\n\n render() {\n const { currentItem } = this.props;\n return (\n <div className=\"cur-view-path tab-nav-container\">\n <ul className=\"nav\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item\" key={index}>\n <Link to={`${siteRoot}sys/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { isPro, gettext, siteRoot } from '../../../utils/constants';\nimport { Button } from 'reactstrap';\nimport { seafileAPI } from '../../../utils/seafile-api.js';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../toast';\nimport UserSelect from '../../user-select';\nimport SharePermissionEditor from '../../select-editor/share-permission-editor';\n\nclass UserItem extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOperationShow: false\n };\n }\n\n onMouseEnter = () => {\n this.setState({isOperationShow: true});\n }\n\n onMouseLeave = () => {\n this.setState({isOperationShow: false});\n }\n\n deleteShareItem = () => {\n let item = this.props.item;\n this.props.deleteShareItem(item.user_email);\n }\n\n onChangeUserPermission = (permission) => {\n let item = this.props.item;\n this.props.onChangeUserPermission(item, permission);\n }\n\n render() {\n let item = this.props.item;\n let currentPermission = item.is_admin ? 'admin' : item.permission;\n return (\n <tr onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>\n <td className=\"name\">{item.user_name}</td>\n <td>\n <SharePermissionEditor\n isTextMode={true}\n isEditIconShow={this.state.isOperationShow}\n currentPermission={currentPermission}\n permissions={this.props.permissions}\n onPermissionChanged={this.onChangeUserPermission}\n />\n </td>\n <td>\n <span\n className={`sf2-icon-x3 action-icon ${this.state.isOperationShow ? '' : 'hide'}`}\n onClick={this.deleteShareItem}\n title={gettext('Delete')}\n >\n </span>\n </td>\n </tr>\n );\n }\n}\n\nclass UserList extends React.Component {\n\n render() {\n let items = this.props.items;\n return (\n <tbody>\n {items.map((item, index) => {\n return (\n <UserItem\n key={index}\n item={item}\n permissions={this.props.permissions}\n deleteShareItem={this.props.deleteShareItem}\n onChangeUserPermission={this.props.onChangeUserPermission}\n />\n );\n })}\n </tbody>\n );\n }\n}\n\nconst propTypes = {\n isGroupOwnedRepo: PropTypes.bool,\n itemPath: PropTypes.string.isRequired,\n itemType: PropTypes.string.isRequired,\n repoID: PropTypes.string.isRequired\n};\n\nclass SysAdminShareToUser extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n selectedOption: null,\n errorMsg: [],\n permission: 'rw',\n sharedItems: []\n };\n this.options = [];\n this.permissions = ['rw', 'r'];\n if (isPro) {\n this.permissions.push('admin', 'cloud-edit', 'preview');\n }\n }\n\n handleSelectChange = (option) => {\n this.setState({selectedOption: option});\n this.options = [];\n }\n\n componentDidMount() {\n let repoID = this.props.repoID;\n seafileAPI.sysAdminListRepoSharedItems(repoID, 'user').then((res) => {\n if(res.data.length !== 0) {\n this.setState({sharedItems: res.data});\n }\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n setPermission = (permission) => {\n this.setState({permission: permission});\n }\n\n shareToUser = () => {\n let users = [];\n let repoID = this.props.repoID;\n if (this.state.selectedOption && this.state.selectedOption.length > 0 ) {\n for (let i = 0; i < this.state.selectedOption.length; i ++) {\n users[i] = this.state.selectedOption[i].email;\n }\n }\n seafileAPI.sysAdminAddRepoSharedItem(repoID, 'user' , users, this.state.permission).then(res => {\n let errorMsg = [];\n if (res.data.failed.length > 0) {\n for (let i = 0 ; i < res.data.failed.length ; i++) {\n errorMsg[i] = res.data.failed[i];\n }\n }\n let newItems = res.data.success;\n this.setState({\n errorMsg: errorMsg,\n sharedItems: this.state.sharedItems.concat(newItems),\n selectedOption: null,\n permission: 'rw',\n });\n this.refs.userSelect.clearSelect();\n }).catch(error => {\n if (error.response) {\n let message = gettext('Library can not be shared to owner.');\n let errMessage = [];\n errMessage.push(message);\n this.setState({\n errorMsg: errMessage,\n selectedOption: null,\n });\n }\n });\n }\n\n deleteShareItem = (useremail) => {\n let repoID = this.props.repoID;\n seafileAPI.sysAdminDeleteRepoSharedItem(repoID, 'user', useremail).then(res => {\n this.setState({\n sharedItems: this.state.sharedItems.filter( item => { return item.user_email !== useremail; })\n });\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n onChangeUserPermission = (item, permission) => {\n let repoID = this.props.repoID;\n let userEmail = item.user_email;\n seafileAPI.sysAdminUpdateRepoSharedItemPermission(repoID, 'user', userEmail, permission).then(() => {\n this.updateSharedItems(item, permission);\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateSharedItems = (item, permission) => {\n let username = item.user_name;\n let sharedItems = this.state.sharedItems.map(sharedItem => {\n let sharedItemUsername = sharedItem.user_name;\n if (username === sharedItemUsername) {\n sharedItem.permission = permission;\n sharedItem.is_admin = permission === 'admin' ? true : false;\n }\n return sharedItem;\n });\n this.setState({sharedItems: sharedItems});\n }\n\n render() {\n let { sharedItems } = this.state;\n return (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"50%\">{gettext('User')}</th>\n <th width=\"35%\">{gettext('Permission')}</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <UserSelect\n ref=\"userSelect\"\n isMulti={true}\n className=\"reviewer-select\"\n placeholder={gettext('Search users...')}\n onSelectChange={this.handleSelectChange}\n />\n </td>\n <td>\n <SharePermissionEditor\n isTextMode={false}\n isEditIconShow={false}\n currentPermission={this.state.permission}\n permissions={this.permissions}\n onPermissionChanged={this.setPermission}\n />\n </td>\n <td>\n <Button onClick={this.shareToUser}>{gettext('Submit')}</Button>\n </td>\n </tr>\n {this.state.errorMsg.length > 0 &&\n this.state.errorMsg.map((item, index) => {\n let errMessage = '';\n if (item.email) {\n errMessage = item.email + ': ' + item.error_msg;\n } else {\n errMessage = item;\n }\n return (\n <tr key={index}>\n <td colSpan={3}><p className=\"error\">{errMessage}</p></td>\n </tr>\n );\n })\n }\n </tbody>\n </table>\n <div className=\"share-list-container\">\n <table className=\"table-thead-hidden\">\n <thead>\n <tr>\n <th width=\"50%\">{gettext('User')}</th>\n <th width=\"35%\">{gettext('Permission')}</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <UserList\n items={sharedItems}\n permissions={this.permissions}\n deleteShareItem={this.deleteShareItem}\n onChangeUserPermission={this.onChangeUserPermission}\n />\n </table>\n </div>\n </Fragment>\n );\n }\n}\n\nSysAdminShareToUser.propTypes = propTypes;\n\nexport default SysAdminShareToUser;\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from 'reactstrap';\nimport Select from 'react-select';\nimport makeAnimated from 'react-select/lib/animated';\nimport { isPro, gettext } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api.js';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../toast';\nimport SharePermissionEditor from '../../select-editor/share-permission-editor';\n\nclass GroupItem extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOperationShow: false\n };\n }\n\n onMouseEnter = () => {\n this.setState({isOperationShow: true});\n }\n\n onMouseLeave = () => {\n this.setState({isOperationShow: false});\n }\n\n deleteShareItem = () => {\n let item = this.props.item;\n this.props.deleteShareItem(item.group_id);\n }\n\n onChangeUserPermission = (permission) => {\n let item = this.props.item;\n this.props.onChangeUserPermission(item, permission);\n }\n\n render() {\n let item = this.props.item;\n let currentPermission = item.is_admin ? 'admin' : item.permission;\n return (\n <tr onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>\n <td className='name'>{item.group_name}</td>\n <td>\n <SharePermissionEditor\n isTextMode={true}\n isEditIconShow={this.state.isOperationShow}\n currentPermission={currentPermission}\n permissions={this.props.permissions}\n onPermissionChanged={this.onChangeUserPermission}\n />\n </td>\n <td>\n <span\n className={`sf2-icon-x3 action-icon ${this.state.isOperationShow ? '' : 'hide'}`}\n onClick={this.deleteShareItem}\n title={gettext('Delete')}\n >\n </span>\n </td>\n </tr>\n );\n }\n}\n\nclass GroupList extends React.Component {\n\n render() {\n let items = this.props.items;\n return (\n <tbody>\n {items.map((item, index) => {\n return (\n <GroupItem\n key={index}\n item={item}\n permissions={this.props.permissions}\n deleteShareItem={this.props.deleteShareItem}\n onChangeUserPermission={this.props.onChangeUserPermission}\n />\n );\n })}\n </tbody>\n );\n }\n}\n\nconst propTypes = {\n isGroupOwnedRepo: PropTypes.bool,\n itemPath: PropTypes.string.isRequired,\n itemType: PropTypes.string.isRequired,\n repoID: PropTypes.string.isRequired,\n isRepoOwner: PropTypes.bool.isRequired,\n};\n\nconst NoOptionsMessage = (props) => {\n return (\n <div {...props.innerProps} style={{margin: '6px 10px', textAlign: 'center', color: 'hsl(0,0%,50%)'}}>{gettext('Group not found')}</div>\n );\n};\n\nclass SysAdminShareToGroup extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n selectedOption: null,\n errorMsg: [],\n permission: 'rw',\n sharedItems: []\n };\n this.options = [];\n this.permissions = ['rw', 'r'];\n if (isPro) {\n this.permissions.push('admin', 'cloud-edit', 'preview');\n }\n }\n\n handleSelectChange = (option) => {\n this.setState({selectedOption: option});\n }\n\n componentDidMount() {\n this.loadOptions();\n this.listSharedGroups();\n }\n\n loadOptions = () => {\n seafileAPI.shareableGroups().then((res) => {\n this.options = [];\n for (let i = 0 ; i < res.data.length; i++) {\n let obj = {};\n obj.value = res.data[i].name;\n obj.id = res.data[i].id;\n obj.label = res.data[i].name;\n this.options.push(obj);\n }\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n listSharedGroups = () => {\n let repoID = this.props.repoID;\n seafileAPI.sysAdminListRepoSharedItems(repoID, 'group').then((res) => {\n if(res.data.length !== 0) {\n this.setState({\n sharedItems: res.data\n });\n }\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n setPermission = (permission) => {\n this.setState({permission: permission});\n }\n\n shareToGroup = () => {\n let groups = [];\n let repoID = this.props.repoID;\n if (this.state.selectedOption && this.state.selectedOption.length > 0 ) {\n for (let i = 0; i < this.state.selectedOption.length; i ++) {\n groups[i] = this.state.selectedOption[i].id;\n }\n }\n seafileAPI.sysAdminAddRepoSharedItem(repoID, 'group', groups, this.state.permission).then(res => {\n let errorMsg = [];\n if (res.data.failed.length > 0) {\n for (let i = 0 ; i < res.data.failed.length ; i++) {\n errorMsg[i] = res.data.failed[i];\n }\n }\n let items = res.data.success;\n this.setState({\n errorMsg: errorMsg,\n sharedItems: this.state.sharedItems.concat(items),\n selectedOption: null,\n permission: 'rw',\n });\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteShareItem = (groupID) => {\n let repoID = this.props.repoID;\n seafileAPI.sysAdminDeleteRepoSharedItem(repoID, 'group', groupID).then(() => {\n this.setState({\n sharedItems: this.state.sharedItems.filter(item => { return item.group_id !== groupID; })\n });\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n onChangeUserPermission = (item, permission) => {\n let repoID = this.props.repoID;\n let groupID = item.group_id;\n seafileAPI.sysAdminUpdateRepoSharedItemPermission(repoID, 'group', groupID, permission).then(() => {\n this.updateSharedItems(item, permission);\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateSharedItems = (item, permission) => {\n let groupID = item.group_id;\n let sharedItems = this.state.sharedItems.map(sharedItem => {\n let sharedItemGroupID = sharedItem.group_id;\n if (groupID === sharedItemGroupID) {\n sharedItem.permission = permission;\n sharedItem.is_admin = permission === 'admin' ? true : false;\n }\n return sharedItem;\n });\n this.setState({sharedItems: sharedItems});\n }\n\n render() {\n return (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"50%\">{gettext('Group')}</th>\n <th width=\"35%\">{gettext('Permission')}</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <Select\n isMulti\n onChange={this.handleSelectChange}\n options={this.options}\n placeholder={gettext('Select groups...')}\n components={makeAnimated()}\n maxMenuHeight={200}\n inputId={'react-select-2-input'}\n value={this.state.selectedOption}\n components={{ NoOptionsMessage }}\n />\n </td>\n <td>\n <SharePermissionEditor\n isTextMode={false}\n isEditIconShow={false}\n currentPermission={this.state.permission}\n permissions={this.permissions}\n onPermissionChanged={this.setPermission}\n />\n </td>\n <td>\n <Button onClick={this.shareToGroup}>{gettext('Submit')}</Button>\n </td>\n </tr>\n {this.state.errorMsg.length > 0 &&\n this.state.errorMsg.map((item, index) => {\n let errMessage = item.group_name + ': ' + item.error_msg;\n return (\n <tr key={index}>\n <td colSpan={3}><p className=\"error\">{errMessage}</p></td>\n </tr>\n );\n })\n }\n </tbody>\n </table>\n <div className=\"share-list-container\">\n <table className=\"table-thead-hidden\">\n <thead>\n <tr>\n <th width=\"50%\">{gettext('Group')}</th>\n <th width=\"35%\">{gettext('Permission')}</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <GroupList\n items={this.state.sharedItems}\n permissions={this.permissions}\n deleteShareItem={this.deleteShareItem}\n onChangeUserPermission={this.onChangeUserPermission}\n />\n </table>\n </div>\n </Fragment>\n );\n }\n}\n\nSysAdminShareToGroup.propTypes = propTypes;\n\nexport default SysAdminShareToGroup;\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Modal, ModalHeader, ModalBody, TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport SysAdminShareToUser from './sysadmin-share-to-user';\nimport SysAdminShareToGroup from './sysadmin-share-to-group';\nimport '../../../css/share-link-dialog.css';\n\nconst propTypes = {\n itemName: PropTypes.string.isRequired,\n itemPath: PropTypes.string.isRequired,\n toggleDialog: PropTypes.func.isRequired,\n repoID: PropTypes.string.isRequired,\n isGroupOwnedRepo: PropTypes.bool.isRequired,\n repoEncrypted: PropTypes.bool,\n userPerm: PropTypes.string,\n enableDirPrivateShare: PropTypes.bool\n};\n\nclass SysAdminShareDialog extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n activeTab: this.getInitialActiveTab(),\n isRepoOwner: false\n };\n }\n\n getInitialActiveTab = () => {\n return 'shareToUser';\n }\n\n toggle = (tab) => {\n if (this.state.activeTab !== tab) {\n this.setState({activeTab: tab});\n }\n }\n\n renderDirContent = () => {\n let activeTab = this.state.activeTab;\n const { enableDirPrivateShare, isGroupOwnedRepo } = this.props;\n return (\n <Fragment>\n <div className=\"share-dialog-side\">\n <Nav pills>\n {enableDirPrivateShare &&\n <Fragment>\n <NavItem>\n <NavLink className={activeTab === 'shareToUser' ? 'active' : ''} onClick={this.toggle.bind(this, 'shareToUser')}>\n {gettext('Share to user')}\n </NavLink>\n </NavItem>\n <NavItem>\n <NavLink className={activeTab === 'shareToGroup' ? 'active' : ''} onClick={this.toggle.bind(this, 'shareToGroup')}>\n {gettext('Share to group')}\n </NavLink>\n </NavItem>\n </Fragment>\n }\n </Nav>\n </div>\n <div className=\"share-dialog-main\">\n <TabContent activeTab={this.state.activeTab}>\n {enableDirPrivateShare &&\n <Fragment>\n <TabPane tabId=\"shareToUser\">\n <SysAdminShareToUser itemType={'library'} isGroupOwnedRepo={isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} isRepoOwner={this.state.isRepoOwner}/>\n </TabPane>\n <TabPane tabId=\"shareToGroup\">\n <SysAdminShareToGroup itemType={'library'} isGroupOwnedRepo={isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} isRepoOwner={this.state.isRepoOwner}/>\n </TabPane>\n </Fragment>\n }\n </TabContent>\n </div>\n </Fragment>\n );\n }\n\n render() {\n return (\n <div>\n <Modal isOpen={true} style={{maxWidth: '720px'}} className=\"share-dialog\" toggle={this.props.toggleDialog}>\n <ModalHeader toggle={this.props.toggleDialog}>{gettext('Share')} <span className=\"op-target\" title={this.props.itemName}>{this.props.itemName}</span></ModalHeader>\n <ModalBody className=\"share-dialog-content\">\n {this.renderDirContent()}\n </ModalBody>\n </Modal>\n </div>\n );\n }\n}\n\nSysAdminShareDialog.propTypes = propTypes;\n\nexport default SysAdminShareDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input, Alert } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api.js';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../toast';\n\nconst propTypes = {\n itemName: PropTypes.string.isRequired,\n toggleDialog: PropTypes.func.isRequired,\n repoID: PropTypes.string.isRequired,\n};\n\nclass SysAdminLibHistorySettingDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n keepDays: -1,\n expireDays: 30,\n disabled: true,\n allHistory: true,\n noHistory: false,\n autoHistory: false,\n errorInfo: ''\n };\n }\n\n componentDidMount() {\n seafileAPI.sysAdminGetRepoHistorySetting(this.props.repoID).then(res => {\n this.setState({\n keepDays: res.data.keep_days,\n allHistory: res.data.keep_days < 0 ? true : false,\n noHistory: res.data.keep_days === 0 ? true : false,\n autoHistory: res.data.keep_days > 0 ? true : false,\n disabled: res.data.keep_days > 0 ? false : true,\n expireDays: res.data.keep_days > 0 ? res.data.keep_days : 30,\n });\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n submit = () => {\n let days = this.state.keepDays;\n if (this.state.autoHistory) {\n days = this.state.expireDays;\n }\n let repoID = this.props.repoID;\n let reg = /^-?\\d+$/;\n let flag = reg.test(days);\n if (flag) {\n let message = gettext('Successfully set library history.');\n seafileAPI.sysAdminUpdateRepoHistorySetting(repoID, days).then(res => {\n toaster.success(message);\n this.setState({keepDays: res.data.keep_days});\n this.props.toggleDialog();\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n } else {\n this.setState({\n errorInfo: gettext('Please enter a non-negative integer'),\n });\n }\n }\n\n handleKeyPress = (e) => {\n if (e.key === 'Enter') {\n this.submit();\n e.preventDefault();\n }\n }\n\n onChange = (e) => {\n let num = e.target.value;\n this.setState({\n keepDays: num,\n expireDays: num,\n });\n }\n\n setLimitDays = (type) => {\n if (type === 'allHistory') {\n this.setState({\n keepDays: -1,\n });\n } else if (type === 'noHistory') {\n this.setState({\n keepDays: 0,\n });\n } else {\n this.setState({\n disabled: false\n });\n }\n\n this.setState({\n allHistory: type === 'allHistory' ? true : false,\n noHistory: type === 'noHistory' ? true : false,\n autoHistory: type === 'autoHistory' ? true : false,\n });\n }\n\n render() {\n const itemName = this.props.itemName;\n return (\n <Modal isOpen={true}>\n <ModalHeader toggle={this.props.toggleDialog}>\n <span className=\"op-target\" title={itemName}>{itemName}</span>{' '}\n {gettext('History Setting')}\n </ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup check>\n <Input type=\"radio\" name=\"radio1\" checked={this.state.allHistory} onChange={() => {this.setLimitDays('allHistory');}}/>{' '}\n <Label>{gettext('Keep full history')}</Label>\n </FormGroup>\n <FormGroup check>\n <Input type=\"radio\" name=\"radio1\" checked={this.state.noHistory} onChange={() =>{this.setLimitDays('noHistory');}}/>{' '}\n <Label>{gettext('Don\\'t keep history')}</Label>\n </FormGroup>\n <FormGroup check>\n <Input type=\"radio\" name=\"radio1\" checked={this.state.autoHistory} onChange={() =>{this.setLimitDays('autoHistory');}}/>{' '}\n <Label>{gettext('Only keep a period of history:')}</Label>\n <Input\n type=\"text\"\n className=\"expire-input\"\n value={this.state.expireDays}\n onChange={this.onChange}\n disabled={this.state.disabled}\n onKeyDown={this.handleKeyPress}\n />{' '}\n <Label><span>{gettext('days')}</span></Label>\n </FormGroup>\n {this.state.errorInfo && <Alert color=\"danger\">{this.state.errorInfo}</Alert>}\n </Form>\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.props.toggleDialog}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.submit}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminLibHistorySettingDialog.propTypes = propTypes;\n\nexport default SysAdminLibHistorySettingDialog;\n","import React, { Component, Fragment } from 'react';\nimport { Link } from '@reach/router';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot, isPro } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport ModalPortal from '../../../components/modal-portal';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport TransferDialog from '../../../components/dialog/transfer-dialog';\nimport DeleteRepoDialog from '../../../components/dialog/delete-repo-dialog';\nimport SysAdminShareDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-share-dialog';\nimport SysAdminLibHistorySettingDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-lib-history-setting-dialog';\nimport UserLink from '../user-link';\n\nconst { enableSysAdminViewRepo } = window.sysadmin.pageOptions;\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n getPreviousPageList = () => {\n this.props.getListByPage(this.props.pageInfo.current_page - 1);\n }\n\n getNextPageList = () => {\n this.props.getListByPage(this.props.pageInfo.current_page + 1);\n }\n\n sortByFileCount = (e) => {\n e.preventDefault();\n this.props.sortItems('file_count');\n }\n\n sortBySize = (e) => {\n e.preventDefault();\n this.props.sortItems('size');\n }\n\n render() {\n // offer 'sort' only for 'all repos'\n const { loading, errorMsg, items, pageInfo, curPerPage, sortBy } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No libraries')}</h2>\n </EmptyTip>\n );\n const initialSortIcon = <span className=\"fas fa-sort\"></span>;\n const sortIcon = <span className=\"fas fa-caret-down\"></span>;\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"5%\">{/*icon*/}</th>\n <th width=\"25%\">{gettext('Name')}</th>\n <th width=\"15%\">\n {sortBy != undefined ?\n <Fragment>\n <a className=\"d-inline-block table-sort-op\" href=\"#\" onClick={this.sortByFileCount}>{gettext('Files')} {sortBy == 'file_count' ? sortIcon : initialSortIcon}</a>{' / '}\n <a className=\"d-inline-block table-sort-op\" href=\"#\" onClick={this.sortBySize}>{gettext('Size')} {sortBy == 'size' ? sortIcon : initialSortIcon}</a>\n </Fragment> :\n gettext('Files') / gettext('Size')\n }\n </th>\n <th width=\"32%\">ID</th>\n <th width=\"18%\">{gettext('Owner')}</th>\n <th width=\"5%\">{/*Operations*/}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n repo={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n onDeleteRepo={this.props.onDeleteRepo}\n onTransferRepo={this.props.onTransferRepo}\n />);\n })}\n </tbody>\n </table>\n {pageInfo &&\n <Paginator\n gotoPreviousPage={this.getPreviousPageList}\n gotoNextPage={this.getNextPageList}\n currentPage={pageInfo.current_page}\n hasNextPage={pageInfo.has_next_page}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n }\n </Fragment>\n );\n\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isShareDialogOpen: false,\n isDeleteDialogOpen: false,\n isTransferDialogOpen: false,\n isHistorySettingDialogOpen: false,\n isRepoDeleted: false,\n };\n }\n\n onDeleteRepo = (repo) => {\n seafileAPI.sysAdminDeleteRepo(repo.id).then((res) => {\n this.props.onDeleteRepo(repo);\n this.setState({\n isDeleteDialogOpen: false,\n isRepoDeleted: true,\n });\n const msg = gettext('Successfully deleted {name}.').replace('{name}', repo.name);\n toaster.success(msg);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n\n this.setState({isRepoDeleted: false});\n });\n }\n\n onTransferRepo = (owner) => {\n seafileAPI.sysAdminTransferRepo(this.props.repo.id, owner.email).then((res) => {\n this.props.onTransferRepo(res.data);\n let message = gettext('Successfully transferred the library.');\n toaster.success(message);\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n this.toggleTransferDialog();\n }\n\n handleMouseOver = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseOut = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Share':\n this.toggleShareDialog();\n break;\n case 'Delete':\n this.toggleDeleteDialog();\n break;\n case 'Transfer':\n this.toggleTransferDialog();\n break;\n case 'History Setting':\n this.toggleHistorySettingDialog();\n break;\n default:\n break;\n }\n }\n\n toggleShareDialog = () => {\n this.setState({isShareDialogOpen: !this.state.isShareDialogOpen});\n }\n\n toggleDeleteDialog = () => {\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n toggleTransferDialog = () => {\n this.setState({isTransferDialogOpen: !this.state.isTransferDialogOpen});\n }\n\n toggleHistorySettingDialog = () => {\n this.setState({isHistorySettingDialogOpen: !this.state.isHistorySettingDialogOpen});\n }\n\n renderRepoName = () => {\n const { repo } = this.props;\n if (repo.name) {\n if (isPro && enableSysAdminViewRepo && !repo.encrypted) {\n return <Link to={`${siteRoot}sys/libraries/${repo.id}/`}>{repo.name}</Link>;\n } else {\n return repo.name;\n }\n } else {\n return '--';\n }\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'Share':\n translateResult = gettext('Share');\n break;\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n case 'Transfer':\n translateResult = gettext('Transfer');\n break;\n case 'History Setting':\n translateResult = gettext('History Setting');\n break;\n default:\n break;\n }\n\n return translateResult;\n }\n\n getOperations = () => {\n const { repo } = this.props;\n let operations = ['Delete', 'Transfer'];\n if (!repo.encrypted) {\n operations.push('Share');\n }\n operations.push('History Setting');\n return operations;\n }\n\n render () {\n const { repo } = this.props;\n const {\n isOpIconShown,\n isShareDialogOpen,\n isDeleteDialogOpen,\n isTransferDialogOpen,\n isHistorySettingDialogOpen\n } = this.state;\n let iconUrl = Utils.getLibIconUrl(repo);\n let iconTitle = Utils.getLibIconTitle(repo);\n const index = repo.owner_email.indexOf('@seafile_group');\n let isGroupOwnedRepo = index != -1;\n let departmentID;\n if (isGroupOwnedRepo) {\n departmentID = repo.owner_email.substring(0, index);\n }\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>\n <td><img src={iconUrl} title={iconTitle} alt={iconTitle} width=\"24\" /></td>\n <td>{this.renderRepoName()}</td>\n <td>{`${repo.file_count} / ${Utils.bytesToSize(repo.size)}`}</td>\n <td>{repo.id}</td>\n <td>\n {isGroupOwnedRepo ?\n <Link to={`${siteRoot}sys/departments/${departmentID}/`}>{repo.owner_name}</Link> :\n <UserLink email={repo.owner_email} name={repo.owner_name} />\n }\n </td>\n <td>\n {(!isGroupOwnedRepo && isOpIconShown) &&\n <OpMenu\n operations={this.getOperations()}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isShareDialogOpen &&\n <ModalPortal>\n <SysAdminShareDialog\n itemName={repo.name}\n itemPath={'/'}\n repoID={repo.id}\n isGroupOwnedRepo={isGroupOwnedRepo}\n repoEncrypted={repo.encrypted}\n enableDirPrivateShare={true}\n userPerm={repo.permission}\n toggleDialog={this.toggleShareDialog}\n />\n </ModalPortal>\n }\n {isDeleteDialogOpen &&\n <ModalPortal>\n <DeleteRepoDialog\n repo={repo}\n isRepoDeleted={this.state.isRepoDeleted}\n onDeleteRepo={this.onDeleteRepo}\n toggle={this.toggleDeleteDialog}\n />\n </ModalPortal>\n }\n {isTransferDialogOpen &&\n <ModalPortal>\n <TransferDialog\n itemName={repo.name}\n submit={this.onTransferRepo}\n canTransferToDept={false}\n toggleDialog={this.toggleTransferDialog}\n />\n </ModalPortal>\n }\n {isHistorySettingDialogOpen &&\n <ModalPortal>\n <SysAdminLibHistorySettingDialog\n repoID={repo.id}\n itemName={repo.name}\n toggleDialog={this.toggleHistorySettingDialog}\n />\n </ModalPortal>\n }\n </Fragment>\n );\n }\n}\n\nexport default Content;\n","import React, { Component, Fragment } from 'react';\nimport { navigate } from '@reach/router';\nimport { Button } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport SysAdminCreateRepoDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-create-repo-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Search from '../search';\nimport ReposNav from './repos-nav';\nimport Content from './repos';\n\nclass AllRepos extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n repos: [],\n pageInfo: {},\n perPage: 25,\n sortBy: '',\n isCreateRepoDialogOpen: false\n };\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage = 1, perPage, sortBy } = this.state;\n this.setState({\n sortBy: urlParams.get('order_by') || sortBy,\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getReposByPage(this.state.currentPage);\n });\n }\n\n toggleCreateRepoDialog = () => {\n this.setState({isCreateRepoDialogOpen: !this.state.isCreateRepoDialogOpen});\n }\n\n getReposByPage = (page) => {\n const { perPage, sortBy } = this.state;\n seafileAPI.sysAdminListAllRepos(page, perPage, sortBy).then((res) => {\n this.setState({\n loading: false,\n repos: res.data.repos,\n pageInfo: res.data.page_info\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n sortItems = (sortBy) => {\n this.setState({\n currentPage: 1,\n sortBy: sortBy\n }, () => {\n let url = new URL(location.href);\n let searchParams = new URLSearchParams(url.search);\n const { currentPage, sortBy } = this.state;\n searchParams.set('page', currentPage);\n searchParams.set('order_by', sortBy);\n url.search = searchParams.toString();\n navigate(url.toString());\n this.getReposByPage(currentPage);\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getReposByPage(1);\n });\n }\n\n createRepo = (repoName, Owner) => {\n seafileAPI.sysAdminCreateRepo(repoName, Owner).then(res => {\n this.state.repos.unshift(res.data);\n this.setState({\n repos: this.state.repos\n });\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n onDeleteRepo = (targetRepo) => {\n let repos = this.state.repos.filter(repo => {\n return repo.id != targetRepo.id;\n });\n this.setState({\n repos: repos\n });\n }\n\n onTransferRepo = (targetRepo) => {\n let repos = this.state.repos.map((item) => {\n return item.id == targetRepo.id ? targetRepo : item;\n });\n this.setState({\n repos: repos\n });\n }\n\n getSearch = () => {\n return <Search\n placeholder={gettext('Search libraries by name')}\n submit={this.searchRepos}\n />;\n }\n\n searchRepos = (repoName) => {\n navigate(`${siteRoot}sys/search-libraries/?name=${encodeURIComponent(repoName)}`);\n }\n\n render() {\n let { isCreateRepoDialogOpen } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar search={this.getSearch()}>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleCreateRepoDialog}>\n <i className=\"fas fa-plus-square text-secondary mr-1\"></i>{gettext('New Library')}\n </Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <ReposNav currentItem=\"all\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.repos}\n sortBy={this.state.sortBy}\n sortItems={this.sortItems}\n pageInfo={this.state.pageInfo}\n curPerPage={this.state.perPage}\n getListByPage={this.getReposByPage}\n resetPerPage={this.resetPerPage}\n onDeleteRepo={this.onDeleteRepo}\n onTransferRepo={this.onTransferRepo}\n />\n </div>\n </div>\n </div>\n {isCreateRepoDialogOpen &&\n <SysAdminCreateRepoDialog\n createRepo={this.createRepo}\n toggleDialog={this.toggleCreateRepoDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default AllRepos;\n","import React, { Component, Fragment } from 'react';\nimport { Link } from '@reach/router';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport Loading from '../../../components/loading';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport ReposNav from './repos-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"33%\">{gettext('Name')}</th>\n <th width=\"34%\">ID</th>\n <th width=\"33%\">{gettext('Description')}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item key={index} item={item}/>);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return table;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const item = this.props.item;\n return (\n <tr>\n <td><Link to={`${siteRoot}sys/libraries/${item.id}/`}>{item.name}</Link></td>\n <td>{item.id}</td>\n <td>{item.description}</td>\n </tr>\n );\n }\n}\n\nclass SystemRepo extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n items: []\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetSystemRepoInfo().then((res) => {\n let items = [];\n items.push(res.data);\n this.setState({\n items: items,\n loading: false\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar/>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <ReposNav currentItem=\"system\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.items}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default SystemRepo;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport ModalPortal from '../../../components/modal-portal';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Search from '../search';\nimport UserLink from '../user-link';\nimport ReposNav from './repos-nav';\n\nconst { trashReposExpireDays } = window.sysadmin.pageOptions;\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n getPreviousPageList = () => {\n this.props.getListByPage(this.props.pageInfo.current_page - 1);\n }\n\n getNextPageList = () => {\n this.props.getListByPage(this.props.pageInfo.current_page + 1);\n }\n\n render() {\n const { loading, errorMsg, items, pageInfo, curPerPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No deleted libraries')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <p className=\"mt-4 small text-secondary\">{gettext('Tip: libraries deleted {trashReposExpireDays} days ago will be cleaned automatically.').replace('{trashReposExpireDays}', trashReposExpireDays)}</p>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"5%\">{/*icon*/}</th>\n <th width=\"43%\">{gettext('Name')}</th>\n <th width=\"27%\">{gettext('Owner')}</th>\n <th width=\"20%\">{gettext('Deleted Time')}</th>\n <th width=\"5%\">{/*Operations*/}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n repo={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n onDeleteRepo={this.props.onDeleteRepo}\n onRestoreRepo={this.props.onRestoreRepo}\n />);\n })}\n </tbody>\n </table>\n {pageInfo &&\n <Paginator\n gotoPreviousPage={this.getPreviousPageList}\n gotoNextPage={this.getNextPageList}\n currentPage={pageInfo.current_page}\n hasNextPage={pageInfo.has_next_page}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n }\n </Fragment>\n );\n\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n highlight: false,\n isOpIconShown: false,\n isDeleteRepoDialogOpen: false,\n isRestoreRepoDialogOpen: false\n };\n }\n\n handleMouseOver = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseOut = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n onDeleteRepo = () => {\n const repo = this.props.repo;\n seafileAPI.sysAdminDeleteTrashRepo(repo.id).then((res) => {\n this.props.onDeleteRepo(repo);\n const msg = gettext('Successfully deleted {name}.').replace('{name}', repo.name);\n toaster.success(msg);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n onRestoreRepo = () => {\n const repo = this.props.repo;\n seafileAPI.sysAdminRestoreTrashRepo(repo.id).then((res) => {\n this.props.onRestoreRepo(repo);\n let message = gettext('Successfully restored the library.');\n toaster.success(message);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n toggleDeleteRepoDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isDeleteRepoDialogOpen: !this.state.isDeleteRepoDialogOpen});\n }\n\n toggleRestoreRepoDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isRestoreRepoDialogOpen: !this.state.isRestoreRepoDialogOpen});\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'Restore':\n translateResult = gettext('Restore');\n break;\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n default:\n break;\n }\n\n return translateResult;\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Restore':\n this.toggleRestoreRepoDialog();\n break;\n case 'Delete':\n this.toggleDeleteRepoDialog();\n break;\n default:\n break;\n }\n }\n\n render () {\n const { repo } = this.props;\n const { isOpIconShown, isDeleteRepoDialogOpen, isRestoreRepoDialogOpen } = this.state;\n const iconUrl = Utils.getLibIconUrl(repo);\n const iconTitle = Utils.getLibIconTitle(repo);\n const repoName = '<span class=\"op-target\">' + Utils.HTMLescape(repo.name) + '</span>';\n\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>\n <td><img src={iconUrl} title={iconTitle} alt={iconTitle} width=\"24\" /></td>\n <td>{repo.name}</td>\n <td>\n {repo.owner.indexOf('@seafile_group') == -1 ?\n <UserLink email={repo.owner} name={repo.owner_name} /> :\n repo.group_name}\n </td>\n <td>{moment(repo.delete_time).fromNow()}</td>\n <td>\n {isOpIconShown && (\n <OpMenu\n operations={['Restore', 'Delete']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n )}\n </td>\n </tr>\n {isDeleteRepoDialogOpen &&\n <ModalPortal>\n <CommonOperationConfirmationDialog\n title={gettext('Delete Library')}\n message={gettext('Are you sure you want to delete {placeholder} completely?').replace('{placeholder}', repoName)}\n executeOperation={this.onDeleteRepo}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteRepoDialog}\n />\n </ModalPortal>\n }\n {isRestoreRepoDialogOpen &&\n <ModalPortal>\n <CommonOperationConfirmationDialog\n title={gettext('Restore Library')}\n message={gettext('Are you sure you want to restore {placeholder}?').replace('{placeholder}', repoName)}\n executeOperation={this.onRestoreRepo}\n confirmBtnText={gettext('Restore')}\n toggleDialog={this.toggleRestoreRepoDialog}\n />\n </ModalPortal>\n }\n </Fragment>\n );\n }\n}\n\nclass TrashRepos extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n repos: [],\n pageInfo: {},\n perPage: 25,\n isCleanTrashDialogOpen: false\n };\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage = 1, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getReposByPage(this.state.currentPage);\n });\n }\n\n toggleCleanTrashDialog = () => {\n this.setState({isCleanTrashDialogOpen: !this.state.isCleanTrashDialogOpen});\n }\n\n getReposByPage = (page) => {\n let perPage = this.state.perPage;\n seafileAPI.sysAdminListTrashRepos(page, perPage).then((res) => {\n this.setState({\n repos: res.data.repos,\n pageInfo: res.data.page_info,\n loading: false\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getReposByPage(1);\n });\n }\n\n onDeleteRepo = (targetRepo) => {\n let repos = this.state.repos.filter(repo => {\n return repo.id != targetRepo.id;\n });\n this.setState({\n repos: repos\n });\n }\n\n onRestoreRepo = (targetRepo) => {\n let repos = this.state.repos.filter(repo => {\n return repo.id != targetRepo.id;\n });\n this.setState({\n repos: repos\n });\n }\n\n cleanTrash = () => {\n seafileAPI.sysAdminCleanTrashRepos().then(res => {\n this.setState({repos: []});\n toaster.success(gettext('Successfully cleared trash.'));\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n getSearch = () => {\n return <Search\n placeholder={gettext('Search libraries by owner')}\n submit={this.searchRepos}\n />;\n }\n\n searchRepos = (owner) => {\n seafileAPI.sysAdminSearchTrashRepos(owner).then((res) => {\n this.setState({\n repos: res.data.repos,\n pageInfo: null,\n errorMsg: '', // necessary!\n loading: false\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n render() {\n const { isCleanTrashDialogOpen } = this.state;\n\n // enable 'search': <MainPanelTopbar search={this.getSearch()}>\n return (\n <Fragment>\n {this.state.repos.length ? (\n <MainPanelTopbar>\n <Button className=\"operation-item\" onClick={this.toggleCleanTrashDialog}>{gettext('Clean')}</Button>\n </MainPanelTopbar>\n ) : <MainPanelTopbar />\n }\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <ReposNav currentItem=\"trash\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.repos}\n pageInfo={this.state.pageInfo}\n onDeleteRepo={this.onDeleteRepo}\n onRestoreRepo={this.onRestoreRepo}\n getListByPage={this.getReposByPage}\n resetPerPage={this.resetPerPage}\n curPerPage={this.state.perPage}\n />\n </div>\n </div>\n </div>\n {isCleanTrashDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Clear Trash')}\n message={gettext('Are you sure you want to clear trash?')}\n executeOperation={this.cleanTrash}\n confirmBtnText={gettext('Clear')}\n toggleDialog={this.toggleCleanTrashDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default TrashRepos;\n","import React, { Component, Fragment } from 'react';\nimport { Form, FormGroup, Input, Label, Col } from 'reactstrap';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Content from './repos';\n\n\nclass SearchRepos extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n name: '',\n isSubmitBtnActive: false,\n loading: true,\n errorMsg: '',\n repos: []\n };\n }\n\n componentDidMount() {\n let params = (new URL(document.location)).searchParams;\n this.setState({\n name: params.get('name') || ''\n }, this.getRepos);\n }\n\n getRepos = () => {\n const { name } = this.state;\n seafileAPI.sysAdminSearchRepos(name).then((res) => {\n this.setState({\n loading: false,\n repos: res.data.repo_list\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n searchRepos = () => {\n this.getRepos();\n }\n\n onDeleteRepo = (targetRepo) => {\n let repos = this.state.repos.filter(repo => {\n return repo.id != targetRepo.id;\n });\n this.setState({\n repos: repos\n });\n }\n\n onTransferRepo = (targetRepo) => {\n let repos = this.state.repos.map((item) => {\n return item.id == targetRepo.id ? targetRepo : item;\n });\n this.setState({\n repos: repos\n });\n }\n\n handleNameInputChange = (e) => {\n this.setState({\n name: e.target.value\n }, this.checkSubmitBtnActive);\n }\n\n checkSubmitBtnActive = () => {\n const { name } = this.state;\n this.setState({\n isSubmitBtnActive: name.trim()\n });\n }\n\n render() {\n const { name, isSubmitBtnActive } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Libraries')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <div className=\"mt-4 mb-6\">\n <h4 className=\"border-bottom font-weight-normal mb-2 pb-1\">{gettext('Search Libraries')}</h4>\n <p className=\"text-secondary small\">{gettext('Tip: you can search by keyword in name.')}</p>\n <Form>\n <FormGroup row>\n <Label for=\"name\" sm={1}>{gettext('Name')}</Label>\n <Col sm={5}>\n <Input type=\"text\" name=\"name\" id=\"name\" value={name} onChange={this.handleNameInputChange} />\n </Col>\n </FormGroup>\n <FormGroup row>\n <Col sm={{size: 5, offset: 1}}>\n <button className=\"btn btn-outline-primary\" disabled={!isSubmitBtnActive} onClick={this.searchRepos}>{gettext('Submit')}</button>\n </Col>\n </FormGroup>\n </Form>\n </div>\n <div className=\"mt-4 mb-6\">\n <h4 className=\"border-bottom font-weight-normal mb-2 pb-1\">{gettext('Result')}</h4>\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.repos}\n onDeleteRepo={this.onDeleteRepo}\n onTransferRepo={this.onTransferRepo}\n />\n </div>\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default SearchRepos;\n","class Dirent {\n constructor(obj) {\n this.name = obj.obj_name;\n this.mtime = obj.last_update;\n this.size = obj.file_size;\n this.is_file = obj.is_file;\n }\n\n isDir() {\n return !this.is_file;\n }\n}\n\nexport default Dirent;\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\n\nconst propTypes = {\n repoName: PropTypes.string.isRequired,\n currentPath: PropTypes.string.isRequired,\n onPathClick: PropTypes.func.isRequired,\n repoID: PropTypes.string.isRequired,\n};\n\nclass DirPath extends React.Component {\n\n onPathClick = (e) => {\n let path = Utils.getEventData(e, 'path');\n this.props.onPathClick(path);\n }\n\n turnPathToLink = (path) => {\n path = path[path.length - 1] === '/' ? path.slice(0, path.length - 1) : path;\n let pathList = path.split('/');\n let nodePath = '';\n let pathElem = pathList.map((item, index) => {\n if (item === '') {\n return;\n }\n if (index === (pathList.length - 1)) {\n return (\n <Fragment key={index}>\n <span className=\"path-split\">/</span>\n <span className=\"path-file-name\">{item}</span>\n </Fragment>\n );\n } else {\n nodePath += '/' + item;\n return (\n <Fragment key={index} >\n <span className=\"path-split\">/</span>\n <a className=\"path-link\" data-path={nodePath} onClick={this.onPathClick}>{item}</a>\n </Fragment>\n );\n }\n });\n return pathElem;\n }\n\n render() {\n let { isSystemRepo, currentPath, repoName } = this.props;\n let pathElem = this.turnPathToLink(currentPath);\n\n return (\n <div className=\"path-container\">\n {isSystemRepo ?\n <a href={`${siteRoot}sys/system-library/`}>{gettext('System')}</a> :\n <a href={`${siteRoot}sys/all-libraries/`}>{gettext('All')}</a>\n }\n <span className=\"path-split\">/</span>\n {(currentPath === '/' || currentPath === '') ?\n <span className=\"path-repo-name\">{repoName}</span>:\n <a className=\"path-link\" data-path=\"/\" onClick={this.onPathClick}>{repoName}</a>\n }\n {pathElem}\n </div>\n );\n }\n}\n\nDirPath.propTypes = propTypes;\n\nexport default DirPath;\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport moment from 'moment';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport Loading from '../../../components/loading';\n\nclass DirentItem extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false\n };\n }\n\n handleMouseOver = () => {\n this.setState({\n isOpIconShown: true\n });\n }\n\n handleMouseOut = () => {\n this.setState({\n isOpIconShown: false\n });\n }\n\n openFolder = () => {\n this.props.openFolder(this.props.dirent);\n }\n\n deleteDirent = (e) => {\n e.preventDefault();\n this.props.deleteDirent(this.props.dirent);\n }\n\n downloadDirent = (e) => {\n e.preventDefault();\n this.props.downloadDirent(this.props.dirent);\n }\n\n render () {\n let { isOpIconShown, isDeleteDialogOpen } = this.state;\n let { dirent, fromSystemRepo } = this.props;\n let iconUrl = Utils.getDirentIcon(dirent);\n\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>\n <td className=\"text-center\"><img src={iconUrl} width=\"24\" alt='' /></td>\n <td>\n {dirent.is_file ?\n dirent.name :\n <Link to=\"#\" onClick={this.openFolder}>{dirent.name}</Link>\n }\n </td>\n <td>\n {isOpIconShown && fromSystemRepo &&\n <a href=\"#\" className=\"op-icon sf2-icon-delete\" title={gettext('Delete')} onClick={this.deleteDirent}></a>\n }\n {isOpIconShown && dirent.is_file &&\n <a href=\"#\" className=\"op-icon sf2-icon-download\" title={gettext('Download')} onClick={this.downloadDirent}></a>\n }\n </td>\n <td>{dirent.size}</td>\n <td>{moment(dirent.mtime).fromNow()}</td>\n </tr>\n </Fragment>\n );\n }\n}\n\n\nconst propTypes = {\n direntList: PropTypes.array.isRequired\n};\n\nclass DirContent extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n let { loading, errorMsg, direntList } = this.props;\n\n if (loading) {\n return <Loading />;\n }\n\n if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n }\n\n return (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"5%\">{/*icon*/}</th>\n <th width=\"55%\">{gettext('Name')}</th>\n <th width=\"10%\">{/*operation*/}</th>\n <th width=\"15%\">{gettext('Size')}</th>\n <th width=\"15%\">{gettext('Last Update')}</th>\n </tr>\n </thead>\n <tbody>\n {direntList.map((dirent, index) => {\n return <DirentItem\n key={index}\n dirent={dirent}\n openFolder={this.props.openFolder}\n deleteDirent={this.props.deleteDirent}\n downloadDirent={this.props.downloadDirent}\n fromSystemRepo={this.props.fromSystemRepo}\n />;\n })}\n </tbody>\n </table>\n </Fragment>\n );\n }\n}\n\nDirContent.propTypes = propTypes;\n\nexport default DirContent;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport { post } from 'axios';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport CreateFolderDialog from '../../../components/dialog/create-folder-dialog';\nimport Dirent from '../../../models/system-admin/dirent';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport DirPathBar from './dir-path-bar';\nimport DirContent from './dir-content';\n\nclass DirView extends Component {\n\n constructor(props) {\n super(props);\n this.fileInput = React.createRef();\n this.state = {\n loading: true,\n errorMsg: '',\n isSystemRepo: false,\n repoName: '',\n path: '',\n direntList: [],\n isNewFolderDialogOpen: false\n };\n }\n\n componentDidMount () {\n this.loadDirentList('/');\n }\n\n onPathClick = (path) => {\n this.loadDirentList(path);\n }\n\n toggleNewFolderDialog = () => {\n this.setState({isNewFolderDialogOpen: !this.state.isNewFolderDialogOpen});\n }\n\n createNewFolder = (path) => {\n let folderName = Utils.getFileName(path);\n seafileAPI.sysAdminCreateSysRepoFolder(this.props.repoID, this.state.path, folderName).then(res => {\n let new_dirent = new Dirent(res.data);\n let direntList = this.state.direntList;\n direntList.unshift(new_dirent);\n this.setState({\n direntList: direntList\n });\n this.toggleNewFolderDialog();\n }).catch((err) => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n openFolder = (dirent) => {\n let direntPath = Utils.joinPath(this.state.path, dirent.name);\n if (!dirent.is_file) {\n this.loadDirentList(direntPath);\n }\n }\n\n loadDirentList = (path) => {\n const repoID = this.props.repoID;\n seafileAPI.sysAdminListRepoDirents(repoID, path).then(res => {\n const { is_system_library: isSystemRepo, repo_name: repoName, dirent_list } = res.data;\n let direntList = [];\n dirent_list.forEach(item => {\n let dirent = new Dirent(item);\n direntList.push(dirent);\n });\n this.setState({\n loading: false,\n repoName: repoName,\n isSystemRepo: isSystemRepo,\n direntList: direntList,\n path: path,\n }, () => {\n let url = siteRoot + 'sys/libraries/' + repoID + '/' + encodeURIComponent(this.state.repoName) + Utils.encodePath(path);\n window.history.replaceState({url: url, path: path}, path, url);\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n deleteDirent = (dirent) => {\n let path = Utils.joinPath(this.state.path, dirent.name);\n seafileAPI.sysAdminDeleteRepoDirent(this.props.repoID, path).then(res => {\n toaster.success(gettext('Successfully deleted 1 item.'));\n let direntList = this.state.direntList.filter(item => {\n return item.name != dirent.name;\n });\n this.setState({\n direntList: direntList\n });\n }).catch((err) => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n downloadDirent = (dirent) => {\n let path = Utils.joinPath(this.state.path, dirent.name);\n seafileAPI.sysAdminGetRepoFileDownloadURL(this.props.repoID, path).then(res => {\n location.href = res.data.download_url;\n }).catch((err) => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n openFileInput = () => {\n this.fileInput.current.click();\n }\n\n onFileInputChange = () => {\n if (!this.fileInput.current.files.length) {\n return;\n }\n const file = this.fileInput.current.files[0];\n\n let { path } = this.state;\n seafileAPI.sydAdminGetSysRepoItemUploadURL(path).then(res => {\n let formData = new FormData();\n formData.append('parent_dir', path);\n formData.append('file', file);\n post(res.data.upload_link, formData).then(res => {\n const fileObj = res.data[0];\n let newDirent = new Dirent({\n 'is_file': true,\n 'obj_name': fileObj.name,\n 'file_size': Utils.bytesToSize(fileObj.size),\n 'last_update': (new Date()).getTime()\n });\n let direntList = this.state.direntList;\n const dirs = direntList.filter(item => { return !item.is_file; });\n direntList.splice(dirs.length, 0, newDirent);\n this.setState({\n direntList: direntList\n });\n });\n }).catch((err) => {\n let errMessage = Utils.getErrorMsg(err);\n toaster.danger(errMessage);\n });\n }\n\n checkDuplicatedName = (newName) => {\n let direntList = this.state.direntList;\n let isDuplicated = direntList.some(object => {\n return object.name === newName;\n });\n return isDuplicated;\n }\n\n render() {\n const { loading, errorMsg,\n repoName, direntList, isSystemRepo, path,\n isNewFolderDialogOpen } = this.state;\n const { repoID } = this.props;\n\n return (\n <Fragment>\n {isSystemRepo ?\n <MainPanelTopbar>\n <Fragment>\n <input className=\"d-none\" type=\"file\" onChange={this.onFileInputChange} ref={this.fileInput} />\n <Button className=\"operation-item\" onClick={this.openFileInput}>{gettext('Upload')}</Button>\n <Button className=\"operation-item\" onClick={this.toggleNewFolderDialog}>{gettext('New Folder')}</Button>\n </Fragment>\n </MainPanelTopbar> : <MainPanelTopbar />\n }\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path align-items-center\">\n <DirPathBar\n isSystemRepo={isSystemRepo}\n repoID={repoID}\n repoName={repoName}\n currentPath={path}\n onPathClick={this.onPathClick}\n />\n </div>\n <div className=\"cur-view-content\">\n <DirContent\n loading={loading}\n errorMsg={errorMsg}\n fromSystemRepo={isSystemRepo}\n direntList={direntList}\n openFolder={this.openFolder}\n deleteDirent={this.deleteDirent}\n downloadDirent={this.downloadDirent}\n />\n </div>\n </div>\n </div>\n {isNewFolderDialogOpen &&\n <CreateFolderDialog\n parentPath={path}\n checkDuplicatedName={this.checkDuplicatedName}\n onAddFolder={this.createNewFolder}\n addFolderCancel={this.toggleNewFolderDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default DirView;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Alert } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport UserSelect from '../../user-select';\n\n\nconst propTypes = {\n createGroup: PropTypes.func.isRequired,\n toggleDialog: PropTypes.func.isRequired\n};\n\nclass SysAdminCreateGroupDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n groupName: '',\n ownerEmail: '',\n errMessage: '',\n isSubmitBtnActive: false\n };\n this.newInput = React.createRef();\n }\n\n handleRepoNameChange = (e) => {\n if (!e.target.value.trim()) {\n this.setState({isSubmitBtnActive: false});\n } else {\n this.setState({isSubmitBtnActive: true});\n }\n\n this.setState({groupName: e.target.value});\n }\n\n handleSubmit = () => {\n let groupName = this.state.groupName.trim();\n this.props.createGroup(groupName, this.state.ownerEmail);\n }\n\n handleSelectChange = (option) => {\n // option can be null\n this.setState({\n ownerEmail: option ? option.email : ''\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key === 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n toggle = () => {\n this.props.toggleDialog();\n }\n\n componentDidMount() {\n this.newInput.focus();\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('New Group')}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Label for=\"groupName\">{gettext('Name')}</Label>\n <Input\n id=\"groupName\"\n onKeyPress={this.handleKeyPress}\n innerRef={input => {this.newInput = input;}}\n value={this.state.groupName}\n onChange={this.handleRepoNameChange}\n />\n <Label className=\"mt-2\">\n {gettext('Owner')}\n <span className=\"small text-secondary\">{gettext('(If left blank, owner will be admin)')}</span>\n </Label>\n <UserSelect\n isMulti={false}\n className=\"reviewer-select\"\n placeholder={gettext('Select a user')}\n onSelectChange={this.handleSelectChange}\n />\n </FormGroup>\n </Form>\n {this.state.errMessage && <Alert color=\"danger\">{this.state.errMessage}</Alert>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!this.state.isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminCreateGroupDialog.propTypes = propTypes;\n\nexport default SysAdminCreateGroupDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { gettext } from '../../../utils/constants';\nimport UserSelect from '../../user-select';\n\nconst propTypes = {\n groupName: PropTypes.string.isRequired,\n transferGroup: PropTypes.func.isRequired,\n toggleDialog: PropTypes.func.isRequired\n};\n\nclass SysAdminTransferGroupDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n selectedOption: null,\n submitBtnDisabled: true\n };\n }\n\n handleSelectChange = (option) => {\n this.setState({\n selectedOption: option,\n submitBtnDisabled: option == null\n });\n }\n\n submit = () => {\n const receiver = this.state.selectedOption.email;\n this.props.transferGroup(receiver);\n this.props.toggleDialog();\n }\n\n render() {\n const { submitBtnDisabled } = this.state;\n const groupName = '<span class=\"op-target\">' + Utils.HTMLescape(this.props.groupName) +'</span>';\n const msg = gettext('Transfer Group {placeholder} to').replace('{placeholder}', groupName);\n return (\n <Modal isOpen={true}>\n <ModalHeader toggle={this.props.toggleDialog}>\n <span dangerouslySetInnerHTML={{__html: msg}}></span>\n </ModalHeader>\n <ModalBody>\n <UserSelect\n ref=\"userSelect\"\n isMulti={false}\n className=\"reviewer-select\"\n placeholder={gettext('Select a user')}\n onSelectChange={this.handleSelectChange}\n />\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.props.toggleDialog}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.submit} disabled={submitBtnDisabled}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminTransferGroupDialog.propTypes = propTypes;\n\nexport default SysAdminTransferGroupDialog;\n","import React, { Component, Fragment } from 'react';\nimport { Link } from '@reach/router';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport Loading from '../../../components/loading';\nimport EmptyTip from '../../../components/empty-tip';\nimport Paginator from '../../../components/paginator';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport SysAdminTransferGroupDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-group-transfer-dialog';\nimport UserLink from '../user-link';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n getPreviousPage = () => {\n this.props.getListByPage(this.props.pageInfo.current_page - 1);\n }\n\n getNextPage = () => {\n this.props.getListByPage(this.props.pageInfo.current_page + 1);\n }\n\n render() {\n const { loading, errorMsg, items, pageInfo, curPerPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No groups')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"35%\">{gettext('Name')}</th>\n <th width=\"40%\">{gettext('Owner')}</th>\n <th width=\"20%\">{gettext('Created At')}</th>\n <th width=\"5%\">{/* operation */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n deleteGroup={this.props.deleteGroup}\n transferGroup={this.props.transferGroup}\n />);\n })}\n </tbody>\n </table>\n {pageInfo &&\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={pageInfo.current_page}\n hasNextPage={pageInfo.has_next_page}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n }\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isDeleteDialogOpen: false,\n isTransferDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Delete':\n this.toggleDeleteDialog();\n break;\n case 'Transfer':\n this.toggleTransferDialog();\n break;\n default:\n break;\n }\n }\n\n toggleDeleteDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n toggleTransferDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isTransferDialogOpen: !this.state.isTransferDialogOpen});\n }\n\n deleteGroup = () => {\n this.props.deleteGroup(this.props.item.id);\n }\n\n transferGroup = (receiver) => {\n this.props.transferGroup(this.props.item.id, receiver);\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n case 'Transfer':\n translateResult = gettext('Transfer');\n break;\n }\n\n return translateResult;\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isDeleteDialogOpen, isTransferDialogOpen } = this.state;\n\n let groupName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n let deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', groupName);\n\n const groupUrl = item.parent_group_id == 0 ?\n `${siteRoot}sys/groups/${item.id}/libraries/` :\n `${siteRoot}sys/departments/${item.id}/`;\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><Link to={groupUrl}>{item.name}</Link></td>\n <td>\n {item.owner == 'system admin' ?\n '--' :\n <UserLink email={item.owner} name={item.owner_name} />\n }\n </td>\n <td>\n <span title={moment(item.created_at).format('llll')}>{moment(item.created_at).fromNow()}</span>\n </td>\n <td>\n {(isOpIconShown && item.owner != 'system admin') &&\n <OpMenu\n operations={['Delete', 'Transfer']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Group')}\n message={deleteDialogMsg}\n executeOperation={this.deleteGroup}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteDialog}\n />\n }\n {isTransferDialogOpen &&\n <SysAdminTransferGroupDialog\n groupName={item.name}\n transferGroup={this.transferGroup}\n toggleDialog={this.toggleTransferDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default Content;\n","import React, { Component, Fragment } from 'react';\nimport { navigate } from '@reach/router';\nimport { Button } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport SysAdminCreateGroupDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-create-group-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Search from '../search';\nimport Content from './groups-content';\n\nclass Groups extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n groupList: [],\n pageInfo: {},\n perPage: 25,\n isCreateGroupDialogOpen: false\n };\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage = 1, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getGroupListByPage(this.state.currentPage);\n });\n }\n\n toggleCreateGroupDialog = () => {\n this.setState({isCreateGroupDialogOpen: !this.state.isCreateGroupDialogOpen});\n }\n\n getGroupListByPage = (page) => {\n seafileAPI.sysAdminListAllGroups(page, this.state.perPage).then((res) => {\n this.setState({\n loading: false,\n groupList: res.data.groups,\n pageInfo: res.data.page_info\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getGroupListByPage(1);\n });\n }\n\n createGroup = (groupName, OnwerEmail) => {\n seafileAPI.sysAdminCreateNewGroup(groupName, OnwerEmail).then(res => {\n let newGroupList = this.state.groupList;\n newGroupList.unshift(res.data);\n this.setState({\n groupList: newGroupList\n });\n this.toggleCreateGroupDialog();\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteGroup = (groupID) => {\n seafileAPI.sysAdminDismissGroupByID(groupID).then(res => {\n let newGroupList = this.state.groupList.filter(item => {\n return item.id != groupID;\n });\n this.setState({\n groupList: newGroupList\n });\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n transferGroup = (groupID, receiverEmail) => {\n seafileAPI.sysAdminTransferGroup(receiverEmail, groupID).then(res => {\n let newGroupList = this.state.groupList.map(item => {\n if (item.id == groupID) {\n item = res.data;\n }\n return item;\n });\n this.setState({\n groupList: newGroupList\n });\n toaster.success(gettext('Successfully transferred the group.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n getSearch = () => {\n return <Search\n placeholder={gettext('Search groups by name')}\n submit={this.searchGroups}\n />;\n }\n\n searchGroups = (name) => {\n navigate(`${siteRoot}sys/search-groups/?name=${encodeURIComponent(name)}`);\n }\n\n render() {\n let { isCreateGroupDialogOpen } = this.state;\n\n return (\n <Fragment>\n <MainPanelTopbar search={this.getSearch()}>\n <Fragment>\n <Button className=\"operation-item\" onClick={this.toggleCreateGroupDialog}>{gettext('New Group')}</Button>\n <a className=\"btn btn-secondary operation-item\" href={`${siteRoot}sys/groupadmin/export-excel/`}>{gettext('Export Excel')}</a>\n </Fragment>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Groups')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.groupList}\n pageInfo={this.state.pageInfo}\n deleteGroup={this.deleteGroup}\n transferGroup={this.transferGroup}\n getListByPage={this.getGroupListByPage}\n resetPerPage={this.resetPerPage}\n curPerPage={this.state.perPage}\n />\n </div>\n </div>\n </div>\n {isCreateGroupDialogOpen &&\n <SysAdminCreateGroupDialog\n createGroup={this.createGroup}\n toggleDialog={this.toggleCreateGroupDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default Groups;\n","import React, { Component, Fragment } from 'react';\nimport { Form, FormGroup, Input, Label, Col } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Content from './groups-content';\n\nclass SearchGroups extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n name: '',\n isSubmitBtnActive: false,\n loading: true,\n errorMsg: '',\n groupList: [],\n pageInfo: null\n };\n }\n\n componentDidMount () {\n let params = (new URL(document.location)).searchParams;\n this.setState({\n name: params.get('name') || ''\n }, this.getGroups);\n }\n\n getGroups = () => {\n const { name } = this.state;\n seafileAPI.sysAdminSearchGroups(name).then((res) => {\n this.setState({\n loading: false,\n groupList: res.data.group_list\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n deleteGroup = (groupID) => {\n seafileAPI.sysAdminDismissGroupByID(groupID).then(res => {\n let newGroupList = this.state.groupList.filter(item => {\n return item.id != groupID;\n });\n this.setState({\n groupList: newGroupList\n });\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n transferGroup = (groupID, receiverEmail) => {\n seafileAPI.sysAdminTransferGroup(receiverEmail, groupID).then(res => {\n let newGroupList = this.state.groupList.map(item => {\n if (item.id == groupID) {\n item = res.data;\n }\n return item;\n });\n this.setState({\n groupList: newGroupList\n });\n toaster.success(gettext('Successfully transferred the group.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n handleNameInputChange = (e) => {\n this.setState({\n name: e.target.value\n }, this.checkSubmitBtnActive);\n }\n\n checkSubmitBtnActive = () => {\n const { name } = this.state;\n this.setState({\n isSubmitBtnActive: name.trim()\n });\n }\n\n render() {\n const { name, isSubmitBtnActive } = this.state;\n\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Groups')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <div className=\"mt-4 mb-6\">\n <h4 className=\"border-bottom font-weight-normal mb-2 pb-1\">{gettext('Search Groups')}</h4>\n <p className=\"text-secondary small\">{gettext('Tip: you can search by keyword in name.')}</p>\n <Form>\n <FormGroup row>\n <Label for=\"name\" sm={1}>{gettext('Name')}</Label>\n <Col sm={5}>\n <Input type=\"text\" name=\"name\" id=\"name\" value={name} onChange={this.handleNameInputChange} />\n </Col>\n </FormGroup>\n <FormGroup row>\n <Col sm={{size: 5, offset: 1}}>\n <button className=\"btn btn-outline-primary\" disabled={!isSubmitBtnActive} onClick={this.getGroups}>{gettext('Submit')}</button>\n </Col>\n </FormGroup>\n </Form>\n </div>\n <div className=\"mt-4 mb-6\">\n <h4 className=\"border-bottom font-weight-normal mb-2 pb-1\">{gettext('Result')}</h4>\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.groupList}\n deleteGroup={this.deleteGroup}\n transferGroup={this.transferGroup}\n />\n </div>\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default SearchGroups;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired,\n groupID: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'repos', urlPart: 'groups/' + this.props.groupID + '/libraries', text: gettext('Libraries')},\n {name: 'members', urlPart: 'groups/' + this.props.groupID + '/members', text: gettext('Members')}\n ];\n }\n\n render() {\n const { groupName, currentItem } = this.props;\n return (\n <div>\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\"><Link to={`${siteRoot}sys/groups/`}>{gettext('Groups')}</Link> / {groupName}</h3>\n </div>\n <ul className=\"nav border-bottom mx-4\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item mr-2\" key={index}>\n <Link to={`${siteRoot}sys/${item.urlPart}/`} className={`nav-link ${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React, { Component, Fragment } from 'react';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext, isPro } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\nimport GroupNav from './group-nav';\n\nconst { enableSysAdminViewRepo } = window.sysadmin.pageOptions;\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No libraries')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"5%\">{/* icon */}</th>\n <th width=\"30%\">{gettext('Name')}</th>\n <th width=\"30%\">{gettext('Size')}</th>\n <th width=\"25%\">{gettext('Shared By')}</th>\n <th width=\"10%\">{/*Operations*/}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n unshareRepo={this.props.unshareRepo}\n />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n isUnshareRepoDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n this.setState({isOpIconShown: true});\n }\n\n handleMouseLeave = () => {\n this.setState({isOpIconShown: false});\n }\n\n toggleUnshareRepoDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isUnshareRepoDialogOpen: !this.state.isUnshareRepoDialogOpen});\n }\n\n unshareRepo = () => {\n const { item } = this.props;\n this.props.unshareRepo(item.repo_id, item.name);\n this.toggleUnshareRepoDialog();\n }\n\n renderRepoName = () => {\n const { item } = this.props;\n const repo = item;\n repo.id = item.repo_id;\n if (repo.name) {\n if (isPro && enableSysAdminViewRepo && !repo.encrypted) {\n return <a href={`${siteRoot}sys/libraries/${repo.id}/`}>{repo.name}</a>;\n } else {\n return repo.name;\n }\n } else {\n return '--';\n }\n }\n\n render() {\n let { isOpIconShown, isUnshareRepoDialogOpen } = this.state;\n let { item } = this.props;\n\n let iconUrl = Utils.getLibIconUrl(item);\n let iconTitle = Utils.getLibIconTitle(item);\n\n let repoName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n let dialogMsg = gettext('Are you sure you want to unshare {placeholder} ?').replace('{placeholder}', repoName);\n\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><img src={iconUrl} title={iconTitle} alt={iconTitle} width=\"24\" /></td>\n <td>{this.renderRepoName()}</td>\n <td>{Utils.bytesToSize(item.size)}</td>\n <td>\n <UserLink email={item.shared_by} name={item.shared_by_name} />\n </td>\n <td>\n <a href=\"#\" className={`action-icon sf2-icon-x3 ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Unshare')} onClick={this.toggleUnshareRepoDialog}></a>\n </td>\n </tr>\n {isUnshareRepoDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Unshare Library')}\n message={dialogMsg}\n executeOperation={this.unshareRepo}\n confirmBtnText={gettext('Unshare')}\n toggleDialog={this.toggleUnshareRepoDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass GroupRepos extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n groupName: '',\n repoList: []\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminListGroupRepos(this.props.groupID).then((res) => {\n this.setState({\n loading: false,\n repoList: res.data.libraries,\n groupName: res.data.group_name\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n unshareRepo = (repoID, repoName) => {\n seafileAPI.sysAdminUnshareRepoFromGroup(this.props.groupID, repoID).then(res => {\n let newRepoList = this.state.repoList.filter(item => {\n return item.repo_id != repoID;\n });\n this.setState({\n repoList: newRepoList\n });\n const msg = gettext('Successfully unshared library {placeholder}')\n .replace('{placeholder}', repoName);\n toaster.success(msg);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <GroupNav\n groupID={this.props.groupID}\n groupName={this.state.groupName}\n currentItem=\"repos\"\n />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.repoList}\n unshareRepo={this.unshareRepo}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default GroupRepos;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport UserSelect from '../../user-select';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n addMembers: PropTypes.func.isRequired\n};\n\nclass SysAdminGroupAddMemberDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n selectedOptions: null,\n isSubmitBtnDisabled: true\n };\n }\n\n handleSelectChange = (options) => {\n this.setState({\n selectedOptions: options,\n isSubmitBtnDisabled: !options.length\n });\n }\n\n addMembers = () => {\n let emails = this.state.selectedOptions.map(item => item.email);\n this.props.addMembers(emails);\n this.props.toggle();\n }\n\n render() {\n const { isSubmitBtnDisabled } = this.state;\n return (\n <Modal isOpen={true}>\n <ModalHeader toggle={this.props.toggle}>{gettext('Add Member')}</ModalHeader>\n <ModalBody>\n <UserSelect\n ref=\"userSelect\"\n isMulti={true}\n className=\"reviewer-select\"\n placeholder={gettext('Search users...')}\n onSelectChange={this.handleSelectChange}\n />\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.props.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.addMembers} disabled={isSubmitBtnDisabled}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminGroupAddMemberDialog.propTypes = propTypes;\n\nexport default SysAdminGroupAddMemberDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { gettext } from '../../utils/constants';\nimport SelectEditor from './select-editor';\n\nconst propTypes = {\n isTextMode: PropTypes.bool.isRequired,\n isEditIconShow: PropTypes.bool.isRequired,\n roleOptions: PropTypes.array.isRequired,\n currentRole: PropTypes.string.isRequired,\n onRoleChanged: PropTypes.func.isRequired\n};\n\nclass SysAdminGroupRoleEditor extends React.Component {\n\n translateRoles = (role) => {\n switch (role) {\n case 'Member':\n return gettext('Member');\n case 'Admin':\n return gettext('Admin');\n default:\n return role;\n }\n }\n\n render() {\n return (\n <SelectEditor\n isTextMode={this.props.isTextMode}\n isEditIconShow={this.props.isEditIconShow}\n options={this.props.roleOptions}\n currentOption={this.props.currentRole}\n onOptionChanged={this.props.onRoleChanged}\n translateOption={this.translateRoles}\n />\n );\n }\n}\n\nSysAdminGroupRoleEditor.propTypes = propTypes;\n\nexport default SysAdminGroupRoleEditor;","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport SysAdminGroupAddMemberDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-group-add-member-dialog';\nimport SysAdminGroupRoleEditor from '../../../components/select-editor/sysadmin-group-role-editor';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\nimport GroupNav from './group-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPageList = () => {\n this.props.getListByPage(this.props.pageInfo.current_page - 1);\n }\n\n getNextPageList = () => {\n this.props.getListByPage(this.props.pageInfo.current_page + 1);\n }\n\n render() {\n const { loading, errorMsg, items, pageInfo, curPerPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No members')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"5%\">{/* icon */}</th>\n <th width=\"55%\">{gettext('Name')}</th>\n <th width=\"30%\">{gettext('Role')}</th>\n <th width=\"10%\">{/*Operations*/}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n removeMember={this.props.removeMember}\n updateMemberRole={this.props.updateMemberRole}\n />);\n })}\n </tbody>\n </table>\n {pageInfo &&\n <Paginator\n gotoPreviousPage={this.getPreviousPageList}\n gotoNextPage={this.getNextPageList}\n currentPage={pageInfo.current_page}\n hasNextPage={pageInfo.has_next_page}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n }\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n isDeleteDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n this.setState({isOpIconShown: true});\n }\n\n handleMouseLeave = () => {\n this.setState({isOpIconShown: false});\n }\n\n toggleDeleteDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n removeMember = () => {\n const { item } = this.props;\n this.props.removeMember(item.email, item.name);\n this.toggleDeleteDialog();\n }\n\n updateMemberRole = (role) => {\n this.props.updateMemberRole(this.props.item.email, role);\n }\n\n render() {\n let { isOpIconShown, isDeleteDialogOpen } = this.state;\n let { item } = this.props;\n\n let itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n let dialogMsg = gettext('Are you sure you want to remove {placeholder} ?').replace('{placeholder}', itemName);\n\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><img src={item.avatar_url} alt=\"\" className=\"rounded-circle\" width=\"24\" /></td>\n <td><UserLink email={item.email} name={item.name} /></td>\n <td>\n {item.role == 'Owner' ?\n gettext('Owner') :\n <SysAdminGroupRoleEditor\n isTextMode={true}\n isEditIconShow={isOpIconShown}\n roleOptions={['Member', 'Admin']}\n currentRole={item.role}\n onRoleChanged={this.updateMemberRole}\n />\n }\n </td>\n <td>\n {item.role != 'Owner' &&\n <a href=\"#\" className={`action-icon sf2-icon-x3 ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Remove')} onClick={this.toggleDeleteDialog}></a>\n }\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Remove Member')}\n message={dialogMsg}\n executeOperation={this.removeMember}\n confirmBtnText={gettext('Remove')}\n toggleDialog={this.toggleDeleteDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass GroupMembers extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n groupName: '',\n memberList: [],\n pageInfo: {},\n currentPage: 1,\n perPage: 25,\n isAddMemberDialogOpen: false\n };\n }\n\n componentDidMount () {\n\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n currentPage: parseInt(urlParams.get('page') || currentPage),\n perPage: parseInt(urlParams.get('per_page') || perPage)\n }, () => {\n this.getListByPage(this.state.currentPage);\n });\n }\n\n getListByPage = (page) => {\n const { perPage } = this.state;\n seafileAPI.sysAdminListGroupMembers(this.props.groupID, page, perPage).then((res) => {\n this.setState({\n loading: false,\n memberList: res.data.members,\n groupName: res.data.group_name,\n pageInfo: res.data.page_info\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getListByPage(1);\n });\n }\n\n toggleAddMemgerDialog = () => {\n this.setState({isAddMemberDialogOpen: !this.state.isAddMemberDialogOpen});\n }\n\n addMembers = (emails) => {\n seafileAPI.sysAdminAddGroupMember(this.props.groupID, emails).then(res => {\n let newMemberList = res.data.success;\n if (newMemberList.length) {\n this.setState({\n memberList: newMemberList.concat(this.state.memberList)\n });\n newMemberList.map(item => {\n const msg = gettext('Successfully added {email_placeholder}')\n .replace('{email_placeholder}', item.email);\n toaster.success(msg);\n });\n }\n res.data.failed.map(item => {\n const msg = gettext('Failed to add {email_placeholder}: {error_msg_placeholder}')\n .replace('{email_placeholder}', item.email)\n .replace('{error_msg_placeholder}', item.error_msg);\n toaster.danger(msg, {duration: 3});\n });\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n removeMember = (email, name) => {\n seafileAPI.sysAdminDeleteGroupMember(this.props.groupID, email).then(res => {\n let newRepoList = this.state.memberList.filter(item => {\n return item.email != email;\n });\n this.setState({\n memberList: newRepoList\n });\n toaster.success(gettext('Successfully removed {placeholder}.').replace('{placeholder}', name));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateMemberRole = (email, role) => {\n let isAdmin = role == 'Admin';\n seafileAPI.sysAdminUpdateGroupMemberRole(this.props.groupID, email, isAdmin).then(res => {\n let newRepoList = this.state.memberList.map(item => {\n if (item.email == email) {\n item.role = role;\n }\n return item;\n });\n this.setState({\n memberList: newRepoList\n });\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n let { isAddMemberDialogOpen } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleAddMemgerDialog}>{gettext('Add Member')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <GroupNav\n currentItem=\"members\"\n groupID={this.props.groupID}\n groupName={this.state.groupName}\n />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.memberList}\n removeMember={this.removeMember}\n updateMemberRole={this.updateMemberRole}\n pageInfo={this.state.pageInfo}\n curPerPage={this.state.perPage}\n getListByPage={this.getListByPage}\n resetPerPage={this.resetPerPage}\n />\n </div>\n </div>\n </div>\n {isAddMemberDialogOpen &&\n <SysAdminGroupAddMemberDialog\n addMembers={this.addMembers}\n toggle={this.toggleAddMemgerDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default GroupMembers;\n","import React from 'react';\nimport '../../../css/org-department-item.css';\n\nclass Departments extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <div className=\"h-100 org-departments\">\n {this.props.children}\n </div>\n );\n }\n}\n\nexport default Departments;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input, Form, FormGroup, Label } from 'reactstrap';\nimport { gettext, orgID } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api';\n\nconst propTypes = {\n groupID: PropTypes.string,\n parentGroupID: PropTypes.string,\n toggle: PropTypes.func.isRequired,\n onDepartChanged: PropTypes.func.isRequired,\n};\n\nclass AddDepartDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n departName: '',\n errMessage: '',\n };\n this.newInput = React.createRef();\n }\n\n componentDidMount() {\n this.newInput.focus();\n this.newInput.setSelectionRange(0, 0);\n }\n\n handleSubmit = () => {\n let isValid = this.validateName();\n if (isValid) {\n let parentGroup = -1;\n if (this.props.parentGroupID) {\n parentGroup = this.props.parentGroupID;\n }\n seafileAPI.sysAdminAddNewDepartment(parentGroup, this.state.departName.trim()).then((res) => {\n this.props.toggle();\n this.props.onDepartChanged();\n }).catch(error => {\n let errorMsg = gettext(error.response.data.error_msg);\n this.setState({ errMessage: errorMsg });\n });\n }\n }\n\n validateName = () => {\n let errMessage = '';\n const name = this.state.departName.trim();\n if (!name.length) {\n errMessage = gettext('Name is required');\n this.setState({ errMessage: errMessage });\n return false;\n }\n return true;\n }\n\n handleChange = (e) => {\n this.setState({\n departName: e.target.value,\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key === 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n render() {\n let header = this.props.parentGroupID ? gettext('New Sub-department') : gettext('New Department');\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{header}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Label for=\"departName\">{gettext('Name')}</Label>\n <Input\n id=\"departName\"\n onKeyPress={this.handleKeyPress}\n value={this.state.departName}\n onChange={this.handleChange}\n innerRef={input => {this.newInput = input;}}\n />\n </FormGroup>\n </Form>\n { this.state.errMessage && <p className=\"error\">{this.state.errMessage}</p> }\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.handleSubmit}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nAddDepartDialog.propTypes = propTypes;\n\nexport default AddDepartDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\n\nconst propTypes = {\n groupName: PropTypes.string,\n groupID: PropTypes.number.isRequired,\n toggle: PropTypes.func.isRequired,\n onDepartChanged: PropTypes.func.isRequired\n};\n\nclass DeleteDepartDialog extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n deleteDepart = () => {\n this.props.toggle();\n seafileAPI.sysAdminDeleteDepartment(this.props.groupID).then((res) => {\n this.props.onDepartChanged();\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n let tipMessage = gettext('Are you sure you want to delete {placeholder} ?');\n tipMessage = tipMessage.replace('{placeholder}', '<span class=\"op-target\">' + Utils.HTMLescape(this.props.groupName) + '</span>');\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{gettext('Delete Department')}</ModalHeader>\n <ModalBody>\n <p dangerouslySetInnerHTML={{__html: tipMessage}}></p>\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.props.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.deleteDepart}>{gettext('Delete')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nDeleteDepartDialog.propTypes = propTypes;\n\nexport default DeleteDepartDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input, InputGroupAddon, InputGroup } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../toast';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n groupID: PropTypes.number.isRequired,\n onDepartChanged: PropTypes.func.isRequired,\n};\n\nclass SetGroupQuotaDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n quota: '',\n errMessage: '',\n };\n this.newInput = React.createRef();\n }\n\n componentDidMount() {\n this.newInput.focus();\n this.newInput.setSelectionRange(0, 0);\n }\n\n setGroupQuota = () => {\n const numberReg = /^[1-9]\\d*$/im;\n let quota = this.state.quota;\n if ((quota.length && numberReg.test(quota)) || quota == -2) {\n this.setState({ errMessage: '' });\n let newQuota = this.state.quota == -2 ? this.state.quota : this.state.quota * 1000000;\n seafileAPI.sysAdminUpdateDepartmentQuota(this.props.groupID, newQuota).then((res) => {\n this.props.toggle();\n this.props.onDepartChanged();\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n } else {\n const err = gettext('Quota is invalid.');\n this.setState({ errMessage: err });\n }\n }\n\n handleChange = (e) => {\n const quota = e.target.value.trim();\n this.setState({ quota: quota });\n }\n\n handleKeyPress = (e) => {\n if (e.key === 'Enter') {\n this.setGroupQuota();\n e.preventDefault();\n }\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{gettext('Set Quota')}</ModalHeader>\n <ModalBody>\n <InputGroup>\n <Input\n onKeyPress={this.handleKeyPress}\n value={this.state.quota}\n onChange={this.handleChange}\n innerRef={input => {this.newInput = input;}}\n />\n <InputGroupAddon addonType=\"append\">{'MB'}</InputGroupAddon>\n </InputGroup>\n <p className=\"tip\">\n <br/><span>{gettext('An integer that is greater than 0 or equal to -2.')}</span><br/>\n <span>{gettext('Tip: -2 means no limit.')}</span>\n </p>\n { this.state.errMessage && <p className=\"error\">{this.state.errMessage}</p> }\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.setGroupQuota}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSetGroupQuotaDialog.propTypes = propTypes;\n\nexport default SetGroupQuotaDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input, Form, FormGroup, Label } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\n\nconst propTypes = {\n groupID: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]).isRequired,\n name: PropTypes.string.isRequired,\n toggle: PropTypes.func.isRequired,\n onDepartmentNameChanged: PropTypes.func.isRequired\n};\n\nclass RenameDepartmentDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n departmentName: this.props.name,\n errMessage: ''\n };\n this.newInput = React.createRef();\n }\n\n componentDidMount() {\n this.newInput.select();\n this.newInput.focus();\n }\n\n handleSubmit = () => {\n let isValid = this.validateName();\n if (isValid) {\n seafileAPI.sysAdminRenameDepartment(this.props.groupID, this.state.departmentName.trim()).then((res) => {\n this.props.toggle();\n this.props.onDepartmentNameChanged(res.data);\n toaster.success(gettext('Success'));\n }).catch(error => {\n let errorMsg = Utils.getErrorMsg(error);\n this.setState({ errMessage: errorMsg });\n });\n }\n }\n\n validateName = () => {\n let errMessage = '';\n const name = this.state.departmentName.trim();\n if (!name.length) {\n errMessage = gettext('Name is required');\n this.setState({ errMessage: errMessage });\n return false;\n }\n return true;\n }\n\n handleChange = (e) => {\n this.setState({\n departmentName: e.target.value\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key === 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n render() {\n let header = gettext('Rename Department');\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{header}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Label for=\"departmentName\">{gettext('Name')}</Label>\n <Input\n id=\"departmentName\"\n onKeyPress={this.handleKeyPress}\n value={this.state.departmentName}\n onChange={this.handleChange}\n innerRef={input => {this.newInput = input;}}\n />\n </FormGroup>\n </Form>\n {this.state.errMessage && <p className=\"error\">{this.state.errMessage}</p>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.handleSubmit}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nRenameDepartmentDialog.propTypes = propTypes;\n\nexport default RenameDepartmentDialog;\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { Link } from '@reach/router';\nimport { Utils } from '../../../utils/utils.js';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport RenameDepartmentDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-rename-department-dialog';\n\nconst GroupItemPropTypes = {\n isItemFreezed: PropTypes.bool.isRequired,\n onFreezedItem: PropTypes.func.isRequired,\n onUnfreezedItem: PropTypes.func.isRequired,\n group: PropTypes.object.isRequired,\n onDepartmentNameChanged: PropTypes.func.isRequired,\n showSetGroupQuotaDialog: PropTypes.func.isRequired,\n showDeleteDepartDialog: PropTypes.func.isRequired,\n};\n\nclass GroupItem extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isRenameDialogOpen: false\n };\n }\n\n handleMouseOver = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseOut = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'Rename':\n translateResult = gettext('Rename');\n break;\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n default:\n break;\n }\n\n return translateResult;\n }\n\n onMenuItemClick = (operation) => {\n const { group } = this.props;\n switch(operation) {\n case 'Rename':\n this.toggleRenameDialog();\n break;\n case 'Delete':\n this.props.showDeleteDepartDialog(group);\n break;\n default:\n break;\n }\n }\n\n toggleRenameDialog = () => {\n this.setState({\n isRenameDialogOpen: !this.state.isRenameDialogOpen\n });\n }\n\n render() {\n const { group } = this.props;\n const { highlight, isOpIconShown, isRenameDialogOpen } = this.state;\n const newHref = siteRoot+ 'sys/departments/' + group.id + '/';\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>\n <td><Link to={newHref}>{group.name}</Link></td>\n <td>{moment(group.created_at).fromNow()}</td>\n <td onClick={this.props.showSetGroupQuotaDialog.bind(this, group.id)}>\n {Utils.bytesToSize(group.quota)}{' '}\n <span title=\"Edit Quota\" className={`fa fa-pencil-alt attr-action-icon ${highlight ? '' : 'vh'}`}></span>\n </td>\n <td>\n {isOpIconShown &&\n <OpMenu\n operations={['Rename', 'Delete']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isRenameDialogOpen && (\n <RenameDepartmentDialog\n groupID={group.id}\n name={group.name}\n toggle={this.toggleRenameDialog}\n onDepartmentNameChanged={this.props.onDepartmentNameChanged}\n />\n )}\n </Fragment>\n );\n }\n}\n\nGroupItem.propTypes = GroupItemPropTypes;\n\nexport default GroupItem;\n","import React, { Fragment } from 'react';\nimport moment from 'moment';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport ModalPortal from '../../../components/modal-portal';\nimport AddDepartDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-department-dialog';\nimport DeleteDepartDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-delete-department-dialog';\nimport SetGroupQuotaDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-set-group-quota-dialog';\nimport { gettext, lang } from '../../../utils/constants';\nimport GroupItem from './group-item';\nimport '../../../css/org-department-item.css';\n\nmoment.locale(lang);\n\nclass DepartmentsList extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n groups: null,\n groupID: '',\n groupName: '',\n showDeleteDepartDialog: false,\n showSetGroupQuotaDialog: false,\n isShowAddDepartDialog: false,\n isItemFreezed: false\n };\n }\n\n componentDidMount() {\n this.listDepartGroups();\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n listDepartGroups = () => {\n seafileAPI.sysAdminListAllDepartments().then(res => {\n this.setState({ groups: res.data.data });\n });\n }\n\n showDeleteDepartDialog = (group) => {\n this.setState({ showDeleteDepartDialog: true, groupID: group.id, groupName: group.name });\n }\n\n showSetGroupQuotaDialog = (groupID) => {\n this.setState({ showSetGroupQuotaDialog: true, groupID: groupID });\n }\n\n toggleAddDepartDialog = () => {\n this.setState({ isShowAddDepartDialog: !this.state.isShowAddDepartDialog });\n }\n\n toggleCancel = () => {\n this.setState({\n showDeleteDepartDialog: false,\n showSetGroupQuotaDialog: false,\n });\n }\n\n onDepartChanged = () => {\n this.listDepartGroups();\n }\n\n onDepartmentNameChanged = (dept) => {\n this.setState({\n groups: this.state.groups.map(item => {\n if (item.id == dept.id) {\n item.name = dept.name;\n }\n return item;\n })\n });\n }\n\n render() {\n const groups = this.state.groups;\n const topbarChildren = (\n <Fragment>\n <button className='btn btn-secondary operation-item' title={gettext('New Department')} onClick={this.toggleAddDepartDialog}>{gettext('New Department')}\n </button>\n {this.state.isShowAddDepartDialog && (\n <ModalPortal>\n <AddDepartDialog\n onDepartChanged={this.onDepartChanged}\n groupID={this.state.groupID}\n toggle={this.toggleAddDepartDialog}\n />\n </ModalPortal>\n )}\n </Fragment>\n );\n return (\n <Fragment>\n <MainPanelTopbar children={topbarChildren}/>\n <div className=\"main-panel-center flex-row h-100\">\n <div className=\"cur-view-container o-auto\">\n <div className=\"cur-view-path\">\n <div className=\"fleft\">\n <h3 className=\"sf-heading\">{gettext('Departments')}</h3>\n </div>\n </div>\n <div className=\"cur-view-content\">\n {groups && groups.length > 0 ?\n <table>\n <thead>\n <tr>\n <th width=\"40%\">{gettext('Name')}</th>\n <th width=\"25%\">{gettext('Created At')}</th>\n <th width=\"20%\">{gettext('Quota')}</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <tbody>\n {groups.map((group, index) => {\n return(\n <Fragment key={group.id}>\n <GroupItem\n group={group}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n onDepartmentNameChanged={this.onDepartmentNameChanged}\n showDeleteDepartDialog={this.showDeleteDepartDialog}\n showSetGroupQuotaDialog={this.showSetGroupQuotaDialog}\n />\n </Fragment>\n );\n })}\n </tbody>\n </table>\n :\n <p className=\"no-group\">{gettext('No departments')}</p>\n }\n </div>\n {this.state.showDeleteDepartDialog && (\n <ModalPortal>\n <DeleteDepartDialog\n toggle={this.toggleCancel}\n groupID={this.state.groupID}\n groupName={this.state.groupName}\n onDepartChanged={this.onDepartChanged}\n />\n </ModalPortal>\n )}\n {this.state.showSetGroupQuotaDialog && (\n <ModalPortal>\n <SetGroupQuotaDialog\n toggle={this.toggleCancel}\n groupID={this.state.groupID}\n onDepartChanged={this.onDepartChanged}\n />\n </ModalPortal>\n )}\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default DepartmentsList;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport { gettext, orgID } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../toast';\nimport UserSelect from '../../user-select.js';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n groupID: PropTypes.string.isRequired,\n onMemberChanged: PropTypes.func.isRequired\n};\n\nclass AddMemberDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n selectedOption: null,\n errMessage: '',\n };\n }\n\n handleSelectChange = (option) => {\n this.setState({ selectedOption: option });\n }\n\n handleSubmit = () => {\n if (!this.state.selectedOption) return;\n const emails = this.state.selectedOption.map(item => item.email);\n this.refs.orgSelect.clearSelect();\n this.setState({ errMessage: [] });\n seafileAPI.sysAdminAddGroupMember(this.props.groupID, emails).then((res) => {\n this.setState({ selectedOption: null });\n if (res.data.failed.length > 0) {\n this.setState({ errMessage: res.data.failed[0].error_msg });\n }\n if (res.data.success.length > 0) {\n this.props.onMemberChanged();\n this.props.toggle();\n }\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{gettext('Add Member')}</ModalHeader>\n <ModalBody>\n <UserSelect\n placeholder={gettext('Search users...')}\n onSelectChange={this.handleSelectChange}\n ref=\"orgSelect\"\n isMulti={true}\n className='org-add-member-select'\n />\n { this.state.errMessage && <p className=\"error\">{this.state.errMessage}</p> }\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.handleSubmit}>{gettext('Submit')}</Button>\n <Button color=\"secondary\" onClick={this.props.toggle}>{gettext('Cancel')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nAddMemberDialog.propTypes = propTypes;\n\nexport default AddMemberDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../toast';\n\nconst propTypes = {\n member: PropTypes.object.isRequired,\n groupID: PropTypes.string.isRequired,\n toggle: PropTypes.func.isRequired,\n onMemberChanged: PropTypes.func.isRequired\n};\n\nclass DeleteMemberDialog extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n deleteMember = () => {\n const userEmail = this.props.member.email;\n seafileAPI.sysAdminDeleteGroupMember(this.props.groupID, userEmail).then((res) => {\n if (res.data.success) {\n this.props.onMemberChanged();\n this.props.toggle();\n }\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n let tipMessage = gettext('Are you sure you want to delete {placeholder} ?');\n tipMessage = tipMessage.replace('{placeholder}', '<span class=\"op-target\">' + Utils.HTMLescape(this.props.member.name) + '</span>');\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{gettext('Delete Member')}</ModalHeader>\n <ModalBody>\n <div dangerouslySetInnerHTML={{__html: tipMessage}}></div>\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.deleteMember}>{gettext('Delete')}</Button>\n <Button color=\"secondary\" onClick={this.props.toggle}>{gettext('Cancel')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nDeleteMemberDialog.propTypes = propTypes;\n\nexport default DeleteMemberDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input, Form, FormGroup, Label } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { Utils } from '../../../utils/utils';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n groupID: PropTypes.string.isRequired,\n onRepoChanged: PropTypes.func.isRequired,\n};\n\nclass AddRepoDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n repoName: '',\n errMessage: '',\n };\n this.newInput = React.createRef();\n }\n\n componentDidMount() {\n this.newInput.focus();\n this.newInput.setSelectionRange(0, 0);\n }\n\n handleSubmit = () => {\n let isValid = this.validateName();\n if (isValid) {\n seafileAPI.sysAdminAddRepoInDepartment(this.props.groupID, this.state.repoName.trim()).then((res) => {\n this.props.toggle();\n this.props.onRepoChanged();\n }).catch(error => {\n let errorMsg = Utils.getErrorMsg(error);\n this.setState({ errMessage: errorMsg });\n });\n }\n }\n\n validateName = () => {\n let errMessage = '';\n const name = this.state.repoName.trim();\n if (!name.length) {\n errMessage = gettext('Name is required');\n this.setState({ errMessage: errMessage });\n return false;\n }\n return true;\n }\n\n handleChange = (e) => {\n this.setState({\n repoName: e.target.value,\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key === 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{gettext('New Library')}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Label for=\"repoName\">{gettext('Name')}</Label>\n <Input\n id=\"repoName\"\n onKeyPress={this.handleKeyPress}\n value={this.state.repoName}\n onChange={this.handleChange}\n innerRef={input => {this.newInput = input;}}\n />\n </FormGroup>\n </Form>\n {this.state.errMessage && <p className=\"error\">{this.state.errMessage}</p> }\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.handleSubmit}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nAddRepoDialog.propTypes = propTypes;\n\nexport default AddRepoDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../toast';\n\nclass DeleteRepoDialog extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n deleteRepo = () => {\n seafileAPI.sysAdminDeleteRepoInDepartment(this.props.groupID, this.props.repo.repo_id).then((res) => {\n if (res.data.success) {\n this.props.onRepoChanged();\n this.props.toggle();\n }\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n let tipMessage = gettext('Are you sure you want to delete {placeholder} ?');\n tipMessage = tipMessage.replace('{placeholder}', '<span class=\"op-target\">' + Utils.HTMLescape(this.props.repo.name) + '</span>');\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{gettext('Delete Library')}</ModalHeader>\n <ModalBody>\n <div dangerouslySetInnerHTML={{__html: tipMessage}}></div>\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.deleteRepo}>{gettext('Delete')}</Button>\n <Button color=\"secondary\" onClick={this.props.toggle}>{gettext('Cancel')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nconst propTypes = {\n repo: PropTypes.object.isRequired,\n toggle: PropTypes.func.isRequired,\n groupID: PropTypes.string.isRequired,\n onRepoChanged: PropTypes.func.isRequired\n};\n\nDeleteRepoDialog.propTypes = propTypes;\n\nexport default DeleteRepoDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { Utils } from '../../../utils/utils.js';\nimport toaster from '../../../components/toast';\nimport RoleEditor from '../../../components/select-editor/role-editor';\nimport UserLink from '../user-link';\n\nconst MemberItemPropTypes = {\n groupID: PropTypes.string.isRequired,\n member: PropTypes.object.isRequired,\n isItemFreezed: PropTypes.bool.isRequired,\n onMemberChanged: PropTypes.func.isRequired,\n showDeleteMemberDialog: PropTypes.func.isRequired,\n toggleItemFreezed: PropTypes.func.isRequired,\n};\n\nclass MemberItem extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n highlight: false,\n showRoleMenu: false,\n };\n this.roles = ['Admin', 'Member'];\n }\n\n onMouseEnter = () => {\n if (this.props.isItemFreezed) return;\n this.setState({ highlight: true });\n }\n\n onMouseLeave = () => {\n if (this.props.isItemFreezed) return;\n this.setState({ highlight: false });\n }\n\n toggleMemberRoleMenu = () => {\n this.setState({ showRoleMenu: !this.state.showRoleMenu });\n }\n\n onChangeUserRole = (role) => {\n let isAdmin = role === 'Admin' ? true : false;\n seafileAPI.sysAdminUpdateGroupMemberRole(this.props.groupID, this.props.member.email, isAdmin).then((res) => {\n this.props.onMemberChanged();\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n this.setState({\n highlight: false\n });\n }\n\n render() {\n const member = this.props.member;\n const highlight = this.state.highlight;\n if (member.role === 'Owner') return null;\n return (\n <tr className={highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>\n <td><img src={member.avatar_url} alt=\"member-header\" width=\"24\" className=\"avatar\"/></td>\n <td><UserLink email={member.email} name={member.name} /></td>\n <td>\n <RoleEditor\n isTextMode={true}\n isEditIconShow={highlight}\n currentRole={member.role}\n roles={this.roles}\n onRoleChanged={this.onChangeUserRole}\n toggleItemFreezed={this.props.toggleItemFreezed}\n />\n </td>\n {!this.props.isItemFreezed ?\n <td className=\"cursor-pointer text-center\" onClick={this.props.showDeleteMemberDialog.bind(this, member)}>\n <span className={`sf2-icon-x3 action-icon ${highlight ? '' : 'vh'}`} title=\"Delete\"></span>\n </td> : <td></td>\n }\n </tr>\n );\n }\n}\n\nMemberItem.propTypes = MemberItemPropTypes;\n\nexport default MemberItem;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Utils } from '../../../utils/utils.js';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst RepoItemPropTypes = {\n repo: PropTypes.object.isRequired,\n showDeleteRepoDialog: PropTypes.func.isRequired,\n};\n\nclass RepoItem extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n highlight: false,\n };\n }\n\n onMouseEnter = () => {\n this.setState({ highlight: true });\n }\n\n onMouseLeave = () => {\n this.setState({ highlight: false });\n }\n\n render() {\n const repo = this.props.repo;\n const highlight = this.state.highlight;\n let iconUrl = Utils.getLibIconUrl(repo);\n return (\n <tr className={highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>\n <td><img src={iconUrl} width=\"24\" alt={gettext('icon')}/></td>\n <td><a href={siteRoot + 'sys/libraries/' + repo.repo_id + '/' + repo.name + '/'}>{repo.name}</a></td>\n <td>{Utils.bytesToSize(repo.size)}{' '}</td>\n <td className=\"cursor-pointer text-center\" onClick={this.props.showDeleteRepoDialog.bind(this, repo)}>\n <span className={`sf2-icon-delete action-icon ${highlight ? '' : 'vh'}`} title=\"Delete\"></span>\n </td>\n </tr>\n );\n }\n}\n\nRepoItem.propTypes = RepoItemPropTypes;\n\nexport default RepoItem;\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { Link } from '@reach/router';\nimport Paginator from '../../../components/paginator';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { Utils } from '../../../utils/utils.js';\nimport toaster from '../../../components/toast';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport ModalPortal from '../../../components/modal-portal';\nimport AddDepartDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-department-dialog';\nimport RenameDepartmentDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-rename-department-dialog';\nimport AddMemberDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-member-dialog';\nimport DeleteMemberDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-delete-member-dialog';\nimport AddRepoDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-repo-dialog';\nimport DeleteRepoDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-delete-repo-dialog';\nimport DeleteDepartDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-delete-department-dialog';\nimport SetGroupQuotaDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-set-group-quota-dialog';\nimport { siteRoot, gettext, lang } from '../../../utils/constants';\nimport GroupItem from './group-item';\nimport MemberItem from './member-item';\nimport RepoItem from './repo-item';\nimport '../../../css/org-department-item.css';\n\nmoment.locale(lang);\n\nconst DepartmentDetailPropTypes = {\n groupID: PropTypes.string,\n};\n\nclass DepartmentDetail extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n groupName: '',\n isItemFreezed: false,\n ancestorGroups: [],\n members: [],\n membersErrorMsg: '',\n membersPageInfo: {\n },\n membersPage: 1,\n membersPerPage: 25,\n deletedMember: {},\n isShowAddMemberDialog: false,\n showDeleteMemberDialog: false,\n repos: [],\n deletedRepo: {},\n isShowRenameDepartmentDialog: false,\n isShowAddRepoDialog: false,\n showDeleteRepoDialog: false,\n groups: [],\n subGroupID: '',\n subGroupName: '',\n isShowAddDepartDialog: false,\n showDeleteDepartDialog: false,\n showSetGroupQuotaDialog: false,\n };\n }\n\n componentDidMount() {\n const groupID = this.props.groupID;\n this.listGroupRepo(groupID);\n this.getDepartmentInfo(groupID);\n this.listMembers(groupID, this.state.membersPage, this.state.membersPerPage);\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.groupID !== nextProps.groupID) {\n this.listGroupRepo(nextProps.groupID);\n this.getDepartmentInfo(nextProps.groupID);\n this.listMembers(nextProps.groupID, this.state.membersPage, this.state.membersPerPage);\n }\n }\n\n listGroupRepo = (groupID) => {\n seafileAPI.sysAdminListGroupRepos(groupID).then(res => {\n this.setState({ repos: res.data.libraries });\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n getDepartmentInfo = (groupID) => {\n seafileAPI.sysAdminGetDepartmentInfo(groupID, true).then(res => {\n this.setState({\n groups: res.data.groups,\n ancestorGroups: res.data.ancestor_groups,\n groupName: res.data.name,\n });\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n listMembers = (groupID, page, perPage) => {\n seafileAPI.sysAdminListGroupMembers(groupID, page, perPage).then((res) => {\n this.setState({\n members: res.data.members,\n membersPageInfo: res.data.page_info\n });\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n this.setState({membersErrorMsg: errMessage});\n });\n }\n\n getPreviousPageList = () => {\n this.listMembers(this.props.groupID, this.state.membersPageInfo.current_page - 1, this.state.membersPerPage);\n }\n\n getNextPageList = () => {\n this.listMembers(this.props.groupID, this.state.membersPageInfo.current_page + 1, this.state.membersPerPage);\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n membersPerPage: perPage\n }, () => {\n this.listMembers(this.props.groupID, 1, perPage);\n });\n }\n\n listSubDepartGroups = (groupID) => {\n seafileAPI.sysAdminGetDepartmentInfo(groupID, true).then(res => {\n this.setState({ groups: res.data.groups });\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n toggleCancel = () => {\n this.setState({\n showDeleteMemberDialog: false,\n showDeleteRepoDialog: false,\n showDeleteDepartDialog: false,\n showSetGroupQuotaDialog: false,\n });\n }\n\n onSubDepartChanged = () => {\n this.listSubDepartGroups(this.props.groupID);\n }\n\n onDepartmentNameChanged = (dept) => {\n this.setState({\n groupName: dept.name\n });\n }\n\n onSubDepartmentNameChanged = (dept) => {\n this.setState({\n groups: this.state.groups.map(item => {\n if (item.id == dept.id) {\n item.name = dept.name;\n }\n return item;\n })\n });\n }\n\n onRepoChanged = () => {\n this.listGroupRepo(this.props.groupID);\n }\n\n onMemberChanged = () => {\n this.listMembers(this.props.groupID, this.state.membersPageInfo.current_page, this.state.membersPerPage);\n }\n\n toggleItemFreezed = (isFreezed) => {\n this.setState({ isItemFreezed: isFreezed });\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n showDeleteMemberDialog = (member) => {\n this.setState({ showDeleteMemberDialog: true, deletedMember: member });\n }\n\n showDeleteRepoDialog = (repo) => {\n this.setState({ showDeleteRepoDialog: true, deletedRepo: repo });\n }\n\n toggleRenameDepartmentDialog = () => {\n this.setState({ isShowRenameDepartmentDialog: !this.state.isShowRenameDepartmentDialog });\n }\n\n toggleAddRepoDialog = () => {\n this.setState({ isShowAddRepoDialog: !this.state.isShowAddRepoDialog });\n }\n\n toggleAddMemberDialog = () => {\n this.setState({ isShowAddMemberDialog: !this.state.isShowAddMemberDialog });\n }\n\n toggleAddDepartDialog = () => {\n this.setState({ isShowAddDepartDialog: !this.state.isShowAddDepartDialog});\n }\n\n showDeleteDepartDialog = (subGroup) => {\n this.setState({\n showDeleteDepartDialog: true,\n subGroupID: subGroup.id,\n subGroupName: subGroup.name\n });\n }\n\n showSetGroupQuotaDialog = (subGroupID) => {\n this.setState({\n showSetGroupQuotaDialog: true,\n subGroupID: subGroupID\n });\n }\n\n render() {\n const { members, membersErrorMsg, repos, groups, groupName } = this.state;\n const groupID = this.props.groupID;\n const topBtn = 'btn btn-secondary operation-item';\n const topbarChildren = (\n <Fragment>\n {groupID &&\n <Fragment>\n <button className={topBtn} title={gettext('Rename Department')} onClick={this.toggleRenameDepartmentDialog}>{gettext('Rename Department')}</button>\n <button className={topBtn} title={gettext('New Sub-department')} onClick={this.toggleAddDepartDialog}>{gettext('New Sub-department')}</button>\n <button className={topBtn} title={gettext('Add Member')} onClick={this.toggleAddMemberDialog}>{gettext('Add Member')}</button>\n <button className={topBtn} onClick={this.toggleAddRepoDialog} title={gettext('New Library')}>{gettext('New Library')}</button>\n </Fragment>\n }\n {this.state.isShowRenameDepartmentDialog && (\n <ModalPortal>\n <RenameDepartmentDialog\n groupID={groupID}\n name={groupName}\n toggle={this.toggleRenameDepartmentDialog}\n onDepartmentNameChanged={this.onDepartmentNameChanged}\n />\n </ModalPortal>\n )}\n {this.state.isShowAddMemberDialog && (\n <ModalPortal>\n <AddMemberDialog\n toggle={this.toggleAddMemberDialog}\n onMemberChanged={this.onMemberChanged}\n groupID={groupID}\n />\n </ModalPortal>\n )}\n {this.state.isShowAddRepoDialog && (\n <ModalPortal>\n <AddRepoDialog\n toggle={this.toggleAddRepoDialog}\n onRepoChanged={this.onRepoChanged}\n groupID={groupID}\n />\n </ModalPortal>\n )}\n {this.state.isShowAddDepartDialog && (\n <ModalPortal>\n <AddDepartDialog\n onDepartChanged={this.onSubDepartChanged}\n parentGroupID={groupID}\n toggle={this.toggleAddDepartDialog}\n />\n </ModalPortal>\n )}\n </Fragment>\n );\n\n return (\n <Fragment>\n <MainPanelTopbar children={topbarChildren} />\n <div className=\"main-panel-center flex-row h-100\">\n <div className=\"cur-view-container o-auto\">\n <div className=\"cur-view-path\">\n <div className=\"fleft\">\n <h3 className=\"sf-heading\">\n {groupID ?\n <Link to={siteRoot + 'sys/departments/'}>{gettext('Departments')}</Link>\n : <span>{gettext('Departments')}</span>\n }\n {this.state.ancestorGroups.map(ancestor => {\n let newHref = siteRoot + 'sys/departments/' + ancestor.id + '/';\n return <span key={ancestor.id}>{' / '}<Link to={newHref}>{ancestor.name}</Link></span>;\n })}\n {groupID && <span>{' / '}{this.state.groupName}</span>}\n </h3>\n </div>\n </div>\n\n <div className=\"cur-view-subcontainer org-groups\">\n <div className=\"cur-view-path\">\n <div className=\"fleft\"><h3 className=\"sf-heading\">{gettext('Sub-departments')}</h3></div>\n </div>\n <div className=\"cur-view-content\">\n {groups && groups.length > 0 ?\n <table>\n <thead>\n <tr>\n <th width=\"40%\">{gettext('Name')}</th>\n <th width=\"25%\">{gettext('Created At')}</th>\n <th width=\"20%\">{gettext('Quota')}</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <tbody>\n {groups.map((group, index) => {\n return(\n <Fragment key={group.id}>\n <GroupItem\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n onDepartmentNameChanged={this.onSubDepartmentNameChanged}\n group={group}\n showDeleteDepartDialog={this.showDeleteDepartDialog}\n showSetGroupQuotaDialog={this.showSetGroupQuotaDialog}\n />\n </Fragment>\n );\n })}\n </tbody>\n </table>\n : <p className=\"no-group\">{gettext('No sub-departments')}</p>\n }\n </div>\n </div>\n\n <div className=\"cur-view-subcontainer org-members\">\n <div className=\"cur-view-path\">\n <div className=\"fleft\"><h3 className=\"sf-heading\">{gettext('Members')}</h3></div>\n </div>\n <div className=\"cur-view-content\">\n {membersErrorMsg ? <p className=\"error text-center\">{membersErrorMsg}</p> :\n members.length == 0 ?\n <p className=\"no-member\">{gettext('No members')}</p> :\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"5%\"></th>\n <th width=\"50%\">{gettext('Name')}</th>\n <th width=\"15%\">{gettext('Role')}</th>\n <th width=\"30%\"></th>\n </tr>\n </thead>\n <tbody>\n {members.map((member, index) => {\n return (\n <Fragment key={index}>\n <MemberItem\n member={member}\n showDeleteMemberDialog={this.showDeleteMemberDialog}\n isItemFreezed={this.state.isItemFreezed}\n onMemberChanged={this.onMemberChanged}\n toggleItemFreezed={this.toggleItemFreezed}\n groupID={groupID}\n />\n </Fragment>\n );\n })}\n </tbody>\n </table>\n {this.state.membersPageInfo &&\n <Paginator\n gotoPreviousPage={this.getPreviousPageList}\n gotoNextPage={this.getNextPageList}\n currentPage={this.state.membersPageInfo.current_page}\n hasNextPage={this.state.membersPageInfo.has_next_page}\n curPerPage={this.state.membersPerPage}\n resetPerPage={this.resetPerPage}\n />\n }\n </Fragment>\n }\n </div>\n </div>\n\n <div className=\"cur-view-subcontainer org-libriries\">\n <div className=\"cur-view-path\">\n <div className=\"fleft\"><h3 className=\"sf-heading\">{gettext('Libraries')}</h3></div>\n </div>\n { repos.length > 0 ?\n <div className=\"cur-view-content\">\n <table>\n <thead>\n <tr>\n <th width=\"5%\"></th>\n <th width=\"50%\">{gettext('Name')}</th>\n <th width=\"30%\">{gettext('Size')}</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <tbody>\n {repos.map((repo, index) => {\n return(\n <Fragment key={index}>\n <RepoItem repo={repo} showDeleteRepoDialog={this.showDeleteRepoDialog}/>\n </Fragment>\n );\n })}\n </tbody>\n </table>\n </div>\n : <p className=\"no-libraty\">{gettext('No libraries')}</p>\n }\n </div>\n\n </div>\n {this.state.showDeleteMemberDialog && (\n <ModalPortal>\n <DeleteMemberDialog\n toggle={this.toggleCancel}\n onMemberChanged={this.onMemberChanged}\n member={this.state.deletedMember}\n groupID={groupID}\n />\n </ModalPortal>\n )}\n {this.state.showDeleteRepoDialog && (\n <ModalPortal>\n <DeleteRepoDialog\n toggle={this.toggleCancel}\n onRepoChanged={this.onRepoChanged}\n repo={this.state.deletedRepo}\n groupID={groupID}\n />\n </ModalPortal>\n )}\n {this.state.showDeleteDepartDialog && (\n <ModalPortal>\n <DeleteDepartDialog\n toggle={this.toggleCancel}\n groupID={this.state.subGroupID}\n groupName={this.state.subGroupName}\n onDepartChanged={this.onSubDepartChanged}\n />\n </ModalPortal>\n )}\n {this.state.showSetGroupQuotaDialog && (\n <ModalPortal>\n <SetGroupQuotaDialog\n toggle={this.toggleCancel}\n groupID={this.state.subGroupID}\n onDepartChanged={this.onSubDepartChanged}\n />\n </ModalPortal>\n )}\n </div>\n </Fragment>\n );\n }\n}\n\nDepartmentDetail.propTypes = DepartmentDetailPropTypes;\n\nexport default DepartmentDetail;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'shareLinks', urlPart:'share-links', text: gettext('Share Links')},\n {name: 'uploadLinks', urlPart:'upload-links', text: gettext('Upload Links')},\n ];\n }\n\n render() {\n const { currentItem } = this.props;\n return (\n <div className=\"cur-view-path tab-nav-container\">\n <ul className=\"nav\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item\" key={index}>\n <Link to={`${siteRoot}sys/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React, { Component, Fragment } from 'react';\nimport { navigate } from '@reach/router';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport { Utils } from '../../../utils/utils';\nimport EmptyTip from '../../../components/empty-tip';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport LinksNav from './links-nav';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getShareLinksByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getShareLinksByPage(this.props.currentPage + 1);\n }\n\n sortByTime = (e) => {\n e.preventDefault();\n this.props.sortItems('ctime');\n }\n\n sortByCount = (e) => {\n e.preventDefault();\n this.props.sortItems('view_cnt');\n }\n\n render() {\n const {\n loading, errorMsg, items,\n perPage, currentPage, hasNextPage,\n sortBy, sortOrder\n } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No share links')}</h2>\n </EmptyTip>\n );\n\n const initialSortIcon = <span className=\"fas fa-sort\"></span>;\n const sortIcon = <span className={`fas ${sortOrder == 'asc' ? 'fa-caret-up' : 'fa-caret-down'}`}></span>;\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"18%\">{gettext('Name')}</th>\n <th width=\"18%\">{gettext('Token')}</th>\n <th width=\"18%\">{gettext('Owner')}</th>\n <th width=\"15%\">\n <a className=\"d-inline-block table-sort-op\" href=\"#\" onClick={this.sortByTime}>{gettext('Created At')} {sortBy == 'ctime' ? sortIcon : initialSortIcon}</a>\n </th>\n <th width=\"10%\">\n <a className=\"d-inline-block table-sort-op\" href=\"#\" onClick={this.sortByCount}>{gettext('Count')} {sortBy == 'view_cnt' ? sortIcon : initialSortIcon}</a>\n </th>\n <th width=\"11%\">{gettext('Expiration')}</th>\n <th width=\"10%\">{/*Operations*/}</th>\n </tr>\n </thead>\n {items &&\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n deleteShareLink={this.props.deleteShareLink}\n />);\n })}\n </tbody>\n }\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n };\n }\n\n handleMouseOver = () => {\n this.setState({\n isOpIconShown: true\n });\n }\n\n handleMouseOut = () => {\n this.setState({\n isOpIconShown: false\n });\n }\n\n deleteShareLink = () => {\n this.props.deleteShareLink(this.props.item.token);\n }\n\n renderExpiration = () => {\n const item = this.props.item;\n if (!item.expire_date) {\n return '--';\n }\n const expire_date = moment(item.expire_date).format('YYYY-MM-DD');\n const expire_time = moment(item.expire_date).format('YYYY-MM-DD HH:mm:ss');\n return (<span className={item.is_expired ? 'error' : ''} title={expire_time}>{expire_date}</span>);\n }\n\n render() {\n let { isOpIconShown } = this.state;\n let { item } = this.props;\n let deleteIcon = `action-icon sf2-icon-delete ${isOpIconShown ? '' : 'invisible'}`;\n return (\n <tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <td>{item.obj_name}</td>\n <td>{item.token}</td>\n <td><UserLink email={item.creator_email} name={item.creator_name} /></td>\n <td>{moment(item.ctime).fromNow()}</td>\n <td>{item.view_cnt}</td>\n <td>{this.renderExpiration()}</td>\n <td>\n <a href=\"#\" className={deleteIcon} title={gettext('Remove')} onClick={this.deleteShareLink}></a>\n </td>\n </tr>\n );\n }\n}\n\nclass ShareLinks extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n shareLinkList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n sortBy: '',\n sortOrder: 'asc'\n };\n this.initPage = 1;\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage, sortBy, sortOrder } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage),\n sortBy: urlParams.get('order_by') || sortBy,\n sortOrder: urlParams.get('direction') || sortOrder\n }, () => {\n this.getShareLinksByPage(this.state.currentPage);\n });\n }\n\n getShareLinksByPage = (page) => {\n const { perPage, sortBy, sortOrder } = this.state;\n seafileAPI.sysAdminListShareLinks(page, perPage, sortBy, sortOrder).then((res) => {\n this.setState({\n shareLinkList: res.data.share_link_list,\n loading: false,\n currentPage: page,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.count),\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n sortItems = (sortBy) => {\n this.setState({\n currentPage: 1,\n sortBy: sortBy,\n sortOrder: this.state.sortOrder == 'asc' ? 'desc' : 'asc'\n }, () => {\n let url = new URL(location.href);\n let searchParams = new URLSearchParams(url.search);\n const { currentPage, sortBy, sortOrder } = this.state;\n searchParams.set('page', currentPage);\n searchParams.set('order_by', sortBy);\n searchParams.set('direction', sortOrder);\n url.search = searchParams.toString();\n navigate(url.toString());\n this.getShareLinksByPage(currentPage);\n });\n }\n\n deleteShareLink = (linkToken) => {\n seafileAPI.sysAdminDeleteShareLink(linkToken).then(res => {\n let newShareLinkList = this.state.shareLinkList.filter(item =>\n item.token != linkToken\n );\n this.setState({shareLinkList: newShareLinkList});\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getShareLinksByPage(this.initPage));\n }\n\n render() {\n let { shareLinkList, currentPage, perPage, hasNextPage } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <LinksNav currentItem=\"shareLinks\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={shareLinkList}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getShareLinksByPage={this.getShareLinksByPage}\n resetPerPage={this.resetPerPage}\n sortBy={this.state.sortBy}\n sortOrder={this.state.sortOrder}\n sortItems={this.sortItems}\n deleteShareLink={this.deleteShareLink}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default ShareLinks;\n","import React, { Component, Fragment } from 'react';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport { Utils } from '../../../utils/utils';\nimport EmptyTip from '../../../components/empty-tip';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport LinksNav from './links-nav';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\n\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getUploadLinksByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getUploadLinksByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, perPage, currentPage, hasNextPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No upload links')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"18%\">{gettext('Name')}</th>\n <th width=\"18%\">{gettext('Token')}</th>\n <th width=\"18%\">{gettext('Owner')}</th>\n <th width=\"15%\">{gettext('Created At')}</th>\n <th width=\"10%\">{gettext('Count')}</th>\n <th width=\"11%\">{gettext('Expiration')}</th>\n <th width=\"10%\">{/*Operations*/}</th>\n </tr>\n </thead>\n {items &&\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n deleteUploadLink={this.props.deleteUploadLink}\n />);\n })}\n </tbody>\n }\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n };\n }\n\n handleMouseOver = () => {\n this.setState({\n isOpIconShown: true\n });\n }\n\n handleMouseOut = () => {\n this.setState({\n isOpIconShown: false\n });\n }\n\n deleteUploadLink = () => {\n this.props.deleteUploadLink(this.props.item.token);\n }\n\n renderExpiration = () => {\n let item = this.props.item;\n if (!item.expire_date) {\n return '--';\n }\n const expire_date = moment(item.expire_date).format('YYYY-MM-DD');\n const expire_time = moment(item.expire_date).format('YYYY-MM-DD HH:mm:ss');\n return (<span className={item.is_expired ? 'error' : ''} title={expire_time}>{expire_date}</span>);\n }\n\n render() {\n let { isOpIconShown } = this.state;\n let { item } = this.props;\n let deleteIcon = `action-icon sf2-icon-delete ${isOpIconShown ? '' : 'invisible'}`;\n return (\n <Fragment>\n <tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <td>{item.path}</td>\n <td>{item.token}</td>\n <td><UserLink email={item.creator_email} name={item.creator_name} /></td>\n <td>{moment(item.ctime).fromNow()}</td>\n <td>{item.view_cnt}</td>\n <td>{this.renderExpiration()}</td>\n <td>\n <a href=\"#\" className={deleteIcon} title={gettext('Remove')} onClick={this.deleteUploadLink}></a>\n </td>\n </tr>\n </Fragment>\n );\n }\n}\n\nclass UploadLinks extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n uploadLinkList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n };\n this.initPage = 1;\n }\n\n componentDidMount() {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getUploadLinksByPage(this.state.currentPage);\n });\n }\n\n getUploadLinksByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListAllUploadLinks(page, perPage).then((res) => {\n this.setState({\n uploadLinkList: res.data.upload_link_list,\n loading: false,\n currentPage: page,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.count),\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n deleteUploadLink = (linkToken) => {\n seafileAPI.sysAdminDeleteUploadLink(linkToken).then(res => {\n let newUploadLinkList = this.state.uploadLinkList.filter(item =>\n item.token != linkToken\n );\n this.setState({uploadLinkList: newUploadLinkList});\n }).catch(error => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getUploadLinksByPage(this.initPage));\n }\n\n render() {\n let { uploadLinkList, currentPage, perPage, hasNextPage } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <LinksNav currentItem=\"uploadLinks\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={uploadLinkList}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getUploadLinksByPage={this.getUploadLinksByPage}\n resetPerPage={this.resetPerPage}\n deleteUploadLink={this.deleteUploadLink}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default UploadLinks;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Alert, Modal, ModalHeader, ModalBody, ModalFooter, Button, Form, FormGroup, Label, Input } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\n\nconst propTypes = {\n toggleDialog: PropTypes.func.isRequired,\n addOrg: PropTypes.func.isRequired\n};\n\nclass SysAdminAddOrgDialog extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n name: '',\n email: '',\n password: '',\n passwordAgain: '',\n errorMsg: '',\n isSubmitBtnActive: false\n };\n }\n\n checkSubmitBtnActive = () => {\n const { name, email, password, passwordAgain } = this.state;\n let btnActive = true;\n if (name.trim() !='' &&\n email.trim() != '' &&\n password.trim() != '' &&\n passwordAgain.trim() != '') {\n btnActive = true;\n } else {\n btnActive = false;\n }\n this.setState({\n isSubmitBtnActive: btnActive\n });\n }\n\n toggle = () => {\n this.props.toggleDialog();\n }\n\n inputPassword = (e) => {\n let passwd = e.target.value;\n this.setState({\n password: passwd\n }, this.checkSubmitBtnActive);\n }\n\n inputPasswordAgain = (e) => {\n let passwd = e.target.value;\n this.setState({\n passwordAgain: passwd\n }, this.checkSubmitBtnActive);\n }\n\n inputEmail = (e) => {\n let email = e.target.value;\n this.setState({\n email: email\n }, this.checkSubmitBtnActive);\n }\n\n inputName = (e) => {\n let name = e.target.value;\n this.setState({\n name: name\n }, this.checkSubmitBtnActive);\n }\n\n handleSubmit = () => {\n let { name, email, password, passwordAgain } = this.state;\n if (password != passwordAgain) {\n this.setState({errorMsg: gettext('Passwords do not match.')});\n return;\n }\n const data = {\n orgName: name.trim(),\n ownerEmail: email.trim(),\n password: password.trim()\n };\n this.props.addOrg(data);\n this.toggle();\n }\n\n render() {\n const { errorMsg, password, passwordAgain, email, name, isSubmitBtnActive } = this.state;\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('Add Organization')}</ModalHeader>\n <ModalBody>\n <Form autoComplete=\"off\">\n <FormGroup>\n <Label>{gettext('Name')}</Label>\n <Input value={name} onChange={this.inputName} />\n </FormGroup>\n <FormGroup>\n <Label>\n {gettext('Owner')}\n <span className=\"small text-secondary ml-1 fas fa-question-circle\" title={gettext('Owner can use admin panel in an organization, must be a new account.')}></span>\n </Label>\n <Input value={email} onChange={this.inputEmail} />\n </FormGroup>\n <FormGroup>\n <Label>{gettext('Password')}</Label>\n <Input type=\"password\" value={password} onChange={this.inputPassword} />\n </FormGroup>\n <FormGroup>\n <Label>{gettext('Password again')}</Label>\n <Input type=\"password\" value={passwordAgain} onChange={this.inputPasswordAgain} />\n </FormGroup>\n </Form>\n {errorMsg && <Alert color=\"danger\">{errorMsg}</Alert>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminAddOrgDialog.propTypes = propTypes;\n\nexport default SysAdminAddOrgDialog;\n","import React, { Component, Fragment } from 'react';\nimport { Link } from '@reach/router';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport { seafileAPI } from '../../../utils/seafile-api.js';\nimport SysAdminUserRoleEditor from '../../../components/select-editor/sysadmin-user-role-editor';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport UserLink from '../user-link';\nimport toaster from '../../../components/toast';\n\nconst { availableRoles } = window.sysadmin.pageOptions;\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getListByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getListByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No organizations')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"20%\">{gettext('Name')}</th>\n <th width=\"20%\">{gettext('Creator')}</th>\n <th width=\"20%\">{gettext('Role')}</th>\n <th width=\"15%\">{gettext('Space Used')}</th>\n <th width=\"20%\">{gettext('Created At')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n updateRole={this.props.updateRole}\n deleteOrg={this.props.deleteOrg}\n />);\n })}\n </tbody>\n </table>\n {this.props.currentPage &&\n <Paginator\n currentPage={this.props.currentPage}\n hasNextPage={this.props.hasNextPage}\n curPerPage={this.props.curPerPage}\n resetPerPage={this.props.resetPerPage}\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n />\n }\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n isDeleteDialogOpen: false,\n deleteDialogMsg: '',\n };\n }\n\n handleMouseEnter = () => {\n this.setState({isOpIconShown: true});\n }\n\n handleMouseLeave = () => {\n this.setState({isOpIconShown: false});\n }\n\n toggleDeleteDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen}, () => {\n if (this.state.isDeleteDialogOpen) {\n seafileAPI.sysAdminGetOrg(this.props.item.org_id).then((res) => {\n let orgName = '<span class=\"op-target\">' + Utils.HTMLescape(res.data.org_name) + '</span>';\n let userCount = '<span class=\"op-target\">' + Utils.HTMLescape(res.data.users_count) + '</span>';\n let repoCount = '<span class=\"op-target\">' + Utils.HTMLescape(res.data.repos_count) + '</span>';\n let deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?')\n .replace('{placeholder}', orgName) + '<br/>' +\n gettext('{userCount} user(s) and {repoCount} libraries of this organization will also be deleted.')\n .replace('{userCount}', userCount)\n .replace('{repoCount}', repoCount);\n this.setState({deleteDialogMsg: deleteDialogMsg});\n }).catch(error => {\n let errorMsg = Utils.getErrorMsg(error);\n toaster.danger(errorMsg);\n });\n }\n });\n }\n\n updateRole = (role) => {\n this.props.updateRole(this.props.item.org_id, role);\n }\n\n deleteOrg = () => {\n toaster.notify(gettext('It may take some time, please wait.'));\n this.props.deleteOrg(this.props.item.org_id);\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isDeleteDialogOpen, deleteDialogMsg } = this.state;\n\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><Link to={`${siteRoot}sys/organizations/${item.org_id}/info/`}>{item.org_name}</Link></td>\n <td>\n <UserLink email={item.creator_email} name={item.creator_name} />\n </td>\n <td>\n <SysAdminUserRoleEditor\n isTextMode={true}\n isEditIconShow={isOpIconShown}\n currentRole={item.role}\n roleOptions={availableRoles}\n onRoleChanged={this.updateRole}\n />\n </td>\n <td>{`${Utils.bytesToSize(item.quota_usage)} / ${item.quota > 0 ? Utils.bytesToSize(item.quota) : '--'}`}</td>\n <td>{moment(item.ctime).format('YYYY-MM-DD HH:mm:ss')}</td>\n <td>\n <a href=\"#\" className={`action-icon sf2-icon-delete ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Delete')} onClick={this.toggleDeleteDialog}></a>\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Organization')}\n message={deleteDialogMsg}\n executeOperation={this.deleteOrg}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default Content;\n","import React, { Component, Fragment } from 'react';\nimport { navigate } from '@reach/router';\nimport { Button } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport SysAdminAddOrgDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-org-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Search from '../search';\nimport Content from './orgs-content';\n\n\nclass Orgs extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n orgList: [],\n currentPage: 1,\n perPage: 25,\n hasNextPage: false,\n isAddOrgDialogOpen: false\n };\n }\n\n componentDidMount() {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getItemsByPage(this.state.currentPage);\n });\n }\n\n getItemsByPage = (page) => {\n const { perPage } = this.state;\n seafileAPI.sysAdminListOrgs(page, perPage).then((res) => {\n this.setState({\n loading: false,\n orgList: res.data.organizations,\n currentPage: page,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.total_count)\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getItemsByPage(1);\n });\n }\n\n toggleAddOrgDialog = () => {\n this.setState({isAddOrgDialogOpen: !this.state.isAddOrgDialogOpen});\n }\n\n updateRole = (orgID, role) => {\n let orgInfo = {};\n orgInfo.role = role;\n seafileAPI.sysAdminUpdateOrg(orgID, orgInfo).then(res => {\n let newOrgList = this.state.orgList.map(org => {\n if (org.org_id == orgID) {\n org.role = role;\n }\n return org;\n });\n this.setState({orgList: newOrgList});\n toaster.success(gettext('Edit succeeded'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n addOrg = (data) => {\n const { orgName, ownerEmail, password } = data;\n seafileAPI.sysAdminAddOrg(orgName, ownerEmail, password).then(res => {\n let orgList = this.state.orgList;\n orgList.unshift(res.data);\n this.setState({orgList: orgList});\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteOrg = (orgID) => {\n seafileAPI.sysAdminDeleteOrg(orgID).then(res => {\n let orgList = this.state.orgList.filter(org => {\n return org.org_id != orgID;\n });\n this.setState({orgList: orgList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n getSearch = () => {\n return <Search\n placeholder={gettext('Search organizations')}\n submit={this.searchItems}\n />;\n }\n\n searchItems = (keyword) => {\n navigate(`${siteRoot}sys/search-organizations/?query=${encodeURIComponent(keyword)}`);\n }\n\n render() {\n const { isAddOrgDialogOpen } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar search={this.getSearch()}>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleAddOrgDialog}>{gettext('Add Organization')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Organizations')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.orgList}\n currentPage={this.state.currentPage}\n hasNextPage={this.state.hasNextPage}\n curPerPage={this.state.perPage}\n resetPerPage={this.resetPerPage}\n getListByPage={this.getItemsByPage}\n updateRole={this.updateRole}\n deleteOrg={this.deleteOrg}\n />\n </div>\n </div>\n </div>\n {isAddOrgDialogOpen &&\n <SysAdminAddOrgDialog\n addOrg={this.addOrg}\n toggleDialog={this.toggleAddOrgDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default Orgs;\n","import React, { Component, Fragment } from 'react';\nimport { Form, FormGroup, Input, Label, Col } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Content from './orgs-content';\n\n\nclass SearchOrgs extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n query: '',\n isSubmitBtnActive: false,\n loading: true,\n errorMsg: '',\n orgList: []\n };\n }\n\n componentDidMount () {\n let params = (new URL(document.location)).searchParams;\n this.setState({\n query: params.get('query') || ''\n }, this.getItems);\n }\n\n getItems = () => {\n seafileAPI.sysAdminSearchOrgs(this.state.query.trim()).then(res => {\n this.setState({\n loading: false,\n orgList: res.data.organization_list\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n updateRole = (orgID, role) => {\n let orgInfo = {};\n orgInfo.role = role;\n seafileAPI.sysAdminUpdateOrg(orgID, orgInfo).then(res => {\n let newOrgList = this.state.orgList.map(org => {\n if (org.org_id == orgID) {\n org.role = role;\n }\n return org;\n });\n this.setState({orgList: newOrgList});\n toaster.success(gettext('Edit succeeded'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteOrg = (orgID) => {\n seafileAPI.sysAdminDeleteOrg(orgID).then(res => {\n let orgList = this.state.orgList.filter(org => {\n return org.org_id != orgID;\n });\n this.setState({orgList: orgList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n handleInputChange = (e) => {\n this.setState({\n query: e.target.value\n }, this.checkSubmitBtnActive);\n }\n\n checkSubmitBtnActive = () => {\n const { query } = this.state;\n this.setState({\n isSubmitBtnActive: query.trim()\n });\n }\n\n render() {\n const { query, isSubmitBtnActive } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Organizations')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <div className=\"mt-4 mb-6\">\n <h4 className=\"border-bottom font-weight-normal mb-2 pb-1\">{gettext('Search Organizations')}</h4>\n <p className=\"text-secondary small\">{gettext('Tip: you can search by keyword in name.')}</p>\n <Form>\n <FormGroup row>\n <Label for=\"name\" sm={1}>{gettext('Name')}</Label>\n <Col sm={5}>\n <Input type=\"text\" name=\"query\" id=\"name\" value={query} onChange={this.handleInputChange} />\n </Col>\n </FormGroup>\n <FormGroup row>\n <Col sm={{size: 5, offset: 1}}>\n <button className=\"btn btn-outline-primary\" disabled={!isSubmitBtnActive} onClick={this.getItems}>{gettext('Submit')}</button>\n </Col>\n </FormGroup>\n </Form>\n </div>\n <div className=\"mt-4 mb-6\">\n <h4 className=\"border-bottom font-weight-normal mb-2 pb-1\">{gettext('Result')}</h4>\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.orgList}\n updateRole={this.updateRole}\n deleteOrg={this.deleteOrg}\n />\n </div>\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default SearchOrgs;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Alert, Modal, ModalHeader, ModalBody, ModalFooter, Button, Form, FormGroup, Input, InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n updateName: PropTypes.func.isRequired\n};\n\nclass SysAdminSetOrgNameDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n name: this.props.name,\n isSubmitBtnActive: false\n };\n }\n\n toggle = () => {\n this.props.toggle();\n }\n\n handleInputChange = (e) => {\n const value = e.target.value;\n this.setState({\n name: value,\n isSubmitBtnActive: value.trim() != ''\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key == 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n handleSubmit = () => {\n this.props.updateName(this.state.name.trim());\n this.toggle();\n }\n\n render() {\n const { name, isSubmitBtnActive } = this.state;\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('Set Name')}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Input\n type=\"text\"\n value={name}\n onKeyPress={this.handleKeyPress}\n onChange={this.handleInputChange}\n />\n </FormGroup>\n </Form>\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminSetOrgNameDialog.propTypes = propTypes;\n\nexport default SysAdminSetOrgNameDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Alert, Modal, ModalHeader, ModalBody, ModalFooter, Button, Form, FormGroup, Input, InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n updateValue: PropTypes.func.isRequired\n};\n\nclass SysAdminSetOrgMaxUserNumberDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n value: this.props.value,\n isSubmitBtnActive: false\n };\n }\n\n toggle = () => {\n this.props.toggle();\n }\n\n handleInputChange = (e) => {\n const value = e.target.value;\n this.setState({\n value: value,\n isSubmitBtnActive: value.trim() != ''\n });\n }\n\n handleKeyPress = (e) => {\n if (e.key == 'Enter') {\n this.handleSubmit();\n e.preventDefault();\n }\n }\n\n handleSubmit = () => {\n this.props.updateValue(this.state.value.trim());\n this.toggle();\n }\n\n render() {\n const { value, isSubmitBtnActive } = this.state;\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('Set max number of members')}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Input\n type=\"text\"\n className=\"form-control\"\n value={value}\n onKeyPress={this.handleKeyPress}\n onChange={this.handleInputChange}\n />\n </FormGroup>\n </Form>\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminSetOrgMaxUserNumberDialog.propTypes = propTypes;\n\nexport default SysAdminSetOrgMaxUserNumberDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'info', urlPart: 'info', text: gettext('Info')},\n {name: 'users', urlPart: 'users', text: gettext('Members')},\n {name: 'groups', urlPart: 'groups', text: gettext('Groups')},\n {name: 'repos', urlPart: 'libraries', text: gettext('Libraries')},\n //{name: 'traffic', urlPart: 'traffic', text: gettext('traffic')},\n //{name: 'settings', urlPart: 'settings', text: gettext('Settings')}\n ];\n }\n\n render() {\n const { currentItem, orgID, orgName } = this.props;\n return (\n <div>\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\"><Link to={`${siteRoot}sys/organizations/`}>{gettext('Organizations')}</Link> / {orgName}</h3>\n </div>\n <ul className=\"nav border-bottom mx-4\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item mr-2\" key={index}>\n <Link to={`${siteRoot}sys/organizations/${orgID}/${item.urlPart}/`} className={`nav-link ${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React, { Component, Fragment } from 'react';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport Loading from '../../../components/loading';\nimport SysAdminSetOrgQuotaDialog from '../../../components/dialog/sysadmin-dialog/set-quota';\nimport SysAdminSetOrgNameDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-set-org-name-dialog';\nimport SysAdminSetOrgMaxUserNumberDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-set-org-max-user-number-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport OrgNav from './org-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isSetQuotaDialogOpen: false,\n isSetNameDialogOpen: false,\n isSetMaxUserNumberDialogOpen: false\n };\n }\n\n toggleSetQuotaDialog = () => {\n this.setState({isSetQuotaDialogOpen: !this.state.isSetQuotaDialogOpen});\n }\n\n toggleSetNameDialog = () => {\n this.setState({isSetNameDialogOpen: !this.state.isSetNameDialogOpen});\n }\n\n toggleSetMaxUserNumberDialog = () => {\n this.setState({isSetMaxUserNumberDialogOpen: !this.state.isSetMaxUserNumberDialogOpen});\n }\n\n showEditIcon = (action) => {\n return (\n <span\n title={gettext('Edit')}\n className=\"fa fa-pencil-alt attr-action-icon\"\n onClick={action}>\n </span>\n );\n }\n\n render() {\n const { loading, errorMsg, orgInfo } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const { org_name, users_count, max_user_number, groups_count, quota, quota_usage } = this.props.orgInfo;\n const { isSetQuotaDialogOpen, isSetNameDialogOpen, isSetMaxUserNumberDialogOpen } = this.state;\n return (\n <Fragment>\n <dl className=\"m-0\">\n <dt className=\"info-item-heading\">{gettext('Name')}</dt>\n <dd className=\"info-item-content\">\n {org_name}\n {this.showEditIcon(this.toggleSetNameDialog)}\n </dd>\n\n <dt className=\"info-item-heading\">{gettext('Number of members')}</dt>\n <dd className=\"info-item-content\">{users_count}</dd>\n\n {max_user_number &&\n <Fragment>\n <dt className=\"info-item-heading\">{gettext('Max number of members')}</dt>\n <dd className=\"info-item-content\">\n {max_user_number}\n {this.showEditIcon(this.toggleSetMaxUserNumberDialog)}\n </dd>\n </Fragment>\n }\n\n <dt className=\"info-item-heading\">{gettext('Number of groups')}</dt>\n <dd className=\"info-item-content\">{groups_count}</dd>\n\n <dt className=\"info-item-heading\">{gettext('Space Used')}</dt>\n <dd className=\"info-item-content\">\n {`${Utils.bytesToSize(quota_usage)} / ${quota > 0 ? Utils.bytesToSize(quota) : '--'}`}\n {this.showEditIcon(this.toggleSetQuotaDialog)}\n </dd>\n </dl>\n {isSetQuotaDialogOpen &&\n <SysAdminSetOrgQuotaDialog\n updateQuota={this.props.updateQuota}\n toggle={this.toggleSetQuotaDialog}\n />\n }\n {isSetNameDialogOpen &&\n <SysAdminSetOrgNameDialog\n name={org_name}\n updateName={this.props.updateName}\n toggle={this.toggleSetNameDialog}\n />\n }\n {isSetMaxUserNumberDialogOpen &&\n <SysAdminSetOrgMaxUserNumberDialog\n value={max_user_number}\n updateValue={this.props.updateMaxUserNumber}\n toggle={this.toggleSetMaxUserNumberDialog}\n />\n }\n </Fragment>\n );\n }\n }\n}\n\nclass OrgInfo extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n orgInfo: {}\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {\n this.setState({\n loading: false,\n orgInfo: res.data\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n updateQuota = (quota) => {\n const data = {quota: quota};\n seafileAPI.sysAdminUpdateOrg(this.props.orgID, data).then(res => {\n const newOrgInfo = Object.assign(this.state.orgInfo, {\n quota: res.data.quota\n });\n this.setState({orgInfo: newOrgInfo});\n toaster.success(gettext('Successfully set quota.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateName = (orgName) => {\n const data = {orgName: orgName};\n seafileAPI.sysAdminUpdateOrg(this.props.orgID, data).then(res => {\n const newOrgInfo = Object.assign(this.state.orgInfo, {\n org_name: res.data.org_name\n });\n this.setState({orgInfo: newOrgInfo});\n toaster.success(gettext('Successfully set name.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateMaxUserNumber = (newValue) => {\n const data = {maxUserNumber: newValue};\n seafileAPI.sysAdminUpdateOrg(this.props.orgID, data).then(res => {\n const newOrgInfo = Object.assign(this.state.orgInfo, {\n max_user_number: res.data.max_user_number\n });\n this.setState({orgInfo: newOrgInfo});\n toaster.success(gettext('Successfully set max number of members.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n const { orgInfo } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <OrgNav currentItem=\"info\" orgID={this.props.orgID} orgName={orgInfo.org_name} />\n <div className=\"cur-view-content\">\n <Content\n orgID={this.props.orgID}\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n orgInfo={this.state.orgInfo}\n updateQuota={this.updateQuota}\n updateName={this.updateName}\n updateMaxUserNumber={this.updateMaxUserNumber}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default OrgInfo;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { gettext } from '../../utils/constants';\nimport SelectEditor from './select-editor';\n\nconst propTypes = {\n isTextMode: PropTypes.bool.isRequired,\n isEditIconShow: PropTypes.bool.isRequired,\n statusOptions: PropTypes.array.isRequired,\n currentStatus: PropTypes.string.isRequired,\n onStatusChanged: PropTypes.func.isRequired\n};\n\nclass SysAdminUserMembershipEditor extends React.Component {\n\n translateStatus = (status) => {\n switch (status) {\n case 'is_org_staff':\n return gettext('Admin');\n case 'not_is_org_staff':\n return gettext('Member');\n }\n }\n\n render() {\n return (\n <SelectEditor\n isTextMode={this.props.isTextMode}\n isEditIconShow={this.props.isEditIconShow}\n options={this.props.statusOptions}\n currentOption={this.props.currentStatus}\n onOptionChanged={this.props.onStatusChanged}\n translateOption={this.translateStatus}\n />\n );\n }\n}\n\nSysAdminUserMembershipEditor.propTypes = propTypes;\n\nexport default SysAdminUserMembershipEditor;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext, username } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport SysAdminUserStatusEditor from '../../../components/select-editor/sysadmin-user-status-editor';\nimport SysAdminUserMembershipEditor from '../../../components/select-editor/sysadmin-user-membership-editor';\nimport SysAdminAddUserDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-user-dialog';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\nimport OrgNav from './org-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No members')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"25%\">{gettext('Name')}</th>\n <th width=\"15%\">{gettext('Status')}</th>\n <th width=\"15%\">{gettext('Membership')}</th>\n <th width=\"15%\">{gettext('Space Used')}</th>\n <th width=\"25%\">{gettext('Created At')}{' / '}{gettext('Last Login')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n updateStatus={this.props.updateStatus}\n updateMembership={this.props.updateMembership}\n deleteUser={this.props.deleteUser}\n />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isDeleteDialogOpen: false,\n isResetPasswordDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Delete':\n this.toggleDeleteDialog();\n break;\n case 'Reset Password':\n this.toggleResetPasswordDialog();\n break;\n default:\n break;\n }\n }\n\n toggleDeleteDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n toggleResetPasswordDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isResetPasswordDialogOpen: !this.state.isResetPasswordDialogOpen});\n }\n\n updateStatus= (statusValue) => {\n this.props.updateStatus(this.props.item.email, statusValue);\n }\n\n updateMembership= (membershipValue) => {\n this.props.updateMembership(this.props.item.email, membershipValue);\n }\n\n deleteUser = () => {\n const { item } = this.props;\n this.props.deleteUser(item.org_id, item.email);\n }\n\n resetPassword = () => {\n seafileAPI.sysAdminResetUserPassword(this.props.item.email).then(res => {\n toaster.success(res.data.reset_tip);\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n case 'Reset Password':\n translateResult = gettext('Reset Password');\n break;\n }\n\n return translateResult;\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isDeleteDialogOpen, isResetPasswordDialogOpen } = this.state;\n\n const itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n let deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', itemName);\n let resetPasswordDialogMsg = gettext('Are you sure you want to reset the password of {placeholder} ?').replace('{placeholder}', itemName);\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><UserLink email={item.email} name={item.name} /></td>\n <td>\n <SysAdminUserStatusEditor\n isTextMode={true}\n isEditIconShow={isOpIconShown}\n currentStatus={item.active ? 'active' : 'inactive'}\n statusOptions={['active', 'inactive']}\n onStatusChanged={this.updateStatus}\n />\n </td>\n <td>\n <SysAdminUserMembershipEditor\n isTextMode={true}\n isEditIconShow={isOpIconShown}\n currentStatus={item.is_org_staff ? 'is_org_staff' : 'not_is_org_staff'}\n statusOptions={['is_org_staff', 'not_is_org_staff']}\n onStatusChanged={this.updateMembership}\n />\n </td>\n <td>{`${Utils.bytesToSize(item.quota_usage)} / ${item.quota_total > 0 ? Utils.bytesToSize(item.quota_total) : '--'}`}</td>\n <td>\n {moment(item.create_time).format('YYYY-MM-DD HH:mm:ss')}{' / '}{item.last_login ? moment(item.last_login).fromNow() : '--'}\n </td>\n <td>\n {(isOpIconShown && item.email != username) &&\n <OpMenu\n operations={['Delete', 'Reset Password']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Member')}\n message={deleteDialogMsg}\n executeOperation={this.deleteUser}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteDialog}\n />\n }\n {isResetPasswordDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Reset Password')}\n message={resetPasswordDialogMsg}\n executeOperation={this.resetPassword}\n confirmBtnText={gettext('Reset')}\n toggleDialog={this.toggleResetPasswordDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass OrgUsers extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n orgName: '',\n userList: [],\n isAddUserDialogOpen: false\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {\n this.setState({\n orgName: res.data.org_name\n });\n });\n seafileAPI.sysAdminListOrgUsers(this.props.orgID).then((res) => {\n this.setState({\n loading: false,\n userList: res.data.users\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n toggleAddUserDialog = () => {\n this.setState({isAddUserDialogOpen: !this.state.isAddUserDialogOpen});\n }\n\n addUser = (newUserInfo) => {\n const { email, name, password } = newUserInfo;\n seafileAPI.sysAdminAddOrgUser(this.props.orgID, email, name, password).then(res => {\n let userList = this.state.userList;\n userList.unshift(res.data);\n this.setState({userList: userList});\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteUser = (orgID, email) => {\n seafileAPI.sysAdminDeleteOrgUser(orgID, email).then(res => {\n let newUserList = this.state.userList.filter(item => {\n return item.email != email;\n });\n this.setState({userList: newUserList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateStatus = (email, statusValue) => {\n const isActive = statusValue == 'active';\n seafileAPI.sysAdminUpdateOrgUser(this.props.orgID, email, 'active', isActive).then(res => {\n let newUserList = this.state.userList.map(item => {\n if (item.email == email) {\n item.active = res.data.active;\n }\n return item;\n });\n this.setState({userList: newUserList});\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateMembership = (email, membershipValue) => {\n const isOrgStaff = membershipValue == 'is_org_staff';\n seafileAPI.sysAdminUpdateOrgUser(this.props.orgID, email, 'is_org_staff', isOrgStaff).then(res => {\n let newUserList = this.state.userList.map(item => {\n if (item.email == email) {\n item.is_org_staff = res.data.is_org_staff;\n }\n return item;\n });\n this.setState({userList: newUserList});\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n const { isAddUserDialogOpen, orgName } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleAddUserDialog}>{gettext('Add Member')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <OrgNav\n currentItem=\"users\"\n orgID={this.props.orgID}\n orgName={orgName}\n />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.userList}\n updateStatus={this.updateStatus}\n updateMembership={this.updateMembership}\n deleteUser={this.deleteUser}\n />\n </div>\n </div>\n </div>\n {isAddUserDialogOpen &&\n <SysAdminAddUserDialog\n addUser={this.addUser}\n toggleDialog={this.toggleAddUserDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default OrgUsers;\n","import React, { Component, Fragment } from 'react';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\nimport OrgNav from './org-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No groups')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"30%\">{gettext('Name')}</th>\n <th width=\"30%\">{gettext('Creator')}</th>\n <th width=\"30%\">{gettext('Created At')}</th>\n <th width=\"10%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n deleteGroup={this.props.deleteGroup}\n />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n isDeleteDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n this.setState({isOpIconShown: true});\n }\n\n handleMouseLeave = () => {\n this.setState({isOpIconShown: false});\n }\n\n toggleDeleteDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n deleteGroup = () => {\n this.toggleDeleteDialog();\n this.props.deleteGroup(this.props.item.group_id);\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isDeleteDialogOpen } = this.state;\n\n const itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.group_name) + '</span>';\n const deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', itemName);\n\n const groupUrl = item.parent_group_id == 0 ?\n `${siteRoot}sys/groups/${item.group_id}/libraries/` :\n `${siteRoot}sysadmin/#address-book/groups/${item.group_id}/`;\n\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><a href={groupUrl}>{item.group_name}</a></td>\n <td><UserLink email={item.creator_email} name={item.creator_name} /></td>\n <td>{moment(item.created_at).format('YYYY-MM-DD HH:mm:ss')}</td>\n <td>\n <a href=\"#\" className={`action-icon sf2-icon-delete ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Delete')} onClick={this.toggleDeleteDialog}></a>\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Group')}\n message={deleteDialogMsg}\n executeOperation={this.deleteGroup}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass OrgGroups extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n orgName: '',\n groupList: []\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {\n this.setState({\n orgName: res.data.org_name\n });\n });\n seafileAPI.sysAdminListOrgGroups(this.props.orgID).then((res) => {\n this.setState({\n loading: false,\n groupList: res.data.group_list\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n deleteGroup = (groupID) => {\n seafileAPI.sysAdminDismissGroupByID(groupID).then(res => {\n let newGroupList = this.state.groupList.filter(item => {\n return item.group_id != groupID;\n });\n this.setState({groupList: newGroupList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <OrgNav\n currentItem=\"groups\"\n orgID={this.props.orgID}\n orgName={this.state.orgName}\n />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.groupList}\n deleteGroup={this.deleteGroup}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default OrgGroups;\n","import React, { Component, Fragment } from 'react';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\nimport OrgNav from './org-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No libraries')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"5%\"></th>\n <th width=\"30%\">{gettext('Name')}</th>\n <th width=\"35%\">{gettext('ID')}</th>\n <th width=\"20%\">{gettext('Owner')}</th>\n <th width=\"10%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n deleteRepo={this.props.deleteRepo}\n />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n isDeleteDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n this.setState({isOpIconShown: true});\n }\n\n handleMouseLeave = () => {\n this.setState({isOpIconShown: false});\n }\n\n toggleDeleteDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n deleteRepo = () => {\n this.props.deleteRepo(this.props.item.repo_id);\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isDeleteDialogOpen } = this.state;\n\n const iconUrl = Utils.getLibIconUrl(item);\n const iconTitle = Utils.getLibIconTitle(item);\n\n const itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.repo_name) + '</span>';\n const deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', itemName);\n\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><img src={iconUrl} title={iconTitle} alt={iconTitle} width=\"24\" /></td>\n <td>{item.repo_name}</td>\n <td>{item.repo_id}</td>\n <td>\n {!item.owner_email ?\n '--' :\n item.owner_email.indexOf('@seafile_group') == -1 ?\n <UserLink email={item.owner_email} name={item.owner_name} /> :\n item.owner_name\n }\n </td>\n <td>\n <a href=\"#\" className={`action-icon sf2-icon-delete ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Delete')} onClick={this.toggleDeleteDialog}></a>\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Library')}\n message={deleteDialogMsg}\n executeOperation={this.deleteRepo}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass OrgRepos extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n orgName: '',\n repoList: []\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {\n this.setState({\n orgName: res.data.org_name\n });\n });\n seafileAPI.sysAdminListOrgRepos(this.props.orgID).then((res) => {\n this.setState({\n loading: false,\n repoList: res.data.repo_list\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n deleteRepo = (repoID) => {\n seafileAPI.sysAdminDeleteRepo(repoID).then(res => {\n let newRepoList = this.state.repoList.filter(item => {\n return item.repo_id != repoID;\n });\n this.setState({repoList: newRepoList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <OrgNav\n currentItem=\"repos\"\n orgID={this.props.orgID}\n orgName={this.state.orgName}\n />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.repoList}\n deleteRepo={this.deleteRepo}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default OrgRepos;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Input } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n addInstitution: PropTypes.func.isRequired\n};\n\nclass SysAdminAddInstitutionDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n value: '',\n isSubmitBtnActive: false\n };\n }\n\n handleChange = (e) => {\n const value = e.target.value;\n this.setState({\n value: value,\n isSubmitBtnActive: value.trim() != ''\n });\n }\n\n handleSubmit = () => {\n this.toggle();\n this.props.addInstitution(this.state.value.trim());\n }\n\n toggle = () => {\n this.props.toggle();\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('Add institution')}</ModalHeader>\n <ModalBody>\n <Form>\n <p>{gettext('Name')}</p>\n <FormGroup>\n <Input\n value={this.state.value}\n onChange={this.handleChange}\n />\n </FormGroup>\n </Form>\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!this.state.isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminAddInstitutionDialog.propTypes = propTypes;\n\nexport default SysAdminAddInstitutionDialog;\n","import React, { Component, Fragment } from 'react';\nimport { Link } from '@reach/router';\nimport { Button } from 'reactstrap';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { siteRoot, gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport SysAdminAddInstitutionDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-institution-dialog';\nimport Paginator from '../../../components/paginator';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getInstitutionsByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getInstitutionsByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, perPage, currentPage, hasNextPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No institutions')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"75%\">{gettext('Name')}</th>\n <th width=\"20%\">{gettext('Created At')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n deleteInstitution={this.props.deleteInstitution}\n />);\n })}\n </tbody>\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n isDeleteDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n this.setState({isOpIconShown: true});\n }\n\n handleMouseLeave = () => {\n this.setState({isOpIconShown: false});\n }\n\n toggleDeleteDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n deleteInstitution = () => {\n this.props.deleteInstitution(this.props.item.id);\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isDeleteDialogOpen } = this.state;\n\n const institutionName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n const deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', institutionName);\n\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td><Link to={`${siteRoot}sys/institutions/${item.id}/info/`}>{item.name}</Link></td>\n <td>{moment(item.ctime).fromNow()}</td>\n <td>\n <a href=\"#\" className={`action-icon sf2-icon-delete ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Delete')} onClick={this.toggleDeleteDialog}></a>\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Institution')}\n message={deleteDialogMsg}\n executeOperation={this.deleteInstitution}\n confirmBtnText={gettext('Delete')}\n toggleDialog={this.toggleDeleteDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass Institutions extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n institutionList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n isAddInstitutionDialogOpen: false,\n };\n this.initPage = 1;\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getInstitutionsByPage(this.state.currentPage);\n });\n }\n\n getInstitutionsByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListInstitutions(page, perPage).then((res) => {\n this.setState({\n loading: false,\n institutionList: res.data.institution_list,\n currentPage: page,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.total_count),\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getInstitutionsByPage(this.initPage));\n }\n\n toggleAddInstitutionDialog = () => {\n this.setState({isAddInstitutionDialogOpen: !this.state.isAddInstitutionDialogOpen});\n }\n\n addInstitution = (name) => {\n seafileAPI.sysAdminAddInstitution(name).then(res => {\n let institutionList = this.state.institutionList;\n institutionList.push(res.data);\n this.setState({institutionList: institutionList});\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteInstitution = (institutionID) => {\n seafileAPI.sysAdminDeleteInstitution(institutionID).then(res => {\n let institutionList = this.state.institutionList.filter(inst => {\n return inst.id != institutionID;\n });\n this.setState({institutionList: institutionList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n const { isAddInstitutionDialogOpen, hasNextPage, currentPage, perPage } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleAddInstitutionDialog}>{gettext('Add Institution')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Institutions')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.institutionList}\n deleteInstitution={this.deleteInstitution}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getInstitutionsByPage={this.getInstitutionsByPage}\n resetPerPage={this.resetPerPage}\n />\n </div>\n </div>\n </div>\n {isAddInstitutionDialogOpen &&\n <SysAdminAddInstitutionDialog\n addInstitution={this.addInstitution}\n toggle={this.toggleAddInstitutionDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default Institutions;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'info', urlPart: 'info', text: gettext('Info')},\n {name: 'members', urlPart: 'members', text: gettext('Members')},\n {name: 'admins', urlPart: 'admins', text: gettext('Admins')},\n ];\n }\n\n render() {\n const { currentItem, institutionID, institutionName } = this.props;\n return (\n <div>\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\"><Link to={`${siteRoot}sys/institutions/`}>{gettext('Institutions')}</Link> / {institutionName}</h3>\n </div>\n <ul className=\"nav border-bottom mx-4\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item mr-2\" key={index}>\n <Link to={`${siteRoot}sys/institutions/${institutionID}/${item.urlPart}/`} className={`nav-link ${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React, { Component, Fragment } from 'react';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport Loading from '../../../components/loading';\nimport SysAdminSetInstitutionQuotaDialog from '../../../components/dialog/sysadmin-dialog/set-quota';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport InstitutionNav from './institution-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isSetQuotaDialogOpen: false,\n };\n }\n\n toggleSetQuotaDialog = () => {\n this.setState({isSetQuotaDialogOpen: !this.state.isSetQuotaDialogOpen});\n }\n\n showEditIcon = (action) => {\n return (\n <span\n title={gettext('Edit')}\n className=\"fa fa-pencil-alt attr-action-icon\"\n onClick={action}>\n </span>\n );\n }\n\n render() {\n const { loading, errorMsg, institutionInfo } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const { name, user_count, quota_total, quota_used } = institutionInfo;\n const { isSetQuotaDialogOpen } = this.state;\n return (\n <Fragment>\n <dl className=\"m-0\">\n <dt className=\"info-item-heading\">{gettext('Name')}</dt>\n <dd className=\"info-item-content\">\n {name}\n </dd>\n\n <dt className=\"info-item-heading\">{gettext('Number of members')}</dt>\n <dd className=\"info-item-content\">{user_count}</dd>\n\n <dt className=\"info-item-heading\">{gettext('Space Used')}</dt>\n <dd className=\"info-item-content\">\n {`${Utils.bytesToSize(quota_used)} / ${quota_total > 0 ? Utils.bytesToSize(quota_total) : '--'}`}\n {this.showEditIcon(this.toggleSetQuotaDialog)}\n </dd>\n </dl>\n {isSetQuotaDialogOpen &&\n <SysAdminSetInstitutionQuotaDialog\n updateQuota={this.props.updateQuota}\n toggle={this.toggleSetQuotaDialog}\n />\n }\n </Fragment>\n );\n }\n }\n}\n\nclass InstitutionInfo extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n institutionInfo: {}\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetInstitution(this.props.institutionID).then((res) => {\n this.setState({\n loading: false,\n institutionInfo: res.data\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n updateQuota = (quota) => {\n seafileAPI.sysAdminUpdateInstitution(this.props.institutionID, quota).then(res => {\n const newInstitutionInfo = Object.assign(this.state.institutionInfo, {\n quota_total: res.data.quota_total,\n });\n this.setState({institutionInfo: newInstitutionInfo});\n toaster.success(gettext('Successfully set quota.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n\n render() {\n const { institutionInfo } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <InstitutionNav currentItem=\"info\" institutionID={this.props.institutionID} institutionName={institutionInfo.name} />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n institutionInfo={this.state.institutionInfo}\n updateQuota={this.updateQuota}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default InstitutionInfo;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport UserSelect from '../../user-select.js';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n addUser: PropTypes.func.isRequired\n};\n\nclass AddMemberDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n selectedOption: [],\n };\n }\n\n handleSelectChange = (option) => {\n this.setState({ selectedOption: option });\n }\n\n handleSubmit = () => {\n if (!this.state.selectedOption) return;\n const emails = this.state.selectedOption.map(item => item.email);\n this.props.addUser(emails);\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{gettext('Add Member')}</ModalHeader>\n <ModalBody>\n <UserSelect\n placeholder={gettext('Search users...')}\n onSelectChange={this.handleSelectChange}\n isMulti={true}\n className='org-add-member-select'\n />\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.handleSubmit}>{gettext('Submit')}</Button>\n <Button color=\"secondary\" onClick={this.props.toggle}>{gettext('Cancel')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nAddMemberDialog.propTypes = propTypes;\n\nexport default AddMemberDialog;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport AddMemberDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-institution-member-dialog';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport UserLink from '../user-link';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport InstitutionNav from './institution-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n getPreviousPage = () => {\n this.props.getInstitutionUsersByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getInstitutionUsersByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, perPage, currentPage, hasNextPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No members')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"25%\">{gettext('Name')}</th>\n <th width=\"10%\">{gettext('Status')}</th>\n <th width=\"20%\">{gettext('Space Used')}</th>\n <th width=\"40%\">{gettext('Created At')}{' / '}{gettext('Last Login')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n setAdmin={this.props.setAdmin}\n deleteUser={this.props.deleteUser}\n />);\n })}\n </tbody>\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isSetAdminDialogOpen: false,\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n toggleSetAdminDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isSetAdminDialogOpen: !this.state.isSetAdminDialogOpen});\n }\n\n setAdmin = () => {\n this.props.setAdmin(this.props.item.email);\n }\n\n onMenuItemClick = (operation) => {\n switch (operation) {\n case 'Delete':\n this.props.deleteUser(this.props.item.email);\n break;\n case 'Set Admin':\n this.toggleSetAdminDialog();\n break;\n }\n }\n\n getOperations = () => {\n let operations = [];\n if (!this.props.item.is_institution_admin) {\n operations.push('Set Admin');\n }\n operations.push('Delete');\n return operations;\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n case 'Set Admin':\n translateResult = gettext('Set Admin');\n break;\n }\n\n return translateResult;\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isSetAdminDialogOpen } = this.state;\n\n const itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n const dialogMsg = gettext('Are you sure you want to set {placeholder} as Admin?').replace('{placeholder}', itemName);\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td>\n <UserLink email={item.email} name={item.name} />\n </td>\n <td>\n {item.is_active ? gettext('Active') : gettext('Inactive')}\n </td>\n <td>{`${Utils.bytesToSize(item.quota_usage)} / ${item.quota_total > 0 ? Utils.bytesToSize(item.quota_total) : '--'}`}</td>\n <td>\n {moment(item.create_time).format('YYYY-MM-DD HH:mm:ss')}{' / '}{item.last_login ? moment(item.last_login).fromNow() : '--'}\n </td>\n <td>\n {isOpIconShown &&\n <OpMenu\n operations={this.getOperations()}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isSetAdminDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Set Admin')}\n message={dialogMsg}\n executeOperation={this.setAdmin}\n toggleDialog={this.toggleSetAdminDialog}\n confirmBtnText={gettext('Set Admin')}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass InstitutionUsers extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n institutionName: '',\n userList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n isAddUserDialogOpen: false\n };\n this.initPage = 1;\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetInstitution(this.props.institutionID).then((res) => {\n this.setState({\n institutionName: res.data.name\n });\n });\n\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getInstitutionUsersByPage(this.state.currentPage);\n });\n }\n\n getInstitutionUsersByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListInstitutionUsers(this.props.institutionID, page, perPage).then((res) => {\n this.setState({\n loading: false,\n userList: res.data.user_list,\n currentPage: page,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.total_count),\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n setAdmin = (email) => {\n seafileAPI.sysAdminUpdateInstitutionUser(this.props.institutionID, email, true).then(res => {\n let userList = this.state.userList.map(user => {\n if (user.email == email) {\n user.is_institution_admin = true;\n }\n return user;\n });\n this.setState({userList: userList});\n toaster.success(gettext('Success'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n toggleAddUserDialog = () => {\n this.setState({isAddUserDialogOpen: !this.state.isAddUserDialogOpen});\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getInstitutionUsersByPage(this.initPage));\n }\n\n addUser = (emails) => {\n seafileAPI.sysAdminAddInstitutionUserBatch(this.props.institutionID, emails).then(res => {\n this.toggleAddUserDialog();\n let successArray = res.data.success;\n let failedArray = res.data.failed;\n if (successArray.length) {\n let newUserList = this.state.userList.concat(successArray);\n this.setState({userList: newUserList});\n }\n failedArray.map((item) => {\n toaster.danger(item.error_msg);\n });\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteUser = (email) => {\n seafileAPI.sysAdminDeleteInstitutionUser(this.props.institutionID, email).then(res => {\n let newUserList = this.state.userList.filter(user => {\n return user.email != email;\n });\n this.setState({userList: newUserList});\n toaster.success('success');\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n const { isAddUserDialogOpen, institutionName, hasNextPage, currentPage, perPage } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleAddUserDialog}>{gettext('Add Member')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <InstitutionNav\n currentItem=\"members\"\n institutionID={this.props.institutionID}\n institutionName={institutionName}\n />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.userList}\n setAdmin={this.setAdmin}\n deleteUser={this.deleteUser}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getInstitutionUsersByPage={this.getInstitutionUsersByPage}\n resetPerPage={this.resetPerPage}\n />\n </div>\n </div>\n </div>\n {isAddUserDialogOpen &&\n <AddMemberDialog\n addUser={this.addUser}\n toggle={this.toggleAddUserDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default InstitutionUsers;\n","import React, { Component, Fragment } from 'react';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport UserLink from '../user-link';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport InstitutionNav from './institution-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No admins')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"25%\">{gettext('Name')}</th>\n <th width=\"10%\">{gettext('Status')}</th>\n <th width=\"20%\">{gettext('Space Used')}</th>\n <th width=\"40%\">{gettext('Created At')}{' / '}{gettext('Last Login')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n revokeAdmin={this.props.revokeAdmin}\n deleteUser={this.props.deleteUser}\n />);\n })}\n </tbody>\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isRevokeAdminDialogOpen: false,\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n toggleRevokeAdminDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isRevokeAdminDialogOpen: !this.state.isRevokeAdminDialogOpen});\n }\n\n revokeAdmin = () => {\n this.props.revokeAdmin(this.props.item);\n }\n\n onMenuItemClick = (operation) => {\n switch (operation) {\n case 'Revoke Admin':\n this.toggleRevokeAdminDialog();\n break;\n }\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'Revoke Admin':\n translateResult = gettext('Revoke Admin');\n break;\n }\n return translateResult;\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isRevokeAdminDialogOpen } = this.state;\n\n const itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n const revokeAdminDialogMsg = gettext('Are you sure you want to revoke the admin permission of {placeholder} ?').replace('{placeholder}', itemName);\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td>\n <UserLink email={item.email} name={item.name} />\n </td>\n <td>\n {item.is_active ? gettext('Active') : gettext('Inactive')}\n </td>\n <td>{`${Utils.bytesToSize(item.quota_usage)} / ${item.quota_total > 0 ? Utils.bytesToSize(item.quota_total) : '--'}`}</td>\n <td>\n {moment(item.create_time).format('YYYY-MM-DD HH:mm:ss')}{' / '}{item.last_login ? moment(item.last_login).fromNow() : '--'}\n </td>\n <td>\n {isOpIconShown &&\n <OpMenu\n operations={['Revoke Admin']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isRevokeAdminDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Revoke Admin')}\n message={revokeAdminDialogMsg}\n executeOperation={this.revokeAdmin}\n confirmBtnText={gettext('Revoke')}\n toggleDialog={this.toggleRevokeAdminDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass InstitutionAdmins extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n institutionName: '',\n userList: [],\n isAddUserDialogOpen: false\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetInstitution(this.props.institutionID).then((res) => {\n this.setState({\n institutionName: res.data.name\n });\n });\n seafileAPI.sysAdminListInstitutionAdmins(this.props.institutionID).then((res) => {\n this.setState({\n loading: false,\n userList: res.data.user_list,\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n revokeAdmin = (item) => {\n const email = item.email;\n const name = item.name;\n seafileAPI.sysAdminUpdateInstitutionUser(this.props.institutionID, email, false).then(res => {\n let userList = this.state.userList.filter(user => {\n return user.email != email;\n });\n this.setState({userList: userList});\n toaster.success(gettext('Successfully revoked the admin permission of {placeholder}.').replace('{placeholder}', name));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteUser = (email) => {\n seafileAPI.sysAdminDeleteInstitutionUser(this.props.institutionID, email).then(res => {\n let newUserList = this.state.userList.filter(user => {\n return user.email != email;\n });\n this.setState({userList: newUserList});\n toaster.success('success');\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n const { institutionName } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <InstitutionNav\n currentItem=\"admins\"\n institutionID={this.props.institutionID}\n institutionName={institutionName}\n />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.userList}\n revokeAdmin={this.revokeAdmin}\n deleteUser={this.deleteUser}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default InstitutionAdmins;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'loginLogs', urlPart:'logs/login', text: gettext('Login')},\n {name: 'fileAccessLogs', urlPart:'logs/file-access', text: gettext('File Access')},\n {name: 'fileUpdateLogs', urlPart:'logs/file-update', text: gettext('File Update')},\n {name: 'sharePermissionLogs', urlPart:'logs/share-permission', text: gettext('Permission')},\n ];\n }\n\n render() {\n const { currentItem } = this.props;\n return (\n <div className=\"cur-view-path tab-nav-container\">\n <ul className=\"nav\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item\" key={index}>\n <Link to={`${siteRoot}sys/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, FormGroup, Label, Input, Alert } from 'reactstrap';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport moment from 'moment';\n\nclass LogsExportExcelDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n startDateStr: '',\n endDateStr: '',\n errMsg: '',\n };\n this.newInput = React.createRef();\n }\n\n componentDidMount() {\n this.newInput.focus();\n }\n\n downloadExcel = () => {\n if (!this.isValidDateStr()) {\n return;\n }\n let { startDateStr, endDateStr } = this.state;\n let url = siteRoot;\n\n switch (this.props.logType) {\n case 'login':\n url += 'sys/loginadmin/export-excel/';\n break;\n case 'fileAccess':\n url += 'sys/log/fileaudit/export-excel/';\n break;\n case 'fileUpdate':\n url += 'sys/log/fileupdate/export-excel/';\n break;\n case 'sharePermission':\n url += 'sys/log/permaudit/export-excel/';\n break;\n }\n location.href = url + '?start=' + startDateStr + '&end=' + endDateStr;\n this.props.toggle();\n }\n\n isValidDateStr = () => {\n let { startDateStr, endDateStr } = this.state;\n if (moment(startDateStr, 'YYYY-MM-DD', true).isValid() &&\n moment(endDateStr, 'YYYY-MM-DD', true).isValid() &&\n moment(startDateStr).isBefore(endDateStr)\n ) {\n return true;\n } else {\n this.setState({\n errMsg: gettext('Date Invalid.')\n });\n return false;\n }\n }\n\n handleStartChange = (e) => {\n const startDateStr = e.target.value.trim();\n this.setState({\n startDateStr: startDateStr,\n errMsg: ''\n });\n }\n\n handleEndChange = (e) => {\n const endDateStr = e.target.value.trim();\n this.setState({\n endDateStr: endDateStr,\n errMsg: '',\n });\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{gettext('Choose date')}</ModalHeader>\n <ModalBody>\n <FormGroup>\n <Label>{gettext('Start date')}</Label>\n <Input\n value={this.state.startDateStr}\n onChange={this.handleStartChange}\n placeholder='yyyy-mm-dd'\n innerRef={input => {this.newInput = input;}}\n />\n </FormGroup>\n <FormGroup>\n <Label>{gettext('End date')}</Label>\n <Input\n value={this.state.endDateStr}\n onChange={this.handleEndChange}\n placeholder='yyyy-mm-dd'\n />\n </FormGroup>\n {this.state.errMsg &&\n <Alert className=\"mt-2\" color=\"danger\">\n {gettext(this.state.errMsg)}\n </Alert>\n }\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.props.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.downloadExcel}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n logType: PropTypes.string.isRequired,\n};\n\nLogsExportExcelDialog.propTypes = propTypes;\n\nexport default LogsExportExcelDialog;\n","import React, { Component, Fragment } from 'react';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport { Button } from 'reactstrap';\nimport EmptyTip from '../../../components/empty-tip';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport LogsNav from './logs-nav';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\nimport LogsExportExcelDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-logs-export-excel-dialog';\nimport ModalPortal from '../../../components/modal-portal';\n\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getLogsByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getLogsByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, perPage, currentPage, hasNextPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No login logs')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"25%\">{gettext('Name')}</th>\n <th width=\"25%\">{gettext('IP')}</th>\n <th width=\"25%\">{gettext('Status')}</th>\n <th width=\"25%\">{gettext('Time')}</th>\n </tr>\n </thead>\n {items &&\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n />);\n })}\n </tbody>\n }\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n };\n }\n\n handleMouseOver = () => {\n this.setState({\n isOpIconShown: true\n });\n }\n\n handleMouseOut = () => {\n this.setState({\n isOpIconShown: false\n });\n }\n\n render() {\n let { item } = this.props;\n return (\n <tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <td><UserLink email={item.email} name={item.name} /></td>\n <td>{item.login_ip}</td>\n <td>{item.log_success ? gettext('Success') : gettext('Failed')}</td>\n <td>{moment(item.login_time).fromNow()}</td>\n </tr>\n );\n }\n}\n\nclass LoginLogs extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n logList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n isExportExcelDialogOpen: false,\n };\n this.initPage = 1;\n }\n\n toggleExportExcelDialog = () => {\n this.setState({isExportExcelDialogOpen: !this.state.isExportExcelDialogOpen});\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getLogsByPage(this.state.currentPage);\n });\n }\n\n getLogsByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListLoginLogs(page, perPage).then((res) => {\n this.setState({\n logList: res.data.login_log_list,\n loading: false,\n currentPage: page,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.total_count),\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getLogsByPage(this.initPage));\n }\n\n render() {\n let { logList, currentPage, perPage, hasNextPage, isExportExcelDialogOpen } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <LogsNav currentItem=\"loginLogs\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={logList}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getLogsByPage={this.getLogsByPage}\n resetPerPage={this.resetPerPage}\n />\n </div>\n </div>\n </div>\n {isExportExcelDialogOpen &&\n <ModalPortal>\n <LogsExportExcelDialog\n logType={'login'}\n toggle={this.toggleExportExcelDialog}\n />\n </ModalPortal>\n }\n </Fragment>\n );\n }\n}\n\nexport default LoginLogs;\n","import React from 'react';\nimport { gettext } from '../../../utils/constants';\nimport { Dropdown, DropdownMenu, DropdownToggle, DropdownItem } from 'reactstrap';\n\nclass FilterMenu extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { \n isMenuShown: false\n }; \n }\n\n toggleMenu = () => {\n this.setState({\n isMenuShown: !this.state.isMenuShown\n }, () => {\n this.props.toggleFreezeItem(this.state.isMenuShown);\n });\n }\n\n onItemClick = () => {\n this.props.filterItems();\n this.props.toggleFreezeItem(false);\n }\n\n render() {\n const { filterBy } = this.props;\n return (\n <Dropdown isOpen={this.state.isMenuShown} toggle={this.toggleMenu}>\n <DropdownToggle\n tag=\"i\"\n className=\"sf-dropdown-toggle sf2-icon-caret-down\"\n title={gettext('More Operations')}\n data-toggle=\"dropdown\"\n aria-expanded={this.state.isMenuShown}\n />\n <DropdownMenu>\n <DropdownItem onClick={this.onItemClick}>{gettext('only show {placeholder}').replace('{placeholder}', filterBy)}</DropdownItem>\n </DropdownMenu>\n </Dropdown>\n );\n }\n}\n\nexport default FilterMenu;\n","import React from 'react';\nimport { Button } from 'reactstrap';\n\nclass ToggleFilter extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { filterBy } = this.props;\n return (\n <Button\n color='secondary'\n className=\"my-2 mr-2\"\n onClick={this.props.toggleFilter}\n > \n <span className=\"text-primary\">{filterBy}</span>\n <span className=\"ml-2 close\" style={{fontSize: '1.2rem'}}>x</span>\n </Button>\n );\n\n }\n\n}\n\nexport default ToggleFilter;\n","import React, { Component, Fragment } from 'react';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport EmptyTip from '../../../components/empty-tip';\nimport { Button } from 'reactstrap';\nimport { navigate } from '@reach/router';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport LogsExportExcelDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-logs-export-excel-dialog';\nimport ModalPortal from '../../../components/modal-portal';\nimport LogsNav from './logs-nav';\nimport FilterMenu from './file-access-item-menu';\nimport ToggleFilter from './file-access-toggle-filter';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\n\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n getPreviousPage = () => {\n this.props.getLogsByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getLogsByPage(this.props.currentPage + 1);\n }\n\n toggleFilterByUser = () => {\n this.props.filterByUser(null);\n }\n\n toggleFilterByRepo = () => {\n this.props.filterByRepo(null);\n }\n\n toggleFreezeItem = (freezed) => {\n this.setState({\n isItemFreezed: freezed\n });\n }\n\n render() {\n const {\n loading, errorMsg, items, \n userFilteredBy, repoFilteredBy,\n perPage, currentPage, hasNextPage\n } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No file access logs')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <div>\n {userFilteredBy && (\n <ToggleFilter\n filterBy={items[0].name}\n toggleFilter={this.toggleFilterByUser}\n />\n )}\n {repoFilteredBy && (\n <ToggleFilter\n filterBy={items[0].repo_name}\n toggleFilter={this.toggleFilterByRepo}\n />\n )}\n </div>\n <table>\n <thead>\n <tr>\n <th width=\"20%\">{gettext('Name')}</th>\n <th width=\"10%\">{gettext('Type')}</th>\n <th width=\"20%\">{gettext('IP')}{' / '}{gettext('Device')}</th>\n <th width=\"20%\">{gettext('Date')}</th>\n <th width=\"15%\">{gettext('Library')}</th>\n <th width=\"15%\">{gettext('File')}{' / '}{gettext('Folder')}</th>\n </tr>\n </thead>\n {items &&\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isFreezed={this.state.isItemFreezed}\n toggleFreezeItem={this.toggleFreezeItem}\n userFilteredBy={userFilteredBy}\n repoFilteredBy={repoFilteredBy}\n filterByUser={this.props.filterByUser}\n filterByRepo={this.props.filterByRepo}\n />);\n })}\n </tbody>\n }\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isHighlighted: false,\n isOpIconShown: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isFreezed) {\n this.setState({\n isHighlighted: true,\n isOpIconShown: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isFreezed) {\n this.setState({\n isHighlighted: false,\n isOpIconShown: false\n });\n }\n }\n\n filterByUser = () => {\n const { item } = this.props;\n this.props.filterByUser(item.email);\n }\n\n filterByRepo = () => {\n const { item } = this.props;\n this.props.filterByRepo(item.repo_id);\n }\n\n toggleFreezeItem = (freezed) => {\n this.props.toggleFreezeItem(freezed);\n if (!freezed) {\n this.setState({\n isHighlighted: false,\n isOpIconShown: false\n });\n }\n }\n\n render() {\n const { isHighlighted, isOpIconShown } = this.state;\n const { item, userFilteredBy, repoFilteredBy } = this.props;\n return (\n <tr className={isHighlighted ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td>\n <UserLink email={item.email} name={item.name} />\n {isOpIconShown && !userFilteredBy && (\n <FilterMenu\n filterBy={item.name}\n filterItems={this.filterByUser}\n toggleFreezeItem={this.toggleFreezeItem}\n />\n )}\n </td>\n <td>{item.event_type}</td>\n <td>{item.ip}{' / '}{item.device || '--'}</td>\n <td>{moment(item.time).fromNow()}</td>\n <td>\n {item.repo_name ? item.repo_name : gettext('Deleted')}\n {isOpIconShown && item.repo_name && !repoFilteredBy && (\n <FilterMenu\n filterBy={item.repo_name}\n filterItems={this.filterByRepo}\n toggleFreezeItem={this.toggleFreezeItem}\n />\n )}\n </td>\n <td>{item.file_or_dir_name}</td>\n </tr>\n );\n }\n}\n\nclass FileAccessLogs extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n logList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n isExportExcelDialogOpen: false,\n };\n this.initPage = 1;\n }\n\n toggleExportExcelDialog = () => {\n this.setState({isExportExcelDialogOpen: !this.state.isExportExcelDialogOpen});\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage),\n userFilteredBy: urlParams.get('email'),\n repoFilteredBy: urlParams.get('repo_id')\n }, () => {\n this.getLogsByPage(this.state.currentPage);\n });\n }\n\n getLogsByPage = (page) => {\n const { perPage, userFilteredBy, repoFilteredBy } = this.state;\n seafileAPI.sysAdminListFileAccessLogs(page, perPage, userFilteredBy, repoFilteredBy).then((res) => {\n this.setState({\n logList: res.data.file_access_log_list,\n loading: false,\n currentPage: page,\n hasNextPage: res.data.has_next_page,\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getLogsByPage(this.initPage));\n }\n\n updateURL = (obj) => {\n let url = new URL(location.href);\n let searchParams = new URLSearchParams(url.search);\n for (let key in obj) {\n obj[key] == null ? \n searchParams.delete(key) :\n searchParams.set(key, obj[key]);\n }\n url.search = searchParams.toString();\n navigate(url.toString());\n }\n\n filterByUser = (email) => {\n this.setState({\n userFilteredBy: email \n }, () => {\n this.getLogsByPage(this.initPage);\n this.updateURL({'email': email});\n });\n }\n\n filterByRepo = (repoID) => {\n this.setState({\n repoFilteredBy: repoID \n }, () => {\n this.getLogsByPage(this.initPage);\n this.updateURL({'repo_id': repoID});\n });\n } \n\n render() {\n const {\n logList,\n userFilteredBy, repoFilteredBy, \n currentPage, perPage, hasNextPage,\n isExportExcelDialogOpen\n } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <LogsNav currentItem=\"fileAccessLogs\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={logList}\n userFilteredBy={userFilteredBy}\n repoFilteredBy={repoFilteredBy}\n filterByUser={this.filterByUser}\n filterByRepo={this.filterByRepo}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getLogsByPage={this.getLogsByPage}\n resetPerPage={this.resetPerPage}\n />\n </div>\n </div>\n </div>\n {isExportExcelDialogOpen &&\n <ModalPortal>\n <LogsExportExcelDialog\n logType={'fileAccess'}\n toggle={this.toggleExportExcelDialog}\n />\n </ModalPortal>\n }\n </Fragment>\n );\n }\n}\n\nexport default FileAccessLogs;\n","import React, { Component, Fragment } from 'react';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport EmptyTip from '../../../components/empty-tip';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport LogsNav from './logs-nav';\nimport { Button } from 'reactstrap';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\nimport ModalPortal from '../../../components/modal-portal';\nimport CommitDetails from '../../../components/dialog/commit-details';\nimport LogsExportExcelDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-logs-export-excel-dialog';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getLogsByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getLogsByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, perPage, currentPage, hasNextPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No file update logs')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"25%\">{gettext('Name')}</th>\n <th width=\"25%\">{gettext('Date')}</th>\n <th width=\"25%\">{gettext('Library')}</th>\n <th width=\"25%\">{gettext('Action')}</th>\n </tr>\n </thead>\n {items &&\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n />);\n })}\n </tbody>\n }\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n isCommitDetailsDialogOpen: false,\n };\n }\n\n handleMouseOver = () => {\n this.setState({\n isOpIconShown: true\n });\n }\n\n handleMouseOut = () => {\n this.setState({\n isOpIconShown: false\n });\n }\n\n\n toggleCommitDetailsDialog = () => {\n this.setState({\n isCommitDetailsDialogOpen: !this.state.isCommitDetailsDialogOpen\n });\n }\n\n showCommitDetails = (e) => {\n e.preventDefault();\n this.setState({\n isCommitDetailsDialogOpen: !this.state.isCommitDetailsDialogOpen\n });\n }\n\n render() {\n let { item } = this.props;\n return (\n <Fragment>\n <tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <td><UserLink email={item.email} name={item.name} /></td>\n <td>{moment(item.time).fromNow()}</td>\n <td>{item.repo_name ? item.repo_name : gettext('Deleted')}</td>\n <td>\n {item.file_operation}\n {item.repo_name && !item.repo_encrypted &&\n <a className=\"ml-1\" href=\"#\" onClick={this.showCommitDetails}>{gettext('Details')}</a>\n }\n </td>\n </tr>\n {this.state.isCommitDetailsDialogOpen &&\n <ModalPortal>\n <CommitDetails\n repoID={item.repo_id}\n commitID={item.commit_id}\n commitTime={item.time}\n toggleDialog={this.toggleCommitDetailsDialog}\n />\n </ModalPortal>\n }\n </Fragment>\n );\n }\n}\n\nclass FileUpdateLogs extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n logList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n isExportExcelDialogOpen: false,\n };\n this.initPage = 1;\n }\n\n toggleExportExcelDialog = () => {\n this.setState({isExportExcelDialogOpen: !this.state.isExportExcelDialogOpen});\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getLogsByPage(this.state.currentPage);\n });\n }\n\n getLogsByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListFileUpdateLogs(page, perPage).then((res) => {\n this.setState({\n logList: res.data.file_update_log_list,\n loading: false,\n currentPage: page,\n hasNextPage: res.data.has_next_page,\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getLogsByPage(this.initPage));\n }\n\n render() {\n let { logList, currentPage, perPage, hasNextPage, isExportExcelDialogOpen } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <LogsNav currentItem=\"fileUpdateLogs\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={logList}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getLogsByPage={this.getLogsByPage}\n resetPerPage={this.resetPerPage}\n />\n </div>\n </div>\n </div>\n {isExportExcelDialogOpen &&\n <ModalPortal>\n <LogsExportExcelDialog\n logType={'fileUpdate'}\n toggle={this.toggleExportExcelDialog}\n />\n </ModalPortal>\n }\n </Fragment>\n );\n }\n}\n\nexport default FileUpdateLogs;\n","import React, { Component, Fragment } from 'react';\nimport { Link } from '@reach/router';\nimport moment from 'moment';\nimport { Button } from 'reactstrap';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport LogsExportExcelDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-logs-export-excel-dialog';\nimport ModalPortal from '../../../components/modal-portal';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\nimport LogsNav from './logs-nav';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getLogsByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getLogsByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, perPage, currentPage, hasNextPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No permission logs')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"15%\">{gettext('Share From')}</th>\n <th width=\"15%\">{gettext('Share To')}</th>\n <th width=\"10%\">{gettext('Actions')}</th>\n <th width=\"13%\">{gettext('Permission')}</th>\n <th width=\"20%\">{gettext('Library')}</th>\n <th width=\"12%\">{gettext('Folder')}</th>\n <th width=\"15%\">{gettext('Date')}</th>\n </tr>\n </thead>\n {items &&\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n />);\n })}\n </tbody>\n }\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n };\n }\n\n handleMouseOver = () => {\n this.setState({\n isOpIconShown: true\n });\n }\n\n handleMouseOut = () => {\n this.setState({\n isOpIconShown: false\n });\n }\n\n getActionTextByEType = (etype) => {\n if (etype.indexOf('add') != -1) {\n return gettext('Add');\n } else if (etype.indexOf('modify') != -1) {\n return gettext('Modify');\n } else if (etype.indexOf('delete') != -1) {\n return gettext('Delete');\n } else {\n return '';\n }\n }\n\n getShareTo = (item) => {\n switch(item.share_type) {\n case 'user':\n return <UserLink email={item.to_user_email} name={item.to_user_name} />;\n case 'group':\n return <Link to={`${siteRoot}sys/groups/${item.to_group_id}/libraries/`}>{item.to_group_name}</Link>;\n case 'department':\n return <Link to={`${siteRoot}sys/departments/${item.to_group_id}/`}>{item.to_group_name}</Link>;\n case 'all':\n return <Link to={`${siteRoot}org/`}>{gettext('All')}</Link>;\n default:\n return gettext('Deleted');\n }\n }\n\n render() {\n let { item } = this.props;\n return (\n <tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <td><UserLink email={item.from_user_email} name={item.from_user_name} /></td>\n <td>{this.getShareTo(item)}</td>\n <td>{this.getActionTextByEType(item.etype)}</td>\n <td>{Utils.sharePerms(item.permission)}</td>\n <td>{item.repo_name ? item.repo_name : gettext('Deleted')}</td>\n <td>{item.folder}</td>\n <td>{moment(item.date).fromNow()}</td>\n </tr>\n );\n }\n}\n\nclass SharePermissionLogs extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n logList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n isExportExcelDialogOpen: false,\n };\n this.initPage = 1;\n }\n\n toggleExportExcelDialog = () => {\n this.setState({isExportExcelDialogOpen: !this.state.isExportExcelDialogOpen});\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getLogsByPage(this.state.currentPage);\n });\n }\n\n getLogsByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListSharePermissionLogs(page, perPage).then((res) => {\n this.setState({\n logList: res.data.share_permission_log_list,\n loading: false,\n currentPage: page,\n hasNextPage: res.data.has_next_page,\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getLogsByPage(this.initPage));\n }\n\n render() {\n let { logList, currentPage, perPage, hasNextPage, isExportExcelDialogOpen } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <LogsNav currentItem=\"sharePermissionLogs\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={logList}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getLogsByPage={this.getLogsByPage}\n resetPerPage={this.resetPerPage}\n />\n </div>\n </div>\n </div>\n {isExportExcelDialogOpen &&\n <ModalPortal>\n <LogsExportExcelDialog\n logType={'sharePermission'}\n toggle={this.toggleExportExcelDialog}\n />\n </ModalPortal>\n }\n </Fragment>\n );\n }\n}\n\nexport default SharePermissionLogs;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n headingText: PropTypes.string.isRequired,\n children: PropTypes.object.isRequired\n};\n\nclass Section extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { headingText, children} = this.props;\n return (\n <div className=\"mb-4\">\n <h4 className=\"border-bottom font-weight-normal mb-2 pb-1\">{headingText}</h4>\n {children}\n </div>\n );\n }\n}\n\nSection.propTypes = propTypes;\n\nexport default Section;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Row, Col, Label } from 'reactstrap';\n\nconst propTypes = {\n displayName: PropTypes.string.isRequired,\n helpTip: PropTypes.string,\n mainContent: PropTypes.object.isRequired,\n extraContent: PropTypes.object\n};\n\nclass SettingItemBase extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { helpTip, displayName, mainContent, extraContent } = this.props;\n return (\n <Fragment>\n <Row className=\"my-4\">\n <Col md=\"3\">\n <Label className=\"web-setting-label\">{displayName}</Label>\n </Col>\n <Col md=\"5\">\n {mainContent}\n {helpTip && <p className=\"small text-secondary mt-1\">{helpTip}</p>}\n </Col>\n <Col md=\"4\">\n {extraContent}\n </Col>\n </Row>\n </Fragment>\n );\n }\n}\n\nSettingItemBase.propTypes = propTypes;\n\nexport default SettingItemBase;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Input, Button } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport SettingItemBase from './setting-item-base';\n\nconst propTypes = {\n inputType: PropTypes.string,\n saveSetting: PropTypes.func.isRequired,\n keyText: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string,PropTypes.number]),\n helpTip: PropTypes.string.isRequired,\n displayName: PropTypes.string.isRequired\n};\n\nclass WebSettingInput extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isBtnsShown: false,\n value: this.props.value\n };\n }\n\n toggleBtns = () => {\n this.setState({isBtnsShown: !this.state.isBtnsShown});\n }\n\n hideBtns = (e) => {\n if (!this.state.isBtnsShown) {\n return;\n }\n if (this.props.value != this.state.value) {\n this.setState({value: this.props.value});\n }\n this.toggleBtns();\n }\n\n onInputChange = (e) => {\n this.setState({ value: e.target.value });\n }\n\n onSubmit = (e) => {\n const value = this.state.value.trim();\n if (value != this.props.value) {\n this.props.saveSetting(this.props.keyText, value);\n }\n this.toggleBtns();\n }\n\n render() {\n const { isBtnsShown, value } = this.state;\n const { helpTip, displayName, inputType } = this.props;\n return (\n <SettingItemBase\n displayName={displayName}\n helpTip={helpTip}\n mainContent={\n <Input type={inputType || 'text'} className={inputType == 'textarea' ? 'web-setting-textarea' : ''} onChange={this.onInputChange} onFocus={this.toggleBtns} onBlur={this.hideBtns} value={value} />\n }\n extraContent={\n isBtnsShown ?\n <Fragment>\n <Button className=\"sf2-icon-tick web-setting-icon-btn web-setting-icon-btn-submit\" onMouseDown={this.onSubmit} title={gettext('Submit')}></Button>\n <Button className=\"ml-1 sf2-icon-x2 web-setting-icon-btn web-setting-icon-btn-cancel\" title={gettext('Cancel')}></Button>\n </Fragment> : null\n }\n />\n );\n }\n}\n\nWebSettingInput.propTypes = propTypes;\n\nexport default WebSettingInput;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport SettingItemBase from './setting-item-base';\n\nconst propTypes = {\n postFile: PropTypes.func.isRequired,\n keyText: PropTypes.string.isRequired,\n filePath: PropTypes.string.isRequired,\n helpTip: PropTypes.string.isRequired,\n fileWidth: PropTypes.number.isRequired,\n fileHeight: PropTypes.number.isRequired,\n displayName: PropTypes.string.isRequired\n};\n\nclass WebSettingFile extends Component {\n\n constructor(props) {\n super(props);\n this.fileInput = React.createRef();\n }\n\n uploadFile = () => {\n if (!this.fileInput.current.files.length) {\n return;\n }\n const file = this.fileInput.current.files[0];\n this.props.postFile(file, this.props.keyText);\n }\n\n openFileInput = () => {\n this.fileInput.current.click();\n }\n\n render() {\n const { helpTip, filePath, fileWidth, fileHeight, displayName } = this.props;\n return (\n <SettingItemBase\n displayName={displayName}\n helpTip={helpTip}\n mainContent={\n <img src={filePath + '?t=' + new Date().getTime()} alt={displayName} width={fileWidth} height={fileHeight} className=\"mb-1\" />\n }\n extraContent={\n <Fragment>\n <Button color=\"secondary\" onClick={this.openFileInput}>{gettext('Change')}</Button>\n <input className=\"d-none\" type=\"file\" onChange={this.uploadFile} ref={this.fileInput} />\n </Fragment>\n }\n />\n );\n }\n}\n\nWebSettingFile.propTypes = propTypes;\n\nexport default WebSettingFile;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Input } from 'reactstrap';\nimport SettingItemBase from './setting-item-base';\n\nconst propTypes = {\n saveSetting: PropTypes.func.isRequired,\n keyText: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),\n helpTip: PropTypes.string.isRequired,\n displayName: PropTypes.string.isRequired\n};\n\nclass WebSettingCheckbox extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n inputChecked: this.props.value\n };\n }\n\n onInputChange = (e) => {\n const checked = e.target.checked;\n const valueToNum = checked ? 1 : 0;\n this.setState({\n inputChecked: checked\n });\n this.props.saveSetting(this.props.keyText, valueToNum);\n }\n\n render() {\n const { inputChecked } = this.state;\n const { helpTip, displayName } = this.props;\n return (\n <SettingItemBase\n displayName={displayName}\n mainContent={\n <Fragment>\n <Input className=\"ml-0\" checked={inputChecked} type='checkbox' onChange={this.onInputChange} />\n <p className=\"ml-4\">{helpTip}</p>\n </Fragment>\n }\n />\n );\n }\n}\n\nWebSettingCheckbox.propTypes = propTypes;\n\nexport default WebSettingCheckbox;\n","import React, { Component, Fragment } from 'react';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, isPro, mediaUrl, logoPath, faviconPath, loginBGPath } from '../../../utils/constants';\nimport Loading from '../../../components/loading';\nimport toaster from '../../../components/toast';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Section from './section';\nimport InputItem from './input-item';\nimport FileItem from './file-item';\nimport CheckboxItem from './checkbox-item';\n\nimport '../../../css/system-admin-web-settings.css';\n\nclass WebSettings extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n config_dict: null,\n logoPath: mediaUrl + logoPath,\n faviconPath: mediaUrl + faviconPath,\n loginBGPath: mediaUrl + loginBGPath\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminGetSysSettingInfo().then((res) => {\n this.setState({\n loading: false,\n config_dict: res.data\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n saveSetting = (key, value) => {\n seafileAPI.sysAdminSetSysSettingInfo(key, value).then((res) => {\n this.setState({\n config_dict: res.data\n });\n toaster.success(gettext('Success'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n postFile = (file, fileType) => {\n let postFile;\n if (fileType == 'Logo') {\n postFile = seafileAPI.sysAdminUpdateLogo(file);\n } else if (fileType == 'Favicon') {\n postFile = seafileAPI.sysAdminUpdateFavicon(file);\n } else if (fileType == 'loginBGImage') {\n postFile = seafileAPI.sysAdminUpdateLoginBG(file);\n }\n postFile.then((res) => {\n if (fileType == 'Logo') {\n this.setState({\n logoPath: res.data.logo_path\n });\n } else if (fileType == 'Favicon') {\n this.setState({\n faviconPath: res.data.favicon_path\n });\n } else if (fileType == 'loginBGImage') {\n this.setState({\n loginBGPath: res.data.login_bg_image_path\n });\n }\n toaster.success(gettext('Success'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n const { loading, errorMsg, config_dict, logoPath, faviconPath, loginBGPath } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Settings')}</h3>\n </div>\n <div className=\"cur-view-content container mw-100\">\n {loading && <Loading />}\n {errorMsg && <p className=\"error text-center mt-4\">{errorMsg}</p>}\n {(!loading && !errorMsg) && config_dict &&\n <Fragment>\n <p className=\"small text-secondary my-4\">{gettext('Note: Settings via web interface are saved in database table (seahub-db/constance_config). They have a higher priority over the settings in config files.')}</p>\n\n <Section headingText='URL'>\n <Fragment>\n <InputItem\n saveSetting={this.saveSetting}\n displayName='SERVICE_URL'\n keyText='SERVICE_URL'\n value={config_dict['SERVICE_URL']}\n helpTip={gettext('The URL of the server, like https://seafile.example.com or http://192.168.1.2:8000')}\n />\n <InputItem\n saveSetting={this.saveSetting}\n displayName='FILE_SERVER_ROOT'\n keyText='FILE_SERVER_ROOT'\n value={config_dict['FILE_SERVER_ROOT']}\n helpTip={gettext('The internal URL for downloading/uploading files. Users will not be able to download/upload files if this is not set correctly. If you config Seafile behind Nginx/Apache, it should be SERVICE_URL/seafhttp, like https://seafile.example.com/seafhttp .')}\n />\n </Fragment>\n </Section>\n\n <Section headingText={gettext('Branding')}>\n <Fragment>\n <InputItem\n saveSetting={this.saveSetting}\n displayName='SITE_TITLE'\n keyText='SITE_TITLE'\n value={config_dict['SITE_TITLE']}\n helpTip={gettext('Site title shown in a browser tab')}\n />\n <InputItem\n saveSetting={this.saveSetting}\n displayName='SITE_NAME'\n keyText='SITE_NAME'\n value={config_dict['SITE_NAME']}\n helpTip={gettext('Site name used in email sending')}\n />\n <FileItem\n postFile={this.postFile}\n displayName='Logo'\n keyText='Logo'\n filePath={logoPath}\n fileWidth={256}\n fileHeight={64}\n helpTip='logo.png, 256px * 64px'\n />\n <FileItem\n postFile={this.postFile}\n displayName='Favicon'\n keyText='Favicon'\n filePath={faviconPath}\n fileWidth={32}\n fileHeight={32}\n helpTip='favicon.ico, 32px * 32px'\n />\n <FileItem\n postFile={this.postFile}\n displayName={gettext('Login Background Image')}\n keyText='loginBGImage'\n filePath={loginBGPath}\n fileWidth={240}\n fileHeight={160}\n helpTip='login-bg.jpg, 2400px * 1600px'\n />\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='ENABLE_BRANDING_CSS'\n keyText='ENABLE_BRANDING_CSS'\n value={config_dict['ENABLE_BRANDING_CSS']}\n helpTip={gettext('Use custom CSS')}\n />\n <InputItem\n inputType=\"textarea\"\n saveSetting={this.saveSetting}\n displayName={gettext('Custom CSS')}\n keyText='CUSTOM_CSS'\n value={config_dict['CUSTOM_CSS']}\n helpTip=''\n />\n </Fragment>\n </Section>\n\n <Section headingText={gettext('User')}>\n <Fragment>\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName={gettext('allow new registrations')}\n keyText='ENABLE_SIGNUP'\n value={config_dict['ENABLE_SIGNUP']}\n helpTip={gettext('Allow new user registrations. Uncheck this to prevent anyone from creating a new account.')}\n />\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName={gettext('activate after registration')}\n keyText='ACTIVATE_AFTER_REGISTRATION'\n value={config_dict['ACTIVATE_AFTER_REGISTRATION']}\n helpTip={gettext('Activate user immediately after registration. If unchecked, a user need to be activated by administrator or via activation email')}\n />\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName={gettext('send activation email')}\n keyText='REGISTRATION_SEND_MAIL'\n value={config_dict['REGISTRATION_SEND_MAIL']}\n helpTip={gettext('Send activation Email after user registration.')}\n />\n <InputItem\n saveSetting={this.saveSetting}\n displayName={gettext('keep sign in')}\n keyText='LOGIN_REMEMBER_DAYS'\n value={config_dict['LOGIN_REMEMBER_DAYS']}\n helpTip={gettext('Number of days that keep user sign in.')}\n />\n <InputItem\n saveSetting={this.saveSetting}\n displayName='LOGIN_ATTEMPT_LIMIT'\n keyText='LOGIN_ATTEMPT_LIMIT'\n value={config_dict['LOGIN_ATTEMPT_LIMIT']}\n helpTip={gettext('The maximum number of failed login attempts before showing CAPTCHA.')}\n />\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='FREEZE_USER_ON_LOGIN_FAILED'\n keyText='FREEZE_USER_ON_LOGIN_FAILED'\n value={config_dict['FREEZE_USER_ON_LOGIN_FAILED']}\n helpTip={gettext('Freeze user account when failed login attempts exceed limit.')}\n />\n </Fragment>\n </Section>\n\n <Section headingText={gettext('Groups')}>\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='ENABLE_SHARE_TO_ALL_GROUPS'\n keyText='ENABLE_SHARE_TO_ALL_GROUPS'\n value={config_dict['ENABLE_SHARE_TO_ALL_GROUPS']}\n helpTip={gettext('Enable users to share libraries to any groups in the system.')}\n />\n </Section>\n\n <Section headingText={gettext('Password')}>\n <Fragment>\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='strong password'\n keyText='USER_STRONG_PASSWORD_REQUIRED'\n value={config_dict['USER_STRONG_PASSWORD_REQUIRED']}\n helpTip={gettext('Force user to use a strong password when sign up or change password.')}\n />\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='force password change'\n keyText='FORCE_PASSWORD_CHANGE'\n value={config_dict['FORCE_PASSWORD_CHANGE']}\n helpTip={gettext('Force user to change password when account is newly added or reset by admin')}\n />\n <InputItem\n saveSetting={this.saveSetting}\n displayName={gettext('password minimum length')}\n keyText='USER_PASSWORD_MIN_LENGTH'\n value={config_dict['USER_PASSWORD_MIN_LENGTH']}\n helpTip={gettext('The least number of characters an account password should include.')}\n />\n <InputItem\n saveSetting={this.saveSetting}\n displayName={gettext('password strength level')}\n keyText='USER_PASSWORD_STRENGTH_LEVEL'\n value={config_dict['USER_PASSWORD_STRENGTH_LEVEL']}\n helpTip={gettext('The level(1-4) of an account password\\'s strength. For example, \\'3\\' means password must have at least 3 of the following: num, upper letter, lower letter and other symbols')}\n />\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='enable two factor authentication'\n keyText='ENABLE_TWO_FACTOR_AUTH'\n value={config_dict['ENABLE_TWO_FACTOR_AUTH']}\n helpTip={gettext('Enable two factor authentication')}\n />\n </Fragment>\n </Section>\n\n <Section headingText={gettext('Library')}>\n <Fragment>\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='library history'\n keyText='ENABLE_REPO_HISTORY_SETTING'\n value={config_dict['ENABLE_REPO_HISTORY_SETTING']}\n helpTip={gettext('Allow user to change library history settings')}\n />\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='encrypted library'\n keyText='ENABLE_ENCRYPTED_LIBRARY'\n value={config_dict['ENABLE_ENCRYPTED_LIBRARY']}\n helpTip={gettext('Allow user to create encrypted libraries')}\n />\n <InputItem\n saveSetting={this.saveSetting}\n displayName={gettext('library password minimum length')}\n keyText='REPO_PASSWORD_MIN_LENGTH'\n value={config_dict['REPO_PASSWORD_MIN_LENGTH']}\n helpTip={gettext('The least number of characters an encrypted library password should include.')}\n />\n <InputItem\n saveSetting={this.saveSetting}\n displayName={gettext('download/upload link password minimum length')}\n keyText='SHARE_LINK_PASSWORD_MIN_LENGTH'\n value={config_dict['SHARE_LINK_PASSWORD_MIN_LENGTH']}\n helpTip={gettext('The least number of characters a download/upload link password should include.')}\n />\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='ENABLE_USER_CREATE_ORG_REPO'\n keyText='ENABLE_USER_CREATE_ORG_REPO'\n value={config_dict['ENABLE_USER_CREATE_ORG_REPO']}\n helpTip={gettext('Allow user to add organization libraries. Otherwise, only system admin can add organization libraries.')}\n />\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='ENABLE_USER_CLEAN_TRASH'\n keyText='ENABLE_USER_CLEAN_TRASH'\n value={config_dict['ENABLE_USER_CLEAN_TRASH']}\n helpTip={gettext('Allow user to clean library trash')}\n />\n </Fragment>\n </Section>\n\n <Section headingText={gettext('Online Preview')}>\n <InputItem\n inputType=\"textarea\"\n saveSetting={this.saveSetting}\n displayName={gettext('text file extensions')}\n keyText='TEXT_PREVIEW_EXT'\n value={config_dict['TEXT_PREVIEW_EXT']}\n helpTip={gettext('Extensions of text files that can be online previewed, each suffix is separated by a comma.')}\n />\n </Section>\n\n <Section headingText={gettext('Sync')}>\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='DISABLE_SYNC_WITH_ANY_FOLDER'\n keyText='DISABLE_SYNC_WITH_ANY_FOLDER'\n value={config_dict['DISABLE_SYNC_WITH_ANY_FOLDER']}\n helpTip={gettext('If turn on, the desktop clients will not be able to sync a folder outside the default Seafile folder.')}\n />\n </Section>\n\n {isPro && <Section headingText={gettext('Terms')}>\n <CheckboxItem\n saveSetting={this.saveSetting}\n displayName='ENABLE_TERMS_AND_CONDITIONS'\n keyText='ENABLE_TERMS_AND_CONDITIONS'\n value={config_dict['ENABLE_TERMS_AND_CONDITIONS']}\n helpTip={gettext('Enable system admin to add Terms and Conditions, and all users will have to accept the terms.')}\n />\n </Section>}\n </Fragment>\n }\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default WebSettings;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Input } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\n\nconst propTypes = {\n toggle: PropTypes.func.isRequired,\n addNotification: PropTypes.func.isRequired\n};\n\nclass SysAdminAddSysNotificationDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n value: '',\n isSubmitBtnActive: false\n };\n }\n\n handleChange = (e) => {\n const value = e.target.value;\n this.setState({\n value: value,\n isSubmitBtnActive: value.trim() != ''\n });\n }\n\n handleSubmit = () => {\n this.toggle();\n this.props.addNotification(this.state.value.trim());\n }\n\n toggle = () => {\n this.props.toggle();\n }\n\n render() {\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>{gettext('Add new notification')}</ModalHeader>\n <ModalBody>\n <Form>\n <FormGroup>\n <Input\n type=\"textarea\"\n value={this.state.value}\n onChange={this.handleChange}\n />\n </FormGroup>\n </Form>\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{gettext('Cancel')}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit} disabled={!this.state.isSubmitBtnActive}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nSysAdminAddSysNotificationDialog.propTypes = propTypes;\n\nexport default SysAdminAddSysNotificationDialog;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport SysAdminAddSysNotificationDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-sys-notification-dialog';\nimport MainPanelTopbar from '../main-panel-topbar';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No notifications')}</h2>\n </EmptyTip>\n );\n const table = (\n <table>\n <thead>\n <tr>\n <th width=\"95%\">{gettext('Notification Detail')}</th>\n <th width=\"5%\">{/*Operations*/}</th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n deleteNotification={this.props.deleteNotification}\n setToCurrent={this.props.setToCurrent}\n />);\n })}\n </tbody>\n </table>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false,\n isDeleteDialogOpen: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n toggleDeleteDialog = (e) => {\n if (e) {\n e.preventDefault();\n }\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n deleteNotification = () => {\n this.props.deleteNotification(this.props.item.id);\n this.toggleDeleteDialog();\n }\n\n setToCurrent = () => {\n this.props.setToCurrent(this.props.item.id);\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Set to current':\n this.setToCurrent();\n break;\n case 'Delete':\n this.toggleDeleteDialog();\n break;\n }\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch (item) {\n case 'Set to current':\n translateResult = gettext('Set to current');\n break;\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n default:\n break;\n }\n return translateResult;\n }\n\n getOperations = () => {\n const { item } = this.props;\n let operations = [];\n if (!item.is_current) {\n operations.push('Set to current');\n }\n operations.push('Delete');\n return operations;\n }\n\n render() {\n const { item } = this.props;\n const { isOpIconShown, isDeleteDialogOpen } = this.state;\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td>\n {item.msg}\n {item.is_current &&\n <span className=\"small text-orange\">{gettext('(current notification)')}</span>\n }\n </td>\n <td>\n {isOpIconShown &&\n <OpMenu\n operations={this.getOperations()}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <CommonOperationConfirmationDialog\n title={gettext('Delete Notification')}\n message={gettext('Are you sure you want to delete the notification ?')}\n toggleDialog={this.toggleDeleteDialog}\n executeOperation={this.deleteNotification}\n confirmBtnText={gettext('Delete')}\n />\n }\n </Fragment>\n );\n }\n}\n\nclass Notifications extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n notificationList: [],\n isAddNotificationDialogOpen: false\n };\n }\n\n componentDidMount () {\n seafileAPI.sysAdminListAllSysNotifications().then((res) => {\n this.setState({\n loading: false,\n notificationList: res.data.notifications\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n toggleAddNotificationDialog = () => {\n this.setState({isAddNotificationDialogOpen: !this.state.isAddNotificationDialogOpen});\n }\n\n addNotification = (msg) => {\n seafileAPI.sysAdminAddSysNotification(msg).then(res => {\n let notificationList = this.state.notificationList;\n notificationList.unshift(res.data.notification);\n this.setState({notificationList: notificationList});\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteNotification = (id) => {\n seafileAPI.sysAdminDeleteSysNotification(id).then(res => {\n let notificationList = this.state.notificationList.filter(item => {\n return item.id != id;\n });\n this.setState({notificationList: notificationList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n setToCurrent = (id) => {\n seafileAPI.sysAdminSetSysNotificationToCurrent(id).then(res => {\n let notificationList = this.state.notificationList.map(item => {\n if (item.id == id) {\n item.is_current = true;\n } else {\n item.is_current = false;\n }\n return item;\n });\n this.setState({notificationList: notificationList});\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n const { isAddNotificationDialogOpen } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleAddNotificationDialog}>{gettext('Add new notification')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('All Notifications')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.notificationList}\n deleteNotification={this.deleteNotification}\n setToCurrent={this.setToCurrent}\n />\n </div>\n </div>\n </div>\n {isAddNotificationDialogOpen &&\n <SysAdminAddSysNotificationDialog\n addNotification={this.addNotification}\n toggle={this.toggleAddNotificationDialog}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default Notifications;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { seafileAPI } from '../../utils/seafile-api';\nimport { gettext } from '../../utils/constants';\nimport { Utils } from '../../utils/utils';\nimport Account from '../../components/common/account';\n\n\nconst tablePropTypes = {\n loading: PropTypes.bool.isRequired,\n errorMsg: PropTypes.string.isRequired,\n records: PropTypes.array.isRequired,\n};\n\nclass Table extends Component {\n\n render() {\n let { loading, errorMsg, records } = this.props;\n\n if (loading) {\n return <span className=\"loading-icon loading-tip\"></span>;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n return (\n <table width=\"100%\" className=\"table table-hover table-vcenter\">\n <thead>\n <tr>\n <th width=\"16%\">{gettext('Library')}</th>\n <th width=\"30%\">ID</th>\n <th width=\"30%\">{gettext('Path')}</th>\n <th width=\"12%\">{gettext('Label')}</th>\n <th width=\"12%\">{gettext('Suggestion')}</th>\n </tr>\n </thead>\n <tbody>\n {records.map((record, index) => {\n return (\n <Item key={index} record={record} />\n );\n })}\n </tbody>\n </table>\n );\n }\n }\n}\n\nTable.propTypes = tablePropTypes;\n\n\nconst itemPropTypes = {\n record: PropTypes.object.isRequired,\n};\n\nclass Item extends Component {\n constructor(props) {\n super(props);\n this.state = {};\n }\n\n render() {\n let record = this.props.record;\n\n return (\n <tr>\n <td>{record.repo_name}</td>\n <td>{record.repo_id}</td>\n <td>{record.path}</td>\n <td>{record.detail.label}</td>\n <td>{record.detail.suggestion}</td>\n </tr>\n );\n }\n}\n\nItem.propTypes = itemPropTypes;\n\n\nclass FileScanRecords extends Component {\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n records: [],\n };\n }\n\n componentDidMount() {\n seafileAPI.listFileScanRecords().then((res) => {\n this.setState({\n loading: false,\n records: res.data.record_list,\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n render() {\n return (\n <React.Fragment>\n <div className=\"main-panel-north border-left-show\">\n <div className=\"cur-view-toolbar\">\n <span className=\"sf2-icon-menu side-nav-toggle hidden-md-up d-md-none\" title=\"Side Nav Menu\"></span>\n </div>\n <div className=\"common-toolbar\">\n <Account isAdminPanel={true} />\n </div>\n </div>\n <div className=\"main-panel-center\">\n <div className=\"cur-view-container\" id=\"content-scan-records\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Content Scan Records')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <Table\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n records={this.state.records}\n />\n </div>\n </div>\n </div>\n </React.Fragment>\n );\n }\n}\n\nexport default FileScanRecords;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Table } from 'reactstrap';\nimport { siteRoot } from '../../../utils/constants';\nimport Loading from '../../../components/loading';\n\nconst WorkWeixinDepartmentMembersListPropTypes = {\n isMembersListLoading: PropTypes.bool.isRequired,\n membersList: PropTypes.array.isRequired,\n newUsersTempObj: PropTypes.object.isRequired,\n checkedDepartmentId: PropTypes.number.isRequired,\n onUserChecked: PropTypes.func.isRequired,\n onAllUsersChecked: PropTypes.func.isRequired,\n isCheckedAll: PropTypes.bool.isRequired,\n canCheckUserIds: PropTypes.array.isRequired,\n};\n\nclass WorkWeixinDepartmentMembersList extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { newUsersTempObj, checkedDepartmentId, isMembersListLoading, canCheckUserIds } = this.props;\n const membersList = this.props.membersList.map((member, index) => {\n let avatar = member.avatar;\n if (member.avatar.length > 0) {\n avatar = member.avatar.substring(0, member.avatar.length - 1) + '100';// get smaller avatar\n } else {\n avatar = siteRoot + 'media/avatars/default.png';\n }\n return (\n <tr key={checkedDepartmentId.toString() + member.userid}>\n <td>\n {!member.email &&\n <input type=\"checkbox\" className=\"vam\" onChange={() => this.props.onUserChecked(member)}\n checked={(member.userid in newUsersTempObj) ? 'checked' : ''}></input>}\n </td>\n <td><img className=\"avatar\" src={avatar} alt=\"\"></img></td>\n <td>{member.name}</td>\n <td>{member.mobile}</td>\n <td>{member.contact_email}</td>\n <td>{member.email && <i className=\"sf2-icon-tick\"></i>}</td>\n </tr>\n );\n });\n\n return (\n <div className=\"dir-content-main\">\n {isMembersListLoading && <Loading/>}\n {!isMembersListLoading && this.props.membersList.length > 0 &&\n <Table hover>\n <thead>\n <tr>\n <th width=\"5%\">\n {canCheckUserIds.length > 0 &&\n <input type=\"checkbox\" className=\"vam\" checked={this.props.isCheckedAll}\n onChange={() => this.props.onAllUsersChecked()}></input>}\n </th>\n <th width=\"10%\"></th>\n <th width=\"20%\">{'名称'}</th>\n <th width=\"20%\">{'手机号'}</th>\n <th width=\"30%\">{'邮箱'}</th>\n <th width=\"15%\">{'已添加'}</th>\n </tr>\n </thead>\n <tbody>{membersList}</tbody>\n </Table>\n }\n {!isMembersListLoading && this.props.membersList.length === 0 &&\n <div className=\"message empty-tip text-center\">\n <img src={`${siteRoot}media/img/member-list-empty-2x.png`} alt=\"\"/>\n <h4>{'成员列表为空'}</h4>\n </div>\n }\n </div>\n );\n }\n}\n\nWorkWeixinDepartmentMembersList.propTypes = WorkWeixinDepartmentMembersListPropTypes;\n\nexport default WorkWeixinDepartmentMembersList;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Dropdown, DropdownItem, DropdownMenu, DropdownToggle } from 'reactstrap';\nimport { gettext, isPro } from '../../../utils/constants';\n\nconst WorkWeixinDepartmentsTreeNodePropTypes = {\n index: PropTypes.number,\n department: PropTypes.object.isRequired,\n isChildrenShow: PropTypes.bool.isRequired,\n onChangeDepartment: PropTypes.func.isRequired,\n checkedDepartmentId: PropTypes.number.isRequired,\n importDepartmentDialogToggle: PropTypes.func.isRequired,\n};\n\nclass WorkWeixinDepartmentsTreeNode extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isChildrenShow: false,\n dropdownOpen: false,\n active: false,\n };\n }\n\n toggleChildren = (e) => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({\n isChildrenShow: !this.state.isChildrenShow,\n });\n };\n\n dropdownToggle = (e) => {\n e.stopPropagation();\n this.setState({ dropdownOpen: !this.state.dropdownOpen });\n };\n\n onMouseEnter = () => {\n this.setState({ active: true });\n };\n\n onMouseLeave = () => {\n if (this.state.dropdownOpen) return;\n this.setState({ active: false });\n };\n\n importDepartmentDialogToggle = (depart) => {\n this.setState({ active: false });\n this.props.importDepartmentDialogToggle(depart);\n }\n\n componentDidMount() {\n if (this.props.index === 0) {\n this.setState({ isChildrenShow: true });\n this.props.onChangeDepartment(this.props.department.id);\n }\n }\n\n renderTreeNodes = (departmentsTree) => {\n if (departmentsTree.length > 0) {\n return departmentsTree.map((department) => {\n return (\n <WorkWeixinDepartmentsTreeNode\n key={department.id}\n department={department}\n isChildrenShow={this.state.isChildrenShow}\n onChangeDepartment={this.props.onChangeDepartment}\n checkedDepartmentId={this.props.checkedDepartmentId}\n importDepartmentDialogToggle={this.importDepartmentDialogToggle}\n />\n );\n });\n }\n };\n\n changeDept = (departmentID) => {\n const { department, checkedDepartmentId } = this.props;\n this.props.onChangeDepartment(departmentID);\n if (checkedDepartmentId === department.id && !this.state.isChildrenShow) {\n this.setState({ isChildrenShow: true });\n }\n }\n\n render() {\n const { isChildrenShow, department, checkedDepartmentId } = this.props;\n let toggleClass = classNames({\n 'folder-toggle-icon fa fa-caret-down': department.children && this.state.isChildrenShow,\n 'folder-toggle-icon fa fa-caret-right': department.children && !this.state.isChildrenShow,\n });\n let nodeInnerClass = classNames({\n 'tree-node-inner': true,\n 'tree-node-inner-hover': this.state.active,\n 'tree-node-hight-light': checkedDepartmentId === department.id\n });\n return (\n <Fragment>\n {isChildrenShow &&\n <div\n className={nodeInnerClass}\n onClick={() => this.changeDept(department.id)}\n onMouseEnter={this.onMouseEnter}\n onMouseLeave={this.onMouseLeave}\n >\n <span className=\"tree-node-icon\" onClick={(e) => this.toggleChildren(e)}>\n <i className={toggleClass}></i>\n </span>\n <span className=\"tree-node-text\">{department.name}</span>\n {isPro &&\n <Dropdown\n isOpen={this.state.dropdownOpen}\n toggle={(e) => this.dropdownToggle(e)}\n direction=\"down\"\n style={this.state.active ? {} : { opacity: 0 }}\n >\n <DropdownToggle\n tag='i'\n className='fa fa-ellipsis-v cursor-pointer attr-action-icon'\n title={gettext('More Operations')}\n data-toggle=\"dropdown\"\n aria-expanded={this.state.dropdownOpen}\n >\n </DropdownToggle>\n <DropdownMenu className=\"drop-list\" right={true}>\n <DropdownItem\n onClick={this.importDepartmentDialogToggle.bind(this, department)}\n id={department.id}\n >{'导入部门'}</DropdownItem>\n </DropdownMenu>\n </Dropdown>\n }\n </div>\n }\n {this.state.isChildrenShow &&\n <div className=\"department-children\">\n {department.children && this.renderTreeNodes(department.children)}\n </div>\n }\n </Fragment>\n );\n }\n}\n\nWorkWeixinDepartmentsTreeNode.propTypes = WorkWeixinDepartmentsTreeNodePropTypes;\n\nexport default WorkWeixinDepartmentsTreeNode;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Loading from '../../../components/loading';\nimport WorkWeixinDepartmentsTreeNode from './work-weixin-departments-tree-node';\n\nconst WorkWeixinDepartmentsTreePanelPropTypes = {\n isTreeLoading: PropTypes.bool.isRequired,\n departmentsTree: PropTypes.array.isRequired,\n onChangeDepartment: PropTypes.func.isRequired,\n checkedDepartmentId: PropTypes.number.isRequired,\n importDepartmentDialogToggle: PropTypes.func.isRequired,\n};\n\nclass WorkWeixinDepartmentsTreePanel extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { departmentsTree } = this.props;\n return (\n <div className=\"dir-content-nav\">\n <div className=\"tree-view tree\">\n {this.props.isTreeLoading ?\n <Loading/> :\n <div className=\"tree-node\">\n {departmentsTree.length > 0 && departmentsTree.map((department, index) => {\n return (\n <WorkWeixinDepartmentsTreeNode\n key={department.id}\n index={index}\n department={department}\n isChildrenShow={true}\n onChangeDepartment={this.props.onChangeDepartment}\n checkedDepartmentId={this.props.checkedDepartmentId}\n importDepartmentDialogToggle={this.props.importDepartmentDialogToggle}\n />\n );\n })}\n </div>\n }\n </div>\n </div>\n );\n }\n}\n\nWorkWeixinDepartmentsTreePanel.propTypes = WorkWeixinDepartmentsTreePanelPropTypes;\n\nexport default WorkWeixinDepartmentsTreePanel;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport Loading from '../loading';\n\nconst propTypes = {\n importDepartmentDialogToggle: PropTypes.func.isRequired,\n onImportDepartmentSubmit: PropTypes.func.isRequired,\n departmentsCount: PropTypes.number.isRequired,\n membersCount: PropTypes.number.isRequired,\n departmentName: PropTypes.string.isRequired,\n};\n\nclass ImportWorkWeixinDepartmentDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isLoading : false,\n };\n }\n\n toggle = () => {\n this.props.importDepartmentDialogToggle(null);\n };\n\n handleSubmit = () => {\n this.props.onImportDepartmentSubmit();\n this.setState({ isLoading : true });\n };\n\n render() {\n const { departmentsCount, membersCount, departmentName } = this.props;\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>\n <span>{'导入部门 '}</span><span className=\"op-target\" title={departmentName}>{departmentName}</span>\n </ModalHeader>\n <ModalBody>\n <p>{'将要导入 '}<strong>{departmentsCount}</strong>{' 个部门,其中包括 '}<strong>{membersCount}</strong>{' 个成员'}</p>\n {this.state.isLoading && <Loading/>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{'取消'}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit}>{'导入'}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nImportWorkWeixinDepartmentDialog.propTypes = propTypes;\n\nexport default ImportWorkWeixinDepartmentDialog;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport _ from 'lodash';\nimport { seafileAPI } from '../../utils/seafile-api';\nimport { gettext, siteRoot, isPro } from '../../utils/constants';\nimport { Utils } from '../../utils/utils';\nimport toaster from '../../components/toast';\nimport Account from '../../components/common/account';\nimport { WorkWeixinDepartmentMembersList, WorkWeixinDepartmentsTreePanel } from './work-weixin';\nimport ImportWorkWeixinDepartmentDialog from '../../components/dialog/import-work-weixin-department-dialog';\n\nimport '../../css/work-weixin-departments.css';\n\nclass WorkWeixinDepartments extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isTreeLoading: true,\n isMembersListLoading: true,\n departmentsTree: [],\n checkedDepartmentId: 0,\n membersTempObj: {},\n membersList: [],\n newUsersTempObj: {},\n isCheckedAll: false,\n canCheckUserIds: [],\n isImportDepartmentDialogShow: false,\n importDepartment: null,\n importDepartmentChildrenCount: 0,\n importDepartmentMembersCount: 0,\n };\n }\n\n getDepartmentsTree = (list) => {\n let childIds = [];\n let parentIds = [];\n for (let i = 0; i < list.length; i++) {\n if (childIds.indexOf(list[i].id) === -1) {\n childIds.push(list[i].id);\n }\n if (parentIds.indexOf(list[i].parentid) === -1) {\n parentIds.push(list[i].parentid);\n }\n }\n let intersection = parentIds.filter((v) => {\n return childIds.indexOf(v) !== -1;\n });\n let rootIds = parentIds.concat(intersection).filter((v) => {\n return parentIds.indexOf(v) === -1 || intersection.indexOf(v) === -1;\n });\n let cloneData = _.cloneDeep(list);\n return cloneData.filter(father => {\n let branchArr = cloneData.filter(child => father.id === child.parentid);\n branchArr.length > 0 ? father.children = branchArr : '';\n return rootIds.indexOf(father.parentid) !== -1;\n });\n };\n\n getWorkWeixinDepartmentsList = (departmentID) => {\n seafileAPI.adminListWorkWeixinDepartments(departmentID).then((res) => {\n if (!departmentID) {\n let departmentsTree = this.getDepartmentsTree(res.data.department);\n this.setState({\n isTreeLoading: false,\n departmentsTree: departmentsTree,\n });\n } else {\n this.setState({\n importDepartmentChildrenCount: res.data.department.length,\n importDepartmentMembersCount: this.state.membersTempObj[departmentID].length,\n });\n }\n }).catch((error) => {\n this.handleError(error);\n this.setState({\n isTreeLoading: false,\n isMembersListLoading: false,\n });\n if (error.response && error.response.status === 403) {\n window.location = siteRoot + 'sys/useradmin/';\n }\n });\n };\n\n getWorkWeixinDepartmentMembersList = (department_id) => {\n this.setState({\n isMembersListLoading: true,\n });\n seafileAPI.adminListWorkWeixinDepartmentMembers(department_id, {fetch_child: true}).then((res) => {\n let membersTempObj = this.state.membersTempObj;\n membersTempObj[department_id] = res.data.userlist;\n let canCheckUserIds = this.getCanCheckUserIds(res.data.userlist);\n this.setState({\n membersTempObj: membersTempObj,\n membersList: res.data.userlist,\n isMembersListLoading: false,\n canCheckUserIds: canCheckUserIds,\n });\n }).catch((error) => {\n this.setState({isMembersListLoading: false});\n this.handleError(error);\n });\n };\n\n getCanCheckUserIds = (membersList) => {\n let userIds = [];\n membersList.forEach((member) => {\n if (!member.email) userIds.push(member.userid);\n });\n return userIds;\n };\n\n onChangeDepartment = (department_id) => {\n this.setState({\n newUsersTempObj: {},\n isCheckedAll: false,\n checkedDepartmentId: department_id,\n });\n if (!(department_id in this.state.membersTempObj)) {\n this.getWorkWeixinDepartmentMembersList(department_id);\n } else {\n let canCheckUserIds = this.getCanCheckUserIds(this.state.membersTempObj[department_id]);\n this.setState({\n membersList: this.state.membersTempObj[department_id],\n canCheckUserIds: canCheckUserIds,\n });\n }\n };\n\n onUserChecked = (user) => {\n if (this.state.canCheckUserIds.indexOf(user.userid) !== -1) {\n let newUsersTempObj = this.state.newUsersTempObj;\n if (user.userid in newUsersTempObj) {\n delete newUsersTempObj[user.userid];\n if (this.state.isCheckedAll) {\n this.setState({ isCheckedAll: false });\n }\n } else {\n newUsersTempObj[user.userid] = user;\n if (Object.keys(newUsersTempObj).length === this.state.canCheckUserIds.length) {\n this.setState({ isCheckedAll: true });\n }\n }\n this.setState({ newUsersTempObj: newUsersTempObj });\n }\n };\n\n onAllUsersChecked = () => {\n this.setState({\n isCheckedAll: !this.state.isCheckedAll,\n }, () => {\n if (this.state.isCheckedAll) {\n let newUsersTempObj = {};\n let newUsersTempList = this.state.membersList.filter(user => {\n return this.state.canCheckUserIds.indexOf(user.userid) !== -1;\n });\n for (let i = 0; i < newUsersTempList.length; i++) {\n newUsersTempObj[newUsersTempList[i].userid] = newUsersTempList[i];\n }\n this.setState({ newUsersTempObj: newUsersTempObj });\n } else {\n this.setState({ newUsersTempObj: {} });\n }\n });\n };\n\n onSubmit = () => {\n const { newUsersTempObj } = this.state;\n if (JSON.stringify(newUsersTempObj) === '{}') return;\n let userList = [];\n for (let i in newUsersTempObj) {\n userList.push(newUsersTempObj[i]);\n }\n if (userList.length === 0) {\n toaster.danger('未选择成员', {duration: 3});\n return;\n }\n seafileAPI.adminAddWorkWeixinUsersBatch(userList).then((res) => {\n this.setState({\n newUsersTempObj: {},\n isCheckedAll: false,\n });\n if (res.data.success) {\n this.handleSubmitSuccess(res.data.success);\n }\n if (res.data.failed) {\n const fails= res.data.failed;\n for (let i = 0; i < fails.length; i++) {\n toaster.danger(fails[i].name + ' ' + fails[i].error_msg, {duration: 3});\n }\n }\n }).catch((error) => {\n this.handleError(error);\n });\n\n };\n\n handleSubmitSuccess = (success) => {\n let { membersTempObj, membersList, canCheckUserIds } = this.state;\n for (let i = 0; i < success.length; i++) {\n let { userid, name, email } = success[i];\n toaster.success(name + ' 成功导入', {duration: 1});\n // refresh all temp\n if (canCheckUserIds.indexOf(userid) !== -1) {\n canCheckUserIds.splice(canCheckUserIds.indexOf(userid), 1);\n }\n for (let j = 0; j < membersList.length; j++) {\n if (membersList[j].userid === userid) {\n membersList[j].email = email;\n break;\n }\n }\n for (let departmentId in membersTempObj) {\n for (let k = 0; k < membersTempObj[departmentId].length; k++) {\n if (membersTempObj[departmentId][k].userid === userid) {\n membersTempObj[departmentId][k].email = email;\n break;\n }\n }\n }\n }\n this.setState({\n membersTempObj: membersTempObj,\n membersList: membersList,\n canCheckUserIds: canCheckUserIds,\n });\n }\n\n importDepartmentDialogToggle = (importDepartment) => {\n this.setState({\n isImportDepartmentDialogShow: !this.state.isImportDepartmentDialogShow,\n importDepartment: importDepartment,\n }, () => {\n if (importDepartment) {\n this.getWorkWeixinDepartmentsList(importDepartment.id);\n }\n });\n };\n\n onImportDepartmentSubmit = () => {\n let importDepartment = this.state.importDepartment;\n if (!importDepartment) return;\n seafileAPI.adminImportWorkWeixinDepartment(importDepartment.id).then((res) => {\n this.setState({\n isMembersListLoading: true,\n checkedDepartmentId: importDepartment.id,\n membersTempObj: {},\n membersList: [],\n newUsersTempObj: {},\n isCheckedAll: false,\n canCheckUserIds: [],\n });\n this.getWorkWeixinDepartmentMembersList(importDepartment.id);\n this.importDepartmentDialogToggle(null);\n if (res.data.success) {\n this.handleImportDepartmentSubmitSuccess(res.data.success);\n }\n if (res.data.failed) {\n this.handleImportDepartmentSubmitFailed(res.data.failed);\n }\n }).catch((error) => {\n this.handleError(error);\n });\n };\n\n handleImportDepartmentSubmitSuccess = (successes) => {\n for (let i = 0, len = successes.length; i < len; i++) {\n let success = successes[i];\n let successMsg = success.type === 'department' ? '部门 ' + success.department_name + ' 导入成功' : success.api_user_name + ' 导入成功' ;\n toaster.success(successMsg, { duration: 3 });\n }\n };\n\n handleImportDepartmentSubmitFailed = (fails) => {\n for (let i = 0, len = fails.length; i < len; i++) {\n let fail = fails[i];\n let failName = fail.type === 'department' ? fail.department_name : fail.api_user_name;\n toaster.danger(failName + ' ' + fail.msg, { duration: 3} );\n }\n };\n\n handleError = (error) => {\n const errorMsg = Utils.getErrorMsg(error);\n toaster.danger(errorMsg);\n }\n\n componentDidMount() {\n this.getWorkWeixinDepartmentsList(null);\n }\n\n renderNav() {\n const btnClass = 'btn btn-secondary operation-item ';\n return (\n <div className=\"main-panel-north border-left-show\">\n <div className=\"cur-view-toolbar\">\n <span className=\"sf2-icon-menu side-nav-toggle hidden-md-up d-md-none\" title=\"Side Nav Menu\"></span>\n <Button className={btnClass + 'my-1 d-md-none'} onClick={this.onSubmit}>{'导入用户'}</Button>\n <Button className={btnClass + 'hidden-md-up'} onClick={this.onSubmit}>{'导入用户'}</Button>\n </div>\n <div className=\"common-toolbar\">\n <Account isAdminPanel={true}/>\n </div>\n </div>\n );\n }\n\n render() {\n const { isImportDepartmentDialogShow, isTreeLoading, importDepartment, importDepartmentChildrenCount, importDepartmentMembersCount } = this.state;\n let canImportDepartment = !!(isPro && isImportDepartmentDialogShow && !isTreeLoading && importDepartment);\n return (\n <Fragment>\n {this.renderNav()}\n <div className=\"main-panel-center\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{'企业微信集成'}</h3>\n </div>\n <div className=\"cur-view-content d-flex flex-row\">\n <WorkWeixinDepartmentsTreePanel\n departmentsTree={this.state.departmentsTree}\n isTreeLoading={this.state.isTreeLoading}\n onChangeDepartment={this.onChangeDepartment}\n checkedDepartmentId={this.state.checkedDepartmentId}\n importDepartmentDialogToggle={this.importDepartmentDialogToggle}\n />\n <div className=\"dir-content-resize\"></div>\n <WorkWeixinDepartmentMembersList\n isMembersListLoading={this.state.isMembersListLoading}\n membersList={this.state.membersList}\n checkedDepartmentId={this.state.checkedDepartmentId}\n newUsersTempObj={this.state.newUsersTempObj}\n onUserChecked={this.onUserChecked}\n onAllUsersChecked={this.onAllUsersChecked}\n isCheckedAll={this.state.isCheckedAll}\n canCheckUserIds={this.state.canCheckUserIds}\n />\n </div>\n </div>\n </div>\n {canImportDepartment &&\n <ImportWorkWeixinDepartmentDialog\n importDepartmentDialogToggle={this.importDepartmentDialogToggle}\n onImportDepartmentSubmit={this.onImportDepartmentSubmit}\n departmentsCount={importDepartmentChildrenCount}\n membersCount={importDepartmentMembersCount}\n departmentName={importDepartment.name}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default WorkWeixinDepartments;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Table } from 'reactstrap';\nimport { siteRoot } from '../../../utils/constants';\nimport Loading from '../../../components/loading';\n\nconst DingtalkDepartmentMembersListPropTypes = {\n isMembersListLoading: PropTypes.bool.isRequired,\n membersList: PropTypes.array.isRequired,\n newUsersTempObj: PropTypes.object.isRequired,\n checkedDepartmentId: PropTypes.number.isRequired,\n onUserChecked: PropTypes.func.isRequired,\n onAllUsersChecked: PropTypes.func.isRequired,\n isCheckedAll: PropTypes.bool.isRequired,\n canCheckUserIds: PropTypes.array.isRequired,\n};\n\nclass DingtalkDepartmentMembersList extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { newUsersTempObj, checkedDepartmentId, isMembersListLoading, canCheckUserIds } = this.props;\n const membersList = this.props.membersList.map((member, index) => {\n let avatar = member.avatar;\n if (member.avatar.length > 0) {\n avatar = member.avatar;\n } else {\n avatar = siteRoot + 'media/avatars/default.png';\n }\n return (\n <tr key={checkedDepartmentId.toString() + member.userid}>\n <td>\n {!member.email &&\n <input type=\"checkbox\" className=\"vam\" onChange={() => this.props.onUserChecked(member)}\n checked={(member.userid in newUsersTempObj) ? 'checked' : ''}></input>}\n </td>\n <td><img className=\"avatar\" src={avatar} alt=\"\"></img></td>\n <td>{member.name}</td>\n <td>{member.mobile}</td>\n <td>{member.contact_email}</td>\n <td>{member.email && <i className=\"sf2-icon-tick\"></i>}</td>\n </tr>\n );\n });\n\n return (\n <div className=\"dir-content-main\">\n {isMembersListLoading && <Loading/>}\n {!isMembersListLoading && this.props.membersList.length > 0 &&\n <Table hover>\n <thead>\n <tr>\n <th width=\"5%\">\n {canCheckUserIds.length > 0 &&\n <input type=\"checkbox\" className=\"vam\" checked={this.props.isCheckedAll}\n onChange={() => this.props.onAllUsersChecked()}></input>}\n </th>\n <th width=\"10%\"></th>\n <th width=\"20%\">{'名称'}</th>\n <th width=\"20%\">{'手机号'}</th>\n <th width=\"30%\">{'邮箱'}</th>\n <th width=\"15%\">{'已添加'}</th>\n </tr>\n </thead>\n <tbody>{membersList}</tbody>\n </Table>\n }\n {!isMembersListLoading && this.props.membersList.length === 0 &&\n <div className=\"message empty-tip text-center\">\n <img src={`${siteRoot}media/img/member-list-empty-2x.png`} alt=\"\"/>\n <h4>{'成员列表为空'}</h4>\n </div>\n }\n </div>\n );\n }\n}\n\nDingtalkDepartmentMembersList.propTypes = DingtalkDepartmentMembersListPropTypes;\n\nexport default DingtalkDepartmentMembersList;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Dropdown, DropdownItem, DropdownMenu, DropdownToggle } from 'reactstrap';\nimport { gettext, isPro } from '../../../utils/constants';\n\nconst DingtalkDepartmentsTreeNodePropTypes = {\n index: PropTypes.number,\n department: PropTypes.object.isRequired,\n isChildrenShow: PropTypes.bool.isRequired,\n onChangeDepartment: PropTypes.func.isRequired,\n checkedDepartmentId: PropTypes.number.isRequired,\n importDepartmentDialogToggle: PropTypes.func.isRequired,\n};\n\nclass DingtalkDepartmentsTreeNode extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isChildrenShow: false,\n dropdownOpen: false,\n active: false,\n };\n }\n\n toggleChildren = (e) => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({\n isChildrenShow: !this.state.isChildrenShow,\n });\n };\n\n dropdownToggle = (e) => {\n e.stopPropagation();\n this.setState({ dropdownOpen: !this.state.dropdownOpen });\n };\n\n onMouseEnter = () => {\n this.setState({ active: true });\n };\n\n onMouseLeave = () => {\n if (this.state.dropdownOpen) return;\n this.setState({ active: false });\n };\n\n importDepartmentDialogToggle = (depart) => {\n this.setState({ active: false });\n this.props.importDepartmentDialogToggle(depart);\n }\n\n componentDidMount() {\n if (this.props.index === 0) {\n this.setState({ isChildrenShow: true });\n this.props.onChangeDepartment(this.props.department.id);\n }\n }\n\n renderTreeNodes = (departmentsTree) => {\n if (departmentsTree.length > 0) {\n return departmentsTree.map((department) => {\n return (\n <DingtalkDepartmentsTreeNode\n key={department.id}\n department={department}\n isChildrenShow={this.state.isChildrenShow}\n onChangeDepartment={this.props.onChangeDepartment}\n checkedDepartmentId={this.props.checkedDepartmentId}\n importDepartmentDialogToggle={this.importDepartmentDialogToggle}\n />\n );\n });\n }\n };\n\n changeDept = (departmentID) => {\n const { department, checkedDepartmentId } = this.props;\n this.props.onChangeDepartment(departmentID);\n if (checkedDepartmentId === department.id && !this.state.isChildrenShow) {\n this.setState({ isChildrenShow: true });\n }\n }\n\n render() {\n const { isChildrenShow, department, checkedDepartmentId } = this.props;\n let toggleClass = classNames({\n 'folder-toggle-icon fa fa-caret-down': department.children && this.state.isChildrenShow,\n 'folder-toggle-icon fa fa-caret-right': department.children && !this.state.isChildrenShow,\n });\n let nodeInnerClass = classNames({\n 'tree-node-inner': true,\n 'tree-node-inner-hover': this.state.active,\n 'tree-node-hight-light': checkedDepartmentId === department.id\n });\n return (\n <Fragment>\n {isChildrenShow &&\n <div\n className={nodeInnerClass}\n onClick={() => this.changeDept(department.id)}\n onMouseEnter={this.onMouseEnter}\n onMouseLeave={this.onMouseLeave}\n >\n <span className=\"tree-node-icon\" onClick={(e) => this.toggleChildren(e)}>\n <i className={toggleClass}></i>\n </span>\n <span className=\"tree-node-text\">{department.name}</span>\n {isPro &&\n <Dropdown\n isOpen={this.state.dropdownOpen}\n toggle={(e) => this.dropdownToggle(e)}\n direction=\"down\"\n style={this.state.active ? {} : { opacity: 0 }}\n >\n <DropdownToggle\n tag='i'\n className='fa fa-ellipsis-v cursor-pointer attr-action-icon'\n title={gettext('More Operations')}\n data-toggle=\"dropdown\"\n aria-expanded={this.state.dropdownOpen}\n >\n </DropdownToggle>\n <DropdownMenu className=\"drop-list\" right={true}>\n <DropdownItem\n onClick={this.importDepartmentDialogToggle.bind(this, department)}\n id={department.id}\n >{'导入部门'}</DropdownItem>\n </DropdownMenu>\n </Dropdown>\n }\n </div>\n }\n {this.state.isChildrenShow &&\n <div className=\"department-children\">\n {department.children && this.renderTreeNodes(department.children)}\n </div>\n }\n </Fragment>\n );\n }\n}\n\nDingtalkDepartmentsTreeNode.propTypes = DingtalkDepartmentsTreeNodePropTypes;\n\nexport default DingtalkDepartmentsTreeNode;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Loading from '../../../components/loading';\nimport DingtalkDepartmentsTreeNode from './dingtalk-departments-tree-node';\n\nconst DingtalkDepartmentsTreePanelPropTypes = {\n isTreeLoading: PropTypes.bool.isRequired,\n departmentsTree: PropTypes.array.isRequired,\n onChangeDepartment: PropTypes.func.isRequired,\n checkedDepartmentId: PropTypes.number.isRequired,\n importDepartmentDialogToggle: PropTypes.func.isRequired,\n};\n\nclass DingtalkDepartmentsTreePanel extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const { departmentsTree } = this.props;\n return (\n <div className=\"dir-content-nav\">\n <div className=\"tree-view tree\">\n {this.props.isTreeLoading ?\n <Loading/> :\n <div className=\"tree-node\">\n {departmentsTree.length > 0 && departmentsTree.map((department, index) => {\n return (\n <DingtalkDepartmentsTreeNode\n key={department.id}\n index={index}\n department={department}\n isChildrenShow={true}\n onChangeDepartment={this.props.onChangeDepartment}\n checkedDepartmentId={this.props.checkedDepartmentId}\n importDepartmentDialogToggle={this.props.importDepartmentDialogToggle}\n />\n );\n })}\n </div>\n }\n </div>\n </div>\n );\n }\n}\n\nDingtalkDepartmentsTreePanel.propTypes = DingtalkDepartmentsTreePanelPropTypes;\n\nexport default DingtalkDepartmentsTreePanel;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport Loading from '../loading';\n\nconst propTypes = {\n importDepartmentDialogToggle: PropTypes.func.isRequired,\n onImportDepartmentSubmit: PropTypes.func.isRequired,\n departmentsCount: PropTypes.number.isRequired,\n membersCount: PropTypes.number.isRequired,\n departmentName: PropTypes.string.isRequired,\n};\n\nclass ImportDingtalkDepartmentDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isLoading : false,\n };\n }\n\n toggle = () => {\n this.props.importDepartmentDialogToggle(null);\n };\n\n handleSubmit = () => {\n this.props.onImportDepartmentSubmit();\n this.setState({ isLoading : true });\n };\n\n render() {\n const { departmentsCount, membersCount, departmentName } = this.props;\n return (\n <Modal isOpen={true} toggle={this.toggle}>\n <ModalHeader toggle={this.toggle}>\n <span>{'导入部门 '}</span><span className=\"op-target\" title={departmentName}>{departmentName}</span>\n </ModalHeader>\n <ModalBody>\n <p>{'将要导入 '}<strong>{departmentsCount}</strong>{' 个部门,其中包括 '}<strong>{membersCount}</strong>{' 个成员'}</p>\n {this.state.isLoading && <Loading/>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"secondary\" onClick={this.toggle}>{'取消'}</Button>\n <Button color=\"primary\" onClick={this.handleSubmit}>{'导入'}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nImportDingtalkDepartmentDialog.propTypes = propTypes;\n\nexport default ImportDingtalkDepartmentDialog;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport _ from 'lodash';\nimport { seafileAPI } from '../../utils/seafile-api';\nimport { gettext, siteRoot, isPro } from '../../utils/constants';\nimport { Utils } from '../../utils/utils';\nimport toaster from '../../components/toast';\nimport Account from '../../components/common/account';\nimport { DingtalkDepartmentMembersList, DingtalkDepartmentsTreePanel } from './dingtalk';\nimport ImportDingtalkDepartmentDialog from '../../components/dialog/import-dingtalk-department-dialog';\n\nimport '../../css/work-weixin-departments.css';\nimport '../../css/dingtalk-departments.css';\n\nclass DingtalkDepartments extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isTreeLoading: true,\n isMembersListLoading: true,\n departmentsTree: [],\n checkedDepartmentId: 0,\n membersTempObj: {},\n membersList: [],\n newUsersTempObj: {},\n isCheckedAll: false,\n canCheckUserIds: [],\n isImportDepartmentDialogShow: false,\n importDepartment: null,\n importDepartmentChildrenCount: 0,\n importDepartmentMembersCount: 0,\n };\n }\n\n getDepartmentsTree = (list) => {\n let childIds = [];\n let parentIds = [];\n for (let i = 0; i < list.length; i++) {\n if (childIds.indexOf(list[i].id) === -1) {\n childIds.push(list[i].id);\n }\n if (parentIds.indexOf(list[i].parentid) === -1) {\n parentIds.push(list[i].parentid);\n }\n }\n let intersection = parentIds.filter((v) => {\n return childIds.indexOf(v) !== -1;\n });\n let rootIds = parentIds.concat(intersection).filter((v) => {\n return parentIds.indexOf(v) === -1 || intersection.indexOf(v) === -1;\n });\n let cloneData = _.cloneDeep(list);\n return cloneData.filter(father => {\n let branchArr = cloneData.filter(child => father.id === child.parentid);\n branchArr.length > 0 ? father.children = branchArr : '';\n return rootIds.indexOf(father.parentid) !== -1;\n });\n };\n\n getDingtalkDepartmentsList = (departmentID) => {\n seafileAPI.adminListDingtalkDepartments(departmentID).then((res) => {\n if (!departmentID) {\n let departmentsTree = this.getDepartmentsTree(res.data.department);\n this.setState({\n isTreeLoading: false,\n departmentsTree: departmentsTree,\n });\n } else {\n this.setState({\n importDepartmentChildrenCount: res.data.department.length,\n importDepartmentMembersCount: this.state.membersTempObj[departmentID].length,\n });\n }\n }).catch((error) => {\n this.handleError(error);\n this.setState({\n isTreeLoading: false,\n isMembersListLoading: false,\n });\n if (error.response && error.response.status === 403) {\n window.location = siteRoot + 'sys/useradmin/';\n }\n });\n };\n\n getDingtalkDepartmentMembersList = (department_id) => {\n this.setState({\n isMembersListLoading: true,\n });\n seafileAPI.adminListDingtalkDepartmentMembers(department_id).then((res) => {\n let membersTempObj = this.state.membersTempObj;\n membersTempObj[department_id] = res.data.userlist;\n let canCheckUserIds = this.getCanCheckUserIds(res.data.userlist);\n this.setState({\n membersTempObj: membersTempObj,\n membersList: res.data.userlist,\n isMembersListLoading: false,\n canCheckUserIds: canCheckUserIds,\n });\n }).catch((error) => {\n this.setState({isMembersListLoading: false});\n this.handleError(error);\n });\n }\n getCanCheckUserIds = (membersList) => {\n let userIds = [];\n membersList.forEach((member) => {\n if (!member.email) userIds.push(member.userid);\n });\n return userIds;\n };\n\n onChangeDepartment = (department_id) => {\n this.setState({\n newUsersTempObj: {},\n isCheckedAll: false,\n checkedDepartmentId: department_id,\n });\n if (!(department_id in this.state.membersTempObj)) {\n this.getDingtalkDepartmentMembersList(department_id);\n } else {\n let canCheckUserIds = this.getCanCheckUserIds(this.state.membersTempObj[department_id]);\n this.setState({\n membersList: this.state.membersTempObj[department_id],\n canCheckUserIds: canCheckUserIds,\n });\n }\n };\n\n onUserChecked = (user) => {\n if (this.state.canCheckUserIds.indexOf(user.userid) !== -1) {\n let newUsersTempObj = this.state.newUsersTempObj;\n if (user.userid in newUsersTempObj) {\n delete newUsersTempObj[user.userid];\n if (this.state.isCheckedAll) {\n this.setState({ isCheckedAll: false });\n }\n } else {\n newUsersTempObj[user.userid] = user;\n if (Object.keys(newUsersTempObj).length === this.state.canCheckUserIds.length) {\n this.setState({ isCheckedAll: true });\n }\n }\n this.setState({ newUsersTempObj: newUsersTempObj });\n }\n };\n\n onAllUsersChecked = () => {\n this.setState({\n isCheckedAll: !this.state.isCheckedAll,\n }, () => {\n if (this.state.isCheckedAll) {\n let newUsersTempObj = {};\n let newUsersTempList = this.state.membersList.filter(user => {\n return this.state.canCheckUserIds.indexOf(user.userid) !== -1;\n });\n for (let i = 0; i < newUsersTempList.length; i++) {\n newUsersTempObj[newUsersTempList[i].userid] = newUsersTempList[i];\n }\n this.setState({ newUsersTempObj: newUsersTempObj });\n } else {\n this.setState({ newUsersTempObj: {} });\n }\n });\n };\n\n onSubmit = () => {\n const { newUsersTempObj } = this.state;\n if (JSON.stringify(newUsersTempObj) === '{}') return;\n let userList = [];\n for (let i in newUsersTempObj) {\n userList.push(newUsersTempObj[i]);\n }\n if (userList.length === 0) {\n toaster.danger('未选择成员', {duration: 3});\n return;\n }\n seafileAPI.adminAddDingtalkUsersBatch(userList).then((res) => {\n this.setState({\n newUsersTempObj: {},\n isCheckedAll: false,\n });\n if (res.data.success) {\n this.handleSubmitSuccess(res.data.success);\n }\n if (res.data.failed) {\n const fails= res.data.failed;\n for (let i = 0; i < fails.length; i++) {\n toaster.danger(fails[i].name + ' ' + fails[i].error_msg, {duration: 3});\n }\n }\n }).catch((error) => {\n this.handleError(error);\n });\n\n };\n\n handleSubmitSuccess = (success) => {\n let { membersTempObj, membersList, canCheckUserIds } = this.state;\n for (let i = 0; i < success.length; i++) {\n let { userid, name, email } = success[i];\n toaster.success(name + ' 成功导入', {duration: 1});\n // refresh all temp\n if (canCheckUserIds.indexOf(userid) !== -1) {\n canCheckUserIds.splice(canCheckUserIds.indexOf(userid), 1);\n }\n for (let j = 0; j < membersList.length; j++) {\n if (membersList[j].userid === userid) {\n membersList[j].email = email;\n break;\n }\n }\n for (let departmentId in membersTempObj) {\n for (let k = 0; k < membersTempObj[departmentId].length; k++) {\n if (membersTempObj[departmentId][k].userid === userid) {\n membersTempObj[departmentId][k].email = email;\n break;\n }\n }\n }\n }\n this.setState({\n membersTempObj: membersTempObj,\n membersList: membersList,\n canCheckUserIds: canCheckUserIds,\n });\n }\n\n importDepartmentDialogToggle = (importDepartment) => {\n this.setState({\n isImportDepartmentDialogShow: !this.state.isImportDepartmentDialogShow,\n importDepartment: importDepartment,\n }, () => {\n if (importDepartment) {\n this.getDingtalkDepartmentsList(importDepartment.id);\n }\n });\n };\n\n onImportDepartmentSubmit = () => {\n let importDepartment = this.state.importDepartment;\n if (!importDepartment) return;\n seafileAPI.adminImportDingtalkDepartment(importDepartment.id).then((res) => {\n this.setState({\n isMembersListLoading: true,\n checkedDepartmentId: importDepartment.id,\n membersTempObj: {},\n membersList: [],\n newUsersTempObj: {},\n isCheckedAll: false,\n canCheckUserIds: [],\n });\n this.getDingtalkDepartmentMembersList(importDepartment.id);\n this.importDepartmentDialogToggle(null);\n if (res.data.success) {\n this.handleImportDepartmentSubmitSuccess(res.data.success);\n }\n if (res.data.failed) {\n this.handleImportDepartmentSubmitFailed(res.data.failed);\n }\n }).catch((error) => {\n this.handleError(error);\n });\n };\n\n handleImportDepartmentSubmitSuccess = (successes) => {\n for (let i = 0, len = successes.length; i < len; i++) {\n let success = successes[i];\n let successMsg = success.type === 'department' ? '部门 ' + success.department_name + ' 导入成功' : success.api_user_name + ' 导入成功' ;\n toaster.success(successMsg, { duration: 3 });\n }\n };\n\n handleImportDepartmentSubmitFailed = (fails) => {\n for (let i = 0, len = fails.length; i < len; i++) {\n let fail = fails[i];\n let failName = fail.type === 'department' ? fail.department_name : fail.api_user_name;\n toaster.danger(failName + ' ' + fail.msg, { duration: 3} );\n }\n };\n\n handleError = (error) => {\n const errorMsg = Utils.getErrorMsg(error);\n toaster.danger(errorMsg);\n }\n\n componentDidMount() {\n this.getDingtalkDepartmentsList(null);\n }\n\n renderNav() {\n const btnClass = 'btn btn-secondary operation-item ';\n return (\n <div className=\"main-panel-north border-left-show\">\n <div className=\"cur-view-toolbar\">\n <span className=\"sf2-icon-menu side-nav-toggle hidden-md-up d-md-none\" title=\"Side Nav Menu\"></span>\n <Button className={btnClass + 'my-1 d-md-none'} onClick={this.onSubmit}>{'导入用户'}</Button>\n <Button className={btnClass + 'hidden-md-up'} onClick={this.onSubmit}>{'导入用户'}</Button>\n </div>\n <div className=\"common-toolbar\">\n <Account isAdminPanel={true}/>\n </div>\n </div>\n );\n }\n\n render() {\n const { isImportDepartmentDialogShow, isTreeLoading, importDepartment, importDepartmentChildrenCount, importDepartmentMembersCount } = this.state;\n let canImportDepartment = !!(isPro && isImportDepartmentDialogShow && !isTreeLoading && importDepartment);\n return (\n <Fragment>\n {this.renderNav()}\n <div className=\"main-panel-center\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{'钉钉集成'}</h3>\n </div>\n <div className=\"cur-view-content d-flex flex-row\">\n <DingtalkDepartmentsTreePanel\n departmentsTree={this.state.departmentsTree}\n isTreeLoading={this.state.isTreeLoading}\n onChangeDepartment={this.onChangeDepartment}\n checkedDepartmentId={this.state.checkedDepartmentId}\n importDepartmentDialogToggle={this.importDepartmentDialogToggle}\n />\n <div className=\"dir-content-resize\"></div>\n <DingtalkDepartmentMembersList\n isMembersListLoading={this.state.isMembersListLoading}\n membersList={this.state.membersList}\n checkedDepartmentId={this.state.checkedDepartmentId}\n newUsersTempObj={this.state.newUsersTempObj}\n onUserChecked={this.onUserChecked}\n onAllUsersChecked={this.onAllUsersChecked}\n isCheckedAll={this.state.isCheckedAll}\n canCheckUserIds={this.state.canCheckUserIds}\n />\n </div>\n </div>\n </div>\n {canImportDepartment &&\n <ImportDingtalkDepartmentDialog\n importDepartmentDialogToggle={this.importDepartmentDialogToggle}\n onImportDepartmentSubmit={this.onImportDepartmentSubmit}\n departmentsCount={importDepartmentChildrenCount}\n membersCount={importDepartmentMembersCount}\n departmentName={importDepartment.name}\n />\n }\n </Fragment>\n );\n }\n}\n\nexport default DingtalkDepartments;\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport moment from 'moment';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport toaster from '../../../components/toast';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n getPreviousPage = () => {\n this.props.getItemsByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getItemsByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, pageInfo, curPerPage, hasNextPage, currentPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No invitations')}</h2>\n </EmptyTip>\n );\n\n const table = (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"20%\">{gettext('Inviter')}</th>\n <th width=\"20%\">{gettext('Accepter')}</th>\n <th width=\"9%\">{gettext('Type')}</th>\n <th width=\"14%\">{gettext('Invited at')}</th>\n <th width=\"14%\">{gettext('Accepted at')}</th>\n <th width=\"18%\">{gettext('Expired at')}</th>\n <th width=\"5%\"></th>\n </tr>\n </thead>\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n deleteItem={this.props.deleteItem}\n />);\n })}\n </tbody>\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n highlight: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n deleteItem = () => {\n this.props.deleteItem(this.props.item);\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch (item) {\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n }\n return translateResult;\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Delete':\n this.deleteItem();\n break;\n default:\n break;\n }\n }\n\n getInviteTypeText = () => {\n let translateResult = '';\n switch (this.props.item.invite_type) {\n case 'Guest':\n translateResult = gettext('Guest');\n break;\n }\n return translateResult;\n }\n\n render() {\n const { item } = this.props;\n const {\n isOpIconShown\n } = this.state;\n\n return (\n <Fragment>\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td>\n <UserLink email={item.inviter_email} name={item.inviter_name} />\n </td>\n <td>\n {item.accept_time ?\n <UserLink email={item.accepter_email} name={item.accepter_name} /> :\n item.accepter_email\n }\n </td>\n <td>{this.getInviteTypeText()}</td>\n <td>\n <span title={moment(item.invite_time).format('llll')}>{moment(item.invite_time).fromNow()}</span>\n </td>\n <td>\n {item.accept_time ?\n <span title={moment(item.accept_time).format('llll')}>{moment(item.accept_time).fromNow()}</span> :\n '--'\n }\n </td>\n <td>\n {item.is_expired ?\n <span className=\"text-red\">{moment(item.expire_time).format('YYYY-MM-DD HH:mm')}</span> :\n moment(item.expire_time).format('YYYY-MM-DD HH:mm')\n }\n </td>\n <td>\n {isOpIconShown &&\n <OpMenu\n operations={['Delete']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n </Fragment>\n );\n }\n}\n\n\nclass Invitations extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n items: [],\n totalItemCount: 0,\n hasNextPage: false,\n currentPage: 1,\n perPage: 25\n };\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getItemsByPage(this.state.currentPage);\n });\n }\n\n getItemsByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListInvitations(page, perPage).then(res => {\n this.setState({\n loading: false,\n items: res.data.invitation_list,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.total_count),\n currentPage: page\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n deleteItem = (targetItem) => {\n const token = targetItem.token;\n seafileAPI.sysAdminDeleteInvitation(token).then(res => {\n let items = this.state.items.filter(item => {\n return item.token != token;\n });\n this.setState({items: items});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteItemInBatch = () => {\n seafileAPI.sysAdminDeleteExpiredInvitations().then(res => {\n const prevItems = this.state.items;\n const items = this.state.items.filter(item => !item.is_expired || item.accept_time);\n if (items.length < prevItems.length) {\n this.setState({\n items: items\n });\n toaster.success(gettext('Operation succeeded.'));\n }\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getItemsByPage(1);\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.deleteItemInBatch}>{gettext('Delete Expired Invitations')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Invitations')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={this.state.items}\n currentPage={this.state.currentPage}\n hasNextPage={this.state.hasNextPage}\n curPerPage={this.state.perPage}\n resetPerPage={this.resetPerPage}\n getItemsByPage={this.getItemsByPage}\n deleteItem={this.deleteItem}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default Invitations;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Modal, ModalHeader, ModalBody } from 'reactstrap';\nimport { SimpleEditor } from '@seafile/seafile-editor';\nimport { gettext } from '../../utils/constants';\n\nconst propTypes = {\n title: PropTypes.string,\n content: PropTypes.string,\n onCommit: PropTypes.func.isRequired,\n onCloseEditorDialog: PropTypes.func.isRequired,\n};\n\nclass TermsEditorDialog extends React.Component {\n\n static defaultProps = {\n title: gettext('Terms'),\n }\n\n onKeyDown = (event) => {\n event.stopPropagation();\n }\n\n toggle = () => {\n if (this.isContentChanged()) {\n let currentContent = this.getCurrentContent();\n this.props.onCommit(currentContent);\n }\n this.props.onCloseEditorDialog();\n }\n\n isContentChanged = () => {\n return this.simpleEditor.hasContentChange();\n }\n\n getCurrentContent = () => {\n let markdownContent = this.simpleEditor.getMarkdown();\n return markdownContent;\n }\n\n setSimpleEditorRef = (editor) => {\n this.simpleEditor = editor;\n }\n\n render() {\n let { content, title } = this.props;\n return (\n <Modal\n isOpen={true}\n toggle={this.toggle}\n onKeyDown={this.onKeyDown}\n wrapClassName={'conditions-editor-dialog-wrapper'}\n className={'conditions-editor-dialog'}\n contentClassName={'conditions-editor-dialog-content'}\n size={'lg'}\n style={{width: 770}}\n >\n <ModalHeader className=\"conditions-editor-dialog-title\" toggle={this.toggle}>{title}</ModalHeader>\n <ModalBody className={'conditions-editor-dialog-main'}>\n <SimpleEditor\n onRef={this.setSimpleEditorRef.bind(this)}\n value={content || ''}\n />\n </ModalBody>\n </Modal>\n );\n }\n}\n\nTermsEditorDialog.propTypes = propTypes;\n\nexport default TermsEditorDialog;\n","import React, {Fragment} from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input, Alert, FormGroup, Label } from 'reactstrap';\nimport { gettext } from '../../../utils/constants';\nimport TermsPreviewWidget from '../../terms-preview-widget';\nimport TermsEditorDialog from '../terms-editor-dialog';\n\nimport '../../../css/terms-conditions-editor.css';\n\nconst propTypes = {\n isUpdate: PropTypes.bool,\n oldTermObj: PropTypes.object,\n addTerm: PropTypes.func,\n updateTerm: PropTypes.func,\n toggle: PropTypes.func.isRequired,\n};\n\nclass AddOrUpdateTermDialog extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n name: '',\n versionNumber: '',\n text: '',\n isActive: true,\n errorMsg: '',\n isConditionsEditorDialogShow: false,\n };\n }\n\n componentDidMount() {\n let oldTermObj = this.props.oldTermObj;\n if (oldTermObj) {\n this.setState({\n name: oldTermObj.name,\n versionNumber: oldTermObj.version_number,\n text: oldTermObj.text,\n isActive: !(oldTermObj.activate_time === ''),\n });\n }\n }\n\n handleNameChange = (e) => {\n this.setState({name: e.target.value.trim()});\n }\n\n handleVersionNumberChange = (e) => {\n this.setState({versionNumber: e.target.value.trim()});\n }\n\n handleTextChange = (e) => {\n this.setState({text: e.target.value.trim()});\n }\n\n setActive = () => {\n this.setState({isActive: true});\n }\n\n setInActive = () => {\n this.setState({isActive: false});\n }\n\n addTerm = () => {\n let { name, versionNumber, text, isActive } = this.state;\n if (name === '') {\n this.setState({errMsg: gettext('Name is required.')});\n return;\n }\n if (versionNumber === '') {\n this.setState({errMsg: gettext('Version Number is required.')});\n return;\n }\n if (isNaN(versionNumber)) {\n this.setState({errMsg: gettext('Version Number must be a number.')});\n return;\n }\n if (text === '') {\n this.setState({errMsg: gettext('Text is required.')});\n return;\n }\n if (this.props.isUpdate) {\n this.props.updateTerm(name, versionNumber, text, isActive);\n } else {\n this.props.addTerm(name, versionNumber, text, isActive);\n }\n }\n\n onContentClick = () => {\n this.setState({isConditionsEditorDialogShow: !this.state.isConditionsEditorDialogShow});\n }\n\n onCloseEditorDialog = () => {\n this.setState({isConditionsEditorDialogShow: false});\n }\n\n onUpdateContent = (content) => {\n this.setState({ text: content });\n }\n\n render() {\n let title = this.props.isUpdate ? gettext('Update Terms and Conditions') : gettext('Add Terms and Conditions');\n return (\n <Fragment>\n <Modal isOpen={true} toggle={this.props.toggle}>\n <ModalHeader toggle={this.props.toggle}>{title}</ModalHeader>\n <ModalBody>\n <FormGroup>\n <Label for=\"name\">{gettext('Name')}</Label>\n <Input id=\"name\" value={this.state.name} onChange={this.handleNameChange}/>\n </FormGroup>\n <FormGroup>\n <Label>{gettext('Version Number')}</Label>\n <Input value={this.state.versionNumber} onChange={this.handleVersionNumberChange}/>\n </FormGroup>\n <FormGroup className=\"form-content\">\n <Label>{gettext('Text')}</Label>\n <TermsPreviewWidget content={this.state.text} onContentClick={this.onContentClick}/>\n </FormGroup>\n <FormGroup tag=\"fieldset\">\n <Label>{gettext('Activated')}</Label>\n <FormGroup check>\n <Label check>\n <Input type=\"radio\" checked={this.state.isActive} onChange={this.setActive} />\n {' '}{gettext('On')}\n </Label>\n </FormGroup>\n <FormGroup check>\n <Label check>\n <Input type=\"radio\" checked={!this.state.isActive} onChange={this.setInActive} />\n {' '}{gettext('Off')}\n </Label>\n </FormGroup>\n </FormGroup>\n {this.state.errMsg && <Alert color=\"danger\">{this.state.errMsg}</Alert>}\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.addTerm}>{gettext('Submit')}</Button>\n </ModalFooter>\n </Modal>\n {this.state.isConditionsEditorDialogShow && (\n <TermsEditorDialog\n content={this.state.text}\n onCommit={this.onUpdateContent}\n onCloseEditorDialog={this.onCloseEditorDialog}\n />\n )}\n </Fragment>\n );\n }\n}\n\nAddOrUpdateTermDialog.propTypes = propTypes;\n\nexport default AddOrUpdateTermDialog;\n","const hrefReg = /\\[.+\\]\\(\\S+\\)|<img src=(\\S+).+\\/>|!\\[\\]\\(\\S+\\)|<\\S+>/g,\n imageReg1 = /^<img src=\"(\\S+)\" .+\\/>/,\n imageReg2 = /^!\\[\\]\\((\\S+)\\)/,\n linkReg1 = /^\\[.+\\]\\(\\S+\\)/,\n linkReg2 = /^<\\S+>$/;\n\nconst getLinks = (hrefs) => {\n const hrefObj = {\n links: [],\n images: []\n };\n hrefs.forEach((href) => {\n if (href.search(linkReg1) >= 0 || href.search(linkReg2) >= 0) {\n hrefObj.links.push(href);\n } else {\n let imageSrcs = href.match(imageReg1);\n let imageSrcs1 = href.match(imageReg2);\n if (imageSrcs) {\n hrefObj.images.push(imageSrcs[1]);\n } else if (imageSrcs1) {\n hrefObj.images.push(imageSrcs1[1]);\n }\n }\n });\n return hrefObj;\n};\n\n\nconst getPreviewContent = (markdownContent) => {\n let previewText = '';\n let newMarkdownContent = markdownContent.replace(hrefReg, '');\n for (let index = 0; index < newMarkdownContent.length; index++) {\n if (newMarkdownContent[index] === '#') {\n continue;\n } else if (newMarkdownContent[index] === '\\n') {\n previewText += ' ';\n } else {\n previewText += newMarkdownContent[index];\n }\n if (previewText.length === 30) {\n break;\n }\n }\n\n const hrefs = markdownContent.match(hrefReg);\n if (hrefs) {\n const { images, links } = getLinks(hrefs);\n return { previewText, images, links };\n }\n return { previewText, images: [], links: [] };\n};\n\n\nexport default getPreviewContent;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Modal, ModalHeader, ModalBody } from 'reactstrap';\nimport TermsPreviewWidget from '../terms-preview-widget';\nimport { gettext } from '../../utils/constants';\n\nconst propTypes = {\n title: PropTypes.string,\n content: PropTypes.string,\n onClosePreviewDialog: PropTypes.func.isRequired,\n};\n\nclass TermsPreviewDialog extends React.Component {\n\n static defaultProps = {\n title: gettext('Terms'),\n }\n\n\n toggle = () => {\n this.props.onClosePreviewDialog();\n }\n\n render() {\n let { title, content } = this.props;\n return (\n <Modal\n isOpen={true}\n size={'lg'}\n style={{width: 600}}\n wrapClassName={'conditions-perview-wrapper'}\n toggle={this.toggle}\n >\n <ModalHeader toggle={this.toggle}>{title}</ModalHeader>\n <ModalBody>\n <TermsPreviewWidget content={content} />\n </ModalBody>\n </Modal>\n );\n }\n}\n\nTermsPreviewDialog.propTypes = propTypes;\n\nexport default TermsPreviewDialog;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { processor } from '@seafile/seafile-editor/dist/utils/seafile-markdown2html';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport getPreviewContent from '../../../utils/markdown-utils';\nimport AddOrUpdateTermDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-or-update-term-dialog';\nimport CommonOperationConfirmationDialog from '../../../components/dialog/common-operation-confirmation-dialog';\nimport TermsPerviewDialog from '../../../components/dialog/terms-preview-dialog';\nimport ModalPortal from '../../../components/modal-portal';\nimport OpMenu from '../../../components/dialog/op-menu';\n\nconst propsTypes = {\n item: PropTypes.object.isRequired,\n isItemFreezed: PropTypes.bool.isRequired,\n onFreezedItem: PropTypes.func.isRequired,\n onUnfreezedItem: PropTypes.func.isRequired,\n deleteTerm: PropTypes.func.isRequired,\n updateTerm: PropTypes.func.isRequired,\n};\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n itemContent: '...',\n isOpIconShown: false,\n isUpdateDialogOpen: false,\n isDeleteDialogOpen: false,\n isTermsPerviewDialogOpen: false,\n };\n }\n\n componentDidMount() {\n let mdFile = this.props.item.text;\n processor.process(mdFile).then((result) => {\n let innerHtml = String(result);\n this.setState({itemContent: innerHtml});\n });\n }\n\n componentWillReceiveProps(nextProps) {\n if (nextProps.item.text !== this.props.item.text) {\n let mdFile = nextProps.item.text;\n processor.process(mdFile).then((result) => {\n let innerHtml = String(result);\n this.setState({itemContent: innerHtml});\n });\n }\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n toggleUpdateDialog = (e) => {\n this.setState({isUpdateDialogOpen: !this.state.isUpdateDialogOpen});\n }\n\n toggleDeleteDialog = (e) => {\n this.setState({isDeleteDialogOpen: !this.state.isDeleteDialogOpen});\n }\n\n toggleTermsContentDialog = (e) => {\n this.setState({isTermsPerviewDialogOpen: !this.state.isTermsPerviewDialogOpen});\n }\n\n onMenuItemClick = (operation) => {\n switch(operation) {\n case 'Update':\n this.toggleUpdateDialog();\n break;\n case 'Delete':\n this.toggleDeleteDialog();\n break;\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n deleteTerm = () => {\n this.props.deleteTerm(this.props.item.id);\n this.toggleDeleteDialog();\n }\n\n updateTerm = (name, versionNumber, text, isActive) => {\n this.props.updateTerm(this.props.item.id, name, versionNumber, text, isActive);\n this.toggleUpdateDialog();\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'Update':\n translateResult = gettext('Update');\n break;\n case 'Delete':\n translateResult = gettext('Delete');\n break;\n default:\n break;\n }\n\n return translateResult;\n }\n\n render() {\n let { item } = this.props;\n let { isDeleteDialogOpen, isUpdateDialogOpen, isTermsPerviewDialogOpen } = this.state;\n let previewContent = getPreviewContent(item.text);\n let itemName = '<span class=\"op-target\">' + Utils.HTMLescape(item.name) + '</span>';\n let deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', itemName);\n return (\n <Fragment>\n <tr onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td>{item.name}</td>\n <td>{item.version_number}</td>\n <td className=\"ellipsis\">\n <a href='#' onClick={this.toggleTermsContentDialog}>{previewContent.previewText}</a>\n </td>\n <td>{moment(item.ctime).fromNow()}</td>\n <td>{item.activate_time ? moment(item.activate_time).fromNow() : '--'}</td>\n <td>\n {this.state.isOpIconShown &&\n <OpMenu\n operations={['Update', 'Delete']}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n {isDeleteDialogOpen &&\n <ModalPortal>\n <CommonOperationConfirmationDialog\n title={gettext('Delete T&C')}\n message={deleteDialogMsg}\n toggleDialog={this.toggleDeleteDialog}\n executeOperation={this.deleteTerm}\n confirmBtnText={gettext('Delete')}\n />\n </ModalPortal>\n }\n {isUpdateDialogOpen &&\n <ModalPortal>\n <AddOrUpdateTermDialog\n updateTerm={this.updateTerm}\n toggle={this.toggleUpdateDialog}\n isUpdate={true}\n oldTermObj={item}\n />\n </ModalPortal>\n }\n {isTermsPerviewDialogOpen &&\n <ModalPortal>\n <TermsPerviewDialog\n content={item.text}\n onClosePreviewDialog={this.toggleTermsContentDialog}\n />\n </ModalPortal>\n }\n </Fragment>\n );\n }\n}\n\nItem.propTypes = propsTypes;\n\nexport default Item;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { gettext } from '../../../utils/constants';\nimport EmptyTip from '../../../components/empty-tip';\nimport Loading from '../../../components/loading';\nimport Item from './item';\n\nconst propTypes = {\n loading: PropTypes.bool.isRequired,\n items: PropTypes.array.isRequired,\n errorMsg: PropTypes.string,\n deleteTerm: PropTypes.func.isRequired,\n updateTerm: PropTypes.func.isRequired,\n};\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n render() {\n const { loading, errorMsg, items } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No terms and conditions')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"20%\">{gettext('Name')}</th>\n <th width=\"10%\">{gettext('Version')}</th>\n <th width=\"25%\">{gettext('Text')}</th>\n <th width=\"20%\">{gettext('Created')}</th>\n <th width=\"20%\">{gettext('Activated')}</th>\n <th width=\"5%\">{/* operation */}</th>\n </tr>\n </thead>\n {items &&\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n deleteTerm={this.props.deleteTerm}\n updateTerm={this.props.updateTerm}\n />);\n })}\n </tbody>\n }\n </table>\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nContent.propTypes = propTypes;\n\nexport default Content;\n\n","import React, { Component, Fragment } from 'react';\nimport { Button } from 'reactstrap';\nimport { Utils } from '../../../utils/utils';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport AddOrUpdateTermDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-add-or-update-term-dialog';\nimport ModalPortal from '../../../components/modal-portal';\nimport toaster from '../../../components/toast';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Content from './content';\n\nclass TermsAndConditions extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n termList: [],\n isAddTermDialogOpen: false,\n };\n }\n\n toggleAddTermDialog = () => {\n this.setState({isAddTermDialogOpen: !this.state.isAddTermDialogOpen});\n }\n\n componentDidMount () {\n seafileAPI.sysAdminListTermsAndConditions().then((res) => {\n this.setState({\n termList: res.data.term_and_condition_list,\n loading: false,\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n addTerm = (name, versionNumber, text, isActive) => {\n seafileAPI.sysAdminAddTermAndCondition(name, versionNumber, text, isActive).then(res => {\n // After adding the terms, you need to refresh the page.\n location.reload();\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n updateTerm = (termID, name, versionNumber, text, isActive) => {\n seafileAPI.sysAdminUpdateTermAndCondition(termID, name, versionNumber, text, isActive).then(res => {\n let termList = this.state.termList.map(item => {\n if (item.id == termID) {\n return res.data;\n } else {\n return item;\n }\n });\n this.setState({termList: termList});\n toaster.success(gettext('Update succeeded.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n deleteTerm = (termID) => {\n seafileAPI.sysAdminDeleteTermAndCondition(termID).then(res => {\n let termList = this.state.termList.filter(item => item.id != termID);\n this.setState({termList: termList});\n toaster.success(gettext('Successfully deleted 1 item.'));\n }).catch((error) => {\n let errMessage = Utils.getErrorMsg(error);\n toaster.danger(errMessage);\n });\n }\n\n render() {\n let { termList, isAddTermDialogOpen } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar>\n <Button className=\"btn btn-secondary operation-item\" onClick={this.toggleAddTermDialog}>{gettext('Add')}</Button>\n </MainPanelTopbar>\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <div className=\"cur-view-path\">\n <h3 className=\"sf-heading\">{gettext('Terms and Conditions')}</h3>\n </div>\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={termList}\n deleteTerm={this.deleteTerm}\n updateTerm={this.updateTerm}\n />\n </div>\n </div>\n </div>\n {isAddTermDialogOpen &&\n <ModalPortal>\n <AddOrUpdateTermDialog\n isUpdate={false}\n addTerm={this.addTerm}\n toggle={this.toggleAddTermDialog}\n />\n </ModalPortal>\n }\n </Fragment>\n );\n }\n}\n\nexport default TermsAndConditions;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass Nav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'all', urlPart: 'all', text: gettext('All')},\n {name: 'unhandled', urlPart: 'unhandled', text: gettext('Unhandled')}\n ];\n }\n\n render() {\n const { currentItem } = this.props;\n return (\n <div className=\"cur-view-path tab-nav-container\">\n <ul className=\"nav\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item\" key={index}>\n <Link to={`${siteRoot}sys/virus-files/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nNav.propTypes = propTypes;\n\nexport default Nav;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Nav from './nav';\n\nconst virusFileItemPropTypes = {\n virusFile: PropTypes.object.isRequired,\n isItemFreezed: PropTypes.bool.isRequired,\n onFreezedItem: PropTypes.func.isRequired,\n onUnfreezedItem: PropTypes.func.isRequired\n};\n\nclass VirusFileItem extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n highlight: false,\n isOpIconShown: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n onMenuItemClick = (operation) => {\n this.props.handleFile(this.props.virusFile.virus_id, operation);\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'delete':\n translateResult = gettext('Delete');\n break;\n case 'ignore':\n translateResult = gettext('Ignore');\n break;\n case 'do-not-ignore':\n translateResult = gettext('Don\\'t ignore');\n break;\n }\n return translateResult;\n }\n\n render() {\n const virusFile = this.props.virusFile;\n let fileStatus = '',\n fileOpList = [];\n if (virusFile.has_deleted) {\n fileStatus = <span className=\"text-green\">{gettext('Deleted')}</span>;\n } else if (virusFile.has_ignored) {\n fileStatus = <span className=\"text-orange\">{gettext('Ignored')}</span>;\n fileOpList = ['do-not-ignore'];\n } else {\n fileStatus = <span className=\"text-red\">{gettext('Unhandled')}</span>;\n fileOpList = ['delete', 'ignore'];\n }\n\n return (\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td>{virusFile.repo_name}</td>\n <td>{virusFile.repo_owner}</td>\n <td>{virusFile.file_path}</td>\n <td>{fileStatus}</td>\n <td>\n {fileOpList.length > 0 && this.state.isOpIconShown &&\n <OpMenu\n operations={fileOpList}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n );\n }\n}\n\nVirusFileItem.propTypes = virusFileItemPropTypes;\n\n\nconst virusFileListPropTypes = {\n loading: PropTypes.bool.isRequired,\n errorMsg: PropTypes.string.isRequired,\n virusFiles: PropTypes.array.isRequired\n};\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n getPreviousPage = () => {\n this.props.getListByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getListByPage(this.props.currentPage + 1);\n }\n\n render() {\n const {\n loading, errorMsg, virusFiles,\n curPerPage, hasNextPage, currentPage\n } = this.props;\n\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n return (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"27%\">{gettext('Library')}</th>\n <th width=\"25%\">{gettext('Owner')}</th>\n <th width=\"28%\">{gettext('Virus File')}</th>\n <th width=\"15%\">{gettext('Status')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {virusFiles.map((virusFile, index) => {\n return (\n <VirusFileItem\n key={index}\n virusFile={virusFile}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n handleFile={this.props.handleFile}\n />\n );\n })}\n </tbody>\n </table>\n {virusFiles.length > 0 &&\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n }\n </Fragment>\n );\n }\n }\n}\n\nContent.propTypes = virusFileListPropTypes;\n\n\nclass AllVirusFiles extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n virusFiles: [],\n currentPage: 1,\n perPage: 25,\n hasNextPage: false\n };\n }\n\n componentDidMount() {\n let urlParams = (new URL(window.location)).searchParams;\n const {\n currentPage, perPage\n } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getListByPage(this.state.currentPage);\n });\n }\n\n getListByPage = (page) => {\n const { perPage } = this.state;\n seafileAPI.listVirusFiles(page, perPage).then((res) => {\n const data = res.data;\n this.setState({\n loading: false,\n virusFiles: data.virus_file_list,\n hasNextPage: data.has_next_page\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getListByPage(1);\n });\n }\n\n handleFile = (virusID, op) => {\n let request;\n switch(op) {\n case 'delete':\n request = seafileAPI.deleteVirusFile(virusID);\n break;\n case 'ignore':\n request = seafileAPI.toggleIgnoreVirusFile(virusID, true);\n break;\n case 'do-not-ignore':\n request = seafileAPI.toggleIgnoreVirusFile(virusID, false);\n break;\n }\n request.then((res) => {\n this.setState({\n virusFiles: this.state.virusFiles.map((item) => {\n if (item.virus_id == virusID) {\n if (op == 'delete') {\n item.has_deleted = true;\n } else {\n item = res.data.virus_file;\n }\n }\n return item;\n })\n });\n }).catch((error) => {\n toaster.danger(Utils.getErrorMsg(error));\n });\n }\n\n render() {\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center\">\n <div className=\"cur-view-container\">\n <Nav currentItem=\"all\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n virusFiles={this.state.virusFiles}\n currentPage={this.state.currentPage}\n hasNextPage={this.state.hasNextPage}\n curPerPage={this.state.perPage}\n resetPerPage={this.resetPerPage}\n getListByPage={this.getListByPage}\n handleFile={this.handleFile}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default AllVirusFiles;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from 'reactstrap';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport toaster from '../../../components/toast';\nimport OpMenu from '../../../components/dialog/op-menu';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport Nav from './nav';\n\nconst virusFileItemPropTypes = {\n virusFile: PropTypes.object.isRequired,\n isItemFreezed: PropTypes.bool.isRequired,\n onFreezedItem: PropTypes.func.isRequired,\n onUnfreezedItem: PropTypes.func.isRequired\n};\n\nclass VirusFileItem extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n highlight: false,\n isOpIconShown: false\n };\n }\n\n handleMouseEnter = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: true,\n highlight: true\n });\n }\n }\n\n handleMouseLeave = () => {\n if (!this.props.isItemFreezed) {\n this.setState({\n isOpIconShown: false,\n highlight: false\n });\n }\n }\n\n onUnfreezedItem = () => {\n this.setState({\n highlight: false,\n isOpIconShow: false\n });\n this.props.onUnfreezedItem();\n }\n\n onMenuItemClick = (operation) => {\n this.props.handleFile(this.props.virusFile.virus_id, operation);\n }\n\n translateOperations = (item) => {\n let translateResult = '';\n switch(item) {\n case 'delete':\n translateResult = gettext('Delete');\n break;\n case 'ignore':\n translateResult = gettext('Ignore');\n break;\n case 'do-not-ignore':\n translateResult = gettext('Don\\'t ignore');\n break;\n }\n return translateResult;\n }\n\n toggleItemSelected = (e) => {\n this.props.toggleItemSelected(this.props.virusFile, e.target.checked);\n }\n\n render() {\n const virusFile = this.props.virusFile;\n let fileStatus = '',\n fileOpList = [];\n if (virusFile.has_deleted) {\n fileStatus = <span className=\"text-green\">{gettext('Deleted')}</span>;\n } else if (virusFile.has_ignored) {\n fileStatus = <span className=\"text-orange\">{gettext('Ignored')}</span>;\n fileOpList = ['do-not-ignore'];\n } else {\n fileStatus = <span className=\"text-red\">{gettext('Unhandled')}</span>;\n fileOpList = ['delete', 'ignore'];\n }\n\n return (\n <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <td className=\"text-center\">\n <input type=\"checkbox\" checked={virusFile.isSelected} onChange={this.toggleItemSelected} />\n </td>\n <td>{virusFile.repo_name}</td>\n <td>{virusFile.repo_owner}</td>\n <td>{virusFile.file_path}</td>\n <td>{fileStatus}</td>\n <td>\n {fileOpList.length > 0 && this.state.isOpIconShown &&\n <OpMenu\n operations={fileOpList}\n translateOperations={this.translateOperations}\n onMenuItemClick={this.onMenuItemClick}\n onFreezedItem={this.props.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n />\n }\n </td>\n </tr>\n );\n }\n}\n\nVirusFileItem.propTypes = virusFileItemPropTypes;\n\n\nconst virusFileListPropTypes = {\n loading: PropTypes.bool.isRequired,\n errorMsg: PropTypes.string.isRequired,\n virusFiles: PropTypes.array.isRequired\n};\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isItemFreezed: false\n };\n }\n\n onFreezedItem = () => {\n this.setState({isItemFreezed: true});\n }\n\n onUnfreezedItem = () => {\n this.setState({isItemFreezed: false});\n }\n\n getPreviousPage = () => {\n this.props.getListByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getListByPage(this.props.currentPage + 1);\n }\n\n render() {\n const {\n loading, errorMsg, virusFiles,\n curPerPage, hasNextPage, currentPage,\n isAllItemsSelected\n } = this.props;\n\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center mt-4\">{errorMsg}</p>;\n } else {\n return (\n <Fragment>\n <table>\n <thead>\n <tr>\n <th width=\"3%\" className=\"text-center\">\n <input type=\"checkbox\" checked={isAllItemsSelected} onChange={this.props.toggleAllSelected} />\n </th>\n <th width=\"24%\">{gettext('Library')}</th>\n <th width=\"25%\">{gettext('Owner')}</th>\n <th width=\"28%\">{gettext('Virus File')}</th>\n <th width=\"15%\">{gettext('Status')}</th>\n <th width=\"5%\">{/* Operations */}</th>\n </tr>\n </thead>\n <tbody>\n {virusFiles.map((virusFile, index) => {\n return (\n <VirusFileItem\n key={index}\n virusFile={virusFile}\n isItemFreezed={this.state.isItemFreezed}\n onFreezedItem={this.onFreezedItem}\n onUnfreezedItem={this.onUnfreezedItem}\n handleFile={this.props.handleFile}\n toggleItemSelected={this.props.toggleItemSelected}\n />\n );\n })}\n </tbody>\n </table>\n {virusFiles.length > 0 &&\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={curPerPage}\n resetPerPage={this.props.resetPerPage}\n />\n }\n </Fragment>\n );\n }\n }\n}\n\nContent.propTypes = virusFileListPropTypes;\n\n\nclass UnhandledVirusFiles extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n virusFiles: [],\n\n isAllItemsSelected: false,\n selectedItems: [],\n\n currentPage: 1,\n perPage: 25,\n hasNextPage: false\n };\n }\n\n componentDidMount() {\n let urlParams = (new URL(window.location)).searchParams;\n const {\n currentPage, perPage\n } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getListByPage(this.state.currentPage);\n });\n }\n\n getListByPage = (page) => {\n const { perPage } = this.state;\n const hasHandled = false;\n seafileAPI.listVirusFiles(page, perPage, hasHandled).then((res) => {\n const data = res.data;\n const items = data.virus_file_list.map(item => {\n item.isSelected = false;\n return item;\n });\n this.setState({\n loading: false,\n virusFiles: items,\n hasNextPage: data.has_next_page\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (perPage) => {\n this.setState({\n perPage: perPage\n }, () => {\n this.getListByPage(1);\n });\n }\n\n handleFile = (virusID, op) => {\n let request;\n switch(op) {\n case 'delete':\n request = seafileAPI.deleteVirusFile(virusID);\n break;\n case 'ignore':\n request = seafileAPI.toggleIgnoreVirusFile(virusID, true);\n break;\n case 'do-not-ignore':\n request = seafileAPI.toggleIgnoreVirusFile(virusID, false);\n break;\n }\n request.then((res) => {\n this.setState({\n virusFiles: this.state.virusFiles.map((item) => {\n if (item.virus_id == virusID) {\n if (op == 'delete') {\n item.has_deleted = true;\n } else {\n item = res.data.virus_file;\n }\n }\n return item;\n })\n });\n }).catch((error) => {\n toaster.danger(Utils.getErrorMsg(error));\n });\n }\n\n toggleAllSelected = () => {\n this.setState((prevState) => ({\n isAllItemsSelected: !prevState.isAllItemsSelected,\n virusFiles: this.state.virusFiles.map((item) => {\n item.isSelected = !prevState.isAllItemsSelected;\n return item;\n })\n }));\n }\n\n toggleItemSelected = (targetItem, isSelected) => {\n this.setState({\n virusFiles: this.state.virusFiles.map((item) => {\n if (item === targetItem) {\n item.isSelected = isSelected;\n }\n return item;\n })\n }, () => {\n this.setState({\n isAllItemsSelected: !this.state.virusFiles.some(item => !item.isSelected)\n });\n });\n }\n\n handleSelectedItems = (op) => {\n // op: 'delete-virus', 'ignore-virus'\n const virusIDs = this.state.virusFiles\n .filter(item => {\n if (op == 'delete-virus') {\n return item.isSelected && !item.has_deleted;\n } else {\n return item.isSelected && !item.has_ignored;\n }\n })\n .map(item => item.virus_id);\n seafileAPI.batchProcessVirusFiles(virusIDs, op).then((res) => {\n let fileList = this.state.virusFiles;\n res.data.success.forEach(item => {\n let file = fileList.find(file => file.virus_id == item.virus_id);\n if (op == 'delete-virus') {\n file.has_deleted = true;\n } else {\n file.has_ignored = true;\n }\n });\n this.setState({\n virusFiles: fileList\n });\n\n res.data.failed.forEach(item => {\n const file = fileList.find(file => file.virus_id == item.virus_id);\n let errMsg = op == 'delete-virus' ?\n gettext('Failed to delete %(virus_file) from library %(library): %(error_msg)') :\n gettext('Failed to ignore %(virus_file) from library %(library): %(error_msg)');\n errMsg = errMsg.replace('%(virus_file)', file.file_path)\n .replace('%(library)', file.repo_name)\n .replace('%(error_msg)', item.error_msg);\n toaster.danger(errMsg);\n });\n }).catch((error) => {\n toaster.danger(Utils.getErrorMsg(error));\n });\n }\n\n deleteSelectedItems = () => {\n const op = 'delete-virus';\n this.handleSelectedItems(op);\n }\n\n ignoreSelectedItems = () => {\n const op = 'ignore-virus';\n this.handleSelectedItems(op);\n }\n\n render() {\n return (\n <Fragment>\n {this.state.virusFiles.some(item => item.isSelected) ? (\n <MainPanelTopbar>\n <Fragment>\n <Button onClick={this.deleteSelectedItems} className=\"operation-item\">{gettext('Delete')}</Button>\n <Button onClick={this.ignoreSelectedItems} className=\"operation-item\">{gettext('Ignore')}</Button>\n </Fragment>\n </MainPanelTopbar>\n ) : <MainPanelTopbar />\n }\n <div className=\"main-panel-center\">\n <div className=\"cur-view-container\">\n <Nav currentItem=\"unhandled\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n virusFiles={this.state.virusFiles}\n currentPage={this.state.currentPage}\n hasNextPage={this.state.hasNextPage}\n curPerPage={this.state.perPage}\n resetPerPage={this.resetPerPage}\n getListByPage={this.getListByPage}\n handleFile={this.handleFile}\n isAllItemsSelected={this.state.isAllItemsSelected}\n toggleAllSelected={this.toggleAllSelected}\n toggleItemSelected={this.toggleItemSelected}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default UnhandledVirusFiles;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from '@reach/router';\nimport { siteRoot, gettext } from '../../../utils/constants';\n\nconst propTypes = {\n currentItem: PropTypes.string.isRequired\n};\n\nclass LogsNav extends React.Component {\n\n constructor(props) {\n super(props);\n this.navItems = [\n {name: 'adminOperationLogs', urlPart:'admin-logs/operation', text: gettext('Admin Operation Logs')},\n {name: 'adminLoginLogs', urlPart:'admin-logs/login', text: gettext('Admin Login Logs')},\n ];\n }\n\n render() {\n const { currentItem } = this.props;\n return (\n <div className=\"cur-view-path tab-nav-container\">\n <ul className=\"nav\">\n {this.navItems.map((item, index) => {\n return (\n <li className=\"nav-item\" key={index}>\n <Link to={`${siteRoot}sys/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n}\n\nLogsNav.propTypes = propTypes;\n\nexport default LogsNav;\n","import React, { Component, Fragment } from 'react';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot, enableSysAdminViewRepo, isPro } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport EmptyTip from '../../../components/empty-tip';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport LogsNav from './logs-nav';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getLogsByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getLogsByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, perPage, currentPage, hasNextPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No Admin operation logs')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"20%\">{gettext('Name')}</th>\n <th width=\"15%\">{gettext('Operation')}</th>\n <th width=\"50%\">{gettext('Detail')}</th>\n <th width=\"15%\">{gettext('Time')}</th>\n </tr>\n </thead>\n {items &&\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n />);\n })}\n </tbody>\n }\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpIconShown: false,\n };\n }\n\n getOperationText = (operationType) => {\n switch (operationType) {\n case 'repo_create': return gettext('Create Library');\n case 'repo_delete': return gettext('Delete Library');\n case 'repo_transfer': return gettext('Transfer Library');\n case 'group_create': return gettext('Create Group');\n case 'group_transfer': return gettext('Transfer Group');\n case 'group_delete': return gettext('Delete Group');\n case 'user_add': return gettext('Add User');\n case 'user_delete': return gettext('Delete User');\n default: return '';\n }\n }\n\n getOperationDetail = (item) => {\n let detail = item.detail;\n\n let ownerPageUrl = '';\n if (detail.owner) {\n ownerPageUrl = siteRoot + 'sys/users/' + encodeURIComponent(detail.owner) + '/';\n }\n let userPageUrl = '';\n if (detail.email) {\n userPageUrl = siteRoot + 'sys/users/' + encodeURIComponent(detail.email) + '/';\n }\n let detailText = '';\n let repoPageUrl = '';\n let groupPageUrl = '';\n if (item.operation == 'repo_create' || item.operation == 'repo_delete' || item.operation == 'repo_transfer') {\n repoPageUrl = siteRoot + 'sys/libraries/' + detail.id + '/' + encodeURIComponent(detail.name) + '/';\n }\n if (item.operation == 'group_create' || item.operation == 'group_delete' || item.operation == 'group_transfer') {\n groupPageUrl = siteRoot + 'sys/groups/' + detail.id + '/libraries/';\n }\n\n switch (item.operation) {\n case 'repo_create':\n detailText = gettext('Created library {library_name} with {owner} as its owner')\n .replace('{owner}', '<a href=\"' + ownerPageUrl + '\">' + detail.owner + '</a>');\n if (isPro && enableSysAdminViewRepo) {\n detailText = detailText.replace('{library_name}', '<a href=\"' + repoPageUrl + '\">' + detail.name + '</a>');\n } else {\n detailText = detailText.replace('{library_name}', '<span class=\"font-weight-bold\">' + detail.name + '</span>');\n }\n return detailText;\n\n case 'repo_delete':\n detailText = gettext('Deleted library {library_name}')\n .replace('{library_name}', '<span class=\"font-weight-bold\">' + detail.name + '</span>');\n return detailText;\n\n case 'repo_transfer':\n detailText = gettext('Transferred library {library_name} from {user_from} to {user_to}')\n .replace('{user_from}', '<span class=\"font-weight-bold\">' + detail.from + '</span>')\n .replace('{user_to}', '<span class=\"font-weight-bold\">' + detail.to+ '</span>');\n if (isPro && enableSysAdminViewRepo) {\n detailText = detailText.replace('{library_name}', '<a href=\"' + repoPageUrl + '\">' + detail.name + '</a>');\n } else {\n detailText = detailText.replace('{library_name}', '<span class=\"font-weight-bold\">' + detail.name + '</span>');\n }\n return detailText;\n\n case 'group_create':\n detailText = gettext('Created group {group_name}')\n .replace('{group_name}', '<a href=\"' + groupPageUrl + '\">' + detail.name+ '</a>');\n return detailText;\n\n case 'group_transfer':\n detailText = gettext('Transferred group {group_name} from {user_from} to {user_to}')\n .replace('{user_from}', '<span class=\"font-weight-bold\">' + detail.from + '</span>')\n .replace('{user_to}', '<span class=\"font-weight-bold\">' + detail.to+ '</span>')\n .replace('{group_name}', '<a href=\"' + groupPageUrl + '\">' + detail.name+ '</a>');\n return detailText;\n\n case 'group_delete':\n detailText = gettext('Deleted group {group_name}')\n .replace('{group_name}', '<span class=\"font-weight-bold\">' + detail.name + '</span>');\n return detailText;\n\n case 'user_add':\n detailText = gettext('Added user {user}')\n .replace('{user}', '<a href=\"' + userPageUrl + '\">' + detail.email+ '</a>');\n return detailText;\n\n case 'user_delete':\n detailText = gettext('Deleted user {user}')\n .replace('{user}', '<span class=\"font-weight-bold\">' + detail.email+ '</span>');\n return detailText;\n\n default: return '';\n }\n }\n\n render() {\n let { item } = this.props;\n return (\n <tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <td><UserLink email={item.email} name={item.name} /></td>\n <td>{this.getOperationText(item.operation)}</td>\n <td>\n <span dangerouslySetInnerHTML={{__html: this.getOperationDetail(item)}}></span>\n </td>\n <td>{moment(item.datetime).fromNow()}</td>\n </tr>\n );\n }\n}\n\nclass AdminOperationLogs extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n logList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n };\n this.initPage = 1;\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getLogsByPage(this.state.currentPage);\n });\n }\n\n getLogsByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListAdminLogs(page, perPage).then((res) => {\n this.setState({\n logList: res.data.data,\n loading: false,\n currentPage: page,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.total_count),\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getLogsByPage(this.initPage));\n }\n\n render() {\n let { logList, currentPage, perPage, hasNextPage } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <LogsNav currentItem=\"adminOperationLogs\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={logList}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getLogsByPage={this.getLogsByPage}\n resetPerPage={this.resetPerPage}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default AdminOperationLogs;\n","import React, { Component, Fragment } from 'react';\nimport { seafileAPI } from '../../../utils/seafile-api';\nimport { gettext, siteRoot } from '../../../utils/constants';\nimport { Utils } from '../../../utils/utils';\nimport EmptyTip from '../../../components/empty-tip';\nimport moment from 'moment';\nimport Loading from '../../../components/loading';\nimport Paginator from '../../../components/paginator';\nimport LogsNav from './logs-nav';\nimport MainPanelTopbar from '../main-panel-topbar';\nimport UserLink from '../user-link';\n\n\nclass Content extends Component {\n\n constructor(props) {\n super(props);\n }\n\n getPreviousPage = () => {\n this.props.getLogsByPage(this.props.currentPage - 1);\n }\n\n getNextPage = () => {\n this.props.getLogsByPage(this.props.currentPage + 1);\n }\n\n render() {\n const { loading, errorMsg, items, perPage, currentPage, hasNextPage } = this.props;\n if (loading) {\n return <Loading />;\n } else if (errorMsg) {\n return <p className=\"error text-center\">{errorMsg}</p>;\n } else {\n const emptyTip = (\n <EmptyTip>\n <h2>{gettext('No Admin login logs')}</h2>\n </EmptyTip>\n );\n const table = (\n <Fragment>\n <table className=\"table-hover\">\n <thead>\n <tr>\n <th width=\"25%\">{gettext('Name')}</th>\n <th width=\"25%\">{gettext('IP')}</th>\n <th width=\"25%\">{gettext('Status')}</th>\n <th width=\"25%\">{gettext('Time')}</th>\n </tr>\n </thead>\n {items &&\n <tbody>\n {items.map((item, index) => {\n return (<Item\n key={index}\n item={item}\n />);\n })}\n </tbody>\n }\n </table>\n <Paginator\n gotoPreviousPage={this.getPreviousPage}\n gotoNextPage={this.getNextPage}\n currentPage={currentPage}\n hasNextPage={hasNextPage}\n curPerPage={perPage}\n resetPerPage={this.props.resetPerPage}\n />\n </Fragment>\n );\n return items.length ? table : emptyTip;\n }\n }\n}\n\nclass Item extends Component {\n\n constructor(props) {\n super(props);\n }\n\n render() {\n let { item } = this.props;\n return (\n <tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <td><UserLink email={item.email} name={item.name} /></td>\n <td>{item.login_ip}</td>\n <td>{item.login_success ? gettext('Success') : gettext('Failed')}</td>\n <td>{moment(item.login_time).fromNow()}</td>\n </tr>\n );\n }\n}\n\nclass AdminLoginLogs extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n errorMsg: '',\n logList: [],\n perPage: 25,\n currentPage: 1,\n hasNextPage: false,\n };\n this.initPage = 1;\n }\n\n componentDidMount () {\n let urlParams = (new URL(window.location)).searchParams;\n const { currentPage, perPage } = this.state;\n this.setState({\n perPage: parseInt(urlParams.get('per_page') || perPage),\n currentPage: parseInt(urlParams.get('page') || currentPage)\n }, () => {\n this.getLogsByPage(this.state.currentPage);\n });\n }\n\n getLogsByPage = (page) => {\n let { perPage } = this.state;\n seafileAPI.sysAdminListAdminLoginLogs(page, perPage).then((res) => {\n this.setState({\n logList: res.data.data,\n loading: false,\n currentPage: page,\n hasNextPage: Utils.hasNextPage(page, perPage, res.data.total_count),\n });\n }).catch((error) => {\n this.setState({\n loading: false,\n errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403\n });\n });\n }\n\n resetPerPage = (newPerPage) => {\n this.setState({\n perPage: newPerPage,\n }, () => this.getLogsByPage(this.initPage));\n }\n\n render() {\n let { logList, currentPage, perPage, hasNextPage } = this.state;\n return (\n <Fragment>\n <MainPanelTopbar />\n <div className=\"main-panel-center flex-row\">\n <div className=\"cur-view-container\">\n <LogsNav currentItem=\"adminLoginLogs\" />\n <div className=\"cur-view-content\">\n <Content\n loading={this.state.loading}\n errorMsg={this.state.errorMsg}\n items={logList}\n currentPage={currentPage}\n perPage={perPage}\n hasNextPage={hasNextPage}\n getLogsByPage={this.getLogsByPage}\n resetPerPage={this.resetPerPage}\n />\n </div>\n </div>\n </div>\n </Fragment>\n );\n }\n}\n\nexport default AdminLoginLogs;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Router } from '@reach/router';\nimport { siteRoot } from '../../utils/constants';\nimport SidePanel from './side-panel';\nimport MainPanel from './main-panel';\n\nimport Info from './info';\n\nimport StatisticFile from './statistic/statistic-file';\nimport StatisticStorage from './statistic/statistic-storage';\nimport StatisticTraffic from './statistic/statistic-traffic';\nimport StatisticUsers from './statistic/statistic-users';\nimport StatisticReport from './statistic/statistic-reports';\n\nimport DesktopDevices from './devices/desktop-devices';\nimport MobileDevices from './devices/mobile-devices';\nimport DeviceErrors from './devices/devices-errors';\nimport AbuseReports from './abuse-reports';\n\nimport Users from './users/users';\nimport AdminUsers from './users/admin-users';\nimport LDAPImportedUsers from './users/ldap-imported-users';\nimport LDAPUsers from './users/ldap-users';\nimport SearchUsers from './users/search-users';\nimport User from './users/user-info';\nimport UserOwnedRepos from './users/user-repos';\nimport UserSharedRepos from './users/user-shared-repos';\nimport UserLinks from './users/user-links';\nimport UserGroups from './users/user-groups';\n\nimport AllRepos from './repos/all-repos';\nimport SystemRepo from './repos/system-repo';\nimport TrashRepos from './repos/trash-repos';\nimport SearchRepos from './repos/search-repos';\nimport DirView from './repos/dir-view';\n\nimport Groups from './groups/groups';\nimport SearchGroups from './groups/search-groups';\nimport GroupRepos from './groups/group-repos';\nimport GroupMembers from './groups/group-members';\n\nimport Departments from './departments/departments';\nimport DepartmentsList from './departments/departments-list';\nimport DepartmentDetail from './departments/department-detail';\n\nimport ShareLinks from './links/share-links';\nimport UploadLinks from './links/upload-links';\n\nimport Orgs from './orgs/orgs';\nimport SearchOrgs from './orgs/search-orgs';\nimport OrgInfo from './orgs/org-info';\nimport OrgUsers from './orgs/org-users';\nimport OrgGroups from './orgs/org-groups';\nimport OrgRepos from './orgs/org-repos';\n\nimport Institutions from './institutions/institutions';\nimport InstitutionInfo from './institutions/institution-info';\nimport InstitutionUsers from './institutions/institution-users';\nimport InstitutionAdmins from './institutions/institution-admins';\n\nimport LoginLogs from './logs-page/login-logs';\nimport FileAccessLogs from './logs-page/file-access-logs';\nimport FileUpdateLogs from './logs-page/file-update-logs';\nimport SharePermissionLogs from './logs-page/share-permission-logs';\n\nimport WebSettings from './web-settings/web-settings';\nimport Notifications from './notifications/notifications';\nimport FileScanRecords from './file-scan-records';\nimport WorkWeixinDepartments from './work-weixin-departments';\nimport DingtalkDepartments from './dingtalk-departments';\nimport Invitations from './invitations/invitations';\nimport TermsAndConditions from './terms-and-conditions/terms-and-conditions';\n\nimport AllVirusFiles from './virus-scan/all-virus-files';\nimport UnhandledVirusFiles from './virus-scan/unhandled-virus-files';\n\nimport AdminOperationLogs from './admin-logs/operation-logs';\nimport AdminLoginLogs from './admin-logs/login-logs';\n\nimport '../../css/layout.css';\nimport '../../css/toolbar.css';\n\nclass SysAdmin extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n isSidePanelClosed: false,\n currentTab: 'file-scan'\n };\n }\n\n componentDidMount() {\n let href = window.location.href.split('/');\n let currentTab = href[href.length - 2];\n\n const pageList = [\n {\n tab: 'devices',\n urlPartList: ['desktop-devices', 'mobile-devices', 'device-errors']\n },\n {\n tab: 'libraries',\n urlPartList: ['all-libraries', 'search-libraries', 'system-library', 'trash-libraries', 'libraries/']\n },\n {\n tab: 'statistic',\n urlPartList: ['statistics/file', 'statistics/storage', 'statistics/user', 'statistics/traffic', 'statistics/reports']\n },\n {\n tab: 'users',\n urlPartList: ['users/', 'search-users/']\n },\n {\n tab: 'groups',\n urlPartList: ['groups/', 'search-groups/']\n },\n {\n tab: 'organizations',\n urlPartList: ['organizations/', 'search-organizations/']\n },\n {\n tab: 'links',\n urlPartList: ['share-links/', 'upload-links/']\n },\n {\n tab: 'institutions',\n urlPartList: ['institutions/']\n },\n {\n tab: 'termsandconditions',\n urlPartList: ['terms-and-conditions/']\n },\n {\n tab: 'departments',\n urlPartList: ['departments/']\n },\n {\n tab: 'logs',\n urlPartList: ['logs/']\n },\n {\n tab: 'virus-files',\n urlPartList: ['virus-files/']\n },\n {\n tab: 'adminLogs',\n urlPartList: ['admin-logs/']\n }\n ];\n const tmpTab = this.getCurrentTabForPageList(pageList);\n currentTab = tmpTab ? tmpTab : currentTab;\n\n this.setState({currentTab: currentTab});\n }\n\n getCurrentTabForPageList = (pageList) => {\n let urlPartList, tab;\n const urlBase = `${siteRoot}sys/`;\n for (let i = 0, len = pageList.length; i < len; i++) {\n urlPartList = pageList[i].urlPartList;\n tab = pageList[i].tab;\n for (let j = 0, jlen = urlPartList.length; j < jlen; j++) {\n if (location.href.indexOf(`${urlBase}${urlPartList[j]}`) != -1) {\n return tab;\n }\n }\n }\n }\n\n onCloseSidePanel = () => {\n this.setState({isSidePanelClosed: !this.state.isSidePanelClosed});\n }\n\n tabItemClick = (param) => {\n this.setState({currentTab: param});\n }\n\n render() {\n let { currentTab, isSidePanelClosed } = this.state;\n\n return (\n <div id=\"main\">\n <SidePanel\n isSidePanelClosed={isSidePanelClosed}\n onCloseSidePanel={this.onCloseSidePanel}\n currentTab={currentTab}\n tabItemClick={this.tabItemClick}\n />\n <MainPanel>\n <Router className=\"reach-router\">\n <Info path={siteRoot + 'sys/info'} />\n <StatisticFile path={siteRoot + 'sys/statistics/file'} />\n <StatisticStorage path={siteRoot + 'sys/statistics/storage'} />\n <StatisticUsers path={siteRoot + 'sys/statistics/user'} />\n <StatisticTraffic path={siteRoot + 'sys/statistics/traffic'} />\n <StatisticReport path={siteRoot + 'sys/statistics/reports'} />\n <DesktopDevices path={siteRoot + 'sys/desktop-devices'} />\n <MobileDevices path={siteRoot + 'sys/mobile-devices'} />\n <DeviceErrors path={siteRoot + 'sys/device-errors'} />\n <AllRepos path={siteRoot + 'sys/all-libraries'} />\n <SystemRepo path={siteRoot + 'sys/system-library'} />\n <TrashRepos path={siteRoot + 'sys/trash-libraries'} />\n <SearchRepos path={siteRoot + 'sys/search-libraries'} />\n <DirView path={siteRoot + 'sys/libraries/:repoID/*'} />\n <WebSettings path={siteRoot + 'sys/web-settings'} />\n <Notifications path={siteRoot + 'sys/notifications'} />\n <Groups path={siteRoot + 'sys/groups'} />\n <SearchGroups path={siteRoot + 'sys/search-groups'} />\n <GroupRepos path={siteRoot + 'sys/groups/:groupID/libraries'} />\n <GroupMembers path={siteRoot + 'sys/groups/:groupID/members'} />\n <Departments path={siteRoot + 'sys/departments'}>\n <DepartmentsList path='/'/>\n <DepartmentDetail path='/:groupID'/>\n </Departments>\n <ShareLinks path={siteRoot + 'sys/share-links'} />\n <UploadLinks path={siteRoot + 'sys/upload-links'} />\n <Orgs path={siteRoot + 'sys/organizations'} />\n <SearchOrgs path={siteRoot + 'sys/search-organizations'} />\n <OrgInfo path={siteRoot + 'sys/organizations/:orgID/info'} />\n <OrgUsers path={siteRoot + 'sys/organizations/:orgID/users'} />\n <OrgGroups path={siteRoot + 'sys/organizations/:orgID/groups'} />\n <OrgRepos path={siteRoot + 'sys/organizations/:orgID/libraries'} />\n <Institutions path={siteRoot + 'sys/institutions'} />\n <InstitutionInfo path={siteRoot + 'sys/institutions/:institutionID/info'} />\n <InstitutionUsers path={siteRoot + 'sys/institutions/:institutionID/members'} />\n <InstitutionAdmins path={siteRoot + 'sys/institutions/:institutionID/admins'} />\n <LoginLogs path={siteRoot + 'sys/logs/login'} />\n <FileAccessLogs path={siteRoot + 'sys/logs/file-access'} />\n <FileUpdateLogs path={siteRoot + 'sys/logs/file-update'} />\n <SharePermissionLogs path={siteRoot + 'sys/logs/share-permission'} />\n <AdminOperationLogs path={siteRoot + 'sys/admin-logs/operation'} />\n <AdminLoginLogs path={siteRoot + 'sys/admin-logs/login'} />\n\n <Users path={siteRoot + 'sys/users'} />\n <AdminUsers path={siteRoot + 'sys/users/admins'} />\n <LDAPImportedUsers path={siteRoot + 'sys/users/ldap-imported'} />\n <LDAPUsers path={siteRoot + 'sys/users/ldap'} />\n <SearchUsers path={siteRoot + 'sys/search-users'} />\n <User path={siteRoot + 'sys/users/:email'} />\n <UserOwnedRepos path={siteRoot + 'sys/users/:email/owned-libraries'} />\n <UserSharedRepos path={siteRoot + 'sys/users/:email/shared-libraries'} />\n <UserLinks path={siteRoot + 'sys/users/:email/shared-links'} />\n <UserGroups path={siteRoot + 'sys/users/:email/groups'} />\n\n <Invitations path={siteRoot + 'sys/invitations'} />\n <TermsAndConditions path={siteRoot + 'sys/terms-and-conditions/'} />\n\n <AllVirusFiles path={siteRoot + 'sys/virus-files/all'} />\n <UnhandledVirusFiles path={siteRoot + 'sys/virus-files/unhandled'} />\n\n <FileScanRecords\n path={siteRoot + 'sys/file-scan-records'}\n currentTab={currentTab}\n tabItemClick={this.tabItemClick}\n />\n\n <WorkWeixinDepartments\n path={siteRoot + 'sys/work-weixin'}\n currentTab={currentTab}\n tabItemClick={this.tabItemClick}\n />\n <DingtalkDepartments\n path={siteRoot + 'sys/dingtalk'}\n currentTab={currentTab}\n tabItemClick={this.tabItemClick}\n />\n <AbuseReports path={siteRoot + 'sys/abuse-reports'} />\n </Router>\n </MainPanel>\n </div>\n );\n }\n}\n\nReactDOM.render(\n <SysAdmin />,\n document.getElementById('wrapper')\n);\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap';\nimport copy from '../copy-to-clipboard';\nimport { gettext } from '../../utils/constants';\nimport toaster from '../../components/toast';\n\nconst propTypes = {\n link: PropTypes.string.isRequired,\n toggleDialog: PropTypes.func.isRequired\n};\n\nclass ShareAdminLink extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n copyToClipboard = () => {\n copy(this.props.link);\n this.props.toggleDialog();\n toaster.success(gettext('The link is copied to the clipboard.')), {duration: 2};\n }\n\n render() {\n const { link, toggleDialog } = this.props;\n return (\n <Modal isOpen={true} toggle={toggleDialog}>\n <ModalHeader toggle={toggleDialog}>{gettext('Link')}</ModalHeader>\n <ModalBody>\n <a href={link}>{link}</a>\n </ModalBody>\n <ModalFooter>\n <Button color=\"primary\" onClick={this.copyToClipboard}>{gettext('Copy')}</Button>\n <Button color=\"secondary\" onClick={toggleDialog}>{gettext('Close')}</Button>\n </ModalFooter>\n </Modal>\n );\n }\n}\n\nShareAdminLink.propTypes = propTypes;\n\nexport default ShareAdminLink;\n","import isFunction from 'lodash.isfunction';\n\n// https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/js/src/modal.js#L436-L443\nexport function getScrollbarWidth() {\n let scrollDiv = document.createElement('div');\n // .modal-scrollbar-measure styles // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/scss/_modal.scss#L106-L113\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.width = '50px';\n scrollDiv.style.height = '50px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n}\n\nexport function setScrollbarWidth(padding) {\n document.body.style.paddingRight = padding > 0 ? `${padding}px` : null;\n}\n\nexport function isBodyOverflowing() {\n return document.body.clientWidth < window.innerWidth;\n}\n\nexport function getOriginalBodyPadding() {\n const style = window.getComputedStyle(document.body, null);\n\n return parseInt(\n (style && style.getPropertyValue('padding-right')) || 0,\n 10\n );\n}\n\nexport function conditionallyUpdateScrollbar() {\n const scrollbarWidth = getScrollbarWidth();\n // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.6/js/src/modal.js#L433\n const fixedContent = document.querySelectorAll('.fixed-top, .fixed-bottom, .is-fixed, .sticky-top')[0];\n const bodyPadding = fixedContent ? parseInt(\n fixedContent.style.paddingRight || 0,\n 10\n ) : 0;\n\n if (isBodyOverflowing()) {\n setScrollbarWidth(bodyPadding + scrollbarWidth);\n }\n}\n\nlet globalCssModule;\n\nexport function setGlobalCssModule(cssModule) {\n globalCssModule = cssModule;\n}\n\nexport function mapToCssModules(className = '', cssModule = globalCssModule) {\n if (!cssModule) return className;\n return className.split(' ').map(c => cssModule[c] || c).join(' ');\n}\n\n/**\n * Returns a new object with the key/value pairs from `obj` that are not in the array `omitKeys`.\n */\nexport function omit(obj, omitKeys) {\n const result = {};\n Object.keys(obj).forEach((key) => {\n if (omitKeys.indexOf(key) === -1) {\n result[key] = obj[key];\n }\n });\n return result;\n}\n\n/**\n * Returns a filtered copy of an object with only the specified keys.\n */\nexport function pick(obj, keys) {\n const pickKeys = Array.isArray(keys) ? keys : [keys];\n let length = pickKeys.length;\n let key;\n const result = {};\n\n while (length > 0) {\n length -= 1;\n key = pickKeys[length];\n result[key] = obj[key];\n }\n return result;\n}\n\nlet warned = {};\n\nexport function warnOnce(message) {\n if (!warned[message]) {\n /* istanbul ignore else */\n if (typeof console !== 'undefined') {\n console.error(message); // eslint-disable-line no-console\n }\n warned[message] = true;\n }\n}\n\nexport function deprecated(propType, explanation) {\n return function validate(props, propName, componentName, ...rest) {\n if (props[propName] !== null && typeof props[propName] !== 'undefined') {\n warnOnce(`\"${propName}\" property of \"${componentName}\" has been deprecated.\\n${explanation}`);\n }\n\n return propType(props, propName, componentName, ...rest);\n };\n}\n\nexport function DOMElement(props, propName, componentName) {\n if (!(props[propName] instanceof Element)) {\n return new Error(\n 'Invalid prop `' + propName + '` supplied to `' + componentName +\n '`. Expected prop to be an instance of Element. Validation failed.'\n );\n }\n}\n\nexport function getTarget(target) {\n if (isFunction(target)) {\n return target();\n }\n\n if (typeof target === 'string' && document) {\n let selection = document.querySelector(target);\n if (selection === null) {\n selection = document.querySelector(`#${target}`);\n }\n if (selection === null) {\n throw new Error(`The target '${target}' could not be identified in the dom, tip: check spelling`);\n }\n return selection;\n }\n\n return target;\n}\n\n\n/* eslint key-spacing: [\"error\", { afterColon: true, align: \"value\" }] */\n// These are all setup to match what is in the bootstrap _variables.scss\n// https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss\nexport const TransitionTimeouts = {\n Fade: 150, // $transition-fade\n Collapse: 350, // $transition-collapse\n Modal: 300, // $modal-transition\n Carousel: 600, // $carousel-transition\n};\n\n// Duplicated Transition.propType keys to ensure that Reactstrap builds\n// for distribution properly exclude these keys for nested child HTML attributes\n// since `react-transition-group` removes propTypes in production builds.\nexport const TransitionPropTypeKeys = [\n 'in',\n 'mountOnEnter',\n 'unmountOnExit',\n 'appear',\n 'enter',\n 'exit',\n 'timeout',\n 'onEnter',\n 'onEntering',\n 'onEntered',\n 'onExit',\n 'onExiting',\n 'onExited',\n];\n\nexport const TransitionStatuses = {\n ENTERING: 'entering',\n ENTERED: 'entered',\n EXITING: 'exiting',\n EXITED: 'exited',\n};\n\nexport const keyCodes = {\n esc: 27,\n space: 32,\n tab: 9,\n up: 38,\n down: 40,\n};\n\nexport const PopperPlacements = [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n fluid: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div',\n};\n\nconst Container = (props) => {\n const {\n className,\n cssModule,\n fluid,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n fluid ? 'container-fluid' : 'container'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nContainer.propTypes = propTypes;\nContainer.defaultProps = defaultProps;\n\nexport default Container;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n noGutters: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst Row = (props) => {\n const {\n className,\n cssModule,\n noGutters,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n noGutters ? 'no-gutters' : null,\n 'row'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nRow.propTypes = propTypes;\nRow.defaultProps = defaultProps;\n\nexport default Row;\n","import isobject from 'lodash.isobject';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, deprecated } from './utils';\n\nconst colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);\n\nconst columnProps = PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.number,\n PropTypes.string,\n PropTypes.shape({\n size: PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string]),\n push: deprecated(stringOrNumberProp, 'Please use the prop \"order\"'),\n pull: deprecated(stringOrNumberProp, 'Please use the prop \"order\"'),\n order: stringOrNumberProp,\n offset: stringOrNumberProp\n })\n]);\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n xs: columnProps,\n sm: columnProps,\n md: columnProps,\n lg: columnProps,\n xl: columnProps,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n widths: PropTypes.array,\n};\n\nconst defaultProps = {\n tag: 'div',\n widths: colWidths,\n};\n\nconst getColumnSizeClass = (isXs, colWidth, colSize) => {\n if (colSize === true || colSize === '') {\n return isXs ? 'col' : `col-${colWidth}`;\n } else if (colSize === 'auto') {\n return isXs ? 'col-auto' : `col-${colWidth}-auto`;\n }\n\n return isXs ? `col-${colSize}` : `col-${colWidth}-${colSize}`;\n};\n\nconst Col = (props) => {\n const {\n className,\n cssModule,\n widths,\n tag: Tag,\n ...attributes\n } = props;\n const colClasses = [];\n\n widths.forEach((colWidth, i) => {\n let columnProp = props[colWidth];\n\n delete attributes[colWidth];\n\n if (!columnProp && columnProp !== '') {\n return;\n }\n\n const isXs = !i;\n\n if (isobject(columnProp)) {\n const colSizeInterfix = isXs ? '-' : `-${colWidth}-`;\n const colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);\n\n colClasses.push(mapToCssModules(classNames({\n [colClass]: columnProp.size || columnProp.size === '',\n [`order${colSizeInterfix}${columnProp.order}`]: columnProp.order || columnProp.order === 0,\n [`offset${colSizeInterfix}${columnProp.offset}`]: columnProp.offset || columnProp.offset === 0\n }), cssModule));\n } else {\n const colClass = getColumnSizeClass(isXs, colWidth, columnProp);\n colClasses.push(colClass);\n }\n });\n\n if (!colClasses.length) {\n colClasses.push('col');\n }\n\n const classes = mapToCssModules(classNames(\n className,\n colClasses\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCol.propTypes = propTypes;\nCol.defaultProps = defaultProps;\n\nexport default Col;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, deprecated } from './utils';\n\nconst propTypes = {\n light: PropTypes.bool,\n dark: PropTypes.bool,\n inverse: deprecated(PropTypes.bool, 'Please use the prop \"dark\"'),\n full: PropTypes.bool,\n fixed: PropTypes.string,\n sticky: PropTypes.string,\n color: PropTypes.string,\n role: PropTypes.string,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n toggleable: deprecated(PropTypes.oneOfType([PropTypes.bool, PropTypes.string]), 'Please use the prop \"expand\"'),\n expand: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n};\n\nconst defaultProps = {\n tag: 'nav',\n expand: false,\n};\n\nconst getExpandClass = (expand) => {\n if (expand === false) {\n return false;\n } else if (expand === true || expand === 'xs') {\n return 'navbar-expand';\n }\n\n return `navbar-expand-${expand}`;\n};\n\n// To better maintain backwards compatibility while toggleable is deprecated.\n// We must map breakpoints to the next breakpoint so that toggleable and expand do the same things at the same breakpoint.\nconst toggleableToExpand = {\n xs: 'sm',\n sm: 'md',\n md: 'lg',\n lg: 'xl',\n};\n\nconst getToggleableClass = (toggleable) => {\n if (toggleable === undefined || toggleable === 'xl') {\n return false;\n } else if (toggleable === false) {\n return 'navbar-expand';\n }\n\n return `navbar-expand-${toggleable === true ? 'sm' : (toggleableToExpand[toggleable] || toggleable)}`;\n};\n\nconst Navbar = (props) => {\n const {\n toggleable,\n expand,\n className,\n cssModule,\n light,\n dark,\n inverse,\n fixed,\n sticky,\n color,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'navbar',\n getExpandClass(expand) || getToggleableClass(toggleable),\n {\n 'navbar-light': light,\n 'navbar-dark': inverse || dark,\n [`bg-${color}`]: color,\n [`fixed-${fixed}`]: fixed,\n [`sticky-${sticky}`]: sticky,\n }\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nNavbar.propTypes = propTypes;\nNavbar.defaultProps = defaultProps;\n\nexport default Navbar;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'a'\n};\n\nconst NavbarBrand = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'navbar-brand'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nNavbarBrand.propTypes = propTypes;\nNavbarBrand.defaultProps = defaultProps;\n\nexport default NavbarBrand;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n type: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n children: PropTypes.node,\n};\n\nconst defaultProps = {\n tag: 'button',\n type: 'button'\n};\n\nconst NavbarToggler = (props) => {\n const {\n className,\n cssModule,\n children,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'navbar-toggler'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes}>\n {children || <span className={mapToCssModules('navbar-toggler-icon', cssModule)} />}\n </Tag>\n );\n};\n\nNavbarToggler.propTypes = propTypes;\nNavbarToggler.defaultProps = defaultProps;\n\nexport default NavbarToggler;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tabs: PropTypes.bool,\n pills: PropTypes.bool,\n vertical: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n horizontal: PropTypes.string,\n justified: PropTypes.bool,\n fill: PropTypes.bool,\n navbar: PropTypes.bool,\n card: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'ul',\n vertical: false,\n};\n\nconst getVerticalClass = (vertical) => {\n if (vertical === false) {\n return false;\n } else if (vertical === true || vertical === 'xs') {\n return 'flex-column';\n }\n\n return `flex-${vertical}-column`;\n};\n\nconst Nav = (props) => {\n const {\n className,\n cssModule,\n tabs,\n pills,\n vertical,\n horizontal,\n justified,\n fill,\n navbar,\n card,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n navbar ? 'navbar-nav' : 'nav',\n horizontal ? `justify-content-${horizontal}` : false,\n getVerticalClass(vertical),\n {\n 'nav-tabs': tabs,\n 'card-header-tabs': card && tabs,\n 'nav-pills': pills,\n 'card-header-pills': card && pills,\n 'nav-justified': justified,\n 'nav-fill': fill,\n }\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nNav.propTypes = propTypes;\nNav.defaultProps = defaultProps;\n\nexport default Nav;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n active: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'li'\n};\n\nconst NavItem = (props) => {\n const {\n className,\n cssModule,\n active,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'nav-item',\n active ? 'active' : false\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nNavItem.propTypes = propTypes;\nNavItem.defaultProps = defaultProps;\n\nexport default NavItem;\n","/* eslint react/no-find-dom-node: 0 */\n// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport { Manager } from 'react-popper';\nimport classNames from 'classnames';\nimport { mapToCssModules, omit, keyCodes, deprecated } from './utils';\n\nconst propTypes = {\n disabled: PropTypes.bool,\n dropup: deprecated(PropTypes.bool, 'Please use the prop \"direction\" with the value \"up\".'),\n direction: PropTypes.oneOf(['up', 'down', 'left', 'right']),\n group: PropTypes.bool,\n isOpen: PropTypes.bool,\n nav: PropTypes.bool,\n active: PropTypes.bool,\n addonType: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['prepend', 'append'])]),\n size: PropTypes.string,\n tag: PropTypes.string,\n toggle: PropTypes.func,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n inNavbar: PropTypes.bool,\n};\n\nconst defaultProps = {\n isOpen: false,\n direction: 'down',\n nav: false,\n active: false,\n addonType: false,\n inNavbar: false,\n};\n\nconst childContextTypes = {\n toggle: PropTypes.func.isRequired,\n isOpen: PropTypes.bool.isRequired,\n direction: PropTypes.oneOf(['up', 'down', 'left', 'right']).isRequired,\n inNavbar: PropTypes.bool.isRequired,\n};\n\nclass Dropdown extends React.Component {\n constructor(props) {\n super(props);\n\n this.addEvents = this.addEvents.bind(this);\n this.handleDocumentClick = this.handleDocumentClick.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.removeEvents = this.removeEvents.bind(this);\n this.toggle = this.toggle.bind(this);\n }\n\n getChildContext() {\n return {\n toggle: this.props.toggle,\n isOpen: this.props.isOpen,\n direction: (this.props.direction === 'down' && this.props.dropup) ? 'up' : this.props.direction,\n inNavbar: this.props.inNavbar,\n };\n }\n\n componentDidMount() {\n this.handleProps();\n }\n\n componentDidUpdate(prevProps) {\n if (this.props.isOpen !== prevProps.isOpen) {\n this.handleProps();\n }\n }\n\n componentWillUnmount() {\n this.removeEvents();\n }\n\n getContainer() {\n return ReactDOM.findDOMNode(this);\n }\n\n addEvents() {\n ['click', 'touchstart', 'keyup'].forEach(event =>\n document.addEventListener(event, this.handleDocumentClick, true)\n );\n }\n\n removeEvents() {\n ['click', 'touchstart', 'keyup'].forEach(event =>\n document.removeEventListener(event, this.handleDocumentClick, true)\n );\n }\n\n handleDocumentClick(e) {\n if (e && (e.which === 3 || (e.type === 'keyup' && e.which !== keyCodes.tab))) return;\n const container = this.getContainer();\n\n if (container.contains(e.target) && container !== e.target && (e.type !== 'keyup' || e.which === keyCodes.tab)) {\n return;\n }\n\n this.toggle(e);\n }\n\n handleKeyDown(e) {\n if ([keyCodes.esc, keyCodes.up, keyCodes.down, keyCodes.space].indexOf(e.which) === -1 ||\n (/button/i.test(e.target.tagName) && e.which === keyCodes.space) ||\n /input|textarea/i.test(e.target.tagName)) {\n return;\n }\n\n e.preventDefault();\n if (this.props.disabled) return;\n\n const container = this.getContainer();\n\n if (e.which === keyCodes.space && this.props.isOpen && container !== e.target) {\n e.target.click();\n }\n\n if (e.which === keyCodes.esc || !this.props.isOpen) {\n this.toggle(e);\n container.querySelector('[aria-expanded]').focus();\n return;\n }\n\n const menuClass = mapToCssModules('dropdown-menu', this.props.cssModule);\n const itemClass = mapToCssModules('dropdown-item', this.props.cssModule);\n const disabledClass = mapToCssModules('disabled', this.props.cssModule);\n\n const items = container.querySelectorAll(`.${menuClass} .${itemClass}:not(.${disabledClass})`);\n\n if (!items.length) return;\n\n let index = -1;\n for (let i = 0; i < items.length; i += 1) {\n if (items[i] === e.target) {\n index = i;\n break;\n }\n }\n\n if (e.which === keyCodes.up && index > 0) {\n index -= 1;\n }\n\n if (e.which === keyCodes.down && index < items.length - 1) {\n index += 1;\n }\n\n if (index < 0) {\n index = 0;\n }\n\n items[index].focus();\n }\n\n handleProps() {\n if (this.props.isOpen) {\n this.addEvents();\n } else {\n this.removeEvents();\n }\n }\n\n toggle(e) {\n if (this.props.disabled) {\n return e && e.preventDefault();\n }\n\n return this.props.toggle(e);\n }\n\n render() {\n const {\n className,\n cssModule,\n dropup,\n isOpen,\n group,\n size,\n nav,\n active,\n addonType,\n ...attrs\n } = omit(this.props, ['toggle', 'disabled', 'inNavbar', 'direction']);\n\n const direction = (this.props.direction === 'down' && dropup) ? 'up' : this.props.direction;\n\n attrs.tag = attrs.tag || (nav ? 'li' : 'div');\n\n const classes = mapToCssModules(classNames(\n className,\n direction !== 'down' && `drop${direction}`,\n nav && active ? 'active' : false,\n {\n [`input-group-${addonType}`]: addonType,\n 'btn-group': group,\n [`btn-group-${size}`]: !!size,\n dropdown: !group && !addonType,\n show: isOpen,\n 'nav-item': nav\n }\n ), cssModule);\n return <Manager {...attrs} className={classes} onKeyDown={this.handleKeyDown} />;\n }\n}\n\nDropdown.propTypes = propTypes;\nDropdown.defaultProps = defaultProps;\nDropdown.childContextTypes = childContextTypes;\n\nexport default Dropdown;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n disabled: PropTypes.bool,\n active: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n onClick: PropTypes.func,\n href: PropTypes.any,\n};\n\nconst defaultProps = {\n tag: 'a',\n};\n\nclass NavLink extends React.Component {\n constructor(props) {\n super(props);\n\n this.onClick = this.onClick.bind(this);\n }\n\n onClick(e) {\n if (this.props.disabled) {\n e.preventDefault();\n return;\n }\n\n if (this.props.href === '#') {\n e.preventDefault();\n }\n\n if (this.props.onClick) {\n this.props.onClick(e);\n }\n }\n\n render() {\n let {\n className,\n cssModule,\n active,\n tag: Tag,\n innerRef,\n ...attributes\n } = this.props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'nav-link',\n {\n disabled: attributes.disabled,\n active: active\n }\n ), cssModule);\n\n return (\n <Tag {...attributes} ref={innerRef} onClick={this.onClick} className={classes} />\n );\n }\n}\n\nNavLink.propTypes = propTypes;\nNavLink.defaultProps = defaultProps;\n\nexport default NavLink;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'ol'\n};\n\nconst Breadcrumb = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'breadcrumb'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nBreadcrumb.propTypes = propTypes;\nBreadcrumb.defaultProps = defaultProps;\n\nexport default Breadcrumb;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n active: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'li'\n};\n\nconst BreadcrumbItem = (props) => {\n const {\n className,\n cssModule,\n active,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n active ? 'active' : false,\n 'breadcrumb-item'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nBreadcrumbItem.propTypes = propTypes;\nBreadcrumbItem.defaultProps = defaultProps;\n\nexport default BreadcrumbItem;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n active: PropTypes.bool,\n block: PropTypes.bool,\n color: PropTypes.string,\n disabled: PropTypes.bool,\n outline: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n onClick: PropTypes.func,\n size: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n color: 'secondary',\n tag: 'button',\n};\n\nclass Button extends React.Component {\n constructor(props) {\n super(props);\n\n this.onClick = this.onClick.bind(this);\n }\n\n onClick(e) {\n if (this.props.disabled) {\n e.preventDefault();\n return;\n }\n\n if (this.props.onClick) {\n this.props.onClick(e);\n }\n }\n\n render() {\n let {\n active,\n block,\n className,\n cssModule,\n color,\n outline,\n size,\n tag: Tag,\n innerRef,\n ...attributes\n } = this.props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'btn',\n `btn${outline ? '-outline' : ''}-${color}`,\n size ? `btn-${size}` : false,\n block ? 'btn-block' : false,\n { active, disabled: this.props.disabled }\n ), cssModule);\n\n if (attributes.href && Tag === 'button') {\n Tag = 'a';\n }\n\n return (\n <Tag\n type={(Tag === 'button' && attributes.onClick) ? 'button' : undefined}\n {...attributes}\n className={classes}\n ref={innerRef}\n onClick={this.onClick}\n />\n );\n }\n}\n\nButton.propTypes = propTypes;\nButton.defaultProps = defaultProps;\n\nexport default Button;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Dropdown from './Dropdown';\n\nconst propTypes = {\n children: PropTypes.node,\n};\n\nconst ButtonDropdown = (props) => {\n return (\n <Dropdown group {...props} />\n );\n};\n\nButtonDropdown.propTypes = propTypes;\n\nexport default ButtonDropdown;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n 'aria-label': PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n role: PropTypes.string,\n size: PropTypes.string,\n vertical: PropTypes.bool,\n};\n\nconst defaultProps = {\n tag: 'div',\n role: 'group',\n};\n\nconst ButtonGroup = (props) => {\n const {\n className,\n cssModule,\n size,\n vertical,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n size ? 'btn-group-' + size : false,\n vertical ? 'btn-group-vertical' : 'btn-group'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nButtonGroup.propTypes = propTypes;\nButtonGroup.defaultProps = defaultProps;\n\nexport default ButtonGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n 'aria-label': PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n role: PropTypes.string,\n};\n\nconst defaultProps = {\n tag: 'div',\n role: 'toolbar',\n};\n\nconst ButtonToolbar = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'btn-toolbar'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nButtonToolbar.propTypes = propTypes;\nButtonToolbar.defaultProps = defaultProps;\n\nexport default ButtonToolbar;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, omit } from './utils';\n\nconst propTypes = {\n children: PropTypes.node,\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n divider: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n header: PropTypes.bool,\n onClick: PropTypes.func,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n toggle: PropTypes.bool\n};\n\nconst contextTypes = {\n toggle: PropTypes.func\n};\n\nconst defaultProps = {\n tag: 'button',\n toggle: true\n};\n\nclass DropdownItem extends React.Component {\n constructor(props) {\n super(props);\n\n this.onClick = this.onClick.bind(this);\n this.getTabIndex = this.getTabIndex.bind(this);\n }\n\n onClick(e) {\n if (this.props.disabled || this.props.header || this.props.divider) {\n e.preventDefault();\n return;\n }\n\n if (this.props.onClick) {\n this.props.onClick(e);\n }\n\n if (this.props.toggle) {\n this.context.toggle(e);\n }\n }\n\n getTabIndex() {\n if (this.props.disabled || this.props.header || this.props.divider) {\n return '-1';\n }\n\n return '0';\n }\n\n render() {\n const tabIndex = this.getTabIndex();\n let {\n className,\n cssModule,\n divider,\n tag: Tag,\n header,\n active,\n ...props } = omit(this.props, ['toggle']);\n\n const classes = mapToCssModules(classNames(\n className,\n {\n disabled: props.disabled,\n 'dropdown-item': !divider && !header,\n active: active,\n 'dropdown-header': header,\n 'dropdown-divider': divider\n }\n ), cssModule);\n\n if (Tag === 'button') {\n if (header) {\n Tag = 'h6';\n } else if (divider) {\n Tag = 'div';\n } else if (props.href) {\n Tag = 'a';\n }\n }\n\n return (\n <Tag\n type={(Tag === 'button' && (props.onClick || this.props.toggle)) ? 'button' : undefined}\n {...props}\n tabIndex={tabIndex}\n className={classes}\n onClick={this.onClick}\n />\n );\n }\n}\n\nDropdownItem.propTypes = propTypes;\nDropdownItem.defaultProps = defaultProps;\nDropdownItem.contextTypes = contextTypes;\n\nexport default DropdownItem;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Popper } from 'react-popper';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.string,\n children: PropTypes.node.isRequired,\n right: PropTypes.bool,\n flip: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div',\n flip: true,\n};\n\nconst contextTypes = {\n isOpen: PropTypes.bool.isRequired,\n direction: PropTypes.oneOf(['up', 'down', 'left', 'right']).isRequired,\n inNavbar: PropTypes.bool.isRequired,\n};\n\nconst noFlipModifier = { flip: { enabled: false } };\n\nconst directionPositionMap = {\n up: 'top',\n left: 'left',\n right: 'right',\n down: 'bottom',\n};\n\nconst DropdownMenu = (props, context) => {\n const { className, cssModule, right, tag, flip, ...attrs } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'dropdown-menu',\n {\n 'dropdown-menu-right': right,\n show: context.isOpen,\n }\n ), cssModule);\n\n let Tag = tag;\n\n if (context.isOpen && !context.inNavbar) {\n Tag = Popper;\n\n const position1 = directionPositionMap[context.direction] || 'bottom';\n const position2 = right ? 'end' : 'start';\n attrs.placement = `${position1}-${position2}`;\n attrs.component = tag;\n attrs.modifiers = !flip ? noFlipModifier : undefined;\n }\n\n return (\n <Tag\n tabIndex=\"-1\"\n role=\"menu\"\n {...attrs}\n aria-hidden={!context.isOpen}\n className={classes}\n />\n );\n};\n\nDropdownMenu.propTypes = propTypes;\nDropdownMenu.defaultProps = defaultProps;\nDropdownMenu.contextTypes = contextTypes;\n\nexport default DropdownMenu;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Target } from 'react-popper';\nimport { mapToCssModules } from './utils';\nimport Button from './Button';\n\nconst propTypes = {\n caret: PropTypes.bool,\n color: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n disabled: PropTypes.bool,\n onClick: PropTypes.func,\n 'aria-haspopup': PropTypes.bool,\n split: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n nav: PropTypes.bool,\n};\n\nconst defaultProps = {\n 'aria-haspopup': true,\n color: 'secondary',\n};\n\nconst contextTypes = {\n isOpen: PropTypes.bool.isRequired,\n toggle: PropTypes.func.isRequired,\n inNavbar: PropTypes.bool.isRequired,\n};\n\nclass DropdownToggle extends React.Component {\n constructor(props) {\n super(props);\n\n this.onClick = this.onClick.bind(this);\n }\n\n onClick(e) {\n if (this.props.disabled) {\n e.preventDefault();\n return;\n }\n\n if (this.props.nav && !this.props.tag) {\n e.preventDefault();\n }\n\n if (this.props.onClick) {\n this.props.onClick(e);\n }\n\n this.context.toggle(e);\n }\n\n render() {\n const { className, color, cssModule, caret, split, nav, tag, ...props } = this.props;\n const ariaLabel = props['aria-label'] || 'Toggle Dropdown';\n const classes = mapToCssModules(classNames(\n className,\n {\n 'dropdown-toggle': caret || split,\n 'dropdown-toggle-split': split,\n 'nav-link': nav\n }\n ), cssModule);\n const children = props.children || <span className=\"sr-only\">{ariaLabel}</span>;\n\n let Tag;\n\n if (nav && !tag) {\n Tag = 'a';\n props.href = '#';\n } else if (!tag) {\n Tag = Button;\n props.color = color;\n props.cssModule = cssModule;\n } else {\n Tag = tag;\n }\n\n if (this.context.inNavbar) {\n return (\n <Tag\n {...props}\n className={classes}\n onClick={this.onClick}\n aria-expanded={this.context.isOpen}\n children={children}\n />\n );\n }\n\n return (\n <Target\n {...props}\n className={classes}\n component={Tag}\n onClick={this.onClick}\n aria-expanded={this.context.isOpen}\n children={children}\n />\n );\n }\n}\n\nDropdownToggle.propTypes = propTypes;\nDropdownToggle.defaultProps = defaultProps;\nDropdownToggle.contextTypes = contextTypes;\n\nexport default DropdownToggle;\n","'use strict';\n\nexports.__esModule = true;\nexports.classNamesShape = exports.timeoutsShape = undefined;\nexports.transitionTimeout = transitionTimeout;\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction transitionTimeout(transitionType) {\n var timeoutPropName = 'transition' + transitionType + 'Timeout';\n var enabledPropName = 'transition' + transitionType;\n\n return function (props) {\n // If the transition is enabled\n if (props[enabledPropName]) {\n // If no timeout duration is provided\n if (props[timeoutPropName] == null) {\n return new Error(timeoutPropName + ' wasn\\'t supplied to CSSTransitionGroup: ' + 'this can cause unreliable animations and won\\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.');\n\n // If the duration isn't a number\n } else if (typeof props[timeoutPropName] !== 'number') {\n return new Error(timeoutPropName + ' must be a number (in milliseconds)');\n }\n }\n\n return null;\n };\n}\n\nvar timeoutsShape = exports.timeoutsShape = _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.shape({\n enter: _propTypes2.default.number,\n exit: _propTypes2.default.number\n}).isRequired]);\n\nvar classNamesShape = exports.classNamesShape = _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n enter: _propTypes2.default.string,\n exit: _propTypes2.default.string,\n active: _propTypes2.default.string\n}), _propTypes2.default.shape({\n enter: _propTypes2.default.string,\n enterActive: _propTypes2.default.string,\n exit: _propTypes2.default.string,\n exitActive: _propTypes2.default.string\n})]);","'use strict';\n\nexports.__esModule = true;\nexports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require('react-dom');\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _PropTypes = require('./utils/PropTypes');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\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 UNMOUNTED = exports.UNMOUNTED = 'unmounted';\nvar EXITED = exports.EXITED = 'exited';\nvar ENTERING = exports.ENTERING = 'entering';\nvar ENTERED = exports.ENTERED = 'entered';\nvar EXITING = exports.EXITING = 'exiting';\n\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 * 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 components.\n * It's up to you to give meaning and effect to those states. For example we can\n * add styles to a component when it enters or exits:\n *\n * ```jsx\n * import Transition from 'react-transition-group/Transition';\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: 0 },\n * entered: { opacity: 1 },\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 * As noted the `Transition` component doesn't _do_ anything by itself to its child component.\n * What it does do is track transition states over time so you can update the\n * component (such as by adding styles or classes) when it changes states.\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 begins the\n * \"Enter\" stage. During this stage, the component will shift from its current transition state,\n * to `'entering'` for the duration of the transition and then to the `'entered'` stage once\n * it's complete. Let's take the following example:\n *\n * ```jsx\n * state= { in: false };\n *\n * toggleEnterState = () => {\n * this.setState({ in: true });\n * }\n *\n * render() {\n * return (\n * <div>\n * <Transition in={this.state.in} timeout={500} />\n * <button onClick={this.toggleEnterState}>Click to Enter</button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state and\n * stay there for 500ms (the value of `timeout`) when finally switches to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from `'exiting'` to `'exited'`.\n */\n\nvar Transition = function (_React$Component) {\n _inherits(Transition, _React$Component);\n\n function Transition(props, context) {\n _classCallCheck(this, Transition);\n\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));\n\n var parentGroup = context.transitionGroup;\n // In the context of a TransitionGroup all enters are really appears\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n\n var initialStatus = void 0;\n _this.nextStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.nextStatus = 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 = { status: initialStatus };\n\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.prototype.getChildContext = function getChildContext() {\n return { transitionGroup: null }; // allows for nested Transitions\n };\n\n Transition.prototype.componentDidMount = function componentDidMount() {\n this.updateStatus(true);\n };\n\n Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _ref = this.pendingState || this.state,\n status = _ref.status;\n\n if (nextProps.in) {\n if (status === UNMOUNTED) {\n this.setState({ status: EXITED });\n }\n if (status !== ENTERING && status !== ENTERED) {\n this.nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n this.nextStatus = EXITING;\n }\n }\n };\n\n Transition.prototype.componentDidUpdate = function componentDidUpdate() {\n this.updateStatus();\n };\n\n Transition.prototype.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n Transition.prototype.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n\n var exit = void 0,\n enter = void 0,\n appear = void 0;\n\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter;\n appear = timeout.appear;\n }\n return { exit: exit, enter: enter, appear: appear };\n };\n\n Transition.prototype.updateStatus = function updateStatus() {\n var mounting = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var nextStatus = this.nextStatus;\n\n if (nextStatus !== null) {\n this.nextStatus = null;\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n var node = _reactDom2.default.findDOMNode(this);\n\n if (nextStatus === ENTERING) {\n this.performEnter(node, mounting);\n } else {\n this.performExit(node);\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({ status: UNMOUNTED });\n }\n };\n\n Transition.prototype.performEnter = function performEnter(node, mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n\n var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;\n\n var timeouts = this.getTimeouts();\n\n // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n if (!mounting && !enter) {\n this.safeSetState({ status: ENTERED }, function () {\n _this2.props.onEntered(node);\n });\n return;\n }\n\n this.props.onEnter(node, appearing);\n\n this.safeSetState({ status: ENTERING }, function () {\n _this2.props.onEntering(node, appearing);\n\n // FIXME: appear timeout?\n _this2.onTransitionEnd(node, timeouts.enter, function () {\n _this2.safeSetState({ status: ENTERED }, function () {\n _this2.props.onEntered(node, appearing);\n });\n });\n });\n };\n\n Transition.prototype.performExit = function performExit(node) {\n var _this3 = this;\n\n var exit = this.props.exit;\n\n var timeouts = this.getTimeouts();\n\n // no exit animation skip right to EXITED\n if (!exit) {\n this.safeSetState({ status: EXITED }, function () {\n _this3.props.onExited(node);\n });\n return;\n }\n this.props.onExit(node);\n\n this.safeSetState({ status: EXITING }, function () {\n _this3.props.onExiting(node);\n\n _this3.onTransitionEnd(node, timeouts.exit, function () {\n _this3.safeSetState({ status: EXITED }, function () {\n _this3.props.onExited(node);\n });\n });\n });\n };\n\n Transition.prototype.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n Transition.prototype.safeSetState = function safeSetState(nextState, callback) {\n var _this4 = this;\n\n // We need to track pending updates for instances where a cWRP fires quickly\n // after cDM and before the state flushes, which would double trigger a\n // transition\n this.pendingState = nextState;\n\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, function () {\n _this4.pendingState = null;\n callback();\n });\n };\n\n Transition.prototype.setNextCallback = function setNextCallback(callback) {\n var _this5 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this5.nextCallback = null;\n\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n Transition.prototype.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {\n this.setNextCallback(handler);\n\n if (node) {\n if (this.props.addEndListener) {\n this.props.addEndListener(node, this.nextCallback);\n }\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n } else {\n setTimeout(this.nextCallback, 0);\n }\n };\n\n Transition.prototype.render = function render() {\n var status = this.state.status;\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _props = this.props,\n children = _props.children,\n childProps = _objectWithoutProperties(_props, ['children']);\n // filter props for Transtition\n\n\n delete childProps.in;\n delete childProps.mountOnEnter;\n delete childProps.unmountOnExit;\n delete childProps.appear;\n delete childProps.enter;\n delete childProps.exit;\n delete childProps.timeout;\n delete childProps.addEndListener;\n delete childProps.onEnter;\n delete childProps.onEntering;\n delete childProps.onEntered;\n delete childProps.onExit;\n delete childProps.onExiting;\n delete childProps.onExited;\n\n if (typeof children === 'function') {\n return children(status, childProps);\n }\n\n var child = _react2.default.Children.only(children);\n return _react2.default.cloneElement(child, childProps);\n };\n\n return Transition;\n}(_react2.default.Component);\n\nTransition.contextTypes = {\n transitionGroup: PropTypes.object\n};\nTransition.childContextTypes = {\n transitionGroup: function transitionGroup() {}\n};\n\n\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A `function` child can be used instead of a React element.\n * This function is called with the current transition status\n * ('entering', 'entered', 'exiting', 'exited', 'unmounted'), which can used\n * to apply context specific props to a component.\n *\n * ```jsx\n * <Transition timeout={150}>\n * {(status) => (\n * <MyComponent className={`fade fade-${status}`} />\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 * Normally a component is not transitioned if it is shown when the `<Transition>` component mounts.\n * If you want to transition on the first mount set `appear` to `true`, and the\n * component will transition in as soon as the `<Transition>` mounts.\n *\n * > Note: there are no specific \"appear\" states. `appear` only adds an additional `enter` transition.\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 `addEventListener` is provided\n *\n * You may specify a single timeout for all transitions like: `timeout={500}`,\n * or individually like:\n *\n * ```jsx\n * timeout={{\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * @type {number | { enter?: number, exit?: number }}\n */\n timeout: function timeout(props) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var pt = _PropTypes.timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n return pt.apply(undefined, [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. **Note:** Timeouts are still used as a fallback if provided.\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 * @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 * @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 * @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 * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\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 * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {};\n\n// Name the function so it is clearer in the documentation\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\n\nTransition.UNMOUNTED = 0;\nTransition.EXITED = 1;\nTransition.ENTERING = 2;\nTransition.ENTERED = 3;\nTransition.EXITING = 4;\n\nexports.default = Transition;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Transition from 'react-transition-group/Transition';\nimport { mapToCssModules, omit, pick, TransitionPropTypeKeys, TransitionTimeouts } from './utils';\n\nconst propTypes = {\n ...Transition.propTypes,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]),\n tag: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n baseClass: PropTypes.string,\n baseClassActive: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n ...Transition.defaultProps,\n tag: 'div',\n baseClass: 'fade',\n baseClassActive: 'show',\n timeout: TransitionTimeouts.Fade,\n appear: true,\n enter: true,\n exit: true,\n in: true,\n};\n\nfunction Fade(props) {\n const {\n tag: Tag,\n baseClass,\n baseClassActive,\n className,\n cssModule,\n children,\n ...otherProps\n } = props;\n\n // In NODE_ENV=production the Transition.propTypes are wrapped which results in an\n // empty object \"{}\". This is the result of the `react-transition-group` babel\n // configuration settings. Therefore, to ensure that production builds work without\n // error, we can either explicitly define keys or use the Transition.defaultProps.\n // Using the Transition.defaultProps excludes any required props. Thus, the best\n // solution is to explicitly define required props in our utilities and reference these.\n // This also gives us more flexibility in the future to remove the prop-types\n // dependency in distribution builds (Similar to how `react-transition-group` does).\n // Note: Without omitting the `react-transition-group` props, the resulting child\n // Tag component would inherit the Transition properties as attributes for the HTML\n // element which results in errors/warnings for non-valid attributes.\n const transitionProps = pick(otherProps, TransitionPropTypeKeys);\n const childProps = omit(otherProps, TransitionPropTypeKeys);\n\n return (\n <Transition {...transitionProps}>\n {(status) => {\n const isActive = status === 'entered';\n const classes = mapToCssModules(classNames(\n className,\n baseClass,\n isActive && baseClassActive\n ), cssModule);\n return (\n <Tag className={classes} {...childProps}>\n {children}\n </Tag>\n );\n }}\n </Transition>\n );\n}\n\nFade.propTypes = propTypes;\nFade.defaultProps = defaultProps;\n\nexport default Fade;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n color: PropTypes.string,\n pill: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n color: 'secondary',\n pill: false,\n tag: 'span'\n};\n\nconst Badge = (props) => {\n let {\n className,\n cssModule,\n color,\n pill,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'badge',\n 'badge-' + color,\n pill ? 'badge-pill' : false\n ), cssModule);\n\n if (attributes.href && Tag === 'span') {\n Tag = 'a';\n }\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nBadge.propTypes = propTypes;\nBadge.defaultProps = defaultProps;\n\nexport default Badge;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, deprecated } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n inverse: PropTypes.bool,\n color: PropTypes.string,\n block: deprecated(PropTypes.bool, 'Please use the props \"body\"'),\n body: PropTypes.bool,\n outline: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst Card = (props) => {\n const {\n className,\n cssModule,\n color,\n block,\n body,\n inverse,\n outline,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card',\n inverse ? 'text-white' : false,\n block || body ? 'card-body' : false,\n color ? `${outline ? 'border' : 'bg'}-${color}` : false\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCard.propTypes = propTypes;\nCard.defaultProps = defaultProps;\n\nexport default Card;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst CardGroup = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-group'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardGroup.propTypes = propTypes;\nCardGroup.defaultProps = defaultProps;\n\nexport default CardGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div',\n};\n\nconst CardDeck = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-deck'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardDeck.propTypes = propTypes;\nCardDeck.defaultProps = defaultProps;\n\nexport default CardDeck;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst CardColumns = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-columns'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardColumns.propTypes = propTypes;\nCardColumns.defaultProps = defaultProps;\n\nexport default CardColumns;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst CardBody = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-body'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardBody.propTypes = propTypes;\nCardBody.defaultProps = defaultProps;\n\nexport default CardBody;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'a'\n};\n\nconst CardLink = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n innerRef,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-link'\n ), cssModule);\n\n return (\n <Tag {...attributes} ref={innerRef} className={classes} />\n );\n};\n\nCardLink.propTypes = propTypes;\nCardLink.defaultProps = defaultProps;\n\nexport default CardLink;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst CardFooter = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-footer'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardFooter.propTypes = propTypes;\nCardFooter.defaultProps = defaultProps;\n\nexport default CardFooter;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst CardHeader = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-header'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardHeader.propTypes = propTypes;\nCardHeader.defaultProps = defaultProps;\n\nexport default CardHeader;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n top: PropTypes.bool,\n bottom: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'img'\n};\n\nconst CardImg = (props) => {\n const {\n className,\n cssModule,\n top,\n bottom,\n tag: Tag,\n ...attributes\n } = props;\n\n let cardImgClassName = 'card-img';\n if (top) {\n cardImgClassName = 'card-img-top';\n }\n if (bottom) {\n cardImgClassName = 'card-img-bottom';\n }\n\n const classes = mapToCssModules(classNames(\n className,\n cardImgClassName\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardImg.propTypes = propTypes;\nCardImg.defaultProps = defaultProps;\n\nexport default CardImg;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst CardImgOverlay = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-img-overlay'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardImgOverlay.propTypes = propTypes;\nCardImgOverlay.defaultProps = defaultProps;\n\nexport default CardImgOverlay;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Transition from 'react-transition-group/Transition';\nimport { mapToCssModules, TransitionTimeouts, TransitionStatuses } from './utils';\n\nclass CarouselItem extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n startAnimation: false,\n };\n\n this.onEnter = this.onEnter.bind(this);\n this.onEntering = this.onEntering.bind(this);\n this.onExit = this.onExit.bind(this);\n this.onExiting = this.onExiting.bind(this);\n this.onExited = this.onExited.bind(this);\n }\n\n onEnter(node, isAppearing) {\n this.setState({ startAnimation: false });\n this.props.onEnter(node, isAppearing);\n }\n\n onEntering(node, isAppearing) {\n // getting this variable triggers a reflow\n const offsetHeight = node.offsetHeight;\n this.setState({ startAnimation: true });\n this.props.onEntering(node, isAppearing);\n return offsetHeight;\n }\n\n onExit(node) {\n this.setState({ startAnimation: false });\n this.props.onExit(node);\n }\n\n onExiting(node) {\n this.setState({ startAnimation: true });\n node.dispatchEvent(new CustomEvent('slide.bs.carousel'));\n this.props.onExiting(node);\n }\n\n onExited(node) {\n node.dispatchEvent(new CustomEvent('slid.bs.carousel'));\n this.props.onExited(node);\n }\n\n render() {\n const { in: isIn, children, cssModule, slide, tag: Tag, className, ...transitionProps } = this.props;\n\n return (\n <Transition\n {...transitionProps}\n enter={slide}\n exit={slide}\n in={isIn}\n onEnter={this.onEnter}\n onEntering={this.onEntering}\n onExit={this.onExit}\n onExiting={this.onExiting}\n onExited={this.onExited}\n >\n {(status) => {\n const { direction } = this.context;\n const isActive = (status === TransitionStatuses.ENTERED) || (status === TransitionStatuses.EXITING);\n const directionClassName = (status === TransitionStatuses.ENTERING || status === TransitionStatuses.EXITING) &&\n this.state.startAnimation &&\n (direction === 'right' ? 'carousel-item-left' : 'carousel-item-right');\n const orderClassName = (status === TransitionStatuses.ENTERING) &&\n (direction === 'right' ? 'carousel-item-next' : 'carousel-item-prev');\n const itemClasses = mapToCssModules(classNames(\n className,\n 'carousel-item',\n isActive && 'active',\n directionClassName,\n orderClassName,\n ), cssModule);\n\n return (\n <Tag className={itemClasses}>\n {children}\n </Tag>\n );\n }}\n </Transition>\n );\n }\n}\n\nCarouselItem.propTypes = {\n ...Transition.propTypes,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n in: PropTypes.bool,\n cssModule: PropTypes.object,\n children: PropTypes.node,\n slide: PropTypes.bool,\n className: PropTypes.string,\n};\n\nCarouselItem.defaultProps = {\n ...Transition.defaultProps,\n tag: 'div',\n timeout: TransitionTimeouts.Carousel,\n slide: true,\n};\n\nCarouselItem.contextTypes = {\n direction: PropTypes.string\n};\n\nexport default CarouselItem;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport CarouselItem from './CarouselItem';\nimport { mapToCssModules } from './utils';\n\nclass Carousel extends React.Component {\n constructor(props) {\n super(props);\n this.handleKeyPress = this.handleKeyPress.bind(this);\n this.renderItems = this.renderItems.bind(this);\n this.hoverStart = this.hoverStart.bind(this);\n this.hoverEnd = this.hoverEnd.bind(this);\n this.state = {\n direction: 'right',\n indicatorClicked: false,\n };\n }\n\n getChildContext() {\n return { direction: this.state.direction };\n }\n\n componentDidMount() {\n // Set up the cycle\n if (this.props.ride === 'carousel') {\n this.setInterval();\n }\n\n // TODO: move this to the specific carousel like bootstrap. Currently it will trigger ALL carousels on the page.\n document.addEventListener('keyup', this.handleKeyPress);\n }\n\n componentWillReceiveProps(nextProps) {\n this.setInterval(nextProps);\n // Calculate the direction to turn\n if (this.props.activeIndex + 1 === nextProps.activeIndex) {\n this.setState({ direction: 'right' });\n } else if (this.props.activeIndex - 1 === nextProps.activeIndex) {\n this.setState({ direction: 'left' });\n } else if (this.props.activeIndex > nextProps.activeIndex) {\n this.setState({ direction: this.state.indicatorClicked ? 'left' : 'right' });\n } else if (this.props.activeIndex !== nextProps.activeIndex) {\n this.setState({ direction: this.state.indicatorClicked ? 'right' : 'left' });\n }\n this.setState({ indicatorClicked: false });\n }\n\n componentWillUnmount() {\n this.clearInterval();\n document.removeEventListener('keyup', this.handleKeyPress);\n }\n\n setInterval(props = this.props) {\n // make sure not to have multiple intervals going...\n this.clearInterval();\n if (props.interval) {\n this.cycleInterval = setInterval(() => {\n props.next();\n }, parseInt(props.interval, 10));\n }\n }\n\n clearInterval() {\n clearInterval(this.cycleInterval);\n }\n\n hoverStart(...args) {\n if (this.props.pause === 'hover') {\n this.clearInterval();\n }\n if (this.props.mouseEnter) {\n this.props.mouseEnter(...args);\n }\n }\n\n hoverEnd(...args) {\n if (this.props.pause === 'hover') {\n this.setInterval();\n }\n if (this.props.mouseLeave) {\n this.props.mouseLeave(...args);\n }\n }\n\n handleKeyPress(evt) {\n if (this.props.keyboard) {\n if (evt.keyCode === 37) {\n this.props.previous();\n } else if (evt.keyCode === 39) {\n this.props.next();\n }\n }\n }\n\n renderItems(carouselItems, className) {\n const { slide } = this.props;\n return (\n <div role=\"listbox\" className={className}>\n {carouselItems.map((item, index) => {\n const isIn = (index === this.props.activeIndex);\n return React.cloneElement(item, {\n in: isIn,\n slide: slide,\n });\n })}\n </div>\n );\n }\n\n render() {\n const { children, cssModule, slide, className } = this.props;\n const outerClasses = mapToCssModules(classNames(\n className,\n 'carousel',\n slide && 'slide'\n ), cssModule);\n\n const innerClasses = mapToCssModules(classNames(\n 'carousel-inner'\n ), cssModule);\n\n\n const slidesOnly = children.every(child => child.type === CarouselItem);\n\n // Rendering only slides\n if (slidesOnly) {\n return (\n <div className={outerClasses} onMouseEnter={this.hoverStart} onMouseLeave={this.hoverEnd}>\n {this.renderItems(children, innerClasses)}\n </div>\n );\n }\n\n // Rendering slides and controls\n if (children[0] instanceof Array) {\n const carouselItems = children[0];\n const controlLeft = children[1];\n const controlRight = children[2];\n\n return (\n <div className={outerClasses} onMouseEnter={this.hoverStart} onMouseLeave={this.hoverEnd}>\n {this.renderItems(carouselItems, innerClasses)}\n {controlLeft}\n {controlRight}\n </div>\n );\n }\n\n // Rendering indicators, slides and controls\n const indicators = children[0];\n const wrappedOnClick = (e) => {\n if (typeof indicators.props.onClickHandler === 'function') {\n this.setState({ indicatorClicked: true }, () => indicators.props.onClickHandler(e));\n }\n };\n const wrappedIndicators = React.cloneElement(indicators, { onClickHandler: wrappedOnClick });\n const carouselItems = children[1];\n const controlLeft = children[2];\n const controlRight = children[3];\n\n return (\n <div className={outerClasses} onMouseEnter={this.hoverStart} onMouseLeave={this.hoverEnd}>\n {wrappedIndicators}\n {this.renderItems(carouselItems, innerClasses)}\n {controlLeft}\n {controlRight}\n </div>\n );\n }\n}\n\nCarousel.propTypes = {\n // the current active slide of the carousel\n activeIndex: PropTypes.number,\n // a function which should advance the carousel to the next slide (via activeIndex)\n next: PropTypes.func.isRequired,\n // a function which should advance the carousel to the previous slide (via activeIndex)\n previous: PropTypes.func.isRequired,\n // controls if the left and right arrow keys should control the carousel\n keyboard: PropTypes.bool,\n /* If set to \"hover\", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on\n * mouseleave. If set to false, hovering over the carousel won't pause it. (default: \"hover\")\n */\n pause: PropTypes.oneOf(['hover', false]),\n // Autoplays the carousel after the user manually cycles the first item. If \"carousel\", autoplays the carousel on load.\n // This is how bootstrap defines it... I would prefer a bool named autoplay or something...\n ride: PropTypes.oneOf(['carousel']),\n // the interval at which the carousel automatically cycles (default: 5000)\n // eslint-disable-next-line react/no-unused-prop-types\n interval: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n PropTypes.bool,\n ]),\n children: PropTypes.array,\n // called when the mouse enters the Carousel\n mouseEnter: PropTypes.func,\n // called when the mouse exits the Carousel\n mouseLeave: PropTypes.func,\n // controls whether the slide animation on the Carousel works or not\n slide: PropTypes.bool,\n cssModule: PropTypes.object,\n className: PropTypes.string,\n};\n\nCarousel.defaultProps = {\n interval: 5000,\n pause: 'hover',\n keyboard: true,\n slide: true,\n};\n\nCarousel.childContextTypes = {\n direction: PropTypes.string\n};\n\nexport default Carousel;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst CarouselControl = (props) => {\n const { direction, onClickHandler, cssModule, directionText, className } = props;\n\n const anchorClasses = mapToCssModules(classNames(\n className,\n `carousel-control-${direction}`\n ), cssModule);\n\n const iconClasses = mapToCssModules(classNames(\n `carousel-control-${direction}-icon`\n ), cssModule);\n\n const screenReaderClasses = mapToCssModules(classNames(\n 'sr-only'\n ), cssModule);\n\n\n return (\n <a\n className={anchorClasses}\n role=\"button\"\n tabIndex=\"0\"\n onClick={(e) => {\n e.preventDefault();\n onClickHandler();\n }}\n >\n <span className={iconClasses} aria-hidden=\"true\" />\n <span className={screenReaderClasses}>{directionText || direction}</span>\n </a>\n );\n};\n\nCarouselControl.propTypes = {\n direction: PropTypes.oneOf(['prev', 'next']).isRequired,\n onClickHandler: PropTypes.func.isRequired,\n cssModule: PropTypes.object,\n directionText: PropTypes.string,\n className: PropTypes.string,\n};\n\nexport default CarouselControl;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst CarouselIndicators = (props) => {\n const { items, activeIndex, cssModule, onClickHandler, className } = props;\n\n const listClasses = mapToCssModules(classNames(className, 'carousel-indicators'), cssModule);\n const indicators = items.map((item, idx) => {\n const indicatorClasses = mapToCssModules(classNames(\n { active: activeIndex === idx }\n ), cssModule);\n return (\n <li\n key={`${item.key || item.src}${item.caption}${item.altText}`}\n onClick={(e) => {\n e.preventDefault();\n onClickHandler(idx);\n }}\n className={indicatorClasses}\n />);\n });\n\n return (\n <ol className={listClasses}>\n {indicators}\n </ol>\n );\n};\n\nCarouselIndicators.propTypes = {\n items: PropTypes.array.isRequired,\n activeIndex: PropTypes.number.isRequired,\n cssModule: PropTypes.object,\n onClickHandler: PropTypes.func.isRequired,\n className: PropTypes.string,\n};\n\nexport default CarouselIndicators;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst CarouselCaption = (props) => {\n const { captionHeader, captionText, cssModule, className } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'carousel-caption',\n 'd-none',\n 'd-md-block'\n ), cssModule);\n\n return (\n <div className={classes}>\n <h3>{captionHeader}</h3>\n <p>{captionText}</p>\n </div>\n );\n};\n\nCarouselCaption.propTypes = {\n captionHeader: PropTypes.string,\n captionText: PropTypes.string.isRequired,\n cssModule: PropTypes.object,\n className: PropTypes.string,\n};\n\nexport default CarouselCaption;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Carousel from './Carousel';\nimport CarouselItem from './CarouselItem';\nimport CarouselControl from './CarouselControl';\nimport CarouselIndicators from './CarouselIndicators';\nimport CarouselCaption from './CarouselCaption';\n\nconst propTypes = {\n items: PropTypes.array.isRequired,\n indicators: PropTypes.bool,\n controls: PropTypes.bool,\n autoPlay: PropTypes.bool,\n activeIndex: PropTypes.number,\n next: PropTypes.func,\n previous: PropTypes.func,\n goToIndex: PropTypes.func,\n};\n\nclass UncontrolledCarousel extends Component {\n constructor(props) {\n super(props);\n this.animating = false;\n this.state = { activeIndex: 0 };\n this.next = this.next.bind(this);\n this.previous = this.previous.bind(this);\n this.goToIndex = this.goToIndex.bind(this);\n this.onExiting = this.onExiting.bind(this);\n this.onExited = this.onExited.bind(this);\n }\n\n onExiting() {\n this.animating = true;\n }\n\n onExited() {\n this.animating = false;\n }\n\n next() {\n if (this.animating) return;\n const nextIndex = this.state.activeIndex === this.props.items.length - 1 ? 0 : this.state.activeIndex + 1;\n this.setState({ activeIndex: nextIndex });\n }\n\n previous() {\n if (this.animating) return;\n const nextIndex = this.state.activeIndex === 0 ? this.props.items.length - 1 : this.state.activeIndex - 1;\n this.setState({ activeIndex: nextIndex });\n }\n\n goToIndex(newIndex) {\n if (this.animating) return;\n this.setState({ activeIndex: newIndex });\n }\n\n render() {\n const { autoPlay, indicators, controls, items, goToIndex, ...props } = this.props;\n const { activeIndex } = this.state;\n\n const slides = items.map((item) => {\n return (\n <CarouselItem\n onExiting={this.onExiting}\n onExited={this.onExited}\n key={item.src}\n >\n <img src={item.src} alt={item.altText} />\n <CarouselCaption captionText={item.caption} captionHeader={item.caption} />\n </CarouselItem>\n );\n });\n\n return (\n <Carousel\n activeIndex={activeIndex}\n next={this.next}\n previous={this.previous}\n ride={autoPlay ? 'carousel' : undefined}\n {...props}\n >\n {indicators && <CarouselIndicators\n items={items}\n activeIndex={props.activeIndex || activeIndex}\n onClickHandler={goToIndex || this.goToIndex}\n />}\n {slides}\n {controls && <CarouselControl\n direction=\"prev\"\n directionText=\"Previous\"\n onClickHandler={props.previous || this.previous}\n />}\n {controls && <CarouselControl\n direction=\"next\"\n directionText=\"Next\"\n onClickHandler={props.next || this.next}\n />}\n </Carousel>\n );\n }\n}\n\nUncontrolledCarousel.propTypes = propTypes;\nUncontrolledCarousel.defaultProps = {\n controls: true,\n indicators: true,\n autoPlay: true,\n};\n\nexport default UncontrolledCarousel;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'h6'\n};\n\nconst CardSubtitle = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-subtitle'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardSubtitle.propTypes = propTypes;\nCardSubtitle.defaultProps = defaultProps;\n\nexport default CardSubtitle;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'p'\n};\n\nconst CardText = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-text'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardText.propTypes = propTypes;\nCardText.defaultProps = defaultProps;\n\nexport default CardText;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'h5'\n};\n\nconst CardTitle = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'card-title'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nCardTitle.propTypes = propTypes;\nCardTitle.defaultProps = defaultProps;\n\nexport default CardTitle;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport { Arrow, Popper as ReactPopper } from 'react-popper';\nimport { getTarget, DOMElement, mapToCssModules } from './utils';\n\nconst propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n placement: PropTypes.string,\n placementPrefix: PropTypes.string,\n hideArrow: PropTypes.bool,\n tag: PropTypes.string,\n isOpen: PropTypes.bool.isRequired,\n cssModule: PropTypes.object,\n offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n fallbackPlacement: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n flip: PropTypes.bool,\n container: PropTypes.oneOfType([PropTypes.string, PropTypes.func, DOMElement]),\n target: PropTypes.oneOfType([PropTypes.string, PropTypes.func, DOMElement]).isRequired,\n modifiers: PropTypes.object,\n};\n\nconst defaultProps = {\n placement: 'auto',\n hideArrow: false,\n isOpen: false,\n offset: 0,\n fallbackPlacement: 'flip',\n flip: true,\n container: 'body',\n modifiers: {},\n};\n\nconst childContextTypes = {\n popperManager: PropTypes.object.isRequired,\n};\n\nclass PopperContent extends React.Component {\n constructor(props) {\n super(props);\n\n this.handlePlacementChange = this.handlePlacementChange.bind(this);\n this.setTargetNode = this.setTargetNode.bind(this);\n this.getTargetNode = this.getTargetNode.bind(this);\n this.state = {};\n }\n\n getChildContext() {\n return {\n popperManager: {\n setTargetNode: this.setTargetNode,\n getTargetNode: this.getTargetNode,\n },\n };\n }\n\n componentDidMount() {\n this.handleProps();\n }\n\n componentDidUpdate(prevProps) {\n if (this.props.isOpen !== prevProps.isOpen) {\n this.handleProps();\n } else if (this._element) {\n // rerender\n this.renderIntoSubtree();\n }\n }\n\n componentWillUnmount() {\n this.hide();\n }\n\n setTargetNode(node) {\n this.targetNode = node;\n }\n\n getTargetNode() {\n return this.targetNode;\n }\n\n getContainerNode() {\n return getTarget(this.props.container);\n }\n\n handlePlacementChange(data) {\n if (this.state.placement !== data.placement) {\n this.setState({ placement: data.placement });\n }\n return data;\n }\n\n handleProps() {\n if (this.props.container !== 'inline') {\n if (this.props.isOpen) {\n this.show();\n } else {\n this.hide();\n }\n }\n }\n\n hide() {\n if (this._element) {\n this.getContainerNode().removeChild(this._element);\n ReactDOM.unmountComponentAtNode(this._element);\n this._element = null;\n }\n }\n\n show() {\n this._element = document.createElement('div');\n this.getContainerNode().appendChild(this._element);\n this.renderIntoSubtree();\n if (this._element.childNodes && this._element.childNodes[0] && this._element.childNodes[0].focus) {\n this._element.childNodes[0].focus();\n }\n }\n\n renderIntoSubtree() {\n ReactDOM.unstable_renderSubtreeIntoContainer(\n this,\n this.renderChildren(),\n this._element\n );\n }\n\n renderChildren() {\n const {\n cssModule,\n children,\n isOpen,\n flip,\n target,\n offset,\n fallbackPlacement,\n placementPrefix,\n hideArrow,\n className,\n tag,\n container,\n modifiers,\n ...attrs\n } = this.props;\n const arrowClassName = mapToCssModules('arrow', cssModule);\n const placement = (this.state.placement || attrs.placement).split('-')[0];\n const popperClassName = mapToCssModules(classNames(\n className,\n placementPrefix ? `${placementPrefix}-${placement}` : placement\n ), this.props.cssModule);\n\n const extendedModifiers = {\n offset: { offset },\n flip: { enabled: flip, behavior: fallbackPlacement },\n update: {\n enabled: true,\n order: 950,\n fn: this.handlePlacementChange,\n },\n ...modifiers,\n };\n\n return (\n <ReactPopper modifiers={extendedModifiers} {...attrs} component={tag} className={popperClassName}>\n {children}\n {!hideArrow && <Arrow className={arrowClassName} />}\n </ReactPopper>\n );\n }\n\n render() {\n this.setTargetNode(getTarget(this.props.target));\n\n if (this.props.container === 'inline') {\n return this.props.isOpen ? this.renderChildren() : null;\n }\n\n return null;\n }\n}\n\nPopperContent.propTypes = propTypes;\nPopperContent.defaultProps = defaultProps;\nPopperContent.childContextTypes = childContextTypes;\n\nexport default PopperContent;\n","import PropTypes from 'prop-types';\nimport { getTarget, DOMElement } from './utils';\n\nconst PopperTargetHelper = (props, context) => {\n context.popperManager.setTargetNode(getTarget(props.target));\n return null;\n};\n\nPopperTargetHelper.contextTypes = {\n popperManager: PropTypes.object.isRequired,\n};\n\nPopperTargetHelper.propTypes = {\n target: PropTypes.oneOfType([PropTypes.string, PropTypes.func, DOMElement]).isRequired,\n};\n\nexport default PopperTargetHelper;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport PopperContent from './PopperContent';\nimport { getTarget, DOMElement, mapToCssModules, omit, PopperPlacements } from './utils';\n\nconst propTypes = {\n placement: PropTypes.oneOf(PopperPlacements),\n target: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.func,\n DOMElement,\n ]).isRequired,\n container: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.func,\n DOMElement,\n ]),\n isOpen: PropTypes.bool,\n disabled: PropTypes.bool,\n hideArrow: PropTypes.bool,\n className: PropTypes.string,\n innerClassName: PropTypes.string,\n placementPrefix: PropTypes.string,\n cssModule: PropTypes.object,\n toggle: PropTypes.func,\n delay: PropTypes.oneOfType([\n PropTypes.shape({ show: PropTypes.number, hide: PropTypes.number }),\n PropTypes.number,\n ]),\n modifiers: PropTypes.object,\n};\n\nconst DEFAULT_DELAYS = {\n show: 0,\n hide: 0,\n};\n\nconst defaultProps = {\n isOpen: false,\n hideArrow: false,\n placement: 'right',\n placementPrefix: 'bs-popover',\n delay: DEFAULT_DELAYS,\n toggle: () => {},\n};\n\nclass Popover extends React.Component {\n constructor(props) {\n super(props);\n\n this.addTargetEvents = this.addTargetEvents.bind(this);\n this.handleDocumentClick = this.handleDocumentClick.bind(this);\n this.removeTargetEvents = this.removeTargetEvents.bind(this);\n this.getRef = this.getRef.bind(this);\n this.toggle = this.toggle.bind(this);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this);\n }\n\n componentDidMount() {\n this._target = getTarget(this.props.target);\n this.handleProps();\n }\n\n componentDidUpdate() {\n this.handleProps();\n }\n\n componentWillUnmount() {\n this.clearShowTimeout();\n this.clearHideTimeout();\n this.removeTargetEvents();\n }\n\n getRef(ref) {\n this._popover = ref;\n }\n\n getDelay(key) {\n const { delay } = this.props;\n if (typeof delay === 'object') {\n return isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key];\n }\n return delay;\n }\n\n handleProps() {\n if (this.props.isOpen) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n show() {\n this.clearHideTimeout();\n this.addTargetEvents();\n if (!this.props.isOpen) {\n this.clearShowTimeout();\n this._showTimeout = setTimeout(this.toggle, this.getDelay('show'));\n }\n }\n\n hide() {\n this.clearShowTimeout();\n this.removeTargetEvents();\n if (this.props.isOpen) {\n this.clearHideTimeout();\n this._hideTimeout = setTimeout(this.toggle, this.getDelay('hide'));\n }\n }\n\n clearShowTimeout() {\n clearTimeout(this._showTimeout);\n this._showTimeout = undefined;\n }\n\n clearHideTimeout() {\n clearTimeout(this._hideTimeout);\n this._hideTimeout = undefined;\n }\n\n handleDocumentClick(e) {\n if (e.target !== this._target && !this._target.contains(e.target) && e.target !== this._popover && !(this._popover && this._popover.contains(e.target))) {\n if (this._hideTimeout) {\n this.clearHideTimeout();\n }\n\n if (this.props.isOpen) {\n this.toggle(e);\n }\n }\n }\n\n addTargetEvents() {\n ['click', 'touchstart'].forEach(event =>\n document.addEventListener(event, this.handleDocumentClick, true)\n );\n }\n\n removeTargetEvents() {\n ['click', 'touchstart'].forEach(event =>\n document.removeEventListener(event, this.handleDocumentClick, true)\n );\n }\n\n toggle(e) {\n if (this.props.disabled) {\n return e && e.preventDefault();\n }\n\n return this.props.toggle(e);\n }\n\n render() {\n if (!this.props.isOpen) {\n return null;\n }\n\n const attributes = omit(this.props, Object.keys(propTypes));\n const classes = mapToCssModules(classNames(\n 'popover-inner',\n this.props.innerClassName\n ), this.props.cssModule);\n\n const popperClasses = mapToCssModules(classNames(\n 'popover',\n 'show',\n this.props.className\n ), this.props.cssModule);\n\n return (\n <PopperContent\n className={popperClasses}\n target={this.props.target}\n isOpen={this.props.isOpen}\n hideArrow={this.props.hideArrow}\n placement={this.props.placement}\n placementPrefix={this.props.placementPrefix}\n container={this.props.container}\n modifiers={this.props.modifiers}\n >\n <div {...attributes} className={classes} ref={this.getRef} />\n </PopperContent>\n );\n }\n}\n\nPopover.propTypes = propTypes;\nPopover.defaultProps = defaultProps;\n\nexport default Popover;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'h3'\n};\n\nconst PopoverHeader = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'popover-header'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nPopoverHeader.propTypes = propTypes;\nPopoverHeader.defaultProps = defaultProps;\n\nexport default PopoverHeader;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst PopoverBody = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'popover-body'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nPopoverBody.propTypes = propTypes;\nPopoverBody.defaultProps = defaultProps;\n\nexport default PopoverBody;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport toNumber from 'lodash.tonumber';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n children: PropTypes.node,\n bar: PropTypes.bool,\n multi: PropTypes.bool,\n tag: PropTypes.string,\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n max: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n animated: PropTypes.bool,\n striped: PropTypes.bool,\n color: PropTypes.string,\n className: PropTypes.string,\n barClassName: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div',\n value: 0,\n max: 100,\n};\n\nconst Progress = (props) => {\n const {\n children,\n className,\n barClassName,\n cssModule,\n value,\n max,\n animated,\n striped,\n color,\n bar,\n multi,\n tag: Tag,\n ...attributes\n } = props;\n\n const percent = ((toNumber(value) / toNumber(max)) * 100);\n\n const progressClasses = mapToCssModules(classNames(\n className,\n 'progress'\n ), cssModule);\n\n const progressBarClasses = mapToCssModules(classNames(\n 'progress-bar',\n bar ? className || barClassName : barClassName,\n animated ? 'progress-bar-animated' : null,\n color ? `bg-${color}` : null,\n striped || animated ? 'progress-bar-striped' : null\n ), cssModule);\n\n const ProgressBar = multi ? children : (\n <div\n className={progressBarClasses}\n style={{ width: `${percent}%` }}\n role=\"progressbar\"\n aria-valuenow={value}\n aria-valuemin=\"0\"\n aria-valuemax={max}\n children={children}\n />\n );\n\n if (bar) {\n return ProgressBar;\n }\n\n return (\n <Tag {...attributes} className={progressClasses} children={ProgressBar} />\n );\n};\n\nProgress.propTypes = propTypes;\nProgress.defaultProps = defaultProps;\n\nexport default Progress;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { canUseDOM } from './utils';\n\nconst propTypes = {\n children: PropTypes.node.isRequired,\n node: PropTypes.any\n};\n\nclass Portal extends React.Component {\n componentWillUnmount() {\n if (this.defaultNode) {\n document.body.removeChild(this.defaultNode);\n }\n this.defaultNode = null;\n }\n\n render() {\n if (!canUseDOM) {\n return null;\n }\n\n if (!this.props.node && !this.defaultNode) {\n this.defaultNode = document.createElement('div');\n document.body.appendChild(this.defaultNode);\n }\n\n return ReactDOM.createPortal(\n this.props.children,\n this.props.node || this.defaultNode\n );\n }\n}\n\nPortal.propTypes = propTypes;\n\nexport default Portal;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Portal from './Portal';\nimport Fade from './Fade';\nimport {\n getOriginalBodyPadding,\n conditionallyUpdateScrollbar,\n setScrollbarWidth,\n mapToCssModules,\n omit,\n TransitionTimeouts\n} from './utils';\n\nfunction noop() { }\n\nconst FadePropTypes = PropTypes.shape(Fade.propTypes);\n\nconst propTypes = {\n isOpen: PropTypes.bool,\n autoFocus: PropTypes.bool,\n centered: PropTypes.bool,\n size: PropTypes.string,\n toggle: PropTypes.func,\n keyboard: PropTypes.bool,\n role: PropTypes.string,\n labelledBy: PropTypes.string,\n backdrop: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.oneOf(['static'])\n ]),\n onEnter: PropTypes.func,\n onExit: PropTypes.func,\n onOpened: PropTypes.func,\n onClosed: PropTypes.func,\n children: PropTypes.node,\n className: PropTypes.string,\n wrapClassName: PropTypes.string,\n modalClassName: PropTypes.string,\n backdropClassName: PropTypes.string,\n contentClassName: PropTypes.string,\n external: PropTypes.node,\n fade: PropTypes.bool,\n cssModule: PropTypes.object,\n zIndex: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n ]),\n backdropTransition: FadePropTypes,\n modalTransition: FadePropTypes,\n};\n\nconst propsToOmit = Object.keys(propTypes);\n\nconst defaultProps = {\n isOpen: false,\n autoFocus: true,\n centered: false,\n role: 'dialog',\n backdrop: true,\n keyboard: true,\n zIndex: 1050,\n fade: true,\n onOpened: noop,\n onClosed: noop,\n modalTransition: {\n timeout: TransitionTimeouts.Modal,\n },\n backdropTransition: {\n mountOnEnter: true,\n timeout: TransitionTimeouts.Fade, // uses standard fade transition\n },\n};\n\nclass Modal extends React.Component {\n constructor(props) {\n super(props);\n\n this._element = null;\n this._originalBodyPadding = null;\n this.handleBackdropClick = this.handleBackdropClick.bind(this);\n this.handleEscape = this.handleEscape.bind(this);\n this.onOpened = this.onOpened.bind(this);\n this.onClosed = this.onClosed.bind(this);\n\n this.state = {\n isOpen: props.isOpen,\n };\n\n if (props.isOpen) {\n this.init();\n }\n }\n\n componentDidMount() {\n if (this.props.onEnter) {\n this.props.onEnter();\n }\n\n if (this.state.isOpen && this.props.autoFocus) {\n this.setFocus();\n }\n\n this._isMounted = true;\n }\n\n componentWillReceiveProps(nextProps) {\n if (nextProps.isOpen && !this.props.isOpen) {\n this.setState({ isOpen: nextProps.isOpen });\n }\n }\n\n componentWillUpdate(nextProps, nextState) {\n if (nextState.isOpen && !this.state.isOpen) {\n this.init();\n }\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (this.props.autoFocus && this.state.isOpen && !prevState.isOpen) {\n this.setFocus();\n }\n }\n\n componentWillUnmount() {\n if (this.props.onExit) {\n this.props.onExit();\n }\n\n if (this.state.isOpen) {\n this.destroy();\n }\n\n this._isMounted = false;\n }\n\n onOpened(node, isAppearing) {\n this.props.onOpened();\n (this.props.modalTransition.onEntered || noop)(node, isAppearing);\n }\n\n onClosed(node) {\n // so all methods get called before it is unmounted\n this.props.onClosed();\n (this.props.modalTransition.onExited || noop)(node);\n this.destroy();\n\n if (this._isMounted) {\n this.setState({ isOpen: false });\n }\n }\n\n setFocus() {\n if (this._dialog && this._dialog.parentNode && typeof this._dialog.parentNode.focus === 'function') {\n this._dialog.parentNode.focus();\n }\n }\n\n handleBackdropClick(e) {\n e.stopPropagation();\n if (!this.props.isOpen || this.props.backdrop !== true) return;\n\n const container = this._dialog;\n\n if (e.target && !container.contains(e.target) && this.props.toggle) {\n this.props.toggle(e);\n }\n }\n\n handleEscape(e) {\n if (this.props.isOpen && this.props.keyboard && e.keyCode === 27 && this.props.toggle) {\n this.props.toggle(e);\n }\n }\n\n init() {\n this._element = document.createElement('div');\n this._element.setAttribute('tabindex', '-1');\n this._element.style.position = 'relative';\n this._element.style.zIndex = this.props.zIndex;\n this._originalBodyPadding = getOriginalBodyPadding();\n\n conditionallyUpdateScrollbar();\n\n document.body.appendChild(this._element);\n\n if (!this.bodyClassAdded) {\n document.body.className = classNames(\n document.body.className,\n mapToCssModules('modal-open', this.props.cssModule)\n );\n this.bodyClassAdded = true;\n }\n }\n\n destroy() {\n if (this._element) {\n document.body.removeChild(this._element);\n this._element = null;\n }\n\n if (this.bodyClassAdded) {\n const modalOpenClassName = mapToCssModules('modal-open', this.props.cssModule);\n // Use regex to prevent matching `modal-open` as part of a different class, e.g. `my-modal-opened`\n const modalOpenClassNameRegex = new RegExp(`(^| )${modalOpenClassName}( |$)`);\n document.body.className = document.body.className.replace(modalOpenClassNameRegex, ' ').trim();\n this.bodyClassAdded = false;\n }\n\n setScrollbarWidth(this._originalBodyPadding);\n }\n\n renderModalDialog() {\n const attributes = omit(this.props, propsToOmit);\n const dialogBaseClass = 'modal-dialog';\n\n return (\n <div\n {...attributes}\n className={mapToCssModules(classNames(dialogBaseClass, this.props.className, {\n [`modal-${this.props.size}`]: this.props.size,\n [`${dialogBaseClass}-centered`]: this.props.centered,\n }), this.props.cssModule)}\n role=\"document\"\n ref={(c) => {\n this._dialog = c;\n }}\n >\n <div\n className={mapToCssModules(\n classNames('modal-content', this.props.contentClassName),\n this.props.cssModule\n )}\n >\n {this.props.children}\n </div>\n </div>\n );\n }\n\n render() {\n if (this.state.isOpen) {\n const {\n wrapClassName,\n modalClassName,\n backdropClassName,\n cssModule,\n isOpen,\n backdrop,\n role,\n labelledBy,\n external,\n } = this.props;\n\n const modalAttributes = {\n onClick: this.handleBackdropClick,\n onKeyUp: this.handleEscape,\n style: { display: 'block' },\n 'aria-labelledby': labelledBy,\n role,\n tabIndex: '-1'\n };\n\n const hasTransition = this.props.fade;\n const modalTransition = {\n ...Fade.defaultProps,\n ...this.props.modalTransition,\n baseClass: hasTransition ? this.props.modalTransition.baseClass : '',\n timeout: hasTransition ? this.props.modalTransition.timeout : 0,\n };\n const backdropTransition = {\n ...Fade.defaultProps,\n ...this.props.backdropTransition,\n baseClass: hasTransition ? this.props.backdropTransition.baseClass : '',\n timeout: hasTransition ? this.props.backdropTransition.timeout : 0,\n };\n\n return (\n <Portal node={this._element}>\n <div className={mapToCssModules(wrapClassName)}>\n <Fade\n {...modalAttributes}\n {...modalTransition}\n in={isOpen}\n onEntered={this.onOpened}\n onExited={this.onClosed}\n cssModule={cssModule}\n className={mapToCssModules(classNames('modal', modalClassName), cssModule)}\n >\n {external}\n {this.renderModalDialog()}\n </Fade>\n <Fade\n {...backdropTransition}\n in={isOpen && !!backdrop}\n cssModule={cssModule}\n className={mapToCssModules(classNames('modal-backdrop', backdropClassName), cssModule)}\n />\n </div>\n </Portal>\n );\n }\n\n return null;\n }\n}\n\nModal.propTypes = propTypes;\nModal.defaultProps = defaultProps;\n\nexport default Modal;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n wrapTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n toggle: PropTypes.func,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n children: PropTypes.node,\n closeAriaLabel: PropTypes.string,\n};\n\nconst defaultProps = {\n tag: 'h5',\n wrapTag: 'div',\n closeAriaLabel: 'Close',\n};\n\nconst ModalHeader = (props) => {\n let closeButton;\n const {\n className,\n cssModule,\n children,\n toggle,\n tag: Tag,\n wrapTag: WrapTag,\n closeAriaLabel,\n ...attributes } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'modal-header'\n ), cssModule);\n\n if (toggle) {\n closeButton = (\n <button type=\"button\" onClick={toggle} className={mapToCssModules('close', cssModule)} aria-label={closeAriaLabel}>\n <span aria-hidden=\"true\">{String.fromCharCode(215)}</span>\n </button>\n );\n }\n\n return (\n <WrapTag {...attributes} className={classes}>\n <Tag className={mapToCssModules('modal-title', cssModule)}>\n {children}\n </Tag>\n {closeButton}\n </WrapTag>\n );\n};\n\nModalHeader.propTypes = propTypes;\nModalHeader.defaultProps = defaultProps;\n\nexport default ModalHeader;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div',\n};\n\nconst ModalBody = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'modal-body'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nModalBody.propTypes = propTypes;\nModalBody.defaultProps = defaultProps;\n\nexport default ModalBody;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div',\n};\n\nconst ModalFooter = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'modal-footer'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nModalFooter.propTypes = propTypes;\nModalFooter.defaultProps = defaultProps;\n\nexport default ModalFooter;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport PopperContent from './PopperContent';\nimport { getTarget, DOMElement, mapToCssModules, omit, PopperPlacements } from './utils';\n\nconst propTypes = {\n placement: PropTypes.oneOf(PopperPlacements),\n target: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.func,\n DOMElement,\n ]).isRequired,\n container: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.func,\n DOMElement,\n ]),\n isOpen: PropTypes.bool,\n disabled: PropTypes.bool,\n hideArrow: PropTypes.bool,\n className: PropTypes.string,\n innerClassName: PropTypes.string,\n cssModule: PropTypes.object,\n toggle: PropTypes.func,\n autohide: PropTypes.bool,\n placementPrefix: PropTypes.string,\n delay: PropTypes.oneOfType([\n PropTypes.shape({ show: PropTypes.number, hide: PropTypes.number }),\n PropTypes.number,\n ]),\n modifiers: PropTypes.object,\n};\n\nconst DEFAULT_DELAYS = {\n show: 0,\n hide: 250\n};\n\nconst defaultProps = {\n isOpen: false,\n hideArrow: false,\n placement: 'top',\n placementPrefix: 'bs-tooltip',\n delay: DEFAULT_DELAYS,\n autohide: true,\n toggle: function () {}\n};\n\nclass Tooltip extends React.Component {\n constructor(props) {\n super(props);\n\n this.addTargetEvents = this.addTargetEvents.bind(this);\n this.handleDocumentClick = this.handleDocumentClick.bind(this);\n this.removeTargetEvents = this.removeTargetEvents.bind(this);\n this.toggle = this.toggle.bind(this);\n this.onMouseOverTooltip = this.onMouseOverTooltip.bind(this);\n this.onMouseLeaveTooltip = this.onMouseLeaveTooltip.bind(this);\n this.onMouseOverTooltipContent = this.onMouseOverTooltipContent.bind(this);\n this.onMouseLeaveTooltipContent = this.onMouseLeaveTooltipContent.bind(this);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this);\n }\n\n componentDidMount() {\n this._target = getTarget(this.props.target);\n this.addTargetEvents();\n }\n\n componentWillUnmount() {\n this.removeTargetEvents();\n }\n\n onMouseOverTooltip() {\n if (this._hideTimeout) {\n this.clearHideTimeout();\n }\n this._showTimeout = setTimeout(this.show, this.getDelay('show'));\n }\n\n onMouseLeaveTooltip() {\n if (this._showTimeout) {\n this.clearShowTimeout();\n }\n this._hideTimeout = setTimeout(this.hide, this.getDelay('hide'));\n }\n\n onMouseOverTooltipContent() {\n if (this.props.autohide) {\n return;\n }\n if (this._hideTimeout) {\n this.clearHideTimeout();\n }\n }\n\n onMouseLeaveTooltipContent() {\n if (this.props.autohide) {\n return;\n }\n if (this._showTimeout) {\n this.clearShowTimeout();\n }\n this._hideTimeout = setTimeout(this.hide, this.getDelay('hide'));\n }\n\n getDelay(key) {\n const { delay } = this.props;\n if (typeof delay === 'object') {\n return isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key];\n }\n return delay;\n }\n\n show() {\n if (!this.props.isOpen) {\n this.clearShowTimeout();\n this.toggle();\n }\n }\n\n hide() {\n if (this.props.isOpen) {\n this.clearHideTimeout();\n this.toggle();\n }\n }\n\n clearShowTimeout() {\n clearTimeout(this._showTimeout);\n this._showTimeout = undefined;\n }\n\n clearHideTimeout() {\n clearTimeout(this._hideTimeout);\n this._hideTimeout = undefined;\n }\n\n handleDocumentClick(e) {\n if (e.target === this._target || this._target.contains(e.target)) {\n if (this._hideTimeout) {\n this.clearHideTimeout();\n }\n\n if (!this.props.isOpen) {\n this.toggle();\n }\n }\n }\n\n addTargetEvents() {\n this._target.addEventListener('mouseover', this.onMouseOverTooltip, true);\n this._target.addEventListener('mouseout', this.onMouseLeaveTooltip, true);\n ['click', 'touchstart'].forEach(event =>\n document.addEventListener(event, this.handleDocumentClick, true)\n );\n }\n\n removeTargetEvents() {\n this._target.removeEventListener('mouseover', this.onMouseOverTooltip, true);\n this._target.removeEventListener('mouseout', this.onMouseLeaveTooltip, true);\n ['click', 'touchstart'].forEach(event =>\n document.removeEventListener(event, this.handleDocumentClick, true)\n );\n }\n\n toggle(e) {\n if (this.props.disabled) {\n return e && e.preventDefault();\n }\n\n return this.props.toggle();\n }\n\n render() {\n if (!this.props.isOpen) {\n return null;\n }\n\n const attributes = omit(this.props, Object.keys(propTypes));\n const classes = mapToCssModules(classNames(\n 'tooltip-inner',\n this.props.innerClassName\n ), this.props.cssModule);\n\n const popperClasses = mapToCssModules(classNames(\n 'tooltip',\n 'show',\n this.props.className\n ), this.props.cssModule);\n\n return (\n <PopperContent\n className={popperClasses}\n target={this.props.target}\n isOpen={this.props.isOpen}\n hideArrow={this.props.hideArrow}\n placement={this.props.placement}\n placementPrefix={this.props.placementPrefix}\n container={this.props.container}\n modifiers={this.props.modifiers}\n >\n <div\n {...attributes}\n className={classes}\n onMouseOver={this.onMouseOverTooltipContent}\n onMouseLeave={this.onMouseLeaveTooltipContent}\n />\n </PopperContent>\n );\n }\n}\n\nTooltip.propTypes = propTypes;\nTooltip.defaultProps = defaultProps;\n\nexport default Tooltip;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, deprecated } from './utils';\n\nconst propTypes = {\n className: PropTypes.string,\n cssModule: PropTypes.object,\n size: PropTypes.string,\n bordered: PropTypes.bool,\n striped: PropTypes.bool,\n inverse: deprecated(PropTypes.bool, 'Please use the prop \"dark\"'),\n dark: PropTypes.bool,\n hover: PropTypes.bool,\n responsive: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n responsiveTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n};\n\nconst defaultProps = {\n tag: 'table',\n responsiveTag: 'div',\n};\n\nconst Table = (props) => {\n const {\n className,\n cssModule,\n size,\n bordered,\n striped,\n inverse,\n dark,\n hover,\n responsive,\n tag: Tag,\n responsiveTag: ResponsiveTag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'table',\n size ? 'table-' + size : false,\n bordered ? 'table-bordered' : false,\n striped ? 'table-striped' : false,\n (dark || inverse) ? 'table-dark' : false,\n hover ? 'table-hover' : false,\n ), cssModule);\n\n const table = <Tag {...attributes} className={classes} />;\n\n if (responsive) {\n const responsiveClassName = responsive === true ? 'table-responsive' : `table-responsive-${responsive}`;\n\n return (\n <ResponsiveTag className={responsiveClassName}>{table}</ResponsiveTag>\n );\n }\n\n return table;\n};\n\nTable.propTypes = propTypes;\nTable.defaultProps = defaultProps;\n\nexport default Table;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n flush: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'ul'\n};\n\nconst ListGroup = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n flush,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'list-group',\n flush ? 'list-group-flush' : false\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nListGroup.propTypes = propTypes;\nListGroup.defaultProps = defaultProps;\n\nexport default ListGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n children: PropTypes.node,\n inline: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'form',\n};\n\nconst Form = (props) => {\n const {\n className,\n cssModule,\n inline,\n tag: Tag,\n innerRef,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n inline ? 'form-inline' : false\n ), cssModule);\n\n return (\n <Tag {...attributes} ref={innerRef} className={classes} />\n );\n};\n\nForm.propTypes = propTypes;\nForm.defaultProps = defaultProps;\n\nexport default Form;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n children: PropTypes.node,\n tag: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n valid: PropTypes.bool\n};\n\nconst defaultProps = {\n tag: 'div',\n valid: undefined\n};\n\nconst FormFeedback = (props) => {\n const {\n className,\n cssModule,\n valid,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n valid ? 'valid-feedback' : 'invalid-feedback'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nFormFeedback.propTypes = propTypes;\nFormFeedback.defaultProps = defaultProps;\n\nexport default FormFeedback;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n children: PropTypes.node,\n row: PropTypes.bool,\n check: PropTypes.bool,\n inline: PropTypes.bool,\n disabled: PropTypes.bool,\n tag: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div',\n};\n\nconst FormGroup = (props) => {\n const {\n className,\n cssModule,\n row,\n disabled,\n check,\n inline,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n row ? 'row' : false,\n check ? 'form-check' : 'form-group',\n check && inline ? 'form-check-inline' : false,\n check && disabled ? 'disabled' : false\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nFormGroup.propTypes = propTypes;\nFormGroup.defaultProps = defaultProps;\n\nexport default FormGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n children: PropTypes.node,\n inline: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n color: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'small',\n color: 'muted',\n};\n\nconst FormText = (props) => {\n const {\n className,\n cssModule,\n inline,\n color,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n !inline ? 'form-text' : false,\n color ? `text-${color}` : false\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nFormText.propTypes = propTypes;\nFormText.defaultProps = defaultProps;\n\nexport default FormText;\n","/* eslint react/prefer-stateless-function: 0 */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, deprecated, warnOnce } from './utils';\n\nconst propTypes = {\n children: PropTypes.node,\n type: PropTypes.string,\n size: PropTypes.string,\n bsSize: PropTypes.string,\n state: deprecated(PropTypes.string, 'Please use the props \"valid\" and \"invalid\" to indicate the state.'),\n valid: PropTypes.bool,\n invalid: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n static: deprecated(PropTypes.bool, 'Please use the prop \"plaintext\"'),\n plaintext: PropTypes.bool,\n addon: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n type: 'text',\n};\n\nclass Input extends React.Component {\n render() {\n let {\n className,\n cssModule,\n type,\n bsSize,\n state,\n valid,\n invalid,\n tag,\n addon,\n static: staticInput,\n plaintext,\n innerRef,\n ...attributes\n } = this.props;\n\n const checkInput = ['radio', 'checkbox'].indexOf(type) > -1;\n const isNotaNumber = new RegExp('\\\\D', 'g');\n\n const fileInput = type === 'file';\n const textareaInput = type === 'textarea';\n const selectInput = type === 'select';\n let Tag = tag || ((selectInput || textareaInput) ? type : 'input');\n\n let formControlClass = 'form-control';\n\n if (plaintext || staticInput) {\n formControlClass = `${formControlClass}-plaintext`;\n Tag = tag || 'p';\n } else if (fileInput) {\n formControlClass = `${formControlClass}-file`;\n } else if (checkInput) {\n if (addon) {\n formControlClass = null;\n } else {\n formControlClass = 'form-check-input';\n }\n }\n\n if (state && typeof valid === 'undefined' && typeof invalid === 'undefined') {\n if (state === 'danger') {\n invalid = true;\n } else if (state === 'success') {\n valid = true;\n }\n }\n\n if (attributes.size && isNotaNumber.test(attributes.size)) {\n warnOnce('Please use the prop \"bsSize\" instead of the \"size\" to bootstrap\\'s input sizing.');\n bsSize = attributes.size;\n delete attributes.size;\n }\n\n const classes = mapToCssModules(classNames(\n className,\n invalid && 'is-invalid',\n valid && 'is-valid',\n bsSize ? `form-control-${bsSize}` : false,\n formControlClass\n ), cssModule);\n\n if (Tag === 'input' || typeof tag !== 'string') {\n attributes.type = type;\n }\n\n return (\n <Tag {...attributes} ref={innerRef} className={classes} />\n );\n }\n}\n\nInput.propTypes = propTypes;\nInput.defaultProps = defaultProps;\n\nexport default Input;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n size: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst InputGroup = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n size,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'input-group',\n size ? `input-group-${size}` : null\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nInputGroup.propTypes = propTypes;\nInputGroup.defaultProps = defaultProps;\n\nexport default InputGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'span'\n};\n\nconst InputGroupText = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'input-group-text'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nInputGroupText.propTypes = propTypes;\nInputGroupText.defaultProps = defaultProps;\n\nexport default InputGroupText;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\nimport InputGroupText from './InputGroupText';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n addonType: PropTypes.oneOf(['prepend', 'append']).isRequired,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst InputGroupAddon = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n addonType,\n children,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'input-group-' + addonType\n ), cssModule);\n\n // Convenience to assist with transition\n if (typeof children === 'string') {\n return (\n <Tag {...attributes} className={classes}>\n <InputGroupText children={children} />\n </Tag>\n );\n }\n\n return (\n <Tag {...attributes} className={classes} children={children} />\n );\n};\n\nInputGroupAddon.propTypes = propTypes;\nInputGroupAddon.defaultProps = defaultProps;\n\nexport default InputGroupAddon;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from './Button';\nimport InputGroupAddon from './InputGroupAddon';\nimport { warnOnce } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n addonType: PropTypes.oneOf(['prepend', 'append']).isRequired,\n children: PropTypes.node,\n groupClassName: PropTypes.string,\n groupAttributes: PropTypes.object,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst InputGroupButton = (props) => {\n warnOnce('The \"InputGroupButton\" component has been deprecated.\\nPlease use component \"InputGroupAddon\".');\n\n let {\n children,\n groupClassName,\n groupAttributes,\n ...propsWithoutGroup\n } = props;\n\n if (typeof children === 'string') {\n let {\n cssModule,\n tag,\n addonType,\n ...attributes\n } = propsWithoutGroup;\n\n const allGroupAttributes = {\n ...groupAttributes,\n cssModule,\n tag,\n addonType\n };\n\n return (\n <InputGroupAddon {...allGroupAttributes} className={groupClassName}>\n <Button {...attributes} children={children} />\n </InputGroupAddon>\n );\n }\n\n return (\n <InputGroupAddon {...props} children={children} />\n );\n};\n\nInputGroupButton.propTypes = propTypes;\n\nexport default InputGroupButton;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Dropdown from './Dropdown';\n\nconst propTypes = {\n addonType: PropTypes.oneOf(['prepend', 'append']).isRequired,\n children: PropTypes.node,\n};\n\nconst InputGroupButtonDropdown = (props) => {\n return (\n <Dropdown {...props} />\n );\n};\n\nInputGroupButtonDropdown.propTypes = propTypes;\n\nexport default InputGroupButtonDropdown;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport isobject from 'lodash.isobject';\nimport { mapToCssModules, deprecated } from './utils';\n\nconst colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];\n\nconst stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);\n\nconst columnProps = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.shape({\n size: stringOrNumberProp,\n push: deprecated(stringOrNumberProp, 'Please use the prop \"order\"'),\n pull: deprecated(stringOrNumberProp, 'Please use the prop \"order\"'),\n order: stringOrNumberProp,\n offset: stringOrNumberProp,\n }),\n]);\n\nconst propTypes = {\n children: PropTypes.node,\n hidden: PropTypes.bool,\n check: PropTypes.bool,\n size: PropTypes.string,\n for: PropTypes.string,\n tag: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n xs: columnProps,\n sm: columnProps,\n md: columnProps,\n lg: columnProps,\n xl: columnProps,\n widths: PropTypes.array,\n};\n\nconst defaultProps = {\n tag: 'label',\n widths: colWidths,\n};\n\nconst getColumnSizeClass = (isXs, colWidth, colSize) => {\n if (colSize === true || colSize === '') {\n return isXs ? 'col' : `col-${colWidth}`;\n } else if (colSize === 'auto') {\n return isXs ? 'col-auto' : `col-${colWidth}-auto`;\n }\n\n return isXs ? `col-${colSize}` : `col-${colWidth}-${colSize}`;\n};\n\nconst Label = (props) => {\n const {\n className,\n cssModule,\n hidden,\n widths,\n tag: Tag,\n check,\n size,\n for: htmlFor,\n ...attributes\n } = props;\n\n const colClasses = [];\n\n widths.forEach((colWidth, i) => {\n let columnProp = props[colWidth];\n\n delete attributes[colWidth];\n\n if (!columnProp && columnProp !== '') {\n return;\n }\n\n const isXs = !i;\n let colClass;\n\n if (isobject(columnProp)) {\n const colSizeInterfix = isXs ? '-' : `-${colWidth}-`;\n colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);\n\n colClasses.push(mapToCssModules(classNames({\n [colClass]: columnProp.size || columnProp.size === '',\n [`order${colSizeInterfix}${columnProp.order}`]: columnProp.order || columnProp.order === 0,\n [`offset${colSizeInterfix}${columnProp.offset}`]: columnProp.offset || columnProp.offset === 0\n })), cssModule);\n } else {\n colClass = getColumnSizeClass(isXs, colWidth, columnProp);\n colClasses.push(colClass);\n }\n });\n\n const classes = mapToCssModules(classNames(\n className,\n hidden ? 'sr-only' : false,\n check ? 'form-check-label' : false,\n size ? `col-form-label-${size}` : false,\n colClasses,\n colClasses.length ? 'col-form-label' : false\n ), cssModule);\n\n return (\n <Tag htmlFor={htmlFor} {...attributes} className={classes} />\n );\n};\n\nLabel.propTypes = propTypes;\nLabel.defaultProps = defaultProps;\n\nexport default Label;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n body: PropTypes.bool,\n bottom: PropTypes.bool,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n heading: PropTypes.bool,\n left: PropTypes.bool,\n list: PropTypes.bool,\n middle: PropTypes.bool,\n object: PropTypes.bool,\n right: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n top: PropTypes.bool,\n};\n\nconst Media = (props) => {\n const {\n body,\n bottom,\n className,\n cssModule,\n heading,\n left,\n list,\n middle,\n object,\n right,\n tag,\n top,\n ...attributes\n } = props;\n\n let defaultTag;\n if (heading) {\n defaultTag = 'h4';\n } else if (left || right) {\n defaultTag = 'a';\n } else if (object) {\n defaultTag = 'img';\n } else if (list) {\n defaultTag = 'ul';\n } else {\n defaultTag = 'div';\n }\n const Tag = tag || defaultTag;\n\n const classes = mapToCssModules(classNames(\n className,\n {\n 'media-body': body,\n 'media-heading': heading,\n 'media-left': left,\n 'media-right': right,\n 'media-top': top,\n 'media-bottom': bottom,\n 'media-middle': middle,\n 'media-object': object,\n 'media-list': list,\n media: !body && !heading && !left && !right && !top && !bottom && !middle && !object && !list,\n }\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nMedia.propTypes = propTypes;\n\nexport default Media;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n size: PropTypes.string,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n};\n\nconst defaultProps = {\n tag: 'ul',\n};\n\nconst Pagination = (props) => {\n const {\n className,\n cssModule,\n size,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'pagination',\n {\n [`pagination-${size}`]: !!size,\n }\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nPagination.propTypes = propTypes;\nPagination.defaultProps = defaultProps;\n\nexport default Pagination;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n active: PropTypes.bool,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n disabled: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n};\n\nconst defaultProps = {\n tag: 'li',\n};\n\nconst PaginationItem = (props) => {\n const {\n active,\n className,\n cssModule,\n disabled,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'page-item',\n {\n active,\n disabled,\n }\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nPaginationItem.propTypes = propTypes;\nPaginationItem.defaultProps = defaultProps;\n\nexport default PaginationItem;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n next: PropTypes.bool,\n previous: PropTypes.bool,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n};\n\nconst defaultProps = {\n tag: 'a',\n};\n\nconst PaginationLink = (props) => {\n const {\n className,\n cssModule,\n next,\n previous,\n tag: Tag,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'page-link'\n ), cssModule);\n\n let defaultAriaLabel;\n if (previous) {\n defaultAriaLabel = 'Previous';\n } else if (next) {\n defaultAriaLabel = 'Next';\n }\n const ariaLabel = props['aria-label'] || defaultAriaLabel;\n\n let defaultCaret;\n if (previous) {\n defaultCaret = '\\u00ab';\n } else if (next) {\n defaultCaret = '\\u00bb';\n }\n\n let children = props.children;\n if (children && Array.isArray(children) && children.length === 0) {\n children = null;\n }\n\n if (previous || next) {\n children = [\n <span\n aria-hidden=\"true\"\n key=\"caret\"\n >\n {children || defaultCaret}\n </span>,\n <span\n className=\"sr-only\"\n key=\"sr\"\n >\n {ariaLabel}\n </span>,\n ];\n }\n\n return (\n <Tag\n {...attributes}\n className={classes}\n aria-label={ariaLabel}\n >\n {children}\n </Tag>\n );\n};\n\nPaginationLink.propTypes = propTypes;\nPaginationLink.defaultProps = defaultProps;\n\nexport default PaginationLink;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, omit } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n activeTab: PropTypes.any,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div',\n};\n\nconst childContextTypes = {\n activeTabId: PropTypes.any\n};\n\nexport default class TabContent extends Component {\n constructor(props) {\n super(props);\n this.state = {\n activeTab: this.props.activeTab\n };\n }\n getChildContext() {\n return {\n activeTabId: this.state.activeTab\n };\n }\n componentWillReceiveProps(nextProps) {\n if (this.state.activeTab !== nextProps.activeTab) {\n this.setState({\n activeTab: nextProps.activeTab\n });\n }\n }\n render() {\n const {\n className,\n cssModule,\n tag: Tag,\n } = this.props;\n\n const attributes = omit(this.props, Object.keys(propTypes));\n\n const classes = mapToCssModules(classNames('tab-content', className), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n }\n}\nTabContent.propTypes = propTypes;\nTabContent.defaultProps = defaultProps;\nTabContent.childContextTypes = childContextTypes;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object,\n tabId: PropTypes.any,\n};\n\nconst defaultProps = {\n tag: 'div',\n};\n\nconst contextTypes = {\n activeTabId: PropTypes.any\n};\n\nexport default function TabPane(props, context) {\n const {\n className,\n cssModule,\n tabId,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames('tab-pane', className, { active: tabId === context.activeTabId }), cssModule);\n return (\n <Tag {...attributes} className={classes} />\n );\n}\nTabPane.propTypes = propTypes;\nTabPane.defaultProps = defaultProps;\nTabPane.contextTypes = contextTypes;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n fluid: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'div'\n};\n\nconst Jumbotron = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n fluid,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'jumbotron',\n fluid ? 'jumbotron-fluid' : false\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nJumbotron.propTypes = propTypes;\nJumbotron.defaultProps = defaultProps;\n\nexport default Jumbotron;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\nimport Fade from './Fade';\n\nconst propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n closeClassName: PropTypes.string,\n closeAriaLabel: PropTypes.string,\n cssModule: PropTypes.object,\n color: PropTypes.string,\n isOpen: PropTypes.bool,\n toggle: PropTypes.func,\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n transition: PropTypes.shape(Fade.propTypes),\n};\n\nconst defaultProps = {\n color: 'success',\n isOpen: true,\n tag: 'div',\n closeAriaLabel: 'Close',\n transition: {\n ...Fade.defaultProps,\n unmountOnExit: true,\n },\n};\n\nfunction Alert(props) {\n const {\n className,\n closeClassName,\n closeAriaLabel,\n cssModule,\n tag: Tag,\n color,\n isOpen,\n toggle,\n children,\n transition,\n ...attributes\n } = props;\n\n const classes = mapToCssModules(classNames(\n className,\n 'alert',\n `alert-${color}`,\n { 'alert-dismissible': toggle }\n ), cssModule);\n\n const closeClasses = mapToCssModules(classNames('close', closeClassName), cssModule);\n\n return (\n <Fade {...attributes} {...transition} tag={Tag} className={classes} in={isOpen} role=\"alert\">\n {toggle ?\n <button type=\"button\" className={closeClasses} aria-label={closeAriaLabel} onClick={toggle}>\n <span aria-hidden=\"true\">×</span>\n </button>\n : null}\n {children}\n </Fade>\n );\n}\n\nAlert.propTypes = propTypes;\nAlert.defaultProps = defaultProps;\n\nexport default Alert;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Transition from 'react-transition-group/Transition';\nimport { mapToCssModules, omit, pick, TransitionTimeouts, TransitionPropTypeKeys, TransitionStatuses } from './utils';\n\nconst propTypes = {\n ...Transition.propTypes,\n isOpen: PropTypes.bool,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]),\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.node,\n navbar: PropTypes.bool,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n ...Transition.defaultProps,\n isOpen: false,\n appear: false,\n enter: true,\n exit: true,\n tag: 'div',\n timeout: TransitionTimeouts.Collapse,\n};\n\nconst transitionStatusToClassHash = {\n [TransitionStatuses.ENTERING]: 'collapsing',\n [TransitionStatuses.ENTERED]: 'collapse show',\n [TransitionStatuses.EXITING]: 'collapsing',\n [TransitionStatuses.EXITED]: 'collapse',\n};\n\nfunction getTransitionClass(status) {\n return transitionStatusToClassHash[status] || 'collapse';\n}\n\nfunction getHeight(node) {\n return node.scrollHeight;\n}\n\nclass Collapse extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n height: null\n };\n\n ['onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'].forEach((name) => {\n this[name] = this[name].bind(this);\n });\n }\n\n onEntering(node, isAppearing) {\n this.setState({ height: getHeight(node) });\n this.props.onEntering(node, isAppearing);\n }\n\n onEntered(node, isAppearing) {\n this.setState({ height: null });\n this.props.onEntered(node, isAppearing);\n }\n\n onExit(node) {\n this.setState({ height: getHeight(node) });\n this.props.onExit(node);\n }\n\n onExiting(node) {\n // getting this variable triggers a reflow\n const _unused = node.offsetHeight; // eslint-disable-line no-unused-vars\n this.setState({ height: 0 });\n this.props.onExiting(node);\n }\n\n onExited(node) {\n this.setState({ height: null });\n this.props.onExited(node);\n }\n\n render() {\n const {\n tag: Tag,\n isOpen,\n className,\n navbar,\n cssModule,\n children,\n ...otherProps\n } = this.props;\n\n const { height } = this.state;\n\n // In NODE_ENV=production the Transition.propTypes are wrapped which results in an\n // empty object \"{}\". This is the result of the `react-transition-group` babel\n // configuration settings. Therefore, to ensure that production builds work without\n // error, we can either explicitly define keys or use the Transition.defaultProps.\n // Using the Transition.defaultProps excludes any required props. Thus, the best\n // solution is to explicitly define required props in our utilities and reference these.\n // This also gives us more flexibility in the future to remove the prop-types\n // dependency in distribution builds (Similar to how `react-transition-group` does).\n // Note: Without omitting the `react-transition-group` props, the resulting child\n // Tag component would inherit the Transition properties as attributes for the HTML\n // element which results in errors/warnings for non-valid attributes.\n const transitionProps = pick(otherProps, TransitionPropTypeKeys);\n const childProps = omit(otherProps, TransitionPropTypeKeys);\n\n return (\n <Transition\n {...transitionProps}\n in={isOpen}\n onEntering={this.onEntering}\n onEntered={this.onEntered}\n onExit={this.onExit}\n onExiting={this.onExiting}\n onExited={this.onExited}\n >\n {(status) => {\n let collapseClass = getTransitionClass(status);\n const classes = mapToCssModules(classNames(\n className,\n collapseClass,\n navbar && 'navbar-collapse'\n ), cssModule);\n const style = height === null ? null : { height };\n return (\n <Tag\n {...childProps}\n style={{ ...childProps.style, ...style }}\n className={classes}\n >\n {children}\n </Tag>\n );\n }}\n </Transition>\n );\n }\n}\n\nCollapse.propTypes = propTypes;\nCollapse.defaultProps = defaultProps;\nexport default Collapse;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n color: PropTypes.string,\n action: PropTypes.bool,\n className: PropTypes.any,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'li'\n};\n\nconst handleDisabledOnClick = (e) => {\n e.preventDefault();\n};\n\nconst ListGroupItem = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n active,\n disabled,\n action,\n color,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n active ? 'active' : false,\n disabled ? 'disabled' : false,\n action ? 'list-group-item-action' : false,\n color ? `list-group-item-${color}` : false,\n 'list-group-item'\n ), cssModule);\n\n // Prevent click event when disabled.\n if (disabled) {\n attributes.onClick = handleDisabledOnClick;\n }\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nListGroupItem.propTypes = propTypes;\nListGroupItem.defaultProps = defaultProps;\n\nexport default ListGroupItem;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.any,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'h5'\n};\n\nconst ListGroupItemHeading = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'list-group-item-heading'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nListGroupItemHeading.propTypes = propTypes;\nListGroupItemHeading.defaultProps = defaultProps;\n\nexport default ListGroupItemHeading;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules } from './utils';\n\nconst propTypes = {\n tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n className: PropTypes.any,\n cssModule: PropTypes.object,\n};\n\nconst defaultProps = {\n tag: 'p'\n};\n\nconst ListGroupItemText = (props) => {\n const {\n className,\n cssModule,\n tag: Tag,\n ...attributes\n } = props;\n const classes = mapToCssModules(classNames(\n className,\n 'list-group-item-text'\n ), cssModule);\n\n return (\n <Tag {...attributes} className={classes} />\n );\n};\n\nListGroupItemText.propTypes = propTypes;\nListGroupItemText.defaultProps = defaultProps;\n\nexport default ListGroupItemText;\n","import React, { Component } from 'react';\nimport Alert from './Alert';\n\nexport default class UncontrolledAlert extends Component {\n constructor(props) {\n super(props);\n\n this.state = { isOpen: true };\n this.toggle = this.toggle.bind(this);\n }\n\n toggle() {\n this.setState({ isOpen: !this.state.isOpen });\n }\n\n render() {\n return <Alert isOpen={this.state.isOpen} toggle={this.toggle} {...this.props} />;\n }\n}\n","import React, { Component } from 'react';\nimport ButtonDropdown from './ButtonDropdown';\n\nexport default class UncontrolledButtonDropdown extends Component {\n constructor(props) {\n super(props);\n\n this.state = { isOpen: false };\n this.toggle = this.toggle.bind(this);\n }\n\n toggle() {\n this.setState({ isOpen: !this.state.isOpen });\n }\n\n render() {\n return <ButtonDropdown isOpen={this.state.isOpen} toggle={this.toggle} {...this.props} />;\n }\n}\n","import React, { Component } from 'react';\nimport Dropdown from './Dropdown';\n\nexport default class UncontrolledDropdown extends Component {\n constructor(props) {\n super(props);\n\n this.state = { isOpen: false };\n this.toggle = this.toggle.bind(this);\n }\n\n toggle() {\n this.setState({ isOpen: !this.state.isOpen });\n }\n\n render() {\n return <Dropdown isOpen={this.state.isOpen} toggle={this.toggle} {...this.props} />;\n }\n}\n","import React, { Component } from 'react';\nimport Tooltip from './Tooltip';\n\nexport default class UncontrolledTooltip extends Component {\n constructor(props) {\n super(props);\n\n this.state = { isOpen: false };\n this.toggle = this.toggle.bind(this);\n }\n\n toggle() {\n this.setState({ isOpen: !this.state.isOpen });\n }\n\n render() {\n return <Tooltip isOpen={this.state.isOpen} toggle={this.toggle} {...this.props} />;\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { mediaUrl } from '../utils/constants';\n\nconst propTypes = {\n forDialog: PropTypes.bool\n};\n\nclass EmptyTip extends React.Component {\n\n render() {\n return (\n <div className={this.props.forDialog ? 'text-center mt-8' : 'empty-tip'}>\n <img src={`${mediaUrl}img/no-items-tip.png`} alt=\"\" width=\"100\" height=\"100\" className=\"no-items-img-tip\" />\n {this.props.children}\n </div>\n );\n }\n}\n\nEmptyTip.propTypes = propTypes;\n\nexport default EmptyTip;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","\n/**\n * Expose `isUrl`.\n */\n\nmodule.exports = isUrl;\n\n/**\n * RegExps.\n * A URL must match #1 and then at least one of #2/#3.\n * Use two levels of REs to avoid REDOS.\n */\n\nvar protocolAndDomainRE = /^(?:\\w+:)?\\/\\/(\\S+)$/;\n\nvar localhostDomainRE = /^localhost[\\:?\\d]*(?:[^\\:?\\d]\\S*)?$/\nvar nonLocalhostDomainRE = /^[^\\s\\.]+\\.\\S{2,}$/;\n\n/**\n * Loosely validate a URL `string`.\n *\n * @param {String} string\n * @return {Boolean}\n */\n\nfunction isUrl(string){\n if (typeof string !== 'string') {\n return false;\n }\n\n var match = string.match(protocolAndDomainRE);\n if (!match) {\n return false;\n }\n\n var everythingAfterProtocol = match[1];\n if (!everythingAfterProtocol) {\n return false;\n }\n\n if (localhostDomainRE.test(everythingAfterProtocol) ||\n nonLocalhostDomainRE.test(everythingAfterProtocol)) {\n return true;\n }\n\n return false;\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Modal, ModalHeader, ModalBody } from 'reactstrap';\nimport moment from 'moment';\nimport { gettext, fileServerRoot } from '../../utils/constants';\nimport { seafileAPI } from '../../utils/seafile-api';\nimport { Utils } from '../../utils/utils';\nimport Loading from '../loading';\n\nimport '../../css/commit-details.css';\n\nconst propTypes = {\n repoID: PropTypes.string.isRequired,\n commitID: PropTypes.string.isRequired,\n commitTime: PropTypes.string.isRequired,\n toggleDialog: PropTypes.func.isRequired\n};\n\nclass CommitDetails extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n isLoading: true,\n errorMsg: '',\n };\n }\n\n componentDidMount() {\n const {repoID, commitID} = this.props;\n seafileAPI.getCommitDetails(repoID, commitID).then((res) => {\n this.setState({\n isLoading: false,\n errorMsg: '',\n commitDetails: res.data\n });\n }).catch((error) => {\n let errorMsg = Utils.getErrorMsg(error);\n this.setState({\n isLoading: false,\n errorMsg: errorMsg\n });\n });\n }\n\n render() {\n const { toggleDialog, commitTime} = this.props;\n return (\n <Modal isOpen={true} centered={true} toggle={toggleDialog}>\n <ModalHeader toggle={toggleDialog}>{gettext('Modification Details')}</ModalHeader>\n <ModalBody>\n <p className=\"small\">{moment(this.props.commitTime).format('YYYY-MM-DD HH:mm:ss')}</p>\n <Content data={this.state} />\n </ModalBody>\n </Modal>\n );\n }\n}\n\nclass Content extends React.Component {\n\n renderDetails = (data) => {\n const detailsData = [\n {type: 'new', title: gettext('New files')},\n {type: 'removed', title: gettext('Deleted files')},\n {type: 'renamed', title: gettext('Renamed or Moved files')},\n {type: 'modified', title: gettext('Modified files')},\n {type: 'newdir', title: gettext('New directories')},\n {type: 'deldir', title: gettext('Deleted directories')}\n ];\n\n let showDesc = true;\n for (let i = 0, len = detailsData.length; i < len; i++) {\n if (data[detailsData[i].type].length) {\n showDesc = false;\n break;\n }\n }\n if (showDesc) {\n return <p>{data.cmt_desc}</p>;\n }\n\n return (\n <React.Fragment>\n {detailsData.map((item, index) => {\n if (!data[item.type].length) {\n return;\n }\n return (\n <React.Fragment key={index}>\n <h6>{item.title}</h6>\n <ul>\n {\n data[item.type].map((item, index) => {\n return <li key={index} dangerouslySetInnerHTML={{__html: item}} className=\"commit-detail-item\"></li>;\n })\n }\n </ul>\n </React.Fragment>\n );\n })}\n </React.Fragment>\n );\n }\n\n render() {\n const {isLoading, errorMsg, commitDetails} = this.props.data;\n\n if (isLoading) {\n return <Loading />;\n }\n\n if (errorMsg) {\n return <p className=\"error mt-4 text-center\">{errorMsg}</p>;\n }\n\n return this.renderDetails(commitDetails);\n }\n}\n\nCommitDetails.propTypes = propTypes;\n\nexport default CommitDetails;\n","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { withTranslation } from 'react-i18next';\n\nvar HeaderList = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(HeaderList, _React$PureComponent);\n\n var _super = _createSuper(HeaderList);\n\n function HeaderList(props) {\n var _this;\n\n _classCallCheck(this, HeaderList);\n\n _this = _super.call(this, props);\n\n _this.handleClick = function (event) {\n if (_this.props.disabled) return;\n\n var container = _this.getContainer();\n\n if (container.contains(event.target)) {\n _this.toggle();\n } else {\n if (_this.state.dropdownOpen) {\n _this.setState({\n dropdownOpen: !_this.state.dropdownOpen\n });\n }\n }\n };\n\n _this.toggle = function () {\n _this.setState({\n dropdownOpen: !_this.state.dropdownOpen\n });\n };\n\n _this.state = {\n dropdownOpen: false\n };\n return _this;\n }\n\n _createClass(HeaderList, [{\n key: \"getContainer\",\n value: function getContainer() {\n return ReactDOM.findDOMNode(this);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n document.addEventListener('click', this.handleClick);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n document.removeEventListener('click', this.handleClick);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n /*\n * here need to use click event in DropdownItem instead of onMouseDown, reactStrap listen click, keyUp, to trigger toggle function,\n * if we listen mouseDown event the tool bar will render,the position of the component will change\n * and then the click event of this component will not be triggered\n * */\n return /*#__PURE__*/React.createElement(\"div\", {\n className: 'header-list'\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-body ' + (this.props.disabled ? '' : 'header-list-body-hover') + (this.state.dropdownOpen ? ' header-list-body-highlight' : '')\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-title'\n }, this.props.t(this.props.headerType)), /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-caret'\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: this.state.dropdownOpen ? 'iconfont icon-caret-up' : 'iconfont icon-drop-down'\n }))), this.state.dropdownOpen && /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-dropdown'\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-dropdown-item',\n onClick: function onClick(event) {\n _this2.props.onClickHeader(event, 'paragraph');\n }\n }, this.props.t('paragraph')), /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-dropdown-item',\n onClick: function onClick(event) {\n _this2.props.onClickHeader(event, 'header_one');\n }\n }, this.props.t('header_one')), /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-dropdown-item',\n onClick: function onClick(event) {\n _this2.props.onClickHeader(event, 'header_two');\n }\n }, this.props.t('header_two')), /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-dropdown-item',\n onClick: function onClick(event) {\n _this2.props.onClickHeader(event, 'header_three');\n }\n }, this.props.t('header_three')), /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-dropdown-item',\n onClick: function onClick(event) {\n _this2.props.onClickHeader(event, 'header_four');\n }\n }, this.props.t('header_four')), /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-dropdown-item',\n onClick: function onClick(event) {\n _this2.props.onClickHeader(event, 'header_five');\n }\n }, this.props.t('header_five')), /*#__PURE__*/React.createElement(\"div\", {\n className: 'list-dropdown-item',\n onClick: function onClick(event) {\n _this2.props.onClickHeader(event, 'header_six');\n }\n }, this.props.t('header_six'))));\n }\n }]);\n\n return HeaderList;\n}(React.PureComponent);\n\nexport default withTranslation('seafile-editor')(HeaderList);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\n\nvar ButtonGroup = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(ButtonGroup, _React$PureComponent);\n\n var _super = _createSuper(ButtonGroup);\n\n function ButtonGroup() {\n _classCallCheck(this, ButtonGroup);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(ButtonGroup, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: 'btn-group ' + this.props.className,\n role: 'group'\n }, this.props.children);\n }\n }]);\n\n return ButtonGroup;\n}(React.PureComponent);\n\nexport default ButtonGroup;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { Tooltip } from 'reactstrap';\nimport { withTranslation } from 'react-i18next';\n\nvar IconButton = /*#__PURE__*/function (_React$Component) {\n _inherits(IconButton, _React$Component);\n\n var _super = _createSuper(IconButton);\n\n function IconButton(props) {\n var _this;\n\n _classCallCheck(this, IconButton);\n\n _this = _super.call(this, props);\n\n _this.toggle = function () {\n if (_this.props.disabled || _this.state.isFreezed && !_this.state.tooltipOpen) return;\n\n _this.setState({\n tooltipOpen: !_this.state.tooltipOpen,\n isFreezed: true\n });\n\n var that = _assertThisInitialized(_this);\n\n setTimeout(function () {\n that.setState({\n isFreezed: false\n });\n }, 100);\n };\n\n _this.getClassName = function () {\n var className = _this.props.isRichEditor ? 'rich-icon-btn ' + (_this.props.disabled ? 'rich-icon-btn-disabled' : 'rich-icon-btn-hover') : 'btn btn-icon btn-secondary btn-active';\n className = className + ' ' + (_this.props.className || '');\n return className;\n };\n\n _this.state = {\n tooltipOpen: false,\n isFreezed: false\n };\n return _this;\n }\n\n _createClass(IconButton, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n if (this.props.disabled !== nextProps.disabled) {\n this.setState({\n tooltipOpen: false\n });\n return true;\n } // only render iconButton when the button is active or show show tooltip\n\n\n if (nextState.tooltipOpen === this.state.tooltipOpen && nextProps.isActive === this.props.isActive) {\n return false;\n }\n\n return true;\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = this.getClassName();\n return /*#__PURE__*/React.createElement(\"button\", {\n id: this.props.id,\n type: 'button',\n onClick: this.props.disabled ? null : this.props.onClick,\n onMouseDown: this.props.disabled ? null : this.props.onMouseDown,\n className: className,\n \"data-active\": this.props.isActive || false,\n disabled: this.props.disabled\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: this.props.icon\n }), /*#__PURE__*/React.createElement(Tooltip, {\n toggle: this.toggle,\n delay: {\n show: 0,\n hide: 0\n },\n target: this.props.id,\n placement: \"bottom\",\n isOpen: this.state.tooltipOpen\n }, this.props.text));\n }\n }]);\n\n return IconButton;\n}(React.Component);\n\nexport default withTranslation('seafile-editor')(IconButton);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React, { Fragment } from 'react';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\nimport { withTranslation } from 'react-i18next';\nimport { EditorUtils } from '../editor/editor-utils/common-editor-utils';\n\nvar AddLinkDialog = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(AddLinkDialog, _React$PureComponent);\n\n var _super = _createSuper(AddLinkDialog);\n\n function AddLinkDialog(props) {\n var _this;\n\n _classCallCheck(this, AddLinkDialog);\n\n _this = _super.call(this, props);\n\n _this.setInitialValue = function () {\n var text = _this.editorUtils.getSelectedText();\n\n if (_this.isLinkActive) {\n var linkNode = _this.editorUtils.getCurrentLinkNode();\n\n _this.setState({\n title: _this.editorUtils.getLinkText(linkNode),\n url: linkNode.data.href\n });\n } else {\n _this.setState({\n title: text,\n url: ''\n });\n }\n };\n\n _this.handleUrlChange = function (event) {\n _this.setState({\n url: event.target.value\n });\n };\n\n _this.handleTitleChange = function (event) {\n _this.setState({\n title: event.target.value\n });\n };\n\n _this.handleSubmit = function (event) {\n event.preventDefault();\n if (_this.state.title.length === 0 || _this.state.url.length === 0) return;\n\n if (!_this.isLinkActive) {\n _this.editorUtils.insertLink({\n text: _this.state.title,\n url: _this.state.url,\n selection: _this.editorSelection\n });\n } else {\n _this.editorUtils.setLink({\n text: _this.state.title,\n url: _this.state.url,\n selection: _this.editorSelection\n });\n }\n\n _this.props.toggleLinkDialog();\n };\n\n _this.editorUtils = new EditorUtils(window.editor);\n _this.isLinkActive = _this.editorUtils.isLinkActive();\n _this.editorSelection = null;\n _this.state = {\n url: '',\n title: ''\n };\n return _this;\n }\n\n _createClass(AddLinkDialog, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.editorSelection = window.editor.selection;\n }\n }, {\n key: \"componentWillMount\",\n value: function componentWillMount() {\n this.setInitialValue();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(Modal, {\n isOpen: true,\n autoFocus: false,\n toggle: this.props.toggleLinkDialog,\n className: this.props.className\n }, /*#__PURE__*/React.createElement(ModalHeader, {\n toggle: this.props.toggleLinkDialog\n }, this.props.t('insert_link')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: \"form-check-label\",\n htmlFor: \"addLink\"\n }, this.props.t('link_address')), /*#__PURE__*/React.createElement(\"input\", {\n autoFocus: true,\n type: \"url\",\n className: \"form-control\",\n id: \"addLink\",\n value: this.state.url,\n onChange: this.handleUrlChange\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: \"form-check-label\",\n htmlFor: \"addTitle\"\n }, this.props.t('link_title')), /*#__PURE__*/React.createElement(\"input\", {\n type: \"text\",\n className: \"form-control\",\n id: \"addTitle\",\n value: this.state.title,\n onChange: this.handleTitleChange\n })))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {\n color: \"secondary\",\n onClick: this.props.toggleLinkDialog\n }, this.props.t('cancel')), /*#__PURE__*/React.createElement(Button, {\n color: \"primary\",\n disabled: false,\n onClick: this.handleSubmit\n }, this.props.t('add_link'))));\n }\n }]);\n\n return AddLinkDialog;\n}(React.PureComponent);\n\nexport default withTranslation('seafile-editor')(AddLinkDialog);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input } from 'reactstrap';\nimport { withTranslation } from 'react-i18next';\n\nvar AddImageDialog = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(AddImageDialog, _React$PureComponent);\n\n var _super = _createSuper(AddImageDialog);\n\n function AddImageDialog(props) {\n var _this;\n\n _classCallCheck(this, AddImageDialog);\n\n _this = _super.call(this, props);\n\n _this.handleUrlChange = function (event) {\n _this.setState({\n url: event.target.value\n });\n };\n\n _this.handleSubmit = function (event) {\n _this.props.insertImage({\n url: _this.state.url,\n selection: _this.editorSelection\n });\n\n _this.props.onToggleImageDialog();\n };\n\n _this.state = {\n url: ''\n };\n _this.editorSelection = null;\n return _this;\n }\n\n _createClass(AddImageDialog, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.editorSelection = window.editor.selection;\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(Modal, {\n isOpen: true,\n toggle: this.props.onToggleImageDialog,\n className: this.props.className\n }, /*#__PURE__*/React.createElement(ModalHeader, {\n toggle: this.props.onToggleImageDialog\n }, this.props.t('insert_image')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {\n for: \"columnName\"\n }, this.props.t('image_address')), /*#__PURE__*/React.createElement(Input, {\n id: \"columnName\",\n value: this.state.value,\n onChange: this.handleUrlChange,\n autoFocus: true\n })))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {\n color: \"secondary\",\n onClick: this.props.onToggleImageDialog\n }, this.props.t('cancel')), /*#__PURE__*/React.createElement(Button, {\n color: \"primary\",\n disabled: this.state.url.length === 0,\n onClick: this.handleSubmit\n }, this.props.t('submit')), ' '));\n }\n }]);\n\n return AddImageDialog;\n}(React.PureComponent);\n\nexport default withTranslation('seafile-editor')(AddImageDialog);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React, { Fragment } from 'react';\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input } from 'reactstrap';\nimport { withTranslation } from 'react-i18next';\nimport { Editor } from 'slate';\nimport { EditorUtils } from '../editor/editor-utils/common-editor-utils';\n\nvar AddFormulaDialog = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(AddFormulaDialog, _React$PureComponent);\n\n var _super = _createSuper(AddFormulaDialog);\n\n function AddFormulaDialog(props) {\n var _this;\n\n _classCallCheck(this, AddFormulaDialog);\n\n _this = _super.call(this, props);\n\n _this.setInitialValue = function () {\n var nodes = Editor.match(window.editor, window.editor.selection, {\n type: 'formula'\n });\n\n if (nodes) {\n var data = nodes[0].data;\n\n _this.setState({\n formula: data.formula\n });\n\n _this.formulaNode = nodes;\n }\n };\n\n _this.handleFormulaChange = function (event) {\n _this.renderFormula(event.target.value);\n\n _this.setState({\n formula: event.target.value\n });\n };\n\n _this.renderFormula = function (formula) {\n _this.formulaPreviewer.innerHTML = '';\n var dom = window.MathJax.tex2svg(formula);\n\n _this.formulaPreviewer.appendChild(dom);\n };\n\n _this.handleSubmit = function (event) {\n event.preventDefault();\n var formula = _this.state.formula;\n\n if (_this.formulaNode) {\n _this.editorUtils.setFormula({\n formula: formula,\n at: _this.formulaNode[1]\n });\n } else {\n _this.editorUtils.onAddFormula({\n formula: formula,\n at: _this.editorSelection\n });\n }\n\n _this.props.toggleFormulaDialog();\n };\n\n _this.editorUtils = new EditorUtils(window.editor);\n _this.state = {\n formula: ''\n };\n _this.formulaNode = null;\n _this.editorSelection = null;\n return _this;\n }\n\n _createClass(AddFormulaDialog, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.editorSelection = window.editor.selection;\n\n if (this.formulaNode) {\n this.renderFormula(this.state.formula);\n }\n }\n }, {\n key: \"componentWillMount\",\n value: function componentWillMount() {\n this.setInitialValue();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(Modal, {\n isOpen: true,\n toggle: this.props.toggleFormulaDialog,\n className: this.props.className\n }, /*#__PURE__*/React.createElement(ModalHeader, {\n toggle: this.props.toggleFormulaDialog\n }, this.props.t('insert_formula')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: \"form-check-label\"\n }, this.props.t('formula')), /*#__PURE__*/React.createElement(Input, {\n type: \"textarea\",\n className: \"form-control\",\n value: this.state.formula,\n onChange: this.handleFormulaChange\n })), /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(_ref) {\n return _this2.formulaPreviewer = _ref;\n },\n className: \"formula-preview\"\n }))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {\n color: \"secondary\",\n onClick: this.props.toggleFormulaDialog\n }, this.props.t('cancel')), /*#__PURE__*/React.createElement(Button, {\n color: \"primary\",\n disabled: false,\n onClick: this.handleSubmit\n }, this.props.t('insert_formula'))));\n }\n }]);\n\n return AddFormulaDialog;\n}(React.PureComponent);\n\nexport default withTranslation('seafile-editor')(AddFormulaDialog);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport IconButton from './icon-button';\nimport ButtonGroup from './button-group';\nimport { withTranslation } from 'react-i18next';\n\nvar TableToolBar = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(TableToolBar, _React$PureComponent);\n\n var _super = _createSuper(TableToolBar);\n\n function TableToolBar() {\n _classCallCheck(this, TableToolBar);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(TableToolBar, [{\n key: \"render\",\n value: function render() {\n var _this = this;\n\n return /*#__PURE__*/React.createElement(ButtonGroup, {\n className: 'editor-btn-group'\n }, /*#__PURE__*/React.createElement(DropList, {\n icon: 'iconfont icon-left-alignment',\n items: [{\n handle: function handle(e) {\n _this.props.onSetAlign(e, 'left');\n },\n icon: 'iconfont icon-left-alignment',\n text: this.props.t('left')\n }, {\n handle: function handle(e) {\n _this.props.onSetAlign(e, 'center');\n },\n icon: 'iconfont icon-center-horizontally',\n text: this.props.t('center')\n }, {\n handle: function handle(e) {\n _this.props.onSetAlign(e, 'right');\n },\n icon: 'icon icon-align-right',\n text: this.props.t('right')\n }]\n }), /*#__PURE__*/React.createElement(DropList, {\n icon: 'iconfont icon-column',\n items: [{\n handle: this.props.onInsertColumn,\n text: this.props.t('Insert_Column')\n }, {\n handle: this.props.onRemoveColumn,\n text: this.props.t('Remove_Column')\n }]\n }), /*#__PURE__*/React.createElement(DropList, {\n icon: 'iconfont icon-row',\n items: [{\n handle: this.props.onInsertRow,\n text: this.props.t('Insert_Row')\n }, {\n handle: this.props.onRemoveRow,\n text: this.props.t('Remove_Row')\n }]\n }), /*#__PURE__*/React.createElement(IconButton, {\n disabled: false,\n isRichEditor: true,\n text: this.props.t('remove_table'),\n id: 'removeTable',\n icon: 'iconfont icon-delete-table',\n onMouseDown: this.props.onRemoveTable\n }));\n }\n }]);\n\n return TableToolBar;\n}(React.PureComponent);\n\nvar DropList = /*#__PURE__*/function (_React$PureComponent2) {\n _inherits(DropList, _React$PureComponent2);\n\n var _super2 = _createSuper(DropList);\n\n function DropList(props) {\n var _this2;\n\n _classCallCheck(this, DropList);\n\n _this2 = _super2.call(this, props);\n\n _this2.handleClick = function (event) {\n if (_this2.props.disabled) return;\n\n var container = _this2.getContainer();\n\n if (container.contains(event.target)) {\n _this2.toggle();\n } else {\n if (_this2.state.dropdownOpen) {\n _this2.setState({\n dropdownOpen: !_this2.state.dropdownOpen\n });\n }\n }\n };\n\n _this2.toggle = function () {\n _this2.setState({\n dropdownOpen: !_this2.state.dropdownOpen\n });\n };\n\n _this2.state = {\n dropdownOpen: false\n };\n return _this2;\n }\n\n _createClass(DropList, [{\n key: \"getContainer\",\n value: function getContainer() {\n return ReactDOM.findDOMNode(this);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n document.addEventListener('click', this.handleClick);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n document.removeEventListener('click', this.handleClick);\n }\n }, {\n key: \"render\",\n value: function render() {\n var items = [];\n this.props.items.forEach(function (item, index) {\n items.push( /*#__PURE__*/React.createElement(\"button\", {\n key: 'dropdown-item' + index,\n onMouseDown: item.handle,\n className: 'dropdown-item'\n }, item.icon ? /*#__PURE__*/React.createElement(\"i\", {\n className: item.icon,\n style: {\n marginRight: '6px'\n }\n }) : null, item.text));\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: 'custom-dropdown-list'\n }, /*#__PURE__*/React.createElement(\"div\", {\n id: 'list_toggle',\n className: 'dropdown-list-toggle'\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: this.props.icon,\n style: {\n marginRight: '3px'\n }\n }), /*#__PURE__*/React.createElement(\"i\", {\n className: this.state.dropdownOpen ? 'iconfont icon-caret-up' : 'iconfont icon-drop-down'\n })), this.state.dropdownOpen && /*#__PURE__*/React.createElement(\"div\", {\n role: 'menu',\n className: 'custom-dropdown-menu dropdown-menu'\n }, items));\n }\n }]);\n\n return DropList;\n}(React.PureComponent);\n\nexport default withTranslation('seafile-editor')(TableToolBar);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { Dropdown, DropdownToggle, DropdownMenu, DropdownItem, Tooltip, Label, Input } from 'reactstrap';\nimport { withTranslation } from 'react-i18next';\n\nvar UploadImg = /*#__PURE__*/function (_React$Component) {\n _inherits(UploadImg, _React$Component);\n\n var _super = _createSuper(UploadImg);\n\n function UploadImg() {\n var _this;\n\n _classCallCheck(this, UploadImg);\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 dropdownOpen: false,\n tooltipOpen: false\n };\n\n _this.imgtoggle = function () {\n _this.setState({\n dropdownOpen: !_this.state.dropdownOpen\n });\n };\n\n _this.toggle = function () {\n if (_this.props.disabled) {\n _this.setState({\n tooltipOpen: false\n });\n\n return;\n }\n\n _this.setState({\n tooltipOpen: !_this.state.tooltipOpen\n });\n };\n\n _this.uploadLocalImage = function (event) {\n if (window.editor.editorApi.uploadLocalImage) {\n window.editor.editorApi.uploadLocalImage(event.target.files[0]).then(function (res) {\n _this.props.onInsertImage({\n url: res\n });\n });\n }\n };\n\n _this.handleFileChange = function (event) {\n _this.uploadLocalImage(event);\n\n _this.setState({\n dropdownOpen: false\n });\n };\n\n _this.onInputFile = function (event) {\n event.target.value = null;\n event.nativeEvent.stopImmediatePropagation();\n event.stopPropagation();\n };\n\n return _this;\n }\n\n _createClass(UploadImg, [{\n key: \"render\",\n value: function render() {\n var t = this.props.t;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dropdown, {\n isOpen: this.state.dropdownOpen,\n toggle: this.imgtoggle,\n className: this.props.disabled ? 'upload-localimg upload-localimg-disabled' : 'upload-localimg upload-localimg-hover'\n }, /*#__PURE__*/React.createElement(DropdownToggle, {\n id: this.props.id,\n disabled: this.props.disabled\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"iconfont icon-image\"\n }), /*#__PURE__*/React.createElement(Tooltip, {\n toggle: this.toggle,\n delay: {\n show: 0,\n hide: 0\n },\n target: this.props.id,\n placement: \"bottom\",\n isOpen: this.state.tooltipOpen\n }, t('insert_image'))), /*#__PURE__*/React.createElement(DropdownMenu, null, /*#__PURE__*/React.createElement(DropdownItem, {\n onClick: this.props.onToggleImageDialog\n }, t('insert_network_image')), !this.props.isSimpleEditor && /*#__PURE__*/React.createElement(DropdownItem, {\n onMouseDown: this.props.insertRepoFile\n }, t('Insert_library_image')), /*#__PURE__*/React.createElement(DropdownItem, {\n className: \"image-uploader-btn\"\n }, /*#__PURE__*/React.createElement(Label, {\n className: \"image-uploader-label\",\n for: \"image-uploader\",\n onClick: this.onInputFile\n }, t('upload_local_image')), /*#__PURE__*/React.createElement(Input, {\n type: \"file\",\n accept: \"image/*\",\n onChange: this.handleFileChange,\n onClick: this.onInputFile,\n className: \"image-uploader\",\n id: \"image-uploader\"\n })))));\n }\n }]);\n\n return UploadImg;\n}(React.Component);\n\nexport default withTranslation('seafile-editor')(UploadImg);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport HeaderList from '../components/topbar-component/header-list';\nimport ButtonGroup from '../components/topbar-component/button-group';\nimport IconButton from '../components/topbar-component/icon-button';\nimport { withTranslation } from 'react-i18next';\nimport AddLinkDialog from './add-link-dialog';\nimport AddImageDialog from './add-image-dialog';\nimport AddFormulaDialog from './add-formula-dialog';\nimport TableToolBar from './topbar-component/table-toolbar';\nimport { EditorUtils } from '../editor/editor-utils/common-editor-utils';\nimport UploadImg from './topbar-component/upload-img'; // import InsertFile from './topbarcomponent/insertFile';\n\nvar ToolBar = /*#__PURE__*/function (_React$Component) {\n _inherits(ToolBar, _React$Component);\n\n var _super = _createSuper(ToolBar);\n\n function ToolBar(props) {\n var _this;\n\n _classCallCheck(this, ToolBar);\n\n _this = _super.call(this, props);\n\n _this.onToggleLink = function (event) {\n event.preventDefault();\n\n var isLinkActive = _this.editorUtils.isLinkActive();\n\n if (!isLinkActive) {\n _this.props.onToggleLinkDialog();\n\n return;\n } else {\n _this.editorUtils.unwrapLink();\n }\n };\n\n _this.editor = window.editor;\n _this.editorUtils = new EditorUtils(_this.editor);\n return _this;\n }\n\n _createClass(ToolBar, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var t = this.props.t;\n var toolbarStatus = this.props.toolbarStatus;\n var readOnly = this.props.readOnly;\n var isTableActive = toolbarStatus.isTableActive,\n isHeadActive = toolbarStatus.isHeadActive,\n isCodeActive = toolbarStatus.isCodeActive,\n isBoldActive = toolbarStatus.isBoldActive,\n isItalicActive = toolbarStatus.isItalicActive,\n isInlineCodeActive = toolbarStatus.isInlineCodeActive,\n isLinkActive = toolbarStatus.isLinkActive,\n isBlockquoteActive = toolbarStatus.isBlockquoteActive,\n isOrderedListActive = toolbarStatus.isOrderedListActive,\n isUnorderedListActive = toolbarStatus.isUnorderedListActive,\n isCheckListActive = toolbarStatus.isCheckListActive,\n isFormulaActive = toolbarStatus.isFormulaActive;\n var isListActive = isOrderedListActive || isUnorderedListActive || isCheckListActive;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: 'sf-editor-rich-menu ' + (this.props.isSimpleEditor ? '' : 'rich-menu')\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: 'button-container'\n }, !readOnly && /*#__PURE__*/React.createElement(\"div\", {\n className: 'header-list-container'\n }, /*#__PURE__*/React.createElement(HeaderList, {\n disabled: isFormulaActive || isCodeActive || isTableActive,\n headerType: toolbarStatus.headerType,\n onClickHeader: this.editorUtils.onClickHeader\n })), /*#__PURE__*/React.createElement(ButtonGroup, {\n className: 'editor-btn-group'\n }, /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isCodeActive || isHeadActive,\n isRichEditor: true,\n text: t('bold'),\n id: 'BOLDButton',\n icon: 'iconfont icon-bold',\n isActive: isBoldActive,\n onMouseDown: function onMouseDown(event) {\n return _this2.editorUtils.onClickMark(event, 'BOLD');\n }\n }), /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isCodeActive || isHeadActive,\n isRichEditor: true,\n text: t('italic'),\n id: 'ITALICButton',\n icon: 'iconfont icon-italic',\n isActive: isItalicActive,\n onMouseDown: function onMouseDown(event) {\n return _this2.editorUtils.onClickMark(event, 'ITALIC');\n }\n }), /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isCodeActive || isHeadActive,\n isRichEditor: true,\n text: t('code'),\n id: 'CODEButton',\n icon: 'iconfont icon-code',\n isActive: isInlineCodeActive,\n onMouseDown: function onMouseDown(event) {\n return _this2.editorUtils.onClickMark(event, 'CODE');\n }\n }), /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isCodeActive || isHeadActive,\n isRichEditor: true,\n text: t('insert_link'),\n id: 'linkButton',\n icon: 'iconfont icon-link',\n isActive: isLinkActive,\n onMouseDown: this.onToggleLink\n })), /*#__PURE__*/React.createElement(ButtonGroup, {\n className: 'editor-btn-group'\n }, /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isTableActive || isCodeActive || isHeadActive,\n isRichEditor: true,\n text: t('quote'),\n id: 'block-quoteButton',\n icon: 'iconfont icon-quote-left',\n isActive: isBlockquoteActive,\n onMouseDown: function onMouseDown(event) {\n return _this2.editorUtils.onClickBlock(event, 'blockquote');\n }\n }), /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isTableActive || isCodeActive || isHeadActive,\n isRichEditor: true,\n text: t('ordered_list'),\n id: 'ordered_listButton',\n icon: 'iconfont icon-list-ol',\n isActive: isOrderedListActive,\n onMouseDown: function onMouseDown(event) {\n return _this2.editorUtils.onClickBlock(event, 'ordered_list');\n }\n }), /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isTableActive || isCodeActive || isHeadActive,\n isRichEditor: true,\n text: t('unordered_list'),\n id: 'unordered_listButton',\n icon: 'iconfont icon-list-ul',\n isActive: isUnorderedListActive,\n onMouseDown: function onMouseDown(event) {\n return _this2.editorUtils.onClickBlock(event, 'unordered_list');\n }\n }), /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isTableActive || isCodeActive || isHeadActive,\n isRichEditor: true,\n text: t('check_list_item'),\n id: 'checkListItemButton',\n icon: 'iconfont icon-check-square',\n isActive: isCheckListActive,\n onMouseDown: this.editorUtils.onToggleCheckItem\n })), /*#__PURE__*/React.createElement(ButtonGroup, {\n className: 'editor-btn-group'\n }, /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isTableActive || isHeadActive,\n isRichEditor: true,\n text: t('code_block'),\n id: 'codeButton',\n icon: 'iconfont icon-code-block',\n onMouseDown: function onMouseDown(event) {\n return _this2.editorUtils.onClickBlock(event, 'code_block');\n },\n isActive: isCodeActive && !readOnly\n }), /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isCodeActive || isTableActive || isHeadActive,\n isRichEditor: true,\n text: t('insert_table'),\n id: 'tableButton',\n icon: 'iconfont icon-table',\n onMouseDown: this.editorUtils.onAddTable\n }), window.canInsertFormula && /*#__PURE__*/React.createElement(IconButton, {\n disabled: isFormulaActive || isCodeActive || isTableActive || isHeadActive || isListActive,\n isRichEditor: true,\n text: t('insert_formula'),\n id: 'formulaButton',\n icon: 'iconfont icon-formula',\n onMouseDown: this.props.onToggleFormulaDialog\n }), /*#__PURE__*/React.createElement(UploadImg, {\n disabled: isFormulaActive || isCodeActive || isHeadActive,\n text: 'insert_image',\n id: 'insertImageButton',\n insertRepoFile: this.props.insertRepoFile,\n isSimpleEditor: this.props.isSimpleEditor,\n onInsertImage: this.editorUtils.insertImage,\n toolbarStatus: this.props.toolbarStatus,\n onToggleImageDialog: this.props.onToggleImageDialog\n })), isTableActive && !readOnly && /*#__PURE__*/React.createElement(TableToolBar, {\n onRemoveTable: this.editorUtils.onRemoveTable,\n onInsertColumn: this.editorUtils.onInsertColumn,\n onRemoveColumn: this.editorUtils.onRemoveColumn,\n onInsertRow: this.editorUtils.onInsertRow,\n onRemoveRow: this.editorUtils.onRemoveRow,\n onSetAlign: this.editorUtils.onSetAlign\n })), this.props.hasSidePanel && /*#__PURE__*/React.createElement(\"div\", {\n className: \"button-container\"\n }, !this.props.isShowSidePanel && /*#__PURE__*/React.createElement(ButtonGroup, {\n className: \"editor-btn-group position-absolute dropdown-menu-right\"\n }, /*#__PURE__*/React.createElement(IconButton, {\n isRichEditor: true,\n text: t('Show_side_panel'),\n id: \"showSidepanel\",\n icon: \"iconfont icon-angle-double-left\",\n isActive: false,\n onMouseDown: this.props.toggleSidePanel\n })), this.props.isShowSidePanel && /*#__PURE__*/React.createElement(ButtonGroup, {\n className: \"editor-btn-group position-absolute dropdown-menu-right\"\n }, /*#__PURE__*/React.createElement(IconButton, {\n isRichEditor: true,\n text: t('Hide_side_panel'),\n id: \"hideSidepanel\",\n icon: \"iconfont icon-angle-double-right\",\n isActive: false,\n onMouseDown: this.props.toggleSidePanel\n }))), this.props.isShowLinkDialog && /*#__PURE__*/React.createElement(AddLinkDialog, {\n toggleLinkDialog: this.props.onToggleLinkDialog\n }), this.props.isShowFormulaDialog && /*#__PURE__*/React.createElement(AddFormulaDialog, {\n toggleFormulaDialog: this.props.onToggleFormulaDialog\n }), this.props.isShowImageDialog && /*#__PURE__*/React.createElement(AddImageDialog, {\n onToggleImageDialog: this.props.onToggleImageDialog,\n insertImage: this.editorUtils.insertImage\n }));\n }\n }]);\n\n return ToolBar;\n}(React.Component);\n\nexport default withTranslation('seafile-editor')(ToolBar);","import isPlainObject from 'is-plain-object'\nimport { Operation } from 'slate'\n\n/**\n * `History` objects hold all of the operations that are applied to a value, so\n * they can be undone or redone as necessary.\n */\n\nexport interface History {\n redos: Operation[][]\n undos: Operation[][]\n}\n\nexport const History = {\n /**\n * Check if a value is a `History` object.\n */\n\n isHistory(value: any): value is History {\n return (\n isPlainObject(value) &&\n Array.isArray(value.redos) &&\n Array.isArray(value.undos) &&\n (value.redos.length === 0 || Operation.isOperationList(value.redos[0])) &&\n (value.undos.length === 0 || Operation.isOperationList(value.undos[0]))\n )\n },\n}\n","import { Command } from 'slate'\n\nexport interface RedoCommand {\n type: 'redo'\n}\n\nexport interface UndoCommand {\n type: 'undo'\n}\n\nexport type HistoryCommand = RedoCommand | UndoCommand\n\nexport const HistoryCommand = {\n /**\n * Check if a value is a `HistoryCommand` object.\n */\n\n isHistoryCommand(value: any): value is HistoryCommand {\n if (Command.isCommand(value)) {\n switch (value.type) {\n case 'redo':\n case 'undo':\n return true\n }\n }\n\n return false\n },\n}\n","import { Editor } from 'slate'\nimport { History } from './history'\n\n/**\n * Weakmaps for attaching state to the editor.\n */\n\nexport const HISTORY = new WeakMap<Editor, History>()\nexport const SAVING = new WeakMap<Editor, boolean | undefined>()\nexport const MERGING = new WeakMap<Editor, boolean | undefined>()\n\n/**\n * `HistoryEditor` contains helpers for history-enabled editors.\n */\n\nexport interface HistoryEditor extends Editor {\n history: History\n}\n\nexport const HistoryEditor = {\n /**\n * Check if a value is a `HistoryEditor` object.\n */\n\n isHistoryEditor(value: any): value is HistoryEditor {\n return Editor.isEditor(value) && History.isHistory(value.history)\n },\n\n /**\n * Get the merge flag's current value.\n */\n\n isMerging(editor: Editor): boolean | undefined {\n return MERGING.get(editor)\n },\n\n /**\n * Get the saving flag's current value.\n */\n\n isSaving(editor: Editor): boolean | undefined {\n return SAVING.get(editor)\n },\n\n /**\n * Apply a series of changes inside a synchronous `fn`, without merging any of\n * the new operations into previous save point in the history.\n */\n\n withoutMerging(editor: Editor, fn: () => void): void {\n const prev = HistoryEditor.isMerging(editor)\n MERGING.set(editor, false)\n fn()\n MERGING.set(editor, prev)\n },\n\n /**\n * Apply a series of changes inside a synchronous `fn`, without saving any of\n * their operations into the history.\n */\n\n withoutSaving(editor: Editor, fn: () => void): void {\n const prev = HistoryEditor.isSaving(editor)\n SAVING.set(editor, false)\n fn()\n SAVING.set(editor, prev)\n },\n}\n","import { Editor, Command, Operation, Path } from 'slate'\n\nimport { HistoryCommand } from './history-command'\nimport { HistoryEditor } from './history-editor'\n\n/**\n * The `withHistory` plugin keeps track of the operation history of a Slate\n * editor as operations are applied to it, using undo and redo stacks.\n */\n\nexport const withHistory = (editor: Editor): HistoryEditor => {\n const { apply, exec } = editor\n editor.history = { undos: [], redos: [] }\n\n editor.exec = (command: Command) => {\n if (\n HistoryEditor.isHistoryEditor(editor) &&\n HistoryCommand.isHistoryCommand(command)\n ) {\n const { history } = editor\n const { undos, redos } = history\n\n if (command.type === 'redo' && redos.length > 0) {\n const batch = redos[redos.length - 1]\n\n HistoryEditor.withoutSaving(editor, () => {\n Editor.withoutNormalizing(editor, () => {\n for (const op of batch) {\n editor.apply(op)\n }\n })\n })\n\n history.redos.pop()\n history.undos.push(batch)\n return\n }\n\n if (command.type === 'undo' && undos.length > 0) {\n const batch = undos[undos.length - 1]\n\n HistoryEditor.withoutSaving(editor, () => {\n Editor.withoutNormalizing(editor, () => {\n const inverseOps = batch.map(Operation.inverse).reverse()\n\n for (const op of inverseOps) {\n // If the final operation is deselecting the editor, skip it. This is\n if (\n op === inverseOps[inverseOps.length - 1] &&\n op.type === 'set_selection' &&\n op.newProperties == null\n ) {\n continue\n } else {\n editor.apply(op)\n }\n }\n })\n })\n\n history.redos.push(batch)\n history.undos.pop()\n return\n }\n }\n\n exec(command)\n }\n\n editor.apply = (op: Operation) => {\n if (HistoryEditor.isHistoryEditor(editor)) {\n const { operations, history } = editor\n const { undos } = history\n const lastBatch = undos[undos.length - 1]\n const lastOp = lastBatch && lastBatch[lastBatch.length - 1]\n const overwrite = shouldOverwrite(op, lastOp)\n let save = HistoryEditor.isSaving(editor)\n let merge = HistoryEditor.isMerging(editor)\n\n if (save == null) {\n save = shouldSave(op, lastOp)\n }\n\n if (save) {\n if (merge == null) {\n if (lastBatch == null) {\n merge = false\n } else if (operations.length !== 0) {\n merge = true\n } else {\n merge = shouldMerge(op, lastOp) || overwrite\n }\n }\n\n if (lastBatch && merge) {\n if (overwrite) {\n lastBatch.pop()\n }\n\n lastBatch.push(op)\n } else {\n const batch = [op]\n undos.push(batch)\n }\n\n while (undos.length > 100) {\n undos.shift()\n }\n\n if (shouldClear(op)) {\n history.redos = []\n }\n }\n }\n\n apply(op)\n }\n\n return editor as HistoryEditor\n}\n\n/**\n * Check whether to merge an operation into the previous operation.\n */\n\nconst shouldMerge = (op: Operation, prev: Operation | undefined): boolean => {\n if (op.type === 'set_selection') {\n return true\n }\n\n if (\n prev &&\n op.type === 'insert_text' &&\n prev.type === 'insert_text' &&\n op.offset === prev.offset + prev.text.length &&\n Path.equals(op.path, prev.path)\n ) {\n return true\n }\n\n if (\n prev &&\n op.type === 'remove_text' &&\n prev.type === 'remove_text' &&\n op.offset + op.text.length === prev.offset &&\n Path.equals(op.path, prev.path)\n ) {\n return true\n }\n\n return false\n}\n\n/**\n * Check whether an operation needs to be saved to the history.\n */\n\nconst shouldSave = (op: Operation, prev: Operation | undefined): boolean => {\n if (op.type === 'set_selection' && op.newProperties == null) {\n return false\n }\n\n return true\n}\n\n/**\n * Check whether an operation should overwrite the previous one.\n */\n\nconst shouldOverwrite = (\n op: Operation,\n prev: Operation | undefined\n): boolean => {\n if (prev && op.type === 'set_selection' && prev.type === 'set_selection') {\n return true\n }\n\n return false\n}\n\n/**\n * Check whether an operation should clear the redos stack.\n */\n\nconst shouldClear = (op: Operation): boolean => {\n if (op.type === 'set_selection') {\n return false\n }\n\n return true\n}\n","import { Range } from 'slate';\n\nvar isRangeCollapsed = function isRangeCollapsed(range) {\n if (range) {\n return Range.isCollapsed(range);\n }\n};\n\nexport { isRangeCollapsed };","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { Button } from 'reactstrap';\nimport { withTranslation } from 'react-i18next';\n\nvar TextLinkHoverMenu = /*#__PURE__*/function (_React$Component) {\n _inherits(TextLinkHoverMenu, _React$Component);\n\n var _super = _createSuper(TextLinkHoverMenu);\n\n function TextLinkHoverMenu(props) {\n var _this;\n\n _classCallCheck(this, TextLinkHoverMenu);\n\n _this = _super.call(this, props);\n\n _this.saveRef = function (ref) {\n _this.refDom = ref;\n };\n\n _this.getLinkUrl = function () {\n var linkNode = _this.props.editorUtils.getCurrentLinkNode();\n\n if (linkNode) {\n _this.linkUrl = linkNode.data.href;\n }\n };\n\n _this.setMenuPosition = function () {\n if (window.getSelection().anchorOffset !== 0 && window.getSelection().focusOffset !== 0) {\n var native = window.getSelection();\n var range = native.getRangeAt(0);\n var rect = range.getBoundingClientRect();\n\n if (navigator.userAgent.indexOf('Chrome') < 0 && navigator.userAgent.indexOf('Safari') > 0) {\n if (range.collapsed && rect.top === 0 && rect.height === 0) {\n if (range.startOffset === 0) {\n range.setEnd(range.endContainer, 1);\n } else {\n range.setStart(range.startContainer, range.startOffset - 1);\n }\n\n rect = range.getBoundingClientRect();\n\n if (rect.top === 0 && rect.height === 0) {\n if (range.getClientRects().length) {\n rect = range.getClientRects()[0];\n }\n }\n }\n }\n\n var style = _this.refDom.style;\n style.zIndex = '1050';\n style.top = \"\".concat(rect.top - 45, \"px\");\n var left = parseInt(rect.x - 125);\n\n if (left < 0) {\n style.left = '0px';\n } else if (left + 250 > document.body.clientWidth) {\n style.left = \"\".concat(document.body.clientWidth - 250, \"px\");\n } else {\n style.left = \"\".concat(rect.x - 125, \"px\");\n }\n }\n };\n\n _this.componentDidMount = function () {\n requestAnimationFrame(function () {\n _this.setMenuPosition();\n });\n };\n\n _this.componentWillUnmount = function () {\n _this.refDom = null;\n };\n\n _this.componentWillMount = function () {\n _this.getLinkUrl();\n };\n\n _this.linkUrl = '';\n return _this;\n }\n\n _createClass(TextLinkHoverMenu, [{\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.setMenuPosition();\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps() {\n this.getLinkUrl();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-ed-hovermenu\",\n ref: function ref(_ref) {\n return _this2.refDom = _ref;\n }\n }, /*#__PURE__*/React.createElement(\"a\", {\n href: this.linkUrl,\n target: \"blank\",\n className: \"seafile-ed-hovermenu-link\"\n }, this.linkUrl), /*#__PURE__*/React.createElement(Button, {\n color: \"\",\n className: \"seafile-ed-hovermenu-btn\",\n onClick: this.props.editorUtils.unwrapLink\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"iconfont icon-delete\"\n })), /*#__PURE__*/React.createElement(Button, {\n color: \"\",\n onClick: this.props.onToggleLinkDialog,\n className: \"seafile-ed-hovermenu-btn\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"iconfont icon-edit\"\n })), /*#__PURE__*/React.createElement(\"span\", {\n className: \"seafile-ed-hovermenu-triangle\"\n }));\n }\n }]);\n\n return TextLinkHoverMenu;\n}(React.Component);\n\nexport default withTranslation('seafile-editor')(TextLinkHoverMenu);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { withTranslation } from 'react-i18next';\n\nvar ContextMenu = /*#__PURE__*/function (_React$Component) {\n _inherits(ContextMenu, _React$Component);\n\n var _super = _createSuper(ContextMenu);\n\n function ContextMenu(props) {\n var _this;\n\n _classCallCheck(this, ContextMenu);\n\n _this = _super.call(this, props);\n\n _this.setMenuPosition = function () {\n var menuHeight = _this.menu.offsetHeight; // get height of context menu when the menu is drawing completed in this page\n\n if (menuHeight === 0) {\n requestAnimationFrame(_this.setMenuPosition);\n }\n\n var top = 0;\n\n if (_this.position.top + menuHeight > document.body.clientHeight) {\n top = document.body.clientHeight - menuHeight - 5;\n } else {\n top = _this.position.top;\n }\n\n var left = _this.position.left + 3;\n\n _this.setState({\n contextStyle: {\n top: top,\n left: left,\n zIndex: '1051',\n display: 'block'\n }\n });\n };\n\n _this.tableUtils = props.tableUtils;\n _this.state = {\n contextStyle: {}\n };\n return _this;\n }\n\n _createClass(ContextMenu, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.position = this.props.contextMenuPosition;\n this.setMenuPosition();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.menu = null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(\"div\", {\n role: 'menu',\n style: this.state.contextStyle,\n ref: function ref(_ref) {\n return _this2.menu = _ref;\n },\n className: 'seafile-contextmenu dropdown-menu'\n }, /*#__PURE__*/React.createElement(\"button\", {\n onMouseDown: function onMouseDown(event) {\n return _this2.tableUtils.insertRow('before');\n },\n className: 'seafile-contextmenu-item dropdown-item'\n }, this.props.t('Insert_Row_Before')), /*#__PURE__*/React.createElement(\"button\", {\n onMouseDown: function onMouseDown(event) {\n return _this2.tableUtils.insertRow('after');\n },\n className: 'seafile-contextmenu-item dropdown-item'\n }, this.props.t('Insert_Row_After')), /*#__PURE__*/React.createElement(\"button\", {\n onMouseDown: function onMouseDown(event) {\n return _this2.tableUtils.insertColumn('before');\n },\n className: 'seafile-contextmenu-item dropdown-item'\n }, this.props.t('Insert_Column_Before')), /*#__PURE__*/React.createElement(\"button\", {\n onMouseDown: function onMouseDown(event) {\n return _this2.tableUtils.insertColumn('after');\n },\n className: 'seafile-contextmenu-item dropdown-item'\n }, this.props.t('Insert_Column_After')), /*#__PURE__*/React.createElement(\"div\", {\n className: 'seafile-divider dropdown-divider'\n }), /*#__PURE__*/React.createElement(\"button\", {\n onMouseDown: this.tableUtils.removeRow,\n className: 'seafile-contextmenu-item dropdown-item'\n }, this.props.t('Remove_Row')), /*#__PURE__*/React.createElement(\"button\", {\n onMouseDown: this.tableUtils.removeColumn,\n className: 'seafile-contextmenu-item dropdown-item'\n }, this.props.t('Remove_Column')));\n }\n }]);\n\n return ContextMenu;\n}(React.Component);\n\nexport default withTranslation('seafile-editor')(ContextMenu);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\n\nvar Link = function Link(options) {\n _classCallCheck(this, Link);\n\n this.type = options.type || 'link';\n this.children = options.children || [{\n text: ''\n }];\n this.data = options.data || {\n href: ''\n };\n};\n\nvar generateLinkElement = function generateLinkElement(options) {\n return Object.assign({}, new Link(options));\n};\n\nexport default generateLinkElement;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\n\nvar Image = function Image(options) {\n _classCallCheck(this, Image);\n\n this.type = options.type || 'image';\n this.data = options.data || {\n src: ''\n };\n this.children = options.children || [{\n text: ''\n }];\n};\n\nvar generateImage = function generateImage(options) {\n return Object.assign({}, new Image(options));\n};\n\nexport default generateImage;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _createForOfIteratorHelper from \"@babel/runtime/helpers/esm/createForOfIteratorHelper\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { Editor } from 'slate';\nimport ListUtils from '../editor-utils/block-element-utils/list-utils';\nimport CodeUtils from '../editor-utils/block-element-utils/code-utils';\nimport { isRangeCollapsed } from '../editor-utils/range-utils';\nimport TableUtils from '../editor-utils/block-element-utils/table-utils';\nimport getEventTransfer from '../custom/get-event-transfer';\nimport BlockquoteUtils from '../editor-utils/block-element-utils/blockquote-utils';\nimport FormulaUtils from '../editor-utils/block-element-utils/formula-utils';\nimport { htmlDeserializer } from '../../utils/deserialize-html';\nimport generateLinkElement from '../element-model/link';\nimport generateImageElement from '../element-model/image';\nimport isUrl from 'is-url';\nimport { SfEditor } from '../custom/custom';\n\nvar withBlock = function withBlock(editor) {\n var exec = editor.exec;\n var listUtils = new ListUtils(editor);\n var codeUtils = new CodeUtils(editor);\n var tableUtils = new TableUtils(editor);\n var blockquoteUtils = new BlockquoteUtils(editor);\n var formulaUtils = new FormulaUtils(editor);\n\n editor.exec = function (command) {\n var data = command.data;\n var selection = editor.selection;\n\n switch (command.type) {\n case 'set_header':\n Editor.setNodes(editor, {\n type: command.headerType\n });\n break;\n\n case 'insert_data':\n var _getEventTransfer = getEventTransfer(data),\n fragment = _getEventTransfer.fragment,\n type = _getEventTransfer.type,\n html = _getEventTransfer.html,\n text = _getEventTransfer.text;\n\n if (type === 'file') {\n exec(command);\n return;\n } // insert a link if text content is a url\n\n\n if (isUrl(text) && !codeUtils.isInCodeBlock()) {\n if (text.endsWith('png') || text.endsWith('PNG') || text.endsWith('jpg') || text.endsWith('JPG') || text.endsWith('gif') || text.endsWith('GIF')) {\n var img = generateImageElement({\n data: {\n src: text\n }\n });\n Editor.insertNodes(editor, img);\n return;\n }\n\n if (window.editor.editorApi.isInternalFileLink(text)) {\n var index = text.lastIndexOf('/');\n\n if (index > 0) {\n var name = text.substring(index + 1);\n var fileName = decodeURIComponent(name);\n SfEditor.insertNodes(editor, [generateLinkElement({\n data: {\n href: text\n },\n children: [{\n text: fileName\n }]\n }), {\n text: ' '\n }]);\n return;\n }\n }\n\n if (window.editor.editorApi.isInternalDirLink(text)) {\n var _index = text.lastIndexOf('/');\n\n if (_index > 0) {\n var name = text.substring(_index + 1);\n var dirName = decodeURIComponent(name);\n SfEditor.insertNodes(editor, [generateLinkElement({\n data: {\n href: text\n },\n children: [{\n text: dirName\n }]\n }), {\n text: ' '\n }]);\n return;\n }\n }\n\n SfEditor.insertNodes(editor, [generateLinkElement({\n data: {\n href: text\n },\n children: [{\n text: text\n }]\n }), {\n text: ' '\n }]);\n return;\n }\n\n try {\n if (tableUtils.isInTable()) {\n tableUtils.pasteContentInTable(command);\n return;\n }\n\n if (listUtils.isInlist()) {\n listUtils.pasteContentInList(command);\n return;\n }\n\n if (codeUtils.isInCodeBlock()) {\n codeUtils.pasteContentInCodeBlock(command);\n return;\n }\n\n if (blockquoteUtils.isInBlockquote()) {\n blockquoteUtils.pasteContentInBlockquote(command);\n return;\n }\n } catch (error) {\n Editor.insertText(editor, text);\n }\n\n if (type === 'fragment') {\n var _Editor$match = Editor.match(editor, editor.selection, 'block'),\n _Editor$match2 = _slicedToArray(_Editor$match, 2),\n currentBlock = _Editor$match2[0],\n path = _Editor$match2[1];\n\n var firstFragmentNode = fragment[0]; // if first fragment node is paragraph insert the content of it into previous sibling\n // and insert other node\n\n if (firstFragmentNode.type === 'paragraph') {\n Editor.insertFragment(editor, fragment);\n return;\n } // if current node is an empty paragraph, insert the fragment and\n // delete the empty paragraph\n\n\n if (SfEditor.isEmptyParagraph(currentBlock)) {\n Editor.insertNodes(editor, fragment);\n Editor.delete(editor, {\n at: path\n });\n return;\n } // insert the fragment below the current selection node\n\n\n Editor.insertNodes(editor, fragment);\n return;\n }\n\n if (type === 'html') {\n try {\n var _fragment = htmlDeserializer(html);\n\n Editor.insertFragment(editor, _fragment);\n } catch (error) {\n var newText = text.replace(/\\n|\\r\\n/g, ' ');\n Editor.insertText(editor, newText);\n }\n\n return;\n } // remove text line break and insert text\n\n\n if (type === 'text') {\n var textArray = text.split(/\\r\\n|\\n/g);\n textArray.forEach(function (text, index) {\n if (index === 0) {\n Editor.insertText(editor, text);\n } else {\n Editor.insertNodes(editor, {\n type: 'paragraph',\n children: [{\n text: text\n }]\n });\n }\n });\n return;\n }\n\n exec(command);\n break;\n\n case 'set_blockquote':\n if (!selection) {\n return;\n }\n\n blockquoteUtils.wrapBlockquote();\n break;\n\n case 'unwrap_blockquote':\n blockquoteUtils.unwrapBlockquote();\n break;\n\n case 'set_ordered_list':\n if (!selection) {\n return;\n }\n\n listUtils.wrapList('ordered_list');\n break;\n\n case 'set_unordered_list':\n if (!selection) {\n return;\n }\n\n listUtils.wrapList('unordered_list');\n break;\n\n case 'unwrap_unordered_list':\n case 'unwrap_ordered_list':\n listUtils.unwrapList();\n break;\n\n case 'wrap_check_list_item':\n var listItem = listUtils.getCurrentListItem();\n\n if (listItem.length === 0) {\n // not in list, add list\n listUtils.wrapList('unordered_list');\n Editor.setNodes(editor, {\n data: {\n checked: false\n }\n }, {\n match: {\n type: 'list_item'\n }\n });\n } else {\n var listItems = Editor.nodes(editor, {\n at: editor.selection,\n match: {\n type: 'list_item'\n }\n });\n var nearestItem;\n\n var _iterator = _createForOfIteratorHelper(listItems),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _listItem = _step.value;\n nearestItem = _listItem;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n Editor.setNodes(editor, {\n data: {\n checked: false\n }\n }, {\n at: nearestItem[1]\n });\n }\n\n break;\n\n case 'unwrap_check_list_item':\n var item = listUtils.getCurrentListItem();\n Editor.setNodes(editor, {\n data: {}\n }, {\n at: item[0][1]\n });\n break;\n\n case 'set_code_block':\n codeUtils.wrapCodeBlock();\n break;\n\n case 'unwrap_code_block':\n codeUtils.unwrapCodeBlock();\n break;\n\n case 'exit_code_block':\n Editor.splitNodes(editor, {\n match: 'block',\n always: true\n });\n codeUtils.unwrapCodeBlock(true);\n break;\n\n case 'increase_code_block_indent':\n if (isRangeCollapsed(editor.selection)) {\n var block = Editor.match(editor, editor.selection, 'block');\n Editor.insertText(editor, '\\t', {\n at: {\n anchor: {\n path: [].concat(_toConsumableArray(block[1]), [0]),\n offset: 0\n },\n focus: {\n path: [].concat(_toConsumableArray(block[1]), [0]),\n offset: 0\n }\n }\n });\n }\n\n break;\n\n case 'insert_table':\n tableUtils.insertTable();\n break;\n\n case 'remove_table':\n tableUtils.removeTable();\n break;\n\n case 'insert_row':\n tableUtils.insertRow();\n break;\n\n case 'insert_column':\n tableUtils.insertColumn();\n break;\n\n case 'remove_row':\n tableUtils.removeRow();\n break;\n\n case 'remove_column':\n tableUtils.removeColumn();\n break;\n\n case 'set_table_cell_align':\n tableUtils.setAlign(command.align);\n break;\n\n case 'exit_table':\n tableUtils.exitTable();\n break;\n\n case 'insert_formula':\n formulaUtils.insertFormula(command.data);\n break;\n\n case 'set_formula':\n formulaUtils.setFormula(command.data);\n break;\n\n default:\n exec(command);\n break;\n }\n };\n\n return editor;\n};\n\nexport default withBlock;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport { Editor, Range } from 'slate';\nimport generateLinkElement from '../element-model/link';\nimport generateImageElement from '../element-model/image';\n\nvar withInline = function withInline(editor) {\n var exec = editor.exec,\n isInline = editor.isInline;\n\n editor.isInline = function (element) {\n return element.type === 'link' || element.type === 'image' ? true : isInline(element);\n };\n\n editor.exec = function (command) {\n var data = command.data;\n var selection = editor.selection;\n\n switch (command.type) {\n case 'insert_link_at_selection':\n selection = command.elementData.selection;\n var isCollapsed = selection && Range.isCollapsed(selection);\n var link = generateLinkElement({\n type: 'link',\n children: [{\n text: command.elementData.text\n }],\n data: {\n href: command.elementData.url\n }\n });\n\n if (isCollapsed) {\n Editor.insertNodes(editor, link, {\n at: selection\n });\n } else {\n Editor.wrapNodes(editor, link, {\n split: true,\n at: selection\n });\n Editor.select(editor, selection);\n Editor.collapse(editor, {\n edge: 'end'\n });\n }\n\n break;\n\n case 'unwrap_link':\n Editor.unwrapNodes(editor, {\n match: {\n type: 'link'\n }\n });\n break;\n\n case 'set_link':\n selection = command.elementData.selection;\n Editor.removeNodes(editor, {\n match: {\n type: 'link'\n },\n at: selection\n });\n var newNodeLink = generateLinkElement({\n type: 'link',\n data: {\n href: command.elementData.url\n },\n children: [{\n text: command.elementData.text\n }]\n }); // Insert a new link at previous link path\n\n var linkPath = _toConsumableArray(selection.anchor.path);\n\n linkPath.pop();\n Editor.insertNodes(editor, newNodeLink, {\n at: linkPath\n });\n break;\n\n case 'insert_image_at_selection':\n var img = generateImageElement({\n data: command.data\n });\n Editor.insertNodes(editor, img, {\n at: command.at\n });\n break;\n\n case 'set_image':\n Editor.setNodes(editor, {\n data: data\n }, {\n match: {\n type: 'image'\n },\n at: editor.selection,\n voids: true\n });\n break;\n\n case 'insert_data':\n if (data.types.includes('Files') && data.files[0].type.includes('image') && window.editor.editorApi.uploadLocalImage) {\n window.editor.editorApi.uploadLocalImage(command.data.files[0]).then(function (res) {\n var img = generateImageElement({\n data: {\n src: res\n }\n });\n Editor.insertNodes(editor, img);\n });\n return;\n }\n\n exec(command);\n break;\n\n default:\n exec(command);\n break;\n }\n };\n\n return editor;\n};\n\nexport default withInline;","var withVoid = function withVoid(editor) {\n var isVoid = editor.isVoid;\n var VOID_ELEMENTS = ['image', 'formula'];\n\n editor.isVoid = function (element) {\n return VOID_ELEMENTS.includes(element.type) ? true : isVoid(element);\n };\n\n return editor;\n};\n\nexport default withVoid;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport { Editor, Path } from 'slate';\nvar BOLDITALICREG = /\\*\\*\\*(\\S+)\\*\\*\\*|\\_\\_\\_(\\S+)\\_\\_\\_|\\*\\_\\_(\\S+)\\_\\_\\*|\\_\\*\\*(\\S+)\\*\\*\\_|\\_\\_\\*(\\S+)\\*\\_\\_|\\*\\*\\_(\\S+)_\\*\\*/;\nvar BOLDREG = /\\*\\*(\\S+)\\*\\*|\\_\\_(\\S+)\\_\\_/;\nvar ITALICREG = /\\*(\\S+)\\*|_(\\S+)_/;\nvar CODEREG = /\\`(\\S+)\\`/;\n\nvar TextUtils = function TextUtils(_editor) {\n var _this = this;\n\n _classCallCheck(this, TextUtils);\n\n this.getTextInfoBeforeSelection = function () {\n var editor = _this.editor;\n var selection = _this.editor.selection;\n var anchor = selection.anchor;\n\n var _Editor$nodes = Editor.nodes(editor, {\n match: 'block'\n }),\n _Editor$nodes2 = _slicedToArray(_Editor$nodes, 1),\n block = _Editor$nodes2[0];\n\n var path = block ? block[1] : [];\n var start = Editor.start(editor, path);\n var range = {\n anchor: anchor,\n focus: start\n };\n var beforeText = Editor.text(editor, range);\n return {\n range: range,\n beforeText: beforeText,\n block: block\n };\n };\n\n this.setTextMarkByShortCut = function (exec, command) {\n var editor = _this.editor;\n var selection = editor.selection;\n\n var _Editor$node = Editor.node(editor, selection),\n _Editor$node2 = _slicedToArray(_Editor$node, 2),\n textNode = _Editor$node2[0],\n textPath = _Editor$node2[1];\n\n var text = textNode.text;\n var offset = selection.anchor.offset;\n var lastChart = text[offset - 1];\n var marks, markText, startOffset;\n var matched;\n\n if (lastChart === '_' || lastChart === '`' || lastChart === '*') {\n if (matched = text.match(BOLDITALICREG)) {\n startOffset = matched.index;\n marks = {\n BOLD: true,\n ITALIC: true\n };\n } else if (matched = text.match(BOLDREG)) {\n startOffset = matched.index;\n marks = {\n BOLD: true\n };\n } else if (matched = text.match(ITALICREG)) {\n startOffset = matched.index;\n marks = {\n ITALIC: true\n };\n } else if (matched = text.match(CODEREG)) {\n startOffset = matched.index;\n marks = {\n CODE: true\n };\n }\n\n if (matched) {\n for (var index = 1; index < matched.length; index++) {\n if (matched[index]) {\n markText = matched[index];\n break;\n }\n }\n\n marks = Object.assign({\n BOLD: false,\n ITALIC: false,\n CODE: false\n }, marks);\n Editor.select(editor, {\n anchor: {\n path: textPath,\n offset: startOffset\n },\n focus: {\n path: textPath,\n offset: offset\n }\n });\n Editor.delete(editor, editor.selection); // insert a space before mark\n\n Editor.insertText(editor, ' ');\n Editor.insertNodes(editor, [_objectSpread({\n text: markText\n }, marks), {\n text: ' '\n }]);\n var selectedPath = Path.next(Path.next(textPath)); // select the next empty text node to escape the mark\n\n Editor.select(editor, selectedPath);\n Editor.collapse(editor, {\n edge: 'end'\n });\n return;\n }\n }\n\n exec(command);\n };\n\n this.editor = _editor;\n} // Get text related variables before current selection\n// block: Parent of current text node\n// range: From start of block to current selection\n// beforeText: The text of block from start to selection\n;\n\nexport default TextUtils;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { Editor, Node, Range, Path } from 'slate';\nimport ListUtils from '../editor-utils/block-element-utils/list-utils';\nimport { isRangeCollapsed } from '../editor-utils/range-utils';\nimport { SfEditor } from '../custom/custom';\nimport CodeUtils from '../editor-utils/block-element-utils/code-utils';\nimport TextUtils from '../editor-utils/text-utils';\nimport TableUtils from '../editor-utils/block-element-utils/table-utils';\nimport BlockquoteUtils from '../editor-utils/block-element-utils/blockquote-utils';\nvar SHORTCUTS = {\n '1.': 'ordered_list',\n '*': 'unordered_list',\n '-': 'unordered_list',\n '>': 'blockquote',\n '#': 'header_one',\n '##': 'header_two',\n '###': 'header_three',\n '####': 'header_four',\n '#####': 'header_five',\n '######': 'header_six',\n ' ': 'code_block'\n};\n\nvar withMarkdownShortcut = function withMarkdownShortcut(editor) {\n var exec = editor.exec;\n var listUtils = new ListUtils(editor);\n var codeUtils = new CodeUtils(editor);\n var tableUtils = new TableUtils(editor);\n var textUtils = new TextUtils(editor);\n var blockquoteUtils = new BlockquoteUtils(editor);\n\n editor.exec = function (command) {\n var selection = editor.selection;\n\n switch (command.type) {\n case 'split_list_item':\n Editor.splitNodes(editor, {\n match: 'block',\n always: true\n });\n break;\n\n case 'insert_break':\n if (!Range.isCollapsed(editor.selection)) {\n var _node = Editor.node(editor, [editor.selection.anchor.path[0]]);\n\n if (_node && _node[0].type.includes('header')) {\n exec(command);\n Editor.setNodes(editor, {\n type: 'paragraph'\n });\n return;\n } // if the expand selection is in table delete the selected and insert a new row when press enter\n\n\n if (tableUtils.isInTable()) {\n Editor.collapse(editor, {\n edge: 'end'\n });\n tableUtils.insertRow();\n return;\n }\n\n exec(command);\n return;\n }\n\n var _Editor$nodes = Editor.nodes(editor, {\n match: {\n type: 'link'\n }\n }),\n _Editor$nodes2 = _slicedToArray(_Editor$nodes, 1),\n link = _Editor$nodes2[0]; // when selection is at the end of link, select the text node after the link\n // to prevent split a empty link node\n\n\n if (link) {\n var linkPath = link[1];\n\n if (Editor.isEnd(editor, editor.selection.anchor, linkPath)) {\n var nextPath = Path.next(linkPath);\n var point = {\n path: nextPath,\n offset: 0\n };\n Editor.select(editor, point);\n }\n } // When a picture is selected, a blank line is inserted when press Enter\n\n\n var _Editor$nodes3 = Editor.nodes(editor, {\n match: {\n type: 'image'\n }\n }),\n _Editor$nodes4 = _slicedToArray(_Editor$nodes3, 1),\n image = _Editor$nodes4[0];\n\n if (image) {\n var imagePath = image[1].slice();\n var imageIndex = imagePath.pop(); // insert new table row when selection is in table\n\n Editor.insertNodes(editor, {\n text: ''\n }, {\n at: [].concat(_toConsumableArray(imagePath), [imageIndex + 1])\n });\n\n if (tableUtils.isInTable()) {\n tableUtils.insertRow();\n return;\n }\n\n exec(command);\n return;\n } // unwrap blockquote when press enter at an empty blockquote line;\n\n\n if (blockquoteUtils.isInBlockquote()) {\n var _Editor$nodes5 = Editor.nodes(editor, {\n match: 'block'\n }),\n _Editor$nodes6 = _slicedToArray(_Editor$nodes5, 1),\n block = _Editor$nodes6[0];\n\n if (Node.text(block[0]).length === 0) {\n Editor.unwrapNodes(editor, {\n match: {\n type: 'blockquote'\n },\n split: true\n });\n return;\n }\n } // if press enter in a list unwrap the list or insert a new list item\n\n\n if (listUtils.isInlist()) {\n var _node2 = SfEditor.getNodesByTypeAtRange(editor, 'list_item'); // unwrap list if the list item text is none\n\n\n if (Node.text(_node2[0]).length === 0) {\n listUtils.unwrapList();\n return;\n } // insert a new list item\n\n\n if (isRangeCollapsed(editor.selection)) {\n SfEditor.splitNodesAtPoint(editor, {\n at: editor.selection.anchor,\n match: {\n type: 'list_item'\n },\n always: true\n });\n return;\n }\n }\n\n if (codeUtils.isInCodeBlock()) {\n codeUtils.splitCodeLine();\n return;\n }\n\n if (tableUtils.isInTable()) {\n tableUtils.insertRow();\n return;\n }\n\n var node = Editor.node(editor, [editor.selection.anchor.path[0]]);\n\n if (node && node[0].type.includes('header')) {\n var header = node[0]; // get the offset of the selection\n\n var offset = editor.selection.anchor.offset; // split the header\n\n exec(command); // if the selection is at the end of the header\n // set the splited header sibling to paragraph \n\n if (offset === Node.text(header).length) {\n Editor.setNodes(editor, {\n type: 'paragraph'\n });\n }\n\n return;\n }\n\n exec(command);\n break;\n\n case 'insert_text':\n // set element by markdown shortcut;\n if (command.text === ' ' && isRangeCollapsed(selection)) {\n // if current selection is in table or code block exec default command\n if (tableUtils.isInTable() || codeUtils.isInCodeBlock()) {\n exec(command);\n return;\n }\n\n var _textUtils$getTextInf = textUtils.getTextInfoBeforeSelection(),\n beforeText = _textUtils$getTextInf.beforeText,\n range = _textUtils$getTextInf.range,\n _block = _textUtils$getTextInf.block;\n\n var path = _block[1];\n var type = SHORTCUTS[beforeText]; // set block element by shortcut\n\n if (type) {\n Editor.select(editor, range);\n Editor.delete(editor);\n\n if (type === 'blockquote') {\n if (!blockquoteUtils.isInBlockquote()) {\n editor.exec({\n type: 'set_blockquote'\n });\n }\n }\n\n if (type.includes('header')) {\n // set the outest paragraph into header \n if (_block[0].type === 'paragraph' && path.length === 1) {\n editor.exec({\n type: 'set_header',\n headerType: type\n });\n }\n }\n\n if (type === 'ordered_list') {\n editor.exec({\n type: 'set_ordered_list'\n });\n }\n\n if (type === 'unordered_list') {\n editor.exec({\n type: 'set_unordered_list'\n });\n }\n\n if (type === 'code_block') {\n if (!codeUtils.isInCodeBlock()) {\n editor.exec({\n type: 'set_code_block'\n });\n return;\n }\n }\n\n return;\n } else {\n // set text mark by shortcut\n textUtils.setTextMarkByShortCut(exec, command);\n return;\n }\n }\n\n if (command.text === '`' && isRangeCollapsed(editor.selection)) {\n var _textUtils$getTextInf2 = textUtils.getTextInfoBeforeSelection(),\n _beforeText = _textUtils$getTextInf2.beforeText,\n _range = _textUtils$getTextInf2.range;\n\n if (_beforeText === '``' && !codeUtils.isInCodeBlock()) {\n Editor.select(editor, _range);\n Editor.delete(editor);\n editor.exec({\n type: 'set_code_block'\n });\n return;\n }\n }\n\n exec(command);\n break;\n\n case 'increase_list_item_depth':\n listUtils.increaseListDepth();\n break;\n\n case 'delete_backward':\n var anchor = selection.anchor;\n\n if (anchor.offset === 0 && isRangeCollapsed(selection)) {\n var _Editor$nodes7 = Editor.nodes(editor, {\n match: 'block'\n }),\n _Editor$nodes8 = _slicedToArray(_Editor$nodes7, 1),\n match = _Editor$nodes8[0];\n\n var _block2 = match[0]; // if the header content is none set the header to paragraph when delete\n\n if (_block2.type.includes('header') && Node.text(_block2).length === 0) {\n editor.exec({\n type: 'set_header',\n headerType: 'paragraph'\n });\n return;\n }\n /**\n * If the anchor offset is 0 but not focus the head of the block node such as\n * an image is selected, the editor shoud delete the image first instead of\n * execute the delete operation of list or code_block or table\n */\n\n\n if (_block2.children.length > 1) {\n var blockDepth = match[1].length - 1;\n var inlineIndex = anchor.path[blockDepth + 1]; // If the inline node is the first child of the block, execute default command\n\n if (inlineIndex !== 0) {\n exec(command);\n return;\n }\n }\n\n if (blockquoteUtils.isInBlockquote()) {\n editor.exec({\n type: 'unwrap_blockquote'\n });\n return;\n }\n\n if (listUtils.isInlist()) {\n var _Editor$nodes9 = Editor.nodes(editor, {\n match: [{\n type: 'ordered_list'\n }, {\n type: 'unordered_list'\n }]\n }),\n _Editor$nodes10 = _slicedToArray(_Editor$nodes9, 1),\n _node3 = _Editor$nodes10[0];\n\n var listNode = _node3[0];\n\n if (listNode.children.length === 1 && Node.text(listNode).length === 0) {\n listUtils.unwrapList();\n return;\n } // Unwrap the list item when the selection is at the first list item of the first node of document\n\n\n if (anchor.path[0] === 0 && anchor.path[1] === 0) {\n listUtils.unwrapList();\n return;\n }\n }\n\n if (codeUtils.isInCodeBlock()) {\n var _node4 = Editor.match(editor, editor.selection, {\n type: 'code_block'\n });\n\n var codeBlock = _node4[0];\n var children = codeBlock.children;\n var text = Node.text(codeBlock);\n\n if (text.length === 0 && children.length === 1) {\n editor.exec({\n type: 'unwrap_code_block'\n });\n return;\n }\n }\n\n if (tableUtils.isInTable()) {\n var _block3 = Editor.match(editor, editor.selection, 'block');\n\n var blockPath = _block3[1];\n var blockNode = _block3[0];\n var start = Editor.start(editor, blockPath);\n var _offset = start.offset;\n\n if (_offset === 0 && blockNode.children.length === 1) {\n return;\n }\n }\n }\n\n exec(command);\n break;\n\n default:\n exec(command);\n }\n };\n\n return editor;\n};\n\nexport default withMarkdownShortcut;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { SfEditor } from '../custom/custom';\nimport { Node, Text, Path } from 'slate';\n\nvar normalizeNode = function normalizeNode(editor) {\n var normalizeNode = editor.normalizeNode;\n\n editor.normalizeNode = function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n path = _ref2[1];\n\n // if current node is a list node\n var type = node.type; // wrap the outest list item into unoreded list\n\n if (path.length === 1 && type === 'list_item') {\n SfEditor.wrapNodes(editor, {\n type: 'unordered_list',\n children: [node]\n }, {\n at: path\n });\n }\n\n if (type === 'ordered_list' || type === 'unordered_list') {\n var currentNodeIndex = path.slice(-1)[0];\n var previousSibling;\n\n if (currentNodeIndex !== 0) {\n previousSibling = Node.get(editor, Path.previous(path));\n }\n\n if (previousSibling && previousSibling.type === type) {\n // merge previous same type list node\n SfEditor.mergeNodes(editor, {\n at: path\n });\n }\n\n var parentNode = Node.parent(editor, path);\n var nextIndex = currentNodeIndex + 1;\n var nextSiblings = parentNode.children[nextIndex];\n\n if (nextSiblings && nextSiblings.type === type) {\n // merge next same type list node\n SfEditor.mergeNodes(editor, {\n at: Path.next(path)\n });\n }\n } // trailing a paragrph at the end of the document\n\n\n if (path.length === 1 && path[0] === editor.children.length - 1) {\n if (node.type !== 'paragraph' || !SfEditor.isEmptyParagraph(node)) {\n SfEditor.insertNodes(editor, {\n type: 'paragraph',\n children: [{\n text: ''\n }]\n }, {\n at: [path[0] + 1]\n });\n }\n }\n\n if (type === 'blockquote') {\n node.children.forEach(function (child, index) {\n var childPath = [].concat(_toConsumableArray(path), [index]);\n\n if (child.type === 'blockquote') {\n SfEditor.unwrapNodes(editor, {\n at: childPath\n });\n }\n });\n } // remove empty link\n\n\n if (type === 'link') {\n if (Node.text(node) === '' && node.children.length > 0) {\n SfEditor.removeNodes(editor, {\n at: path\n });\n }\n } // remove mark when the text node is empty\n\n\n if (Text.isText(node) && node.text.length === 0) {\n if (Object.keys(node).length > 1) {\n SfEditor.setNodes(editor, {\n CODE: false,\n BOLD: false,\n ITALIC: false\n }, {\n at: path\n });\n }\n }\n\n return normalizeNode([node, path]);\n };\n\n return editor;\n};\n\nexport default normalizeNode;","import { Node } from 'slate';\nvar TRANSFER_TYPES = {\n fragment: 'application/x-slate-fragment',\n html: 'text/html',\n text: 'text/plain'\n}; // tranfrom slate fragment and write to clipboard\n\nfunction setEventTransfer(event, type, content) {\n var mime = TRANSFER_TYPES[type];\n var transfer = event.dataTransfer || event.clipboardData;\n\n if (type === 'fragment') {\n // use the same encoding as slate\n var encodedContent = window.btoa(encodeURIComponent(JSON.stringify(content)));\n transfer.setData(mime, encodedContent);\n var texts = '';\n var textItem = '';\n content.forEach(function (element) {\n textItem = Node.text(element).replace(/\\ufeff/, '');\n texts += textItem + '\\r\\n';\n });\n transfer.setData('text', texts);\n } else if (type === 'html') {\n transfer.setData(mime, content);\n transfer.setData('text', transfer.getData('text'));\n } else {\n transfer.setData('text', content);\n }\n}\n\nexport default setEventTransfer;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport isHotKey from 'is-hotkey';\nimport { Range, Editor, Path, Node } from 'slate';\nimport ListUtils from './editor-utils/block-element-utils/list-utils';\nimport CodeUtils from './editor-utils/block-element-utils/code-utils';\nimport TableUtils from './editor-utils/block-element-utils/table-utils';\nimport setEventTransfer from './custom/set-event-transfer';\nimport { SfEditor } from '../editor/custom/custom';\n\nvar Plugin = function Plugin(_editor) {\n var _this = this;\n\n _classCallCheck(this, Plugin);\n\n this.onKeyDown = function (event) {\n if (event.nativeEvent.keyCode === 13) {\n event.preventDefault();\n\n if (isHotKey('shift+enter', event)) {\n if (_this.listUtils.isInlist()) {\n _this.editor.exec({\n type: 'split_list_item'\n });\n }\n } else if (isHotKey('mod+enter', event)) {\n if (_this.codeUtils.isInCodeBlock()) {\n _this.editor.exec({\n type: 'exit_code_block'\n });\n }\n\n if (_this.tableUtils.isInTable()) {\n _this.editor.exec({\n type: 'exit_table'\n });\n }\n } else {\n _this.editor.exec({\n type: 'insert_break'\n });\n }\n }\n\n if (isHotKey('shift+tab', event)) {\n event.preventDefault();\n\n if (_this.listUtils.isInlist()) {\n var _Editor$nodes = Editor.nodes(_this.editor, {\n match: [{\n type: 'unordered_list'\n }, {\n type: 'ordered_list'\n }],\n at: _this.editor.selection,\n mode: 'highest'\n }),\n _Editor$nodes2 = _slicedToArray(_Editor$nodes, 1),\n listNode = _Editor$nodes2[0];\n\n if (!listNode) return;\n var type = listNode[0].type;\n\n _this.editor.exec({\n type: \"unwrap_\".concat(type)\n });\n }\n }\n\n if (isHotKey('mod+s', event)) {\n event.preventDefault();\n _this.editor.onSave && _this.editor.onSave();\n }\n\n if (isHotKey('tab', event) && Range.isCollapsed(_this.editor.selection)) {\n event.preventDefault();\n\n if (_this.codeUtils.isInCodeBlock()) {\n _this.editor.exec({\n type: 'increase_code_block_indent'\n });\n }\n\n if (_this.listUtils.isInlist()) {\n _this.editor.exec({\n type: 'increase_list_item_depth'\n });\n }\n }\n\n if (isHotKey('mod+b', event)) {\n event.preventDefault();\n\n if (!_this.codeUtils.isInCodeBlock()) {\n _this.editor.exec({\n type: 'format_text',\n properties: {\n BOLD: true\n }\n });\n }\n }\n\n if (isHotKey('mod+i', event)) {\n event.preventDefault();\n\n if (!_this.codeUtils.isInCodeBlock()) {\n _this.editor.exec({\n type: 'format_text',\n properties: {\n ITALIC: true\n }\n });\n }\n }\n\n if (isHotKey('mod+/', event)) {\n event.preventDefault();\n\n if (!_this.codeUtils.isInCodeBlock()) {\n _this.editor.exec({\n type: 'format_text',\n properties: {\n CODE: true\n }\n });\n }\n }\n\n if (isHotKey('mod+4', {\n byKey: true\n })(event)) {\n event.preventDefault();\n window.richMarkdownEditor.onToggleFormulaDialog();\n return;\n } // compate chrome: in chrome press backspace would not exec delete_backward command\n\n\n if (isHotKey('backspace', event)) {\n var voidNode = SfEditor.match(_this.editor, _this.editor.selection, 'void');\n\n if (voidNode && (voidNode[0].type === 'image' || voidNode[0].type === 'formula')) {\n event.preventDefault();\n\n _this.editor.exec({\n type: 'delete_backward',\n unit: 'character'\n });\n\n return;\n }\n }\n\n if (isHotKey('mod+a', event)) {\n if (_this.codeUtils.isInCodeBlock()) {\n var anchorPoint = _this.editor.selection.anchor;\n var focusPoint = _this.editor.selection.focus;\n var anchorCodeBlock = Editor.match(_this.editor, anchorPoint, {\n type: 'code_block'\n });\n var focusCodeBlock = Editor.match(_this.editor, focusPoint, {\n type: 'code_block'\n });\n\n if (anchorCodeBlock && focusCodeBlock && Path.equals(focusCodeBlock[1], anchorCodeBlock[1])) {\n event.preventDefault();\n Editor.select(_this.editor, focusCodeBlock[1]);\n return;\n }\n }\n }\n };\n\n this.onCut = function (event, editor) {\n var image = SfEditor.match(_this.editor, _this.editor.selection, {\n type: 'image'\n });\n\n if (image) {\n // write the image element to clipboard\n setEventTransfer(event, 'fragment', [{\n type: 'paragraph',\n children: [image[0]]\n }]); // remove the image element when cut an image due to slate did not has the action when cut a image\n\n _this.editor.exec({\n type: 'delete_backward',\n unit: 'character'\n });\n\n return;\n }\n };\n\n this.onCopy = function (event, editor) {\n if (_this.tableUtils.isInTable()) {\n event.preventDefault();\n\n var table = _this.tableUtils.getSelectedTableCells();\n\n if (!table) {\n setEventTransfer(event, 'text', SfEditor.text(editor, editor.selection));\n return;\n }\n\n setEventTransfer(event, 'fragment', table);\n return;\n }\n\n if (_this.codeUtils.isInCodeBlock() && !Range.isCollapsed(editor.selection)) {\n var anchorPoint = editor.selection.anchor;\n var focusPoint = editor.selection.focus;\n var anchorCodeBlock = Editor.match(_this.editor, anchorPoint, {\n type: 'code_block'\n });\n var focusCodeBlock = Editor.match(_this.editor, focusPoint, {\n type: 'code_block'\n });\n /* \n If the selection is within the range of the selected code block \n copy the selected code line as paragraph\n */\n\n if (anchorCodeBlock && focusCodeBlock && Path.equals(focusCodeBlock[1], anchorCodeBlock[1])) {\n event.preventDefault();\n var fragment = Node.fragment(editor, editor.selection);\n fragment = fragment[0].children.map(function (codeLine) {\n var text = Node.text(codeLine);\n return {\n type: 'paragraph',\n children: [{\n text: text\n }]\n };\n });\n setEventTransfer(event, 'fragment', fragment);\n return;\n }\n }\n };\n\n this.editor = _editor;\n this.listUtils = new ListUtils(_editor);\n this.codeUtils = new CodeUtils(_editor);\n this.tableUtils = new TableUtils(_editor);\n this.onSave = _editor.onSave;\n};\n\nexport default Plugin;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React, { Fragment } from 'react';\nimport { Modal, ModalHeader, ModalBody } from 'reactstrap';\nimport { withTranslation } from 'react-i18next';\nimport '../css/keyboard-shortcuts.css';\nvar isMac = window.navigator.platform.indexOf('Win') < 0 ? true : false;\nvar controlKey = isMac ? '⌘' : 'CTRL';\n\nvar KeyboardShortcuts = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(KeyboardShortcuts, _React$PureComponent);\n\n var _super = _createSuper(KeyboardShortcuts);\n\n function KeyboardShortcuts(props) {\n var _this;\n\n _classCallCheck(this, KeyboardShortcuts);\n\n _this = _super.call(this, props);\n\n _this.renderShortcut = function (keys) {\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"keyboard-shortcut\"\n }, keys.map(function (key, index) {\n return /*#__PURE__*/React.createElement(\"kbd\", {\n key: index\n }, key);\n })), /*#__PURE__*/React.createElement(\"br\", null));\n };\n\n _this.renderContainer = function (keys, description) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-4\"\n }, _this.renderShortcut(keys)), /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-8\"\n }, description));\n };\n\n _this.shortcutData = [{\n 'Make_list': [['*', 'space'], ['-', 'space']],\n 'Make_ordered_list': [['1.', 'space']],\n 'Insert_new_item': [['Enter']],\n 'Insert_child_in_item': [['Shift', 'Enter']],\n 'Increase_depth': [['Tab']]\n }, {\n 'Heading_1': [['#', 'space']],\n 'Heading_2': [['##', 'space']],\n 'Heading_3': [['###', 'space']],\n 'Heading_4': [['####', 'space']],\n 'Heading_5': [['#####', 'space']],\n 'Heading_6': [['######', 'space']]\n }, {\n 'Make_code_block': [['```'], ['space*4']],\n 'Insert_new_line': [['Enter']],\n 'Escape_code_block': [[controlKey, 'Enter']],\n 'Insert_indent': [['Tab']]\n }, {\n 'Make_Block_quote': [['>', 'space']],\n 'Escape_Block_quote': [['Enter']]\n }, {\n 'Insert_Table_Row': [['Enter']],\n 'Escape_table': [[controlKey, 'Enter']]\n }, {\n 'Bold': [['**bold**', 'space'], ['__bold__', 'space']],\n 'Italic': [['*italic*', 'space'], ['_italic_', 'space']],\n 'Italic_Bold': [['***italic***', 'space'], ['___italic___', 'space']],\n 'Inline_code': [['`code`', 'space']]\n }, {\n 'Paste_screen_shot': [[controlKey, 'v']],\n 'Drag_image_from_anywhere_to_upload_it': []\n }];\n return _this;\n }\n\n _createClass(KeyboardShortcuts, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n t = _this$props.t,\n toggleShortcutDialog = _this$props.toggleShortcutDialog,\n userHelp = _this$props.userHelp;\n var userHelpData = userHelp.userHelpData;\n return /*#__PURE__*/React.createElement(Modal, {\n isOpen: true,\n toggle: toggleShortcutDialog,\n className: \"keyboard-shortcut-dialog\"\n }, /*#__PURE__*/React.createElement(ModalHeader, {\n toggle: toggleShortcutDialog\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"mr-2\"\n }, t(userHelp.title))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"pb-2\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-title pb-1\"\n }, t(userHelpData[1]['shortcutType'])), this.renderContainer(this.shortcutData[1]['Heading_1'][0], t(userHelpData[1].shortcutData['Heading_1'])), this.renderContainer(this.shortcutData[1]['Heading_2'][0], t(userHelpData[1].shortcutData['Heading_2'])), this.renderContainer(this.shortcutData[1]['Heading_3'][0], t(userHelpData[1].shortcutData['Heading_3'])), this.renderContainer(this.shortcutData[1]['Heading_4'][0], t(userHelpData[1].shortcutData['Heading_4'])), this.renderContainer(this.shortcutData[1]['Heading_5'][0], t(userHelpData[1].shortcutData['Heading_5'])), this.renderContainer(this.shortcutData[1]['Heading_6'][0], t(userHelpData[1].shortcutData['Heading_6']))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"pb-2\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-title pb-1\"\n }, t(userHelpData[0]['shortcutType'])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-4\"\n }, this.renderShortcut(this.shortcutData[0]['Make_list'][0]), this.renderShortcut(this.shortcutData[0]['Make_list'][1])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-8\"\n }, t(userHelpData[0].shortcutData['Make_list']))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-4\"\n }, this.renderShortcut(this.shortcutData[0]['Make_ordered_list'][0])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-8\"\n }, t(userHelpData[0].shortcutData['Make_ordered_list']))), this.renderContainer(this.shortcutData[0]['Increase_depth'][0], t(userHelpData[0].shortcutData['Increase_depth'])), this.renderContainer(this.shortcutData[0]['Insert_child_in_item'][0], t(userHelpData[0].shortcutData['Insert_child_in_item'])), this.renderContainer(this.shortcutData[0]['Insert_new_item'][0], t(userHelpData[0].shortcutData['Insert_new_item']))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"pb-2\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-title pb-1\"\n }, t(userHelpData[6]['shortcutType'])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-4\"\n }, this.renderShortcut(this.shortcutData[5]['Bold'][0]), this.renderShortcut(this.shortcutData[5]['Bold'][1])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-8\"\n }, t(userHelpData[5].shortcutData['Bold']))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-4\"\n }, this.renderShortcut(this.shortcutData[5]['Italic'][0]), this.renderShortcut(this.shortcutData[5]['Italic'][1])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-8\"\n }, t(userHelpData[5].shortcutData['Italic']))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-4\"\n }, this.renderShortcut(this.shortcutData[5]['Italic_Bold'][0]), this.renderShortcut(this.shortcutData[5]['Italic_Bold'][1])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-8\"\n }, t(userHelpData[5].shortcutData['Italic_Bold']))), this.renderContainer(this.shortcutData[5]['Inline_code'][0], t(userHelpData[5].shortcutData['Inline_code']))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"pb-2\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-title pb-1\"\n }, t(userHelpData[2]['shortcutType'])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-4\"\n }, this.renderShortcut(this.shortcutData[2]['Make_code_block'][0]), this.renderShortcut(this.shortcutData[2]['Make_code_block'][1])), /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-8\"\n }, t(userHelpData[2].shortcutData['Make_code_block']))), this.renderContainer(this.shortcutData[2]['Insert_indent'][0], t(userHelpData[2].shortcutData['Insert_indent'])), this.renderContainer(this.shortcutData[2]['Insert_new_line'][0], t(userHelpData[2].shortcutData['Insert_new_line'])), this.renderContainer(this.shortcutData[2]['Escape_code_block'][0], t(userHelpData[2].shortcutData['Escape_code_block']))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"pb-2\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-title pb-1\"\n }, t(userHelpData[3]['shortcutType'])), this.renderContainer(this.shortcutData[3]['Make_Block_quote'][0], t(userHelpData[3].shortcutData['Make_Block_quote'])), this.renderContainer(this.shortcutData[3]['Escape_Block_quote'][0], t(userHelpData[3].shortcutData['Escape_Block_quote']))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"pb-2\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-title pb-1\"\n }, t(userHelpData[4]['shortcutType'])), this.renderContainer(this.shortcutData[4]['Insert_Table_Row'][0], t(userHelpData[4].shortcutData['Insert_Table_Row'])), this.renderContainer(this.shortcutData[4]['Escape_table'][0], t(userHelpData[4].shortcutData['Escape_table']))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"pb-2\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"keyboard-shortcut-title pb-1\"\n }, t(userHelpData[7]['shortcutType'])), this.renderContainer(this.shortcutData[6]['Paste_screen_shot'][0], t(userHelpData[7].shortcutData['Paste_screen_shot']))))));\n }\n }]);\n\n return KeyboardShortcuts;\n}(React.PureComponent);\n\nexport default withTranslation('dtable')(KeyboardShortcuts);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport ToolBar from '../components/toolbar';\nimport { withTranslation } from 'react-i18next';\nimport { renderNode, renderLeaf, EditorUtils, decorationNode } from './editor-utils/common-editor-utils';\nimport { createEditor, Node, Editor } from 'slate';\nimport { withHistory } from 'slate-history';\nimport { deserialize, serialize } from '../utils/slate2markdown/index';\nimport { Editable, withReact, Slate } from '@seafile/slate-react';\nimport { isRangeCollapsed } from './editor-utils/range-utils';\nimport ModalPortal from '../components/modal-portal';\nimport TextLinkHoverMenu from './editor-component/textlink-hovermenu';\nimport ContextMenu from '../components/context-menu';\nimport withBlock from './controller/block-element-controller';\nimport withInline from './controller/inline-element-controller';\nimport withVoid from './controller/void-element-controller';\nimport withMarkdownShortcut from './controller/shortcut-controller';\nimport normalizeNode from './controller/normalize-controller';\nimport Plugin from './editor-plugin';\nimport TableUtils from '../editor/editor-utils/block-element-utils/table-utils';\nimport IconButton from '../components/topbar-component/icon-button';\nimport KeyboardShortcuts from '../components/shortcut-dialog';\nimport './code-highlight-package';\nimport '../css/layout.css';\nimport '../css/richeditor/rich-editor-main.css';\nimport '../css/richeditor/navbar-imgbutton.css';\nimport '../css/richeditor/textlink-hovermenu.css';\nimport '../css/richeditor/image.css';\nimport '../css/richeditor/link.css';\nimport '../css/topbar.css';\n\nvar SimpleEditor = /*#__PURE__*/function (_React$Component) {\n _inherits(SimpleEditor, _React$Component);\n\n var _super = _createSuper(SimpleEditor);\n\n function SimpleEditor(props) {\n var _this;\n\n _classCallCheck(this, SimpleEditor);\n\n _this = _super.call(this, props);\n\n _this.onChange = function (value) {\n _this.setState({\n value: value\n }); // hide context menu when content change\n\n\n if (_this.state.isShowContextMenu === true) {\n _this.setState({\n isShowContextMenu: false\n });\n\n _this.contextMenuPosition = {};\n }\n\n var operations = _this.editor.operations;\n var hasChange = operations.some(function (o) {\n return o.type !== 'set_selection' && o.type !== 'set_value';\n });\n if (hasChange) _this.contentChanged = true;\n };\n\n _this.foucsEditor = function () {\n _this.editorRef.firstChild.focus();\n };\n\n _this.focusText = function () {\n // In dtable long text editor, press the key to open the editor.\n // Then the cursor should move to the end of this character.\n var _this$props = _this.props,\n focusEnd = _this$props.focusEnd,\n value = _this$props.value;\n\n if (focusEnd === true && value.length === 1) {\n setTimeout(function () {\n Editor.select(_this.editor, {\n path: [0, 0],\n offset: 1\n });\n }, 1);\n }\n };\n\n _this.hasContentChange = function () {\n return _this.contentChanged;\n };\n\n _this.onToggleLinkDialog = function () {\n _this.setState({\n isShowLinkDialog: !_this.state.isShowLinkDialog\n });\n };\n\n _this.onToggleImageDialog = function () {\n _this.setState({\n isShowImageDialog: !_this.state.isShowImageDialog\n });\n };\n\n _this.onContextMenu = function (event) {\n if (_this.tableUtils.isInTable()) {\n event.preventDefault();\n _this.contextMenuPosition = {\n left: event.clientX,\n top: event.clientY\n };\n\n _this.setState({\n isShowContextMenu: !_this.state.isShowContextMenu\n });\n }\n };\n\n _this.toggleShortcutDialog = function () {\n _this.setState({\n isShowShortcutDialog: !_this.state.isShowShortcutDialog\n });\n };\n\n _this.editor = normalizeNode(withMarkdownShortcut(withVoid(withBlock(withInline(withHistory(withReact(createEditor())))))));\n _this.editor.editorApi = props.editorApi;\n window.editor = _this.editor;\n _this.editorUtils = new EditorUtils(_this.editor);\n _this.tableUtils = new TableUtils(_this.editor);\n _this.plugin = new Plugin(_this.editor);\n _this.editorRef = null;\n _this.contextMenuPosition = {};\n _this.state = {\n value: deserialize(props.value),\n isShowLinkDialog: false,\n isShowImageDialog: false,\n isShowBigImage: false,\n isShowContextMenu: false,\n isShowShortcutDialog: false\n };\n return _this;\n }\n\n _createClass(SimpleEditor, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.props.onRef(this);\n this.focusText();\n }\n }, {\n key: \"getMarkdown\",\n value: function getMarkdown() {\n this.contentChanged = false;\n return serialize(this.state.value);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.state.value;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$state = this.state,\n value = _this$state.value,\n isShowLinkDialog = _this$state.isShowLinkDialog,\n isShowImageDialog = _this$state.isShowImageDialog;\n var editor = this.editor,\n foucsEditor = this.foucsEditor;\n var toolbarStatus = this.editorUtils.getToolbarStatus();\n var _this$props2 = this.props,\n readOnly = _this$props2.readOnly,\n t = _this$props2.t;\n var selectionCollapsed = isRangeCollapsed(editor.selection);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-editor-module seafile-simple-editor\"\n }, /*#__PURE__*/React.createElement(Slate, {\n editor: this.editor,\n value: value,\n onChange: this.onChange\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-rich-editor-topbar\"\n }, /*#__PURE__*/React.createElement(ToolBar, {\n onToggleLinkDialog: this.onToggleLinkDialog,\n onToggleImageDialog: this.onToggleImageDialog,\n toolbarStatus: toolbarStatus,\n isSimpleEditor: true,\n isShowLinkDialog: isShowLinkDialog,\n isShowImageDialog: isShowImageDialog\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: 'btn-group editor-btn-group'\n }, /*#__PURE__*/React.createElement(IconButton, {\n isRichEditor: true,\n text: t('Shortcut_help'),\n id: 'helpIcon',\n className: 'use-help-icon',\n icon: 'iconfont icon-use-help',\n onMouseDown: function onMouseDown(event) {\n return _this2.toggleShortcutDialog();\n }\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"editor-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(_ref) {\n return _this2.editorRef = _ref;\n },\n onClick: value.length === 1 && value[0].type === 'paragraph' && Node.text(value[0].children[0]).length === 0 ? foucsEditor : null,\n className: \"editor article\"\n }, /*#__PURE__*/React.createElement(Editable, {\n renderElement: function renderElement(props) {\n return renderNode(props, editor, readOnly);\n },\n className: 'editor-component',\n renderLeaf: renderLeaf,\n onContextMenu: this.onContextMenu,\n onCopy: function onCopy(event) {\n _this2.plugin.onCopy(event, editor);\n },\n onCut: function onCut(event) {\n return _this2.plugin.onCut(event);\n },\n autoFocus: true,\n onKeyDown: this.plugin.onKeyDown,\n decorate: decorationNode\n })), toolbarStatus.isLinkActive && selectionCollapsed ? /*#__PURE__*/React.createElement(ModalPortal, null, /*#__PURE__*/React.createElement(TextLinkHoverMenu, {\n onToggleLinkDialog: this.onToggleLinkDialog,\n editorUtils: this.editorUtils\n })) : null, this.state.isShowContextMenu && /*#__PURE__*/React.createElement(ModalPortal, null, /*#__PURE__*/React.createElement(ContextMenu, {\n tableUtils: this.tableUtils,\n contextMenuPosition: this.contextMenuPosition\n })), this.state.isShowShortcutDialog && /*#__PURE__*/React.createElement(KeyboardShortcuts, {\n userHelp: t('userHelp', {\n returnObjects: true\n }),\n toggleShortcutDialog: this.toggleShortcutDialog\n }))));\n }\n }]);\n\n return SimpleEditor;\n}(React.Component);\n\nexport default withTranslation('seafile-editor')(SimpleEditor);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\n\nvar ShortCut = /*#__PURE__*/function (_React$Component) {\n _inherits(ShortCut, _React$Component);\n\n var _super = _createSuper(ShortCut);\n\n function ShortCut(props) {\n var _this;\n\n _classCallCheck(this, ShortCut);\n\n _this = _super.call(this, props); // get platform of browser\n\n _this.platfrom = navigator.platform.indexOf('Win') < 0 ? 'Mac' : 'Win';\n return _this;\n }\n\n _createClass(ShortCut, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"li\", {\n className: 'help-shortcut'\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: 'help-shortcut-left'\n }, this.props.shortcutName), /*#__PURE__*/React.createElement(\"div\", {\n className: 'help-shortcut-right'\n }, /*#__PURE__*/React.createElement(ShortCutRight, {\n platfrom: this.platform,\n shortcuts: this.props.shortcuts\n })));\n }\n }]);\n\n return ShortCut;\n}(React.Component);\n\nvar ShortCutRight = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(ShortCutRight, _React$PureComponent);\n\n var _super2 = _createSuper(ShortCutRight);\n\n function ShortCutRight() {\n _classCallCheck(this, ShortCutRight);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(ShortCutRight, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, this.props.shortcuts.map(function (shortcut) {\n var shortcutFirKey = shortcut[0];\n var shortcutSecnKey = shortcut[1];\n\n if (typeof shortcut[0] === 'object') {\n if (_this2.platfrom === 'Win') {\n shortcutFirKey = shortcut[0][0];\n } else {\n shortcutFirKey = shortcut[0][1];\n }\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: 'help-shortcut-right-container',\n key: 'help' + shortcut[0]\n }, shortcutFirKey ? /*#__PURE__*/React.createElement(\"div\", {\n className: 'key shortcut-first'\n }, shortcutFirKey) : null, shortcutSecnKey ? /*#__PURE__*/React.createElement(\"div\", {\n className: 'key shortcut-second'\n }, shortcutSecnKey) : null);\n }));\n }\n }]);\n\n return ShortCutRight;\n}(React.PureComponent);\n\nvar HelpShortcutList = /*#__PURE__*/function (_React$PureComponent2) {\n _inherits(HelpShortcutList, _React$PureComponent2);\n\n var _super3 = _createSuper(HelpShortcutList);\n\n function HelpShortcutList(props) {\n var _this3;\n\n _classCallCheck(this, HelpShortcutList);\n\n _this3 = _super3.call(this, props);\n _this3.shortcutData = [{\n 'Make_list': [['*/-', 'space']],\n 'Make_ordered_list': [['1.', 'space']],\n 'Insert_new_item': [['Enter']],\n 'Insert_child_in_item': [['Shift', 'Enter']],\n 'Increase_depth': [['Tab']]\n }, {\n 'Heading_1': [['#', 'space']],\n 'Heading_2': [['##', 'space']],\n 'Heading_3': [['###', 'space']],\n 'Heading_4': [['####', 'space']],\n 'Heading_5': [['#####', 'space']],\n 'Heading_6': [['######', 'space']]\n }, {\n 'Make_code_block': [['```']],\n 'Insert_new_line': [['Enter']],\n 'Escape_code_block': [[['Ctrl', 'Cmd'], 'Enter']],\n 'Insert_indent': [['Tab']]\n }, {\n 'Make_Block_quote': [['>', 'space']],\n 'Escape_Block_quote': [['Enter']]\n }, {\n 'Insert_Table_Row': [['Enter']],\n 'Escape_table': [[['Ctrl', 'Cmd'], 'Enter']]\n }, {\n 'Insert_Formula': [[['Ctrl', 'Cmd'], '$']]\n }, {\n 'Bold': [['**bold** / __bold__', 'space']],\n 'Italic': [['*italic* / _italic_', 'space']],\n 'Italic_Bold': [['***italic*** / ___italic___', 'space']],\n 'Inline_code': [['`code`', 'space']]\n }, {\n 'Save_file': [[['Ctrl', 'Cmd'], 's']]\n }, {\n 'Paste_screen_shot': [[['Ctrl', 'Cmd'], 'v']],\n 'Drag_image_from_anywhere_to_upload_it': []\n }];\n return _this3;\n }\n\n _createClass(HelpShortcutList, [{\n key: \"render\",\n value: function render() {\n var title = this.props.data.shortcutType;\n var dataList = this.props.data.shortcutData;\n var liArr = [];\n\n for (var prop in dataList) {\n var shortcutKeyArr = this.shortcutData[this.props.index][prop];\n liArr.push( /*#__PURE__*/React.createElement(ShortCut, {\n key: 'help ' + prop,\n shortcutName: dataList[prop],\n shortcuts: shortcutKeyArr\n }));\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: 'help-content-container'\n }, /*#__PURE__*/React.createElement(\"h5\", {\n className: 'help-shortcut-type'\n }, title), /*#__PURE__*/React.createElement(\"ul\", {\n className: 'help-shortcut-list'\n }, liArr));\n }\n }]);\n\n return HelpShortcutList;\n}(React.PureComponent);\n\nvar UserHelpDialog = /*#__PURE__*/function (_React$PureComponent3) {\n _inherits(UserHelpDialog, _React$PureComponent3);\n\n var _super4 = _createSuper(UserHelpDialog);\n\n function UserHelpDialog() {\n _classCallCheck(this, UserHelpDialog);\n\n return _super4.apply(this, arguments);\n }\n\n _createClass(UserHelpDialog, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: 'seafile-editor-help align-self-end'\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: 'help-header d-flex'\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: 'help-title'\n }, this.props.userHelp.title), /*#__PURE__*/React.createElement(\"div\", {\n className: 'help-close',\n onClick: this.props.hideHelpDialog\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: 'iconfont icon-times-circle'\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: 'help-content'\n }, this.props.userHelp.userHelpData.map(function (item, index) {\n return /*#__PURE__*/React.createElement(HelpShortcutList, {\n key: 'help-list' + index,\n index: index,\n data: item\n });\n })));\n }\n }]);\n\n return UserHelpDialog;\n}(React.PureComponent);\n\nexport default UserHelpDialog;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { Button } from 'reactstrap';\nimport { processor } from '../utils/seafile-markdown2html';\n\nvar CommentDialog = /*#__PURE__*/function (_React$Component) {\n _inherits(CommentDialog, _React$Component);\n\n var _super = _createSuper(CommentDialog);\n\n function CommentDialog(props) {\n var _this;\n\n _classCallCheck(this, CommentDialog);\n\n _this = _super.call(this, props);\n\n _this.handleCommentChange = function (event) {\n var comment = event.target.value;\n\n _this.setState({\n comment: comment\n });\n };\n\n _this.submitComment = function () {\n var comment = _this.state.comment.trim();\n\n if (comment.length > 0 && _this.props.quote.length > 0) {\n var detail = {\n quote: _this.props.quote,\n position: _this.props.commentPosition\n };\n var detailJSON = JSON.stringify(detail);\n\n _this.props.editorApi.postComment(comment, detailJSON).then(function (res) {\n _this.props.onCommentAdded();\n });\n }\n };\n\n _this.setQuoteText = function (mdQuote) {\n processor.process(mdQuote).then(function (result) {\n var quote = String(result);\n\n _this.setState({\n quote: quote\n });\n });\n };\n\n _this.state = {\n comment: '',\n quote: ''\n };\n return _this;\n }\n\n _createClass(CommentDialog, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.setQuoteText(this.props.quote);\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n if (this.props.quote !== nextProps.quote) {\n this.setQuoteText(nextProps.quote);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"comment-dialog\"\n }, /*#__PURE__*/React.createElement(\"div\", null, this.props.editorApi.name), /*#__PURE__*/React.createElement(\"blockquote\", {\n className: \"comment-dialog-quote\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n dangerouslySetInnerHTML: {\n __html: this.state.quote\n }\n })), /*#__PURE__*/React.createElement(\"textarea\", {\n value: this.state.comment,\n onChange: this.handleCommentChange\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"button-group\"\n }, /*#__PURE__*/React.createElement(Button, {\n size: \"sm\",\n color: \"primary\",\n onClick: this.submitComment\n }, this.props.t('submit')), /*#__PURE__*/React.createElement(Button, {\n size: \"sm\",\n color: \"secondary\",\n onClick: this.props.toggleCommentDialog\n }, this.props.t('cancel'))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"comment-dialog-triangle\"\n }));\n }\n }]);\n\n return CommentDialog;\n}(React.Component);\n\nexport default CommentDialog;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { Tooltip } from 'reactstrap';\nimport '../css/richeditor/participants-list.css';\n\nvar ParticipantsList = /*#__PURE__*/function (_React$Component) {\n _inherits(ParticipantsList, _React$Component);\n\n var _super = _createSuper(ParticipantsList);\n\n function ParticipantsList(props) {\n var _this;\n\n _classCallCheck(this, ParticipantsList);\n\n _this = _super.call(this, props);\n\n _this.handleClick = function () {\n _this.props.openDialogs && _this.props.openDialogs('add-participant');\n };\n\n _this.tooltipToggle = function () {\n _this.setState({\n tooltipOpen: !_this.state.tooltipOpen\n });\n };\n\n _this.state = {\n tooltipOpen: false\n };\n return _this;\n }\n\n _createClass(ParticipantsList, [{\n key: \"render\",\n value: function render() {\n var participants = this.props.participants;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"participants mb-2 position-relative\"\n }, participants.map(function (item, index) {\n return /*#__PURE__*/React.createElement(Participant, {\n item: item,\n index: index,\n key: index\n });\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"add-participants\",\n onClick: this.handleClick,\n id: \"add-participant-icon\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"iconfont icon-plus-circle\"\n })), /*#__PURE__*/React.createElement(Tooltip, {\n toggle: this.tooltipToggle,\n delay: {\n show: 0,\n hide: 0\n },\n target: \"add-participant-icon\",\n placement: \"bottom\",\n isOpen: this.state.tooltipOpen\n }, this.props.t('Add_participants')));\n }\n }]);\n\n return ParticipantsList;\n}(React.Component);\n\nvar Participant = /*#__PURE__*/function (_React$Component2) {\n _inherits(Participant, _React$Component2);\n\n var _super2 = _createSuper(Participant);\n\n function Participant(props) {\n var _this2;\n\n _classCallCheck(this, Participant);\n\n _this2 = _super2.call(this, props);\n\n _this2.toggleAvatarTooltip = function () {\n _this2.setState({\n showAvatarTooltip: !_this2.state.showAvatarTooltip\n });\n };\n\n _this2.state = {\n showAvatarTooltip: false\n };\n return _this2;\n }\n\n _createClass(Participant, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n item = _this$props.item,\n index = _this$props.index;\n var target = 'participant-avatar-' + index;\n return /*#__PURE__*/React.createElement(\"span\", {\n className: \"participant-avatar\"\n }, /*#__PURE__*/React.createElement(\"img\", {\n src: item.avatar_url,\n className: \"avatar\",\n id: target,\n alt: \"avatar\",\n key: index\n }), /*#__PURE__*/React.createElement(Tooltip, {\n toggle: this.toggleAvatarTooltip,\n delay: {\n show: 0,\n hide: 0\n },\n target: target,\n placement: \"bottom\",\n isOpen: this.state.showAvatarTooltip\n }, item.name));\n }\n }]);\n\n return Participant;\n}(React.Component);\n\nexport default ParticipantsList;","var defaultStyle = {\n control: {\n backgroundColor: '#fff',\n fontSize: 14,\n fontWeight: 'normal'\n },\n highlighter: {\n overflow: 'hidden'\n },\n input: {\n margin: 0\n },\n '&singleLine': {\n control: {\n display: 'inline-block',\n width: 130\n },\n highlighter: {\n padding: 1,\n border: '2px inset transparent'\n },\n input: {\n padding: 1,\n border: '2px inset'\n }\n },\n '&multiLine': {\n control: {},\n highlighter: {\n padding: 9\n },\n input: {\n padding: '8px 6px',\n minHeight: 90,\n height: 90,\n border: '1px solid #e6e6dd',\n borderRadius: '5px',\n overfflowY: 'auto',\n '&focused': {\n backgroundColor: '#cee4e5',\n outlineOffset: '-2px',\n outlineColor: '-webkit-focus-ring-color',\n outlineStyle: 'auto',\n outlineWidth: '5px'\n }\n }\n },\n suggestions: {\n list: {\n backgroundColor: 'white',\n border: '1px solid rgba(0,0,0,0.15)',\n fontSize: 14,\n maxHeight: 200,\n overflow: 'auto',\n position: 'absolute',\n bottom: 14,\n width: '150px'\n },\n item: {\n width: 'auto',\n padding: '5px 15px',\n overflowX: 'auto',\n borderBottom: '1px solid rgba(0,0,0,0.15)',\n '&focused': {\n backgroundColor: '#f19654',\n color: '#fff',\n fontWeight: '400'\n }\n }\n }\n};\nexport { defaultStyle };","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport moment from 'moment';\nimport { processor } from '../utils/seafile-markdown2html';\nimport { Button, Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';\nimport ParticipantsList from './participants-list';\nimport toaster from '../components/toast';\nimport { MentionsInput, Mention } from 'react-mentions';\nimport { defaultStyle } from '../css/react-mentions-default-style';\nimport '../css/richeditor/comments-list.css';\n\nvar CommentPanel = /*#__PURE__*/function (_React$Component) {\n _inherits(CommentPanel, _React$Component);\n\n var _super = _createSuper(CommentPanel);\n\n function CommentPanel(props) {\n var _this;\n\n _classCallCheck(this, CommentPanel);\n\n _this = _super.call(this, props);\n\n _this.toggleResolvedComment = function () {\n _this.setState({\n showResolvedComment: !_this.state.showResolvedComment\n });\n };\n\n _this.listComments = function (isScroll) {\n _this.props.editorApi.listComments().then(function (res) {\n _this.setState({\n commentsList: res.data.comments\n });\n\n if (isScroll) {\n var that = _assertThisInitialized(_this);\n\n setTimeout(function () {\n that.refs.commentsList.scrollTo(0, 10000);\n }, 100);\n }\n });\n };\n\n _this.handleCommentChange = function (event) {\n _this.setState({\n comment: event.target.value\n });\n };\n\n _this.resolveComment = function (event) {\n _this.props.editorApi.updateComment(event.target.id, 'true').then(function () {\n _this.listComments();\n });\n };\n\n _this.deleteComment = function (event) {\n _this.props.editorApi.deleteComment(event.target.id).then(function () {\n _this.listComments();\n });\n };\n\n _this.editComment = function (commentID, newComment) {\n _this.props.editorApi.updateComment(commentID, null, null, newComment).then(function (res) {\n _this.listComments();\n });\n };\n\n _this.listRepoRelatedUsers = function () {\n if (!window.showParticipants) return;\n\n _this.props.editorApi.listRepoRelatedUsers().then(function (res) {\n var users = res.data.user_list.map(function (item) {\n return {\n id: item.email,\n display: item.name\n };\n });\n\n _this.setState({\n relatedUsers: users\n });\n });\n };\n\n _this.addComment = function () {\n if (!_this.state.comment.trim()) return;\n\n _this.props.editorApi.postComment(_this.state.comment.trim()).then(function () {\n _this.listComments(true);\n }).catch(function (err) {\n if (err.response.data) {\n toaster.danger(err.response.data['error_msg'], {\n duration: 3\n });\n }\n });\n\n _this.setState({\n comment: ''\n });\n };\n\n _this.onSubmit = function () {\n if (window.showParticipants) {\n _this.addParticipant(_this.props.editorApi.userName);\n }\n\n if (_this.toBeAddedParticipant.length === 0 || !window.showParticipants) {\n _this.addComment();\n } else {\n _this.props.editorApi.addFileParticipants(_this.toBeAddedParticipant).then(function (res) {\n _this.toBeAddedParticipant = [];\n\n _this.addComment();\n\n _this.props.onParticipantsChange();\n }).catch(function (err) {\n if (err.response.data) {\n toaster.danger(err.response.data['error_msg'], {\n duration: 3\n });\n }\n });\n }\n };\n\n _this.checkParticipant = function (email) {\n return _this.props.participants.map(function (participant) {\n return participant.email;\n }).includes(email);\n };\n\n _this.addParticipant = function (email) {\n if (_this.checkParticipant(email)) return;\n\n _this.toBeAddedParticipant.push(email);\n };\n\n _this.renderUserSuggestion = function (entry, search, highlightedDisplay, index, focused) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"user \".concat(focused ? 'focused' : '')\n }, highlightedDisplay);\n };\n\n _this.state = {\n commentsList: [],\n showResolvedComment: true,\n comment: '',\n relatedUsers: null\n };\n _this.toBeAddedParticipant = [];\n return _this;\n }\n\n _createClass(CommentPanel, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.listComments();\n this.listRepoRelatedUsers();\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n if (this.props.relistComment !== nextProps.relistComment) this.listComments(true);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var t = this.props.t;\n var participants = this.props.participants;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-comment\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-comment-toggle-resolved\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: 'seafile-comment-title-text'\n }, t('Show_resolved_comments')), /*#__PURE__*/React.createElement(\"div\", {\n className: 'seafile-comment-title-toggle d-flex'\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: \"custom-switch\",\n id: \"toggle-resolved-comments\"\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n name: \"option\",\n className: \"custom-switch-input\",\n onChange: this.toggleResolvedComment,\n checked: this.state.showResolvedComment && 'checked'\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"custom-switch-indicator\"\n })))), /*#__PURE__*/React.createElement(\"ul\", {\n className: window.showParticipants ? 'seafile-comment-list show-participants' : 'seafile-comment-list',\n ref: \"commentsList\"\n }, this.state.commentsList.length > 0 && this.state.commentsList.map(function (item) {\n var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var arr = arguments.length > 2 ? arguments[2] : undefined;\n var oldTime = new Date(item.created_at).getTime();\n var time = moment(oldTime).format('YYYY-MM-DD HH:mm');\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: item.id\n }, /*#__PURE__*/React.createElement(CommentItem, {\n item: item,\n time: time,\n t: _this2.props.t,\n deleteComment: _this2.deleteComment,\n resolveComment: _this2.resolveComment,\n editComment: _this2.editComment,\n showResolvedComment: _this2.state.showResolvedComment,\n editorApi: _this2.props.editorApi,\n scrollToQuote: _this2.props.scrollToQuote\n }));\n }), this.state.commentsList.length === 0 && /*#__PURE__*/React.createElement(\"li\", {\n className: \"comment-vacant\"\n }, t('no_comment_yet'))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-comment-footer\"\n }, participants && window.showParticipants && /*#__PURE__*/React.createElement(ParticipantsList, {\n openDialogs: this.props.openDialogs,\n participants: participants,\n t: this.props.t\n }), window.showParticipants ? /*#__PURE__*/React.createElement(MentionsInput, {\n value: this.state.comment,\n onChange: this.handleCommentChange,\n placeholder: t('add_a_comment'),\n style: defaultStyle\n }, /*#__PURE__*/React.createElement(Mention, {\n trigger: \"@\",\n displayTransform: function displayTransform(username, display) {\n return \"@\".concat(display);\n },\n data: this.state.relatedUsers,\n renderSuggestion: this.renderUserSuggestion,\n onAdd: function onAdd(id, display) {\n _this2.addParticipant(id);\n },\n appendSpaceOnAdd: true\n })) : /*#__PURE__*/React.createElement(\"textarea\", {\n className: \"add-comment-input\",\n onChange: this.handleCommentChange,\n value: this.state.comment,\n placeholder: t('add_a_comment'),\n clos: \"100\",\n rows: \"3\",\n warp: \"virtual\"\n }), /*#__PURE__*/React.createElement(Button, {\n className: \"submit-comment\",\n color: \"primary\",\n size: \"sm\",\n onClick: this.onSubmit\n }, t('submit'))));\n }\n }]);\n\n return CommentPanel;\n}(React.Component);\n\nvar CommentItem = /*#__PURE__*/function (_React$Component2) {\n _inherits(CommentItem, _React$Component2);\n\n var _super2 = _createSuper(CommentItem);\n\n function CommentItem(props) {\n var _this3;\n\n _classCallCheck(this, CommentItem);\n\n _this3 = _super2.call(this, props);\n\n _this3.toggleDropDownMenu = function () {\n _this3.setState({\n dropdownOpen: !_this3.state.dropdownOpen\n });\n };\n\n _this3.convertComment = function (item) {\n processor.process(item.comment).then(function (result) {\n var html = String(result);\n\n _this3.setState({\n html: html\n });\n });\n\n if (item.detail) {\n var detail = JSON.parse(item.detail);\n processor.process(detail.quote).then(function (result) {\n var quote = String(result);\n\n _this3.setState({\n quote: quote,\n position: detail.position\n });\n });\n }\n };\n\n _this3.toggleEditComment = function () {\n _this3.setState({\n editable: !_this3.state.editable\n });\n };\n\n _this3.updateComment = function (event) {\n var newComment = _this3.state.newComment;\n\n if (_this3.props.item.comment !== newComment) {\n _this3.props.editComment(event.target.id, newComment);\n }\n\n _this3.toggleEditComment();\n };\n\n _this3.handleCommentChange = function (event) {\n _this3.setState({\n newComment: event.target.value\n });\n };\n\n _this3.state = {\n dropdownOpen: false,\n html: '',\n newComment: _this3.props.item.comment,\n editable: false,\n quote: '',\n position: null\n };\n return _this3;\n }\n\n _createClass(CommentItem, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n this.convertComment(this.props.item);\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n this.convertComment(nextProps.item);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n item = _this$props.item,\n t = _this$props.t,\n editorApi = _this$props.editorApi;\n\n if (item.resolved && !this.props.showResolvedComment) {\n return null;\n }\n\n if (this.state.editable) {\n return /*#__PURE__*/React.createElement(\"li\", {\n className: \"seafile-comment-item\",\n id: item.id\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-comment-info\"\n }, /*#__PURE__*/React.createElement(\"img\", {\n className: \"avatar\",\n src: item.avatar_url,\n alt: \"\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"reviewer-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"reviewer-name ellipsis\"\n }, item.user_name), /*#__PURE__*/React.createElement(\"div\", {\n className: \"review-time\"\n }, this.props.time))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-edit-comment\"\n }, /*#__PURE__*/React.createElement(\"textarea\", {\n className: \"edit-comment-input\",\n value: this.state.newComment,\n onChange: this.handleCommentChange,\n clos: \"100\",\n rows: \"3\",\n warp: \"virtual\"\n }), /*#__PURE__*/React.createElement(Button, {\n className: \"comment-btn\",\n color: \"primary\",\n size: \"sm\",\n onClick: this.updateComment,\n id: item.id\n }, t('Update')), ' ', /*#__PURE__*/React.createElement(Button, {\n className: \"comment-btn\",\n color: \"secondary\",\n size: \"sm\",\n onClick: this.toggleEditComment\n }, t('cancel'))));\n }\n\n return /*#__PURE__*/React.createElement(\"li\", {\n className: item.resolved ? 'seafile-comment-item seafile-comment-item-resolved' : 'seafile-comment-item',\n id: item.id\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-comment-info\"\n }, /*#__PURE__*/React.createElement(\"img\", {\n className: \"avatar\",\n src: item.avatar_url,\n alt: \"\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"reviewer-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"reviewer-name ellipsis\"\n }, item.user_name), /*#__PURE__*/React.createElement(\"div\", {\n className: \"review-time\"\n }, this.props.time)), /*#__PURE__*/React.createElement(Dropdown, {\n isOpen: this.state.dropdownOpen,\n size: \"sm\",\n className: \"seafile-comment-dropdown\",\n toggle: this.toggleDropDownMenu\n }, /*#__PURE__*/React.createElement(DropdownToggle, {\n className: \"seafile-comment-dropdown-btn\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"iconfont icon-ellipsis-v\"\n })), /*#__PURE__*/React.createElement(DropdownMenu, null, item.user_email === editorApi.userName && /*#__PURE__*/React.createElement(DropdownItem, {\n onClick: this.props.deleteComment,\n className: \"delete-comment\",\n id: item.id\n }, t('delete')), item.user_email === editorApi.userName && /*#__PURE__*/React.createElement(DropdownItem, {\n onClick: this.toggleEditComment,\n className: \"edit-comment\",\n id: item.id\n }, t('edit')), !item.resolved && /*#__PURE__*/React.createElement(DropdownItem, {\n onClick: this.props.resolveComment,\n className: \"seafile-comment-resolved\",\n id: item.id\n }, t('Mark_as_Resolved'))))), item.detail && /*#__PURE__*/React.createElement(\"blockquote\", {\n className: \"seafile-comment-content\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n onClick: this.props.scrollToQuote.bind(this, this.state.position),\n dangerouslySetInnerHTML: {\n __html: this.state.quote\n }\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-comment-content\",\n dangerouslySetInnerHTML: {\n __html: this.state.html\n }\n }));\n }\n }]);\n\n return CommentItem;\n}(React.Component);\n\nexport default CommentPanel;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport moment from 'moment';\nimport ParticipantsList from './participants-list';\nimport '../css/richeditor/detail-list-view.css';\n\nvar DetailListView = /*#__PURE__*/function (_React$Component) {\n _inherits(DetailListView, _React$Component);\n\n var _super = _createSuper(DetailListView);\n\n function DetailListView() {\n var _this;\n\n _classCallCheck(this, DetailListView);\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 _this.onEditFileTagToggle = function () {\n _this.props.openDialogs && _this.props.openDialogs('file_tags');\n };\n\n _this.onListRelatedFileToggle = function () {\n _this.props.openDialogs && _this.props.openDialogs('related_files');\n };\n\n _this.bytesToSize = function (bytes) {\n if (bytes < 0) return '--';\n var sizes = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];\n\n if (bytes === 0) {\n return bytes + ' ' + sizes[0];\n }\n\n var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1000)), 10);\n\n if (i === 0) {\n return bytes + ' ' + sizes[i];\n } else {\n return (bytes / Math.pow(1000, i)).toFixed(1) + ' ' + sizes[i];\n }\n };\n\n return _this;\n }\n\n _createClass(DetailListView, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n fileTagList = _this$props.fileTagList,\n relatedFiles = _this$props.relatedFiles,\n fileInfo = _this$props.fileInfo;\n var _this$props$editorApi = this.props.editorApi,\n filePath = _this$props$editorApi.filePath,\n serviceUrl = _this$props$editorApi.serviceUrl;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"dirent-table-container\"\n }, /*#__PURE__*/React.createElement(\"table\", {\n className: \"table-thead-hidden\"\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", {\n width: \"40%\"\n }), /*#__PURE__*/React.createElement(\"th\", {\n width: \"60%\"\n }))), /*#__PURE__*/React.createElement(\"tbody\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", null, this.props.t('Size')), /*#__PURE__*/React.createElement(\"td\", null, this.bytesToSize(fileInfo.size))), /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", null, this.props.t('Location')), /*#__PURE__*/React.createElement(\"td\", null, filePath)), /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", null, this.props.t('Last_Update')), /*#__PURE__*/React.createElement(\"td\", null, moment(fileInfo.last_modified).fromNow())), /*#__PURE__*/React.createElement(\"tr\", {\n className: \"file-tag-container\"\n }, /*#__PURE__*/React.createElement(\"th\", null, this.props.t('Tags')), /*#__PURE__*/React.createElement(\"td\", null, fileTagList.length > 0 && /*#__PURE__*/React.createElement(\"ul\", {\n className: \"file-tag-list\"\n }, fileTagList.map(function (fileTag) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: fileTag.id,\n className: \"file-tag-item\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"file-tag\",\n style: {\n backgroundColor: fileTag.tag_color\n }\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"tag-name\",\n title: fileTag.tag_name\n }, fileTag.tag_name));\n })), /*#__PURE__*/React.createElement(\"i\", {\n className: \"iconfont icon-pencil attr-action-icon\",\n onClick: this.onEditFileTagToggle\n }))), /*#__PURE__*/React.createElement(\"tr\", {\n className: \"file-related-files\"\n }, /*#__PURE__*/React.createElement(\"th\", null, this.props.t('Related_Files')), /*#__PURE__*/React.createElement(\"td\", null, relatedFiles.length > 0 && /*#__PURE__*/React.createElement(\"ul\", null, relatedFiles.map(function (relatedFile, index) {\n var href = serviceUrl + '/lib/' + relatedFile.repo_id + '/file' + encodeURIComponent(relatedFile.path);\n return /*#__PURE__*/React.createElement(\"li\", {\n key: index\n }, /*#__PURE__*/React.createElement(\"a\", {\n href: href,\n rel: \"noopener noreferrer\",\n target: \"_blank\"\n }, relatedFile.name));\n })), /*#__PURE__*/React.createElement(\"i\", {\n className: \"iconfont icon-pencil attr-action-icon\",\n onClick: this.onListRelatedFileToggle\n }))), this.props.participants && window.showParticipants && /*#__PURE__*/React.createElement(\"tr\", {\n className: \"file-participants\"\n }, /*#__PURE__*/React.createElement(\"th\", null, this.props.t('Participants')), /*#__PURE__*/React.createElement(\"td\", null, /*#__PURE__*/React.createElement(ParticipantsList, {\n openDialogs: this.props.openDialogs,\n participants: this.props.participants,\n t: this.props.t\n }))))));\n }\n }]);\n\n return DetailListView;\n}(React.Component);\n\nexport default DetailListView;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n\n/* eslint-disable jsx-a11y/anchor-is-valid */\nimport React from 'react';\nimport OutlineView from './outline';\nimport CommentPanel from './comment-panel';\nimport DetailListView from './detail-list-view';\n\nvar SidePanel = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(SidePanel, _React$PureComponent);\n\n var _super = _createSuper(SidePanel);\n\n function SidePanel() {\n var _this;\n\n _classCallCheck(this, SidePanel);\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 navItem: 'outline'\n };\n\n _this.onOutlineClick = function (event) {\n event.preventDefault();\n\n _this.props.toggleCommentBtn(false);\n\n _this.setState({\n navItem: 'outline'\n });\n };\n\n _this.onMarkdownHintClick = function (event) {\n event.preventDefault();\n\n _this.props.toggleCommentBtn(false);\n\n _this.setState({\n navItem: 'markdownHint'\n });\n };\n\n _this.onDetailClick = function (event) {\n event.preventDefault();\n\n _this.props.toggleCommentBtn(false);\n\n _this.setState({\n navItem: 'detail'\n });\n };\n\n _this.onCommentsPanelClick = function (event) {\n event.preventDefault();\n\n _this.props.toggleCommentBtn(true);\n\n _this.setState({\n navItem: 'commentsPanel'\n });\n };\n\n _this.openMarkdownHint = function () {\n _this.setState({\n navItem: 'markdownHint'\n });\n };\n\n return _this;\n }\n\n _createClass(SidePanel, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n window.openMarkdownHint = this.openMarkdownHint;\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n if (nextProps.issues !== this.props.issues) {\n if (nextProps.issues.issue_list.length > 0) {\n this.setState({\n navItem: 'markdownHint'\n });\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n window.openMarkdownHint = null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var outlineActive = ''; // var markdownHint = '';\n\n var commentsPanel = '';\n var detailList = '';\n\n if (this.state.navItem === 'outline') {\n outlineActive = 'active';\n } else if (this.state.navItem === 'commentsPanel') {\n commentsPanel = 'active';\n } else if (this.state.navItem === 'detail') {\n detailList = 'active';\n } else {// markdownHint = 'active';\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"side-panel\"\n }, /*#__PURE__*/React.createElement(\"ul\", {\n className: \"nav justify-content-center\"\n }, /*#__PURE__*/React.createElement(\"li\", {\n className: \"nav-item\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: 'nav-link ' + outlineActive,\n href: \"\",\n onClick: this.onOutlineClick\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"iconfont icon-list-ul\"\n }))), /*#__PURE__*/React.createElement(\"li\", {\n className: \"nav-item\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: 'nav-link ' + detailList,\n href: \"\",\n onClick: this.onDetailClick\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: 'iconfont icon-info-circle'\n }))), /*#__PURE__*/React.createElement(\"li\", {\n className: \"nav-item\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: 'nav-link ' + commentsPanel,\n href: \"\",\n onClick: this.onCommentsPanelClick\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: 'iconfont icon-comment'\n })))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"side-panel-content\"\n }, this.state.navItem === 'outline' && /*#__PURE__*/React.createElement(OutlineView, {\n editor: this.props.editor,\n document: this.props.document,\n t: this.props.t\n }), this.state.navItem === 'commentsPanel' && /*#__PURE__*/React.createElement(CommentPanel, {\n editorApi: this.props.editorApi,\n t: this.props.t,\n scrollToQuote: this.props.scrollToQuote,\n relistComment: this.props.relistComment,\n openDialogs: this.props.openDialogs,\n participants: this.props.participants,\n onParticipantsChange: this.props.onParticipantsChange\n }), this.state.navItem === 'detail' && /*#__PURE__*/React.createElement(DetailListView, {\n t: this.props.t,\n relatedFiles: this.props.relatedFiles,\n fileTagList: this.props.fileTagList,\n editorApi: this.props.editorApi,\n openDialogs: this.props.openDialogs,\n fileInfo: this.props.fileInfo,\n participants: this.props.participants\n })));\n }\n }]);\n\n return SidePanel;\n}(React.PureComponent);\n\nexport default SidePanel;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\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 _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport ToolBar from '../components/toolbar';\nimport { withTranslation } from 'react-i18next';\nimport { renderNode, renderLeaf, EditorUtils, decorationNode } from './editor-utils/common-editor-utils';\nimport { createEditor, Node, Editor, Range } from 'slate';\nimport { withHistory } from 'slate-history';\nimport { serialize } from '../utils/slate2markdown/index';\nimport { Editable, withReact, Slate, ReactEditor } from '@seafile/slate-react';\nimport { isRangeCollapsed } from './editor-utils/range-utils';\nimport ModalPortal from '../components/modal-portal';\nimport TextLinkHoverMenu from './editor-component/textlink-hovermenu';\nimport ContextMenu from '../components/context-menu';\nimport withBlock from './controller/block-element-controller';\nimport withInline from './controller/inline-element-controller';\nimport withVoid from './controller/void-element-controller';\nimport withMarkdownShortcut from './controller/shortcut-controller';\nimport normalizeNode from './controller/normalize-controller';\nimport Plugin from './editor-plugin';\nimport TableUtils from '../editor/editor-utils/block-element-utils/table-utils';\nimport UserHelpDialog from '../components/user-help';\nimport CommentDialog from '../components/comment-dialog';\nimport SidePanel from '../components/side-panel';\nimport toaster from '../components/toast';\nimport '../css/richeditor/right-panel.css';\nimport '../css/richeditor/side-panel.css';\nimport '../css/richeditor/navbar-imgbutton.css';\nimport '../css/richeditor/textlink-hovermenu.css';\nimport '../css/richeditor/comments-list.css';\nimport '../css/richeditor/image.css';\nimport '../css/richeditor/link.css';\nimport '../css/richeditor/tree-view.css';\n\nvar SimpleEditor = /*#__PURE__*/function (_React$Component) {\n _inherits(SimpleEditor, _React$Component);\n\n var _super = _createSuper(SimpleEditor);\n\n function SimpleEditor(props) {\n var _this;\n\n _classCallCheck(this, SimpleEditor);\n\n _this = _super.call(this, props);\n\n _this.getDomNodeByPath = function (path) {\n var node,\n parent = document.querySelector('.editor-component');\n\n while (typeof path[0] === 'number' && parent) {\n node = parent.children[path[0]];\n path.shift();\n parent = node;\n }\n\n return node;\n };\n\n _this.setBtnPosition = function () {\n if (!_this.state.showCommentBtn) {\n return;\n }\n\n if (_this.timmer) return;\n _this.timmer = setTimeout(function () {\n var selection = _this.editor.selection;\n\n if (!selection || Range.isCollapsed(selection)) {\n var _style = _this.refs.commentbtn.style;\n _style.top = '-1000px';\n clearTimeout(_this.timmer);\n _this.timmer = null;\n return;\n }\n\n var focusNodePath = selection.anchor.path.slice();\n focusNodePath.pop();\n\n var focusNode = _this.getDomNodeByPath(focusNodePath);\n\n var style = _this.refs.commentbtn.style;\n style.right = '40px';\n\n if (focusNode) {\n style.top = \"\".concat(focusNode.offsetTop, \"px\");\n } else {\n style.top = '-1000px';\n }\n\n clearTimeout(_this.timmer);\n _this.timmer = null;\n }, 40);\n };\n\n _this.initialSidePanel = function () {\n var mainPanelWidth = _this.getCookie('md-editor-main-panel-width');\n\n if (mainPanelWidth) _this.setState({\n mainPanelWidth: mainPanelWidth * 1\n });\n\n var isShowSidePanel = _this.getCookie('md-editor-show-side-panel');\n\n if (isShowSidePanel === 'true') {\n _this.setState({\n isShowSidePanel: true\n });\n } else if (isShowSidePanel === 'false') {\n _this.setState({\n isShowSidePanel: false\n });\n }\n };\n\n _this.scrollToNode = function (node) {\n var editor = document.querySelector('.editor-component');\n var element = editor.childNodes[node.path[0]];\n\n _this.refs.editorContainer.scrollTo(0, element.offsetTop);\n\n window.location.hash = encodeURI(node.children[0].text);\n Editor.select(_this.editor, node.path);\n };\n\n _this.showHelpDialog = function () {\n _this.setState({\n isShowSidePanel: false,\n isShowHelpDialog: true\n });\n };\n\n _this.hideHelpDialog = function () {\n _this.setState({\n isShowHelpDialog: false\n });\n };\n\n _this.insertRepoImage = function (event) {\n event.preventDefault();\n if (_this.props.readOnly) return;\n _this.props.openDialogs && _this.props.openDialogs('insert_repo_image');\n };\n\n _this.onResizeMouseUp = function (event) {\n if (_this.state.resizeFlag) {\n _this.setState({\n resizeFlag: false\n });\n }\n\n _this.setCookie('md-editor-main-panel-width', _this.state.mainPanelWidth);\n };\n\n _this.onResizeMouseDown = function (event) {\n _this.setState({\n resizeFlag: true\n });\n };\n\n _this.onResizeMouseMove = function (event) {\n var mainPanelWidth = _this.state.mainPanelWidth + event.nativeEvent.movementX / event.view.innerWidth * 100;\n\n if (mainPanelWidth >= 82 || mainPanelWidth <= 30) {\n _this.setState({\n resizeFlag: false\n });\n\n return;\n }\n\n _this.setState({\n mainPanelWidth: mainPanelWidth\n });\n };\n\n _this.toggleSidePanel = function () {\n if (_this.state.isShowSidePanel) {\n _this.setState({\n isShowSidePanel: false\n });\n\n _this.setCookie('md-editor-show-side-panel', 'false');\n } else {\n _this.setState({\n isShowSidePanel: true\n });\n\n _this.setCookie('md-editor-show-side-panel', 'true');\n }\n\n _this.setState({\n isShowHelpDialog: false\n });\n };\n\n _this.handleCommentOpen = function () {\n _this.setState({\n mainPanelWidth: 70,\n isShowHelpDialog: false\n });\n };\n\n _this.setCookie = function (key, value) {\n document.cookie = key + '=' + value + '; ';\n };\n\n _this.onSave = function (event) {\n _this.props.onSave();\n };\n\n _this.insertRepoFile = function () {\n if (_this.props.readOnly) return;\n _this.editorSelection = window.editor.selection;\n _this.props.openDialogs && _this.props.openDialogs('insert_file');\n };\n\n _this.onCommentAdded = function () {\n _this.toggleCommentDialog();\n\n _this.setState({\n relistComment: _this.state.relistComment + 1\n });\n };\n\n _this.toggleCommentBtn = function (value) {\n _this.setState({\n showCommentBtn: value\n });\n };\n\n _this.addComment = function (e) {\n e.stopPropagation();\n\n _this.getQuote();\n\n _this.toggleCommentDialog();\n };\n\n _this.toggleCommentDialog = function () {\n _this.setState({\n showCommentDialog: !_this.state.showCommentDialog\n });\n };\n\n _this.getQuote = function () {\n _this.quote = serialize(Editor.fragment(_this.editor, _this.editor.selection));\n\n _this.setState({\n commentPosition: _this.editor.selection.anchor.path\n });\n };\n\n _this.onChange = function (value) {\n _this.setState({\n value: value\n }); // hide context menu when content change\n\n\n if (_this.state.isShowContextMenu === true) {\n _this.setState({\n isShowContextMenu: false\n });\n\n _this.contextMenuPosition = {};\n }\n\n _this.props.onChange(value, _this.editor.operations);\n };\n\n _this.foucsEditor = function () {\n _this.editorRef.firstChild.focus();\n };\n\n _this.onToggleLinkDialog = function () {\n _this.setState({\n isShowLinkDialog: !_this.state.isShowLinkDialog\n });\n };\n\n _this.onToggleFormulaDialog = function () {\n _this.setState({\n isShowFormulaDialog: !_this.state.isShowFormulaDialog\n });\n };\n\n _this.onToggleImageDialog = function () {\n _this.setState({\n isShowImageDialog: !_this.state.isShowImageDialog\n });\n };\n\n _this.getCookie = function (key) {\n var name = key + '=';\n var ca = document.cookie.split(';');\n\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i].trim();\n\n if (c.indexOf(name) === 0) {\n return c.substring(name.length, c.length);\n }\n }\n\n return '';\n };\n\n _this.addComment = function (e) {\n e.stopPropagation();\n\n _this.getQuote();\n\n _this.toggleCommentDialog();\n };\n\n _this.scrollToQuote = function (path) {\n if (!path) return;\n var editor = _this.editor;\n var node = editor.children[path[0]];\n var element = ReactEditor.toDOMNode(editor, node);\n\n _this.refs.editorContainer.scrollTo(0, element.offsetTop);\n\n Editor.select(_this.editor, path);\n };\n\n _this.onContextMenu = function (event) {\n if (_this.tableUtils.isInTable()) {\n event.preventDefault();\n _this.contextMenuPosition = {\n left: event.clientX,\n top: event.clientY\n };\n\n _this.setState({\n isShowContextMenu: !_this.state.isShowContextMenu\n });\n }\n };\n\n _this.addLink = function (fileName, url, isImage) {\n if (isImage) {\n _this.editorUtils.insertImage({\n url: url,\n selection: _this.editorSelection\n });\n\n return;\n }\n\n _this.editorUtils.insertLink({\n text: fileName,\n url: url,\n selection: _this.editorSelection\n });\n };\n\n _this.editor = normalizeNode(withMarkdownShortcut(withVoid(withBlock(withInline(withHistory(withReact(createEditor())))))));\n _this.editor.editorApi = props.editorApi;\n _this.editor.onSave = props.onSave;\n window.editor = _this.editor;\n _this.editorUtils = new EditorUtils(_this.editor);\n _this.tableUtils = new TableUtils(_this.editor);\n _this.plugin = new Plugin(_this.editor);\n _this.editorRef = null;\n _this.timmer = null;\n _this.contextMenuPosition = {};\n _this.state = {\n value: props.value,\n leftNavMode: 'files',\n mainPanelWidth: 80,\n resizeFlag: false,\n isShowHelpDialog: false,\n isShowSidePanel: false,\n isShowLinkDialog: false,\n isShowImageDialog: false,\n isShowFormulaDialog: false,\n isShowContextMenu: false,\n showCommentBtn: false,\n showCommentDialog: false,\n commentPosition: null,\n relistComment: 0\n };\n return _this;\n }\n\n _createClass(SimpleEditor, [{\n key: \"componentDidCatch\",\n value: function componentDidCatch(error) {\n this.props.resetRichValue();\n console.log(error);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n window.richMarkdownEditor = this; // notify current user if others are also editing this file\n\n var editingUsers = this.props.collabUsers.filter(function (ele) {\n return ele.is_editing === true && ele.myself === undefined;\n });\n\n if (editingUsers.length > 0) {\n toaster.danger('Another user is editing this file!', {\n duration: 3\n });\n }\n\n var userAgent = navigator.userAgent.toLowerCase();\n\n if (userAgent.indexOf('chrome') === -1) {\n toaster.warning(this.props.t('Editing_files_in_this_browser_can_lead_to_slight_display_problems'), {\n duration: 4\n });\n } // get first text node of the document and focus at the start of the text node\n\n\n var _Array$from$ = _slicedToArray(Array.from(Node.texts(this.editor.children[0]))[0], 2),\n textPath = _Array$from$[1];\n\n textPath.unshift(0);\n Editor.select(this.editor, {\n path: textPath,\n offset: 0\n });\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n if (this.props.issues !== nextProps.issues && nextProps.issues.issue_list.length > 0 && !this.state.isShowSidePanel) {\n this.setState({\n isShowSidePanel: true\n }, function () {\n window.openMarkdownHint && window.openMarkdownHint();\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$state = this.state,\n value = _this$state.value,\n isShowLinkDialog = _this$state.isShowLinkDialog,\n isShowImageDialog = _this$state.isShowImageDialog,\n isShowFormulaDialog = _this$state.isShowFormulaDialog;\n var _this$props = this.props,\n t = _this$props.t,\n mode = _this$props.mode,\n editorApi = _this$props.editorApi;\n var _this$state2 = this.state,\n mainPanelWidth = _this$state2.mainPanelWidth,\n isShowHelpDialog = _this$state2.isShowHelpDialog,\n isShowSidePanel = _this$state2.isShowSidePanel;\n var onResizeMove = this.state.resizeFlag ? this.onResizeMouseMove : null;\n var mainPanelClass = \"seafile-editor-main-panel d-flex align-self-end \".concat(!isShowSidePanel && !isShowHelpDialog ? 'seafile-editor-all-panel' : '');\n var mainPanelStyle = {\n width: isShowSidePanel ? mainPanelWidth + '%' : '100%'\n };\n var editor = this.editor,\n foucsEditor = this.foucsEditor;\n var toolbarStatus = this.editorUtils.getToolbarStatus();\n var readOnly = this.props.readOnly;\n var selectionCollapsed = isRangeCollapsed(editor.selection);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-editor-module seafile-editor\"\n }, /*#__PURE__*/React.createElement(Slate, {\n editor: this.editor,\n value: value,\n onChange: this.onChange\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-rich-editor-topbar\"\n }, /*#__PURE__*/React.createElement(ToolBar, {\n onToggleLinkDialog: this.onToggleLinkDialog,\n onToggleImageDialog: this.onToggleImageDialog,\n onToggleFormulaDialog: this.onToggleFormulaDialog,\n toolbarStatus: toolbarStatus,\n toggleSidePanel: this.toggleSidePanel,\n insertRepoFile: this.insertRepoFile,\n isShowLinkDialog: isShowLinkDialog,\n isShowImageDialog: isShowImageDialog,\n isShowSidePanel: isShowSidePanel,\n hasSidePanel: true,\n mode: mode,\n readOnly: readOnly,\n isShowFormulaDialog: isShowFormulaDialog\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-editor-main d-flex\",\n onMouseMove: onResizeMove,\n onMouseUp: this.onResizeMouseUp\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: mainPanelClass,\n style: mainPanelStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"editor-container align-self-start\",\n ref: \"editorContainer\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(_ref) {\n return _this2.editorRef = _ref;\n },\n onClick: value.length === 2 && value[0].type === 'paragraph' && Node.text(value[0].children[0]).length === 0 ? foucsEditor : null,\n className: \"editor article\"\n }, /*#__PURE__*/React.createElement(Editable, {\n renderElement: function renderElement(props) {\n return renderNode(props, editor, readOnly);\n },\n className: 'editor-component',\n renderLeaf: renderLeaf,\n onContextMenu: this.onContextMenu,\n onCopy: function onCopy(event) {\n _this2.plugin.onCopy(event, editor);\n },\n onCut: function onCut(event) {\n return _this2.plugin.onCut(event);\n },\n autoFocus: true,\n onKeyDown: this.plugin.onKeyDown,\n decorate: decorationNode,\n onSelect: this.setBtnPosition\n }), this.state.showCommentBtn && /*#__PURE__*/React.createElement(\"i\", {\n className: \"iconfont icon-plus-square seafile-viewer-comment-btn\",\n ref: \"commentbtn\",\n onMouseDown: this.addComment\n })), toolbarStatus.isLinkActive && selectionCollapsed ? /*#__PURE__*/React.createElement(ModalPortal, null, /*#__PURE__*/React.createElement(TextLinkHoverMenu, {\n onToggleLinkDialog: this.onToggleLinkDialog,\n editorUtils: this.editorUtils\n })) : null, this.state.isShowContextMenu && /*#__PURE__*/React.createElement(ModalPortal, null, /*#__PURE__*/React.createElement(ContextMenu, {\n tableUtils: this.tableUtils,\n contextMenuPosition: this.contextMenuPosition\n })))), !isShowHelpDialog && isShowSidePanel && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-editor-resize\",\n style: {\n right: 100 - mainPanelWidth + '%'\n },\n onMouseDown: this.onResizeMouseDown\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-editor-side-panel align-self-start\",\n style: {\n width: 100 - mainPanelWidth + '%'\n }\n }, /*#__PURE__*/React.createElement(SidePanel, {\n editor: this,\n document: value,\n issues: this.props.issues,\n scrollToNode: this.scrollToNode,\n scrollToQuote: this.scrollToQuote,\n t: this.props.t,\n editorApi: editorApi,\n toggleCommentBtn: this.toggleCommentBtn,\n relistComment: this.state.relistComment,\n relatedFiles: this.props.relatedFiles,\n fileTagList: this.props.fileTagList,\n openDialogs: this.props.openDialogs,\n fileInfo: this.props.fileInfo,\n participants: this.props.participants,\n onParticipantsChange: this.props.onParticipantsChange\n }))), isShowHelpDialog && /*#__PURE__*/React.createElement(UserHelpDialog, {\n userHelp: t('userHelp', {\n returnObjects: true\n }),\n hideHelpDialog: this.hideHelpDialog\n }), this.state.showCommentDialog && /*#__PURE__*/React.createElement(CommentDialog, {\n editorApi: editorApi,\n t: t,\n quote: this.quote,\n scrollToQuote: this.scrollToQuote,\n commentPosition: this.state.commentPosition,\n onCommentAdded: this.onCommentAdded,\n toggleCommentDialog: this.toggleCommentDialog\n }))));\n }\n }]);\n\n return SimpleEditor;\n}(React.Component);\n\nexport default withTranslation('seafile-editor')(SimpleEditor);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { processor } from '../utils/seafile-markdown2html';\nimport toaster from '../components/toast';\nimport isHotkey from 'is-hotkey';\nimport { withTranslation } from 'react-i18next';\nimport Prism from 'prismjs';\n\nvar className = require('classnames');\n\nvar lodash = require('lodash');\n\nrequire('codemirror/lib/codemirror.css');\n\nrequire('codemirror/mode/markdown/markdown');\n\nrequire('../css/plaineditor/markdown-editor.css');\n\nrequire('prismjs/themes/prism.css');\n\nvar CodeMirror = /*#__PURE__*/function (_React$Component) {\n _inherits(CodeMirror, _React$Component);\n\n var _super = _createSuper(CodeMirror);\n\n function CodeMirror() {\n var _this;\n\n _classCallCheck(this, CodeMirror);\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 isFocused: false\n };\n\n _this.focus = function () {\n if (_this.codeMirror) {\n _this.codeMirror.focus();\n }\n };\n\n _this.focusChanged = function (focused) {\n _this.setState({\n isFocused: focused\n });\n\n _this.props.onFocusChange && _this.props.onFocusChange(focused);\n };\n\n _this.cursorActivity = function (cm) {\n _this.props.onCursorActivity && _this.props.onCursorActivity(cm);\n };\n\n _this.scrollChanged = function (cm) {\n _this.props.onScroll && _this.props.onScroll(cm.getScrollInfo());\n };\n\n _this.codemirrorValueChanged = function (doc, change) {\n if (_this.props.onChange && change.origin !== 'setValue') {\n _this.props.onChange(doc.getValue(), change);\n }\n };\n\n return _this;\n }\n\n _createClass(CodeMirror, [{\n key: \"getCodeMirrorInstance\",\n value: function getCodeMirrorInstance() {\n return this.props.codeMirrorInstance || require('codemirror');\n }\n }, {\n key: \"componentWillMount\",\n value: function componentWillMount() {\n if (this.props.path) {\n console.error('Warning: react-codemirror: the `path` prop has been changed to `name`');\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var codeMirrorInstance = this.getCodeMirrorInstance();\n this.codeMirror = codeMirrorInstance.fromTextArea(this.textareaNode, this.props.options);\n this.codeMirror.on('change', this.codemirrorValueChanged);\n this.codeMirror.on('cursorActivity', this.cursorActivity);\n this.codeMirror.on('focus', this.focusChanged.bind(this, true));\n this.codeMirror.on('blur', this.focusChanged.bind(this, false));\n this.codeMirror.on('scroll', this.scrollChanged);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n // is there a lighter-weight way to remove the cm instance?\n if (this.codeMirror) {\n this.codeMirror.toTextArea();\n }\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n if (this.codeMirror && nextProps.initialValue !== undefined && nextProps.initialValue !== this.props.initialValue) {\n if (this.props.preserveScrollPosition) {\n var prevScrollPosition = this.codeMirror.getScrollInfo();\n this.codeMirror.setValue(nextProps.initialValue);\n this.codeMirror.scrollTo(prevScrollPosition.left, prevScrollPosition.top);\n } else {\n this.codeMirror.setValue(nextProps.initialValue);\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var editorClassName = className('ReactCodeMirror', this.state.isFocused ? 'ReactCodeMirror--focused' : null, this.props.className);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: editorClassName\n }, /*#__PURE__*/React.createElement(\"textarea\", {\n ref: function ref(_ref) {\n return _this2.textareaNode = _ref;\n },\n name: this.props.name || this.props.path,\n defaultValue: this.props.initialValue,\n autoComplete: \"off\",\n autoFocus: this.props.autoFocus\n }));\n }\n }]);\n\n return CodeMirror;\n}(React.Component);\n/*\n\nWhen loading a new file:\n\n markdownContent initialValue\n index.js -----------------> PlainMarkdownEditor --------> CodeMirror --> Real CodeMirror\n\nWhen user type in CodeMirror\n\n value value\n Real CodeMirror ------> CodeMirror ------> PlainMarkdownEditor\n\nOn Save:\n\n value\n MarkdownEditor -----> index.js\n\n*/\n\n\nvar PlainMarkdownEditor = /*#__PURE__*/function (_React$Component2) {\n _inherits(PlainMarkdownEditor, _React$Component2);\n\n var _super2 = _createSuper(PlainMarkdownEditor);\n\n function PlainMarkdownEditor(props) {\n var _this3;\n\n _classCallCheck(this, PlainMarkdownEditor);\n\n _this3 = _super2.call(this, props);\n _this3.state = {\n html: '',\n leftIsBindScroll: false,\n rightIsBindScroll: false\n };\n _this3.scrollData = {\n scrollPercentage: 0,\n leftPanel: null,\n rightPanel: null\n };\n\n _this3.updateCode = function (newCode) {\n _this3.props.onChange(newCode);\n };\n\n _this3.onLeftScroll = function (e) {\n var srcElement = _this3.scrollData.leftPanel;\n _this3.scrollData.scrollPercentage = srcElement.scrollTop / srcElement.scrollHeight;\n _this3.scrollData.rightPanel.scrollTop = _this3.scrollData.scrollPercentage * _this3.scrollData.rightPanel.scrollHeight;\n };\n\n _this3.onRightScroll = function (e) {\n var srcElement = _this3.scrollData.rightPanel;\n _this3.scrollData.scrollPercentage = srcElement.scrollTop / srcElement.scrollHeight;\n _this3.scrollData.leftPanel.scrollTop = _this3.scrollData.scrollPercentage * _this3.scrollData.leftPanel.scrollHeight;\n };\n\n _this3.onEnterLeftPanel = function () {\n _this3.setState({\n leftIsBindScroll: true\n });\n };\n\n _this3.onLeaveLeftPanel = function () {\n _this3.setState({\n leftIsBindScroll: false\n });\n };\n\n _this3.onEnterRightPanel = function () {\n _this3.setState({\n rightIsBindScroll: true\n });\n };\n\n _this3.onLeaveRightPanel = function () {\n _this3.setState({\n rightIsBindScroll: false\n });\n };\n\n _this3.onHotKey = function (event) {\n if (isHotkey('mod+s', event)) {\n event.preventDefault();\n\n _this3.props.onSave(event);\n\n return true;\n }\n };\n\n _this3.options = {\n lineNumbers: true,\n mode: 'markdown',\n lineWrapping: true,\n scrollbarStyle: null\n };\n _this3.setContent = lodash.throttle(_this3.setContent, 1000);\n return _this3;\n }\n\n _createClass(PlainMarkdownEditor, [{\n key: \"setContent\",\n value: function setContent(markdownContent) {\n var _this4 = this;\n\n processor.process(markdownContent, function (error, vfile) {\n var html = String(vfile);\n\n _this4.setState({\n html: html\n });\n });\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // get relevant dom when component mounted instead of get them when scrolling to improve performance\n this.scrollData.leftPanel = document.querySelector('.plain-editor-left-panel');\n this.scrollData.rightPanel = document.querySelector('.plain-editor-right-panel');\n this.setContent(this.props.currentContent); // notify current user if others are also editing this file\n\n var editingUsers = this.props.collabUsers.filter(function (ele) {\n return ele.is_editing === true && ele.myself === undefined;\n });\n\n if (editingUsers.length > 0) {\n toaster.danger('Another user is editing this file!', {\n duration: 3\n });\n }\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n this.setContent(nextProps.currentContent);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n Prism.highlightAll(); // render math formula\n\n window.MathJax.typesetPromise(document.querySelectorAll('.math-display'));\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-editor-module seafile-editor\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"seafile-editor-main plain-editor-main d-flex\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"plain-editor-left-panel\",\n onKeyDown: this.onHotKey,\n onMouseLeave: this.onLeaveLeftPanel,\n onMouseEnter: this.onEnterLeftPanel,\n onScroll: this.state.leftIsBindScroll ? this.onLeftScroll : null\n }, /*#__PURE__*/React.createElement(CodeMirror, {\n initialValue: this.props.initialValue,\n onChange: this.updateCode,\n options: this.options\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"plain-editor-right-panel\",\n onMouseEnter: this.onEnterRightPanel,\n onMouseLeave: this.onLeaveRightPanel,\n onScroll: this.state.rightIsBindScroll ? this.onRightScroll : null\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"preview\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"rendered-markdown article\",\n dangerouslySetInnerHTML: {\n __html: this.state.html\n }\n })))));\n }\n }]);\n\n return PlainMarkdownEditor;\n}(React.Component);\n\nPlainMarkdownEditor.defaultProps = {\n collabUsers: []\n};\nexport default withTranslation('seafile-editor')(PlainMarkdownEditor);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport toaster from '../components/toast';\nimport { withTranslation } from 'react-i18next';\nimport { Text } from 'slate';\nimport '../css/layout.css';\nimport '../css/topbar.css';\nimport RichMarkdownEditor from './rich-markdown-editor';\nimport PlainMarkdownEditor from './plain-markdown-editor';\nimport { serialize, deserialize } from '../utils/slate2markdown';\n\nvar SeafileEditor = /*#__PURE__*/function (_React$Component) {\n _inherits(SeafileEditor, _React$Component);\n\n var _super = _createSuper(SeafileEditor);\n\n function SeafileEditor(props) {\n var _this;\n\n _classCallCheck(this, SeafileEditor);\n\n _this = _super.call(this, props);\n\n _this.switchToPlainTextEditor = function () {\n // TODO: performance, change to do serialize in async way\n if (_this.props.editorMode === 'rich') {\n var value = _this.state.richValue;\n var str = serialize(value);\n\n _this.props.setEditorMode('plain');\n\n _this.setState({\n initialPlainValue: str,\n currentContent: str\n });\n }\n\n if (_this.props.collabServer) {\n _this.props.emitSwitchEditor(false);\n }\n };\n\n _this.switchToRichTextEditor = function () {\n // TODO: performance, change to do deserialize in async way\n _this.setState({\n richValue: deserialize(_this.state.currentContent)\n });\n\n _this.props.setEditorMode('rich');\n\n if (_this.props.collabServer) {\n _this.props.emitSwitchEditor(false);\n }\n };\n\n _this.onUnload = function (event) {\n if (!_this.props.contentChanged) return;\n var confirmationMessage = 'Leave this page? The system may not save your changes.';\n\n _this.props.clearTimer();\n\n _this.props.deleteDraft && _this.props.deleteDraft();\n event.returnValue = confirmationMessage;\n return confirmationMessage;\n };\n\n _this.onChange = function (value, operations) {\n if (_this.props.editorMode === 'rich') {\n _this.setState({\n richValue: value\n });\n\n _this.props.setDraftValue('rich', _this.state.richValue);\n\n var ops = operations.filter(function (o) {\n return o.type !== 'set_selection' && o.type !== 'set_value';\n });\n\n if (ops.length !== 0) {\n _this.props.onContentChanged(true);\n\n if (_this.autoSave) _this.props.autoSaveDraft();\n }\n } else {\n _this.setState({\n currentContent: value\n });\n\n _this.props.onContentChanged(true);\n\n _this.props.setDraftValue('rich', _this.state.richValue);\n\n _this.props.autoSaveDraft();\n }\n };\n\n _this.saveContent = function (str) {\n _this.props.editorApi.saveContent(str).then(function () {\n _this.props.onSaving(false);\n\n _this.props.onContentChanged(false); // remove markdown lint temporarily\n // if (this.props.markdownLint) {\n // const slateValue = this.state.richValue;\n // this.props.editorApi.markdownLint(JSON.stringify(slateValue)).then((res) => {\n // this.setState({\n // issues: res.data\n // });\n // });\n // }\n\n\n _this.lastModifyTime = new Date();\n toaster.success(_this.props.t('file_saved'), {\n duration: 2\n });\n\n _this.props.editorApi.getFileInfo().then(function (res) {\n _this.props.setFileInfoMtime(res.data);\n });\n\n _this.addParticipants();\n }, function () {\n _this.props.onSaving(false);\n\n toaster.danger(_this.props.t('file_failed_to_save'), {\n duration: 2\n });\n });\n\n _this.props.onSaving(true);\n };\n\n _this.addParticipants = function () {\n if (_this.isParticipant || !window.showParticipants) return;\n var _this$props$editorApi = _this.props.editorApi,\n userName = _this$props$editorApi.userName,\n addFileParticipants = _this$props$editorApi.addFileParticipants;\n var participants = _this.props.participants;\n\n if (participants && participants.length !== 0) {\n _this.isParticipant = participants.every(function (participant) {\n return participant.email === userName;\n });\n if (_this.isParticipant) return;\n }\n\n var emails = [userName];\n addFileParticipants(emails).then(function (res) {\n _this.isParticipant = true;\n\n _this.props.onParticipantsChange();\n });\n };\n\n _this.onRichEditorSave = function () {\n if (_this.props.isSaving) return;\n var value = _this.state.richValue;\n var str = serialize(value);\n\n _this.saveContent(str);\n\n _this.props.clearTimer();\n\n _this.props.deleteDraft && _this.props.deleteDraft();\n };\n\n _this.resetRichValue = function () {\n var value = _this.state.richValue;\n\n _this.setState({\n richValue: value\n });\n };\n\n _this.onPlainEditorSave = function () {\n if (_this.props.isSaving) return;\n var str = _this.state.currentContent;\n\n _this.saveContent(str);\n\n _this.props.clearTimer();\n\n _this.props.deleteDraft && _this.props.deleteDraft();\n };\n\n _this.resetContentChanged = function () {\n if (_this.props.contentChanged) {\n _this.props.onContentChanged(false);\n }\n\n _this.autoSave = true;\n };\n\n var markdownContent = _this.props.markdownContent;\n var isEditMode = _this.props.mode === 'editor';\n var isDraft = _this.props.isDraft;\n _this.lastModifyTime = null;\n _this.autoSave = false;\n _this.isParticipant = false;\n window.seafileEditor = _assertThisInitialized(_this);\n _this.state = {\n isTreeDataLoaded: false,\n initialPlainValue: '',\n // for plain editor\n currentContent: markdownContent,\n // for plain editor and viewer\n richValue: isEditMode || isDraft ? deserialize(markdownContent) : deserialize(''),\n // for rich editor\n issues: {\n issue_list: []\n }\n };\n return _this;\n } // componentWillReceiveProps(nextProps) {\n // if (this.props.markdownContent !== nextProps.markdownContent) {\n // this.setState({ richValue: deserialize(nextProps.markdownContent) });\n // }\n // }\n // from rich editor to plain editor\n\n\n _createClass(SeafileEditor, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // window.seafileEditor = this;\n window.addEventListener('beforeunload', this.onUnload);\n }\n }, {\n key: \"componentWillMount\",\n value:\n /*\n * when seafileEditor first mounted check the content\n * if the content is empty add h1 to document\n * */\n function componentWillMount() {\n if (this.props.editorMode === 'rich') {\n var document = this.state.richValue;\n var firstNode = document[0];\n /**\n * if the markdown content is empty, the rich value contains\n * only a paragraph which contains a empty text node \n * \n */\n\n if (document.length === 1 && firstNode.type === 'paragraph' && firstNode.children.length === 1 && Text.isText(firstNode.children[0]) && firstNode.children[0].text.length === 0) {\n var headerContent = this.props.fileInfo.name.slice(0, this.props.fileInfo.name.lastIndexOf('.'));\n var header = {\n type: 'header_one',\n children: [{\n text: headerContent,\n marks: []\n }]\n };\n document.push(header);\n document.shift();\n this.setState({\n richValue: document\n });\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var dom = '';\n\n if (this.props.editorMode === 'rich') {\n dom = /*#__PURE__*/React.createElement(RichMarkdownEditor, {\n editorApi: this.props.editorApi,\n onChange: this.onChange,\n onSave: this.onRichEditorSave,\n value: this.state.richValue,\n resetRichValue: this.resetRichValue,\n contentChanged: this.props.contentChanged,\n saving: this.props.saving,\n switchToMarkDownViewer: this.switchToMarkDownViewer,\n switchToPlainTextEditor: this.switchToPlainTextEditor,\n fileInfo: this.props.fileInfo,\n toggleStar: this.props.toggleStar,\n issues: this.state.issues,\n resetContentChanged: this.resetContentChanged,\n collabUsers: this.props.collabUsers,\n mode: this.props.editorMode,\n draftID: this.props.draftID,\n isDraft: this.props.isDraft,\n openDialogs: this.props.openDialogs,\n readOnly: this.props.readOnly,\n relatedFiles: this.props.relatedFiles,\n fileTagList: this.props.fileTagList,\n participants: this.props.participants,\n onParticipantsChange: this.props.onParticipantsChange\n });\n } else if (this.props.editorMode === 'plain') {\n dom = /*#__PURE__*/React.createElement(PlainMarkdownEditor, {\n editorApi: this.props.editorApi,\n initialValue: this.state.initialPlainValue,\n currentContent: this.state.currentContent,\n contentChanged: this.props.contentChanged,\n switchToRichTextEditor: this.switchToRichTextEditor,\n switchToMarkDownViewer: this.switchToMarkDownViewer,\n onSave: this.onPlainEditorSave,\n onChange: this.onChange,\n fileInfo: this.props.fileInfo,\n toggleStar: this.props.toggleStar,\n collabUsers: this.props.collabUsers,\n mode: this.props.editorMode,\n draftID: this.props.draftID,\n isDraft: this.props.isDraft\n });\n }\n\n return dom;\n }\n }]);\n\n return SeafileEditor;\n}(React.Component);\n\nSeafileEditor.defaultProps = {\n userInfo: null\n};\nexport default withTranslation('seafile-editor')(SeafileEditor);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport SimpleEditor from './simple-editor';\nimport SeafileEditor from './seafile-editor';\nimport LoadScript from './load-script';\n\nvar SimpleEditorWithErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inherits(SimpleEditorWithErrorBoundary, _React$Component);\n\n var _super = _createSuper(SimpleEditorWithErrorBoundary);\n\n function SimpleEditorWithErrorBoundary() {\n _classCallCheck(this, SimpleEditorWithErrorBoundary);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(SimpleEditorWithErrorBoundary, [{\n key: \"componentDidCatch\",\n value: function componentDidCatch(error) {\n console.error(error);\n this.forceUpdate();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(SimpleEditor, this.props);\n }\n }]);\n\n return SimpleEditorWithErrorBoundary;\n}(React.Component);\n\nvar SeafileEditorWithErrorBundary = /*#__PURE__*/function (_React$Component2) {\n _inherits(SeafileEditorWithErrorBundary, _React$Component2);\n\n var _super2 = _createSuper(SeafileEditorWithErrorBundary);\n\n function SeafileEditorWithErrorBundary() {\n _classCallCheck(this, SeafileEditorWithErrorBundary);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(SeafileEditorWithErrorBundary, [{\n key: \"componentDidCatch\",\n value: function componentDidCatch(error) {\n console.error(error);\n this.forceUpdate();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(LoadScript, {\n scriptSource: this.props.scriptSource\n }, /*#__PURE__*/React.createElement(SeafileEditor, this.props));\n }\n }]);\n\n return SeafileEditorWithErrorBundary;\n}(React.Component);\n\nexport { SimpleEditorWithErrorBoundary as SimpleEditor, SeafileEditorWithErrorBundary as SeafileEditor };","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\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 _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 Manager = function (_Component) {\n _inherits(Manager, _Component);\n\n function Manager() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Manager);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Manager.__proto__ || Object.getPrototypeOf(Manager)).call.apply(_ref, [this].concat(args))), _this), _this._setTargetNode = function (node) {\n _this._targetNode = node;\n }, _this._getTargetNode = function () {\n return _this._targetNode;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Manager, [{\n key: 'getChildContext',\n value: function getChildContext() {\n return {\n popperManager: {\n setTargetNode: this._setTargetNode,\n getTargetNode: this._getTargetNode\n }\n };\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n tag = _props.tag,\n children = _props.children,\n restProps = _objectWithoutProperties(_props, ['tag', 'children']);\n\n if (tag !== false) {\n return (0, _react.createElement)(tag, restProps, children);\n } else {\n return children;\n }\n }\n }]);\n\n return Manager;\n}(_react.Component);\n\nManager.childContextTypes = {\n popperManager: _propTypes2.default.object.isRequired\n};\nManager.propTypes = {\n tag: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.bool]),\n children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func])\n};\nManager.defaultProps = {\n tag: 'div'\n};\nexports.default = Manager;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: 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 _react = require('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\nvar Target = function Target(props, context) {\n var _props$component = props.component,\n component = _props$component === undefined ? 'div' : _props$component,\n innerRef = props.innerRef,\n children = props.children,\n restProps = _objectWithoutProperties(props, ['component', 'innerRef', 'children']);\n\n var popperManager = context.popperManager;\n\n var targetRef = function targetRef(node) {\n popperManager.setTargetNode(node);\n if (typeof innerRef === 'function') {\n innerRef(node);\n }\n };\n\n if (typeof children === 'function') {\n var targetProps = { ref: targetRef };\n return children({ targetProps: targetProps, restProps: restProps });\n }\n\n var componentProps = _extends({}, restProps);\n\n if (typeof component === 'string') {\n componentProps.ref = targetRef;\n } else {\n componentProps.innerRef = targetRef;\n }\n\n return (0, _react.createElement)(component, componentProps, children);\n};\n\nTarget.contextTypes = {\n popperManager: _propTypes2.default.object.isRequired\n};\n\nTarget.propTypes = {\n component: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func]),\n innerRef: _propTypes2.default.func,\n children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func])\n};\n\nexports.default = Target;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: 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 _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _popper = require('popper.js');\n\nvar _popper2 = _interopRequireDefault(_popper);\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 Popper = function (_Component) {\n _inherits(Popper, _Component);\n\n function Popper() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Popper);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Popper.__proto__ || Object.getPrototypeOf(Popper)).call.apply(_ref, [this].concat(args))), _this), _this.state = {}, _this._setArrowNode = function (node) {\n _this._arrowNode = node;\n }, _this._getTargetNode = function () {\n return _this.context.popperManager.getTargetNode();\n }, _this._getOffsets = function (data) {\n return Object.keys(data.offsets).map(function (key) {\n return data.offsets[key];\n });\n }, _this._isDataDirty = function (data) {\n if (_this.state.data) {\n return JSON.stringify(_this._getOffsets(_this.state.data)) !== JSON.stringify(_this._getOffsets(data));\n } else {\n return true;\n }\n }, _this._updateStateModifier = {\n enabled: true,\n order: 900,\n fn: function fn(data) {\n if (_this._isDataDirty(data)) {\n _this.setState({ data: data });\n }\n return data;\n }\n }, _this._getPopperStyle = function () {\n var data = _this.state.data;\n\n\n if (!_this._popper || !data) {\n return {\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0\n };\n }\n\n return _extends({\n position: data.offsets.popper.position\n }, data.styles);\n }, _this._getPopperPlacement = function () {\n return _this.state.data ? _this.state.data.placement : undefined;\n }, _this._getPopperHide = function () {\n return !!_this.state.data && _this.state.data.hide ? '' : undefined;\n }, _this._getArrowStyle = function () {\n if (!_this.state.data || !_this.state.data.offsets.arrow) {\n return {};\n } else {\n var _this$state$data$offs = _this.state.data.offsets.arrow,\n top = _this$state$data$offs.top,\n left = _this$state$data$offs.left;\n\n return { top: top, left: left };\n }\n }, _this._handlePopperRef = function (node) {\n _this._popperNode = node;\n if (node) {\n _this._createPopper();\n } else {\n _this._destroyPopper();\n }\n if (_this.props.innerRef) {\n _this.props.innerRef(node);\n }\n }, _this._scheduleUpdate = function () {\n _this._popper && _this._popper.scheduleUpdate();\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Popper, [{\n key: 'getChildContext',\n value: function getChildContext() {\n return {\n popper: {\n setArrowNode: this._setArrowNode,\n getArrowStyle: this._getArrowStyle\n }\n };\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(lastProps) {\n if (lastProps.placement !== this.props.placement || lastProps.eventsEnabled !== this.props.eventsEnabled) {\n this._destroyPopper();\n this._createPopper();\n }\n if (lastProps.children !== this.props.children) {\n this._scheduleUpdate();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this._destroyPopper();\n }\n }, {\n key: '_createPopper',\n value: function _createPopper() {\n var _this2 = this;\n\n var _props = this.props,\n placement = _props.placement,\n eventsEnabled = _props.eventsEnabled;\n\n var modifiers = _extends({}, this.props.modifiers, {\n applyStyle: { enabled: false },\n updateState: this._updateStateModifier\n });\n if (this._arrowNode) {\n modifiers.arrow = {\n element: this._arrowNode\n };\n }\n this._popper = new _popper2.default(this._getTargetNode(), this._popperNode, {\n placement: placement,\n eventsEnabled: eventsEnabled,\n modifiers: modifiers\n });\n\n // TODO: look into setTimeout scheduleUpdate call, without it, the popper will not position properly on creation\n setTimeout(function () {\n return _this2._scheduleUpdate();\n });\n }\n }, {\n key: '_destroyPopper',\n value: function _destroyPopper() {\n if (this._popper) {\n this._popper.destroy();\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props2 = this.props,\n component = _props2.component,\n innerRef = _props2.innerRef,\n placement = _props2.placement,\n eventsEnabled = _props2.eventsEnabled,\n modifiers = _props2.modifiers,\n children = _props2.children,\n restProps = _objectWithoutProperties(_props2, ['component', 'innerRef', 'placement', 'eventsEnabled', 'modifiers', 'children']);\n\n var popperStyle = this._getPopperStyle();\n var popperPlacement = this._getPopperPlacement();\n var popperHide = this._getPopperHide();\n\n if (typeof children === 'function') {\n var popperProps = {\n ref: this._handlePopperRef,\n style: popperStyle,\n 'data-placement': popperPlacement,\n 'data-x-out-of-boundaries': popperHide\n };\n return children({\n popperProps: popperProps,\n restProps: restProps,\n scheduleUpdate: this._scheduleUpdate\n });\n }\n\n var componentProps = _extends({}, restProps, {\n style: _extends({}, restProps.style, popperStyle),\n 'data-placement': popperPlacement,\n 'data-x-out-of-boundaries': popperHide\n });\n\n if (typeof component === 'string') {\n componentProps.ref = this._handlePopperRef;\n } else {\n componentProps.innerRef = this._handlePopperRef;\n }\n\n return (0, _react.createElement)(component, componentProps, children);\n }\n }]);\n\n return Popper;\n}(_react.Component);\n\nPopper.contextTypes = {\n popperManager: _propTypes2.default.object.isRequired\n};\nPopper.childContextTypes = {\n popper: _propTypes2.default.object.isRequired\n};\nPopper.propTypes = {\n component: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func]),\n innerRef: _propTypes2.default.func,\n placement: _propTypes2.default.oneOf(_popper2.default.placements),\n eventsEnabled: _propTypes2.default.bool,\n modifiers: _propTypes2.default.object,\n children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func])\n};\nPopper.defaultProps = {\n component: 'div',\n placement: 'bottom',\n eventsEnabled: true,\n modifiers: {}\n};\nexports.default = Popper;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: 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 _react = require('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\nvar Arrow = function Arrow(props, context) {\n var _props$component = props.component,\n component = _props$component === undefined ? 'span' : _props$component,\n innerRef = props.innerRef,\n children = props.children,\n restProps = _objectWithoutProperties(props, ['component', 'innerRef', 'children']);\n\n var popper = context.popper;\n\n var arrowRef = function arrowRef(node) {\n popper.setArrowNode(node);\n if (typeof innerRef === 'function') {\n innerRef(node);\n }\n };\n var arrowStyle = popper.getArrowStyle();\n\n if (typeof children === 'function') {\n var arrowProps = {\n ref: arrowRef,\n style: arrowStyle\n };\n return children({ arrowProps: arrowProps, restProps: restProps });\n }\n\n var componentProps = _extends({}, restProps, {\n style: _extends({}, arrowStyle, restProps.style)\n });\n\n if (typeof component === 'string') {\n componentProps.ref = arrowRef;\n } else {\n componentProps.innerRef = arrowRef;\n }\n\n return (0, _react.createElement)(component, componentProps, children);\n};\n\nArrow.contextTypes = {\n popper: _propTypes2.default.object.isRequired\n};\n\nArrow.propTypes = {\n component: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func]),\n innerRef: _propTypes2.default.func,\n children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func])\n};\n\nexports.default = Arrow;","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../meta\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../xml/xml\", \"../meta\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"markdown\", function(cmCfg, modeCfg) {\n\n var htmlMode = CodeMirror.getMode(cmCfg, \"text/html\");\n var htmlModeMissing = htmlMode.name == \"null\"\n\n function getMode(name) {\n if (CodeMirror.findModeByName) {\n var found = CodeMirror.findModeByName(name);\n if (found) name = found.mime || found.mimes[0];\n }\n var mode = CodeMirror.getMode(cmCfg, name);\n return mode.name == \"null\" ? null : mode;\n }\n\n // Should characters that affect highlighting be highlighted separate?\n // Does not include characters that will be output (such as `1.` and `-` for lists)\n if (modeCfg.highlightFormatting === undefined)\n modeCfg.highlightFormatting = false;\n\n // Maximum number of nested blockquotes. Set to 0 for infinite nesting.\n // Excess `>` will emit `error` token.\n if (modeCfg.maxBlockquoteDepth === undefined)\n modeCfg.maxBlockquoteDepth = 0;\n\n // Turn on task lists? (\"- [ ] \" and \"- [x] \")\n if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;\n\n // Turn on strikethrough syntax\n if (modeCfg.strikethrough === undefined)\n modeCfg.strikethrough = false;\n\n if (modeCfg.emoji === undefined)\n modeCfg.emoji = false;\n\n if (modeCfg.fencedCodeBlockHighlighting === undefined)\n modeCfg.fencedCodeBlockHighlighting = true;\n\n if (modeCfg.fencedCodeBlockDefaultMode === undefined)\n modeCfg.fencedCodeBlockDefaultMode = 'text/plain';\n\n if (modeCfg.xml === undefined)\n modeCfg.xml = true;\n\n // Allow token types to be overridden by user-provided token types.\n if (modeCfg.tokenTypeOverrides === undefined)\n modeCfg.tokenTypeOverrides = {};\n\n var tokenTypes = {\n header: \"header\",\n code: \"comment\",\n quote: \"quote\",\n list1: \"variable-2\",\n list2: \"variable-3\",\n list3: \"keyword\",\n hr: \"hr\",\n image: \"image\",\n imageAltText: \"image-alt-text\",\n imageMarker: \"image-marker\",\n formatting: \"formatting\",\n linkInline: \"link\",\n linkEmail: \"link\",\n linkText: \"link\",\n linkHref: \"string\",\n em: \"em\",\n strong: \"strong\",\n strikethrough: \"strikethrough\",\n emoji: \"builtin\"\n };\n\n for (var tokenType in tokenTypes) {\n if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {\n tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];\n }\n }\n\n var hrRE = /^([*\\-_])(?:\\s*\\1){2,}\\s*$/\n , listRE = /^(?:[*\\-+]|^[0-9]+([.)]))\\s+/\n , taskListRE = /^\\[(x| )\\](?=\\s)/i // Must follow listRE\n , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/\n , setextHeaderRE = /^ {0,3}(?:\\={1,}|-{2,})\\s*$/\n , textRE = /^[^#!\\[\\]*_\\\\<>` \"'(~:]+/\n , fencedCodeRE = /^(~~~+|```+)[ \\t]*([\\w\\/+#-]*)[^\\n`]*$/\n , linkDefRE = /^\\s*\\[[^\\]]+?\\]:.*$/ // naive link-definition\n , punctuation = /[!\"#$%&'()*+,\\-.\\/:;<=>?@\\[\\\\\\]^_`{|}~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E42\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC9\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDF3C-\\uDF3E]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]/\n , expandedTab = \" \" // CommonMark specifies tab as 4 spaces\n\n function switchInline(stream, state, f) {\n state.f = state.inline = f;\n return f(stream, state);\n }\n\n function switchBlock(stream, state, f) {\n state.f = state.block = f;\n return f(stream, state);\n }\n\n function lineIsEmpty(line) {\n return !line || !/\\S/.test(line.string)\n }\n\n // Blocks\n\n function blankLine(state) {\n // Reset linkTitle state\n state.linkTitle = false;\n state.linkHref = false;\n state.linkText = false;\n // Reset EM state\n state.em = false;\n // Reset STRONG state\n state.strong = false;\n // Reset strikethrough state\n state.strikethrough = false;\n // Reset state.quote\n state.quote = 0;\n // Reset state.indentedCode\n state.indentedCode = false;\n if (state.f == htmlBlock) {\n var exit = htmlModeMissing\n if (!exit) {\n var inner = CodeMirror.innerMode(htmlMode, state.htmlState)\n exit = inner.mode.name == \"xml\" && inner.state.tagStart === null &&\n (!inner.state.context && inner.state.tokenize.isInText)\n }\n if (exit) {\n state.f = inlineNormal;\n state.block = blockNormal;\n state.htmlState = null;\n }\n }\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n // Mark this line as blank\n state.prevLine = state.thisLine\n state.thisLine = {stream: null}\n return null;\n }\n\n function blockNormal(stream, state) {\n var firstTokenOnLine = stream.column() === state.indentation;\n var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);\n var prevLineIsIndentedCode = state.indentedCode;\n var prevLineIsHr = state.prevLine.hr;\n var prevLineIsList = state.list !== false;\n var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;\n\n state.indentedCode = false;\n\n var lineIndentation = state.indentation;\n // compute once per line (on first token)\n if (state.indentationDiff === null) {\n state.indentationDiff = state.indentation;\n if (prevLineIsList) {\n state.list = null;\n // While this list item's marker's indentation is less than the deepest\n // list item's content's indentation,pop the deepest list item\n // indentation off the stack, and update block indentation state\n while (lineIndentation < state.listStack[state.listStack.length - 1]) {\n state.listStack.pop();\n if (state.listStack.length) {\n state.indentation = state.listStack[state.listStack.length - 1];\n // less than the first list's indent -> the line is no longer a list\n } else {\n state.list = false;\n }\n }\n if (state.list !== false) {\n state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]\n }\n }\n }\n\n // not comprehensive (currently only for setext detection purposes)\n var allowsInlineContinuation = (\n !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&\n (!prevLineIsList || !prevLineIsIndentedCode) &&\n !state.prevLine.fencedCodeEnd\n );\n\n var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&\n state.indentation <= maxNonCodeIndentation && stream.match(hrRE);\n\n var match = null;\n if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||\n state.prevLine.header || prevLineLineIsEmpty)) {\n stream.skipToEnd();\n state.indentedCode = true;\n return tokenTypes.code;\n } else if (stream.eatSpace()) {\n return null;\n } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {\n state.quote = 0;\n state.header = match[1].length;\n state.thisLine.header = true;\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n state.f = state.inline;\n return getType(state);\n } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {\n state.quote = firstTokenOnLine ? 1 : state.quote + 1;\n if (modeCfg.highlightFormatting) state.formatting = \"quote\";\n stream.eatSpace();\n return getType(state);\n } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {\n var listType = match[1] ? \"ol\" : \"ul\";\n\n state.indentation = lineIndentation + stream.current().length;\n state.list = true;\n state.quote = 0;\n\n // Add this list item's content's indentation to the stack\n state.listStack.push(state.indentation);\n // Reset inline styles which shouldn't propagate across list items\n state.em = false;\n state.strong = false;\n state.code = false;\n state.strikethrough = false;\n\n if (modeCfg.taskLists && stream.match(taskListRE, false)) {\n state.taskList = true;\n }\n state.f = state.inline;\n if (modeCfg.highlightFormatting) state.formatting = [\"list\", \"list-\" + listType];\n return getType(state);\n } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {\n state.quote = 0;\n state.fencedEndRE = new RegExp(match[1] + \"+ *$\");\n // try switching mode\n state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );\n if (state.localMode) state.localState = CodeMirror.startState(state.localMode);\n state.f = state.block = local;\n if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n state.code = -1\n return getType(state);\n // SETEXT has lowest block-scope precedence after HR, so check it after\n // the others (code, blockquote, list...)\n } else if (\n // if setext set, indicates line after ---/===\n state.setext || (\n // line before ---/===\n (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&\n !state.code && !isHr && !linkDefRE.test(stream.string) &&\n (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))\n )\n ) {\n if ( !state.setext ) {\n state.header = match[0].charAt(0) == '=' ? 1 : 2;\n state.setext = state.header;\n } else {\n state.header = state.setext;\n // has no effect on type so we can reset it now\n state.setext = 0;\n stream.skipToEnd();\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n }\n state.thisLine.header = true;\n state.f = state.inline;\n return getType(state);\n } else if (isHr) {\n stream.skipToEnd();\n state.hr = true;\n state.thisLine.hr = true;\n return tokenTypes.hr;\n } else if (stream.peek() === '[') {\n return switchInline(stream, state, footnoteLink);\n }\n\n return switchInline(stream, state, state.inline);\n }\n\n function htmlBlock(stream, state) {\n var style = htmlMode.token(stream, state.htmlState);\n if (!htmlModeMissing) {\n var inner = CodeMirror.innerMode(htmlMode, state.htmlState)\n if ((inner.mode.name == \"xml\" && inner.state.tagStart === null &&\n (!inner.state.context && inner.state.tokenize.isInText)) ||\n (state.md_inside && stream.current().indexOf(\">\") > -1)) {\n state.f = inlineNormal;\n state.block = blockNormal;\n state.htmlState = null;\n }\n }\n return style;\n }\n\n function local(stream, state) {\n var currListInd = state.listStack[state.listStack.length - 1] || 0;\n var hasExitedList = state.indentation < currListInd;\n var maxFencedEndInd = currListInd + 3;\n if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {\n if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n var returnType;\n if (!hasExitedList) returnType = getType(state)\n state.localMode = state.localState = null;\n state.block = blockNormal;\n state.f = inlineNormal;\n state.fencedEndRE = null;\n state.code = 0\n state.thisLine.fencedCodeEnd = true;\n if (hasExitedList) return switchBlock(stream, state, state.block);\n return returnType;\n } else if (state.localMode) {\n return state.localMode.token(stream, state.localState);\n } else {\n stream.skipToEnd();\n return tokenTypes.code;\n }\n }\n\n // Inline\n function getType(state) {\n var styles = [];\n\n if (state.formatting) {\n styles.push(tokenTypes.formatting);\n\n if (typeof state.formatting === \"string\") state.formatting = [state.formatting];\n\n for (var i = 0; i < state.formatting.length; i++) {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i]);\n\n if (state.formatting[i] === \"header\") {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.header);\n }\n\n // Add `formatting-quote` and `formatting-quote-#` for blockquotes\n // Add `error` instead if the maximum blockquote nesting depth is passed\n if (state.formatting[i] === \"quote\") {\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.quote);\n } else {\n styles.push(\"error\");\n }\n }\n }\n }\n\n if (state.taskOpen) {\n styles.push(\"meta\");\n return styles.length ? styles.join(' ') : null;\n }\n if (state.taskClosed) {\n styles.push(\"property\");\n return styles.length ? styles.join(' ') : null;\n }\n\n if (state.linkHref) {\n styles.push(tokenTypes.linkHref, \"url\");\n } else { // Only apply inline styles to non-url text\n if (state.strong) { styles.push(tokenTypes.strong); }\n if (state.em) { styles.push(tokenTypes.em); }\n if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }\n if (state.emoji) { styles.push(tokenTypes.emoji); }\n if (state.linkText) { styles.push(tokenTypes.linkText); }\n if (state.code) { styles.push(tokenTypes.code); }\n if (state.image) { styles.push(tokenTypes.image); }\n if (state.imageAltText) { styles.push(tokenTypes.imageAltText, \"link\"); }\n if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }\n }\n\n if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + \"-\" + state.header); }\n\n if (state.quote) {\n styles.push(tokenTypes.quote);\n\n // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.quote + \"-\" + state.quote);\n } else {\n styles.push(tokenTypes.quote + \"-\" + modeCfg.maxBlockquoteDepth);\n }\n }\n\n if (state.list !== false) {\n var listMod = (state.listStack.length - 1) % 3;\n if (!listMod) {\n styles.push(tokenTypes.list1);\n } else if (listMod === 1) {\n styles.push(tokenTypes.list2);\n } else {\n styles.push(tokenTypes.list3);\n }\n }\n\n if (state.trailingSpaceNewLine) {\n styles.push(\"trailing-space-new-line\");\n } else if (state.trailingSpace) {\n styles.push(\"trailing-space-\" + (state.trailingSpace % 2 ? \"a\" : \"b\"));\n }\n\n return styles.length ? styles.join(' ') : null;\n }\n\n function handleText(stream, state) {\n if (stream.match(textRE, true)) {\n return getType(state);\n }\n return undefined;\n }\n\n function inlineNormal(stream, state) {\n var style = state.text(stream, state);\n if (typeof style !== 'undefined')\n return style;\n\n if (state.list) { // List marker (*, +, -, 1., etc)\n state.list = null;\n return getType(state);\n }\n\n if (state.taskList) {\n var taskOpen = stream.match(taskListRE, true)[1] === \" \";\n if (taskOpen) state.taskOpen = true;\n else state.taskClosed = true;\n if (modeCfg.highlightFormatting) state.formatting = \"task\";\n state.taskList = false;\n return getType(state);\n }\n\n state.taskOpen = false;\n state.taskClosed = false;\n\n if (state.header && stream.match(/^#+$/, true)) {\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n return getType(state);\n }\n\n var ch = stream.next();\n\n // Matches link titles present on next line\n if (state.linkTitle) {\n state.linkTitle = false;\n var matchCh = ch;\n if (ch === '(') {\n matchCh = ')';\n }\n matchCh = (matchCh+'').replace(/([.?*+^\\[\\]\\\\(){}|-])/g, \"\\\\$1\");\n var regex = '^\\\\s*(?:[^' + matchCh + '\\\\\\\\]+|\\\\\\\\\\\\\\\\|\\\\\\\\.)' + matchCh;\n if (stream.match(new RegExp(regex), true)) {\n return tokenTypes.linkHref;\n }\n }\n\n // If this block is changed, it may need to be updated in GFM mode\n if (ch === '`') {\n var previousFormatting = state.formatting;\n if (modeCfg.highlightFormatting) state.formatting = \"code\";\n stream.eatWhile('`');\n var count = stream.current().length\n if (state.code == 0 && (!state.quote || count == 1)) {\n state.code = count\n return getType(state)\n } else if (count == state.code) { // Must be exact\n var t = getType(state)\n state.code = 0\n return t\n } else {\n state.formatting = previousFormatting\n return getType(state)\n }\n } else if (state.code) {\n return getType(state);\n }\n\n if (ch === '\\\\') {\n stream.next();\n if (modeCfg.highlightFormatting) {\n var type = getType(state);\n var formattingEscape = tokenTypes.formatting + \"-escape\";\n return type ? type + \" \" + formattingEscape : formattingEscape;\n }\n }\n\n if (ch === '!' && stream.match(/\\[[^\\]]*\\] ?(?:\\(|\\[)/, false)) {\n state.imageMarker = true;\n state.image = true;\n if (modeCfg.highlightFormatting) state.formatting = \"image\";\n return getType(state);\n }\n\n if (ch === '[' && state.imageMarker && stream.match(/[^\\]]*\\](\\(.*?\\)| ?\\[.*?\\])/, false)) {\n state.imageMarker = false;\n state.imageAltText = true\n if (modeCfg.highlightFormatting) state.formatting = \"image\";\n return getType(state);\n }\n\n if (ch === ']' && state.imageAltText) {\n if (modeCfg.highlightFormatting) state.formatting = \"image\";\n var type = getType(state);\n state.imageAltText = false;\n state.image = false;\n state.inline = state.f = linkHref;\n return type;\n }\n\n if (ch === '[' && !state.image) {\n if (state.linkText && stream.match(/^.*?\\]/)) return getType(state)\n state.linkText = true;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n return getType(state);\n }\n\n if (ch === ']' && state.linkText) {\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n state.linkText = false;\n state.inline = state.f = stream.match(/\\(.*?\\)| ?\\[.*?\\]/, false) ? linkHref : inlineNormal\n return type;\n }\n\n if (ch === '<' && stream.match(/^(https?|ftps?):\\/\\/(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkInline;\n }\n\n if (ch === '<' && stream.match(/^[^> \\\\]+@(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkEmail;\n }\n\n if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\\?|!\\[CDATA\\[|[a-z][a-z0-9-]*(?:\\s+[a-z_:.\\-]+(?:\\s*=\\s*[^>]+)?)*\\s*(?:>|$))/i, false)) {\n var end = stream.string.indexOf(\">\", stream.pos);\n if (end != -1) {\n var atts = stream.string.substring(stream.start, end);\n if (/markdown\\s*=\\s*('|\"){0,1}1('|\"){0,1}/.test(atts)) state.md_inside = true;\n }\n stream.backUp(1);\n state.htmlState = CodeMirror.startState(htmlMode);\n return switchBlock(stream, state, htmlBlock);\n }\n\n if (modeCfg.xml && ch === '<' && stream.match(/^\\/\\w*?>/)) {\n state.md_inside = false;\n return \"tag\";\n } else if (ch === \"*\" || ch === \"_\") {\n var len = 1, before = stream.pos == 1 ? \" \" : stream.string.charAt(stream.pos - 2)\n while (len < 3 && stream.eat(ch)) len++\n var after = stream.peek() || \" \"\n // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis\n var leftFlanking = !/\\s/.test(after) && (!punctuation.test(after) || /\\s/.test(before) || punctuation.test(before))\n var rightFlanking = !/\\s/.test(before) && (!punctuation.test(before) || /\\s/.test(after) || punctuation.test(after))\n var setEm = null, setStrong = null\n if (len % 2) { // Em\n if (!state.em && leftFlanking && (ch === \"*\" || !rightFlanking || punctuation.test(before)))\n setEm = true\n else if (state.em == ch && rightFlanking && (ch === \"*\" || !leftFlanking || punctuation.test(after)))\n setEm = false\n }\n if (len > 1) { // Strong\n if (!state.strong && leftFlanking && (ch === \"*\" || !rightFlanking || punctuation.test(before)))\n setStrong = true\n else if (state.strong == ch && rightFlanking && (ch === \"*\" || !leftFlanking || punctuation.test(after)))\n setStrong = false\n }\n if (setStrong != null || setEm != null) {\n if (modeCfg.highlightFormatting) state.formatting = setEm == null ? \"strong\" : setStrong == null ? \"em\" : \"strong em\"\n if (setEm === true) state.em = ch\n if (setStrong === true) state.strong = ch\n var t = getType(state)\n if (setEm === false) state.em = false\n if (setStrong === false) state.strong = false\n return t\n }\n } else if (ch === ' ') {\n if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces\n if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(1);\n }\n }\n }\n\n if (modeCfg.strikethrough) {\n if (ch === '~' && stream.eatWhile(ch)) {\n if (state.strikethrough) {// Remove strikethrough\n if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n var t = getType(state);\n state.strikethrough = false;\n return t;\n } else if (stream.match(/^[^\\s]/, false)) {// Add strikethrough\n state.strikethrough = true;\n if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n return getType(state);\n }\n } else if (ch === ' ') {\n if (stream.match('~~', true)) { // Probably surrounded by space\n if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(2);\n }\n }\n }\n }\n\n if (modeCfg.emoji && ch === \":\" && stream.match(/^(?:[a-z_\\d+][a-z_\\d+-]*|\\-[a-z_\\d+][a-z_\\d+-]*):/)) {\n state.emoji = true;\n if (modeCfg.highlightFormatting) state.formatting = \"emoji\";\n var retType = getType(state);\n state.emoji = false;\n return retType;\n }\n\n if (ch === ' ') {\n if (stream.match(/^ +$/, false)) {\n state.trailingSpace++;\n } else if (state.trailingSpace) {\n state.trailingSpaceNewLine = true;\n }\n }\n\n return getType(state);\n }\n\n function linkInline(stream, state) {\n var ch = stream.next();\n\n if (ch === \">\") {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkInline;\n }\n\n stream.match(/^[^>]+/, true);\n\n return tokenTypes.linkInline;\n }\n\n function linkHref(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n var ch = stream.next();\n if (ch === '(' || ch === '[') {\n state.f = state.inline = getLinkHrefInside(ch === \"(\" ? \")\" : \"]\");\n if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n state.linkHref = true;\n return getType(state);\n }\n return 'error';\n }\n\n var linkRE = {\n \")\": /^(?:[^\\\\\\(\\)]|\\\\.|\\((?:[^\\\\\\(\\)]|\\\\.)*\\))*?(?=\\))/,\n \"]\": /^(?:[^\\\\\\[\\]]|\\\\.|\\[(?:[^\\\\\\[\\]]|\\\\.)*\\])*?(?=\\])/\n }\n\n function getLinkHrefInside(endChar) {\n return function(stream, state) {\n var ch = stream.next();\n\n if (ch === endChar) {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n var returnState = getType(state);\n state.linkHref = false;\n return returnState;\n }\n\n stream.match(linkRE[endChar])\n state.linkHref = true;\n return getType(state);\n };\n }\n\n function footnoteLink(stream, state) {\n if (stream.match(/^([^\\]\\\\]|\\\\.)*\\]:/, false)) {\n state.f = footnoteLinkInside;\n stream.next(); // Consume [\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n state.linkText = true;\n return getType(state);\n }\n return switchInline(stream, state, inlineNormal);\n }\n\n function footnoteLinkInside(stream, state) {\n if (stream.match(']:', true)) {\n state.f = state.inline = footnoteUrl;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var returnType = getType(state);\n state.linkText = false;\n return returnType;\n }\n\n stream.match(/^([^\\]\\\\]|\\\\.)+/, true);\n\n return tokenTypes.linkText;\n }\n\n function footnoteUrl(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n // Match URL\n stream.match(/^[^\\s]+/, true);\n // Check for link title\n if (stream.peek() === undefined) { // End of line, set flag to check next line\n state.linkTitle = true;\n } else { // More content on line, check if link title\n stream.match(/^(?:\\s+(?:\"(?:[^\"\\\\]|\\\\.)+\"|'(?:[^'\\\\]|\\\\.)+'|\\((?:[^)\\\\]|\\\\.)+\\)))?/, true);\n }\n state.f = state.inline = inlineNormal;\n return tokenTypes.linkHref + \" url\";\n }\n\n var mode = {\n startState: function() {\n return {\n f: blockNormal,\n\n prevLine: {stream: null},\n thisLine: {stream: null},\n\n block: blockNormal,\n htmlState: null,\n indentation: 0,\n\n inline: inlineNormal,\n text: handleText,\n\n formatting: false,\n linkText: false,\n linkHref: false,\n linkTitle: false,\n code: 0,\n em: false,\n strong: false,\n header: 0,\n setext: 0,\n hr: false,\n taskList: false,\n list: false,\n listStack: [],\n quote: 0,\n trailingSpace: 0,\n trailingSpaceNewLine: false,\n strikethrough: false,\n emoji: false,\n fencedEndRE: null\n };\n },\n\n copyState: function(s) {\n return {\n f: s.f,\n\n prevLine: s.prevLine,\n thisLine: s.thisLine,\n\n block: s.block,\n htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),\n indentation: s.indentation,\n\n localMode: s.localMode,\n localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,\n\n inline: s.inline,\n text: s.text,\n formatting: false,\n linkText: s.linkText,\n linkTitle: s.linkTitle,\n linkHref: s.linkHref,\n code: s.code,\n em: s.em,\n strong: s.strong,\n strikethrough: s.strikethrough,\n emoji: s.emoji,\n header: s.header,\n setext: s.setext,\n hr: s.hr,\n taskList: s.taskList,\n list: s.list,\n listStack: s.listStack.slice(0),\n quote: s.quote,\n indentedCode: s.indentedCode,\n trailingSpace: s.trailingSpace,\n trailingSpaceNewLine: s.trailingSpaceNewLine,\n md_inside: s.md_inside,\n fencedEndRE: s.fencedEndRE\n };\n },\n\n token: function(stream, state) {\n\n // Reset state.formatting\n state.formatting = false;\n\n if (stream != state.thisLine.stream) {\n state.header = 0;\n state.hr = false;\n\n if (stream.match(/^\\s*$/, true)) {\n blankLine(state);\n return null;\n }\n\n state.prevLine = state.thisLine\n state.thisLine = {stream: stream}\n\n // Reset state.taskList\n state.taskList = false;\n\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n\n if (!state.localState) {\n state.f = state.block;\n if (state.f != htmlBlock) {\n var indentation = stream.match(/^\\s*/, true)[0].replace(/\\t/g, expandedTab).length;\n state.indentation = indentation;\n state.indentationDiff = null;\n if (indentation > 0) return null;\n }\n }\n }\n return state.f(stream, state);\n },\n\n innerMode: function(state) {\n if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};\n if (state.localState) return {state: state.localState, mode: state.localMode};\n return {state: state, mode: mode};\n },\n\n indent: function(state, textAfter, line) {\n if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)\n if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)\n return CodeMirror.Pass\n },\n\n blankLine: blankLine,\n\n getType: getType,\n\n blockCommentStart: \"<!--\",\n blockCommentEnd: \"-->\",\n closeBrackets: \"()[]{}''\\\"\\\"``\",\n fold: \"markdown\"\n };\n return mode;\n}, \"xml\");\n\nCodeMirror.defineMIME(\"text/markdown\", \"markdown\");\n\nCodeMirror.defineMIME(\"text/x-markdown\", \"markdown\");\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.modeInfo = [\n {name: \"APL\", mime: \"text/apl\", mode: \"apl\", ext: [\"dyalog\", \"apl\"]},\n {name: \"PGP\", mimes: [\"application/pgp\", \"application/pgp-encrypted\", \"application/pgp-keys\", \"application/pgp-signature\"], mode: \"asciiarmor\", ext: [\"asc\", \"pgp\", \"sig\"]},\n {name: \"ASN.1\", mime: \"text/x-ttcn-asn\", mode: \"asn.1\", ext: [\"asn\", \"asn1\"]},\n {name: \"Asterisk\", mime: \"text/x-asterisk\", mode: \"asterisk\", file: /^extensions\\.conf$/i},\n {name: \"Brainfuck\", mime: \"text/x-brainfuck\", mode: \"brainfuck\", ext: [\"b\", \"bf\"]},\n {name: \"C\", mime: \"text/x-csrc\", mode: \"clike\", ext: [\"c\", \"h\", \"ino\"]},\n {name: \"C++\", mime: \"text/x-c++src\", mode: \"clike\", ext: [\"cpp\", \"c++\", \"cc\", \"cxx\", \"hpp\", \"h++\", \"hh\", \"hxx\"], alias: [\"cpp\"]},\n {name: \"Cobol\", mime: \"text/x-cobol\", mode: \"cobol\", ext: [\"cob\", \"cpy\"]},\n {name: \"C#\", mime: \"text/x-csharp\", mode: \"clike\", ext: [\"cs\"], alias: [\"csharp\", \"cs\"]},\n {name: \"Clojure\", mime: \"text/x-clojure\", mode: \"clojure\", ext: [\"clj\", \"cljc\", \"cljx\"]},\n {name: \"ClojureScript\", mime: \"text/x-clojurescript\", mode: \"clojure\", ext: [\"cljs\"]},\n {name: \"Closure Stylesheets (GSS)\", mime: \"text/x-gss\", mode: \"css\", ext: [\"gss\"]},\n {name: \"CMake\", mime: \"text/x-cmake\", mode: \"cmake\", ext: [\"cmake\", \"cmake.in\"], file: /^CMakeLists\\.txt$/},\n {name: \"CoffeeScript\", mimes: [\"application/vnd.coffeescript\", \"text/coffeescript\", \"text/x-coffeescript\"], mode: \"coffeescript\", ext: [\"coffee\"], alias: [\"coffee\", \"coffee-script\"]},\n {name: \"Common Lisp\", mime: \"text/x-common-lisp\", mode: \"commonlisp\", ext: [\"cl\", \"lisp\", \"el\"], alias: [\"lisp\"]},\n {name: \"Cypher\", mime: \"application/x-cypher-query\", mode: \"cypher\", ext: [\"cyp\", \"cypher\"]},\n {name: \"Cython\", mime: \"text/x-cython\", mode: \"python\", ext: [\"pyx\", \"pxd\", \"pxi\"]},\n {name: \"Crystal\", mime: \"text/x-crystal\", mode: \"crystal\", ext: [\"cr\"]},\n {name: \"CSS\", mime: \"text/css\", mode: \"css\", ext: [\"css\"]},\n {name: \"CQL\", mime: \"text/x-cassandra\", mode: \"sql\", ext: [\"cql\"]},\n {name: \"D\", mime: \"text/x-d\", mode: \"d\", ext: [\"d\"]},\n {name: \"Dart\", mimes: [\"application/dart\", \"text/x-dart\"], mode: \"dart\", ext: [\"dart\"]},\n {name: \"diff\", mime: \"text/x-diff\", mode: \"diff\", ext: [\"diff\", \"patch\"]},\n {name: \"Django\", mime: \"text/x-django\", mode: \"django\"},\n {name: \"Dockerfile\", mime: \"text/x-dockerfile\", mode: \"dockerfile\", file: /^Dockerfile$/},\n {name: \"DTD\", mime: \"application/xml-dtd\", mode: \"dtd\", ext: [\"dtd\"]},\n {name: \"Dylan\", mime: \"text/x-dylan\", mode: \"dylan\", ext: [\"dylan\", \"dyl\", \"intr\"]},\n {name: \"EBNF\", mime: \"text/x-ebnf\", mode: \"ebnf\"},\n {name: \"ECL\", mime: \"text/x-ecl\", mode: \"ecl\", ext: [\"ecl\"]},\n {name: \"edn\", mime: \"application/edn\", mode: \"clojure\", ext: [\"edn\"]},\n {name: \"Eiffel\", mime: \"text/x-eiffel\", mode: \"eiffel\", ext: [\"e\"]},\n {name: \"Elm\", mime: \"text/x-elm\", mode: \"elm\", ext: [\"elm\"]},\n {name: \"Embedded JavaScript\", mime: \"application/x-ejs\", mode: \"htmlembedded\", ext: [\"ejs\"]},\n {name: \"Embedded Ruby\", mime: \"application/x-erb\", mode: \"htmlembedded\", ext: [\"erb\"]},\n {name: \"Erlang\", mime: \"text/x-erlang\", mode: \"erlang\", ext: [\"erl\"]},\n {name: \"Esper\", mime: \"text/x-esper\", mode: \"sql\"},\n {name: \"Factor\", mime: \"text/x-factor\", mode: \"factor\", ext: [\"factor\"]},\n {name: \"FCL\", mime: \"text/x-fcl\", mode: \"fcl\"},\n {name: \"Forth\", mime: \"text/x-forth\", mode: \"forth\", ext: [\"forth\", \"fth\", \"4th\"]},\n {name: \"Fortran\", mime: \"text/x-fortran\", mode: \"fortran\", ext: [\"f\", \"for\", \"f77\", \"f90\", \"f95\"]},\n {name: \"F#\", mime: \"text/x-fsharp\", mode: \"mllike\", ext: [\"fs\"], alias: [\"fsharp\"]},\n {name: \"Gas\", mime: \"text/x-gas\", mode: \"gas\", ext: [\"s\"]},\n {name: \"Gherkin\", mime: \"text/x-feature\", mode: \"gherkin\", ext: [\"feature\"]},\n {name: \"GitHub Flavored Markdown\", mime: \"text/x-gfm\", mode: \"gfm\", file: /^(readme|contributing|history)\\.md$/i},\n {name: \"Go\", mime: \"text/x-go\", mode: \"go\", ext: [\"go\"]},\n {name: \"Groovy\", mime: \"text/x-groovy\", mode: \"groovy\", ext: [\"groovy\", \"gradle\"], file: /^Jenkinsfile$/},\n {name: \"HAML\", mime: \"text/x-haml\", mode: \"haml\", ext: [\"haml\"]},\n {name: \"Haskell\", mime: \"text/x-haskell\", mode: \"haskell\", ext: [\"hs\"]},\n {name: \"Haskell (Literate)\", mime: \"text/x-literate-haskell\", mode: \"haskell-literate\", ext: [\"lhs\"]},\n {name: \"Haxe\", mime: \"text/x-haxe\", mode: \"haxe\", ext: [\"hx\"]},\n {name: \"HXML\", mime: \"text/x-hxml\", mode: \"haxe\", ext: [\"hxml\"]},\n {name: \"ASP.NET\", mime: \"application/x-aspx\", mode: \"htmlembedded\", ext: [\"aspx\"], alias: [\"asp\", \"aspx\"]},\n {name: \"HTML\", mime: \"text/html\", mode: \"htmlmixed\", ext: [\"html\", \"htm\", \"handlebars\", \"hbs\"], alias: [\"xhtml\"]},\n {name: \"HTTP\", mime: \"message/http\", mode: \"http\"},\n {name: \"IDL\", mime: \"text/x-idl\", mode: \"idl\", ext: [\"pro\"]},\n {name: \"Pug\", mime: \"text/x-pug\", mode: \"pug\", ext: [\"jade\", \"pug\"], alias: [\"jade\"]},\n {name: \"Java\", mime: \"text/x-java\", mode: \"clike\", ext: [\"java\"]},\n {name: \"Java Server Pages\", mime: \"application/x-jsp\", mode: \"htmlembedded\", ext: [\"jsp\"], alias: [\"jsp\"]},\n {name: \"JavaScript\", mimes: [\"text/javascript\", \"text/ecmascript\", \"application/javascript\", \"application/x-javascript\", \"application/ecmascript\"],\n mode: \"javascript\", ext: [\"js\"], alias: [\"ecmascript\", \"js\", \"node\"]},\n {name: \"JSON\", mimes: [\"application/json\", \"application/x-json\"], mode: \"javascript\", ext: [\"json\", \"map\"], alias: [\"json5\"]},\n {name: \"JSON-LD\", mime: \"application/ld+json\", mode: \"javascript\", ext: [\"jsonld\"], alias: [\"jsonld\"]},\n {name: \"JSX\", mime: \"text/jsx\", mode: \"jsx\", ext: [\"jsx\"]},\n {name: \"Jinja2\", mime: \"text/jinja2\", mode: \"jinja2\", ext: [\"j2\", \"jinja\", \"jinja2\"]},\n {name: \"Julia\", mime: \"text/x-julia\", mode: \"julia\", ext: [\"jl\"]},\n {name: \"Kotlin\", mime: \"text/x-kotlin\", mode: \"clike\", ext: [\"kt\"]},\n {name: \"LESS\", mime: \"text/x-less\", mode: \"css\", ext: [\"less\"]},\n {name: \"LiveScript\", mime: \"text/x-livescript\", mode: \"livescript\", ext: [\"ls\"], alias: [\"ls\"]},\n {name: \"Lua\", mime: \"text/x-lua\", mode: \"lua\", ext: [\"lua\"]},\n {name: \"Markdown\", mime: \"text/x-markdown\", mode: \"markdown\", ext: [\"markdown\", \"md\", \"mkd\"]},\n {name: \"mIRC\", mime: \"text/mirc\", mode: \"mirc\"},\n {name: \"MariaDB SQL\", mime: \"text/x-mariadb\", mode: \"sql\"},\n {name: \"Mathematica\", mime: \"text/x-mathematica\", mode: \"mathematica\", ext: [\"m\", \"nb\", \"wl\", \"wls\"]},\n {name: \"Modelica\", mime: \"text/x-modelica\", mode: \"modelica\", ext: [\"mo\"]},\n {name: \"MUMPS\", mime: \"text/x-mumps\", mode: \"mumps\", ext: [\"mps\"]},\n {name: \"MS SQL\", mime: \"text/x-mssql\", mode: \"sql\"},\n {name: \"mbox\", mime: \"application/mbox\", mode: \"mbox\", ext: [\"mbox\"]},\n {name: \"MySQL\", mime: \"text/x-mysql\", mode: \"sql\"},\n {name: \"Nginx\", mime: \"text/x-nginx-conf\", mode: \"nginx\", file: /nginx.*\\.conf$/i},\n {name: \"NSIS\", mime: \"text/x-nsis\", mode: \"nsis\", ext: [\"nsh\", \"nsi\"]},\n {name: \"NTriples\", mimes: [\"application/n-triples\", \"application/n-quads\", \"text/n-triples\"],\n mode: \"ntriples\", ext: [\"nt\", \"nq\"]},\n {name: \"Objective-C\", mime: \"text/x-objectivec\", mode: \"clike\", ext: [\"m\"], alias: [\"objective-c\", \"objc\"]},\n {name: \"Objective-C++\", mime: \"text/x-objectivec++\", mode: \"clike\", ext: [\"mm\"], alias: [\"objective-c++\", \"objc++\"]},\n {name: \"OCaml\", mime: \"text/x-ocaml\", mode: \"mllike\", ext: [\"ml\", \"mli\", \"mll\", \"mly\"]},\n {name: \"Octave\", mime: \"text/x-octave\", mode: \"octave\", ext: [\"m\"]},\n {name: \"Oz\", mime: \"text/x-oz\", mode: \"oz\", ext: [\"oz\"]},\n {name: \"Pascal\", mime: \"text/x-pascal\", mode: \"pascal\", ext: [\"p\", \"pas\"]},\n {name: \"PEG.js\", mime: \"null\", mode: \"pegjs\", ext: [\"jsonld\"]},\n {name: \"Perl\", mime: \"text/x-perl\", mode: \"perl\", ext: [\"pl\", \"pm\"]},\n {name: \"PHP\", mimes: [\"text/x-php\", \"application/x-httpd-php\", \"application/x-httpd-php-open\"], mode: \"php\", ext: [\"php\", \"php3\", \"php4\", \"php5\", \"php7\", \"phtml\"]},\n {name: \"Pig\", mime: \"text/x-pig\", mode: \"pig\", ext: [\"pig\"]},\n {name: \"Plain Text\", mime: \"text/plain\", mode: \"null\", ext: [\"txt\", \"text\", \"conf\", \"def\", \"list\", \"log\"]},\n {name: \"PLSQL\", mime: \"text/x-plsql\", mode: \"sql\", ext: [\"pls\"]},\n {name: \"PostgreSQL\", mime: \"text/x-pgsql\", mode: \"sql\"},\n {name: \"PowerShell\", mime: \"application/x-powershell\", mode: \"powershell\", ext: [\"ps1\", \"psd1\", \"psm1\"]},\n {name: \"Properties files\", mime: \"text/x-properties\", mode: \"properties\", ext: [\"properties\", \"ini\", \"in\"], alias: [\"ini\", \"properties\"]},\n {name: \"ProtoBuf\", mime: \"text/x-protobuf\", mode: \"protobuf\", ext: [\"proto\"]},\n {name: \"Python\", mime: \"text/x-python\", mode: \"python\", ext: [\"BUILD\", \"bzl\", \"py\", \"pyw\"], file: /^(BUCK|BUILD)$/},\n {name: \"Puppet\", mime: \"text/x-puppet\", mode: \"puppet\", ext: [\"pp\"]},\n {name: \"Q\", mime: \"text/x-q\", mode: \"q\", ext: [\"q\"]},\n {name: \"R\", mime: \"text/x-rsrc\", mode: \"r\", ext: [\"r\", \"R\"], alias: [\"rscript\"]},\n {name: \"reStructuredText\", mime: \"text/x-rst\", mode: \"rst\", ext: [\"rst\"], alias: [\"rst\"]},\n {name: \"RPM Changes\", mime: \"text/x-rpm-changes\", mode: \"rpm\"},\n {name: \"RPM Spec\", mime: \"text/x-rpm-spec\", mode: \"rpm\", ext: [\"spec\"]},\n {name: \"Ruby\", mime: \"text/x-ruby\", mode: \"ruby\", ext: [\"rb\"], alias: [\"jruby\", \"macruby\", \"rake\", \"rb\", \"rbx\"]},\n {name: \"Rust\", mime: \"text/x-rustsrc\", mode: \"rust\", ext: [\"rs\"]},\n {name: \"SAS\", mime: \"text/x-sas\", mode: \"sas\", ext: [\"sas\"]},\n {name: \"Sass\", mime: \"text/x-sass\", mode: \"sass\", ext: [\"sass\"]},\n {name: \"Scala\", mime: \"text/x-scala\", mode: \"clike\", ext: [\"scala\"]},\n {name: \"Scheme\", mime: \"text/x-scheme\", mode: \"scheme\", ext: [\"scm\", \"ss\"]},\n {name: \"SCSS\", mime: \"text/x-scss\", mode: \"css\", ext: [\"scss\"]},\n {name: \"Shell\", mimes: [\"text/x-sh\", \"application/x-sh\"], mode: \"shell\", ext: [\"sh\", \"ksh\", \"bash\"], alias: [\"bash\", \"sh\", \"zsh\"], file: /^PKGBUILD$/},\n {name: \"Sieve\", mime: \"application/sieve\", mode: \"sieve\", ext: [\"siv\", \"sieve\"]},\n {name: \"Slim\", mimes: [\"text/x-slim\", \"application/x-slim\"], mode: \"slim\", ext: [\"slim\"]},\n {name: \"Smalltalk\", mime: \"text/x-stsrc\", mode: \"smalltalk\", ext: [\"st\"]},\n {name: \"Smarty\", mime: \"text/x-smarty\", mode: \"smarty\", ext: [\"tpl\"]},\n {name: \"Solr\", mime: \"text/x-solr\", mode: \"solr\"},\n {name: \"SML\", mime: \"text/x-sml\", mode: \"mllike\", ext: [\"sml\", \"sig\", \"fun\", \"smackspec\"]},\n {name: \"Soy\", mime: \"text/x-soy\", mode: \"soy\", ext: [\"soy\"], alias: [\"closure template\"]},\n {name: \"SPARQL\", mime: \"application/sparql-query\", mode: \"sparql\", ext: [\"rq\", \"sparql\"], alias: [\"sparul\"]},\n {name: \"Spreadsheet\", mime: \"text/x-spreadsheet\", mode: \"spreadsheet\", alias: [\"excel\", \"formula\"]},\n {name: \"SQL\", mime: \"text/x-sql\", mode: \"sql\", ext: [\"sql\"]},\n {name: \"SQLite\", mime: \"text/x-sqlite\", mode: \"sql\"},\n {name: \"Squirrel\", mime: \"text/x-squirrel\", mode: \"clike\", ext: [\"nut\"]},\n {name: \"Stylus\", mime: \"text/x-styl\", mode: \"stylus\", ext: [\"styl\"]},\n {name: \"Swift\", mime: \"text/x-swift\", mode: \"swift\", ext: [\"swift\"]},\n {name: \"sTeX\", mime: \"text/x-stex\", mode: \"stex\"},\n {name: \"LaTeX\", mime: \"text/x-latex\", mode: \"stex\", ext: [\"text\", \"ltx\", \"tex\"], alias: [\"tex\"]},\n {name: \"SystemVerilog\", mime: \"text/x-systemverilog\", mode: \"verilog\", ext: [\"v\", \"sv\", \"svh\"]},\n {name: \"Tcl\", mime: \"text/x-tcl\", mode: \"tcl\", ext: [\"tcl\"]},\n {name: \"Textile\", mime: \"text/x-textile\", mode: \"textile\", ext: [\"textile\"]},\n {name: \"TiddlyWiki\", mime: \"text/x-tiddlywiki\", mode: \"tiddlywiki\"},\n {name: \"Tiki wiki\", mime: \"text/tiki\", mode: \"tiki\"},\n {name: \"TOML\", mime: \"text/x-toml\", mode: \"toml\", ext: [\"toml\"]},\n {name: \"Tornado\", mime: \"text/x-tornado\", mode: \"tornado\"},\n {name: \"troff\", mime: \"text/troff\", mode: \"troff\", ext: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"]},\n {name: \"TTCN\", mime: \"text/x-ttcn\", mode: \"ttcn\", ext: [\"ttcn\", \"ttcn3\", \"ttcnpp\"]},\n {name: \"TTCN_CFG\", mime: \"text/x-ttcn-cfg\", mode: \"ttcn-cfg\", ext: [\"cfg\"]},\n {name: \"Turtle\", mime: \"text/turtle\", mode: \"turtle\", ext: [\"ttl\"]},\n {name: \"TypeScript\", mime: \"application/typescript\", mode: \"javascript\", ext: [\"ts\"], alias: [\"ts\"]},\n {name: \"TypeScript-JSX\", mime: \"text/typescript-jsx\", mode: \"jsx\", ext: [\"tsx\"], alias: [\"tsx\"]},\n {name: \"Twig\", mime: \"text/x-twig\", mode: \"twig\"},\n {name: \"Web IDL\", mime: \"text/x-webidl\", mode: \"webidl\", ext: [\"webidl\"]},\n {name: \"VB.NET\", mime: \"text/x-vb\", mode: \"vb\", ext: [\"vb\"]},\n {name: \"VBScript\", mime: \"text/vbscript\", mode: \"vbscript\", ext: [\"vbs\"]},\n {name: \"Velocity\", mime: \"text/velocity\", mode: \"velocity\", ext: [\"vtl\"]},\n {name: \"Verilog\", mime: \"text/x-verilog\", mode: \"verilog\", ext: [\"v\"]},\n {name: \"VHDL\", mime: \"text/x-vhdl\", mode: \"vhdl\", ext: [\"vhd\", \"vhdl\"]},\n {name: \"Vue.js Component\", mimes: [\"script/x-vue\", \"text/x-vue\"], mode: \"vue\", ext: [\"vue\"]},\n {name: \"XML\", mimes: [\"application/xml\", \"text/xml\"], mode: \"xml\", ext: [\"xml\", \"xsl\", \"xsd\", \"svg\"], alias: [\"rss\", \"wsdl\", \"xsd\"]},\n {name: \"XQuery\", mime: \"application/xquery\", mode: \"xquery\", ext: [\"xy\", \"xquery\"]},\n {name: \"Yacas\", mime: \"text/x-yacas\", mode: \"yacas\", ext: [\"ys\"]},\n {name: \"YAML\", mimes: [\"text/x-yaml\", \"text/yaml\"], mode: \"yaml\", ext: [\"yaml\", \"yml\"], alias: [\"yml\"]},\n {name: \"Z80\", mime: \"text/x-z80\", mode: \"z80\", ext: [\"z80\"]},\n {name: \"mscgen\", mime: \"text/x-mscgen\", mode: \"mscgen\", ext: [\"mscgen\", \"mscin\", \"msc\"]},\n {name: \"xu\", mime: \"text/x-xu\", mode: \"mscgen\", ext: [\"xu\"]},\n {name: \"msgenny\", mime: \"text/x-msgenny\", mode: \"mscgen\", ext: [\"msgenny\"]},\n {name: \"WebAssembly\", mime: \"text/webassembly\", mode: \"wast\", ext: [\"wat\", \"wast\"]},\n ];\n // Ensure all modes have a mime property for backwards compatibility\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mimes) info.mime = info.mimes[0];\n }\n\n CodeMirror.findModeByMIME = function(mime) {\n mime = mime.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mime == mime) return info;\n if (info.mimes) for (var j = 0; j < info.mimes.length; j++)\n if (info.mimes[j] == mime) return info;\n }\n if (/\\+xml$/.test(mime)) return CodeMirror.findModeByMIME(\"application/xml\")\n if (/\\+json$/.test(mime)) return CodeMirror.findModeByMIME(\"application/json\")\n };\n\n CodeMirror.findModeByExtension = function(ext) {\n ext = ext.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.ext) for (var j = 0; j < info.ext.length; j++)\n if (info.ext[j] == ext) return info;\n }\n };\n\n CodeMirror.findModeByFileName = function(filename) {\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.file && info.file.test(filename)) return info;\n }\n var dot = filename.lastIndexOf(\".\");\n var ext = dot > -1 && filename.substring(dot + 1, filename.length);\n if (ext) return CodeMirror.findModeByExtension(ext);\n };\n\n CodeMirror.findModeByName = function(name) {\n name = name.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.name.toLowerCase() == name) return info;\n if (info.alias) for (var j = 0; j < info.alias.length; j++)\n if (info.alias[j].toLowerCase() == name) return info;\n }\n };\n});\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { css } from 'glamor';\n\nvar Alert = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(Alert, _React$PureComponent);\n\n var _super = _createSuper(Alert);\n\n function Alert(props) {\n var _this;\n\n _classCallCheck(this, Alert);\n\n _this = _super.call(this, props);\n _this.containerStyle = css({\n borderRadius: '3px',\n backgroundColor: '#fff',\n padding: '10px 16px',\n display: 'flex',\n boxSizing: 'border-box',\n boxShadow: 'rgba(67, 90, 111, 0.3) 0px 0px 1px, rgba(67, 90, 111, 0.47) 0px 8px 10px -4px',\n justifyContent: 'space-between',\n flexDirection: 'row'\n });\n _this.containerBorderSuccess = css({\n borderLeft: '3px solid rgb(71, 184, 129)'\n });\n _this.containerBorderWarn = css({\n borderLeft: '3px solid rgb(217, 130, 43)'\n });\n _this.containerBorderDanger = css({\n borderLeft: '3px solid rgb(236, 76, 71)'\n });\n _this.containerBorderNotify = css({\n borderLeft: '3px solid rgb(16, 112, 202)'\n });\n _this.toastTextTitle = css({\n fontWeight: '600',\n fontSize: '14px',\n color: '#435a6f',\n margin: '0'\n });\n _this.toastTextChild = css({\n fontSize: '14px',\n color: '#999',\n margin: '0'\n });\n _this.toastClose = css({\n marginLeft: '15px',\n height: '24px',\n width: '24px',\n lineHeight: '22px',\n fontWeight: '700',\n textAlign: 'center',\n fontSize: '20px',\n color: '#000',\n cursor: 'pointer',\n opacity: '0.5',\n ':hover': {\n opacity: 1\n }\n });\n _this.toastIcon = css({\n marginRight: '10px',\n width: '14px',\n height: '20px',\n lineHeight: '20px'\n });\n return _this;\n }\n\n _createClass(Alert, [{\n key: \"getContainerStyle\",\n value: function getContainerStyle(intent) {\n switch (intent) {\n case 'success':\n return {\n borderStyle: this.containerBorderSuccess,\n iconColor: css({\n color: 'rgb(71, 184, 129)'\n }),\n iconClass: 'iconfont icon-check-circle'\n };\n\n case 'warning':\n return {\n borderStyle: this.containerBorderWarn,\n iconColor: css({\n color: 'rgb(217, 130, 43)'\n }),\n iconClass: 'iconfont icon-exclamation-triangle'\n };\n\n case 'none':\n return {\n borderStyle: this.containerBorderNotify,\n iconColor: css({\n color: 'rgb(16, 112, 202)'\n }),\n iconClass: 'iconfont icon-exclamation-circle'\n };\n\n case 'danger':\n return {\n borderStyle: this.containerBorderDanger,\n iconColor: css({\n color: 'rgb(236, 76, 71)'\n }),\n iconClass: 'iconfont icon-exclamation-circle'\n };\n\n default:\n return {\n borderStyle: this.containerBorderNotify,\n iconColor: css({\n color: 'rgb(16, 112, 202)'\n }),\n iconClass: 'iconfont icon-exclamation-circle'\n };\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var toastStyle = this.getContainerStyle(this.props.intent);\n return /*#__PURE__*/React.createElement(\"div\", css(toastStyle.borderStyle, this.containerStyle), /*#__PURE__*/React.createElement(\"div\", {\n className: this.toastIcon\n }, /*#__PURE__*/React.createElement(\"i\", Object.assign({\n className: toastStyle.iconClass\n }, toastStyle.iconColor))), /*#__PURE__*/React.createElement(\"div\", {\n className: this.toastTextContainer\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: this.toastTextTitle\n }, this.props.title), this.props.children ? /*#__PURE__*/React.createElement(\"p\", {\n className: this.toastTextChild\n }, this.props.children) : null), /*#__PURE__*/React.createElement(\"div\", {\n onClick: this.props.onRemove,\n className: this.toastClose\n }, /*#__PURE__*/React.createElement(\"span\", null, \"\\xD7\")));\n }\n }]);\n\n return Alert;\n}(React.PureComponent);\n\nexport default Alert;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { css } from 'glamor';\nimport Transition from 'react-transition-group/Transition';\nimport Alert from './alert';\nvar animationEasing = {\n deceleration: 'cubic-bezier(0.0, 0.0, 0.2, 1)',\n acceleration: 'cubic-bezier(0.4, 0.0, 1, 1)',\n spring: 'cubic-bezier(0.175, 0.885, 0.320, 1.175)'\n};\nvar ANIMATION_DURATION = 240;\nvar openAnimation = css.keyframes('openAnimation', {\n from: {\n opacity: 0,\n transform: 'translateY(-120%)'\n },\n to: {\n transform: 'translateY(0)'\n }\n});\nvar closeAnimation = css.keyframes('closeAnimation', {\n from: {\n transform: 'scale(1)',\n opacity: 1\n },\n to: {\n transform: 'scale(0.9)',\n opacity: 0\n }\n});\nvar animationStyles = css({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n height: 0,\n transition: \"all \".concat(ANIMATION_DURATION, \"ms \").concat(animationEasing.deceleration),\n '&[data-state=\"entering\"], &[data-state=\"entered\"]': {\n animation: \"\".concat(openAnimation, \" \").concat(ANIMATION_DURATION, \"ms \").concat(animationEasing.spring, \" both\")\n },\n '&[data-state=\"exiting\"]': {\n animation: \"\".concat(closeAnimation, \" 120ms \").concat(animationEasing.acceleration, \" both\")\n }\n});\n\nvar Toast = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(Toast, _React$PureComponent);\n\n var _super = _createSuper(Toast);\n\n function Toast() {\n var _this;\n\n _classCallCheck(this, Toast);\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 isShown: true,\n height: 0\n };\n\n _this.close = function () {\n _this.clearCloseTimer();\n\n _this.setState({\n isShown: false\n });\n };\n\n _this.startCloseTimer = function () {\n if (_this.props.duration) {\n _this.closeTimer = setTimeout(function () {\n _this.close();\n }, _this.props.duration * 1000);\n }\n };\n\n _this.clearCloseTimer = function () {\n if (_this.closeTimer) {\n clearTimeout(_this.closeTimer);\n _this.closeTimer = null;\n }\n };\n\n _this.handleMouseEnter = function () {\n _this.clearCloseTimer();\n };\n\n _this.handleMouseLeave = function () {\n _this.startCloseTimer();\n };\n\n _this.onRef = function (ref) {\n if (ref === null) return;\n\n var _ref$getBoundingClien = ref.getBoundingClientRect(),\n height = _ref$getBoundingClien.height;\n\n _this.setState({\n height: height\n });\n };\n\n return _this;\n }\n\n _createClass(Toast, [{\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.isShown !== this.props.isShown) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n isShown: this.props.isShown\n });\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.startCloseTimer();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearCloseTimer();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(Transition, {\n appear: true,\n unmountOnExit: true,\n timeout: ANIMATION_DURATION,\n in: this.state.isShown,\n onExited: this.props.onRemove\n }, function (state) {\n return /*#__PURE__*/React.createElement(\"div\", {\n \"data-state\": state,\n className: animationStyles,\n onMouseEnter: _this2.handleMouseEnter,\n onMouseLeave: _this2.handleMouseLeave,\n style: {\n height: _this2.state.height,\n zIndex: _this2.props.zIndex,\n marginBottom: _this2.state.isShown ? 0 : -_this2.state.height\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: _this2.onRef,\n style: {\n padding: 8\n }\n }, /*#__PURE__*/React.createElement(Alert, {\n intent: _this2.props.intent,\n title: _this2.props.title,\n children: _this2.props.children,\n isRemoveable: _this2.props.hasCloseButton,\n onRemove: function onRemove() {\n return _this2.close();\n }\n })));\n });\n }\n }]);\n\n return Toast;\n}(React.PureComponent);\n\nToast.defaultProps = {\n intent: 'none'\n};\nexport { Toast as default };","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _createForOfIteratorHelper from \"@babel/runtime/helpers/esm/createForOfIteratorHelper\";\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 _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nimport { css } from 'glamor';\nimport Toast from './toast';\nvar wrapperClass = css({\n maxWidth: 560,\n margin: '0 auto',\n top: 0,\n left: 0,\n right: 0,\n position: 'fixed',\n zIndex: 30\n});\n\nvar hasCustomId = function hasCustomId(settings) {\n return Object.hasOwnProperty.call(settings, 'id');\n};\n\nvar ToastManager = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(ToastManager, _React$PureComponent);\n\n var _super = _createSuper(ToastManager);\n\n function ToastManager(props, context) {\n var _this;\n\n _classCallCheck(this, ToastManager);\n\n _this = _super.call(this, props, context);\n\n _this.getToasts = function () {\n return _this.state.toasts;\n };\n\n _this.closeAll = function () {\n _this.getToasts().forEach(function (toast) {\n return toast.close();\n });\n };\n\n _this.notify = function (title, settings) {\n // If there's a custom toast ID passed, close existing toasts with the same custom ID\n if (hasCustomId(settings)) {\n var _iterator = _createForOfIteratorHelper(_this.state.toasts),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var toast = _step.value;\n\n // Since unique ID is still appended to a custom ID, skip the unique ID and check only prefix\n if (String(toast.id).startsWith(settings.id)) {\n _this.closeToast(toast.id);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n\n var instance = _this.createToastInstance(title, settings);\n\n _this.setState(function (previousState) {\n return {\n toasts: [instance].concat(_toConsumableArray(previousState.toasts))\n };\n });\n\n return instance;\n };\n\n _this.createToastInstance = function (title, settings) {\n var uniqueId = ++ToastManager.idCounter;\n var id = hasCustomId(settings) ? \"\".concat(settings.id, \"-\").concat(uniqueId) : uniqueId;\n return {\n id: id,\n title: title,\n description: settings.description,\n hasCloseButton: settings.hasCloseButton || true,\n duration: settings.duration || 2,\n close: function close() {\n return _this.closeToast(id);\n },\n intent: settings.intent\n };\n };\n\n _this.closeToast = function (id) {\n _this.setState(function (previousState) {\n return {\n toasts: previousState.toasts.map(function (toast) {\n if (toast.id === id) {\n return _objectSpread(_objectSpread({}, toast), {}, {\n isShown: false\n });\n }\n\n return toast;\n })\n };\n });\n };\n\n _this.removeToast = function (id) {\n _this.setState(function (previousState) {\n return {\n toasts: previousState.toasts.filter(function (toast) {\n return toast.id !== id;\n })\n };\n });\n };\n\n props.bindNotify(_this.notify);\n props.bindGetToasts(_this.getToasts);\n props.bindCloseAll(_this.closeAll);\n _this.state = {\n toasts: []\n };\n return _this;\n }\n\n _createClass(ToastManager, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(\"span\", {\n className: wrapperClass\n }, this.state.toasts.map(function (_ref) {\n var id = _ref.id,\n description = _ref.description,\n props = _objectWithoutProperties(_ref, [\"id\", \"description\"]);\n\n return /*#__PURE__*/React.createElement(Toast, Object.assign({\n key: id,\n onRemove: function onRemove() {\n return _this2.removeToast(id);\n }\n }, props), description);\n }));\n }\n }]);\n\n return ToastManager;\n}(React.PureComponent);\n\nToastManager.idCounter = 0;\nexport { ToastManager as default };","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport ToastManager from './toastManager';\nvar isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\n/**\n * The Toaster manages the interactionsb between\n * the ToasterManger and the toast API.\n */\n\nvar Toaster = function Toaster() {\n var _this = this;\n\n _classCallCheck(this, Toaster);\n\n this._bindNotify = function (handler) {\n _this.notifyHandler = handler;\n };\n\n this._bindGetToasts = function (handler) {\n _this.getToastsHandler = handler;\n };\n\n this._bindCloseAll = function (handler) {\n _this.closeAllHandler = handler;\n };\n\n this.getToasts = function () {\n return _this.getToastsHandler();\n };\n\n this.closeAll = function () {\n return _this.closeAllHandler();\n };\n\n this.notify = function (title) {\n var settings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _this.notifyHandler(title, _objectSpread(_objectSpread({}, settings), {}, {\n intent: 'none'\n }));\n };\n\n this.success = function (title) {\n var settings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _this.notifyHandler(title, _objectSpread(_objectSpread({}, settings), {}, {\n intent: 'success'\n }));\n };\n\n this.warning = function (title) {\n var settings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _this.notifyHandler(title, _objectSpread(_objectSpread({}, settings), {}, {\n intent: 'warning'\n }));\n };\n\n this.danger = function (title) {\n var settings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _this.notifyHandler(title, _objectSpread(_objectSpread({}, settings), {}, {\n intent: 'danger'\n }));\n };\n\n if (!isBrowser) return;\n var container = document.createElement('div');\n container.setAttribute('data-evergreen-toaster-container', '');\n document.body.appendChild(container);\n ReactDOM.render( /*#__PURE__*/React.createElement(ToastManager, {\n bindNotify: this._bindNotify,\n bindGetToasts: this._bindGetToasts,\n bindCloseAll: this._bindCloseAll\n }), container);\n};\n\nexport { Toaster as default };","import Toaster from './toaster';\nvar toaster = new Toaster();\nexport default toaster;","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Chart\", {\n enumerable: true,\n get: function get() {\n return _chart[\"default\"];\n }\n});\nexports.defaults = exports.Scatter = exports.Bubble = exports.Polar = exports.Radar = exports.HorizontalBar = exports.Bar = exports.Line = exports.Pie = exports.Doughnut = exports[\"default\"] = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _chart = _interopRequireDefault(require(\"chart.js\"));\n\nvar _isEqual = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _keyBy = _interopRequireDefault(require(\"lodash/keyBy\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 _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\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 _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; } 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 { Date.prototype.toString.call(Reflect.construct(Date, [], 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\nvar NODE_ENV = typeof process !== 'undefined' && process.env && process.env.NODE_ENV;\n\nvar ChartComponent = /*#__PURE__*/function (_React$Component) {\n _inherits(ChartComponent, _React$Component);\n\n var _super = _createSuper(ChartComponent);\n\n function ChartComponent() {\n var _this;\n\n _classCallCheck(this, ChartComponent);\n\n _this = _super.call(this);\n\n _defineProperty(_assertThisInitialized(_this), \"handleOnClick\", function (event) {\n var instance = _this.chartInstance;\n var _this$props = _this.props,\n getDatasetAtEvent = _this$props.getDatasetAtEvent,\n getElementAtEvent = _this$props.getElementAtEvent,\n getElementsAtEvent = _this$props.getElementsAtEvent,\n onElementsClick = _this$props.onElementsClick;\n getDatasetAtEvent && getDatasetAtEvent(instance.getDatasetAtEvent(event), event);\n getElementAtEvent && getElementAtEvent(instance.getElementAtEvent(event), event);\n getElementsAtEvent && getElementsAtEvent(instance.getElementsAtEvent(event), event);\n onElementsClick && onElementsClick(instance.getElementsAtEvent(event), event); // Backward compatibility\n });\n\n _defineProperty(_assertThisInitialized(_this), \"ref\", function (element) {\n _this.element = element;\n });\n\n _this.chartInstance = undefined;\n return _this;\n }\n\n _createClass(ChartComponent, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.renderChart();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.props.redraw) {\n this.destroyChart();\n this.renderChart();\n return;\n }\n\n this.updateChart();\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps) {\n var _this$props2 = this.props,\n redraw = _this$props2.redraw,\n type = _this$props2.type,\n options = _this$props2.options,\n plugins = _this$props2.plugins,\n legend = _this$props2.legend,\n height = _this$props2.height,\n width = _this$props2.width;\n\n if (nextProps.redraw === true) {\n return true;\n }\n\n if (height !== nextProps.height || width !== nextProps.width) {\n return true;\n }\n\n if (type !== nextProps.type) {\n return true;\n }\n\n if (!(0, _isEqual[\"default\"])(legend, nextProps.legend)) {\n return true;\n }\n\n if (!(0, _isEqual[\"default\"])(options, nextProps.options)) {\n return true;\n }\n\n var nextData = this.transformDataProp(nextProps);\n\n if (!(0, _isEqual[\"default\"])(this.shadowDataProp, nextData)) {\n return true;\n }\n\n return !(0, _isEqual[\"default\"])(plugins, nextProps.plugins);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.destroyChart();\n }\n }, {\n key: \"transformDataProp\",\n value: function transformDataProp(props) {\n var data = props.data;\n\n if (typeof data == 'function') {\n var node = this.element;\n return data(node);\n } else {\n return data;\n }\n } // Chart.js directly mutates the data.dataset objects by adding _meta proprerty\n // this makes impossible to compare the current and next data changes\n // therefore we memoize the data prop while sending a fake to Chart.js for mutation.\n // see https://github.com/chartjs/Chart.js/blob/master/src/core/core.controller.js#L615-L617\n\n }, {\n key: \"memoizeDataProps\",\n value: function memoizeDataProps() {\n if (!this.props.data) {\n return;\n }\n\n var data = this.transformDataProp(this.props);\n this.shadowDataProp = _objectSpread(_objectSpread({}, data), {}, {\n datasets: data.datasets && data.datasets.map(function (set) {\n return _objectSpread({}, set);\n })\n });\n this.saveCurrentDatasets(); // to remove the dataset metadata from this chart when the chart is destroyed\n\n return data;\n }\n }, {\n key: \"checkDatasets\",\n value: function checkDatasets(datasets) {\n var isDev = NODE_ENV !== 'production' && NODE_ENV !== 'prod';\n var usingCustomKeyProvider = this.props.datasetKeyProvider !== ChartComponent.getLabelAsKey;\n var multipleDatasets = datasets.length > 1;\n\n if (isDev && multipleDatasets && !usingCustomKeyProvider) {\n var shouldWarn = false;\n datasets.forEach(function (dataset) {\n if (!dataset.label) {\n shouldWarn = true;\n }\n });\n\n if (shouldWarn) {\n console.error('[react-chartjs-2] Warning: Each dataset needs a unique key. By default, the \"label\" property on each dataset is used. Alternatively, you may provide a \"datasetKeyProvider\" as a prop that returns a unique key.');\n }\n }\n }\n }, {\n key: \"getCurrentDatasets\",\n value: function getCurrentDatasets() {\n return this.chartInstance && this.chartInstance.config.data && this.chartInstance.config.data.datasets || [];\n }\n }, {\n key: \"saveCurrentDatasets\",\n value: function saveCurrentDatasets() {\n var _this2 = this;\n\n this.datasets = this.datasets || {};\n var currentDatasets = this.getCurrentDatasets();\n currentDatasets.forEach(function (d) {\n _this2.datasets[_this2.props.datasetKeyProvider(d)] = d;\n });\n }\n }, {\n key: \"updateChart\",\n value: function updateChart() {\n var _this3 = this;\n\n var options = this.props.options;\n var data = this.memoizeDataProps(this.props);\n if (!this.chartInstance) return;\n\n if (options) {\n this.chartInstance.options = _chart[\"default\"].helpers.configMerge(this.chartInstance.options, options);\n } // Pipe datasets to chart instance datasets enabling\n // seamless transitions\n\n\n var currentDatasets = this.getCurrentDatasets();\n var nextDatasets = data.datasets || [];\n this.checkDatasets(currentDatasets);\n var currentDatasetsIndexed = (0, _keyBy[\"default\"])(currentDatasets, this.props.datasetKeyProvider); // We can safely replace the dataset array, as long as we retain the _meta property\n // on each dataset.\n\n this.chartInstance.config.data.datasets = nextDatasets.map(function (next) {\n var current = currentDatasetsIndexed[_this3.props.datasetKeyProvider(next)];\n\n if (current && current.type === next.type && next.data) {\n // Be robust to no data. Relevant for other update mechanisms as in chartjs-plugin-streaming.\n // The data array must be edited in place. As chart.js adds listeners to it.\n current.data.splice(next.data.length);\n next.data.forEach(function (point, pid) {\n current.data[pid] = next.data[pid];\n });\n\n var _data = next.data,\n otherProps = _objectWithoutProperties(next, [\"data\"]); // Merge properties. Notice a weakness here. If a property is removed\n // from next, it will be retained by current and never disappears.\n // Workaround is to set value to null or undefined in next.\n\n\n return _objectSpread(_objectSpread({}, current), otherProps);\n } else {\n return next;\n }\n });\n\n var datasets = data.datasets,\n rest = _objectWithoutProperties(data, [\"datasets\"]);\n\n this.chartInstance.config.data = _objectSpread(_objectSpread({}, this.chartInstance.config.data), rest);\n this.chartInstance.update();\n }\n }, {\n key: \"renderChart\",\n value: function renderChart() {\n var _this$props3 = this.props,\n options = _this$props3.options,\n legend = _this$props3.legend,\n type = _this$props3.type,\n plugins = _this$props3.plugins;\n var node = this.element;\n var data = this.memoizeDataProps();\n\n if (typeof legend !== 'undefined' && !(0, _isEqual[\"default\"])(ChartComponent.defaultProps.legend, legend)) {\n options.legend = legend;\n }\n\n this.chartInstance = new _chart[\"default\"](node, {\n type: type,\n data: data,\n options: options,\n plugins: plugins\n });\n }\n }, {\n key: \"destroyChart\",\n value: function destroyChart() {\n if (!this.chartInstance) {\n return;\n } // Put all of the datasets that have existed in the chart back on the chart\n // so that the metadata associated with this chart get destroyed.\n // This allows the datasets to be used in another chart. This can happen,\n // for example, in a tabbed UI where the chart gets created each time the\n // tab gets switched to the chart and uses the same data).\n\n\n this.saveCurrentDatasets();\n var datasets = Object.values(this.datasets);\n this.chartInstance.config.data.datasets = datasets;\n this.chartInstance.destroy();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props4 = this.props,\n height = _this$props4.height,\n width = _this$props4.width,\n id = _this$props4.id;\n return /*#__PURE__*/_react[\"default\"].createElement(\"canvas\", {\n ref: this.ref,\n height: height,\n width: width,\n id: id,\n onClick: this.handleOnClick\n });\n }\n }]);\n\n return ChartComponent;\n}(_react[\"default\"].Component);\n\n_defineProperty(ChartComponent, \"getLabelAsKey\", function (d) {\n return d.label;\n});\n\n_defineProperty(ChartComponent, \"propTypes\", {\n data: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].func]).isRequired,\n getDatasetAtEvent: _propTypes[\"default\"].func,\n getElementAtEvent: _propTypes[\"default\"].func,\n getElementsAtEvent: _propTypes[\"default\"].func,\n height: _propTypes[\"default\"].number,\n legend: _propTypes[\"default\"].object,\n onElementsClick: _propTypes[\"default\"].func,\n options: _propTypes[\"default\"].object,\n plugins: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].object),\n redraw: _propTypes[\"default\"].bool,\n type: function type(props, propName, componentName) {\n if (!_chart[\"default\"].controllers[props[propName]]) {\n return new Error('Invalid chart type `' + props[propName] + '` supplied to' + ' `' + componentName + '`.');\n }\n },\n width: _propTypes[\"default\"].number,\n datasetKeyProvider: _propTypes[\"default\"].func\n});\n\n_defineProperty(ChartComponent, \"defaultProps\", {\n legend: {\n display: true,\n position: 'bottom'\n },\n type: 'doughnut',\n height: 150,\n width: 300,\n redraw: false,\n options: {},\n datasetKeyProvider: ChartComponent.getLabelAsKey\n});\n\nvar _default = ChartComponent;\nexports[\"default\"] = _default;\n\nvar Doughnut = /*#__PURE__*/function (_React$Component2) {\n _inherits(Doughnut, _React$Component2);\n\n var _super2 = _createSuper(Doughnut);\n\n function Doughnut() {\n _classCallCheck(this, Doughnut);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(Doughnut, [{\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref) {\n return _this4.chartInstance = _ref && _ref.chartInstance;\n },\n type: \"doughnut\"\n }));\n }\n }]);\n\n return Doughnut;\n}(_react[\"default\"].Component);\n\nexports.Doughnut = Doughnut;\n\nvar Pie = /*#__PURE__*/function (_React$Component3) {\n _inherits(Pie, _React$Component3);\n\n var _super3 = _createSuper(Pie);\n\n function Pie() {\n _classCallCheck(this, Pie);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(Pie, [{\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref2) {\n return _this5.chartInstance = _ref2 && _ref2.chartInstance;\n },\n type: \"pie\"\n }));\n }\n }]);\n\n return Pie;\n}(_react[\"default\"].Component);\n\nexports.Pie = Pie;\n\nvar Line = /*#__PURE__*/function (_React$Component4) {\n _inherits(Line, _React$Component4);\n\n var _super4 = _createSuper(Line);\n\n function Line() {\n _classCallCheck(this, Line);\n\n return _super4.apply(this, arguments);\n }\n\n _createClass(Line, [{\n key: \"render\",\n value: function render() {\n var _this6 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref3) {\n return _this6.chartInstance = _ref3 && _ref3.chartInstance;\n },\n type: \"line\"\n }));\n }\n }]);\n\n return Line;\n}(_react[\"default\"].Component);\n\nexports.Line = Line;\n\nvar Bar = /*#__PURE__*/function (_React$Component5) {\n _inherits(Bar, _React$Component5);\n\n var _super5 = _createSuper(Bar);\n\n function Bar() {\n _classCallCheck(this, Bar);\n\n return _super5.apply(this, arguments);\n }\n\n _createClass(Bar, [{\n key: \"render\",\n value: function render() {\n var _this7 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref4) {\n return _this7.chartInstance = _ref4 && _ref4.chartInstance;\n },\n type: \"bar\"\n }));\n }\n }]);\n\n return Bar;\n}(_react[\"default\"].Component);\n\nexports.Bar = Bar;\n\nvar HorizontalBar = /*#__PURE__*/function (_React$Component6) {\n _inherits(HorizontalBar, _React$Component6);\n\n var _super6 = _createSuper(HorizontalBar);\n\n function HorizontalBar() {\n _classCallCheck(this, HorizontalBar);\n\n return _super6.apply(this, arguments);\n }\n\n _createClass(HorizontalBar, [{\n key: \"render\",\n value: function render() {\n var _this8 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref5) {\n return _this8.chartInstance = _ref5 && _ref5.chartInstance;\n },\n type: \"horizontalBar\"\n }));\n }\n }]);\n\n return HorizontalBar;\n}(_react[\"default\"].Component);\n\nexports.HorizontalBar = HorizontalBar;\n\nvar Radar = /*#__PURE__*/function (_React$Component7) {\n _inherits(Radar, _React$Component7);\n\n var _super7 = _createSuper(Radar);\n\n function Radar() {\n _classCallCheck(this, Radar);\n\n return _super7.apply(this, arguments);\n }\n\n _createClass(Radar, [{\n key: \"render\",\n value: function render() {\n var _this9 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref6) {\n return _this9.chartInstance = _ref6 && _ref6.chartInstance;\n },\n type: \"radar\"\n }));\n }\n }]);\n\n return Radar;\n}(_react[\"default\"].Component);\n\nexports.Radar = Radar;\n\nvar Polar = /*#__PURE__*/function (_React$Component8) {\n _inherits(Polar, _React$Component8);\n\n var _super8 = _createSuper(Polar);\n\n function Polar() {\n _classCallCheck(this, Polar);\n\n return _super8.apply(this, arguments);\n }\n\n _createClass(Polar, [{\n key: \"render\",\n value: function render() {\n var _this10 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref7) {\n return _this10.chartInstance = _ref7 && _ref7.chartInstance;\n },\n type: \"polarArea\"\n }));\n }\n }]);\n\n return Polar;\n}(_react[\"default\"].Component);\n\nexports.Polar = Polar;\n\nvar Bubble = /*#__PURE__*/function (_React$Component9) {\n _inherits(Bubble, _React$Component9);\n\n var _super9 = _createSuper(Bubble);\n\n function Bubble() {\n _classCallCheck(this, Bubble);\n\n return _super9.apply(this, arguments);\n }\n\n _createClass(Bubble, [{\n key: \"render\",\n value: function render() {\n var _this11 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref8) {\n return _this11.chartInstance = _ref8 && _ref8.chartInstance;\n },\n type: \"bubble\"\n }));\n }\n }]);\n\n return Bubble;\n}(_react[\"default\"].Component);\n\nexports.Bubble = Bubble;\n\nvar Scatter = /*#__PURE__*/function (_React$Component10) {\n _inherits(Scatter, _React$Component10);\n\n var _super10 = _createSuper(Scatter);\n\n function Scatter() {\n _classCallCheck(this, Scatter);\n\n return _super10.apply(this, arguments);\n }\n\n _createClass(Scatter, [{\n key: \"render\",\n value: function render() {\n var _this12 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref9) {\n return _this12.chartInstance = _ref9 && _ref9.chartInstance;\n },\n type: \"scatter\"\n }));\n }\n }]);\n\n return Scatter;\n}(_react[\"default\"].Component);\n\nexports.Scatter = Scatter;\nvar defaults = _chart[\"default\"].defaults;\nexports.defaults = defaults;"],"sourceRoot":""}